diff --git a/.circleci/config.yml b/.circleci/config.yml index d1aebb610f..a9df1db87e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ executors: parameters: current_golden_images_hash: type: string - default: 3ac2a24425678f3fbe475bee63696d063a4c3331 + default: c9a42ab4bc05206cb7db4a34c45bd7747813c5ae wireit_cache_name: type: string default: wireit diff --git a/packages/picker/src/spectrum-config.js b/packages/picker/src/spectrum-config.js index 19a48ec096..9c4950da4a 100644 --- a/packages/picker/src/spectrum-config.js +++ b/packages/picker/src/spectrum-config.js @@ -103,6 +103,19 @@ const config = { }, ], }, + { + find: { + type: 'pseudo-class', + kind: 'not', + selectors: [[builder.class('spectrum-Picker--quiet')]], + }, + replace: { + type: 'pseudo-class', + kind: 'not', + selectors: [[builder.attribute('quiet')]], + }, + hoist: true, + }, ], }, ], diff --git a/packages/picker/src/spectrum-picker.css b/packages/picker/src/spectrum-picker.css index 67fa143db7..a8f679b286 100644 --- a/packages/picker/src/spectrum-picker.css +++ b/packages/picker/src/spectrum-picker.css @@ -713,7 +713,7 @@ governing permissions and limitations under the License. ); } -:host([open]) #button:not(.spectrum-Picker--quiet) { +:host([open]:not([quiet])) #button { color: var( --highcontrast-picker-content-color-default, var( @@ -737,7 +737,7 @@ governing permissions and limitations under the License. ); } -:host([open]) #button:not(.spectrum-Picker--quiet) .picker { +:host([open]:not([quiet])) #button .picker { color: var( --highcontrast-picker-content-color-default, var( @@ -969,7 +969,7 @@ governing permissions and limitations under the License. ); } - :host([open]) #button:not(.spectrum-Picker--quiet):hover .picker { + :host([open]:not([quiet])) #button:hover .picker { color: var( --highcontrast-picker-content-color-default, var( @@ -1013,7 +1013,7 @@ governing permissions and limitations under the License. ); } - :host([open]) #button:not(.spectrum-Picker--quiet):hover { + :host([open]:not([quiet])) #button:hover { color: var( --highcontrast-picker-content-color-default, var( diff --git a/packages/picker/stories/picker.stories.ts b/packages/picker/stories/picker.stories.ts index f7806f02c4..488f6e5feb 100644 --- a/packages/picker/stories/picker.stories.ts +++ b/packages/picker/stories/picker.stories.ts @@ -26,6 +26,7 @@ import { isOverlayOpen } from '../../overlay/stories/index.js'; import '../../overlay/stories/index.js'; import { handleChange, StoryArgs, Template } from './template.js'; import { argTypes } from './args.js'; +import { ifDefined } from 'lit-html/directives/if-defined.js'; export default { title: 'Picker', @@ -66,7 +67,9 @@ export default { export const Default = (args: StoryArgs): TemplateResult => { return html` - Where do you live? + + Where do you live? + { const { open, ...rest } = args; return html` - Where do you live? + + Where do you live? + { return html` - + Where do you live? { export const quiet = (args: StoryArgs): TemplateResult => { return html` - Where do you live? + + Where do you live? + { return html` - + Where do you live? { return html` - + Choose an action type... { export const iconsNone = (args: StoryArgs): TemplateResult => { return html` - + Choose an action type... { return html` - + Choose an action type... { export const iconsOnly = (args: StoryArgs): TemplateResult => { return html` - + Choose an action type... { }
- + Where do you live? {
- + Where do you live? { .

- + Where do you live? {
- + Where do you live? { return html` - Where do you live? + + Where do you live? + { export const custom = (args: StoryArgs): TemplateResult => { const initialState = 'lb1-mo'; return html` - + What state do you live in? void; [prop: string]: unknown; + size?: ElementSize; } export const handleChange = @@ -37,7 +43,9 @@ export const handleChange = }; export const Template = (args: StoryArgs): TemplateResult => html` - Where do you live? + + Where do you live? +