@wordpress/components 37.0.0 → 38.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/AGENTS.md +2 -2
- package/CHANGELOG.md +46 -0
- package/build/autocomplete/index.cjs +3 -1
- package/build/autocomplete/index.cjs.map +2 -2
- package/build/color-picker/component.cjs +14 -5
- package/build/color-picker/component.cjs.map +2 -2
- package/build/color-picker/picker.cjs +95 -23
- package/build/color-picker/picker.cjs.map +2 -2
- package/build/confirm-dialog/component.cjs +86 -4
- package/build/confirm-dialog/component.cjs.map +3 -3
- package/build/content-editable-control/index.cjs +19 -9
- package/build/content-editable-control/index.cjs.map +3 -3
- package/build/custom-select-control/index.cjs +1 -2
- package/build/custom-select-control/index.cjs.map +2 -2
- package/build/disabled/index.cjs +87 -4
- package/build/disabled/index.cjs.map +4 -4
- package/build/form-token-field/index.cjs +87 -2
- package/build/form-token-field/index.cjs.map +3 -3
- package/build/gradient-picker/index.cjs +26 -20
- package/build/gradient-picker/index.cjs.map +2 -2
- package/build/input-control/index.cjs +0 -1
- package/build/input-control/index.cjs.map +2 -2
- package/build/input-control/styles/input-control-styles.cjs +23 -31
- package/build/input-control/styles/input-control-styles.cjs.map +2 -2
- package/build/private-apis.cjs +0 -2
- package/build/private-apis.cjs.map +3 -3
- package/build/range-control/index.cjs +0 -1
- package/build/range-control/index.cjs.map +2 -2
- package/build/sandbox/index.cjs +23 -4
- package/build/sandbox/index.cjs.map +3 -3
- package/build/search-control/index.cjs +93 -10
- package/build/search-control/index.cjs.map +4 -4
- package/build/select-control/index.cjs +0 -1
- package/build/select-control/index.cjs.map +2 -2
- package/build/select-control/styles/select-control-styles.cjs +9 -16
- package/build/select-control/styles/select-control-styles.cjs.map +2 -2
- package/build/slot-fill/fill.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control/component.cjs +91 -8
- package/build/toggle-group-control/toggle-group-control/component.cjs.map +4 -4
- package/build/toggle-group-control/toggle-group-control-option-base/component.cjs +98 -17
- package/build/toggle-group-control/toggle-group-control-option-base/component.cjs.map +4 -4
- package/build/tools-panel/tools-panel/component.cjs +6 -0
- package/build/tools-panel/tools-panel/component.cjs.map +2 -2
- package/build/tools-panel/tools-panel/hook.cjs +87 -11
- package/build/tools-panel/tools-panel/hook.cjs.map +4 -4
- package/build/tools-panel/tools-panel-header/component.cjs +87 -2
- package/build/tools-panel/tools-panel-header/component.cjs.map +3 -3
- package/build/tools-panel/tools-panel-header/hook.cjs +90 -20
- package/build/tools-panel/tools-panel-header/hook.cjs.map +4 -4
- package/build/tools-panel/tools-panel-item/hook.cjs +88 -9
- package/build/tools-panel/tools-panel-item/hook.cjs.map +4 -4
- package/build/validated-form-controls/control-with-error.cjs +3 -0
- package/build/validated-form-controls/control-with-error.cjs.map +2 -2
- package/build-module/autocomplete/index.mjs +3 -1
- package/build-module/autocomplete/index.mjs.map +2 -2
- package/build-module/color-picker/component.mjs +14 -5
- package/build-module/color-picker/component.mjs.map +2 -2
- package/build-module/color-picker/picker.mjs +96 -24
- package/build-module/color-picker/picker.mjs.map +2 -2
- package/build-module/confirm-dialog/component.mjs +86 -4
- package/build-module/confirm-dialog/component.mjs.map +3 -3
- package/build-module/content-editable-control/index.mjs +21 -11
- package/build-module/content-editable-control/index.mjs.map +2 -2
- package/build-module/custom-select-control/index.mjs +1 -2
- package/build-module/custom-select-control/index.mjs.map +2 -2
- package/build-module/disabled/index.mjs +87 -4
- package/build-module/disabled/index.mjs.map +3 -3
- package/build-module/form-token-field/index.mjs +88 -3
- package/build-module/form-token-field/index.mjs.map +3 -3
- package/build-module/gradient-picker/index.mjs +26 -20
- package/build-module/gradient-picker/index.mjs.map +2 -2
- package/build-module/input-control/index.mjs +0 -1
- package/build-module/input-control/index.mjs.map +2 -2
- package/build-module/input-control/styles/input-control-styles.mjs +23 -31
- package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
- package/build-module/private-apis.mjs +0 -2
- package/build-module/private-apis.mjs.map +2 -2
- package/build-module/range-control/index.mjs +0 -1
- package/build-module/range-control/index.mjs.map +2 -2
- package/build-module/sandbox/index.mjs +13 -4
- package/build-module/sandbox/index.mjs.map +2 -2
- package/build-module/search-control/index.mjs +93 -10
- package/build-module/search-control/index.mjs.map +3 -3
- package/build-module/select-control/index.mjs +0 -1
- package/build-module/select-control/index.mjs.map +2 -2
- package/build-module/select-control/styles/select-control-styles.mjs +9 -16
- package/build-module/select-control/styles/select-control-styles.mjs.map +2 -2
- package/build-module/slot-fill/fill.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control/component.mjs +92 -9
- package/build-module/toggle-group-control/toggle-group-control/component.mjs.map +3 -3
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs +99 -18
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs.map +3 -3
- package/build-module/tools-panel/tools-panel/component.mjs +6 -0
- package/build-module/tools-panel/tools-panel/component.mjs.map +2 -2
- package/build-module/tools-panel/tools-panel/hook.mjs +87 -11
- package/build-module/tools-panel/tools-panel/hook.mjs.map +3 -3
- package/build-module/tools-panel/tools-panel-header/component.mjs +87 -2
- package/build-module/tools-panel/tools-panel-header/component.mjs.map +3 -3
- package/build-module/tools-panel/tools-panel-header/hook.mjs +90 -20
- package/build-module/tools-panel/tools-panel-header/hook.mjs.map +3 -3
- package/build-module/tools-panel/tools-panel-item/hook.mjs +89 -10
- package/build-module/tools-panel/tools-panel-item/hook.mjs.map +3 -3
- package/build-module/validated-form-controls/control-with-error.mjs +3 -0
- package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
- package/build-style/style-rtl.css +20 -24
- package/build-style/style.css +20 -24
- package/build-types/autocomplete/index.d.ts +7 -3
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts +1 -3
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +1 -3
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/types.d.ts +1 -15
- package/build-types/border-box-control/types.d.ts.map +1 -1
- package/build-types/box-control/input-control.d.ts +3 -0
- package/build-types/box-control/input-control.d.ts.map +1 -0
- package/build-types/box-control/styles/box-control-styles.d.ts +4 -8
- package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
- package/build-types/box-control/types.d.ts +1 -8
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/card/context.d.ts +3 -0
- package/build-types/card/context.d.ts.map +1 -0
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +17 -1
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +4 -8
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/color-picker/types.d.ts +2 -0
- package/build-types/color-picker/types.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/content-editable-control/index.d.ts.map +1 -1
- package/build-types/context/wordpress-component.d.ts +2 -1
- package/build-types/context/wordpress-component.d.ts.map +1 -1
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control/types.d.ts +1 -8
- package/build-types/custom-select-control/types.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts +23 -0
- package/build-types/date-time/date/index.d.ts.map +1 -0
- package/build-types/date-time/date/styles.d.ts +45 -0
- package/build-types/date-time/date/styles.d.ts.map +1 -0
- package/build-types/date-time/date/test/index.d.ts +2 -0
- package/build-types/date-time/date/test/index.d.ts.map +1 -0
- package/build-types/date-time/date/test/use-lilius.d.ts +2 -0
- package/build-types/date-time/date/test/use-lilius.d.ts.map +1 -0
- package/build-types/date-time/date/use-lilius/index.d.ts +169 -0
- package/build-types/date-time/date/use-lilius/index.d.ts.map +1 -0
- package/build-types/date-time/time/index.d.ts +27 -0
- package/build-types/date-time/time/index.d.ts.map +1 -0
- package/build-types/date-time/time/styles.d.ts +93 -0
- package/build-types/date-time/time/styles.d.ts.map +1 -0
- package/build-types/date-time/time/test/index.d.ts +2 -0
- package/build-types/date-time/time/test/index.d.ts.map +1 -0
- package/build-types/date-time/time/time-input/index.d.ts +4 -0
- package/build-types/date-time/time/time-input/index.d.ts.map +1 -0
- package/build-types/date-time/time/time-input/test/index.d.ts +2 -0
- package/build-types/date-time/time/time-input/test/index.d.ts.map +1 -0
- package/build-types/date-time/time/timezone.d.ts +7 -0
- package/build-types/date-time/time/timezone.d.ts.map +1 -0
- package/build-types/date-time/time-picker/styles.d.ts +8 -16
- package/build-types/date-time/time-picker/styles.d.ts.map +1 -1
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +10 -0
- package/build-types/divider/styles.d.ts.map +1 -0
- package/build-types/flex/styles.d.ts +17 -0
- package/build-types/flex/styles.d.ts.map +1 -0
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -4
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts +12 -2
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts +12 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/types.d.ts +2 -15
- package/build-types/font-size-picker/types.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +1 -0
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/gradient-picker/test/index.d.ts +2 -0
- package/build-types/gradient-picker/test/index.d.ts.map +1 -0
- package/build-types/gradient-picker/types.d.ts +19 -4
- package/build-types/gradient-picker/types.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +0 -6
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +1 -8
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/mobile/image/constants.d.ts +5 -0
- package/build-types/mobile/image/constants.d.ts.map +1 -0
- package/build-types/navigation/back-button/index.d.ts +7 -0
- package/build-types/navigation/back-button/index.d.ts.map +1 -0
- package/build-types/navigation/constants.d.ts +3 -0
- package/build-types/navigation/constants.d.ts.map +1 -0
- package/build-types/navigation/context.d.ts +4 -0
- package/build-types/navigation/context.d.ts.map +1 -0
- package/build-types/navigation/group/context.d.ts +7 -0
- package/build-types/navigation/group/context.d.ts.map +1 -0
- package/build-types/navigation/group/index.d.ts +7 -0
- package/build-types/navigation/group/index.d.ts.map +1 -0
- package/build-types/navigation/index.d.ts +46 -0
- package/build-types/navigation/index.d.ts.map +1 -0
- package/build-types/navigation/item/base-content.d.ts +3 -0
- package/build-types/navigation/item/base-content.d.ts.map +1 -0
- package/build-types/navigation/item/base.d.ts +3 -0
- package/build-types/navigation/item/base.d.ts.map +1 -0
- package/build-types/navigation/item/index.d.ts +7 -0
- package/build-types/navigation/item/index.d.ts.map +1 -0
- package/build-types/navigation/item/use-navigation-tree-item.d.ts +3 -0
- package/build-types/navigation/item/use-navigation-tree-item.d.ts.map +1 -0
- package/build-types/navigation/menu/context.d.ts +7 -0
- package/build-types/navigation/menu/context.d.ts.map +1 -0
- package/build-types/navigation/menu/index.d.ts +7 -0
- package/build-types/navigation/menu/index.d.ts.map +1 -0
- package/build-types/navigation/menu/menu-title-search.d.ts +3 -0
- package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -0
- package/build-types/navigation/menu/menu-title.d.ts +3 -0
- package/build-types/navigation/menu/menu-title.d.ts.map +1 -0
- package/build-types/navigation/menu/search-no-results-found.d.ts +3 -0
- package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -0
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts +3 -0
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts.map +1 -0
- package/build-types/navigation/stories/index.story.d.ts +23 -0
- package/build-types/navigation/stories/index.story.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/controlled-state.d.ts +7 -0
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/default.d.ts +10 -0
- package/build-types/navigation/stories/utils/default.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/group.d.ts +10 -0
- package/build-types/navigation/stories/utils/group.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +10 -0
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/more-examples.d.ts +10 -0
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/search.d.ts +10 -0
- package/build-types/navigation/stories/utils/search.d.ts.map +1 -0
- package/build-types/navigation/styles/navigation-styles.d.ts +55 -0
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -0
- package/build-types/navigation/test/index.d.ts +2 -0
- package/build-types/navigation/test/index.d.ts.map +1 -0
- package/build-types/navigation/types.d.ts +266 -0
- package/build-types/navigation/types.d.ts.map +1 -0
- package/build-types/navigation/use-create-navigation-tree.d.ts +15 -0
- package/build-types/navigation/use-create-navigation-tree.d.ts.map +1 -0
- package/build-types/navigation/use-navigation-tree-nodes.d.ts +10 -0
- package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -0
- package/build-types/navigation/utils.d.ts +3 -0
- package/build-types/navigation/utils.d.ts.map +1 -0
- package/build-types/number-control/index.d.ts +2 -4
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -4
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/types.d.ts +1 -15
- package/build-types/number-control/types.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +2 -4
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +2 -4
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/types.d.ts +2 -16
- package/build-types/range-control/types.d.ts.map +1 -1
- package/build-types/sandbox/index.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/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/types.d.ts +1 -1
- package/build-types/search-control/types.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +0 -7
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts +1 -6
- package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
- package/build-types/surface/styles.d.ts +11 -0
- package/build-types/surface/styles.d.ts.map +1 -0
- package/build-types/theme/styles.d.ts +10 -0
- package/build-types/theme/styles.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/types.d.ts +0 -7
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tree-select/types.d.ts +1 -8
- package/build-types/tree-select/types.d.ts.map +1 -1
- package/build-types/truncate/styles.d.ts +2 -0
- package/build-types/truncate/styles.d.ts.map +1 -0
- package/build-types/unit-control/index.d.ts +2 -4
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -4
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +1 -15
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/deprecated-36px-size.d.ts +7 -0
- package/build-types/utils/deprecated-36px-size.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/number-control.d.ts +2 -4
- package/build-types/validated-form-controls/components/number-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/range-control.d.ts +2 -4
- package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts +5 -0
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts +1 -2
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/control-with-error.d.ts.map +1 -1
- package/build-types/visually-hidden/test/index.d.ts +2 -0
- package/build-types/visually-hidden/test/index.d.ts.map +1 -0
- package/package.json +27 -27
- package/src/autocomplete/index.tsx +16 -3
- package/src/base-control/README.md +2 -2
- package/src/border-box-control/types.ts +4 -15
- package/src/box-control/types.ts +4 -8
- package/src/card/test/__snapshots__/index.tsx.snap +1 -1
- package/src/checkbox-control/test/__snapshots__/index.tsx.snap +1 -1
- package/src/color-indicator/test/__snapshots__/index.tsx.snap +1 -1
- package/src/color-picker/component.tsx +23 -19
- package/src/color-picker/picker.tsx +144 -21
- package/src/color-picker/test/index.tsx +502 -0
- package/src/color-picker/types.ts +2 -0
- package/src/combobox-control/style.scss +2 -2
- package/src/confirm-dialog/component.tsx +2 -4
- package/src/confirm-dialog/style.module.scss +7 -0
- package/src/confirm-dialog/test/index.tsx +5 -0
- package/src/content-editable-control/index.tsx +24 -5
- package/src/content-editable-control/style.module.scss +1 -1
- package/src/content-editable-control/test/index.tsx +20 -8
- package/src/context/test/__snapshots__/context-system-provider.js.snap +1 -1
- package/src/context/wordpress-component.ts +7 -2
- package/src/custom-gradient-picker/test/index.tsx +111 -1
- package/src/custom-select-control/index.tsx +1 -2
- package/src/custom-select-control/test/__snapshots__/index.tsx.snap +6 -0
- package/src/custom-select-control/test/index.tsx +23 -0
- package/src/custom-select-control/types.ts +1 -8
- package/src/disabled/index.tsx +7 -5
- package/src/disabled/style.module.scss +15 -0
- package/src/disabled/test/index.tsx +6 -4
- package/src/elevation/test/__snapshots__/index.tsx.snap +1 -1
- package/src/external-link/style.scss +6 -12
- package/src/flex/test/__snapshots__/index.tsx.snap +1 -1
- package/src/font-size-picker/types.ts +6 -15
- package/src/form-toggle/test/__snapshots__/index.tsx.snap +1 -1
- package/src/form-token-field/index.tsx +5 -4
- package/src/form-token-field/style.module.scss +6 -0
- package/src/form-token-field/style.scss +2 -2
- package/src/gradient-picker/README.md +21 -3
- package/src/gradient-picker/index.tsx +43 -28
- package/src/gradient-picker/stories/index.story.tsx +41 -5
- package/src/gradient-picker/test/index.tsx +148 -0
- package/src/gradient-picker/types.ts +24 -4
- package/src/h-stack/test/__snapshots__/index.tsx.snap +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +1 -1
- package/src/higher-order/with-filters/test/__snapshots__/index.tsx.snap +1 -1
- package/src/input-control/index.tsx +0 -1
- package/src/input-control/styles/input-control-styles.tsx +0 -8
- package/src/input-control/test/__snapshots__/index.js.snap +11 -0
- package/src/input-control/test/index.js +28 -0
- package/src/input-control/types.ts +1 -8
- package/src/item-group/test/__snapshots__/index.js.snap +1 -1
- package/src/menu/README.md +2 -2
- package/src/menu-item/test/__snapshots__/index.js.snap +1 -1
- package/src/modal/test/index.tsx +42 -0
- package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
- package/src/number-control/types.ts +1 -22
- package/src/panel/test/__snapshots__/body.tsx.snap +1 -1
- package/src/panel/test/__snapshots__/header.tsx.snap +1 -1
- package/src/panel/test/__snapshots__/index.tsx.snap +1 -1
- package/src/panel/test/__snapshots__/row.tsx.snap +1 -1
- package/src/private-apis.ts +0 -2
- package/src/range-control/index.tsx +0 -1
- package/src/range-control/types.ts +2 -15
- package/src/sandbox/index.tsx +22 -2
- package/src/sandbox/test/index.tsx +21 -0
- package/src/sandbox/types.ts +11 -0
- package/src/scrollable/test/__snapshots__/index.tsx.snap +1 -1
- package/src/search-control/index.tsx +23 -20
- package/src/search-control/style.module.scss +16 -0
- package/src/search-control/test/index.tsx +8 -0
- package/src/search-control/types.ts +1 -1
- package/src/select-control/index.tsx +0 -1
- package/src/select-control/styles/select-control-styles.ts +0 -7
- package/src/select-control/test/__snapshots__/select-control.tsx.snap +11 -0
- package/src/select-control/test/select-control.tsx +37 -0
- package/src/select-control/types.ts +0 -7
- package/src/shortcut/test/__snapshots__/index.tsx.snap +1 -1
- package/src/slot-fill/fill.tsx +3 -9
- package/src/slot-fill/stories/index.story.tsx +52 -10
- package/src/slot-fill/test/__snapshots__/slot.js.snap +1 -1
- package/src/slot-fill/test/slot.js +53 -11
- package/src/spacer/test/__snapshots__/index.tsx.snap +1 -1
- package/src/text/test/__snapshots__/index.tsx.snap +1 -1
- package/src/text-control/style.scss +1 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +29 -707
- package/src/toggle-group-control/test/index.tsx +33 -3
- package/src/toggle-group-control/toggle-group-control/component.tsx +11 -16
- package/src/toggle-group-control/toggle-group-control/style.module.scss +63 -0
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +22 -24
- package/src/toggle-group-control/toggle-group-control-option-base/style.module.scss +88 -0
- package/src/toggle-group-control/types.ts +0 -7
- package/src/tools-panel/style.module.scss +117 -0
- package/src/tools-panel/test/index.tsx +105 -39
- package/src/tools-panel/tools-panel/component.tsx +12 -1
- package/src/tools-panel/tools-panel/hook.ts +13 -15
- package/src/tools-panel/tools-panel-header/component.tsx +6 -2
- package/src/tools-panel/tools-panel-header/hook.ts +7 -25
- package/src/tools-panel/tools-panel-item/hook.ts +16 -34
- package/src/tooltip/test/index.tsx +1 -1
- package/src/tree-grid/test/__snapshots__/cell.tsx.snap +1 -1
- package/src/tree-grid/test/__snapshots__/index.tsx.snap +1 -1
- package/src/tree-grid/test/__snapshots__/roving-tab-index-item.tsx.snap +1 -1
- package/src/tree-grid/test/__snapshots__/roving-tab-index.tsx.snap +1 -1
- package/src/tree-grid/test/__snapshots__/row.tsx.snap +1 -1
- package/src/tree-select/README.md +1 -1
- package/src/tree-select/types.ts +1 -8
- package/src/unit-control/types.ts +1 -18
- package/src/utils/theme-variables.scss +1 -0
- package/src/v-stack/test/__snapshots__/index.tsx.snap +1 -1
- package/src/validated-form-controls/components/stories/overview.story.tsx +51 -0
- package/src/validated-form-controls/control-with-error.tsx +9 -0
- package/src/validated-form-controls/style.scss +3 -3
- package/src/validated-form-controls/test/control-with-error.tsx +42 -0
- package/src/view/test/__snapshots__/index.js.snap +1 -1
- package/build/confirm-dialog/styles.cjs +0 -42
- package/build/confirm-dialog/styles.cjs.map +0 -7
- package/build/disabled/styles/disabled-styles.cjs +0 -42
- package/build/disabled/styles/disabled-styles.cjs.map +0 -7
- package/build/form-token-field/styles.cjs +0 -49
- package/build/form-token-field/styles.cjs.map +0 -7
- package/build/search-control/styles.cjs +0 -74
- package/build/search-control/styles.cjs.map +0 -7
- package/build/theme/color-algorithms.cjs +0 -131
- package/build/theme/color-algorithms.cjs.map +0 -7
- package/build/theme/index.cjs +0 -160
- package/build/theme/index.cjs.map +0 -7
- package/build/theme/types.cjs +0 -19
- package/build/theme/types.cjs.map +0 -7
- package/build/toggle-group-control/toggle-group-control/styles.cjs +0 -53
- package/build/toggle-group-control/toggle-group-control/styles.cjs.map +0 -7
- package/build/toggle-group-control/toggle-group-control-option-base/styles.cjs +0 -94
- package/build/toggle-group-control/toggle-group-control-option-base/styles.cjs.map +0 -7
- package/build/tools-panel/styles.cjs +0 -129
- package/build/tools-panel/styles.cjs.map +0 -7
- package/build/utils/use-deprecated-props.cjs +0 -41
- package/build/utils/use-deprecated-props.cjs.map +0 -7
- package/build-module/confirm-dialog/styles.mjs +0 -17
- package/build-module/confirm-dialog/styles.mjs.map +0 -7
- package/build-module/disabled/styles/disabled-styles.mjs +0 -17
- package/build-module/disabled/styles/disabled-styles.mjs.map +0 -7
- package/build-module/form-token-field/styles.mjs +0 -14
- package/build-module/form-token-field/styles.mjs.map +0 -7
- package/build-module/search-control/styles.mjs +0 -38
- package/build-module/search-control/styles.mjs.map +0 -7
- package/build-module/theme/color-algorithms.mjs +0 -94
- package/build-module/theme/color-algorithms.mjs.map +0 -7
- package/build-module/theme/index.mjs +0 -129
- package/build-module/theme/index.mjs.map +0 -7
- package/build-module/theme/types.mjs +0 -1
- package/build-module/theme/types.mjs.map +0 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.mjs +0 -27
- package/build-module/toggle-group-control/toggle-group-control/styles.mjs.map +0 -7
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.mjs +0 -56
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.mjs.map +0 -7
- package/build-module/tools-panel/styles.mjs +0 -84
- package/build-module/tools-panel/styles.mjs.map +0 -7
- package/build-module/utils/use-deprecated-props.mjs +0 -16
- package/build-module/utils/use-deprecated-props.mjs.map +0 -7
- package/src/confirm-dialog/styles.ts +0 -18
- package/src/disabled/styles/disabled-styles.tsx +0 -23
- package/src/form-token-field/styles.ts +0 -15
- package/src/search-control/styles.ts +0 -27
- package/src/theme/README.md +0 -47
- package/src/theme/color-algorithms.ts +0 -142
- package/src/theme/index.tsx +0 -80
- package/src/theme/stories/index.story.tsx +0 -127
- package/src/theme/style.module.scss +0 -4
- package/src/theme/test/color-algorithms.ts +0 -100
- package/src/theme/test/index.tsx +0 -151
- package/src/theme/types.ts +0 -61
- package/src/toggle-group-control/toggle-group-control/styles.ts +0 -84
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +0 -109
- package/src/tools-panel/styles.ts +0 -176
- package/src/utils/use-deprecated-props.ts +0 -14
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function maybeWarnDeprecated36pxSize({ componentName, __next40pxDefaultSize, size, __shouldNotWarnDeprecated36pxSize }: {
|
|
2
|
+
componentName: string;
|
|
3
|
+
__next40pxDefaultSize: boolean | undefined;
|
|
4
|
+
size: string | undefined;
|
|
5
|
+
__shouldNotWarnDeprecated36pxSize?: boolean;
|
|
6
|
+
}): void;
|
|
7
|
+
//# sourceMappingURL=deprecated-36px-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-36px-size.d.ts","sourceRoot":"","sources":["../../src/utils/deprecated-36px-size.ts"],"names":[],"mappings":"AAKA,wBAAgB,2BAA2B,CAAE,EAC5C,aAAa,EACb,qBAAqB,EACrB,IAAI,EACJ,iCAAiC,EACjC,EAAE;IACF,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC5C,QAcA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ValidatedControlProps } from './types';
|
|
2
|
-
export declare const ValidatedNumberControl: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../input-control/types").InputControlProps, "
|
|
2
|
+
export declare const ValidatedNumberControl: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../input-control/types").InputControlProps, "isDragEnabled" | "max" | "min" | "required" | "step" | "type" | "value"> & {
|
|
3
3
|
hideHTMLArrows?: boolean;
|
|
4
4
|
spinControls?: 'none' | 'native' | 'custom';
|
|
5
5
|
isDragEnabled?: import("../../input-control/types").InputControlProps['isDragEnabled'];
|
|
@@ -12,7 +12,5 @@ export declare const ValidatedNumberControl: import("react").ForwardRefExoticCom
|
|
|
12
12
|
spinFactor?: number;
|
|
13
13
|
type?: import("../../input-control/types").InputControlProps['type'];
|
|
14
14
|
value?: number | string;
|
|
15
|
-
|
|
16
|
-
__next40pxDefaultSize?: boolean;
|
|
17
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next36pxDefaultSize" | "__next40pxDefaultSize" | "__shouldNotWarnDeprecated36pxSize" | "__unstableInputWidth" | "__unstableStateReducer" | "about" | "accept" | "accessKey" | "alt" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "as" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "autoSave" | "capture" | "checked" | "children" | "className" | "color" | "content" | "contentEditable" | "contextMenu" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "disabled" | "dragDirection" | "dragThreshold" | "draggable" | "enterKeyHint" | "exportparts" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "help" | "hidden" | "hideHTMLArrows" | "hideLabelFromVision" | "id" | "inlist" | "inputMode" | "is" | "isDragEnabled" | "isPressEnterToChange" | "isShiftStepEnabled" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "key" | "label" | "labelPosition" | "lang" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScroll" | "onScrollCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onValidate" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "part" | "pattern" | "placeholder" | "prefix" | "property" | "radioGroup" | "readOnly" | "rel" | "required" | "resource" | "results" | "rev" | "role" | "security" | "shiftStep" | "size" | "slot" | "spellCheck" | "spinControls" | "spinFactor" | "src" | "step" | "style" | "suffix" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tabIndex" | "title" | "translate" | "type" | "typeof" | "unselectable" | "value" | "vocab" | "width"> & import("react").RefAttributes<any> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next36pxDefaultSize" | "__next40pxDefaultSize" | "__unstableInputWidth" | "__unstableStateReducer" | "about" | "accept" | "accessKey" | "alt" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "as" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "autoSave" | "capture" | "checked" | "children" | "className" | "color" | "content" | "contentEditable" | "contextMenu" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "disabled" | "dragDirection" | "dragThreshold" | "draggable" | "enterKeyHint" | "exportparts" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "help" | "hidden" | "hideHTMLArrows" | "hideLabelFromVision" | "id" | "inlist" | "inputMode" | "is" | "isDragEnabled" | "isPressEnterToChange" | "isShiftStepEnabled" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "key" | "label" | "labelPosition" | "lang" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScroll" | "onScrollCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onValidate" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "part" | "pattern" | "placeholder" | "prefix" | "property" | "radioGroup" | "readOnly" | "rel" | "required" | "resource" | "results" | "rev" | "role" | "security" | "shiftStep" | "size" | "slot" | "spellCheck" | "spinControls" | "spinFactor" | "src" | "step" | "style" | "suffix" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tabIndex" | "title" | "translate" | "type" | "typeof" | "unselectable" | "value" | "vocab" | "width"> & import("react").RefAttributes<any> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
16
|
//# sourceMappingURL=number-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/number-control.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA0BrD,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"number-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/number-control.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA0BrD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;klLAElC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ValidatedControlProps } from './types';
|
|
2
|
-
export declare const ValidatedRangeControl: import("react").ForwardRefExoticComponent<Omit<Pick<import("../../base-control/types").BaseControlProps, "__nextHasNoMarginBottom" | "help" | "hideLabelFromVision"> & import("../../range-control/types").NumericProps & {
|
|
2
|
+
export declare const ValidatedRangeControl: import("react").ForwardRefExoticComponent<Omit<Pick<import("../../base-control/types").BaseControlProps, "__nextHasNoMarginBottom" | "help" | "hideLabelFromVision"> & Pick<import("../../number-control/types").NumberControlProps, "__next40pxDefaultSize"> & import("../../range-control/types").NumericProps & {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
marks?: boolean | {
|
|
5
5
|
value: number;
|
|
@@ -25,11 +25,9 @@ export declare const ValidatedRangeControl: import("react").ForwardRefExoticComp
|
|
|
25
25
|
resetFallbackValue?: number;
|
|
26
26
|
separatorType?: 'none' | 'fullWidth' | 'topFullWidth';
|
|
27
27
|
shiftStep?: number;
|
|
28
|
-
__next40pxDefaultSize?: boolean;
|
|
29
28
|
showTooltip?: boolean;
|
|
30
29
|
trackColor?: import("react").CSSProperties['color'];
|
|
31
30
|
type?: 'stepper';
|
|
32
31
|
withInputField?: boolean;
|
|
33
|
-
|
|
34
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "__shouldNotWarnDeprecated36pxSize" | "afterIcon" | "allowReset" | "as" | "beforeIcon" | "children" | "color" | "currentInput" | "disabled" | "help" | "hideLabelFromVision" | "initialPosition" | "isShiftStepEnabled" | "label" | "marks" | "onBlur" | "onChange" | "onFocus" | "onMouseLeave" | "onMouseMove" | "railColor" | "renderTooltipContent" | "resetFallbackValue" | "separatorType" | "shiftStep" | "showTooltip" | "step" | "trackColor" | "type" | "withInputField" | keyof import("../../range-control/types").NumericProps> & import("react").RefAttributes<HTMLInputElement> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
32
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "afterIcon" | "allowReset" | "as" | "beforeIcon" | "children" | "color" | "currentInput" | "disabled" | "help" | "hideLabelFromVision" | "initialPosition" | "isShiftStepEnabled" | "label" | "marks" | "onBlur" | "onChange" | "onFocus" | "onMouseLeave" | "onMouseMove" | "railColor" | "renderTooltipContent" | "resetFallbackValue" | "separatorType" | "shiftStep" | "showTooltip" | "step" | "trackColor" | "type" | "withInputField" | keyof import("../../range-control/types").NumericProps> & import("react").RefAttributes<HTMLInputElement> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
35
33
|
//# sourceMappingURL=range-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/range-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA2BrD,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"range-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/range-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA2BrD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;myBAEjC,CAAC"}
|
|
@@ -44,6 +44,11 @@ export declare const CustomErrorsOnSubmit: StoryObj<typeof ValidatedInputControl
|
|
|
44
44
|
* on a ref of the field itself, or the wrapping `form` element.
|
|
45
45
|
*/
|
|
46
46
|
export declare const ShowingErrorsAtArbitraryTimes: StoryObj<typeof ValidatedInputControl>;
|
|
47
|
+
/**
|
|
48
|
+
* A synthetic `invalid` event can be dispatched to reveal an existing error
|
|
49
|
+
* without moving focus.
|
|
50
|
+
*/
|
|
51
|
+
export declare const ShowingErrorsWithoutMovingFocus: StoryObj<typeof ValidatedInputControl>;
|
|
47
52
|
/**
|
|
48
53
|
* A `form` wrapper and `type="submit"` button can be used to force validation when
|
|
49
54
|
* the user tries to commit their changes, while still allowing the modal to be closed by canceling.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/overview.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAU5D;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAOjE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,gBAAgB,CAMxC,CAAC;eACa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,gBAAgB,CAAE,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAyClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA2CrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA8DnE,CAAC;AAiFF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA4BxE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CACnD,OAAO,qBAAqB,CAsC5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CAwEnE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CAkEzE,CAAC"}
|
|
1
|
+
{"version":3,"file":"overview.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/overview.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAU5D;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAOjE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,gBAAgB,CAMxC,CAAC;eACa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,gBAAgB,CAAE,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAyClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA2CrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA8DnE,CAAC;AAiFF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA4BxE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CACnD,OAAO,qBAAqB,CAsC5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CACrD,OAAO,qBAAqB,CA4C5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CAwEnE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CAkEzE,CAAC"}
|
|
@@ -10,6 +10,5 @@ export declare const ValidatedToggleGroupControl: import("react").ForwardRefExot
|
|
|
10
10
|
children: import("react").ReactNode;
|
|
11
11
|
size?: 'default' | '__unstable-large';
|
|
12
12
|
__next40pxDefaultSize?: boolean;
|
|
13
|
-
|
|
14
|
-
} & import("react").RefAttributes<any> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "__shouldNotWarnDeprecated36pxSize" | "as" | "children" | "help" | "hideLabelFromVision" | "isAdaptiveWidth" | "isBlock" | "isDeselectable" | "label" | "onChange" | "size" | "value" | keyof import("react").RefAttributes<any>> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
|
+
} & import("react").RefAttributes<any> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "as" | "children" | "help" | "hideLabelFromVision" | "isAdaptiveWidth" | "isBlock" | "isDeselectable" | "label" | "onChange" | "size" | "value" | keyof import("react").RefAttributes<any>> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
14
|
//# sourceMappingURL=toggle-group-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/toggle-group-control.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAiDrD,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"toggle-group-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/toggle-group-control.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAiDrD,eAAO,MAAM,2BAA2B;;;;;;;;;;;keAEvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-with-error.d.ts","sourceRoot":"","sources":["../../src/validated-form-controls/control-with-error.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAiChE;;;;;;;GAOG;AACH,KAAK,cAAc,GAChB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,GACjB,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"control-with-error.d.ts","sourceRoot":"","sources":["../../src/validated-form-controls/control-with-error.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAiChE;;;;;;;GAOG;AACH,KAAK,cAAc,GAChB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,GACjB,mBAAmB,CAAC;AA0QvB,eAAO,MAAM,gBAAgB;IAhQ3B;;OAEG;eACQ,OAAO;IAClB;;OAEG;uBACgB,OAAO;qBACT,qBAAqB,CAAE,gBAAgB,CAAE;IAC1D;;OAEG;uBACgB,MAAM,cAAc,GAAG,IAAI,GAAG,SAAS;IAC1D;;;;;;;OAOG;;kDA4OoE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/visually-hidden/test/index.tsx"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "38.0.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"./README.md": "./README.md",
|
|
42
42
|
"./CONTRIBUTING.md": "./CONTRIBUTING.md",
|
|
43
43
|
"./package.json": "./package.json",
|
|
44
|
-
"./build-style
|
|
44
|
+
"./build-style/*": "./build-style/*"
|
|
45
45
|
},
|
|
46
46
|
"wpScript": true,
|
|
47
47
|
"types": "build-types",
|
|
@@ -62,38 +62,38 @@
|
|
|
62
62
|
"@types/gradient-parser": "^1.1.0",
|
|
63
63
|
"@types/highlight-words-core": "^1.2.1",
|
|
64
64
|
"@use-gesture/react": "^10.3.1",
|
|
65
|
-
"@wordpress/a11y": "^4.
|
|
66
|
-
"@wordpress/base-styles": "^
|
|
67
|
-
"@wordpress/compose": "^8.
|
|
68
|
-
"@wordpress/date": "^5.
|
|
69
|
-
"@wordpress/deprecated": "^4.
|
|
70
|
-
"@wordpress/dom": "^4.
|
|
71
|
-
"@wordpress/element": "^8.
|
|
72
|
-
"@wordpress/escape-html": "^3.
|
|
73
|
-
"@wordpress/hooks": "^4.
|
|
74
|
-
"@wordpress/html-entities": "^4.
|
|
75
|
-
"@wordpress/i18n": "^6.
|
|
76
|
-
"@wordpress/icons": "^15.
|
|
77
|
-
"@wordpress/is-shallow-equal": "^5.
|
|
78
|
-
"@wordpress/keycodes": "^4.
|
|
79
|
-
"@wordpress/primitives": "^4.
|
|
80
|
-
"@wordpress/private-apis": "^1.
|
|
81
|
-
"@wordpress/rich-text": "^7.
|
|
82
|
-
"@wordpress/style-runtime": "^0.
|
|
83
|
-
"@wordpress/ui": "^0.
|
|
84
|
-
"@wordpress/warning": "^3.
|
|
65
|
+
"@wordpress/a11y": "^4.52.0",
|
|
66
|
+
"@wordpress/base-styles": "^12.0.0",
|
|
67
|
+
"@wordpress/compose": "^8.5.0",
|
|
68
|
+
"@wordpress/date": "^5.52.0",
|
|
69
|
+
"@wordpress/deprecated": "^4.52.0",
|
|
70
|
+
"@wordpress/dom": "^4.52.0",
|
|
71
|
+
"@wordpress/element": "^8.4.0",
|
|
72
|
+
"@wordpress/escape-html": "^3.52.0",
|
|
73
|
+
"@wordpress/hooks": "^4.52.0",
|
|
74
|
+
"@wordpress/html-entities": "^4.52.0",
|
|
75
|
+
"@wordpress/i18n": "^6.25.0",
|
|
76
|
+
"@wordpress/icons": "^15.3.0",
|
|
77
|
+
"@wordpress/is-shallow-equal": "^5.52.0",
|
|
78
|
+
"@wordpress/keycodes": "^4.52.0",
|
|
79
|
+
"@wordpress/primitives": "^4.52.0",
|
|
80
|
+
"@wordpress/private-apis": "^1.52.0",
|
|
81
|
+
"@wordpress/rich-text": "^7.52.0",
|
|
82
|
+
"@wordpress/style-runtime": "^0.8.0",
|
|
83
|
+
"@wordpress/ui": "^0.19.0",
|
|
84
|
+
"@wordpress/warning": "^3.52.0",
|
|
85
85
|
"change-case": "^4.1.2",
|
|
86
86
|
"clsx": "^2.1.1",
|
|
87
87
|
"colord": "^2.9.3",
|
|
88
88
|
"csstype": "^3.2.3",
|
|
89
|
-
"date-fns": "^4.
|
|
89
|
+
"date-fns": "^4.4.0",
|
|
90
90
|
"deepmerge": "^4.3.1",
|
|
91
91
|
"fast-deep-equal": "^3.1.3",
|
|
92
92
|
"framer-motion": "^11.15.0",
|
|
93
93
|
"gradient-parser": "^1.1.1",
|
|
94
94
|
"highlight-words-core": "^1.2.2",
|
|
95
95
|
"is-plain-object": "^5.0.0",
|
|
96
|
-
"memize": "^2.1.
|
|
96
|
+
"memize": "^2.1.1",
|
|
97
97
|
"path-to-regexp": "^6.2.1",
|
|
98
98
|
"re-resizable": "^6.4.0",
|
|
99
99
|
"react-colorful": "^5.6.1",
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"@testing-library/jest-dom": "^6.9.1",
|
|
110
110
|
"@testing-library/react": "^16.3.2",
|
|
111
111
|
"@testing-library/user-event": "^14.6.1",
|
|
112
|
-
"@types/jest": "^
|
|
112
|
+
"@types/jest": "^30.0.0",
|
|
113
113
|
"@types/react-dom": "^18.3.1",
|
|
114
|
-
"@wordpress/jest-console": "^
|
|
114
|
+
"@wordpress/jest-console": "^9.0.0",
|
|
115
115
|
"@wordpress/stylelint-tools": "file:../../tools/stylelint",
|
|
116
116
|
"snapshot-diff": "^0.10.0",
|
|
117
117
|
"storybook": "^10.4.3",
|
|
@@ -130,5 +130,5 @@
|
|
|
130
130
|
"publishConfig": {
|
|
131
131
|
"access": "public"
|
|
132
132
|
},
|
|
133
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "7e8b17a983f9391d3ebc7717af2a1c9ed7efc7ab"
|
|
134
134
|
}
|
|
@@ -379,7 +379,11 @@ export function useLastDifferentValue(
|
|
|
379
379
|
return history.current[ 0 ];
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
|
|
382
|
+
// The popover is anchored to the element this hook's own `ref` lands on, so it
|
|
383
|
+
// owns `contentRef` and callers don't provide one.
|
|
384
|
+
export function useAutocompleteProps(
|
|
385
|
+
options: Omit< UseAutocompleteProps, 'contentRef' >
|
|
386
|
+
) {
|
|
383
387
|
const ref = useRef< HTMLElement >( null );
|
|
384
388
|
const onKeyDownRef =
|
|
385
389
|
useRef< ( event: KeyboardEvent ) => void >( undefined );
|
|
@@ -421,12 +425,21 @@ export function useAutocompleteProps( options: UseAutocompleteProps ) {
|
|
|
421
425
|
return { ref: mergedRefs };
|
|
422
426
|
}
|
|
423
427
|
|
|
428
|
+
// `aria-owns` and `aria-controls` point at the same list: either one lets
|
|
429
|
+
// `aria-activedescendant` resolve to an option rendered outside this
|
|
430
|
+
// element, and assistive technology support differs between them.
|
|
431
|
+
//
|
|
432
|
+
// No `aria-expanded`: consumers are `textbox` elements, which don't
|
|
433
|
+
// support it; that would mean `role="combobox"`, which in turn doesn't
|
|
434
|
+
// support the `aria-multiline` these fields set.
|
|
424
435
|
return {
|
|
425
436
|
ref: mergedRefs,
|
|
426
437
|
children: popover,
|
|
427
|
-
'aria-autocomplete': listBoxId ? 'list' : undefined,
|
|
438
|
+
'aria-autocomplete': listBoxId ? ( 'list' as const ) : undefined,
|
|
439
|
+
'aria-haspopup': listBoxId ? ( 'listbox' as const ) : undefined,
|
|
440
|
+
'aria-controls': listBoxId,
|
|
428
441
|
'aria-owns': listBoxId,
|
|
429
|
-
'aria-activedescendant': activeId,
|
|
442
|
+
'aria-activedescendant': activeId ?? undefined,
|
|
430
443
|
};
|
|
431
444
|
}
|
|
432
445
|
|
|
@@ -30,8 +30,8 @@ const MyCustomTextareaControl = ({ children, ...baseProps }) => (
|
|
|
30
30
|
|
|
31
31
|
### `as`
|
|
32
32
|
|
|
33
|
-
- Type: `
|
|
34
|
-
- Required:
|
|
33
|
+
- Type: `ElementType<any, keyof IntrinsicElements>`
|
|
34
|
+
- Required: Yes
|
|
35
35
|
|
|
36
36
|
The HTML element or React component to render the component as.
|
|
37
37
|
|
|
@@ -22,7 +22,10 @@ export type BorderSide = keyof Borders;
|
|
|
22
22
|
|
|
23
23
|
export type BorderBoxControlProps = ColorProps &
|
|
24
24
|
LabelProps &
|
|
25
|
-
Pick<
|
|
25
|
+
Pick<
|
|
26
|
+
BorderControlProps,
|
|
27
|
+
'enableStyle' | '__next40pxDefaultSize' | 'size'
|
|
28
|
+
> & {
|
|
26
29
|
/**
|
|
27
30
|
* A callback function invoked when any border value is changed. The value
|
|
28
31
|
* received may be a "flat" border object, one that has properties defining
|
|
@@ -45,20 +48,6 @@ export type BorderBoxControlProps = ColorProps &
|
|
|
45
48
|
* properties but for each side; `top`, `right`, `bottom`, and `left`.
|
|
46
49
|
*/
|
|
47
50
|
value: AnyBorder;
|
|
48
|
-
/**
|
|
49
|
-
* Size of the control.
|
|
50
|
-
*
|
|
51
|
-
* @deprecated This prop no longer has any effect.
|
|
52
|
-
* @ignore
|
|
53
|
-
*/
|
|
54
|
-
size?: 'default' | '__unstable-large';
|
|
55
|
-
/**
|
|
56
|
-
* Start opting into the larger default height that will become the default size in a future version.
|
|
57
|
-
*
|
|
58
|
-
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
|
|
59
|
-
* @ignore
|
|
60
|
-
*/
|
|
61
|
-
__next40pxDefaultSize?: boolean;
|
|
62
51
|
};
|
|
63
52
|
|
|
64
53
|
export type LinkedButtonProps = {
|
package/src/box-control/types.ts
CHANGED
|
@@ -27,13 +27,6 @@ type UnitControlPassthroughProps = Omit<
|
|
|
27
27
|
>;
|
|
28
28
|
|
|
29
29
|
type DeprecatedBoxControlProps = {
|
|
30
|
-
/**
|
|
31
|
-
* Start opting into the larger default height that will become the default size in a future version.
|
|
32
|
-
*
|
|
33
|
-
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
|
|
34
|
-
* @ignore
|
|
35
|
-
*/
|
|
36
|
-
__next40pxDefaultSize?: boolean;
|
|
37
30
|
/**
|
|
38
31
|
* @deprecated Pass to the `inputProps` prop instead.
|
|
39
32
|
* @ignore
|
|
@@ -46,7 +39,10 @@ type DeprecatedBoxControlProps = {
|
|
|
46
39
|
onMouseOut?: UnitControlProps[ 'onMouseOut' ];
|
|
47
40
|
};
|
|
48
41
|
|
|
49
|
-
export type BoxControlProps = Pick<
|
|
42
|
+
export type BoxControlProps = Pick<
|
|
43
|
+
UnitControlProps,
|
|
44
|
+
'units' | '__next40pxDefaultSize'
|
|
45
|
+
> &
|
|
50
46
|
DeprecatedBoxControlProps & {
|
|
51
47
|
/**
|
|
52
48
|
* If this property is true, a button to reset the box control is rendered.
|
|
@@ -98,42 +98,40 @@ const UnconnectedColorPicker = (
|
|
|
98
98
|
// distinguish our own updates from external prop changes.
|
|
99
99
|
const lastProducedHexRef = useRef( safeColordColor.toHex() );
|
|
100
100
|
|
|
101
|
+
// While the user is dragging the visual picker, ignore color-prop sync
|
|
102
|
+
// so delayed/stale controlled echoes cannot overwrite internalHSLA mid-drag.
|
|
103
|
+
const isPickerInteractingRef = useRef( false );
|
|
104
|
+
|
|
101
105
|
// Sync internalHSLA when the color prop changes externally (e.g.
|
|
102
106
|
// parent passes a new color that wasn't produced by our onChange).
|
|
103
107
|
useEffect( () => {
|
|
104
|
-
|
|
108
|
+
if ( isPickerInteractingRef.current ) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
105
111
|
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
if ( incomingHex === lastProducedHexRef.current ) {
|
|
112
|
+
// Compare by color equality, not hex string — rgb()/rgba()
|
|
113
|
+
// round-trips can differ in string form for the same color.
|
|
114
|
+
if ( safeColordColor.isEqual( lastProducedHexRef.current ) ) {
|
|
110
115
|
return;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
// Genuinely external change — sync internalHSLA.
|
|
114
|
-
lastProducedHexRef.current =
|
|
119
|
+
lastProducedHexRef.current = safeColordColor.toHex();
|
|
115
120
|
const externalHSLA = safeColordColor.toHsl();
|
|
116
121
|
setInternalHSLA( ( prev ) => mergeHSLA( externalHSLA, prev ) );
|
|
117
122
|
}, [ safeColordColor ] );
|
|
118
123
|
|
|
119
|
-
// Handler for HSL
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
// throttles its onChange callbacks using requestAnimationFrame.
|
|
125
|
-
|
|
124
|
+
// Handler for HSL inputs (and the HSVA picker after it converts to HSLA).
|
|
125
|
+
// Apply the user's HSLA, then notify the parent only when the color
|
|
126
|
+
// actually changes. setColor must not run inside setInternalHSLA
|
|
127
|
+
// (state updaters must be pure). Uses direct setColor (not debounced)
|
|
128
|
+
// to avoid races with hex/RGB's debouncedSetColor.
|
|
126
129
|
const handleHSLAChange = useCallback(
|
|
127
130
|
( nextHSLA: HslaColor ) => {
|
|
128
|
-
// No mergeHSLA here — this handler receives the user's explicit
|
|
129
|
-
// choice from the picker or HSL inputs, with no lossy conversion.
|
|
130
131
|
setInternalHSLA( nextHSLA );
|
|
131
132
|
const previousHex = lastProducedHexRef.current;
|
|
132
133
|
const nextHex = colord( nextHSLA ).toHex();
|
|
133
|
-
|
|
134
|
-
// avoids firing onChange for H/S changes on achromatic
|
|
135
|
-
// colors (e.g. adjusting hue on pure white).
|
|
136
|
-
if ( nextHex !== previousHex ) {
|
|
134
|
+
if ( ! colord( nextHex ).isEqual( previousHex ) ) {
|
|
137
135
|
lastProducedHexRef.current = nextHex;
|
|
138
136
|
setColor( nextHex );
|
|
139
137
|
}
|
|
@@ -213,6 +211,12 @@ const UnconnectedColorPicker = (
|
|
|
213
211
|
onChange={ handleHSLAChange }
|
|
214
212
|
hsla={ internalHSLA }
|
|
215
213
|
enableAlpha={ enableAlpha }
|
|
214
|
+
onInteractionStart={ () => {
|
|
215
|
+
isPickerInteractingRef.current = true;
|
|
216
|
+
} }
|
|
217
|
+
onInteractionEnd={ () => {
|
|
218
|
+
isPickerInteractingRef.current = false;
|
|
219
|
+
} }
|
|
216
220
|
/>
|
|
217
221
|
<AuxiliaryColorArtefactWrapper>
|
|
218
222
|
<AuxiliaryColorArtefactHStackHeader justify="space-between">
|