From 79d460e0f3b06413faf5c1f856800f53d963e8ec Mon Sep 17 00:00:00 2001 From: Matt Gregg Date: Wed, 12 Jan 2022 10:42:49 -0600 Subject: [PATCH 01/44] [TextStyle] Add warning color variation (#4880) * Add warning color to TextStyle * Add to unreleased Co-authored-by: Kyle Durand --- UNRELEASED.md | 1 + src/components/TextStyle/README.md | 10 ++++++++++ src/components/TextStyle/TextStyle.scss | 4 ++++ src/components/TextStyle/TextStyle.tsx | 9 ++++++++- src/components/TextStyle/tests/TextStyle.test.tsx | 7 +++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/UNRELEASED.md b/UNRELEASED.md index a35c17b2fdc..de152f6d1a9 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -14,6 +14,7 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t - Added suppport for a `url` prop in the `Tag` component ([#4837](https://github.com/Shopify/polaris-react/pull/4837)) - Added support for `children` to take elements other than strings in the `Tag` component ([#4837](https://github.com/Shopify/polaris-react/pull/4837)) - Bumped the `@shopify/storybook-a11y-test` package to the latest version `0.3.0` ([#4870](https://github.com/Shopify/polaris-react/pull/4870)) +- Added a `warning` variation to `TextStyle` ([#4880](https://github.com/Shopify/polaris-react/pull/4880)) ### Bug fixes diff --git a/src/components/TextStyle/README.md b/src/components/TextStyle/README.md index f882432d2c7..b4b471d0f82 100644 --- a/src/components/TextStyle/README.md +++ b/src/components/TextStyle/README.md @@ -11,6 +11,7 @@ keywords: - subdued - strong - negative + - warning - positive - cues - enhancements @@ -37,6 +38,7 @@ Text style should be: - Used when enhancing the text to help merchants understand its meaning - Subdued if the text is less important than its surrounding text +- Warning if the text denotes something that needs attention, or that merchants need to take action on. - Strong for input fields, or for a row total in a price table - Paired with symbols, like an arrow or dollar sign, when using positive or negative styles @@ -124,6 +126,14 @@ Use in combination with a symbol showing a decreasing value to indicate a downwa +### Warning text style + +Use to denote something that needs attention, or that merchants need to take action on. + +```jsx +Scheduled maintenance +``` + ### Code text style Use to display inline snippets of code or code-like text. diff --git a/src/components/TextStyle/TextStyle.scss b/src/components/TextStyle/TextStyle.scss index 0b8959653af..666c2c20cf4 100644 --- a/src/components/TextStyle/TextStyle.scss +++ b/src/components/TextStyle/TextStyle.scss @@ -11,6 +11,10 @@ $code-font-size: 1.15em; color: var(--p-text-critical); } +.variationWarning { + color: var(--p-text-warning); +} + .variationCode { position: relative; padding: $code-padding; diff --git a/src/components/TextStyle/TextStyle.tsx b/src/components/TextStyle/TextStyle.tsx index 4be738b6edd..a77543d26b6 100644 --- a/src/components/TextStyle/TextStyle.tsx +++ b/src/components/TextStyle/TextStyle.tsx @@ -4,11 +4,18 @@ import {classNames, variationName} from '../../utilities/css'; import styles from './TextStyle.scss'; -type Variation = 'positive' | 'negative' | 'strong' | 'subdued' | 'code'; +type Variation = + | 'positive' + | 'negative' + | 'warning' + | 'strong' + | 'subdued' + | 'code'; enum VariationValue { Positive = 'positive', Negative = 'negative', + Warning = 'warning', Strong = 'strong', Subdued = 'subdued', Code = 'code', diff --git a/src/components/TextStyle/tests/TextStyle.test.tsx b/src/components/TextStyle/tests/TextStyle.test.tsx index ddf8c6e2b52..6502d5b6ba5 100644 --- a/src/components/TextStyle/tests/TextStyle.test.tsx +++ b/src/components/TextStyle/tests/TextStyle.test.tsx @@ -33,6 +33,13 @@ describe('', () => { expect(textStyle).toContainReactComponent('span'); }); + it('renders a span when the variant warning is provided', () => { + const textStyle = mountWithApp( + Hello Polaris, + ); + expect(textStyle).toContainReactComponent('span'); + }); + it('renders a span when the variant subdued is provided', () => { const textStyle = mountWithApp( Hello Polaris, From d857d99377459e95bb97b328c538c54a0ccd05fd Mon Sep 17 00:00:00 2001 From: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com> Date: Wed, 12 Jan 2022 09:01:39 -0800 Subject: [PATCH 02/44] fix: Remove root entry point generation (#4882) --- .eslintignore | 4 ---- .gitignore | 4 ---- .prettierignore | 4 ---- loom.config.ts | 1 + 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.eslintignore b/.eslintignore index a0ea6e8e541..9f9af9fd8f7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,7 +4,3 @@ node_modules /build /build-internal /src/styles/polaris-tokens - -index.esnext -index.js -index.mjs diff --git a/.gitignore b/.gitignore index a0411d73d8e..32e408dec81 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,3 @@ node_modules *.scss.d.ts /src/styles/polaris-tokens .idea - -index.esnext -index.js -index.mjs diff --git a/.prettierignore b/.prettierignore index 09113deba9f..9cff4cf74f1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,7 +5,3 @@ node_modules /src/styles/polaris-tokens /package.json - -index.esnext -index.js -index.mjs diff --git a/loom.config.ts b/loom.config.ts index 23f5e5ef76f..1e85b81aec4 100644 --- a/loom.config.ts +++ b/loom.config.ts @@ -28,6 +28,7 @@ export default createPackage((pkg) => { pkg.entry({root: './src/index.ts'}); pkg.use( buildLibrary({ + rootEntrypoints: false, jestTestEnvironment: 'jsdom', targets: 'extends @shopify/browserslist-config, node 12.20', commonjs: true, From f59cc218f9b8fb292b0f5500db6e080c896bcd3f Mon Sep 17 00:00:00 2001 From: Kyle Durand Date: Wed, 12 Jan 2022 19:04:19 -0500 Subject: [PATCH 03/44] Upgrade nvmrc and dev.yml (#4888) --- .nvmrc | 2 +- dev.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.nvmrc b/.nvmrc index 49a625d6908..4be2b935c50 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v12.22.0 +v16.9.1 diff --git a/dev.yml b/dev.yml index e740ce9aa11..ff3730ac3a0 100644 --- a/dev.yml +++ b/dev.yml @@ -2,7 +2,7 @@ name: polaris-react up: - node: yarn: v1.13.0 - version: v12.22.0 # to be kept in sync with .nvmrc and ci.yml + version: v16.9.1 # to be kept in sync with .nvmrc and ci.yml (when v8 has shipped) - git_hooks: pre-commit: pre-commit From 1fbc269d562805a6feeca5d34786018870cd3499 Mon Sep 17 00:00:00 2001 From: Roxanne Panthaky Date: Thu, 13 Jan 2022 13:10:44 -0500 Subject: [PATCH 04/44] Fixed checkbox showing on an Autocomplete action when allowMultiple is true (#4887) --- UNRELEASED.md | 1 + .../Listbox/components/TextOption/TextOption.tsx | 2 +- .../TextOption/tests/TextOption.test.tsx | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/UNRELEASED.md b/UNRELEASED.md index de152f6d1a9..27421532ab4 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -23,6 +23,7 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t - Reverted the deprecation of the "attention" `status` in `Badge` ([#4840](https://github.com/Shopify/polaris-react/pull/4840)) - Fixed an issue where the `MutationObserver` of the `PositionedOverlay` was calling setState on an unmounted component ([#4869](https://github.com/Shopify/polaris-react/pull/4869)); - Fixed a color contrast issue in `FileUpload` ([#4875](https://github.com/Shopify/polaris-react/pull/4875)) +- Fixed a bug where a checkbox showed on an `Autocomplete` action when `allowMultiple` is true ([#4886](https://github.com/Shopify/polaris-react/pull/4886)) ### Documentation diff --git a/src/components/Listbox/components/TextOption/TextOption.tsx b/src/components/Listbox/components/TextOption/TextOption.tsx index 438f31e6ffd..06e960af307 100644 --- a/src/components/Listbox/components/TextOption/TextOption.tsx +++ b/src/components/Listbox/components/TextOption/TextOption.tsx @@ -32,7 +32,7 @@ export const TextOption = memo(function TextOption({ return (
- {allowMultiple ? ( + {allowMultiple && !isAction ? ( ) : ( children diff --git a/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx b/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx index 8e8a8136c19..3a00947dbff 100644 --- a/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx +++ b/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx @@ -4,6 +4,7 @@ import {mount, mountWithApp} from 'tests/utilities'; import {TextOption} from '../TextOption'; import {Checkbox} from '../../../../Checkbox'; import {ComboboxListboxOptionContext} from '../../../../../utilities/combobox/context'; +import {MappedActionContext} from '../../../../../utilities/autocomplete/context'; describe('TextOption', () => { it('renders children', () => { @@ -34,11 +35,20 @@ describe('TextOption', () => { child , - { - features: {newDesignLanguage: true}, - }, ); expect(textOption).toContainReactComponent(Checkbox); }); + + it('does not render visual checkbox when allowMultiple is provided and isAction is true', () => { + const textOption = mountWithApp( + + + child + + , + ); + + expect(textOption).not.toContainReactComponent(Checkbox); + }); }); From 32bb68e85f7dd5c11ca43ea8083b9433b05a7aaf Mon Sep 17 00:00:00 2001 From: Aaron Adams Date: Thu, 13 Jan 2022 20:29:34 +0100 Subject: [PATCH 05/44] Remove serve dependency and dev start command (#4876) Co-authored-by: Alex Page --- Procfile | 1 - UNRELEASED.md | 3 + dev.yml | 1 - package.json | 4 +- yarn.lock | 237 ++------------------------------------------------ 5 files changed, 12 insertions(+), 234 deletions(-) delete mode 100644 Procfile diff --git a/Procfile b/Procfile deleted file mode 100644 index 28fe750b8d0..00000000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: npm run start diff --git a/UNRELEASED.md b/UNRELEASED.md index 27421532ab4..bb0193bb3c0 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -33,11 +33,14 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t ### Development workflow +- Removed `dev start` command ([#4876](https://github.com/Shopify/polaris-react/pull/4876)) + ### Dependency upgrades - Bumped `@shopify/polaris-icons` to v4.11.0 ([#4837](https://github.com/Shopify/polaris-react/pull/4837)) - Bumped `@storybook/react` to 6.4.10 ([#4796](https://github.com/Shopify/polaris-react/pull/4796)) - Bumped `@shopify/storybook-a11y-test` to 0.4.3 ([#4796](https://github.com/Shopify/polaris-react/pull/4796)) +- Removed dependency `serve` ([#4876](https://github.com/Shopify/polaris-react/pull/4876)) ### Code quality diff --git a/dev.yml b/dev.yml index ff3730ac3a0..3fd08809ea6 100644 --- a/dev.yml +++ b/dev.yml @@ -16,7 +16,6 @@ commands: # For a list of Common Commands in Projects, check out: # https://development.shopify.io/tools/dev/getting_started/Common-Commands-in-Projects build: yarn run build - start: yarn run start server: yarn run dev style: yarn run lint test: yarn run test diff --git a/package.json b/package.json index 41df4bb4708..9b101693492 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "copy-polaris-tokens": "rimraf ./src/styles/polaris-tokens && shx cp -r ./node_modules/@shopify/polaris-tokens/dist ./src/styles/polaris-tokens", "prepublishOnly": "yarn run build", "dev": "npm-run-all copy-polaris-tokens storybook", - "start": "serve ./build-internal/storybook/static -l ${PORT:=6006}", "readme-update-version": "node ./scripts/readme-update-version", "version": "yarn run readme-update-version", "storybook": "start-storybook -p 6006 --quiet", @@ -77,8 +76,7 @@ "@types/react-transition-group": "^4.4.2", "focus-visible": "^5.2.0", "lodash": "^4.17.4", - "react-transition-group": "^4.4.2", - "serve": "^12.0.0" + "react-transition-group": "^4.4.2" }, "peerDependencies": { "react": "^16.14.0 || ^17.0.0", diff --git a/yarn.lock b/yarn.lock index e0be2d8d643..3fcb247a07c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4271,11 +4271,6 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zeit/schemas@2.6.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" - integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== - abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" @@ -4385,7 +4380,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@6.12.6, ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -4415,13 +4410,6 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= - dependencies: - string-width "^2.0.0" - ansi-align@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" @@ -4539,11 +4527,6 @@ aproba@^1.0.3, aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== -arch@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - are-we-there-yet@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" @@ -4560,11 +4543,6 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" -arg@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arg/-/arg-2.0.0.tgz#c06e7ff69ab05b3a4a03ebe0407fac4cba657545" - integrity sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w== - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -5128,19 +5106,6 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -boxen@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^2.0.0" - boxen@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" @@ -5461,11 +5426,6 @@ camelcase-keys@^6.2.2: map-obj "^4.0.0" quick-lru "^4.0.1" -camelcase@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -5527,16 +5487,7 @@ ccount@^1.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.5.tgz#ac82a944905a65ce204eb03023157edf29425c17" integrity sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw== -chalk@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: +chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -5737,11 +5688,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= - cli-boxes@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" @@ -5775,15 +5721,6 @@ clipboard@^2.0.0: select "^1.1.2" tiny-emitter "^2.0.0" -clipboardy@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-2.3.0.tgz#3c2903650c68e46a91b388985bc2774287dba290" - integrity sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ== - dependencies: - arch "^2.1.1" - execa "^1.0.0" - is-wsl "^2.1.1" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -5963,26 +5900,13 @@ component-emitter@^1.2.1: resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== -compressible@~2.0.14, compressible@~2.0.16: +compressible@~2.0.16: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== dependencies: mime-db ">= 1.43.0 < 2" -compression@1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.14" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.2" - vary "~1.1.2" - compression@^1.7.4: version "1.7.4" resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" @@ -6050,11 +5974,6 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - content-disposition@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" @@ -6257,15 +6176,6 @@ cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -7536,19 +7446,6 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" integrity sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg== -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -7775,13 +7672,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-url-parser@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" - integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= - dependencies: - punycode "^1.3.2" - fastest-levenshtein@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" @@ -8252,11 +8142,6 @@ get-stdin@^8.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -10547,14 +10432,6 @@ lowlight@~1.11.0: fault "^1.0.2" highlight.js "~9.13.0" -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -10839,18 +10716,6 @@ mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== - -mime-types@2.1.18: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== - dependencies: - mime-db "~1.33.0" - mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" @@ -11532,7 +11397,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -on-headers@~1.0.1, on-headers@~1.0.2: +on-headers@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== @@ -11908,11 +11773,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -11933,7 +11793,7 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-to-regexp@2.2.1, path-to-regexp@^2.2.1: +path-to-regexp@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== @@ -12633,11 +12493,6 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -12684,7 +12539,7 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@^1.2.4, punycode@^1.3.2: +punycode@^1.2.4: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -12761,11 +12616,6 @@ randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -12789,7 +12639,7 @@ raw-loader@^4.0.2: loader-utils "^2.0.0" schema-utils "^3.0.0" -rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: +rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -13288,21 +13138,6 @@ regexpu-core@^4.7.1: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.2.0" -registry-auth-token@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= - dependencies: - rc "^1.0.1" - regjsgen@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" @@ -13788,20 +13623,6 @@ serve-favicon@^2.5.0: parseurl "~1.3.2" safe-buffer "5.1.1" -serve-handler@6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" - integrity sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w== - dependencies: - bytes "3.0.0" - content-disposition "0.5.2" - fast-url-parser "1.1.3" - mime-types "2.1.18" - minimatch "3.0.4" - path-is-inside "1.0.2" - path-to-regexp "2.2.1" - range-parser "1.2.0" - serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" @@ -13812,21 +13633,6 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" -serve@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/serve/-/serve-12.0.0.tgz#122962f712b57660059de9d109c82599280e4949" - integrity sha512-BkTsETQYynAZ7rXX414kg4X6EvuZQS3UVs1NY0VQYdRHSTYWPYcH38nnDh48D0x6ONuislgjag8uKlU2gTBImA== - dependencies: - "@zeit/schemas" "2.6.0" - ajv "6.12.6" - arg "2.0.0" - boxen "1.3.0" - chalk "2.4.1" - clipboardy "2.3.0" - compression "1.7.3" - serve-handler "6.1.3" - update-check "1.5.2" - set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -14319,7 +14125,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.1 || ^2.0.0", "string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.1 || ^2.0.0", "string-width@^1.0.2 || 2": version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -14802,13 +14608,6 @@ telejson@^5.3.2, telejson@^5.3.3: lodash "^4.17.21" memoizerific "^1.11.3" -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= - dependencies: - execa "^0.7.0" - terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -15403,14 +15202,6 @@ upath@^1.1.1: resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== -update-check@1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.5.2.tgz#2fe09f725c543440b3d7dabe8971f2d5caaedc28" - integrity sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ== - dependencies: - registry-auth-token "3.3.2" - registry-url "3.1.0" - upper-case-first@^1.1.0, upper-case-first@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" @@ -15892,13 +15683,6 @@ wide-align@^1.1.2: dependencies: string-width "^1.0.2 || 2 || 3 || 4" -widest-line@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" - integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== - dependencies: - string-width "^2.1.1" - widest-line@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" @@ -16022,11 +15806,6 @@ yaeti@^0.0.6: resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - yallist@^3.0.0, yallist@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" From 4ec02cae06ba6cf97b2bb108732bb56ebda1d5b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 10:40:15 -0500 Subject: [PATCH 06/44] Bump follow-redirects in /examples/create-react-app-ts-react-testing (#4892) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.12.1 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.12.1...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- examples/create-react-app-ts-react-testing/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/create-react-app-ts-react-testing/yarn.lock b/examples/create-react-app-ts-react-testing/yarn.lock index d2134c3c922..5a54e124cc1 100644 --- a/examples/create-react-app-ts-react-testing/yarn.lock +++ b/examples/create-react-app-ts-react-testing/yarn.lock @@ -5483,9 +5483,9 @@ focus-visible@^5.2.0: integrity sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ== follow-redirects@^1.0.0: - version "1.12.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6" - integrity sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg== + version "1.14.7" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" + integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== for-in@^1.0.2: version "1.0.2" From 7b7788bf6f565a134aaf3051bc80369fbfeb661d Mon Sep 17 00:00:00 2001 From: Daniel Leroux Date: Fri, 14 Jan 2022 13:05:57 -0500 Subject: [PATCH 07/44] fixing autocomplete action (#4893) --- UNRELEASED.md | 1 + .../components/MappedAction/MappedAction.scss | 3 --- .../components/MappedAction/MappedAction.tsx | 1 - .../MappedAction/tests/MappedAction.test.tsx | 5 +++-- .../Listbox/components/Action/Action.scss | 4 ++++ .../Listbox/components/Action/Action.tsx | 18 ++++++++++----- .../Listbox/components/Option/Option.tsx | 7 +++--- .../components/Option/tests/Option.test.tsx | 6 +---- .../components/TextOption/TextOption.scss | 6 ++++- .../components/TextOption/TextOption.tsx | 6 +++-- .../TextOption/tests/TextOption.test.tsx | 22 ++++++++++++++----- src/utilities/autocomplete/context.ts | 5 +---- src/utilities/listbox/context.ts | 2 ++ 13 files changed, 54 insertions(+), 32 deletions(-) diff --git a/UNRELEASED.md b/UNRELEASED.md index bb0193bb3c0..94150096a99 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -24,6 +24,7 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t - Fixed an issue where the `MutationObserver` of the `PositionedOverlay` was calling setState on an unmounted component ([#4869](https://github.com/Shopify/polaris-react/pull/4869)); - Fixed a color contrast issue in `FileUpload` ([#4875](https://github.com/Shopify/polaris-react/pull/4875)) - Fixed a bug where a checkbox showed on an `Autocomplete` action when `allowMultiple` is true ([#4886](https://github.com/Shopify/polaris-react/pull/4886)) +- Fixed a bug where the `Listbox.Action` was not treated like an action when used outside `Autocomplete` ([#4893](https://github.com/Shopify/polaris-react/pull/4893)) ### Documentation diff --git a/src/components/Autocomplete/components/MappedAction/MappedAction.scss b/src/components/Autocomplete/components/MappedAction/MappedAction.scss index fbc8a337384..f701fa2a3d8 100644 --- a/src/components/Autocomplete/components/MappedAction/MappedAction.scss +++ b/src/components/Autocomplete/components/MappedAction/MappedAction.scss @@ -25,9 +25,6 @@ $item-vertical-padding: ($item-min-height - line-height(body)) / 2; min-height: $item-min-height; text-align: left; cursor: pointer; - padding: $item-vertical-padding spacing(tight); - border-radius: var(--p-border-radius-base); - border-top: 1px solid var(--p-surface); // 1px gap between elements &:hover { background-color: var(--p-surface-hovered); diff --git a/src/components/Autocomplete/components/MappedAction/MappedAction.tsx b/src/components/Autocomplete/components/MappedAction/MappedAction.tsx index c20750540e0..8175a440e71 100644 --- a/src/components/Autocomplete/components/MappedAction/MappedAction.tsx +++ b/src/components/Autocomplete/components/MappedAction/MappedAction.tsx @@ -86,7 +86,6 @@ export function MappedAction({ external, onAction, destructive, - isAction: true, }), [role, url, external, onAction, destructive], ); diff --git a/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx b/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx index e98fca7eaba..a279e646688 100644 --- a/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx +++ b/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx @@ -61,7 +61,6 @@ describe('MappedAction', () => { expect(mappedAction).toContainReactComponent(MappedActionContext.Provider, { value: { ...props, - isAction: true, }, }); }); @@ -174,7 +173,9 @@ describe('MappedAction', () => { ); expect(mappedAction).toContainReactComponent(MockComponent); - expect(mappedAction).not.toContainReactComponent(Icon, {source}); + expect(mappedAction).not.toContainReactComponent(Icon, { + source, + }); }); }); }); diff --git a/src/components/Listbox/components/Action/Action.scss b/src/components/Listbox/components/Action/Action.scss index 4a896235601..e6d903e83a7 100644 --- a/src/components/Listbox/components/Action/Action.scss +++ b/src/components/Listbox/components/Action/Action.scss @@ -5,6 +5,10 @@ flex: 1; } +.ActionDivider { + margin-bottom: spacing(extra-tight); +} + .Icon { padding-right: spacing(tight); } diff --git a/src/components/Listbox/components/Action/Action.tsx b/src/components/Listbox/components/Action/Action.tsx index 9494eb969fc..03adaf4dbbb 100644 --- a/src/components/Listbox/components/Action/Action.tsx +++ b/src/components/Listbox/components/Action/Action.tsx @@ -4,6 +4,8 @@ import {Icon} from '../../../Icon'; import type {IconProps} from '../../../Icon'; import {Option, OptionProps} from '../Option'; import {TextOption} from '../TextOption'; +import {classNames} from '../../../../utilities/css'; +import {ActionContext} from '../../../../utilities/listbox/context'; import styles from './Action.scss'; @@ -12,7 +14,7 @@ interface ActionProps extends OptionProps { } export function Action(props: ActionProps) { - const {selected, disabled, children, icon} = props; + const {selected, disabled, children, icon, divider} = props; const iconMarkup = icon && (
@@ -20,14 +22,18 @@ export function Action(props: ActionProps) {
); + const className = classNames(styles.Action, divider && styles.ActionDivider); + return (