@wordpress/components 35.0.1 → 36.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 +38 -0
- package/CONTRIBUTING.md +33 -26
- package/build/alignment-matrix-control/cell.cjs +1 -1
- package/build/alignment-matrix-control/cell.cjs.map +2 -2
- package/build/alignment-matrix-control/index.cjs +1 -1
- package/build/alignment-matrix-control/index.cjs.map +2 -2
- package/build/angle-picker-control/angle-circle.cjs +1 -1
- package/build/angle-picker-control/angle-circle.cjs.map +2 -2
- package/build/angle-picker-control/index.cjs +2 -2
- package/build/autocomplete/get-autocomplete-match.cjs.map +1 -1
- package/build/autocomplete/index.cjs.map +1 -1
- package/build/base-control/styles/base-control-styles.cjs +6 -6
- package/build/base-control/styles/base-control-styles.cjs.map +2 -2
- package/build/border-control/styles.cjs +17 -14
- package/build/border-control/styles.cjs.map +2 -2
- package/build/box-control/{input-control.cjs → box-input-control.cjs} +9 -9
- package/build/box-control/box-input-control.cjs.map +7 -0
- package/build/box-control/index.cjs +9 -25
- package/build/box-control/index.cjs.map +3 -3
- package/build/button/index.cjs +3 -7
- package/build/button/index.cjs.map +2 -2
- package/build/card/card-divider/hook.cjs.map +2 -2
- package/build/color-palette/index.cjs.map +1 -1
- package/build/color-picker/component.cjs.map +1 -1
- package/build/date-time/utils.cjs.map +1 -1
- package/build/disabled/index.cjs.map +2 -2
- package/build/divider/component.cjs +108 -3
- package/build/divider/component.cjs.map +4 -4
- package/build/draggable/index.cjs.map +1 -1
- package/build/external-link/index.cjs +1 -1
- package/build/external-link/index.cjs.map +1 -1
- package/build/higher-order/with-fallback-styles/index.cjs +18 -44
- package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
- package/build/menu/popover.cjs.map +1 -1
- package/build/menu/styles.cjs +17 -17
- package/build/menu/styles.cjs.map +2 -2
- package/build/modal/index.cjs.map +1 -1
- package/build/modal/use-modal-exit-animation.cjs +37 -52
- package/build/modal/use-modal-exit-animation.cjs.map +2 -2
- package/build/palette-edit/index.cjs +1 -1
- package/build/progress-bar/index.cjs +1 -1
- package/build/progress-bar/index.cjs.map +2 -2
- package/build/query-controls/index.cjs +2 -2
- package/build/query-controls/index.cjs.map +2 -2
- package/build/range-control/index.cjs.map +1 -1
- package/build/sandbox/index.cjs +7 -1
- package/build/sandbox/index.cjs.map +2 -2
- package/build/snackbar/index.cjs +1 -1
- package/build/spinner/styles.cjs +4 -4
- package/build/spinner/styles.cjs.map +2 -2
- package/build/tabs/index.cjs +0 -18
- package/build/tabs/index.cjs.map +2 -2
- package/build/tabs/tablist.cjs +5 -15
- package/build/tabs/tablist.cjs.map +2 -2
- package/build/text-control/index.cjs +3 -12
- package/build/text-control/index.cjs.map +3 -3
- package/build/tools-panel/styles.cjs +13 -13
- package/build/tools-panel/styles.cjs.map +2 -2
- package/build/tools-panel/tools-panel/hook.cjs.map +1 -1
- package/build/tree-select/index.cjs +1 -1
- package/build/tree-select/index.cjs.map +1 -1
- package/build/truncate/utils.cjs +1 -1
- package/build/truncate/utils.cjs.map +1 -1
- package/build/utils/colors-values.cjs +12 -12
- package/build/utils/colors-values.cjs.map +2 -2
- package/build/utils/config-values.cjs +2 -2
- package/build/utils/config-values.cjs.map +2 -2
- package/build/utils/dropdown-motion.cjs.map +2 -2
- package/build/utils/strings.cjs.map +1 -1
- package/build/validated-form-controls/components/text-control.cjs +0 -1
- package/build/validated-form-controls/components/text-control.cjs.map +2 -2
- package/build-module/alignment-matrix-control/cell.mjs +1 -1
- package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
- package/build-module/alignment-matrix-control/index.mjs +1 -1
- package/build-module/alignment-matrix-control/index.mjs.map +2 -2
- package/build-module/angle-picker-control/angle-circle.mjs +1 -1
- package/build-module/angle-picker-control/angle-circle.mjs.map +2 -2
- package/build-module/angle-picker-control/index.mjs +2 -2
- package/build-module/autocomplete/get-autocomplete-match.mjs.map +1 -1
- package/build-module/autocomplete/index.mjs.map +1 -1
- package/build-module/base-control/styles/base-control-styles.mjs +6 -6
- package/build-module/base-control/styles/base-control-styles.mjs.map +2 -2
- package/build-module/border-control/styles.mjs +17 -14
- package/build-module/border-control/styles.mjs.map +2 -2
- package/build-module/box-control/{input-control.mjs → box-input-control.mjs} +6 -6
- package/build-module/box-control/box-input-control.mjs.map +7 -0
- package/build-module/box-control/index.mjs +9 -25
- package/build-module/box-control/index.mjs.map +2 -2
- package/build-module/button/index.mjs +2 -5
- package/build-module/button/index.mjs.map +2 -2
- package/build-module/card/card-divider/hook.mjs.map +2 -2
- package/build-module/color-palette/index.mjs.map +1 -1
- package/build-module/color-picker/component.mjs.map +1 -1
- package/build-module/date-time/utils.mjs.map +1 -1
- package/build-module/disabled/index.mjs.map +2 -2
- package/build-module/divider/component.mjs +108 -3
- package/build-module/divider/component.mjs.map +3 -3
- package/build-module/draggable/index.mjs.map +1 -1
- package/build-module/external-link/index.mjs +1 -1
- package/build-module/external-link/index.mjs.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.mjs +20 -46
- package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
- package/build-module/menu/popover.mjs.map +1 -1
- package/build-module/menu/styles.mjs +17 -17
- package/build-module/menu/styles.mjs.map +2 -2
- package/build-module/modal/index.mjs.map +1 -1
- package/build-module/modal/use-modal-exit-animation.mjs +37 -52
- package/build-module/modal/use-modal-exit-animation.mjs.map +2 -2
- package/build-module/palette-edit/index.mjs +1 -1
- package/build-module/progress-bar/index.mjs +1 -1
- package/build-module/progress-bar/index.mjs.map +2 -2
- package/build-module/query-controls/index.mjs +2 -2
- package/build-module/query-controls/index.mjs.map +2 -2
- package/build-module/range-control/index.mjs.map +1 -1
- package/build-module/sandbox/index.mjs +3 -1
- package/build-module/sandbox/index.mjs.map +2 -2
- package/build-module/snackbar/index.mjs +1 -1
- package/build-module/spinner/styles.mjs +4 -4
- package/build-module/spinner/styles.mjs.map +2 -2
- package/build-module/tabs/index.mjs +1 -19
- package/build-module/tabs/index.mjs.map +2 -2
- package/build-module/tabs/tablist.mjs +5 -15
- package/build-module/tabs/tablist.mjs.map +2 -2
- package/build-module/text-control/index.mjs +3 -12
- package/build-module/text-control/index.mjs.map +2 -2
- package/build-module/tools-panel/styles.mjs +13 -13
- package/build-module/tools-panel/styles.mjs.map +2 -2
- package/build-module/tools-panel/tools-panel/hook.mjs.map +1 -1
- package/build-module/tree-select/index.mjs +1 -1
- package/build-module/tree-select/index.mjs.map +1 -1
- package/build-module/truncate/utils.mjs +1 -1
- package/build-module/truncate/utils.mjs.map +1 -1
- package/build-module/utils/colors-values.mjs +12 -12
- package/build-module/utils/colors-values.mjs.map +2 -2
- package/build-module/utils/config-values.mjs +2 -2
- package/build-module/utils/config-values.mjs.map +2 -2
- package/build-module/utils/dropdown-motion.mjs.map +2 -2
- package/build-module/utils/strings.mjs.map +1 -1
- package/build-module/validated-form-controls/components/text-control.mjs +0 -1
- package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
- package/build-style/style-rtl.css +85 -101
- package/build-style/style.css +85 -101
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/box-control/box-input-control.d.ts +3 -0
- package/build-types/box-control/box-input-control.d.ts.map +1 -0
- package/build-types/box-control/index.d.ts +2 -6
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/types.d.ts +7 -6
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/button/index.d.ts +0 -2
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +1 -274
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/disabled/index.d.ts +0 -1
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/higher-order/with-fallback-styles/index.d.ts +1 -35
- package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
- package/build-types/higher-order/with-fallback-styles/test/index.d.ts.map +1 -0
- package/build-types/icon/stories/index.story.d.ts +0 -1
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu/types.d.ts +2 -2
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts +0 -2
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +0 -2
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts +15 -0
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/spinner/styles.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +0 -1
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/types.d.ts +2 -1
- package/build-types/text-control/types.d.ts.map +1 -1
- package/build-types/tools-panel/styles.d.ts.map +1 -1
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/build-types/utils/dropdown-motion.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/combobox-control.d.ts +2 -2
- package/build-types/validated-form-controls/components/text-control.d.ts +2 -2
- package/build-types/validated-form-controls/components/text-control.d.ts.map +1 -1
- package/package.json +34 -28
- package/src/angle-picker-control/angle-circle.tsx +3 -3
- package/src/base-control/README.md +2 -2
- package/src/base-control/styles/base-control-styles.ts +1 -0
- package/src/border-control/styles.ts +1 -0
- package/src/box-control/README.md +1 -13
- package/src/box-control/{input-control.tsx → box-input-control.tsx} +4 -4
- package/src/box-control/index.tsx +5 -23
- package/src/box-control/stories/index.story.tsx +1 -3
- package/src/box-control/test/index.tsx +15 -2
- package/src/box-control/types.ts +7 -6
- package/src/button/index.tsx +2 -4
- package/src/button/style.scss +3 -3
- package/src/card/card-divider/hook.ts +5 -1
- package/src/card/test/__snapshots__/index.tsx.snap +7 -9
- package/src/checkbox-control/test/__snapshots__/index.tsx.snap +4 -3
- package/src/composite/stories/index.story.tsx +5 -0
- package/src/confirm-dialog/stories/index.story.tsx +1 -0
- package/src/custom-select-control/test/index.tsx +1 -1
- package/src/disabled/README.md +0 -1
- package/src/disabled/index.tsx +0 -1
- package/src/disabled/stories/index.story.tsx +0 -1
- package/src/divider/component.tsx +27 -3
- package/src/divider/style.module.scss +21 -0
- package/src/divider/test/index.tsx +21 -11
- package/src/dropdown/stories/index.story.tsx +5 -0
- package/src/dropdown-menu/style.scss +1 -1
- package/src/external-link/style.scss +4 -4
- package/src/form-toggle/style.scss +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +4 -4
- package/src/higher-order/with-constrained-tabbing/README.md +0 -2
- package/src/higher-order/with-fallback-styles/index.tsx +31 -61
- package/src/higher-order/with-fallback-styles/test/index.tsx +47 -0
- package/src/higher-order/with-focus-return/README.md +0 -2
- package/src/icon/stories/index.story.tsx +0 -15
- package/src/menu/README.md +2 -2
- package/src/menu/styles.ts +2 -0
- package/src/menu/test/index.tsx +104 -87
- package/src/menu/types.ts +2 -2
- package/src/menu-item/test/__snapshots__/index.js.snap +2 -0
- package/src/modal/style.scss +1 -1
- package/src/modal/test/index.tsx +0 -24
- package/src/modal/use-modal-exit-animation.ts +2 -2
- package/src/navigable-container/test/navigable-menu.tsx +0 -16
- package/src/navigable-container/test/tababble-container.tsx +0 -16
- package/src/navigator/test/index.tsx +0 -24
- package/src/notice/style.scss +11 -13
- package/src/notice/test/__snapshots__/index.tsx.snap +1 -0
- package/src/panel/README.md +2 -0
- package/src/panel/stories/index.story.tsx +2 -2
- package/src/panel/style.scss +1 -1
- package/src/placeholder/stories/index.story.tsx +0 -1
- package/src/radio-control/style.scss +1 -1
- package/src/resizable-box/index.tsx +1 -2
- package/src/sandbox/index.tsx +18 -1
- package/src/sandbox/test/index.tsx +44 -1
- package/src/spinner/styles.ts +1 -0
- package/src/tab-panel/style.scss +6 -6
- package/src/tab-panel/test/index.tsx +0 -17
- package/src/tabs/index.tsx +1 -26
- package/src/tabs/tablist.tsx +5 -21
- package/src/tabs/test/index.tsx +16 -44
- package/src/text/test/__snapshots__/index.tsx.snap +3 -3
- package/src/text-control/README.md +0 -9
- package/src/text-control/index.tsx +3 -14
- package/src/text-control/stories/index.story.tsx +0 -2
- package/src/text-control/style.scss +7 -11
- package/src/text-control/test/text-control.tsx +1 -5
- package/src/text-control/types.ts +2 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +38 -26
- package/src/toolbar/toolbar-group/style.scss +2 -2
- package/src/tools-panel/styles.ts +1 -1
- package/src/tools-panel/tools-panel/README.md +0 -2
- package/src/tooltip/stories/index.story.tsx +2 -2
- package/src/tree-grid/test/index.tsx +0 -23
- package/src/utils/colors-values.js +36 -16
- package/src/utils/config-values.js +2 -2
- package/src/utils/dropdown-motion.ts +6 -4
- package/src/utils/theme-variables.scss +18 -13
- package/src/validated-form-controls/components/text-control.tsx +2 -10
- package/build/box-control/input-control.cjs.map +0 -7
- package/build/divider/styles.cjs +0 -98
- package/build/divider/styles.cjs.map +0 -7
- package/build-module/box-control/input-control.mjs.map +0 -7
- package/build-module/divider/styles.mjs +0 -63
- package/build-module/divider/styles.mjs.map +0 -7
- package/build-types/box-control/input-control.d.ts +0 -3
- package/build-types/box-control/input-control.d.ts.map +0 -1
- 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 +0 -23
- package/build-types/date-time/date/index.d.ts.map +0 -1
- package/build-types/date-time/date/styles.d.ts +0 -45
- 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 +0 -2
- 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 +0 -169
- package/build-types/date-time/date/use-lilius/index.d.ts.map +0 -1
- package/build-types/date-time/time/index.d.ts +0 -27
- package/build-types/date-time/time/index.d.ts.map +0 -1
- package/build-types/date-time/time/styles.d.ts +0 -93
- package/build-types/date-time/time/styles.d.ts.map +0 -1
- package/build-types/date-time/time/test/index.d.ts +0 -2
- package/build-types/date-time/time/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/time-input/index.d.ts +0 -4
- 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 +0 -2
- package/build-types/date-time/time/time-input/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/timezone.d.ts +0 -7
- package/build-types/date-time/time/timezone.d.ts.map +0 -1
- package/build-types/divider/styles.d.ts +0 -10
- package/build-types/divider/styles.d.ts.map +0 -1
- package/build-types/mobile/image/constants.d.ts +0 -5
- package/build-types/mobile/image/constants.d.ts.map +0 -1
- package/build-types/navigation/back-button/index.d.ts +0 -7
- package/build-types/navigation/back-button/index.d.ts.map +0 -1
- package/build-types/navigation/constants.d.ts +0 -3
- package/build-types/navigation/constants.d.ts.map +0 -1
- package/build-types/navigation/context.d.ts +0 -4
- package/build-types/navigation/context.d.ts.map +0 -1
- package/build-types/navigation/group/context.d.ts +0 -7
- package/build-types/navigation/group/context.d.ts.map +0 -1
- package/build-types/navigation/group/index.d.ts +0 -7
- package/build-types/navigation/group/index.d.ts.map +0 -1
- package/build-types/navigation/index.d.ts +0 -46
- package/build-types/navigation/index.d.ts.map +0 -1
- package/build-types/navigation/item/base-content.d.ts +0 -3
- package/build-types/navigation/item/base-content.d.ts.map +0 -1
- package/build-types/navigation/item/base.d.ts +0 -3
- package/build-types/navigation/item/base.d.ts.map +0 -1
- package/build-types/navigation/item/index.d.ts +0 -7
- package/build-types/navigation/item/index.d.ts.map +0 -1
- package/build-types/navigation/item/use-navigation-tree-item.d.ts +0 -3
- package/build-types/navigation/item/use-navigation-tree-item.d.ts.map +0 -1
- package/build-types/navigation/menu/context.d.ts +0 -7
- package/build-types/navigation/menu/context.d.ts.map +0 -1
- package/build-types/navigation/menu/index.d.ts +0 -7
- package/build-types/navigation/menu/index.d.ts.map +0 -1
- package/build-types/navigation/menu/menu-title-search.d.ts +0 -3
- package/build-types/navigation/menu/menu-title-search.d.ts.map +0 -1
- package/build-types/navigation/menu/menu-title.d.ts +0 -3
- package/build-types/navigation/menu/menu-title.d.ts.map +0 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts +0 -3
- package/build-types/navigation/menu/search-no-results-found.d.ts.map +0 -1
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts +0 -3
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts.map +0 -1
- package/build-types/navigation/stories/index.story.d.ts +0 -23
- package/build-types/navigation/stories/index.story.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts +0 -7
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/default.d.ts +0 -10
- package/build-types/navigation/stories/utils/default.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/group.d.ts +0 -10
- package/build-types/navigation/stories/utils/group.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +0 -10
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts +0 -10
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/search.d.ts +0 -10
- package/build-types/navigation/stories/utils/search.d.ts.map +0 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +0 -55
- package/build-types/navigation/styles/navigation-styles.d.ts.map +0 -1
- package/build-types/navigation/test/index.d.ts +0 -2
- package/build-types/navigation/test/index.d.ts.map +0 -1
- package/build-types/navigation/types.d.ts +0 -266
- package/build-types/navigation/types.d.ts.map +0 -1
- package/build-types/navigation/use-create-navigation-tree.d.ts +0 -15
- package/build-types/navigation/use-create-navigation-tree.d.ts.map +0 -1
- package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -10
- package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +0 -1
- package/build-types/navigation/utils.d.ts +0 -3
- package/build-types/navigation/utils.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/divider/styles.ts +0 -81
- package/src/divider/test/__snapshots__/index.tsx.snap +0 -71
- /package/build-types/{date-time/date → higher-order/with-fallback-styles}/test/index.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors-values.d.ts","sourceRoot":"","sources":["../../src/utils/colors-values.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"colors-values.d.ts","sourceRoot":"","sources":["../../src/utils/colors-values.js"],"names":[],"mappings":"AA0FA,eAAO,MAAM,MAAM;IAClB;;;;OAIG;;;;QA1EH,+CAA+C;;QAE/C,yDAAyD;;;QAGzD,6BAA6B;;QAE7B,wCAAwC;;QAExC,uCAAuC;;;IAmEvC;;OAEG;;;;;;;IAGH;;;;OAIG;;;;;QAtDH,kDAAkD;;;;QAMlD,sDAAsD;;;YAIrD,yDAAyD;YACzD,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;;;IAsCJ;;OAEG;;;;;;;;;;;;EAED,CAAC;eAEW,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-motion.d.ts","sourceRoot":"","sources":["../../src/utils/dropdown-motion.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;;QAI1B,QAAQ;QACR,IAAI;;;;QAIJ,QAAQ;;EAEP,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown-motion.d.ts","sourceRoot":"","sources":["../../src/utils/dropdown-motion.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;;QAI1B,QAAQ;QACR,IAAI;;;;QAIJ,QAAQ;;EAEP,CAAC;AAiBJ,eAAO,MAAM,mBAAmB;;;;;;EAM7B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { ValidatedControlProps } from './types';
|
|
|
2
2
|
export declare const ValidatedComboboxControl: import("react").ForwardRefExoticComponent<Omit<Pick<import("../../base-control/types").BaseControlProps, "__nextHasNoMarginBottom" | "className" | "help" | "hideLabelFromVision" | "label"> & {
|
|
3
3
|
__experimentalRenderItem?: (args: {
|
|
4
4
|
item: import("../../combobox-control/types").ComboboxControlOption;
|
|
5
|
-
}) =>
|
|
5
|
+
}) => React.ReactNode;
|
|
6
6
|
__next36pxDefaultSize?: boolean;
|
|
7
7
|
__next40pxDefaultSize?: boolean;
|
|
8
8
|
allowReset?: boolean;
|
|
@@ -10,7 +10,7 @@ export declare const ValidatedComboboxControl: import("react").ForwardRefExoticC
|
|
|
10
10
|
messages?: {
|
|
11
11
|
selected: string;
|
|
12
12
|
};
|
|
13
|
-
onChange?: (value:
|
|
13
|
+
onChange?: (value: import("../../combobox-control/types").ComboboxControlProps['value']) => void;
|
|
14
14
|
onFilterValueChange?: (value: string) => void;
|
|
15
15
|
options: import("../../combobox-control/types").ComboboxControlOption[];
|
|
16
16
|
value?: string | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ValidatedControlProps } from './types';
|
|
2
|
-
export declare const ValidatedTextControl: import("react").ForwardRefExoticComponent<Omit<
|
|
2
|
+
export declare const ValidatedTextControl: import("react").ForwardRefExoticComponent<Omit<Pick<import("../../base-control/types").BaseControlProps, "__nextHasNoMarginBottom" | "className" | "help" | "hideLabelFromVision" | "label"> & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
value: string | number;
|
|
5
5
|
type?: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'search' | 'url';
|
|
6
6
|
__next40pxDefaultSize?: boolean;
|
|
7
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "as" | "children" | "className" | "help" | "hideLabelFromVision" | "label" | "onChange" | "type" | "value"> & import("react").RefAttributes<HTMLInputElement
|
|
7
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "as" | "children" | "className" | "help" | "hideLabelFromVision" | "label" | "onChange" | "type" | "value"> & import("react").RefAttributes<HTMLInputElement> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
8
|
//# sourceMappingURL=text-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/text-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"text-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/text-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA2BrD,eAAO,MAAM,oBAAoB;;;;;waAEhC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.0.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"src/**/*.scss"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@ariakit/react": "^0.4.
|
|
53
|
+
"@ariakit/react": "^0.4.29",
|
|
54
54
|
"@date-fns/utc": "^2.1.1",
|
|
55
55
|
"@emotion/cache": "^11.14.0",
|
|
56
56
|
"@emotion/css": "^11.13.5",
|
|
@@ -61,28 +61,27 @@
|
|
|
61
61
|
"@floating-ui/react-dom": "^2.0.8",
|
|
62
62
|
"@types/gradient-parser": "^1.1.0",
|
|
63
63
|
"@types/highlight-words-core": "^1.2.1",
|
|
64
|
-
"@types/react": "^18.3.27",
|
|
65
64
|
"@use-gesture/react": "^10.3.1",
|
|
66
|
-
"@wordpress/a11y": "^4.
|
|
67
|
-
"@wordpress/base-styles": "^10.0
|
|
68
|
-
"@wordpress/compose": "^8.
|
|
69
|
-
"@wordpress/date": "^5.
|
|
70
|
-
"@wordpress/deprecated": "^4.
|
|
71
|
-
"@wordpress/dom": "^4.
|
|
72
|
-
"@wordpress/element": "^8.0
|
|
73
|
-
"@wordpress/escape-html": "^3.
|
|
74
|
-
"@wordpress/hooks": "^4.
|
|
75
|
-
"@wordpress/html-entities": "^4.
|
|
76
|
-
"@wordpress/i18n": "^6.
|
|
77
|
-
"@wordpress/icons": "^
|
|
78
|
-
"@wordpress/is-shallow-equal": "^5.
|
|
79
|
-
"@wordpress/keycodes": "^4.
|
|
80
|
-
"@wordpress/primitives": "^4.
|
|
81
|
-
"@wordpress/private-apis": "^1.
|
|
82
|
-
"@wordpress/rich-text": "^7.
|
|
83
|
-
"@wordpress/style-runtime": "^0.
|
|
84
|
-
"@wordpress/ui": "^0.
|
|
85
|
-
"@wordpress/warning": "^3.
|
|
65
|
+
"@wordpress/a11y": "^4.49.0",
|
|
66
|
+
"@wordpress/base-styles": "^10.1.0",
|
|
67
|
+
"@wordpress/compose": "^8.2.0",
|
|
68
|
+
"@wordpress/date": "^5.49.0",
|
|
69
|
+
"@wordpress/deprecated": "^4.49.0",
|
|
70
|
+
"@wordpress/dom": "^4.49.0",
|
|
71
|
+
"@wordpress/element": "^8.1.0",
|
|
72
|
+
"@wordpress/escape-html": "^3.49.0",
|
|
73
|
+
"@wordpress/hooks": "^4.49.0",
|
|
74
|
+
"@wordpress/html-entities": "^4.49.0",
|
|
75
|
+
"@wordpress/i18n": "^6.22.0",
|
|
76
|
+
"@wordpress/icons": "^15.0.0",
|
|
77
|
+
"@wordpress/is-shallow-equal": "^5.49.0",
|
|
78
|
+
"@wordpress/keycodes": "^4.49.0",
|
|
79
|
+
"@wordpress/primitives": "^4.49.0",
|
|
80
|
+
"@wordpress/private-apis": "^1.49.0",
|
|
81
|
+
"@wordpress/rich-text": "^7.49.0",
|
|
82
|
+
"@wordpress/style-runtime": "^0.5.0",
|
|
83
|
+
"@wordpress/ui": "^0.16.0",
|
|
84
|
+
"@wordpress/warning": "^3.49.0",
|
|
86
85
|
"change-case": "^4.1.2",
|
|
87
86
|
"clsx": "^2.1.1",
|
|
88
87
|
"colord": "^2.9.3",
|
|
@@ -104,25 +103,32 @@
|
|
|
104
103
|
},
|
|
105
104
|
"devDependencies": {
|
|
106
105
|
"@ariakit/test": "^0.4.13",
|
|
107
|
-
"@storybook/addon-docs": "^10.
|
|
108
|
-
"@storybook/react-vite": "^10.
|
|
106
|
+
"@storybook/addon-docs": "^10.4.3",
|
|
107
|
+
"@storybook/react-vite": "^10.4.3",
|
|
109
108
|
"@testing-library/dom": "^10.4.1",
|
|
110
109
|
"@testing-library/jest-dom": "^6.9.1",
|
|
111
110
|
"@testing-library/react": "^16.3.2",
|
|
112
111
|
"@testing-library/user-event": "^14.6.1",
|
|
113
112
|
"@types/jest": "^29.5.14",
|
|
114
113
|
"@types/react-dom": "^18.3.1",
|
|
115
|
-
"@wordpress/jest-console": "^8.
|
|
114
|
+
"@wordpress/jest-console": "^8.49.0",
|
|
115
|
+
"@wordpress/stylelint-tools": "file:../../tools/stylelint",
|
|
116
116
|
"snapshot-diff": "^0.10.0",
|
|
117
|
-
"storybook": "^10.
|
|
117
|
+
"storybook": "^10.4.3",
|
|
118
118
|
"timezone-mock": "^1.3.6"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
|
+
"@types/react": "^18.3.27",
|
|
121
122
|
"react": "^18.0.0",
|
|
122
123
|
"react-dom": "^18.0.0"
|
|
123
124
|
},
|
|
125
|
+
"peerDependenciesMeta": {
|
|
126
|
+
"@types/react": {
|
|
127
|
+
"optional": true
|
|
128
|
+
}
|
|
129
|
+
},
|
|
124
130
|
"publishConfig": {
|
|
125
131
|
"access": "public"
|
|
126
132
|
},
|
|
127
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "0e7112a4f4fde4ea15bd9060489b8f6fe11eb6ca"
|
|
128
134
|
}
|
|
@@ -19,9 +19,9 @@ import type { AngleCircleProps } from './types';
|
|
|
19
19
|
|
|
20
20
|
type UseDraggingArgumentType = Parameters< typeof useDragging >[ 0 ];
|
|
21
21
|
type UseDraggingCallbackEvent =
|
|
22
|
-
| Parameters< UseDraggingArgumentType[ 'onDragStart' ] >[ 0 ]
|
|
23
|
-
| Parameters< UseDraggingArgumentType[ 'onDragMove' ] >[ 0 ]
|
|
24
|
-
| Parameters< UseDraggingArgumentType[ 'onDragEnd' ] >[ 0 ];
|
|
22
|
+
| Parameters< NonNullable< UseDraggingArgumentType[ 'onDragStart' ] > >[ 0 ]
|
|
23
|
+
| Parameters< NonNullable< UseDraggingArgumentType[ 'onDragMove' ] > >[ 0 ]
|
|
24
|
+
| Parameters< NonNullable< UseDraggingArgumentType[ 'onDragEnd' ] > >[ 0 ];
|
|
25
25
|
|
|
26
26
|
function AngleCircle( {
|
|
27
27
|
value,
|
|
@@ -30,7 +30,7 @@ const MyCustomTextareaControl = ({ children, ...baseProps }) => (
|
|
|
30
30
|
|
|
31
31
|
### `as`
|
|
32
32
|
|
|
33
|
-
- Type: `"symbol" | "object" | "
|
|
33
|
+
- Type: `"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | ... 516 more ... | ("view" & FunctionComponent<...>)`
|
|
34
34
|
- Required: No
|
|
35
35
|
|
|
36
36
|
The HTML element or React component to render the component as.
|
|
@@ -107,7 +107,7 @@ const MyBaseControl = () => (
|
|
|
107
107
|
|
|
108
108
|
##### `as`
|
|
109
109
|
|
|
110
|
-
- Type: `"symbol" | "object" | "
|
|
110
|
+
- Type: `"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | ...`
|
|
111
111
|
- Required: No
|
|
112
112
|
|
|
113
113
|
The HTML element or React component to render the component as.
|
|
@@ -84,6 +84,7 @@ export const colorIndicatorBorder = ( border?: Border ) => {
|
|
|
84
84
|
const { color, style } = border || {};
|
|
85
85
|
|
|
86
86
|
const fallbackColor =
|
|
87
|
+
// TODO: should use the `stroke-interactive-neutral` WPDS token when refactored to SCSS modules
|
|
87
88
|
!! style && style !== 'none' ? COLORS.gray[ 300 ] : undefined;
|
|
88
89
|
|
|
89
90
|
return css`
|
|
@@ -20,25 +20,13 @@ function Example() {
|
|
|
20
20
|
} );
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
|
-
<BoxControl
|
|
24
|
-
__next40pxDefaultSize
|
|
25
|
-
values={ values }
|
|
26
|
-
onChange={ setValues }
|
|
27
|
-
/>
|
|
23
|
+
<BoxControl values={ values } onChange={ setValues } />
|
|
28
24
|
);
|
|
29
25
|
};
|
|
30
26
|
```
|
|
31
27
|
|
|
32
28
|
## Props
|
|
33
29
|
|
|
34
|
-
### `__next40pxDefaultSize`
|
|
35
|
-
|
|
36
|
-
- Type: `boolean`
|
|
37
|
-
- Required: No
|
|
38
|
-
- Default: `false`
|
|
39
|
-
|
|
40
|
-
Start opting into the larger default height that will become the default size in a future version.
|
|
41
|
-
|
|
42
30
|
### `allowReset`
|
|
43
31
|
|
|
44
32
|
- Type: `boolean`
|
|
@@ -76,7 +76,6 @@ function getSidesToModify(
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export default function BoxInputControl( {
|
|
79
|
-
__next40pxDefaultSize,
|
|
80
79
|
onChange = noop,
|
|
81
80
|
onFocus = noop,
|
|
82
81
|
values,
|
|
@@ -87,6 +86,7 @@ export default function BoxInputControl( {
|
|
|
87
86
|
min = 0,
|
|
88
87
|
presets,
|
|
89
88
|
presetKey,
|
|
89
|
+
placeholder: placeholderProp,
|
|
90
90
|
...props
|
|
91
91
|
}: BoxControlInputControlProps ) {
|
|
92
92
|
const defaultValuesToModify = getSidesToModify( side, sides );
|
|
@@ -207,7 +207,7 @@ export default function BoxInputControl( {
|
|
|
207
207
|
{ ...props }
|
|
208
208
|
min={ min }
|
|
209
209
|
__shouldNotWarnDeprecated36pxSize
|
|
210
|
-
__next40pxDefaultSize
|
|
210
|
+
__next40pxDefaultSize
|
|
211
211
|
className="component-box-control__unit-control"
|
|
212
212
|
id={ inputId }
|
|
213
213
|
isPressEnterToChange
|
|
@@ -217,13 +217,13 @@ export default function BoxInputControl( {
|
|
|
217
217
|
onUnitChange={ handleOnUnitChange }
|
|
218
218
|
onFocus={ handleOnFocus }
|
|
219
219
|
label={ LABELS[ side ] }
|
|
220
|
-
placeholder={ mixedPlaceholder }
|
|
220
|
+
placeholder={ mixedPlaceholder ?? placeholderProp }
|
|
221
221
|
hideLabelFromVision
|
|
222
222
|
/>
|
|
223
223
|
</Tooltip>
|
|
224
224
|
|
|
225
225
|
<FlexedRangeControl
|
|
226
|
-
__next40pxDefaultSize
|
|
226
|
+
__next40pxDefaultSize
|
|
227
227
|
__shouldNotWarnDeprecated36pxSize
|
|
228
228
|
aria-controls={ inputId }
|
|
229
229
|
label={ LABELS[ side ] }
|
|
@@ -10,7 +10,7 @@ import warning from '@wordpress/warning';
|
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
12
|
import { BaseControl } from '../base-control';
|
|
13
|
-
import
|
|
13
|
+
import BoxInputControl from './box-input-control';
|
|
14
14
|
import LinkedButton from './linked-button';
|
|
15
15
|
import { Grid } from '../grid';
|
|
16
16
|
import {
|
|
@@ -27,7 +27,6 @@ import {
|
|
|
27
27
|
} from './utils';
|
|
28
28
|
import { useControlledState } from '../utils/hooks';
|
|
29
29
|
import type { BoxControlProps, BoxControlValue } from './types';
|
|
30
|
-
import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
|
|
31
30
|
|
|
32
31
|
const defaultInputProps = {
|
|
33
32
|
min: 0,
|
|
@@ -58,17 +57,12 @@ function useUniqueId( idProp?: string ) {
|
|
|
58
57
|
* } );
|
|
59
58
|
*
|
|
60
59
|
* return (
|
|
61
|
-
* <BoxControl
|
|
62
|
-
* __next40pxDefaultSize
|
|
63
|
-
* values={ values }
|
|
64
|
-
* onChange={ setValues }
|
|
65
|
-
* />
|
|
60
|
+
* <BoxControl values={ values } onChange={ setValues } />
|
|
66
61
|
* );
|
|
67
62
|
* };
|
|
68
63
|
* ```
|
|
69
64
|
*/
|
|
70
65
|
function BoxControl( {
|
|
71
|
-
__next40pxDefaultSize = false,
|
|
72
66
|
id: idProp,
|
|
73
67
|
inputProps = defaultInputProps,
|
|
74
68
|
onChange = noop,
|
|
@@ -137,16 +131,10 @@ function BoxControl( {
|
|
|
137
131
|
setSelectedUnits,
|
|
138
132
|
sides,
|
|
139
133
|
values: inputValues,
|
|
140
|
-
__next40pxDefaultSize,
|
|
141
134
|
presets,
|
|
142
135
|
presetKey,
|
|
143
136
|
};
|
|
144
137
|
|
|
145
|
-
maybeWarnDeprecated36pxSize( {
|
|
146
|
-
componentName: 'BoxControl',
|
|
147
|
-
__next40pxDefaultSize,
|
|
148
|
-
size: undefined,
|
|
149
|
-
} );
|
|
150
138
|
const sidesToRender = getAllowedSides( sides );
|
|
151
139
|
|
|
152
140
|
if ( ( presets && ! presetKey ) || ( ! presets && presetKey ) ) {
|
|
@@ -170,9 +158,7 @@ function BoxControl( {
|
|
|
170
158
|
</BaseControl.VisualLabel>
|
|
171
159
|
{ isLinked && (
|
|
172
160
|
<InputWrapper>
|
|
173
|
-
|
|
174
|
-
{ /* eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop */ }
|
|
175
|
-
<InputControl side="all" { ...inputControlProps } />
|
|
161
|
+
<BoxInputControl side="all" { ...inputControlProps } />
|
|
176
162
|
</InputWrapper>
|
|
177
163
|
) }
|
|
178
164
|
{ ! hasOneSide && (
|
|
@@ -187,9 +173,7 @@ function BoxControl( {
|
|
|
187
173
|
{ ! isLinked &&
|
|
188
174
|
splitOnAxis &&
|
|
189
175
|
[ 'vertical', 'horizontal' ].map( ( axis ) => (
|
|
190
|
-
|
|
191
|
-
// eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
|
|
192
|
-
<InputControl
|
|
176
|
+
<BoxInputControl
|
|
193
177
|
key={ axis }
|
|
194
178
|
side={ axis as 'horizontal' | 'vertical' }
|
|
195
179
|
{ ...inputControlProps }
|
|
@@ -198,9 +182,7 @@ function BoxControl( {
|
|
|
198
182
|
{ ! isLinked &&
|
|
199
183
|
! splitOnAxis &&
|
|
200
184
|
Array.from( sidesToRender ).map( ( axis ) => (
|
|
201
|
-
|
|
202
|
-
// eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
|
|
203
|
-
<InputControl
|
|
185
|
+
<BoxInputControl
|
|
204
186
|
key={ axis }
|
|
205
187
|
side={ axis }
|
|
206
188
|
{ ...inputControlProps }
|
|
@@ -36,7 +36,7 @@ const meta: Meta< typeof BoxControl > = {
|
|
|
36
36
|
export default meta;
|
|
37
37
|
|
|
38
38
|
const TemplateUncontrolled: StoryFn< typeof BoxControl > = ( props ) => {
|
|
39
|
-
return <BoxControl
|
|
39
|
+
return <BoxControl { ...props } />;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
const TemplateControlled: StoryFn< typeof BoxControl > = ( props ) => {
|
|
@@ -44,7 +44,6 @@ const TemplateControlled: StoryFn< typeof BoxControl > = ( props ) => {
|
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<BoxControl
|
|
47
|
-
__next40pxDefaultSize
|
|
48
47
|
values={ values }
|
|
49
48
|
{ ...props }
|
|
50
49
|
onChange={ ( nextValue ) => {
|
|
@@ -58,7 +57,6 @@ const TemplateControlled: StoryFn< typeof BoxControl > = ( props ) => {
|
|
|
58
57
|
export const Default = TemplateUncontrolled.bind( {} );
|
|
59
58
|
Default.args = {
|
|
60
59
|
label: 'Label',
|
|
61
|
-
__next40pxDefaultSize: true,
|
|
62
60
|
};
|
|
63
61
|
|
|
64
62
|
export const Controlled = TemplateControlled.bind( {} );
|
|
@@ -29,7 +29,6 @@ const ControlledBoxControl = (
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<BoxControl
|
|
32
|
-
__next40pxDefaultSize
|
|
33
32
|
values={ state }
|
|
34
33
|
onChange={ ( next ) => setState( next ) }
|
|
35
34
|
{ ...extraProps }
|
|
@@ -42,7 +41,7 @@ const UncontrolledBoxControl = ( {
|
|
|
42
41
|
...props
|
|
43
42
|
}: DistributiveOmit< BoxControlProps, 'onChange' > & {
|
|
44
43
|
onChange?: BoxControlProps[ 'onChange' ];
|
|
45
|
-
} ) => <BoxControl
|
|
44
|
+
} ) => <BoxControl onChange={ onChange } { ...props } />;
|
|
46
45
|
|
|
47
46
|
describe( 'BoxControl', () => {
|
|
48
47
|
describe( 'Basic rendering', () => {
|
|
@@ -474,4 +473,18 @@ describe( 'BoxControl', () => {
|
|
|
474
473
|
} );
|
|
475
474
|
} );
|
|
476
475
|
} );
|
|
476
|
+
|
|
477
|
+
describe( 'Placeholder', () => {
|
|
478
|
+
it( 'applies a consumer-supplied placeholder passed via inputProps', () => {
|
|
479
|
+
render(
|
|
480
|
+
<UncontrolledBoxControl
|
|
481
|
+
inputProps={ { placeholder: 'Inherited' } }
|
|
482
|
+
/>
|
|
483
|
+
);
|
|
484
|
+
|
|
485
|
+
expect(
|
|
486
|
+
screen.getByRole( 'textbox', { name: 'All sides' } )
|
|
487
|
+
).toHaveAttribute( 'placeholder', 'Inherited' );
|
|
488
|
+
} );
|
|
489
|
+
} );
|
|
477
490
|
} );
|
package/src/box-control/types.ts
CHANGED
|
@@ -27,6 +27,13 @@ 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;
|
|
30
37
|
/**
|
|
31
38
|
* @deprecated Pass to the `inputProps` prop instead.
|
|
32
39
|
* @ignore
|
|
@@ -94,12 +101,6 @@ export type BoxControlProps = Pick< UnitControlProps, 'units' > &
|
|
|
94
101
|
* The current values of the control, expressed as an object of `top`, `right`, `bottom`, and `left` values.
|
|
95
102
|
*/
|
|
96
103
|
values?: BoxControlValue;
|
|
97
|
-
/**
|
|
98
|
-
* Start opting into the larger default height that will become the default size in a future version.
|
|
99
|
-
*
|
|
100
|
-
* @default false
|
|
101
|
-
*/
|
|
102
|
-
__next40pxDefaultSize?: boolean;
|
|
103
104
|
} & (
|
|
104
105
|
| {
|
|
105
106
|
/**
|
package/src/button/index.tsx
CHANGED
|
@@ -104,7 +104,7 @@ function useDeprecatedProps( {
|
|
|
104
104
|
* );
|
|
105
105
|
* ```
|
|
106
106
|
*/
|
|
107
|
-
export function UnforwardedButton(
|
|
107
|
+
export const Button = forwardRef( function UnforwardedButton(
|
|
108
108
|
props: ButtonProps & DeprecatedButtonProps,
|
|
109
109
|
ref: ForwardedRef< any >
|
|
110
110
|
) {
|
|
@@ -301,8 +301,6 @@ export function UnforwardedButton(
|
|
|
301
301
|
) }
|
|
302
302
|
</>
|
|
303
303
|
);
|
|
304
|
-
}
|
|
304
|
+
} );
|
|
305
305
|
|
|
306
|
-
export const Button = forwardRef( UnforwardedButton );
|
|
307
|
-
Button.displayName = 'Button';
|
|
308
306
|
export default Button;
|
package/src/button/style.scss
CHANGED
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
&:disabled:not(:focus),
|
|
154
154
|
&[aria-disabled="true"]:not(:focus),
|
|
155
155
|
&[aria-disabled="true"]:hover:not(:focus) {
|
|
156
|
-
box-shadow: inset 0 0 0 $border-width
|
|
156
|
+
box-shadow: inset 0 0 0 $border-width var(--wpds-color-stroke-interactive-neutral-disabled);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
&:focus:not(:active) {
|
|
@@ -321,14 +321,14 @@
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
&.is-small {
|
|
324
|
-
height:
|
|
324
|
+
height: var(--wpds-dimension-size-sm);
|
|
325
325
|
line-height: 22px;
|
|
326
326
|
padding: 0 8px;
|
|
327
327
|
font-size: 11px;
|
|
328
328
|
|
|
329
329
|
&.has-icon:not(.has-text) {
|
|
330
330
|
padding: 0;
|
|
331
|
-
min-width:
|
|
331
|
+
min-width: var(--wpds-dimension-size-sm);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
|
|
@@ -12,9 +12,13 @@ import * as styles from '../styles';
|
|
|
12
12
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
13
13
|
import type { DividerProps } from '../../divider';
|
|
14
14
|
|
|
15
|
+
/*
|
|
16
|
+
* The explicit return type keeps the emitted declaration from inlining the inferred type,
|
|
17
|
+
* which references `WrapElement` from @ariakit/react-utils
|
|
18
|
+
*/
|
|
15
19
|
export function useCardDivider(
|
|
16
20
|
props: WordPressComponentProps< DividerProps, 'hr', false >
|
|
17
|
-
) {
|
|
21
|
+
): WordPressComponentProps< DividerProps, 'hr', false > {
|
|
18
22
|
const { className, ...otherProps } = useContextSystem(
|
|
19
23
|
props,
|
|
20
24
|
'CardDivider'
|
|
@@ -26,7 +26,7 @@ Snapshot Diff:
|
|
|
26
26
|
<div>
|
|
27
27
|
<div
|
|
28
28
|
- class="components-card__body components-card-body css-1gg1viu-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
|
|
29
|
-
+ class="components-card__body components-card-body css-
|
|
29
|
+
+ class="components-card__body components-card-body css-1jxruy0-PolymorphicDiv-Body-borderRadius-medium-shady e19lxcc00"
|
|
30
30
|
data-wp-c16t="true"
|
|
31
31
|
data-wp-component="CardBody"
|
|
32
32
|
>
|
|
@@ -43,7 +43,7 @@ Snapshot Diff:
|
|
|
43
43
|
<div>
|
|
44
44
|
<div
|
|
45
45
|
- class="components-flex components-card__footer components-card-footer css-1s5uzde-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
|
|
46
|
-
+ class="components-flex components-card__footer components-card-footer css-
|
|
46
|
+
+ class="components-flex components-card__footer components-card-footer css-1nz7z3h-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium-shady e19lxcc00"
|
|
47
47
|
data-wp-c16t="true"
|
|
48
48
|
data-wp-component="CardFooter"
|
|
49
49
|
>
|
|
@@ -77,7 +77,7 @@ Snapshot Diff:
|
|
|
77
77
|
<div>
|
|
78
78
|
<div
|
|
79
79
|
- class="components-flex components-card__header components-card-header css-1hlwlpa-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium e19lxcc00"
|
|
80
|
-
+ class="components-flex components-card__header components-card-header css-
|
|
80
|
+
+ class="components-flex components-card__header components-card-header css-zom6gv-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium-shady e19lxcc00"
|
|
81
81
|
data-wp-c16t="true"
|
|
82
82
|
data-wp-component="CardHeader"
|
|
83
83
|
>
|
|
@@ -281,14 +281,12 @@ exports[`Card Card component should render correctly 1`] = `
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
.emotion-10 {
|
|
284
|
-
border: 0;
|
|
285
|
-
margin: 0;
|
|
286
|
-
border-bottom: 1px solid currentColor;
|
|
287
|
-
height: 0;
|
|
288
|
-
width: auto;
|
|
289
284
|
box-sizing: border-box;
|
|
290
285
|
display: block;
|
|
291
286
|
width: 100%;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.emotion-11 {
|
|
292
290
|
border-color: rgba(0, 0, 0, 0.1);
|
|
293
291
|
}
|
|
294
292
|
|
|
@@ -412,7 +410,7 @@ exports[`Card Card component should render correctly 1`] = `
|
|
|
412
410
|
</div>
|
|
413
411
|
<hr
|
|
414
412
|
aria-orientation="horizontal"
|
|
415
|
-
class="components-divider components-card__divider components-card-divider
|
|
413
|
+
class="components-divider emotion-10 emotion-11 components-card__divider components-card-divider"
|
|
416
414
|
data-wp-c16t="true"
|
|
417
415
|
data-wp-component="CardDivider"
|
|
418
416
|
role="separator"
|
|
@@ -5,7 +5,7 @@ Snapshot Diff:
|
|
|
5
5
|
- First value
|
|
6
6
|
+ Second value
|
|
7
7
|
|
|
8
|
-
@@ -13,14 +13,
|
|
8
|
+
@@ -13,14 +13,29 @@
|
|
9
9
|
<span
|
|
10
10
|
class="components-checkbox-control__input-container"
|
|
11
11
|
>
|
|
@@ -15,10 +15,11 @@ Snapshot Diff:
|
|
|
15
15
|
+ id="inspector-checkbox-control-7"
|
|
16
16
|
type="checkbox"
|
|
17
17
|
value="1"
|
|
18
|
-
|
|
18
|
+
/>
|
|
19
19
|
+ <svg
|
|
20
20
|
+ aria-hidden="true"
|
|
21
21
|
+ class="components-checkbox-control__indeterminate"
|
|
22
|
+
+ fill="currentColor"
|
|
22
23
|
+ focusable="false"
|
|
23
24
|
+ height="24"
|
|
24
25
|
+ role="presentation"
|
|
@@ -28,7 +29,7 @@ Snapshot Diff:
|
|
|
28
29
|
+ >
|
|
29
30
|
+ <path
|
|
30
31
|
+ d="M7 11.5h10V13H7z"
|
|
31
|
-
|
|
32
|
+
+ />
|
|
32
33
|
+ </svg>
|
|
33
34
|
</span>
|
|
34
35
|
</div>
|
|
@@ -30,6 +30,11 @@ const meta: Meta< typeof Composite > = {
|
|
|
30
30
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
31
31
|
'Composite.Context': Composite.Context,
|
|
32
32
|
},
|
|
33
|
+
// Temporary: Due to an upstream bug, render the root explicitly so the
|
|
34
|
+
// components manifest extractor can resolve props from the JSX.
|
|
35
|
+
//
|
|
36
|
+
// See: https://github.com/storybookjs/storybook/issues/34877
|
|
37
|
+
render: ( args ) => <Composite { ...args } />,
|
|
33
38
|
argTypes: {
|
|
34
39
|
children: { control: false },
|
|
35
40
|
render: { control: false },
|
|
@@ -36,6 +36,7 @@ const meta: Meta< typeof ConfirmDialog > = {
|
|
|
36
36
|
componentStatus: {
|
|
37
37
|
status: 'recommended',
|
|
38
38
|
whereUsed: 'global',
|
|
39
|
+
notes: 'Will be superseded by `AlertDialog` in `@wordpress/ui`, but continue using for now.',
|
|
39
40
|
},
|
|
40
41
|
docs: { canvas: { sourceState: 'shown' } },
|
|
41
42
|
},
|
|
@@ -483,7 +483,7 @@ describe.each( [
|
|
|
483
483
|
const customSelect = screen.getByRole( 'listbox', {
|
|
484
484
|
name: props.label,
|
|
485
485
|
} );
|
|
486
|
-
expect( customSelect ).toHaveFocus();
|
|
486
|
+
await waitFor( () => expect( customSelect ).toHaveFocus() );
|
|
487
487
|
await press.Enter();
|
|
488
488
|
|
|
489
489
|
expect( onKeyDown ).toHaveBeenCalledTimes( 0 );
|
package/src/disabled/README.md
CHANGED
package/src/disabled/index.tsx
CHANGED