@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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,163 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 28.7.0 (2024-09-05)
|
|
6
|
+
|
|
7
|
+
### Deprecations
|
|
8
|
+
|
|
9
|
+
- Deprecate `replace` from the options accepted by `useNavigator().goTo()` ([#64675](https://github.com/WordPress/gutenberg/pull/64675)).
|
|
10
|
+
- Soft deprecate `size` prop on `AlignmentMatrixControl.Icon` ([#64827](https://github.com/WordPress/gutenberg/pull/64827)).
|
|
11
|
+
- `__experimentalAlignmentMatrixControl` can now be imported as a stable `AlignmentMatrixControl` ([#60913](https://github.com/WordPress/gutenberg/pull/60913)).
|
|
12
|
+
- Deprecate `DimensionControl`, scheduled to be removed in WordPress 7.0 ([#64951](https://github.com/WordPress/gutenberg/pull/64951)).
|
|
13
|
+
|
|
14
|
+
### Enhancements
|
|
15
|
+
|
|
16
|
+
- `ColorPicker`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
17
|
+
- `CustomSelectControl V2`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
18
|
+
- `AlignmentMatrixControl.Icon`: rewrite entirely using SVG markup ([#64827](https://github.com/WordPress/gutenberg/pull/64827)).
|
|
19
|
+
- `DateTime`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
20
|
+
- `FormToggle`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
21
|
+
- `FormTokenField`: Remove unused border-radius ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
22
|
+
- `InputControl`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
23
|
+
- `Navigation`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
24
|
+
- `RangeControl`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
25
|
+
- `ResizeableBox`: Adopt radius scale ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
26
|
+
- `TabPanel`: Remove radius applied to panel focus style ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
27
|
+
- `Tabs`: Remove radius applied to panel focus style ([#64693](https://github.com/WordPress/gutenberg/pull/64693)).
|
|
28
|
+
- `UnitControl`: Update unit select styles ([#64712](https://github.com/WordPress/gutenberg/pull/64712)).
|
|
29
|
+
- `InputControl`: Add variants to prefix/suffix wrappers ([#64824](https://github.com/WordPress/gutenberg/pull/64824)).
|
|
30
|
+
- `Navigator`: remove location history, simplify internal logic ([#64675](https://github.com/WordPress/gutenberg/pull/64675)).
|
|
31
|
+
- `AlignmentMatrixControl`: Promote to stable ([#60913](https://github.com/WordPress/gutenberg/pull/60913)).
|
|
32
|
+
- Tighten gap between the main control and the prefix/suffix slot for the following components ([#64908](https://github.com/WordPress/gutenberg/pull/64908)).
|
|
33
|
+
- `InputControl`
|
|
34
|
+
- `NumberControl`
|
|
35
|
+
- `SelectControl`
|
|
36
|
+
- `TreeSelect`
|
|
37
|
+
- `UnitControl`
|
|
38
|
+
- Contains internal visual changes from this PR:
|
|
39
|
+
- `AnglePickerControl`
|
|
40
|
+
- `ColorPicker`
|
|
41
|
+
- Decrease horizontal padding from 16px to 12px on the following components, when in the 40px default size ([#64708](https://github.com/WordPress/gutenberg/pull/64708)).
|
|
42
|
+
- `AnglePickerControl`
|
|
43
|
+
- `ColorPicker` (on the inputs)
|
|
44
|
+
- `CustomSelectControl`
|
|
45
|
+
- `CustomSelectControlV2`
|
|
46
|
+
- `DateTimePicker` (on the selects and inputs)
|
|
47
|
+
- `DimensionControl`
|
|
48
|
+
- `FocalPointPicker` (on the inputs)
|
|
49
|
+
- `FontSizePicker` (on the custom inputs)
|
|
50
|
+
- `GradientPicker` (on the selects and inputs)
|
|
51
|
+
- `InputControl`
|
|
52
|
+
- `NumberControl`
|
|
53
|
+
- `QueryControls` (on the selects and inputs)
|
|
54
|
+
- `RangeControl` (on the inputs)
|
|
55
|
+
- `SearchControl`
|
|
56
|
+
- `SelectControl`
|
|
57
|
+
- `TextControl`
|
|
58
|
+
- `TimePicker` (on the inputs)
|
|
59
|
+
- `TreeSelect`
|
|
60
|
+
- `UnitControl`
|
|
61
|
+
- `Modal`: Update animation effect ([#64580](https://github.com/WordPress/gutenberg/pull/64580)).
|
|
62
|
+
- `AlignmentMatrixControl`: do not use composite store directly ([#64850](https://github.com/WordPress/gutenberg/pull/64850)).
|
|
63
|
+
- `CircularOptionPicker`: do not use composite store directly ([#64833](https://github.com/WordPress/gutenberg/pull/64833)).
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
- `TimePicker`: use ToggleGroupControl for AM/PM toggle ([#64800](https://github.com/WordPress/gutenberg/pull/64800)).
|
|
68
|
+
- `ColorPalette` utils: do not normalize undefined color values ([#64969](https://github.com/WordPress/gutenberg/pull/64969)).
|
|
69
|
+
- `DatePicker` restore round radius for event dot ([#65031](https://github.com/WordPress/gutenberg/pull/65031)).
|
|
70
|
+
|
|
71
|
+
### Internal
|
|
72
|
+
|
|
73
|
+
- `DropdownMenu` v2: expose CompositeTypeaheadV2 and CompositeHoverV2 via private APIs ([#64985](https://github.com/WordPress/gutenberg/pull/64985)).
|
|
74
|
+
- `DropdownMenu` v2: fix flashing menu item styles when using keyboard ([#64873](https://github.com/WordPress/gutenberg/pull/64873), [#64942](https://github.com/WordPress/gutenberg/pull/64942)).
|
|
75
|
+
- `DropdownMenu` v2: refactor to overloaded naming convention ([#64654](https://github.com/WordPress/gutenberg/pull/64654)).
|
|
76
|
+
- `DropdownMenu` v2: add `GroupLabel` subcomponent ([#64854](https://github.com/WordPress/gutenberg/pull/64854)).
|
|
77
|
+
- `DropdownMenuV2`: update animation ([#64868](https://github.com/WordPress/gutenberg/pull/64868)).
|
|
78
|
+
- `Composite` V2: fix Storybook docgen ([#64682](https://github.com/WordPress/gutenberg/pull/64682)).
|
|
79
|
+
- `Composite` V2: add "With Slot Fill" example ([#65051](https://github.com/WordPress/gutenberg/pull/65051)).
|
|
80
|
+
- `Composite` V2: accept store props on top-level component ([#64832](https://github.com/WordPress/gutenberg/pull/64832)).
|
|
81
|
+
|
|
82
|
+
## 28.6.0 (2024-08-21)
|
|
83
|
+
|
|
84
|
+
### Deprecations
|
|
85
|
+
|
|
86
|
+
- Deprecate bottom margin on the following `BaseControl`-based components. Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version ([#64408](https://github.com/WordPress/gutenberg/pull/64408)).
|
|
87
|
+
- `BaseControl`
|
|
88
|
+
- `CheckboxControl`
|
|
89
|
+
- `ComboboxControl`
|
|
90
|
+
- `DimensionControl`
|
|
91
|
+
- `FocalPointPicker`
|
|
92
|
+
- `RangeControl`
|
|
93
|
+
- `SearchControl`
|
|
94
|
+
- `SelectControl`
|
|
95
|
+
- `TextControl`
|
|
96
|
+
- `TextareaControl`
|
|
97
|
+
- `ToggleControl`
|
|
98
|
+
- `ToggleGroupControl`
|
|
99
|
+
- `TreeSelect`
|
|
100
|
+
- Deprecate `NavigatorToParentButton` and `useNavigator().goToParent()` in favor of `NavigatorBackButton` and `useNavigator().goBack()` ([#63317](https://github.com/WordPress/gutenberg/pull/63317)).
|
|
101
|
+
|
|
102
|
+
### Enhancements
|
|
103
|
+
|
|
104
|
+
- `Placeholder`: Temporarily rewind radius scale ([#64672](https://github.com/WordPress/gutenberg/pull/64672)).
|
|
105
|
+
- `Composite`: improve Storybook examples and add interactive controls ([#64397](https://github.com/WordPress/gutenberg/pull/64397)).
|
|
106
|
+
- `Composite`: use internal context to forward the composite store to sub-components ([#64493](https://github.com/WordPress/gutenberg/pull/64493)).
|
|
107
|
+
- `QueryControls`: Default to new 40px size ([#64457](https://github.com/WordPress/gutenberg/pull/64457)).
|
|
108
|
+
- `TimePicker`: add `hideLabelFromVision` prop ([#64267](https://github.com/WordPress/gutenberg/pull/64267)).
|
|
109
|
+
- `FocalPointPicker`: Default to new 40px size ([#64456](https://github.com/WordPress/gutenberg/pull/64456)).
|
|
110
|
+
- `DropdownMenuV2`: adopt elevation scale ([#64432](https://github.com/WordPress/gutenberg/pull/64432)).
|
|
111
|
+
- `AlignmentMatrixControl`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
112
|
+
- `AnglePickerControl`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
113
|
+
- `BorderControl`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
114
|
+
- `ButtonGroup`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
115
|
+
- `Button`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
116
|
+
- `CircularOptionPicker`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
117
|
+
- `ColorIndicator`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
118
|
+
- `ColorPalette`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
119
|
+
- `CustomGradientPicker`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
120
|
+
- `DropZone`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
121
|
+
- `DropdownMenuV2`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
122
|
+
- `FocalPointPicker`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
123
|
+
- `Guide`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
124
|
+
- `Modal`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
125
|
+
- `Placeholder`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
126
|
+
- `Popover`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
127
|
+
- `ProgressBar`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
128
|
+
- `RadioControl`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
129
|
+
- `Snackbar`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
130
|
+
- `TabPanel`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
131
|
+
- `Text`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
132
|
+
- `ToggleGroupControl`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
133
|
+
- `ToolbarGroup`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
134
|
+
- `Toolbar`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
135
|
+
- `Tooltip`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
136
|
+
- `UnitControl`: Adopt radius scale ([#64368](https://github.com/WordPress/gutenberg/pull/64368)).
|
|
137
|
+
- `Popover`: allow `style` prop usage ([#64489](https://github.com/WordPress/gutenberg/pull/64489)).
|
|
138
|
+
- `ToolsPanel`: sets column-gap to 16px for ToolsPanel grid ([#64497](https://github.com/WordPress/gutenberg/pull/64497)).
|
|
139
|
+
- `Modal`: Replace references to deprecated styling variables ([#64655](https://github.com/WordPress/gutenberg/pull/64655)).
|
|
140
|
+
- `Popover`: Replace references to deprecated styling variables ([#64655](https://github.com/WordPress/gutenberg/pull/64655)).
|
|
141
|
+
- `Snackbar`: Replace references to deprecated styling variables ([#64655](https://github.com/WordPress/gutenberg/pull/64655)).
|
|
142
|
+
- `TextareaControl`: Update styles ([#64586](https://github.com/WordPress/gutenberg/pull/64586)).
|
|
143
|
+
- `CircularOptionPicker`: Update hard-coded border-width value ([#64680](https://github.com/WordPress/gutenberg/pull/64680)).
|
|
144
|
+
- `CustomGradientPicker`: Update hard-coded border-width value ([#64680](https://github.com/WordPress/gutenberg/pull/64680)).
|
|
145
|
+
|
|
146
|
+
### Bug Fixes
|
|
147
|
+
|
|
148
|
+
- `RangeControl`: disable reset button when the current value is equal to the reset value ([#64579](https://github.com/WordPress/gutenberg/pull/64579)).
|
|
149
|
+
- `RangeControl`: tweak mark and label absolute positioning ([#64487](https://github.com/WordPress/gutenberg/pull/64487)).
|
|
150
|
+
- `RadioGroup`: use fieldset and legend to group radio inputs ([#64582](https://github.com/WordPress/gutenberg/pull/64582)).
|
|
151
|
+
|
|
152
|
+
### Internal
|
|
153
|
+
|
|
154
|
+
- `Composite` v2: add `Hover` and `Typeahead` subcomponents ([#64399](https://github.com/WordPress/gutenberg/pull/64399)).
|
|
155
|
+
- `Composite` v2: add focus-related props to `Composite`and`Composite.Item` subcomponents ([#64450](https://github.com/WordPress/gutenberg/pull/64450)).
|
|
156
|
+
- `Composite` v2: add `Context` subcomponent ([#64493](https://github.com/WordPress/gutenberg/pull/64493)).
|
|
157
|
+
- `DropdownMenu` v2: use themed color variables ([#64647](https://github.com/WordPress/gutenberg/pull/64647)).
|
|
158
|
+
- `CustomSelectControl`: Improve type inferring ([#64412](https://github.com/WordPress/gutenberg/pull/64412)).
|
|
159
|
+
- Update `ariakit` to version `0.4.10` ([#64637](https://github.com/WordPress/gutenberg/pull/64637)).
|
|
160
|
+
- Ariakit: Use `useStoreState()` instead of `store.useState()` ([#64648](https://github.com/WordPress/gutenberg/pull/64648)).
|
|
161
|
+
|
|
5
162
|
## 28.5.0 (2024-08-07)
|
|
6
163
|
|
|
7
164
|
### Bug Fixes
|
|
@@ -17,11 +174,13 @@
|
|
|
17
174
|
|
|
18
175
|
### Enhancements
|
|
19
176
|
|
|
177
|
+
- `ColorPalette`: partial support of `color-mix()` CSS colors ([#64224](https://github.com/WordPress/gutenberg/pull/64224)).
|
|
20
178
|
- `TimeInput`: Expose as subcomponent of `TimePicker` ([#63145](https://github.com/WordPress/gutenberg/pull/63145)).
|
|
21
179
|
- `RadioControl`: add support for option help text ([#63751](https://github.com/WordPress/gutenberg/pull/63751)).
|
|
22
180
|
- `SelectControl`: Infer `value` type from `options` ([#64069](https://github.com/WordPress/gutenberg/pull/64069)).
|
|
23
181
|
- `Guide`: Add `__next40pxDefaultSize` to buttons ([#64181](https://github.com/WordPress/gutenberg/pull/64181)).
|
|
24
182
|
- `SelectControl`: Pass through `options` props ([#64211](https://github.com/WordPress/gutenberg/pull/64211)).
|
|
183
|
+
- `DimensionControl`: Add `__nextHasNoMarginBottom` prop to remove bottom margin ([#64346](https://github.com/WordPress/gutenberg/pull/64346)).
|
|
25
184
|
|
|
26
185
|
### Internal
|
|
27
186
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -6,20 +6,20 @@ The following is a set of guidelines for contributing to the `@wordpress/compone
|
|
|
6
6
|
|
|
7
7
|
This set of guidelines should apply especially to newly introduced components. In fact, while these guidelines should also be retroactively applied to existing components, it is sometimes impossible to do so for legacy/compatibility reasons.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
9
|
+
- [Introducing new components](#introducing-new-components)
|
|
10
|
+
- [Compatibility](#compatibility)
|
|
11
|
+
- [Compound components](#compound-components)
|
|
12
|
+
- [Components & Hooks](#components--hooks)
|
|
13
|
+
- [Naming Conventions](#naming-conventions)
|
|
14
|
+
- [TypeScript](#typescript)
|
|
15
|
+
- [Styling](#styling)
|
|
16
|
+
- [Context system](#context-system)
|
|
17
|
+
- [Unit tests](#unit-tests)
|
|
18
|
+
- [Storybook](#storybook)
|
|
19
|
+
- [Documentation](#documentation)
|
|
20
|
+
- [README example](#README-example)
|
|
21
|
+
- [Folder structure](#folder-structure)
|
|
22
|
+
- [Component versioning](#component-versioning)
|
|
23
23
|
|
|
24
24
|
## Introducing new components
|
|
25
25
|
|
|
@@ -95,13 +95,13 @@ In these situations, one possible approach is to "soft-deprecate" a given legacy
|
|
|
95
95
|
2. Updating all places in Gutenberg that use that API.
|
|
96
96
|
3. Adding deprecation warnings (only after the previous point is completed, otherwise the Browser Console will be polluted by all those warnings and some e2e tests may fail).
|
|
97
97
|
|
|
98
|
-
When adding new components or new props to existing components, it's recommended to
|
|
98
|
+
When adding new components or new props to existing components, it's recommended to create a [private version](/packages/private-apis/README.md)) of the component until the changes are stable enough to be exposed as part of the public API.
|
|
99
99
|
|
|
100
100
|
### Learn more
|
|
101
101
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
102
|
+
- [How to preserve backward compatibility for a React Component](/docs/contributors/code/backward-compatibility.md#how-to-preserve-backward-compatibility-for-a-react-component)
|
|
103
|
+
- [Experimental and Unstable APIs](/docs/contributors/code/coding-guidelines.md#legacy-experimental-apis-plugin-only-apis-and-private-apis)
|
|
104
|
+
- [Deprecating styles](#deprecating-styles)
|
|
105
105
|
|
|
106
106
|
<!-- ## Polymorphic Components (i.e. the `as` prop)
|
|
107
107
|
|
|
@@ -121,20 +121,16 @@ When creating components that render a list of subcomponents, prefer to expose t
|
|
|
121
121
|
```jsx
|
|
122
122
|
// ❌ Don't:
|
|
123
123
|
<List
|
|
124
|
-
items={ [
|
|
125
|
-
{ value: 'Item 1' },
|
|
126
|
-
{ value: 'Item 2' },
|
|
127
|
-
{ value: 'Item 3' },
|
|
128
|
-
] }
|
|
124
|
+
items={ [ { value: 'Item 1' }, { value: 'Item 2' }, { value: 'Item 3' } ] }
|
|
129
125
|
/>
|
|
130
126
|
```
|
|
131
127
|
|
|
132
128
|
```jsx
|
|
133
129
|
// ✅ Do:
|
|
134
130
|
<List>
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
<
|
|
131
|
+
<List.Item value="Item 1" />
|
|
132
|
+
<List.Item value="Item 2" />
|
|
133
|
+
<List.Item value="Item 3" />
|
|
138
134
|
</List>
|
|
139
135
|
```
|
|
140
136
|
|
|
@@ -185,25 +181,25 @@ One way to enable reusability and composition is to extract a component's underl
|
|
|
185
181
|
|
|
186
182
|
```tsx
|
|
187
183
|
// in `hook.ts`
|
|
188
|
-
function useExampleComponent(
|
|
184
|
+
function useExampleComponent(
|
|
185
|
+
props: PolymorphicComponentProps< ExampleProps, 'div' >
|
|
186
|
+
) {
|
|
189
187
|
// Merge received props with the context system.
|
|
190
|
-
const { isVisible, className, ...otherProps } = useContextSystem(
|
|
188
|
+
const { isVisible, className, ...otherProps } = useContextSystem(
|
|
189
|
+
props,
|
|
190
|
+
'Example'
|
|
191
|
+
);
|
|
191
192
|
|
|
192
193
|
// Any other reusable rendering logic (e.g. computing className, state, event listeners...)
|
|
193
194
|
const cx = useCx();
|
|
194
195
|
const classes = useMemo(
|
|
195
|
-
() =>
|
|
196
|
-
cx(
|
|
197
|
-
styles.example,
|
|
198
|
-
isVisible && styles.visible,
|
|
199
|
-
className
|
|
200
|
-
),
|
|
196
|
+
() => cx( styles.example, isVisible && styles.visible, className ),
|
|
201
197
|
[ className, isVisible ]
|
|
202
198
|
);
|
|
203
199
|
|
|
204
200
|
return {
|
|
205
201
|
...otherProps,
|
|
206
|
-
className: classes
|
|
202
|
+
className: classes,
|
|
207
203
|
};
|
|
208
204
|
}
|
|
209
205
|
|
|
@@ -220,8 +216,8 @@ function Example(
|
|
|
220
216
|
|
|
221
217
|
A couple of good examples of how hooks are used for composition are:
|
|
222
218
|
|
|
223
|
-
-
|
|
224
|
-
-
|
|
219
|
+
- the `Card` component, which builds on top of the `Surface` component by [calling the `useSurface` hook inside its own hook](/packages/components/src/card/card/hook.ts);
|
|
220
|
+
- the `HStack` component, which builds on top of the `Flex` component and [calls the `useFlex` hook inside its own hook](/packages/components/src/h-stack/hook.tsx).
|
|
225
221
|
|
|
226
222
|
<!-- ## API Consinstency
|
|
227
223
|
|
|
@@ -236,6 +232,118 @@ A couple of good examples of how hooks are used for composition are:
|
|
|
236
232
|
|
|
237
233
|
TDB -->
|
|
238
234
|
|
|
235
|
+
## Naming Conventions
|
|
236
|
+
|
|
237
|
+
It is recommended that compound components use dot notation to separate the namespace from the individual component names. The top-level compound component should be called the namespace (no dot notation).
|
|
238
|
+
|
|
239
|
+
Dedicated React context should also use dot notation, while hooks should not.
|
|
240
|
+
|
|
241
|
+
When exporting compound components and preparing them to be consumed, it is important that:
|
|
242
|
+
|
|
243
|
+
- the JSDocs appear correctly in IntelliSense;
|
|
244
|
+
- the top-level component's JSDoc appears in the Storybook docs page;
|
|
245
|
+
- the top-level and subcomponent's prop types appear correctly in the Storybook props table.
|
|
246
|
+
|
|
247
|
+
To meet the above requirements, we recommend:
|
|
248
|
+
|
|
249
|
+
- using `Object.assign()` to add subcomponents as properties of the top-level component;
|
|
250
|
+
- using named functions for all components;
|
|
251
|
+
- using a separate file for each component, context and hook;
|
|
252
|
+
- setting explicitly the `displayName` on all subcomponents;
|
|
253
|
+
- adding the top-level JSDoc to the result of the `Object.assign` call;
|
|
254
|
+
- adding inline subcomponent JSDocs inside the `Object.assign` call.
|
|
255
|
+
|
|
256
|
+
The following example implements all of the above recommendations.
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
//=======================
|
|
260
|
+
// subcomponent.tsx
|
|
261
|
+
//=======================
|
|
262
|
+
import { forwardRef } from '@wordpress/element';
|
|
263
|
+
|
|
264
|
+
export const ComponentSubcomponent = forwardRef(
|
|
265
|
+
function UnforwardedComponentSubcomponent( props, ref ) {
|
|
266
|
+
/* ... */
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
//=======================
|
|
271
|
+
// context.ts
|
|
272
|
+
//=======================
|
|
273
|
+
import { createContext } from '@wordpress/element';
|
|
274
|
+
|
|
275
|
+
export const ComponentContext = createContext();
|
|
276
|
+
|
|
277
|
+
//=======================
|
|
278
|
+
// hook.ts
|
|
279
|
+
//=======================
|
|
280
|
+
|
|
281
|
+
/** The hook's JSDoc. */
|
|
282
|
+
export function useComponent() {
|
|
283
|
+
/* ... */
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
//=======================
|
|
287
|
+
// component.tsx
|
|
288
|
+
//=======================
|
|
289
|
+
import { forwardRef } from '@wordpress/element';
|
|
290
|
+
import { ComponentSubcomponent } from './subcomponent';
|
|
291
|
+
import { ComponentContext } from './context';
|
|
292
|
+
|
|
293
|
+
/** The top-level component's JSDoc. */
|
|
294
|
+
export const Component = Object.assign(
|
|
295
|
+
forwardRef( function UnforwardedTopLevelComponent( props, ref ) {
|
|
296
|
+
/* ... */
|
|
297
|
+
} ),
|
|
298
|
+
{
|
|
299
|
+
/** The subcomponent's JSDoc. */
|
|
300
|
+
Subcomponent: Object.assign(ComponentSubcomponent, {
|
|
301
|
+
displayName: 'Component.SubComponent';,
|
|
302
|
+
}),
|
|
303
|
+
/** The context's JSDoc. */
|
|
304
|
+
Context: Object.assign(ComponentContext, {
|
|
305
|
+
displayName: 'Component.Context'
|
|
306
|
+
}),
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
export default Component;
|
|
311
|
+
|
|
312
|
+
//=======================
|
|
313
|
+
// App.tsx
|
|
314
|
+
//=======================
|
|
315
|
+
import { Component, useComponent } from '@wordpress/components';
|
|
316
|
+
import { useContext } from '@wordpress/element';
|
|
317
|
+
|
|
318
|
+
function CompoundComponentExample() {
|
|
319
|
+
return (
|
|
320
|
+
<Component>
|
|
321
|
+
<Component.SubComponent />
|
|
322
|
+
</Component>
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
function ContextProviderExample() {
|
|
327
|
+
return (
|
|
328
|
+
<Component.Context.Provider value={ /* ... */ }>
|
|
329
|
+
{ /* React tree */ }
|
|
330
|
+
</Component.Context.Provider>
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
function ContextConsumerExample() {
|
|
335
|
+
const componentContext = useContext( Component.Context );
|
|
336
|
+
|
|
337
|
+
// etc
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function HookExample() {
|
|
341
|
+
const hookReturnValue = useComponent();
|
|
342
|
+
|
|
343
|
+
// etc.
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
239
347
|
## TypeScript
|
|
240
348
|
|
|
241
349
|
We strongly encourage using TypeScript for all new components.
|
|
@@ -278,8 +386,10 @@ function UnconnectedMyComponent(
|
|
|
278
386
|
// parameter (`div` in this example)
|
|
279
387
|
// - the special `as` prop (which marks the component as polymorphic),
|
|
280
388
|
// unless the third parameter is `false`
|
|
281
|
-
props:
|
|
282
|
-
) {
|
|
389
|
+
props: WordPressComponentProps< ComponentOwnProps, 'div', true >
|
|
390
|
+
) {
|
|
391
|
+
/* ... */
|
|
392
|
+
}
|
|
283
393
|
```
|
|
284
394
|
|
|
285
395
|
### Considerations for the docgen
|
|
@@ -287,10 +397,15 @@ function UnconnectedMyComponent(
|
|
|
287
397
|
Make sure you have a **named** export for the component, not just the default export ([example](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/divider/component.tsx)). This ensures that the docgen can properly extract the types data. The naming should be so that the connected/forwarded component has the plain component name (`MyComponent`), and the raw component is prefixed (`UnconnectedMyComponent` or `UnforwardedMyComponent`). This makes the component's `displayName` look nicer in React devtools and in the autogenerated Storybook code snippets.
|
|
288
398
|
|
|
289
399
|
```js
|
|
290
|
-
function UnconnectedMyComponent() {
|
|
400
|
+
function UnconnectedMyComponent() {
|
|
401
|
+
/* ... */
|
|
402
|
+
}
|
|
291
403
|
|
|
292
404
|
// 👇 Without this named export, the docgen will not work!
|
|
293
|
-
export const MyComponent = contextConnect(
|
|
405
|
+
export const MyComponent = contextConnect(
|
|
406
|
+
UnconnectedMyComponent,
|
|
407
|
+
'MyComponent'
|
|
408
|
+
);
|
|
294
409
|
export default MyComponent;
|
|
295
410
|
```
|
|
296
411
|
|
|
@@ -314,16 +429,15 @@ Changing the styles of a non-experimental component must be done with care. To p
|
|
|
314
429
|
import deprecated from '@wordpress/deprecated';
|
|
315
430
|
import { Wrapper } from './styles.ts';
|
|
316
431
|
|
|
317
|
-
function MyComponent({ __nextHasNoOuterMargins = false }) {
|
|
432
|
+
function MyComponent( { __nextHasNoOuterMargins = false } ) {
|
|
318
433
|
if ( ! __nextHasNoOuterMargins ) {
|
|
319
434
|
deprecated( 'Outer margin styles for wp.components.MyComponent', {
|
|
320
435
|
since: '6.0',
|
|
321
436
|
version: '6.2', // Set a reasonable grace period depending on impact
|
|
322
|
-
hint:
|
|
323
|
-
'Set the `__nextHasNoOuterMargins` prop to true to start opting into the new styles, which will become the default in a future version.',
|
|
437
|
+
hint: 'Set the `__nextHasNoOuterMargins` prop to true to start opting into the new styles, which will become the default in a future version.',
|
|
324
438
|
} );
|
|
325
439
|
}
|
|
326
|
-
return <Wrapper __nextHasNoOuterMargins={__nextHasNoOuterMargins}
|
|
440
|
+
return <Wrapper __nextHasNoOuterMargins={ __nextHasNoOuterMargins } />;
|
|
327
441
|
}
|
|
328
442
|
```
|
|
329
443
|
|
|
@@ -331,7 +445,7 @@ Styles should be structured so the deprecated styles are cleanly encapsulated, a
|
|
|
331
445
|
|
|
332
446
|
```js
|
|
333
447
|
// styles.ts
|
|
334
|
-
const deprecatedMargins = ({ __nextHasNoOuterMargins }) => {
|
|
448
|
+
const deprecatedMargins = ( { __nextHasNoOuterMargins } ) => {
|
|
335
449
|
if ( ! __nextHasNoOuterMargins ) {
|
|
336
450
|
return css`
|
|
337
451
|
margin: 8px;
|
|
@@ -342,7 +456,7 @@ const deprecatedMargins = ({ __nextHasNoOuterMargins }) => {
|
|
|
342
456
|
export const Wrapper = styled.div`
|
|
343
457
|
margin: 0;
|
|
344
458
|
|
|
345
|
-
${deprecatedMargins}
|
|
459
|
+
${ deprecatedMargins }
|
|
346
460
|
`;
|
|
347
461
|
```
|
|
348
462
|
|
|
@@ -358,14 +472,14 @@ Not all style changes justify a formal deprecation process. The main thing to lo
|
|
|
358
472
|
|
|
359
473
|
##### DOES need formal deprecation
|
|
360
474
|
|
|
361
|
-
-
|
|
362
|
-
-
|
|
475
|
+
- Removing an outer margin.
|
|
476
|
+
- Substantial changes to width/height, such as adding or removing a size restriction.
|
|
363
477
|
|
|
364
478
|
##### DOES NOT need formal deprecation
|
|
365
479
|
|
|
366
|
-
-
|
|
367
|
-
-
|
|
368
|
-
-
|
|
480
|
+
- Breakage only occurs in non-standard usage, such as when the consumer is overriding component internals.
|
|
481
|
+
- Minor layout shifts of a few pixels.
|
|
482
|
+
- Internal layout changes of a higher-level component.
|
|
369
483
|
|
|
370
484
|
## Context system
|
|
371
485
|
|
|
@@ -373,9 +487,9 @@ The `@wordpress/components` context system is based on [React's `Context` API](h
|
|
|
373
487
|
|
|
374
488
|
Components can use this system via a couple of functions:
|
|
375
489
|
|
|
376
|
-
-
|
|
377
|
-
-
|
|
378
|
-
-
|
|
490
|
+
- they can provide values using a shared `ContextSystemProvider` component
|
|
491
|
+
- they can connect to the Context via `contextConnect`
|
|
492
|
+
- they can read the "computed" values from the context via `useContextSystem`
|
|
379
493
|
|
|
380
494
|
An example of how this is used can be found in the [`Card` component family](/packages/components/src/card). For example, this is how the `Card` component injects the `size` and `isBorderless` props down to its `CardBody` subcomponent — which makes it use the correct spacing and border settings "auto-magically".
|
|
381
495
|
|
|
@@ -400,11 +514,7 @@ export function useCard( props ) {
|
|
|
400
514
|
import { contextConnect, ContextSystemProvider } from '../../context';
|
|
401
515
|
|
|
402
516
|
function Card( props, forwardedRef ) {
|
|
403
|
-
const {
|
|
404
|
-
size,
|
|
405
|
-
isBorderless,
|
|
406
|
-
...otherComputedHookProps
|
|
407
|
-
} = useCard( props );
|
|
517
|
+
const { size, isBorderless, ...otherComputedHookProps } = useCard( props );
|
|
408
518
|
|
|
409
519
|
// [...]
|
|
410
520
|
|
|
@@ -441,7 +551,10 @@ export function useCardBody( props ) {
|
|
|
441
551
|
// If a `CardBody` component is rendered as a child of a `Card` component, the value of
|
|
442
552
|
// the `size` prop will be the one set by the parent `Card` component via the Context
|
|
443
553
|
// System (unless the prop gets explicitely set on the `CardBody` component).
|
|
444
|
-
const { size = 'medium', ...otherDerivedProps } = useContextSystem(
|
|
554
|
+
const { size = 'medium', ...otherDerivedProps } = useContextSystem(
|
|
555
|
+
props,
|
|
556
|
+
'CardBody'
|
|
557
|
+
);
|
|
445
558
|
|
|
446
559
|
// [...]
|
|
447
560
|
|
|
@@ -457,7 +570,7 @@ Please refer to the [JavaScript Testing Overview docs](/docs/contributors/code/t
|
|
|
457
570
|
|
|
458
571
|
All new components should add stories to the project's [Storybook](https://storybook.js.org/). Each [story](https://storybook.js.org/docs/react/get-started/whats-a-story) captures the rendered state of a UI component in isolation. This greatly simplifies working on a given component, while also serving as an interactive form of documentation.
|
|
459
572
|
|
|
460
|
-
A component's story should be showcasing its different states — for example, the different variants of a
|
|
573
|
+
A component's story should be showcasing its different states — for example, the different variants of a `Button`:
|
|
461
574
|
|
|
462
575
|
```jsx
|
|
463
576
|
import Button from '../';
|
|
@@ -543,6 +656,7 @@ Prop description. With a new line before and after the description and before an
|
|
|
543
656
|
Add this section when there are props that are drilled down into an internal component. See [ClipboardButton](/packages/components/src/clipboard-button/README.md) for an example.
|
|
544
657
|
|
|
545
658
|
<!-- Only add the next section if the component relies on the [Context System](#context-system) -->
|
|
659
|
+
|
|
546
660
|
## Context
|
|
547
661
|
|
|
548
662
|
See examples for this section for the [ItemGroup](/packages/components/src/item-group/item-group/README.md#context) and [`Card`](/packages/components/src/card/card/README.md#context) components.
|
|
@@ -601,8 +715,8 @@ As the needs of the package evolve with time, sometimes we may opt to fully rewr
|
|
|
601
715
|
|
|
602
716
|
Here is some terminology that will be used in the upcoming sections:
|
|
603
717
|
|
|
604
|
-
-
|
|
605
|
-
-
|
|
718
|
+
- "Legacy" component: the version(s) of the component that existsted on `trunk` before the rewrite;
|
|
719
|
+
- API surface: the component's public APIs. It includes the list of components (and subcomponents) exported from the package, their props, any associated React context. It does not include internal classnames and internal DOM structure of the components.
|
|
606
720
|
|
|
607
721
|
### Approaches
|
|
608
722
|
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = Cell;
|
|
8
|
-
var
|
|
8
|
+
var _composite = require("../composite");
|
|
9
9
|
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
10
10
|
var _visuallyHidden = require("../visually-hidden");
|
|
11
11
|
var _utils = require("./utils");
|
|
12
|
-
var
|
|
12
|
+
var _styles = require("./styles");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
@@ -21,23 +21,20 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
21
|
|
|
22
22
|
function Cell({
|
|
23
23
|
id,
|
|
24
|
-
isActive = false,
|
|
25
24
|
value,
|
|
26
25
|
...props
|
|
27
26
|
}) {
|
|
28
|
-
const tooltipText = _utils.ALIGNMENT_LABEL[value];
|
|
29
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.default, {
|
|
30
|
-
text:
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
28
|
+
text: _utils.ALIGNMENT_LABEL[value],
|
|
29
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_composite.Composite.Item, {
|
|
32
30
|
id: id,
|
|
33
|
-
render: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
31
|
+
render: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Cell, {
|
|
34
32
|
...props,
|
|
35
33
|
role: "gridcell"
|
|
36
34
|
}),
|
|
37
35
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_visuallyHidden.VisuallyHidden, {
|
|
38
36
|
children: value
|
|
39
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
40
|
-
isActive: isActive,
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Point, {
|
|
41
38
|
role: "presentation"
|
|
42
39
|
})]
|
|
43
40
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_composite","require","_tooltip","_interopRequireDefault","_visuallyHidden","_utils","_styles","_jsxRuntime","Cell","id","value","props","jsx","default","text","ALIGNMENT_LABEL","children","jsxs","Composite","Item","render","role","VisuallyHidden","Point"],"sources":["@wordpress/components/src/alignment-matrix-control/cell.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { Composite } from '../composite';\nimport Tooltip from '../tooltip';\nimport { VisuallyHidden } from '../visually-hidden';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENT_LABEL } from './utils';\nimport { Cell as CellView, Point } from './styles';\nimport type { AlignmentMatrixControlCellProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function Cell( {\n\tid,\n\tvalue,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlCellProps, 'span', false > ) {\n\treturn (\n\t\t<Tooltip text={ ALIGNMENT_LABEL[ value ] }>\n\t\t\t<Composite.Item\n\t\t\t\tid={ id }\n\t\t\t\trender={ <CellView { ...props } role=\"gridcell\" /> }\n\t\t\t>\n\t\t\t\t{ /* VoiceOver needs a text content to be rendered within grid cell,\n\t\t\totherwise it'll announce the content as \"blank\". So we use a visually\n\t\t\thidden element instead of aria-label. */ }\n\t\t\t\t<VisuallyHidden>{ value }</VisuallyHidden>\n\t\t\t\t<Point role=\"presentation\" />\n\t\t\t</Composite.Item>\n\t\t</Tooltip>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAAmD,IAAAM,WAAA,GAAAN,OAAA;AAXnD;AACA;AACA;;AAKA;AACA;AACA;;AAMe,SAASO,IAAIA,CAAE;EAC7BC,EAAE;EACFC,KAAK;EACL,GAAGC;AACuE,CAAC,EAAG;EAC9E,oBACC,IAAAJ,WAAA,CAAAK,GAAA,EAACV,QAAA,CAAAW,OAAO;IAACC,IAAI,EAAGC,sBAAe,CAAEL,KAAK,CAAI;IAAAM,QAAA,eACzC,IAAAT,WAAA,CAAAU,IAAA,EAACjB,UAAA,CAAAkB,SAAS,CAACC,IAAI;MACdV,EAAE,EAAGA,EAAI;MACTW,MAAM,eAAG,IAAAb,WAAA,CAAAK,GAAA,EAACN,OAAA,CAAAE,IAAQ;QAAA,GAAMG,KAAK;QAAGU,IAAI,EAAC;MAAU,CAAE,CAAG;MAAAL,QAAA,gBAKpD,IAAAT,WAAA,CAAAK,GAAA,EAACR,eAAA,CAAAkB,cAAc;QAAAN,QAAA,EAAGN;MAAK,CAAkB,CAAC,eAC1C,IAAAH,WAAA,CAAAK,GAAA,EAACN,OAAA,CAAAiB,KAAK;QAACF,IAAI,EAAC;MAAc,CAAE,CAAC;IAAA,CACd;EAAC,CACT,CAAC;AAEZ","ignoreList":[]}
|