@wordpress/components 28.5.0 → 28.7.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 +159 -0
- package/CONTRIBUTING.md +178 -64
- package/build/alignment-matrix-control/cell.js +6 -9
- package/build/alignment-matrix-control/cell.js.map +1 -1
- package/build/alignment-matrix-control/icon.js +31 -19
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/index.js +57 -52
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/alignment-matrix-control/styles.js +73 -0
- package/build/alignment-matrix-control/styles.js.map +1 -0
- package/build/alignment-matrix-control/types.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js +9 -9
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +4 -4
- package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build/base-control/index.js +54 -41
- package/build/base-control/index.js.map +1 -1
- package/build/base-control/types.js.map +1 -1
- package/build/border-control/border-control/component.js +18 -13
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/styles.js +13 -13
- package/build/border-control/styles.js.map +1 -1
- package/build/checkbox-control/index.js +1 -0
- package/build/checkbox-control/index.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +17 -11
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker.js +17 -14
- package/build/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build/circular-option-picker/types.js.map +1 -1
- package/build/clipboard-button/index.js +6 -6
- package/build/clipboard-button/index.js.map +1 -1
- package/build/color-palette/utils.js +16 -5
- package/build/color-palette/utils.js.map +1 -1
- package/build/color-picker/color-copy-button.js +8 -8
- package/build/color-picker/color-copy-button.js.map +1 -1
- package/build/color-picker/hex-input.js +8 -8
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/input-with-slider.js +9 -8
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/styles.js +8 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +1 -0
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/types.js.map +1 -1
- package/build/composite/context.js +19 -0
- package/build/composite/context.js.map +1 -0
- package/build/composite/group-label.js +33 -0
- package/build/composite/group-label.js.map +1 -0
- package/build/composite/group.js +33 -0
- package/build/composite/group.js.map +1 -0
- package/build/composite/hover.js +33 -0
- package/build/composite/hover.js.map +1 -0
- package/build/composite/index.js +241 -9
- package/build/composite/index.js.map +1 -1
- package/build/composite/item.js +33 -0
- package/build/composite/item.js.map +1 -0
- package/build/composite/legacy/index.js +11 -8
- package/build/composite/legacy/index.js.map +1 -1
- package/build/composite/row.js +33 -0
- package/build/composite/row.js.map +1 -0
- package/build/composite/store.js +54 -0
- package/build/composite/store.js.map +1 -0
- package/build/composite/typeahead.js +33 -0
- package/build/composite/typeahead.js.map +1 -0
- package/build/composite/types.js +6 -0
- package/build/composite/types.js.map +1 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-select-control/types.js.map +1 -1
- package/build/custom-select-control-v2/custom-select.js +3 -2
- package/build/custom-select-control-v2/custom-select.js.map +1 -1
- package/build/custom-select-control-v2/styles.js +12 -14
- package/build/custom-select-control-v2/styles.js.map +1 -1
- package/build/date-time/date/styles.js +8 -8
- package/build/date-time/date/styles.js.map +1 -1
- package/build/date-time/time/index.js +11 -3
- package/build/date-time/time/index.js.map +1 -1
- package/build/date-time/time/time-input/index.js +17 -19
- package/build/date-time/time/time-input/index.js.map +1 -1
- package/build/date-time/types.js.map +1 -1
- package/build/dimension-control/index.js +31 -9
- package/build/dimension-control/index.js.map +1 -1
- package/build/dimension-control/types.js.map +1 -1
- package/build/draggable/index.js +4 -4
- package/build/draggable/index.js.map +1 -1
- package/build/dropdown-menu-v2/checkbox-item.js +69 -0
- package/build/dropdown-menu-v2/checkbox-item.js.map +1 -0
- package/build/dropdown-menu-v2/context.js +17 -0
- package/build/dropdown-menu-v2/context.js.map +1 -0
- package/build/dropdown-menu-v2/group-label.js +40 -0
- package/build/dropdown-menu-v2/group-label.js.map +1 -0
- package/build/dropdown-menu-v2/group.js +29 -0
- package/build/dropdown-menu-v2/group.js.map +1 -0
- package/build/dropdown-menu-v2/index.js +60 -147
- package/build/dropdown-menu-v2/index.js.map +1 -1
- package/build/dropdown-menu-v2/item-help-text.js +27 -0
- package/build/dropdown-menu-v2/item-help-text.js.map +1 -0
- package/build/dropdown-menu-v2/item-label.js +27 -0
- package/build/dropdown-menu-v2/item-label.js.map +1 -0
- package/build/dropdown-menu-v2/item.js +53 -0
- package/build/dropdown-menu-v2/item.js.map +1 -0
- package/build/dropdown-menu-v2/radio-item.js +79 -0
- package/build/dropdown-menu-v2/radio-item.js.map +1 -0
- package/build/dropdown-menu-v2/separator.js +30 -0
- package/build/dropdown-menu-v2/separator.js.map +1 -0
- package/build/dropdown-menu-v2/styles.js +63 -85
- package/build/dropdown-menu-v2/styles.js.map +1 -1
- package/build/dropdown-menu-v2/types.js.map +1 -1
- package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js +27 -0
- package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
- package/build/focal-point-picker/controls.js +1 -3
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/index.js +1 -2
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-picker-style.js +11 -11
- package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-style.js +7 -2
- package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build/focal-point-picker/types.js.map +1 -1
- package/build/form-file-upload/types.js.map +1 -1
- package/build/form-token-field/types.js.map +1 -1
- package/build/index.js +11 -5
- package/build/index.js.map +1 -1
- package/build/input-control/index.js +2 -2
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +5 -10
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-prefix-wrapper.js +3 -3
- package/build/input-control/input-prefix-wrapper.js.map +1 -1
- package/build/input-control/input-suffix-wrapper.js +2 -3
- package/build/input-control/input-suffix-wrapper.js.map +1 -1
- package/build/input-control/reducer/reducer.js +8 -8
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +75 -45
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/input-control/types.js.map +1 -1
- package/build/input-control/utils.js +3 -3
- package/build/input-control/utils.js.map +1 -1
- package/build/item-group/styles.js +11 -11
- package/build/item-group/styles.js.map +1 -1
- package/build/mobile/utils/alignments.native.js +1 -1
- package/build/mobile/utils/alignments.native.js.map +1 -1
- package/build/modal/index.js +5 -5
- package/build/modal/index.js.map +1 -1
- package/build/navigation/index.js +4 -4
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +13 -13
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/navigator/index.js +12 -13
- package/build/navigator/index.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js +1 -1
- package/build/navigator/navigator-back-button/component.js.map +1 -1
- package/build/navigator/navigator-back-button/hook.js +5 -11
- package/build/navigator/navigator-back-button/hook.js.map +1 -1
- package/build/navigator/navigator-button/hook.js +2 -2
- package/build/navigator/navigator-button/hook.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +116 -76
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-to-parent-button/component.js +13 -40
- package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build/navigator/types.js.map +1 -1
- package/build/navigator/use-navigator.js +1 -2
- package/build/navigator/use-navigator.js.map +1 -1
- package/build/palette-edit/index.js +2 -2
- package/build/palette-edit/index.js.map +1 -1
- package/build/palette-edit/styles.js +11 -11
- package/build/palette-edit/styles.js.map +1 -1
- package/build/popover/index.js +6 -1
- package/build/popover/index.js.map +1 -1
- package/build/private-apis.js +10 -14
- package/build/private-apis.js.map +1 -1
- package/build/progress-bar/styles.js +5 -5
- package/build/progress-bar/styles.js.map +1 -1
- package/build/query-controls/index.js +5 -6
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/types.js.map +1 -1
- package/build/radio-control/index.js +20 -19
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-group/radio.js +3 -2
- package/build/radio-group/radio.js.map +1 -1
- package/build/range-control/index.js +32 -9
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +31 -31
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build/search-control/index.js +5 -4
- package/build/search-control/index.js.map +1 -1
- package/build/select-control/index.js +1 -0
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +12 -12
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +4 -4
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/snackbar/index.js +4 -4
- package/build/snackbar/index.js.map +1 -1
- package/build/tab-panel/index.js +3 -2
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js +7 -6
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/styles.js +3 -3
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tablist.js +6 -4
- package/build/tabs/tablist.js.map +1 -1
- package/build/tabs/tabpanel.js +6 -1
- package/build/tabs/tabpanel.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build/text-control/index.js +1 -0
- package/build/text-control/index.js.map +1 -1
- package/build/textarea-control/index.js +1 -0
- package/build/textarea-control/index.js.map +1 -1
- package/build/textarea-control/styles/textarea-control-styles.js +8 -2
- package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build/toggle-control/index.js +9 -1
- package/build/toggle-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js +3 -2
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +1 -0
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/utils.js +6 -6
- package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/tools-panel/styles.js +13 -13
- package/build/tools-panel/styles.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +6 -6
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tooltip/index.js +3 -2
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-select/index.js +19 -6
- package/build/tree-select/index.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +7 -7
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/utils/config-values.js +10 -7
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/hooks/use-update-effect.js +4 -4
- package/build/utils/hooks/use-update-effect.js.map +1 -1
- package/build-module/alignment-matrix-control/cell.js +4 -7
- package/build-module/alignment-matrix-control/cell.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js +31 -19
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +56 -50
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/alignment-matrix-control/styles.js +70 -0
- package/build-module/alignment-matrix-control/styles.js.map +1 -0
- package/build-module/alignment-matrix-control/types.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +9 -9
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +4 -4
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build-module/base-control/index.js +54 -42
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/types.js.map +1 -1
- package/build-module/border-control/border-control/component.js +18 -13
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/styles.js +13 -13
- package/build-module/border-control/styles.js.map +1 -1
- package/build-module/checkbox-control/index.js +1 -0
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +18 -12
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker.js +16 -13
- package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build-module/circular-option-picker/types.js.map +1 -1
- package/build-module/clipboard-button/index.js +6 -6
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/color-palette/utils.js +16 -5
- package/build-module/color-palette/utils.js.map +1 -1
- package/build-module/color-picker/color-copy-button.js +8 -8
- package/build-module/color-picker/color-copy-button.js.map +1 -1
- package/build-module/color-picker/hex-input.js +7 -8
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +8 -8
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/styles.js +8 -8
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +1 -0
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/types.js.map +1 -1
- package/build-module/composite/context.js +12 -0
- package/build-module/composite/context.js.map +1 -0
- package/build-module/composite/group-label.js +25 -0
- package/build-module/composite/group-label.js.map +1 -0
- package/build-module/composite/group.js +25 -0
- package/build-module/composite/group.js.map +1 -0
- package/build-module/composite/hover.js +25 -0
- package/build-module/composite/hover.js.map +1 -0
- package/build-module/composite/index.js +239 -6
- package/build-module/composite/index.js.map +1 -1
- package/build-module/composite/item.js +25 -0
- package/build-module/composite/item.js.map +1 -0
- package/build-module/composite/legacy/index.js +11 -6
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/composite/row.js +25 -0
- package/build-module/composite/row.js.map +1 -0
- package/build-module/composite/store.js +46 -0
- package/build-module/composite/store.js.map +1 -0
- package/build-module/composite/typeahead.js +25 -0
- package/build-module/composite/typeahead.js.map +1 -0
- package/build-module/composite/types.js +2 -0
- package/build-module/composite/types.js.map +1 -0
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -8
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-select-control/types.js.map +1 -1
- package/build-module/custom-select-control-v2/custom-select.js +2 -1
- package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
- package/build-module/custom-select-control-v2/styles.js +12 -14
- package/build-module/custom-select-control-v2/styles.js.map +1 -1
- package/build-module/date-time/date/styles.js +8 -8
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/date-time/time/index.js +11 -3
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/date-time/time/time-input/index.js +17 -19
- package/build-module/date-time/time/time-input/index.js.map +1 -1
- package/build-module/date-time/types.js.map +1 -1
- package/build-module/dimension-control/index.js +31 -9
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/dimension-control/types.js.map +1 -1
- package/build-module/draggable/index.js +4 -4
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/checkbox-item.js +62 -0
- package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -0
- package/build-module/dropdown-menu-v2/context.js +11 -0
- package/build-module/dropdown-menu-v2/context.js.map +1 -0
- package/build-module/dropdown-menu-v2/group-label.js +32 -0
- package/build-module/dropdown-menu-v2/group-label.js.map +1 -0
- package/build-module/dropdown-menu-v2/group.js +21 -0
- package/build-module/dropdown-menu-v2/group.js.map +1 -0
- package/build-module/dropdown-menu-v2/index.js +58 -144
- package/build-module/dropdown-menu-v2/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/item-help-text.js +19 -0
- package/build-module/dropdown-menu-v2/item-help-text.js.map +1 -0
- package/build-module/dropdown-menu-v2/item-label.js +19 -0
- package/build-module/dropdown-menu-v2/item-label.js.map +1 -0
- package/build-module/dropdown-menu-v2/item.js +46 -0
- package/build-module/dropdown-menu-v2/item.js.map +1 -0
- package/build-module/dropdown-menu-v2/radio-item.js +72 -0
- package/build-module/dropdown-menu-v2/radio-item.js.map +1 -0
- package/build-module/dropdown-menu-v2/separator.js +22 -0
- package/build-module/dropdown-menu-v2/separator.js.map +1 -0
- package/build-module/dropdown-menu-v2/styles.js +63 -85
- package/build-module/dropdown-menu-v2/styles.js.map +1 -1
- package/build-module/dropdown-menu-v2/types.js.map +1 -1
- package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js +20 -0
- package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
- package/build-module/focal-point-picker/controls.js +1 -3
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/index.js +1 -2
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js +11 -11
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-style.js +6 -2
- package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build-module/focal-point-picker/types.js.map +1 -1
- package/build-module/form-file-upload/types.js.map +1 -1
- package/build-module/form-token-field/types.js.map +1 -1
- package/build-module/index.js +3 -2
- package/build-module/index.js.map +1 -1
- package/build-module/input-control/index.js +2 -2
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +6 -11
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-prefix-wrapper.js +4 -3
- package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
- package/build-module/input-control/input-suffix-wrapper.js +3 -3
- package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js +8 -8
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +74 -44
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/input-control/types.js.map +1 -1
- package/build-module/input-control/utils.js +3 -3
- package/build-module/input-control/utils.js.map +1 -1
- package/build-module/item-group/styles.js +11 -11
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/mobile/utils/alignments.native.js +1 -1
- package/build-module/mobile/utils/alignments.native.js.map +1 -1
- package/build-module/modal/index.js +5 -5
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigation/index.js +4 -4
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +14 -14
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/navigator/index.js +6 -6
- package/build-module/navigator/index.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js +1 -1
- package/build-module/navigator/navigator-back-button/component.js.map +1 -1
- package/build-module/navigator/navigator-back-button/hook.js +4 -10
- package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-button/hook.js +1 -1
- package/build-module/navigator/navigator-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +116 -76
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-to-parent-button/component.js +12 -41
- package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build-module/navigator/types.js.map +1 -1
- package/build-module/navigator/use-navigator.js +1 -2
- package/build-module/navigator/use-navigator.js.map +1 -1
- package/build-module/palette-edit/index.js +2 -2
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/styles.js +11 -11
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/popover/index.js +6 -1
- package/build-module/popover/index.js.map +1 -1
- package/build-module/private-apis.js +10 -14
- package/build-module/private-apis.js.map +1 -1
- package/build-module/progress-bar/styles.js +5 -5
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/query-controls/index.js +5 -6
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/types.js.map +1 -1
- package/build-module/radio-control/index.js +20 -19
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-group/radio.js +2 -1
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/range-control/index.js +32 -9
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +32 -32
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +5 -5
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build-module/search-control/index.js +5 -4
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/select-control/index.js +1 -0
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +13 -13
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +4 -4
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/snackbar/index.js +4 -4
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/tab-panel/index.js +2 -1
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js +6 -5
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/styles.js +4 -4
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tablist.js +5 -3
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/tabs/tabpanel.js +6 -2
- package/build-module/tabs/tabpanel.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-module/text-control/index.js +1 -0
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/textarea-control/index.js +1 -0
- package/build-module/textarea-control/index.js.map +1 -1
- package/build-module/textarea-control/styles/textarea-control-styles.js +9 -2
- package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build-module/toggle-control/index.js +9 -1
- package/build-module/toggle-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +2 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +1 -0
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/utils.js +6 -6
- package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/tools-panel/styles.js +13 -13
- package/build-module/tools-panel/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +6 -6
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tooltip/index.js +2 -1
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-select/index.js +19 -6
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +7 -7
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/utils/config-values.js +10 -7
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/hooks/use-update-effect.js +4 -4
- package/build-module/utils/hooks/use-update-effect.js.map +1 -1
- package/build-style/style-rtl.css +30 -32
- package/build-style/style.css +30 -32
- package/build-types/alignment-matrix-control/cell.d.ts +1 -1
- package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/icon.d.ts +1 -1
- package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/index.d.ts +16 -6
- package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/{styles/alignment-matrix-control-styles.d.ts → styles.d.ts} +9 -10
- package/build-types/alignment-matrix-control/styles.d.ts.map +1 -0
- package/build-types/alignment-matrix-control/types.d.ts +12 -1
- package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
- package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +1 -0
- package/build-types/base-control/hooks.d.ts.map +1 -1
- package/build-types/base-control/index.d.ts +44 -0
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/types.d.ts +7 -0
- package/build-types/base-control/types.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/index.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/circular-option-picker/types.d.ts +2 -3
- package/build-types/circular-option-picker/types.d.ts.map +1 -1
- package/build-types/color-palette/utils.d.ts.map +1 -1
- package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/types.d.ts +1 -0
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/composite/context.d.ts +7 -0
- package/build-types/composite/context.d.ts.map +1 -0
- package/build-types/composite/group-label.d.ts +3 -0
- package/build-types/composite/group-label.d.ts.map +1 -0
- package/build-types/composite/group.d.ts +3 -0
- package/build-types/composite/group.d.ts.map +1 -0
- package/build-types/composite/hover.d.ts +3 -0
- package/build-types/composite/hover.d.ts.map +1 -0
- package/build-types/composite/index.d.ts +185 -1
- package/build-types/composite/index.d.ts.map +1 -1
- package/build-types/composite/item.d.ts +3 -0
- package/build-types/composite/item.d.ts.map +1 -0
- package/build-types/composite/legacy/index.d.ts +7 -5
- package/build-types/composite/legacy/index.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts +19 -0
- package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
- package/build-types/composite/row.d.ts +3 -0
- package/build-types/composite/row.d.ts.map +1 -0
- package/build-types/composite/store.d.ts +25 -0
- package/build-types/composite/store.d.ts.map +1 -0
- package/build-types/composite/stories/index.story.d.ts +14 -0
- package/build-types/composite/stories/index.story.d.ts.map +1 -0
- package/build-types/composite/stories/utils.d.ts +29 -0
- package/build-types/composite/stories/utils.d.ts.map +1 -0
- package/build-types/composite/typeahead.d.ts +3 -0
- package/build-types/composite/typeahead.d.ts.map +1 -0
- package/build-types/composite/types.d.ts +288 -0
- package/build-types/composite/types.d.ts.map +1 -0
- package/build-types/custom-select-control/types.d.ts +3 -3
- package/build-types/custom-select-control/types.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts +1 -1
- package/build-types/date-time/time/index.d.ts +1 -1
- package/build-types/date-time/time/index.d.ts.map +1 -1
- package/build-types/date-time/time/time-input/index.d.ts.map +1 -1
- package/build-types/date-time/types.d.ts +7 -1
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/dimension-control/index.d.ts +2 -1
- package/build-types/dimension-control/index.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts +13 -1
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/dimension-control/types.d.ts +2 -7
- package/build-types/dimension-control/types.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/checkbox-item.d.ts +3 -0
- package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/context.d.ts +6 -0
- package/build-types/dropdown-menu-v2/context.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/group-label.d.ts +3 -0
- package/build-types/dropdown-menu-v2/group-label.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/group.d.ts +3 -0
- package/build-types/dropdown-menu-v2/group.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/index.d.ts +39 -18
- package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/item-help-text.d.ts +6 -0
- package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/item-label.d.ts +6 -0
- package/build-types/dropdown-menu-v2/item-label.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/item.d.ts +3 -0
- package/build-types/dropdown-menu-v2/item.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/radio-item.d.ts +3 -0
- package/build-types/dropdown-menu-v2/radio-item.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/separator.d.ts +3 -0
- package/build-types/dropdown-menu-v2/separator.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts +10 -10
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/styles.d.ts +14 -6
- package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/types.d.ts +6 -0
- package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts +8 -0
- package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +1 -0
- package/build-types/focal-point-picker/controls.d.ts +1 -1
- package/build-types/focal-point-picker/controls.d.ts.map +1 -1
- package/build-types/focal-point-picker/index.d.ts +1 -1
- package/build-types/focal-point-picker/index.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
- package/build-types/focal-point-picker/types.d.ts +2 -2
- package/build-types/focal-point-picker/types.d.ts.map +1 -1
- package/build-types/form-file-upload/types.d.ts +6 -0
- package/build-types/form-file-upload/types.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +1 -0
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/index.d.ts +4 -2
- package/build-types/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-prefix-wrapper.d.ts +2 -2
- package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
- package/build-types/input-control/input-suffix-wrapper.d.ts +2 -2
- package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +9 -0
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +15 -9
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +23 -6
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/navigator/index.d.ts +6 -6
- package/build-types/navigator/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +2 -2
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +6 -0
- package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts +1 -1
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +47 -9
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/navigator/use-navigator.d.ts +1 -2
- package/build-types/navigator/use-navigator.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/query-controls/index.d.ts +1 -1
- package/build-types/query-controls/index.d.ts.map +1 -1
- package/build-types/query-controls/types.d.ts +2 -1
- package/build-types/query-controls/types.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
- package/build-types/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +4 -2
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/tabs/tabpanel.d.ts +0 -3
- package/build-types/tabs/tabpanel.d.ts.map +1 -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/textarea-control/index.d.ts.map +1 -1
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +7 -6
- package/package.json +20 -20
- package/src/alignment-matrix-control/README.md +1 -5
- package/src/alignment-matrix-control/cell.tsx +6 -12
- package/src/alignment-matrix-control/icon.tsx +48 -30
- package/src/alignment-matrix-control/index.tsx +61 -50
- package/src/alignment-matrix-control/stories/index.story.tsx +3 -12
- package/src/alignment-matrix-control/styles.ts +113 -0
- package/src/alignment-matrix-control/types.ts +12 -1
- package/src/angle-picker-control/angle-circle.tsx +11 -9
- package/src/angle-picker-control/styles/angle-picker-control-styles.tsx +2 -2
- package/src/base-control/README.md +5 -2
- package/src/base-control/index.tsx +61 -41
- package/src/base-control/types.ts +7 -0
- package/src/border-box-control/border-box-control/README.md +7 -0
- package/src/border-control/border-control/README.md +7 -0
- package/src/border-control/border-control/component.tsx +23 -16
- package/src/border-control/styles.ts +1 -1
- package/src/button/README.md +7 -0
- package/src/button/style.scss +2 -2
- package/src/button-group/style.scss +2 -2
- package/src/checkbox-control/index.tsx +1 -0
- package/src/checkbox-control/stories/index.story.tsx +1 -0
- package/src/checkbox-control/test/index.tsx +8 -1
- package/src/circular-option-picker/circular-option-picker-option.tsx +19 -20
- package/src/circular-option-picker/circular-option-picker.tsx +26 -12
- package/src/circular-option-picker/style.scss +3 -3
- package/src/circular-option-picker/types.ts +2 -3
- package/src/clipboard-button/index.tsx +6 -6
- package/src/color-indicator/style.scss +1 -1
- package/src/color-palette/style.scss +2 -2
- package/src/color-palette/test/utils.ts +21 -2
- package/src/color-palette/utils.ts +22 -11
- package/src/color-picker/color-copy-button.tsx +10 -8
- package/src/color-picker/hex-input.tsx +6 -10
- package/src/color-picker/input-with-slider.tsx +7 -10
- package/src/color-picker/styles.ts +1 -1
- package/src/combobox-control/README.md +8 -0
- package/src/combobox-control/index.tsx +1 -0
- package/src/combobox-control/stories/index.story.tsx +3 -4
- package/src/combobox-control/test/index.tsx +5 -1
- package/src/combobox-control/types.ts +1 -0
- package/src/composite/README.md +325 -0
- package/src/composite/context.ts +14 -0
- package/src/composite/group-label.tsx +30 -0
- package/src/composite/group.tsx +30 -0
- package/src/composite/hover.tsx +30 -0
- package/src/composite/index.tsx +257 -0
- package/src/composite/item.tsx +30 -0
- package/src/composite/legacy/index.tsx +16 -14
- package/src/composite/legacy/stories/utils.tsx +19 -0
- package/src/composite/row.tsx +30 -0
- package/src/composite/store.ts +46 -0
- package/src/composite/stories/index.story.tsx +339 -0
- package/src/composite/{current/stories → stories}/utils.tsx +22 -7
- package/src/composite/typeahead.tsx +30 -0
- package/src/composite/types.ts +298 -0
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +10 -10
- package/src/custom-gradient-picker/style.scss +3 -22
- package/src/custom-select-control/README.md +7 -0
- package/src/custom-select-control/test/index.tsx +125 -0
- package/src/custom-select-control/types.ts +3 -3
- package/src/custom-select-control-v2/custom-select.tsx +2 -1
- package/src/custom-select-control-v2/styles.ts +4 -4
- package/src/date-time/date/styles.ts +2 -2
- package/src/date-time/time/index.tsx +26 -12
- package/src/date-time/time/test/index.tsx +3 -6
- package/src/date-time/time/time-input/index.tsx +25 -25
- package/src/date-time/time/time-input/test/index.tsx +6 -7
- package/src/date-time/types.ts +11 -1
- package/src/dimension-control/README.md +21 -0
- package/src/dimension-control/index.tsx +33 -10
- package/src/dimension-control/stories/index.story.tsx +8 -2
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +16 -32
- package/src/dimension-control/test/index.test.js +6 -1
- package/src/dimension-control/types.ts +5 -7
- package/src/draggable/index.tsx +4 -4
- package/src/drop-zone/style.scss +1 -1
- package/src/dropdown-menu-v2/README.md +73 -60
- package/src/dropdown-menu-v2/checkbox-item.tsx +63 -0
- package/src/dropdown-menu-v2/context.tsx +13 -0
- package/src/dropdown-menu-v2/group-label.tsx +37 -0
- package/src/dropdown-menu-v2/group.tsx +26 -0
- package/src/dropdown-menu-v2/index.tsx +61 -199
- package/src/dropdown-menu-v2/item-help-text.tsx +23 -0
- package/src/dropdown-menu-v2/item-label.tsx +23 -0
- package/src/dropdown-menu-v2/item.tsx +50 -0
- package/src/dropdown-menu-v2/radio-item.tsx +70 -0
- package/src/dropdown-menu-v2/separator.tsx +27 -0
- package/src/dropdown-menu-v2/stories/index.story.tsx +295 -262
- package/src/dropdown-menu-v2/styles.ts +118 -80
- package/src/dropdown-menu-v2/test/index.tsx +159 -132
- package/src/dropdown-menu-v2/types.ts +7 -0
- package/src/dropdown-menu-v2/use-temporary-focus-visible-fix.ts +22 -0
- package/src/focal-point-picker/README.md +9 -1
- package/src/focal-point-picker/controls.tsx +1 -3
- package/src/focal-point-picker/index.tsx +1 -2
- package/src/focal-point-picker/stories/index.story.tsx +3 -0
- package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
- package/src/focal-point-picker/styles/focal-point-style.ts +6 -1
- package/src/focal-point-picker/test/index.tsx +5 -1
- package/src/focal-point-picker/types.ts +2 -2
- package/src/font-size-picker/README.md +7 -0
- package/src/form-file-upload/README.md +8 -0
- package/src/form-file-upload/types.ts +6 -0
- package/src/form-toggle/style.scss +1 -1
- package/src/form-token-field/README.md +1 -0
- package/src/form-token-field/style.scss +2 -3
- package/src/form-token-field/types.ts +1 -0
- package/src/guide/style.scss +0 -1
- package/src/index.ts +6 -2
- package/src/input-control/README.md +8 -0
- package/src/input-control/index.tsx +2 -2
- package/src/input-control/input-base.tsx +4 -14
- package/src/input-control/input-prefix-wrapper.tsx +8 -4
- package/src/input-control/input-suffix-wrapper.tsx +4 -6
- package/src/input-control/reducer/reducer.ts +13 -10
- package/src/input-control/stories/index.story.tsx +31 -12
- package/src/input-control/styles/input-control-styles.tsx +42 -11
- package/src/input-control/types.ts +23 -7
- package/src/input-control/utils.ts +3 -3
- package/src/item-group/styles.ts +4 -4
- package/src/item-group/test/__snapshots__/index.js.snap +3 -3
- package/src/mobile/utils/alignments.native.js +1 -0
- package/src/modal/index.tsx +5 -5
- package/src/modal/style.scss +8 -7
- package/src/navigation/index.tsx +4 -4
- package/src/navigation/styles/navigation-styles.tsx +3 -3
- package/src/navigator/index.ts +6 -6
- package/src/navigator/navigator-back-button/component.tsx +1 -1
- package/src/navigator/navigator-back-button/hook.ts +7 -11
- package/src/navigator/navigator-button/hook.ts +1 -1
- package/src/navigator/navigator-provider/README.md +37 -36
- package/src/navigator/navigator-provider/component.tsx +110 -89
- package/src/navigator/navigator-screen/README.md +13 -1
- package/src/navigator/navigator-to-parent-button/README.md +2 -0
- package/src/navigator/navigator-to-parent-button/component.tsx +14 -43
- package/src/navigator/stories/index.story.tsx +82 -253
- package/src/navigator/test/index.tsx +136 -6
- package/src/navigator/types.ts +47 -10
- package/src/navigator/use-navigator.ts +1 -3
- package/src/number-control/README.md +8 -0
- package/src/palette-edit/index.tsx +2 -2
- package/src/palette-edit/styles.ts +5 -5
- package/src/placeholder/style.scss +4 -1
- package/src/popover/index.tsx +9 -3
- package/src/popover/style.scss +2 -2
- package/src/popover/test/index.tsx +34 -0
- package/src/private-apis.ts +10 -29
- package/src/progress-bar/styles.ts +2 -2
- package/src/query-controls/README.md +7 -0
- package/src/query-controls/index.tsx +5 -6
- package/src/query-controls/types.ts +2 -1
- package/src/radio-control/index.tsx +28 -20
- package/src/radio-control/style.scss +13 -2
- package/src/radio-control/test/index.tsx +43 -40
- package/src/radio-group/radio.tsx +2 -1
- package/src/range-control/README.md +7 -0
- package/src/range-control/index.tsx +39 -9
- package/src/range-control/stories/index.story.tsx +7 -0
- package/src/range-control/styles/range-control-styles.ts +9 -9
- package/src/range-control/test/index.tsx +54 -14
- package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +2 -2
- package/src/resizable-box/style.scss +2 -2
- package/src/search-control/index.tsx +7 -4
- package/src/search-control/stories/index.story.tsx +1 -0
- package/src/search-control/test/index.tsx +1 -0
- package/src/select-control/README.md +8 -0
- package/src/select-control/index.tsx +1 -0
- package/src/select-control/stories/index.story.tsx +8 -5
- package/src/select-control/styles/select-control-styles.ts +5 -5
- package/src/select-control/test/select-control.tsx +12 -6
- package/src/slot-fill/bubbles-virtually/fill.tsx +4 -4
- package/src/snackbar/index.tsx +4 -4
- package/src/snackbar/style.scss +2 -2
- package/src/tab-panel/index.tsx +4 -1
- package/src/tab-panel/style.scss +1 -2
- package/src/tabs/index.tsx +10 -5
- package/src/tabs/styles.ts +2 -3
- package/src/tabs/tablist.tsx +6 -4
- package/src/tabs/tabpanel.tsx +6 -2
- package/src/text/styles.ts +1 -1
- package/src/text-control/README.md +8 -0
- package/src/text-control/index.tsx +1 -0
- package/src/text-control/stories/index.story.tsx +3 -1
- package/src/text-control/style.scss +3 -2
- package/src/text-control/test/text-control.tsx +5 -1
- package/src/textarea-control/index.tsx +1 -0
- package/src/textarea-control/stories/index.story.tsx +2 -0
- package/src/textarea-control/styles/textarea-control-styles.ts +75 -2
- package/src/toggle-control/index.tsx +9 -0
- package/src/toggle-control/stories/index.story.tsx +1 -0
- package/src/toggle-control/test/index.tsx +7 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +8 -24
- package/src/toggle-group-control/test/index.tsx +5 -1
- package/src/toggle-group-control/toggle-group-control/README.md +7 -0
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +2 -1
- package/src/toggle-group-control/toggle-group-control/component.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control/styles.ts +1 -1
- package/src/toggle-group-control/toggle-group-control/utils.ts +7 -7
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +2 -2
- package/src/toolbar/toolbar/style.scss +2 -2
- package/src/tools-panel/styles.ts +1 -1
- package/src/tools-panel/tools-panel/hook.ts +6 -6
- package/src/tooltip/index.tsx +2 -1
- package/src/tooltip/style.scss +1 -1
- package/src/tree-select/index.tsx +16 -5
- package/src/tree-select/stories/index.story.tsx +1 -0
- package/src/unit-control/README.md +7 -0
- package/src/unit-control/styles/unit-control-styles.ts +3 -2
- package/src/utils/config-values.js +10 -7
- package/src/utils/hooks/use-update-effect.js +4 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -66
- package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -86
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
- package/build/composite/current/index.js +0 -43
- package/build/composite/current/index.js.map +0 -1
- package/build/composite/v2.js +0 -17
- package/build/composite/v2.js.map +0 -1
- package/build/navigator/navigator-back-button/index.js +0 -14
- package/build/navigator/navigator-back-button/index.js.map +0 -1
- package/build/navigator/navigator-button/index.js +0 -14
- package/build/navigator/navigator-button/index.js.map +0 -1
- package/build/navigator/navigator-provider/index.js +0 -14
- package/build/navigator/navigator-provider/index.js.map +0 -1
- package/build/navigator/navigator-screen/index.js +0 -14
- package/build/navigator/navigator-screen/index.js.map +0 -1
- package/build/navigator/navigator-to-parent-button/index.js +0 -14
- package/build/navigator/navigator-to-parent-button/index.js.map +0 -1
- package/build/utils/input/base.js +0 -20
- package/build/utils/input/base.js.map +0 -1
- package/build/utils/input/index.js +0 -17
- package/build/utils/input/index.js.map +0 -1
- package/build/utils/input/input-control.js +0 -21
- package/build/utils/input/input-control.js.map +0 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -63
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -81
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
- package/build-module/composite/current/index.js +0 -12
- package/build-module/composite/current/index.js.map +0 -1
- package/build-module/composite/v2.js +0 -5
- package/build-module/composite/v2.js.map +0 -1
- package/build-module/navigator/navigator-back-button/index.js +0 -2
- package/build-module/navigator/navigator-back-button/index.js.map +0 -1
- package/build-module/navigator/navigator-button/index.js +0 -2
- package/build-module/navigator/navigator-button/index.js.map +0 -1
- package/build-module/navigator/navigator-provider/index.js +0 -2
- package/build-module/navigator/navigator-provider/index.js.map +0 -1
- package/build-module/navigator/navigator-screen/index.js +0 -2
- package/build-module/navigator/navigator-screen/index.js.map +0 -1
- package/build-module/navigator/navigator-to-parent-button/index.js +0 -2
- package/build-module/navigator/navigator-to-parent-button/index.js.map +0 -1
- package/build-module/utils/input/base.js +0 -13
- package/build-module/utils/input/base.js.map +0 -1
- package/build-module/utils/input/index.js +0 -2
- package/build-module/utils/input/index.js.map +0 -1
- package/build-module/utils/input/input-control.js +0 -14
- package/build-module/utils/input/input-control.js.map +0 -1
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +0 -18
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +0 -1
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +0 -1
- package/build-types/composite/current/index.d.ts +0 -12
- package/build-types/composite/current/index.d.ts.map +0 -1
- package/build-types/composite/current/stories/index.story.d.ts +0 -13
- package/build-types/composite/current/stories/index.story.d.ts.map +0 -1
- package/build-types/composite/current/stories/utils.d.ts +0 -14
- package/build-types/composite/current/stories/utils.d.ts.map +0 -1
- package/build-types/composite/v2.d.ts +0 -2
- package/build-types/composite/v2.d.ts.map +0 -1
- package/build-types/navigator/navigator-back-button/index.d.ts +0 -2
- package/build-types/navigator/navigator-back-button/index.d.ts.map +0 -1
- package/build-types/navigator/navigator-button/index.d.ts +0 -2
- package/build-types/navigator/navigator-button/index.d.ts.map +0 -1
- package/build-types/navigator/navigator-provider/index.d.ts +0 -2
- package/build-types/navigator/navigator-provider/index.d.ts.map +0 -1
- package/build-types/navigator/navigator-screen/index.d.ts +0 -2
- package/build-types/navigator/navigator-screen/index.d.ts.map +0 -1
- package/build-types/navigator/navigator-to-parent-button/index.d.ts +0 -2
- package/build-types/navigator/navigator-to-parent-button/index.d.ts.map +0 -1
- package/build-types/utils/input/base.d.ts +0 -3
- package/build-types/utils/input/base.d.ts.map +0 -1
- package/build-types/utils/input/index.d.ts +0 -2
- package/build-types/utils/input/index.d.ts.map +0 -1
- package/build-types/utils/input/input-control.d.ts +0 -2
- package/build-types/utils/input/input-control.d.ts.map +0 -1
- package/src/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.ts +0 -77
- package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +0 -102
- package/src/composite/current/index.ts +0 -20
- package/src/composite/current/stories/index.story.tsx +0 -86
- package/src/composite/index.ts +0 -7
- package/src/composite/v2.ts +0 -4
- package/src/navigator/navigator-back-button/index.ts +0 -1
- package/src/navigator/navigator-button/index.ts +0 -1
- package/src/navigator/navigator-provider/index.ts +0 -1
- package/src/navigator/navigator-screen/index.ts +0 -1
- package/src/navigator/navigator-to-parent-button/index.ts +0 -1
- package/src/utils/input/base.js +0 -30
- package/src/utils/input/index.js +0 -1
- package/src/utils/input/input-control.js +0 -63
|
@@ -15,7 +15,7 @@ const MyCustomTextareaControl = ({ children, ...baseProps }) => (
|
|
|
15
15
|
const { baseControlProps, controlProps } = useBaseControlProps( baseProps );
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom
|
|
18
|
+
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom>
|
|
19
19
|
<textarea { ...controlProps }>
|
|
20
20
|
{ children }
|
|
21
21
|
</textarea>
|
|
@@ -92,7 +92,10 @@ It should only be used in cases where the children being rendered inside BaseCon
|
|
|
92
92
|
import { BaseControl } from '@wordpress/components';
|
|
93
93
|
|
|
94
94
|
const MyBaseControl = () => (
|
|
95
|
-
<BaseControl
|
|
95
|
+
<BaseControl
|
|
96
|
+
__nextHasNoMarginBottom
|
|
97
|
+
help="This button is already accessibly labeled."
|
|
98
|
+
>
|
|
96
99
|
<BaseControl.VisualLabel>Author</BaseControl.VisualLabel>
|
|
97
100
|
<Button>Select an author</Button>
|
|
98
101
|
</BaseControl>
|
|
@@ -7,6 +7,7 @@ import type { ForwardedRef } from 'react';
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
|
+
import deprecated from '@wordpress/deprecated';
|
|
10
11
|
import { forwardRef } from '@wordpress/element';
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -26,34 +27,12 @@ import { contextConnectWithoutRef, useContextSystem } from '../context';
|
|
|
26
27
|
|
|
27
28
|
export { useBaseControlProps } from './hooks';
|
|
28
29
|
|
|
29
|
-
/**
|
|
30
|
-
* `BaseControl` is a component used to generate labels and help text for components handling user inputs.
|
|
31
|
-
*
|
|
32
|
-
* ```jsx
|
|
33
|
-
* import { BaseControl, useBaseControlProps } from '@wordpress/components';
|
|
34
|
-
*
|
|
35
|
-
* // Render a `BaseControl` for a textarea input
|
|
36
|
-
* const MyCustomTextareaControl = ({ children, ...baseProps }) => (
|
|
37
|
-
* // `useBaseControlProps` is a convenience hook to get the props for the `BaseControl`
|
|
38
|
-
* // and the inner control itself. Namely, it takes care of generating a unique `id`,
|
|
39
|
-
* // properly associating it with the `label` and `help` elements.
|
|
40
|
-
* const { baseControlProps, controlProps } = useBaseControlProps( baseProps );
|
|
41
|
-
*
|
|
42
|
-
* return (
|
|
43
|
-
* <BaseControl { ...baseControlProps } __nextHasNoMarginBottom={ true }>
|
|
44
|
-
* <textarea { ...controlProps }>
|
|
45
|
-
* { children }
|
|
46
|
-
* </textarea>
|
|
47
|
-
* </BaseControl>
|
|
48
|
-
* );
|
|
49
|
-
* );
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
30
|
const UnconnectedBaseControl = (
|
|
53
31
|
props: WordPressComponentProps< BaseControlProps, null >
|
|
54
32
|
) => {
|
|
55
33
|
const {
|
|
56
34
|
__nextHasNoMarginBottom = false,
|
|
35
|
+
__associatedWPComponentName = 'BaseControl',
|
|
57
36
|
id,
|
|
58
37
|
label,
|
|
59
38
|
hideLabelFromVision = false,
|
|
@@ -62,6 +41,17 @@ const UnconnectedBaseControl = (
|
|
|
62
41
|
children,
|
|
63
42
|
} = useContextSystem( props, 'BaseControl' );
|
|
64
43
|
|
|
44
|
+
if ( ! __nextHasNoMarginBottom ) {
|
|
45
|
+
deprecated(
|
|
46
|
+
`Bottom margin styles for wp.components.${ __associatedWPComponentName }`,
|
|
47
|
+
{
|
|
48
|
+
since: '6.7',
|
|
49
|
+
version: '7.0',
|
|
50
|
+
hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
65
55
|
return (
|
|
66
56
|
<Wrapper className={ className }>
|
|
67
57
|
<StyledField
|
|
@@ -105,23 +95,6 @@ const UnconnectedBaseControl = (
|
|
|
105
95
|
);
|
|
106
96
|
};
|
|
107
97
|
|
|
108
|
-
/**
|
|
109
|
-
* `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.
|
|
110
|
-
*
|
|
111
|
-
* It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,
|
|
112
|
-
* e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would
|
|
113
|
-
* otherwise use if the `label` prop was passed.
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* import { BaseControl } from '@wordpress/components';
|
|
117
|
-
*
|
|
118
|
-
* const MyBaseControl = () => (
|
|
119
|
-
* <BaseControl help="This button is already accessibly labeled.">
|
|
120
|
-
* <BaseControl.VisualLabel>Author</BaseControl.VisualLabel>
|
|
121
|
-
* <Button>Select an author</Button>
|
|
122
|
-
* </BaseControl>
|
|
123
|
-
* );
|
|
124
|
-
*/
|
|
125
98
|
const UnforwardedVisualLabel = (
|
|
126
99
|
props: WordPressComponentProps< BaseControlVisualLabelProps, 'span' >,
|
|
127
100
|
ref: ForwardedRef< any >
|
|
@@ -141,9 +114,56 @@ const UnforwardedVisualLabel = (
|
|
|
141
114
|
|
|
142
115
|
export const VisualLabel = forwardRef( UnforwardedVisualLabel );
|
|
143
116
|
|
|
117
|
+
/**
|
|
118
|
+
* `BaseControl` is a component used to generate labels and help text for components handling user inputs.
|
|
119
|
+
*
|
|
120
|
+
* ```jsx
|
|
121
|
+
* import { BaseControl, useBaseControlProps } from '@wordpress/components';
|
|
122
|
+
*
|
|
123
|
+
* // Render a `BaseControl` for a textarea input
|
|
124
|
+
* const MyCustomTextareaControl = ({ children, ...baseProps }) => (
|
|
125
|
+
* // `useBaseControlProps` is a convenience hook to get the props for the `BaseControl`
|
|
126
|
+
* // and the inner control itself. Namely, it takes care of generating a unique `id`,
|
|
127
|
+
* // properly associating it with the `label` and `help` elements.
|
|
128
|
+
* const { baseControlProps, controlProps } = useBaseControlProps( baseProps );
|
|
129
|
+
*
|
|
130
|
+
* return (
|
|
131
|
+
* <BaseControl { ...baseControlProps } __nextHasNoMarginBottom>
|
|
132
|
+
* <textarea { ...controlProps }>
|
|
133
|
+
* { children }
|
|
134
|
+
* </textarea>
|
|
135
|
+
* </BaseControl>
|
|
136
|
+
* );
|
|
137
|
+
* );
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
144
140
|
export const BaseControl = Object.assign(
|
|
145
141
|
contextConnectWithoutRef( UnconnectedBaseControl, 'BaseControl' ),
|
|
146
|
-
|
|
142
|
+
|
|
143
|
+
{
|
|
144
|
+
/**
|
|
145
|
+
* `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.
|
|
146
|
+
*
|
|
147
|
+
* It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,
|
|
148
|
+
* e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would
|
|
149
|
+
* otherwise use if the `label` prop was passed.
|
|
150
|
+
*
|
|
151
|
+
* ```jsx
|
|
152
|
+
* import { BaseControl } from '@wordpress/components';
|
|
153
|
+
*
|
|
154
|
+
* const MyBaseControl = () => (
|
|
155
|
+
* <BaseControl
|
|
156
|
+
* __nextHasNoMarginBottom
|
|
157
|
+
* help="This button is already accessibly labeled."
|
|
158
|
+
* >
|
|
159
|
+
* <BaseControl.VisualLabel>Author</BaseControl.VisualLabel>
|
|
160
|
+
* <Button>Select an author</Button>
|
|
161
|
+
* </BaseControl>
|
|
162
|
+
* );
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
VisualLabel,
|
|
166
|
+
}
|
|
147
167
|
);
|
|
148
168
|
|
|
149
169
|
export default BaseControl;
|
|
@@ -10,6 +10,13 @@ export type BaseControlProps = {
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
__nextHasNoMarginBottom?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Temporary private prop for showing better deprecation messages,
|
|
15
|
+
* e.g. `Some feature from wp.components.${ __associatedWPControl } is deprecated`.
|
|
16
|
+
*
|
|
17
|
+
* @ignore
|
|
18
|
+
*/
|
|
19
|
+
__associatedWPComponentName?: string;
|
|
13
20
|
/**
|
|
14
21
|
* The HTML `id` of the control element (passed in as a child to `BaseControl`) to which labels and help text are being generated.
|
|
15
22
|
* This is necessary to accessibly associate the label with that element.
|
|
@@ -169,3 +169,10 @@ const splitBorders = {
|
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
- Required: No
|
|
172
|
+
|
|
173
|
+
### `__next40pxDefaultSize`: `boolean`
|
|
174
|
+
|
|
175
|
+
Start opting into the larger default height that will become the default size in a future version.
|
|
176
|
+
|
|
177
|
+
- Required: No
|
|
178
|
+
- Default: `false`
|
|
@@ -173,3 +173,10 @@ Flags whether this `BorderControl` should also render a `RangeControl` for
|
|
|
173
173
|
additional control over a border's width.
|
|
174
174
|
|
|
175
175
|
- Required: No
|
|
176
|
+
|
|
177
|
+
### `__next40pxDefaultSize`: `boolean`
|
|
178
|
+
|
|
179
|
+
Start opting into the larger default height that will become the default size in a future version.
|
|
180
|
+
|
|
181
|
+
- Required: No
|
|
182
|
+
- Default: `false`
|
|
@@ -18,6 +18,7 @@ import { contextConnect } from '../../context';
|
|
|
18
18
|
import { useBorderControl } from './hook';
|
|
19
19
|
|
|
20
20
|
import type { BorderControlProps, LabelProps } from '../types';
|
|
21
|
+
import { Spacer } from '../../spacer';
|
|
21
22
|
|
|
22
23
|
const BorderLabel = ( props: LabelProps ) => {
|
|
23
24
|
const { label, hideLabelFromVision } = props;
|
|
@@ -75,22 +76,28 @@ const UnconnectedBorderControl = (
|
|
|
75
76
|
<HStack spacing={ 4 } className={ innerWrapperClassName }>
|
|
76
77
|
<UnitControl
|
|
77
78
|
prefix={
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
79
|
+
<Spacer marginRight={ 1 } marginBottom={ 0 }>
|
|
80
|
+
<BorderControlDropdown
|
|
81
|
+
border={ border }
|
|
82
|
+
colors={ colors }
|
|
83
|
+
__unstablePopoverProps={
|
|
84
|
+
__unstablePopoverProps
|
|
85
|
+
}
|
|
86
|
+
disableCustomColors={ disableCustomColors }
|
|
87
|
+
enableAlpha={ enableAlpha }
|
|
88
|
+
enableStyle={ enableStyle }
|
|
89
|
+
isStyleSettable={ isStyleSettable }
|
|
90
|
+
onChange={ onBorderChange }
|
|
91
|
+
previousStyleSelection={
|
|
92
|
+
previousStyleSelection
|
|
93
|
+
}
|
|
94
|
+
showDropdownHeader={ showDropdownHeader }
|
|
95
|
+
__experimentalIsRenderedInSidebar={
|
|
96
|
+
__experimentalIsRenderedInSidebar
|
|
97
|
+
}
|
|
98
|
+
size={ size }
|
|
99
|
+
/>
|
|
100
|
+
</Spacer>
|
|
94
101
|
}
|
|
95
102
|
label={ __( 'Border width' ) }
|
|
96
103
|
hideLabelFromVision
|
|
@@ -99,7 +99,7 @@ export const colorIndicatorWrapper = (
|
|
|
99
99
|
const { style } = border || {};
|
|
100
100
|
|
|
101
101
|
return css`
|
|
102
|
-
border-radius:
|
|
102
|
+
border-radius: ${ CONFIG.radiusFull };
|
|
103
103
|
border: 2px solid transparent;
|
|
104
104
|
${ style ? colorIndicatorBorder( border ) : undefined }
|
|
105
105
|
width: ${ size === '__unstable-large' ? '24px' : '22px' };
|
package/src/button/README.md
CHANGED
|
@@ -292,6 +292,13 @@ Specifies the button's style. The accepted values are `'primary'` (the primary b
|
|
|
292
292
|
|
|
293
293
|
- Required: No
|
|
294
294
|
|
|
295
|
+
#### `__next40pxDefaultSize`: `boolean`
|
|
296
|
+
|
|
297
|
+
Start opting into the larger default height that will become the default size in a future version.
|
|
298
|
+
|
|
299
|
+
- Required: No
|
|
300
|
+
- Default: `false`
|
|
301
|
+
|
|
295
302
|
## Related components
|
|
296
303
|
|
|
297
304
|
- To group buttons together, use the [ButtonGroup](/packages/components/src/button-group/README.md) component.
|
package/src/button/style.scss
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
align-items: center;
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
padding: 6px 12px;
|
|
25
|
-
border-radius: $radius-
|
|
25
|
+
border-radius: $radius-small;
|
|
26
26
|
color: $components-color-foreground;
|
|
27
27
|
|
|
28
28
|
&.is-next-40px-default-size {
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
height: auto;
|
|
250
250
|
|
|
251
251
|
&:focus {
|
|
252
|
-
border-radius: $radius-
|
|
252
|
+
border-radius: $radius-small;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
&:disabled,
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&:first-child {
|
|
15
|
-
border-radius: $radius-
|
|
15
|
+
border-radius: $radius-small 0 0 $radius-small;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&:last-child {
|
|
19
|
-
border-radius: 0 $radius-
|
|
19
|
+
border-radius: 0 $radius-small $radius-small 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
// The focused button should be elevated so the focus ring isn't cropped,
|
|
@@ -20,13 +20,20 @@ const noop = () => {};
|
|
|
20
20
|
const getInput = () => screen.getByRole( 'checkbox' ) as HTMLInputElement;
|
|
21
21
|
|
|
22
22
|
const CheckboxControl = ( props: Omit< CheckboxControlProps, 'onChange' > ) => {
|
|
23
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
<BaseCheckboxControl
|
|
25
|
+
onChange={ noop }
|
|
26
|
+
{ ...props }
|
|
27
|
+
__nextHasNoMarginBottom
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
const ControlledCheckboxControl = ( { onChange }: CheckboxControlProps ) => {
|
|
27
33
|
const [ isChecked, setChecked ] = useState( false );
|
|
28
34
|
return (
|
|
29
35
|
<BaseCheckboxControl
|
|
36
|
+
__nextHasNoMarginBottom
|
|
30
37
|
checked={ isChecked }
|
|
31
38
|
onChange={ ( value ) => {
|
|
32
39
|
setChecked( value );
|
|
@@ -8,7 +8,7 @@ import type { ForwardedRef } from 'react';
|
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
10
|
import { useInstanceId } from '@wordpress/compose';
|
|
11
|
-
import { forwardRef, useContext } from '@wordpress/element';
|
|
11
|
+
import { forwardRef, useContext, useEffect } from '@wordpress/element';
|
|
12
12
|
import { Icon, check } from '@wordpress/icons';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -16,9 +16,9 @@ import { Icon, check } from '@wordpress/icons';
|
|
|
16
16
|
*/
|
|
17
17
|
import { CircularOptionPickerContext } from './circular-option-picker-context';
|
|
18
18
|
import Button from '../button';
|
|
19
|
-
import {
|
|
19
|
+
import { Composite } from '../composite';
|
|
20
20
|
import Tooltip from '../tooltip';
|
|
21
|
-
import type { OptionProps
|
|
21
|
+
import type { OptionProps } from './types';
|
|
22
22
|
|
|
23
23
|
function UnforwardedOptionAsButton(
|
|
24
24
|
props: {
|
|
@@ -45,19 +45,24 @@ function UnforwardedOptionAsOption(
|
|
|
45
45
|
id: string;
|
|
46
46
|
className?: string;
|
|
47
47
|
isSelected?: boolean;
|
|
48
|
-
compositeStore: CircularOptionPickerCompositeStore;
|
|
49
48
|
},
|
|
50
49
|
forwardedRef: ForwardedRef< any >
|
|
51
50
|
) {
|
|
52
|
-
const { id, isSelected,
|
|
53
|
-
const activeId = compositeStore.useState( 'activeId' );
|
|
51
|
+
const { id, isSelected, ...additionalProps } = props;
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
const { setActiveId, activeId } = useContext( CircularOptionPickerContext );
|
|
54
|
+
|
|
55
|
+
useEffect( () => {
|
|
56
|
+
if ( isSelected && ! activeId ) {
|
|
57
|
+
// The setTimeout call is necessary to make sure that this update
|
|
58
|
+
// doesn't get overridden by `Composite`'s internal logic, which picks
|
|
59
|
+
// an initial active item if one is not specifically set.
|
|
60
|
+
window.setTimeout( () => setActiveId?.( id ), 0 );
|
|
61
|
+
}
|
|
62
|
+
}, [ isSelected, setActiveId, activeId, id ] );
|
|
58
63
|
|
|
59
64
|
return (
|
|
60
|
-
<
|
|
65
|
+
<Composite.Item
|
|
61
66
|
render={
|
|
62
67
|
<Button
|
|
63
68
|
{ ...additionalProps }
|
|
@@ -66,7 +71,6 @@ function UnforwardedOptionAsOption(
|
|
|
66
71
|
ref={ forwardedRef }
|
|
67
72
|
/>
|
|
68
73
|
}
|
|
69
|
-
store={ compositeStore }
|
|
70
74
|
id={ id }
|
|
71
75
|
/>
|
|
72
76
|
);
|
|
@@ -81,9 +85,7 @@ export function Option( {
|
|
|
81
85
|
tooltipText,
|
|
82
86
|
...additionalProps
|
|
83
87
|
}: OptionProps ) {
|
|
84
|
-
const { baseId,
|
|
85
|
-
CircularOptionPickerContext
|
|
86
|
-
);
|
|
88
|
+
const { baseId, setActiveId } = useContext( CircularOptionPickerContext );
|
|
87
89
|
const id = useInstanceId(
|
|
88
90
|
Option,
|
|
89
91
|
baseId || 'components-circular-option-picker__option'
|
|
@@ -95,12 +97,9 @@ export function Option( {
|
|
|
95
97
|
...additionalProps,
|
|
96
98
|
};
|
|
97
99
|
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
compositeStore={ compositeStore }
|
|
102
|
-
isSelected={ isSelected }
|
|
103
|
-
/>
|
|
100
|
+
const isListbox = setActiveId !== undefined;
|
|
101
|
+
const optionControl = isListbox ? (
|
|
102
|
+
<OptionAsOption { ...commonProps } isSelected={ isSelected } />
|
|
104
103
|
) : (
|
|
105
104
|
<OptionAsButton { ...commonProps } isPressed={ isSelected } />
|
|
106
105
|
);
|
|
@@ -8,12 +8,13 @@ import clsx from 'clsx';
|
|
|
8
8
|
*/
|
|
9
9
|
import { useInstanceId } from '@wordpress/compose';
|
|
10
10
|
import { isRTL } from '@wordpress/i18n';
|
|
11
|
+
import { useMemo, useState } from '@wordpress/element';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Internal dependencies
|
|
14
15
|
*/
|
|
15
16
|
import { CircularOptionPickerContext } from './circular-option-picker-context';
|
|
16
|
-
import { Composite
|
|
17
|
+
import { Composite } from '../composite';
|
|
17
18
|
import type {
|
|
18
19
|
CircularOptionPickerProps,
|
|
19
20
|
ListboxCircularOptionPickerProps,
|
|
@@ -85,24 +86,30 @@ function ListboxCircularOptionPicker(
|
|
|
85
86
|
...additionalProps
|
|
86
87
|
} = props;
|
|
87
88
|
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
} );
|
|
89
|
+
const [ activeId, setActiveId ] = useState< string | null | undefined >(
|
|
90
|
+
undefined
|
|
91
|
+
);
|
|
92
92
|
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
const contextValue = useMemo(
|
|
94
|
+
() => ( {
|
|
95
|
+
baseId,
|
|
96
|
+
activeId,
|
|
97
|
+
setActiveId,
|
|
98
|
+
} ),
|
|
99
|
+
[ baseId, activeId, setActiveId ]
|
|
100
|
+
);
|
|
97
101
|
|
|
98
102
|
return (
|
|
99
103
|
<div className={ className }>
|
|
100
|
-
<CircularOptionPickerContext.Provider value={
|
|
104
|
+
<CircularOptionPickerContext.Provider value={ contextValue }>
|
|
101
105
|
<Composite
|
|
102
106
|
{ ...additionalProps }
|
|
103
107
|
id={ baseId }
|
|
104
|
-
|
|
108
|
+
focusLoop={ loop }
|
|
109
|
+
rtl={ isRTL() }
|
|
105
110
|
role="listbox"
|
|
111
|
+
activeId={ activeId }
|
|
112
|
+
setActiveId={ setActiveId }
|
|
106
113
|
>
|
|
107
114
|
{ options }
|
|
108
115
|
</Composite>
|
|
@@ -118,9 +125,16 @@ function ButtonsCircularOptionPicker(
|
|
|
118
125
|
) {
|
|
119
126
|
const { actions, options, children, baseId, ...additionalProps } = props;
|
|
120
127
|
|
|
128
|
+
const contextValue = useMemo(
|
|
129
|
+
() => ( {
|
|
130
|
+
baseId,
|
|
131
|
+
} ),
|
|
132
|
+
[ baseId ]
|
|
133
|
+
);
|
|
134
|
+
|
|
121
135
|
return (
|
|
122
136
|
<div { ...additionalProps } id={ baseId }>
|
|
123
|
-
<CircularOptionPickerContext.Provider value={
|
|
137
|
+
<CircularOptionPickerContext.Provider value={ contextValue }>
|
|
124
138
|
{ options }
|
|
125
139
|
{ children }
|
|
126
140
|
{ actions }
|
|
@@ -70,7 +70,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
70
70
|
height: 100%;
|
|
71
71
|
width: 100%;
|
|
72
72
|
border: none;
|
|
73
|
-
border-radius:
|
|
73
|
+
border-radius: $radius-round;
|
|
74
74
|
background: transparent;
|
|
75
75
|
box-shadow: inset 0 0 0 ($color-palette-circle-size * 0.5);
|
|
76
76
|
transition: 100ms box-shadow ease;
|
|
@@ -93,7 +93,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
93
93
|
position: absolute;
|
|
94
94
|
left: 2px;
|
|
95
95
|
top: 2px;
|
|
96
|
-
border-radius:
|
|
96
|
+
border-radius: $radius-round;
|
|
97
97
|
z-index: z-index(".components-circular-option-picker__option.is-pressed + svg");
|
|
98
98
|
pointer-events: none;
|
|
99
99
|
}
|
|
@@ -109,7 +109,7 @@ $color-palette-circle-spacing: 12px;
|
|
|
109
109
|
border-radius: $radius-round;
|
|
110
110
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
|
|
111
111
|
// Show a thin circular outline in Windows high contrast mode, otherwise the button is invisible.
|
|
112
|
-
border:
|
|
112
|
+
border: $border-width solid transparent;
|
|
113
113
|
box-sizing: inherit;
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -14,7 +14,6 @@ import type { Icon } from '@wordpress/icons';
|
|
|
14
14
|
import type { ButtonAsButtonProps } from '../button/types';
|
|
15
15
|
import type { DropdownProps } from '../dropdown/types';
|
|
16
16
|
import type { WordPressComponentProps } from '../context';
|
|
17
|
-
import type { CompositeStore } from '../composite/v2';
|
|
18
17
|
|
|
19
18
|
type CommonCircularOptionPickerProps = {
|
|
20
19
|
/**
|
|
@@ -123,8 +122,8 @@ export type OptionProps = Omit<
|
|
|
123
122
|
>;
|
|
124
123
|
};
|
|
125
124
|
|
|
126
|
-
export type CircularOptionPickerCompositeStore = CompositeStore;
|
|
127
125
|
export type CircularOptionPickerContextProps = {
|
|
128
126
|
baseId?: string;
|
|
129
|
-
|
|
127
|
+
activeId?: string | null | undefined;
|
|
128
|
+
setActiveId?: ( newId: string | null | undefined ) => void;
|
|
130
129
|
};
|
|
@@ -32,21 +32,21 @@ export default function ClipboardButton( {
|
|
|
32
32
|
alternative: 'wp.compose.useCopyToClipboard',
|
|
33
33
|
} );
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const timeoutIdRef = useRef< NodeJS.Timeout >();
|
|
36
36
|
const ref = useCopyToClipboard( text, () => {
|
|
37
37
|
onCopy();
|
|
38
|
-
if (
|
|
39
|
-
clearTimeout(
|
|
38
|
+
if ( timeoutIdRef.current ) {
|
|
39
|
+
clearTimeout( timeoutIdRef.current );
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
if ( onFinishCopy ) {
|
|
43
|
-
|
|
43
|
+
timeoutIdRef.current = setTimeout( () => onFinishCopy(), TIMEOUT );
|
|
44
44
|
}
|
|
45
45
|
} );
|
|
46
46
|
|
|
47
47
|
useEffect( () => {
|
|
48
|
-
if (
|
|
49
|
-
clearTimeout(
|
|
48
|
+
if ( timeoutIdRef.current ) {
|
|
49
|
+
clearTimeout( timeoutIdRef.current );
|
|
50
50
|
}
|
|
51
51
|
}, [] );
|
|
52
52
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
width: $grid-unit-50 * 0.5;
|
|
3
3
|
height: $grid-unit-50 * 0.5;
|
|
4
4
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
|
|
5
|
-
border-radius:
|
|
5
|
+
border-radius: $radius-round;
|
|
6
6
|
display: inline-block;
|
|
7
7
|
padding: 0;
|
|
8
8
|
background: $white linear-gradient(-45deg, transparent 48%, $gray-300 48%, $gray-300 52%, transparent 52%);
|
|
@@ -14,7 +14,7 @@ $border-as-box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.2);
|
|
|
14
14
|
cursor: pointer;
|
|
15
15
|
// Show a thin outline in Windows high contrast mode.
|
|
16
16
|
outline: 1px solid transparent;
|
|
17
|
-
border-radius: $radius-
|
|
17
|
+
border-radius: $radius-medium $radius-medium 0 0;
|
|
18
18
|
box-shadow: $border-as-box-shadow;
|
|
19
19
|
|
|
20
20
|
&:focus {
|
|
@@ -46,7 +46,7 @@ $border-as-box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.2);
|
|
|
46
46
|
|
|
47
47
|
.components-color-palette__custom-color-text-wrapper {
|
|
48
48
|
padding: $grid-unit-15 $grid-unit-20;
|
|
49
|
-
border-radius: 0 0 $radius-
|
|
49
|
+
border-radius: 0 0 $radius-medium $radius-medium;
|
|
50
50
|
position: relative;
|
|
51
51
|
font-size: $default-font-size;
|
|
52
52
|
|
|
@@ -26,18 +26,37 @@ describe( 'ColorPalette: Utils', () => {
|
|
|
26
26
|
} );
|
|
27
27
|
|
|
28
28
|
describe( 'normalizeColorValue', () => {
|
|
29
|
-
test( 'should return the value
|
|
29
|
+
test( 'should return the value if the value argument is not a CSS variable', () => {
|
|
30
30
|
const element = document.createElement( 'div' );
|
|
31
31
|
expect( normalizeColorValue( '#ff0000', element ) ).toBe(
|
|
32
32
|
'#ff0000'
|
|
33
33
|
);
|
|
34
34
|
} );
|
|
35
|
-
test( 'should return the background color computed from
|
|
35
|
+
test( 'should return the background color computed from an element if the value argument is a CSS variable', () => {
|
|
36
36
|
const element = document.createElement( 'div' );
|
|
37
37
|
element.style.backgroundColor = '#ff0000';
|
|
38
38
|
expect( normalizeColorValue( 'var(--red)', element ) ).toBe(
|
|
39
39
|
'#ff0000'
|
|
40
40
|
);
|
|
41
41
|
} );
|
|
42
|
+
test( 'should return the background color computed from an element if the value argument is a color mix', () => {
|
|
43
|
+
const element = document.createElement( 'div' );
|
|
44
|
+
element.style.backgroundColor = '#ff0000';
|
|
45
|
+
expect(
|
|
46
|
+
normalizeColorValue(
|
|
47
|
+
'color-mix(in oklab, #a71e14, white)',
|
|
48
|
+
element
|
|
49
|
+
)
|
|
50
|
+
).toBe( '#ff0000' );
|
|
51
|
+
} );
|
|
52
|
+
test( 'should return the value if the value argument is undefined', () => {
|
|
53
|
+
const element = document.createElement( 'div' );
|
|
54
|
+
expect( normalizeColorValue( undefined, element ) ).toBe(
|
|
55
|
+
undefined
|
|
56
|
+
);
|
|
57
|
+
} );
|
|
58
|
+
test( 'should return the value if the element argument is null', () => {
|
|
59
|
+
expect( normalizeColorValue( '#ff0000', null ) ).toBe( '#ff0000' );
|
|
60
|
+
} );
|
|
42
61
|
} );
|
|
43
62
|
} );
|