@wordpress/components 32.5.2-next.v.202604091042.0 → 33.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -1
- package/build/alignment-matrix-control/cell.cjs +3 -3
- package/build/alignment-matrix-control/cell.cjs.map +2 -2
- package/build/alignment-matrix-control/index.cjs +3 -3
- package/build/alignment-matrix-control/index.cjs.map +2 -2
- package/build/autocomplete/get-autocomplete-match.cjs +11 -2
- package/build/autocomplete/get-autocomplete-match.cjs.map +2 -2
- package/build/autocomplete/index.cjs +42 -11
- package/build/autocomplete/index.cjs.map +2 -2
- package/build/custom-gradient-picker/index.cjs.map +2 -2
- package/build/date-time/{date → date-picker}/index.cjs +6 -6
- package/build/date-time/{date → date-picker}/index.cjs.map +2 -2
- package/build/date-time/{date → date-picker}/styles.cjs +17 -17
- package/build/date-time/{date → date-picker}/styles.cjs.map +2 -2
- package/build/date-time/{date → date-picker}/use-lilius/index.cjs +1 -1
- package/build/date-time/{date → date-picker}/use-lilius/index.cjs.map +1 -1
- package/build/date-time/date-time/index.cjs +6 -6
- package/build/date-time/date-time/index.cjs.map +2 -2
- package/build/date-time/index.cjs +4 -4
- package/build/date-time/index.cjs.map +2 -2
- package/build/date-time/{time → time-picker}/index.cjs +6 -6
- package/build/date-time/time-picker/index.cjs.map +7 -0
- package/build/date-time/{time → time-picker}/styles.cjs +21 -21
- package/build/date-time/{time → time-picker}/styles.cjs.map +2 -2
- package/build/date-time/{time → time-picker}/time-input/index.cjs +1 -1
- package/build/date-time/{time → time-picker}/time-input/index.cjs.map +1 -1
- package/build/date-time/{time → time-picker}/timezone.cjs +1 -1
- package/build/date-time/{time → time-picker}/timezone.cjs.map +1 -1
- package/build/external-link/index.cjs +1 -1
- package/build/external-link/index.cjs.map +2 -2
- package/build/form-token-field/index.cjs +22 -6
- package/build/form-token-field/index.cjs.map +3 -3
- package/build/form-token-field/token-input.cjs +1 -1
- package/build/form-token-field/token-input.cjs.map +2 -2
- package/build/menu/popover.cjs +7 -3
- package/build/menu/popover.cjs.map +2 -2
- package/build/menu/styles.cjs +39 -16
- package/build/menu/styles.cjs.map +2 -2
- package/build/modal/index.cjs.map +2 -2
- package/build/navigable-container/container.cjs +72 -110
- package/build/navigable-container/container.cjs.map +2 -2
- package/build/palette-edit/index.cjs.map +2 -2
- package/build/radio-control/index.cjs +2 -0
- package/build/radio-control/index.cjs.map +2 -2
- package/build/sandbox/index.cjs +125 -1
- package/build/sandbox/index.cjs.map +2 -2
- package/build/textarea-control/styles/textarea-control-styles.cjs +3 -3
- package/build/textarea-control/styles/textarea-control-styles.cjs.map +2 -2
- package/build/utils/breakpoint.cjs.map +1 -1
- package/build/utils/font.cjs.map +1 -1
- package/build/visually-hidden/component.cjs +1 -0
- package/build/visually-hidden/component.cjs.map +2 -2
- package/build-module/alignment-matrix-control/cell.mjs +3 -3
- package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
- package/build-module/alignment-matrix-control/index.mjs +3 -3
- package/build-module/alignment-matrix-control/index.mjs.map +2 -2
- package/build-module/autocomplete/get-autocomplete-match.mjs +11 -2
- package/build-module/autocomplete/get-autocomplete-match.mjs.map +2 -2
- package/build-module/autocomplete/index.mjs +42 -11
- package/build-module/autocomplete/index.mjs.map +2 -2
- package/build-module/custom-gradient-picker/index.mjs.map +2 -2
- package/build-module/date-time/{date → date-picker}/index.mjs +3 -3
- package/build-module/date-time/{date → date-picker}/index.mjs.map +2 -2
- package/build-module/date-time/{date → date-picker}/styles.mjs +17 -17
- package/build-module/date-time/{date → date-picker}/styles.mjs.map +2 -2
- package/build-module/date-time/{date → date-picker}/use-lilius/index.mjs +1 -1
- package/build-module/date-time/{date → date-picker}/use-lilius/index.mjs.map +1 -1
- package/build-module/date-time/date-time/index.mjs +2 -2
- package/build-module/date-time/date-time/index.mjs.map +1 -1
- package/build-module/date-time/index.mjs +2 -2
- package/build-module/date-time/index.mjs.map +1 -1
- package/build-module/date-time/{time → time-picker}/index.mjs +3 -3
- package/build-module/date-time/time-picker/index.mjs.map +7 -0
- package/build-module/date-time/{time → time-picker}/styles.mjs +21 -21
- package/build-module/date-time/{time → time-picker}/styles.mjs.map +2 -2
- package/build-module/date-time/{time → time-picker}/time-input/index.mjs +1 -1
- package/build-module/date-time/{time → time-picker}/time-input/index.mjs.map +1 -1
- package/build-module/date-time/{time → time-picker}/timezone.mjs +1 -1
- package/build-module/date-time/{time → time-picker}/timezone.mjs.map +1 -1
- package/build-module/external-link/index.mjs +1 -1
- package/build-module/external-link/index.mjs.map +2 -2
- package/build-module/form-token-field/index.mjs +22 -6
- package/build-module/form-token-field/index.mjs.map +2 -2
- package/build-module/form-token-field/token-input.mjs +1 -1
- package/build-module/form-token-field/token-input.mjs.map +2 -2
- package/build-module/menu/popover.mjs +7 -3
- package/build-module/menu/popover.mjs.map +2 -2
- package/build-module/menu/styles.mjs +37 -16
- package/build-module/menu/styles.mjs.map +2 -2
- package/build-module/modal/index.mjs.map +2 -2
- package/build-module/navigable-container/container.mjs +73 -111
- package/build-module/navigable-container/container.mjs.map +2 -2
- package/build-module/palette-edit/index.mjs.map +2 -2
- package/build-module/radio-control/index.mjs +2 -0
- package/build-module/radio-control/index.mjs.map +2 -2
- package/build-module/sandbox/index.mjs +126 -2
- package/build-module/sandbox/index.mjs.map +2 -2
- package/build-module/textarea-control/styles/textarea-control-styles.mjs +3 -3
- package/build-module/textarea-control/styles/textarea-control-styles.mjs.map +2 -2
- package/build-module/utils/breakpoint.mjs.map +1 -1
- package/build-module/utils/font.mjs.map +1 -1
- package/build-module/visually-hidden/component.mjs +1 -0
- package/build-module/visually-hidden/component.mjs.map +2 -2
- package/build-style/style-rtl.css +109 -25
- package/build-style/style.css +109 -25
- package/build-types/autocomplete/get-autocomplete-match.d.ts +10 -1
- package/build-types/autocomplete/get-autocomplete-match.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +0 -6
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/types.d.ts +4 -0
- package/build-types/checkbox-control/types.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date-picker/index.d.ts.map +1 -0
- package/build-types/date-time/date-picker/styles.d.ts.map +1 -0
- package/build-types/date-time/date-picker/test/index.d.ts.map +1 -0
- package/build-types/date-time/date-picker/test/use-lilius.d.ts.map +1 -0
- package/build-types/date-time/date-picker/use-lilius/index.d.ts.map +1 -0
- package/build-types/date-time/date-time/index.d.ts +2 -2
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/index.d.ts +2 -2
- package/build-types/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/date-time/{time → time-picker}/index.d.ts +1 -1
- package/build-types/date-time/time-picker/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/styles.d.ts.map +1 -0
- package/build-types/date-time/time-picker/test/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/time-input/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/time-input/test/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/timezone.d.ts.map +1 -0
- package/build-types/date-time/types.d.ts +1 -1
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +16 -2
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/popover.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts +16 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/container.d.ts +3 -8
- package/build-types/navigable-container/container.d.ts.map +1 -1
- package/build-types/navigable-container/types.d.ts +1 -5
- package/build-types/navigable-container/types.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/types.d.ts +6 -0
- package/build-types/radio-control/types.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts +1 -1
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/types.d.ts +11 -0
- package/build-types/sandbox/types.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/breakpoint.d.ts +2 -1
- package/build-types/utils/breakpoint.d.ts.map +1 -1
- package/build-types/utils/font.d.ts +3 -2
- package/build-types/utils/font.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts +2 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/radio-control.d.ts +2 -1
- package/build-types/validated-form-controls/components/radio-control.d.ts.map +1 -1
- package/build-types/visually-hidden/component.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +0 -6
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/package.json +21 -21
- package/src/alignment-matrix-control/style.module.scss +1 -1
- package/src/autocomplete/get-autocomplete-match.ts +25 -4
- package/src/autocomplete/index.tsx +69 -21
- package/src/autocomplete/test/get-autocomplete-match.ts +97 -75
- package/src/base-control/stories/index.story.tsx +1 -0
- package/src/button/stories/index.story.tsx +1 -0
- package/src/button/style.scss +1 -1
- package/src/button-group/style.scss +1 -2
- package/src/calendar/style.scss +3 -3
- package/src/card/stories/index.story.tsx +2 -9
- package/src/checkbox-control/stories/index.story.tsx +1 -0
- package/src/checkbox-control/style.scss +17 -5
- package/src/checkbox-control/types.ts +4 -0
- package/src/circular-option-picker/style.scss +9 -7
- package/src/color-indicator/stories/index.story.tsx +1 -0
- package/src/color-palette/stories/index.story.tsx +1 -0
- package/src/color-palette/style.scss +1 -1
- package/src/color-picker/stories/index.story.tsx +1 -0
- package/src/combobox-control/stories/index.story.tsx +1 -0
- package/src/composite/stories/index.story.tsx +1 -0
- package/src/confirm-dialog/stories/index.story.tsx +1 -1
- package/src/css.d.ts +1 -0
- package/src/custom-gradient-picker/index.tsx +1 -0
- package/src/custom-select-control/stories/index.story.tsx +1 -0
- package/src/date-time/README.md +3 -3
- package/src/date-time/date-picker/README.md +65 -0
- package/src/date-time/date-time/index.tsx +2 -2
- package/src/date-time/index.ts +2 -2
- package/src/date-time/stories/date.story.tsx +1 -1
- package/src/date-time/stories/time.story.tsx +1 -1
- package/src/date-time/time-picker/README.md +119 -0
- package/src/date-time/{time → time-picker}/index.tsx +1 -1
- package/src/date-time/types.ts +1 -1
- package/src/disabled/stories/index.story.tsx +1 -0
- package/src/drop-zone/stories/index.story.tsx +1 -0
- package/src/dropdown/stories/index.story.tsx +1 -0
- package/src/dropdown-menu/style.scss +1 -1
- package/src/external-link/index.tsx +1 -6
- package/src/external-link/stories/index.story.tsx +2 -1
- package/src/external-link/style.scss +30 -2
- package/src/form-file-upload/stories/index.story.tsx +1 -0
- package/src/form-toggle/stories/index.story.tsx +1 -0
- package/src/form-toggle/style.scss +38 -4
- package/src/form-token-field/README.md +2 -1
- package/src/form-token-field/index.tsx +39 -9
- package/src/form-token-field/stories/index.story.tsx +2 -0
- package/src/form-token-field/style.scss +12 -3
- package/src/form-token-field/test/index.tsx +70 -10
- package/src/form-token-field/token-input.tsx +1 -6
- package/src/form-token-field/types.ts +16 -2
- package/src/gradient-picker/stories/index.story.tsx +1 -0
- package/src/icon/stories/index.story.tsx +1 -0
- package/src/input-control/stories/index.story.tsx +1 -1
- package/src/item-group/stories/index.story.tsx +1 -1
- package/src/keyboard-shortcuts/stories/index.story.tsx +1 -0
- package/src/menu/popover.tsx +15 -8
- package/src/menu/styles.ts +26 -16
- package/src/menu/test/index.tsx +24 -34
- package/src/menu-group/stories/index.story.tsx +1 -0
- package/src/menu-item/stories/index.story.tsx +1 -0
- package/src/menu-items-choice/stories/index.story.tsx +1 -0
- package/src/mobile/link-settings/index.native.js +1 -1
- package/src/modal/index.tsx +1 -0
- package/src/modal/stories/index.story.tsx +1 -0
- package/src/navigable-container/container.tsx +120 -141
- package/src/navigable-container/test/navigable-menu.tsx +24 -0
- package/src/navigable-container/types.ts +1 -5
- package/src/navigation/stories/utils/more-examples.tsx +2 -1
- package/src/navigator/stories/index.story.tsx +1 -0
- package/src/notice/stories/index.story.tsx +1 -0
- package/src/notice/test/__snapshots__/index.tsx.snap +1 -0
- package/src/number-control/stories/index.story.tsx +1 -1
- package/src/palette-edit/index.tsx +1 -0
- package/src/panel/stories/index.story.tsx +1 -0
- package/src/popover/stories/index.story.tsx +1 -0
- package/src/progress-bar/stories/index.story.tsx +1 -0
- package/src/radio-control/index.tsx +2 -0
- package/src/radio-control/stories/index.story.tsx +1 -0
- package/src/radio-control/style.scss +21 -2
- package/src/radio-control/test/index.tsx +10 -0
- package/src/radio-control/types.ts +6 -0
- package/src/range-control/stories/index.story.tsx +1 -0
- package/src/resizable-box/stories/index.story.tsx +1 -0
- package/src/resizable-box/style.scss +4 -5
- package/src/sandbox/index.tsx +189 -9
- package/src/sandbox/stories/index.story.tsx +1 -0
- package/src/sandbox/test/index.tsx +65 -24
- package/src/sandbox/types.ts +11 -0
- package/src/scroll-lock/stories/index.story.tsx +1 -0
- package/src/search-control/stories/index.story.tsx +1 -0
- package/src/select-control/stories/index.story.tsx +1 -0
- package/src/shortcut/stories/index.story.tsx +1 -0
- package/src/slot-fill/stories/index.story.tsx +1 -0
- package/src/snackbar/stories/index.story.tsx +1 -0
- package/src/snackbar/style.scss +2 -2
- package/src/spinner/stories/index.story.tsx +1 -0
- package/src/tab-panel/style.scss +1 -1
- package/src/text-control/stories/index.story.tsx +1 -0
- package/src/text-highlight/stories/index.story.tsx +1 -0
- package/src/textarea-control/stories/index.story.tsx +4 -0
- package/src/textarea-control/styles/textarea-control-styles.ts +6 -0
- package/src/toggle-control/stories/index.story.tsx +1 -0
- package/src/toggle-control/style.scss +1 -1
- package/src/toggle-control/test/index.tsx +8 -2
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar-group/index.tsx +2 -2
- package/src/tooltip/stories/index.story.tsx +1 -0
- package/src/tooltip/test/index.tsx +3 -2
- package/src/tree-grid/stories/index.story.tsx +1 -1
- package/src/tree-select/stories/index.story.tsx +1 -0
- package/src/truncate/stories/index.story.tsx +1 -1
- package/src/unit-control/stories/index.story.tsx +1 -1
- package/src/utils/breakpoint.js +1 -1
- package/src/utils/font.js +1 -1
- package/src/visually-hidden/component.tsx +1 -0
- package/src/visually-hidden/stories/index.story.tsx +2 -8
- package/build/card/context.cjs +0 -36
- package/build/card/context.cjs.map +0 -7
- package/build/date-time/time/index.cjs.map +0 -7
- package/build-module/card/context.mjs +0 -10
- package/build-module/card/context.mjs.map +0 -7
- package/build-module/date-time/time/index.mjs.map +0 -7
- package/build-types/card/context.d.ts +0 -3
- package/build-types/card/context.d.ts.map +0 -1
- package/build-types/date-time/date/index.d.ts.map +0 -1
- package/build-types/date-time/date/styles.d.ts.map +0 -1
- package/build-types/date-time/date/test/index.d.ts.map +0 -1
- package/build-types/date-time/date/test/use-lilius.d.ts.map +0 -1
- package/build-types/date-time/date/use-lilius/index.d.ts.map +0 -1
- package/build-types/date-time/time/index.d.ts.map +0 -1
- package/build-types/date-time/time/styles.d.ts.map +0 -1
- package/build-types/date-time/time/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/time-input/index.d.ts.map +0 -1
- package/build-types/date-time/time/time-input/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/timezone.d.ts.map +0 -1
- package/build-types/visually-hidden/test/index.d.ts +0 -2
- package/build-types/visually-hidden/test/index.d.ts.map +0 -1
- package/src/card/context.ts +0 -9
- package/src/visually-hidden/test/__snapshots__/index.tsx.snap +0 -12
- package/src/visually-hidden/test/index.tsx +0 -17
- /package/build-types/date-time/{date → date-picker}/index.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/styles.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/test/index.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/test/use-lilius.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/use-lilius/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/styles.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/test/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/time-input/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/time-input/test/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/timezone.d.ts +0 -0
- /package/src/date-time/{date → date-picker}/index.tsx +0 -0
- /package/src/date-time/{date → date-picker}/styles.ts +0 -0
- /package/src/date-time/{date → date-picker}/test/index.tsx +0 -0
- /package/src/date-time/{date → date-picker}/test/use-lilius.ts +0 -0
- /package/src/date-time/{date → date-picker}/use-lilius/index.ts +0 -0
- /package/src/date-time/{time → time-picker}/styles.ts +0 -0
- /package/src/date-time/{time → time-picker}/test/index.tsx +0 -0
- /package/src/date-time/{time → time-picker}/time-input/index.tsx +0 -0
- /package/src/date-time/{time → time-picker}/time-input/test/index.tsx +0 -0
- /package/src/date-time/{time → time-picker}/timezone.tsx +0 -0
|
@@ -14,17 +14,23 @@ const createCompleter = (
|
|
|
14
14
|
...overrides,
|
|
15
15
|
} );
|
|
16
16
|
|
|
17
|
+
const defaultOptions = {
|
|
18
|
+
matchCount: 1,
|
|
19
|
+
isBackspacing: false,
|
|
20
|
+
getTextAfterSelection: () => '',
|
|
21
|
+
};
|
|
22
|
+
|
|
17
23
|
describe( 'getAutocompleteMatch', () => {
|
|
18
24
|
it( 'should return null for empty text content', () => {
|
|
19
25
|
const completers = [ createCompleter() ];
|
|
20
26
|
expect(
|
|
21
|
-
getAutocompleteMatch( '', completers,
|
|
27
|
+
getAutocompleteMatch( '', completers, defaultOptions )
|
|
22
28
|
).toBeNull();
|
|
23
29
|
} );
|
|
24
30
|
|
|
25
31
|
it( 'should return null when no completers are provided', () => {
|
|
26
32
|
expect(
|
|
27
|
-
getAutocompleteMatch( 'some text /', [],
|
|
33
|
+
getAutocompleteMatch( 'some text /', [], defaultOptions )
|
|
28
34
|
).toBeNull();
|
|
29
35
|
} );
|
|
30
36
|
|
|
@@ -34,9 +40,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
34
40
|
getAutocompleteMatch(
|
|
35
41
|
'no trigger here',
|
|
36
42
|
completers,
|
|
37
|
-
|
|
38
|
-
false,
|
|
39
|
-
() => ''
|
|
43
|
+
defaultOptions
|
|
40
44
|
)
|
|
41
45
|
).toBeNull();
|
|
42
46
|
} );
|
|
@@ -46,9 +50,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
46
50
|
const result = getAutocompleteMatch(
|
|
47
51
|
'some text /query',
|
|
48
52
|
completers,
|
|
49
|
-
|
|
50
|
-
false,
|
|
51
|
-
() => ''
|
|
53
|
+
defaultOptions
|
|
52
54
|
);
|
|
53
55
|
expect( result ).toEqual( {
|
|
54
56
|
completer: completers[ 0 ],
|
|
@@ -61,9 +63,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
61
63
|
const result = getAutocompleteMatch(
|
|
62
64
|
'hello @',
|
|
63
65
|
completers,
|
|
64
|
-
|
|
65
|
-
false,
|
|
66
|
-
() => ''
|
|
66
|
+
defaultOptions
|
|
67
67
|
);
|
|
68
68
|
expect( result ).toEqual( {
|
|
69
69
|
completer: completers[ 0 ],
|
|
@@ -83,9 +83,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
83
83
|
const result = getAutocompleteMatch(
|
|
84
84
|
'/command some text @user',
|
|
85
85
|
[ slashCompleter, atCompleter ],
|
|
86
|
-
|
|
87
|
-
false,
|
|
88
|
-
() => ''
|
|
86
|
+
defaultOptions
|
|
89
87
|
);
|
|
90
88
|
expect( result?.completer.name ).toBe( 'at' );
|
|
91
89
|
} );
|
|
@@ -94,47 +92,35 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
94
92
|
const completers = [ createCompleter( { triggerPrefix: '/' } ) ];
|
|
95
93
|
const longText = '/' + 'a'.repeat( 51 );
|
|
96
94
|
expect(
|
|
97
|
-
getAutocompleteMatch( longText, completers,
|
|
95
|
+
getAutocompleteMatch( longText, completers, defaultOptions )
|
|
98
96
|
).toBeNull();
|
|
99
97
|
} );
|
|
100
98
|
|
|
101
99
|
it( 'should match when text after trigger is exactly 50 chars', () => {
|
|
102
100
|
const completers = [ createCompleter( { triggerPrefix: '/' } ) ];
|
|
103
101
|
const text = '/' + 'a'.repeat( 50 );
|
|
104
|
-
const result = getAutocompleteMatch(
|
|
105
|
-
text,
|
|
106
|
-
completers,
|
|
107
|
-
1,
|
|
108
|
-
false,
|
|
109
|
-
() => ''
|
|
110
|
-
);
|
|
102
|
+
const result = getAutocompleteMatch( text, completers, defaultOptions );
|
|
111
103
|
expect( result ).not.toBeNull();
|
|
112
104
|
expect( result?.filterValue ).toBe( 'a'.repeat( 50 ) );
|
|
113
105
|
} );
|
|
114
106
|
|
|
115
107
|
it( 'should return null on mismatch with multiple words and no backspacing', () => {
|
|
116
108
|
const completers = [ createCompleter( { triggerPrefix: '@' } ) ];
|
|
117
|
-
// 4 words from trigger, mismatch (
|
|
109
|
+
// 4 words from trigger, mismatch (matchCount=0), not backspacing
|
|
118
110
|
expect(
|
|
119
|
-
getAutocompleteMatch(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
false,
|
|
124
|
-
() => ''
|
|
125
|
-
)
|
|
111
|
+
getAutocompleteMatch( 'text @one two three four', completers, {
|
|
112
|
+
...defaultOptions,
|
|
113
|
+
matchCount: 0,
|
|
114
|
+
} )
|
|
126
115
|
).toBeNull();
|
|
127
116
|
} );
|
|
128
117
|
|
|
129
118
|
it( 'should still match on mismatch when there is only one trigger word', () => {
|
|
130
119
|
const completers = [ createCompleter( { triggerPrefix: '@' } ) ];
|
|
131
|
-
const result = getAutocompleteMatch(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
false,
|
|
136
|
-
() => ''
|
|
137
|
-
);
|
|
120
|
+
const result = getAutocompleteMatch( 'text @xyz', completers, {
|
|
121
|
+
...defaultOptions,
|
|
122
|
+
matchCount: 0,
|
|
123
|
+
} );
|
|
138
124
|
expect( result ).not.toBeNull();
|
|
139
125
|
expect( result?.filterValue ).toBe( 'xyz' );
|
|
140
126
|
} );
|
|
@@ -144,9 +130,11 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
144
130
|
const result = getAutocompleteMatch(
|
|
145
131
|
'text @one two three',
|
|
146
132
|
completers,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
133
|
+
{
|
|
134
|
+
...defaultOptions,
|
|
135
|
+
matchCount: 0,
|
|
136
|
+
isBackspacing: true,
|
|
137
|
+
}
|
|
150
138
|
);
|
|
151
139
|
expect( result ).not.toBeNull();
|
|
152
140
|
} );
|
|
@@ -154,27 +142,25 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
154
142
|
it( 'should NOT match while backspacing if more than 3 words from trigger', () => {
|
|
155
143
|
const completers = [ createCompleter( { triggerPrefix: '@' } ) ];
|
|
156
144
|
expect(
|
|
157
|
-
getAutocompleteMatch(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
() => ''
|
|
163
|
-
)
|
|
145
|
+
getAutocompleteMatch( 'text @one two three four', completers, {
|
|
146
|
+
...defaultOptions,
|
|
147
|
+
matchCount: 0,
|
|
148
|
+
isBackspacing: true,
|
|
149
|
+
} )
|
|
164
150
|
).toBeNull();
|
|
165
151
|
} );
|
|
166
152
|
|
|
167
153
|
it( 'should return null when text after trigger starts with whitespace', () => {
|
|
168
154
|
const completers = [ createCompleter( { triggerPrefix: '/' } ) ];
|
|
169
155
|
expect(
|
|
170
|
-
getAutocompleteMatch( '/ query', completers,
|
|
156
|
+
getAutocompleteMatch( '/ query', completers, defaultOptions )
|
|
171
157
|
).toBeNull();
|
|
172
158
|
} );
|
|
173
159
|
|
|
174
160
|
it( 'should return null when text after trigger ends with multiple spaces', () => {
|
|
175
161
|
const completers = [ createCompleter( { triggerPrefix: '/' } ) ];
|
|
176
162
|
expect(
|
|
177
|
-
getAutocompleteMatch( '/query ', completers,
|
|
163
|
+
getAutocompleteMatch( '/query ', completers, defaultOptions )
|
|
178
164
|
).toBeNull();
|
|
179
165
|
} );
|
|
180
166
|
|
|
@@ -186,7 +172,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
186
172
|
} ),
|
|
187
173
|
];
|
|
188
174
|
expect(
|
|
189
|
-
getAutocompleteMatch( 'text @user', completers,
|
|
175
|
+
getAutocompleteMatch( 'text @user', completers, defaultOptions )
|
|
190
176
|
).toBeNull();
|
|
191
177
|
} );
|
|
192
178
|
|
|
@@ -198,13 +184,10 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
198
184
|
allowContext,
|
|
199
185
|
} ),
|
|
200
186
|
];
|
|
201
|
-
getAutocompleteMatch(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
false,
|
|
206
|
-
() => 'after'
|
|
207
|
-
);
|
|
187
|
+
getAutocompleteMatch( 'before @user', completers, {
|
|
188
|
+
...defaultOptions,
|
|
189
|
+
getTextAfterSelection: () => 'after',
|
|
190
|
+
} );
|
|
208
191
|
expect( allowContext ).toHaveBeenCalledWith( 'before ', 'after' );
|
|
209
192
|
} );
|
|
210
193
|
|
|
@@ -213,9 +196,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
213
196
|
const result = getAutocompleteMatch(
|
|
214
197
|
'text @café',
|
|
215
198
|
completers,
|
|
216
|
-
|
|
217
|
-
false,
|
|
218
|
-
() => ''
|
|
199
|
+
defaultOptions
|
|
219
200
|
);
|
|
220
201
|
expect( result ).not.toBeNull();
|
|
221
202
|
expect( result?.filterValue ).toBe( 'cafe' );
|
|
@@ -233,9 +214,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
233
214
|
const result = getAutocompleteMatch(
|
|
234
215
|
'@@user',
|
|
235
216
|
[ singleAt, doubleAt ],
|
|
236
|
-
|
|
237
|
-
false,
|
|
238
|
-
() => ''
|
|
217
|
+
defaultOptions
|
|
239
218
|
);
|
|
240
219
|
expect( result?.completer.name ).toBe( 'double' );
|
|
241
220
|
expect( result?.filterValue ).toBe( 'user' );
|
|
@@ -253,9 +232,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
253
232
|
const result = getAutocompleteMatch(
|
|
254
233
|
'hello @user',
|
|
255
234
|
[ singleAt, doubleAt ],
|
|
256
|
-
|
|
257
|
-
false,
|
|
258
|
-
() => ''
|
|
235
|
+
defaultOptions
|
|
259
236
|
);
|
|
260
237
|
expect( result?.completer.name ).toBe( 'single' );
|
|
261
238
|
expect( result?.filterValue ).toBe( 'user' );
|
|
@@ -266,9 +243,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
266
243
|
const result = getAutocompleteMatch(
|
|
267
244
|
'text $$query',
|
|
268
245
|
completers,
|
|
269
|
-
|
|
270
|
-
false,
|
|
271
|
-
() => ''
|
|
246
|
+
defaultOptions
|
|
272
247
|
);
|
|
273
248
|
expect( result ).not.toBeNull();
|
|
274
249
|
expect( result?.filterValue ).toBe( 'query' );
|
|
@@ -279,14 +254,63 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
279
254
|
const result = getAutocompleteMatch(
|
|
280
255
|
'/hello world',
|
|
281
256
|
completers,
|
|
282
|
-
|
|
283
|
-
false,
|
|
284
|
-
() => ''
|
|
257
|
+
defaultOptions
|
|
285
258
|
);
|
|
286
259
|
expect( result ).not.toBeNull();
|
|
287
260
|
expect( result?.filterValue ).toBe( 'hello world' );
|
|
288
261
|
} );
|
|
289
262
|
|
|
263
|
+
describe( 'lastCompletion suppression', () => {
|
|
264
|
+
it( 'should suppress match when text equals last completion value', () => {
|
|
265
|
+
const completers = [ createCompleter( { triggerPrefix: '@' } ) ];
|
|
266
|
+
expect(
|
|
267
|
+
getAutocompleteMatch( '@user', completers, {
|
|
268
|
+
...defaultOptions,
|
|
269
|
+
lastCompletion: {
|
|
270
|
+
name: completers[ 0 ].name,
|
|
271
|
+
value: 'user',
|
|
272
|
+
},
|
|
273
|
+
} )
|
|
274
|
+
).toBeNull();
|
|
275
|
+
} );
|
|
276
|
+
|
|
277
|
+
it( 'should suppress match ignoring trailing whitespace', () => {
|
|
278
|
+
const completers = [ createCompleter( { triggerPrefix: '@' } ) ];
|
|
279
|
+
expect(
|
|
280
|
+
getAutocompleteMatch( '@user ', completers, {
|
|
281
|
+
...defaultOptions,
|
|
282
|
+
lastCompletion: {
|
|
283
|
+
name: completers[ 0 ].name,
|
|
284
|
+
value: 'user',
|
|
285
|
+
},
|
|
286
|
+
} )
|
|
287
|
+
).toBeNull();
|
|
288
|
+
} );
|
|
289
|
+
|
|
290
|
+
it( 'should NOT suppress match when completer name differs', () => {
|
|
291
|
+
const completers = [ createCompleter( { triggerPrefix: '@' } ) ];
|
|
292
|
+
const result = getAutocompleteMatch( '@user', completers, {
|
|
293
|
+
...defaultOptions,
|
|
294
|
+
lastCompletion: { name: 'other', value: 'user' },
|
|
295
|
+
} );
|
|
296
|
+
expect( result ).not.toBeNull();
|
|
297
|
+
expect( result?.filterValue ).toBe( 'user' );
|
|
298
|
+
} );
|
|
299
|
+
|
|
300
|
+
it( 'should NOT suppress match when text diverges from last completion', () => {
|
|
301
|
+
const completers = [ createCompleter( { triggerPrefix: '@' } ) ];
|
|
302
|
+
const result = getAutocompleteMatch( '@user2', completers, {
|
|
303
|
+
...defaultOptions,
|
|
304
|
+
lastCompletion: {
|
|
305
|
+
name: completers[ 0 ].name,
|
|
306
|
+
value: 'user',
|
|
307
|
+
},
|
|
308
|
+
} );
|
|
309
|
+
expect( result ).not.toBeNull();
|
|
310
|
+
expect( result?.filterValue ).toBe( 'user2' );
|
|
311
|
+
} );
|
|
312
|
+
} );
|
|
313
|
+
|
|
290
314
|
it.each( [
|
|
291
315
|
{
|
|
292
316
|
text: 'café @user',
|
|
@@ -327,9 +351,7 @@ describe( 'getAutocompleteMatch', () => {
|
|
|
327
351
|
const result = getAutocompleteMatch(
|
|
328
352
|
text,
|
|
329
353
|
completers,
|
|
330
|
-
|
|
331
|
-
false,
|
|
332
|
-
() => ''
|
|
354
|
+
defaultOptions
|
|
333
355
|
);
|
|
334
356
|
expect( result ).not.toBeNull();
|
|
335
357
|
expect( result?.filterValue ).toBe( expected );
|
|
@@ -10,6 +10,7 @@ import BaseControl, { useBaseControlProps } from '..';
|
|
|
10
10
|
import Button from '../../button';
|
|
11
11
|
|
|
12
12
|
const meta: Meta< typeof BaseControl > = {
|
|
13
|
+
tags: [ 'manifest' ],
|
|
13
14
|
title: 'Components/Selection & Input/Common/BaseControl',
|
|
14
15
|
id: 'components-basecontrol',
|
|
15
16
|
component: BaseControl,
|
package/src/button/style.scss
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use "@wordpress/base-styles/colors" as *;
|
|
2
2
|
@use "@wordpress/base-styles/variables" as *;
|
|
3
|
-
@use "@wordpress/base-styles/z-index" as *;
|
|
4
3
|
|
|
5
4
|
.components-button-group {
|
|
6
5
|
display: inline-block;
|
|
@@ -28,7 +27,7 @@
|
|
|
28
27
|
&:focus,
|
|
29
28
|
&.is-primary {
|
|
30
29
|
position: relative;
|
|
31
|
-
z-index:
|
|
30
|
+
z-index: 1;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
// The active button should look pressed.
|
package/src/calendar/style.scss
CHANGED
|
@@ -53,7 +53,7 @@ $wp-components-calendar-preview-border-color: color-mix(in srgb, $components-col
|
|
|
53
53
|
background: none;
|
|
54
54
|
padding: 0;
|
|
55
55
|
margin: 0;
|
|
56
|
-
cursor:
|
|
56
|
+
cursor: var(--wpds-cursor-control);
|
|
57
57
|
justify-content: center;
|
|
58
58
|
align-items: center;
|
|
59
59
|
display: flex;
|
|
@@ -127,7 +127,7 @@ $wp-components-calendar-preview-border-color: color-mix(in srgb, $components-col
|
|
|
127
127
|
background: none;
|
|
128
128
|
padding: 0;
|
|
129
129
|
margin: 0;
|
|
130
|
-
cursor:
|
|
130
|
+
cursor: var(--wpds-cursor-control);
|
|
131
131
|
appearance: none;
|
|
132
132
|
display: inline-flex;
|
|
133
133
|
align-items: center;
|
|
@@ -244,7 +244,7 @@ $wp-components-calendar-preview-border-color: color-mix(in srgb, $components-col
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
&:disabled::before {
|
|
247
|
-
background-color: $components-color-
|
|
247
|
+
background-color: $components-color-gray-400;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
&:hover:not(:disabled)::before {
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
2
|
import {
|
|
10
3
|
Card,
|
|
11
4
|
CardHeader,
|
|
@@ -37,9 +30,9 @@ const meta: Meta< typeof Card > = {
|
|
|
37
30
|
},
|
|
38
31
|
docs: { canvas: { sourceState: 'shown' } },
|
|
39
32
|
componentStatus: {
|
|
40
|
-
status: '
|
|
33
|
+
status: 'not-recommended',
|
|
41
34
|
whereUsed: 'global',
|
|
42
|
-
notes: '
|
|
35
|
+
notes: 'Use `Card` or `CollapsibleCard` from `@wordpress/ui` instead.',
|
|
43
36
|
},
|
|
44
37
|
},
|
|
45
38
|
};
|
|
@@ -16,6 +16,7 @@ import { VStack } from '../../v-stack';
|
|
|
16
16
|
import { HStack } from '../../h-stack';
|
|
17
17
|
|
|
18
18
|
const meta: Meta< typeof CheckboxControl > = {
|
|
19
|
+
tags: [ 'manifest' ],
|
|
19
20
|
component: CheckboxControl,
|
|
20
21
|
title: 'Components/Selection & Input/Common/CheckboxControl',
|
|
21
22
|
id: 'components-checkboxcontrol',
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
.components-checkbox-control__label {
|
|
18
18
|
// Ensure label is aligned with checkbox along X axis
|
|
19
19
|
line-height: var(--checkbox-input-size);
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
.components-checkbox-control:not(:has(:disabled)) & {
|
|
22
|
+
cursor: var(--wpds-cursor-control);
|
|
23
|
+
}
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
.components-checkbox-control__input[type="checkbox"] {
|
|
@@ -25,7 +28,6 @@
|
|
|
25
28
|
background: $white;
|
|
26
29
|
color: $gray-900;
|
|
27
30
|
clear: none;
|
|
28
|
-
cursor: pointer;
|
|
29
31
|
display: inline-block;
|
|
30
32
|
line-height: 0;
|
|
31
33
|
margin: 0 $grid-unit-05 0 0;
|
|
@@ -46,12 +48,15 @@
|
|
|
46
48
|
@include button-style-outset__focus(var(--wp-admin-theme-color));
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
&:checked,
|
|
50
|
-
&:indeterminate {
|
|
51
|
+
&:not(:disabled):is(:checked, :indeterminate) {
|
|
51
52
|
background: $components-color-accent;
|
|
52
53
|
border-color: $components-color-accent;
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
&:not(:disabled) {
|
|
57
|
+
cursor: var(--wpds-cursor-control);
|
|
58
|
+
}
|
|
59
|
+
|
|
55
60
|
&:checked::before {
|
|
56
61
|
content: none;
|
|
57
62
|
}
|
|
@@ -73,7 +78,7 @@ svg.components-checkbox-control__indeterminate {
|
|
|
73
78
|
--checkmark-size: var(--checkbox-input-size);
|
|
74
79
|
|
|
75
80
|
fill: $white;
|
|
76
|
-
cursor:
|
|
81
|
+
cursor: var(--wpds-cursor-control);
|
|
77
82
|
position: absolute;
|
|
78
83
|
left: 50%;
|
|
79
84
|
top: 50%;
|
|
@@ -88,6 +93,13 @@ svg.components-checkbox-control__indeterminate {
|
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
95
|
|
|
96
|
+
.components-checkbox-control:has(:disabled) {
|
|
97
|
+
svg.components-checkbox-control__checked,
|
|
98
|
+
svg.components-checkbox-control__indeterminate {
|
|
99
|
+
fill: $components-color-gray-400;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
91
103
|
.components-checkbox-control__help {
|
|
92
104
|
display: inline-block;
|
|
93
105
|
margin-inline-start: calc(var(--checkbox-input-size) + var(--checkbox-input-margin));
|
|
@@ -12,6 +12,10 @@ export type CheckboxControlProps = Pick<
|
|
|
12
12
|
BaseControlProps,
|
|
13
13
|
'__nextHasNoMarginBottom' | 'help'
|
|
14
14
|
> & {
|
|
15
|
+
/**
|
|
16
|
+
* Whether the checkbox should be disabled.
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* A function that receives the checked state (boolean) as input.
|
|
17
21
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use "@wordpress/base-styles/colors" as *;
|
|
2
2
|
@use "@wordpress/base-styles/variables" as *;
|
|
3
|
-
@use "@wordpress/base-styles/z-index" as *;
|
|
4
3
|
|
|
5
4
|
$color-palette-circle-size: 28px;
|
|
6
5
|
$color-palette-circle-spacing: 12px;
|
|
@@ -9,6 +8,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
9
8
|
display: inline-block;
|
|
10
9
|
width: 100%;
|
|
11
10
|
min-width: 188px;
|
|
11
|
+
isolation: isolate;
|
|
12
12
|
|
|
13
13
|
.components-circular-option-picker__custom-clear-wrapper {
|
|
14
14
|
display: flex;
|
|
@@ -21,7 +21,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
21
21
|
flex-wrap: wrap;
|
|
22
22
|
gap: $color-palette-circle-spacing;
|
|
23
23
|
position: relative;
|
|
24
|
-
z-index:
|
|
24
|
+
z-index: 1;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// Make sure that the .components-circular-option-picker__swatches element
|
|
@@ -29,7 +29,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
29
29
|
// that the tooltip rendered when hovering an `Option` always appears on top.
|
|
30
30
|
> *:not(.components-circular-option-picker__swatches) {
|
|
31
31
|
position: relative;
|
|
32
|
-
z-index:
|
|
32
|
+
z-index: 0;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -64,8 +64,9 @@ $color-palette-circle-spacing: 12px;
|
|
|
64
64
|
bottom: 1px;
|
|
65
65
|
right: 1px;
|
|
66
66
|
border-radius: $radius-round;
|
|
67
|
+
// Sit below the option's color and selected-state UI.
|
|
68
|
+
z-index: -1;
|
|
67
69
|
// Show a thin circular outline in Windows high contrast mode, otherwise the button is invisible.
|
|
68
|
-
z-index: z-index(".components-circular-option-picker__option-wrapper::before");
|
|
69
70
|
/* stylelint-disable-next-line function-url-quotes -- We need quotes for the data URL to use the SVG inline. */
|
|
70
71
|
background: url('data:image/svg+xml,%3Csvg width="28" height="28" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M6 8V6H4v2h2zM8 8V6h2v2H8zM10 16H8v-2h2v2zM12 16v-2h2v2h-2zM12 18v-2h-2v2H8v2h2v-2h2zM14 18v2h-2v-2h2zM16 18h-2v-2h2v2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z" fill="%23555D65"/%3E%3Cpath d="M18 18v2h-2v-2h2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z" fill="%23555D65"/%3E%3C/svg%3E');
|
|
71
72
|
}
|
|
@@ -84,7 +85,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
84
85
|
transition: 100ms box-shadow ease;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
cursor:
|
|
88
|
+
cursor: var(--wpds-cursor-control);
|
|
88
89
|
|
|
89
90
|
&:hover {
|
|
90
91
|
// Override default button hover style.
|
|
@@ -95,7 +96,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
95
96
|
&[aria-selected="true"] {
|
|
96
97
|
box-shadow: inset 0 0 0 4px;
|
|
97
98
|
position: relative;
|
|
98
|
-
z-index:
|
|
99
|
+
z-index: 1;
|
|
99
100
|
overflow: visible;
|
|
100
101
|
|
|
101
102
|
& + svg {
|
|
@@ -103,7 +104,8 @@ $color-palette-circle-spacing: 12px;
|
|
|
103
104
|
left: 2px;
|
|
104
105
|
top: 2px;
|
|
105
106
|
border-radius: $radius-round;
|
|
106
|
-
|
|
107
|
+
// Render the selected checkmark above the selected option.
|
|
108
|
+
z-index: 2;
|
|
107
109
|
pointer-events: none;
|
|
108
110
|
}
|
|
109
111
|
}
|
|
@@ -9,6 +9,7 @@ import type { Meta, StoryFn } from '@storybook/react-vite';
|
|
|
9
9
|
import ColorIndicator from '..';
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof ColorIndicator > = {
|
|
12
|
+
tags: [ 'manifest' ],
|
|
12
13
|
component: ColorIndicator,
|
|
13
14
|
title: 'Components/Selection & Input/Color/ColorIndicator',
|
|
14
15
|
id: 'components-colorindicator',
|
|
@@ -14,6 +14,7 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
import ColorPalette from '..';
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof ColorPalette > = {
|
|
17
|
+
tags: [ 'manifest' ],
|
|
17
18
|
title: 'Components/Selection & Input/Color/ColorPalette',
|
|
18
19
|
id: 'components-colorpalette',
|
|
19
20
|
component: ColorPalette,
|
|
@@ -16,7 +16,7 @@ $border-as-box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.2);
|
|
|
16
16
|
height: $grid-unit-80;
|
|
17
17
|
width: 100%;
|
|
18
18
|
box-sizing: border-box;
|
|
19
|
-
cursor:
|
|
19
|
+
cursor: var(--wpds-cursor-control);
|
|
20
20
|
// Show a thin outline in Windows high contrast mode.
|
|
21
21
|
outline: 1px solid transparent;
|
|
22
22
|
border-radius: $radius-medium $radius-medium 0 0;
|
|
@@ -10,6 +10,7 @@ import { fn } from 'storybook/test';
|
|
|
10
10
|
import { ColorPicker } from '../component';
|
|
11
11
|
|
|
12
12
|
const meta: Meta< typeof ColorPicker > = {
|
|
13
|
+
tags: [ 'manifest' ],
|
|
13
14
|
component: ColorPicker,
|
|
14
15
|
title: 'Components/Selection & Input/Color/ColorPicker',
|
|
15
16
|
id: 'components-colorpicker',
|
package/src/css.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ const GradientTypePicker = ( {
|
|
|
76
76
|
);
|
|
77
77
|
|
|
78
78
|
if ( type === 'linear-gradient' && gradientAST.orientation ) {
|
|
79
|
+
// eslint-disable-next-line react-compiler/react-compiler -- false positive, see https://github.com/facebook/react/issues/29196
|
|
79
80
|
lastLinearOrientationAngle.current = Number(
|
|
80
81
|
gradientAST.orientation.value
|
|
81
82
|
);
|
|
@@ -15,6 +15,7 @@ import { useState } from '@wordpress/element';
|
|
|
15
15
|
import CustomSelectControl from '..';
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof CustomSelectControl > = {
|
|
18
|
+
tags: [ 'manifest' ],
|
|
18
19
|
title: 'Components/Selection & Input/Common/CustomSelectControl',
|
|
19
20
|
component: CustomSelectControl,
|
|
20
21
|
id: 'components-customselectcontrol',
|
package/src/date-time/README.md
CHANGED
|
@@ -70,7 +70,7 @@ A callback function which receives a Date object representing a day as an argume
|
|
|
70
70
|
|
|
71
71
|
- Required: No
|
|
72
72
|
|
|
73
|
-
### `onMonthPreviewed`: `( date:
|
|
73
|
+
### `onMonthPreviewed`: `( date: string ) => void`
|
|
74
74
|
|
|
75
75
|
A callback invoked when selecting the previous/next month in the date picker. The callback receives the new month date in the ISO format as an argument.
|
|
76
76
|
|
|
@@ -87,5 +87,5 @@ List of events to show in the date picker. Each event will appear as a dot on th
|
|
|
87
87
|
|
|
88
88
|
The day that the week should start on. 0 for Sunday, 1 for Monday, etc.
|
|
89
89
|
|
|
90
|
-
-
|
|
91
|
-
-
|
|
90
|
+
- Required: No
|
|
91
|
+
- Default: 0
|