@wordpress/components 28.6.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 +77 -0
- package/CONTRIBUTING.md +42 -19
- package/build/alignment-matrix-control/cell.js +4 -7
- 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 +55 -51
- 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/border-control/border-control/component.js +18 -13
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +15 -9
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker.js +15 -12
- 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 +1 -2
- 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 +8 -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/types.js.map +1 -1
- 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 +50 -96
- 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 +2 -1
- 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.map +1 -1
- 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-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/time-input/index.js +17 -19
- package/build/date-time/time/time-input/index.js.map +1 -1
- package/build/dimension-control/index.js +6 -1
- package/build/dimension-control/index.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 +58 -146
- 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 +54 -78
- 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/styles/focal-point-style.js +7 -2
- package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build/form-token-field/types.js.map +1 -1
- package/build/index.js +6 -0
- 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 +10 -10
- package/build/item-group/styles.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/hook.js +2 -2
- 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 +99 -67
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-to-parent-button/component.js +2 -2
- 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/private-apis.js +5 -9
- package/build/private-apis.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +30 -30
- 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/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/tabs/index.js +4 -4
- 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/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/tools-panel/tools-panel/hook.js +6 -6
- package/build/tools-panel/tools-panel/hook.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 +6 -4
- 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 +2 -5
- 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 +55 -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/border-control/border-control/component.js +18 -13
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +16 -10
- 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 +1 -2
- 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 +7 -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/types.js.map +1 -1
- 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 +51 -96
- 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 +2 -1
- 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.map +1 -1
- 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-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/time-input/index.js +17 -19
- package/build-module/date-time/time/time-input/index.js.map +1 -1
- package/build-module/dimension-control/index.js +6 -1
- package/build-module/dimension-control/index.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 +57 -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 +54 -78
- 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/styles/focal-point-style.js +6 -2
- package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build-module/form-token-field/types.js.map +1 -1
- package/build-module/index.js +2 -1
- 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 +10 -10
- package/build-module/item-group/styles.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/hook.js +1 -1
- 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 +99 -67
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-to-parent-button/component.js +1 -1
- 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/private-apis.js +5 -9
- package/build-module/private-apis.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +31 -31
- 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/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/tabs/index.js +4 -4
- 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/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/tools-panel/tools-panel/hook.js +6 -6
- package/build-module/tools-panel/tools-panel/hook.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 +6 -4
- 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 +11 -23
- package/build-style/style.css +11 -23
- 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/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/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 -2
- 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/types.d.ts +1 -0
- package/build-types/combobox-control/types.d.ts.map +1 -1
- 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 +30 -26
- 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 +1 -4
- package/build-types/composite/legacy/index.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 +1 -0
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- 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 +2 -2
- package/build-types/composite/types.d.ts.map +1 -1
- package/build-types/date-time/time/time-input/index.d.ts.map +1 -1
- package/build-types/dimension-control/index.d.ts +1 -1
- package/build-types/dimension-control/index.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts +5 -0
- package/build-types/dimension-control/stories/index.story.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/styles/focal-point-style.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 +3 -1
- 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-provider/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 +3 -1
- 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/private-apis.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/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/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/styles.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 +3 -3
- package/package.json +19 -19
- package/src/alignment-matrix-control/README.md +1 -5
- package/src/alignment-matrix-control/cell.tsx +3 -9
- package/src/alignment-matrix-control/icon.tsx +48 -30
- package/src/alignment-matrix-control/index.tsx +60 -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/border-control/border-control/component.tsx +23 -16
- package/src/circular-option-picker/circular-option-picker-option.tsx +16 -19
- package/src/circular-option-picker/circular-option-picker.tsx +26 -12
- package/src/circular-option-picker/types.ts +2 -2
- package/src/clipboard-button/index.tsx +6 -6
- package/src/color-palette/test/utils.ts +21 -2
- package/src/color-palette/utils.ts +1 -3
- 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 +6 -10
- package/src/color-picker/styles.ts +1 -1
- package/src/combobox-control/types.ts +1 -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 +61 -145
- package/src/composite/item.tsx +30 -0
- package/src/composite/legacy/index.tsx +2 -1
- package/src/composite/row.tsx +30 -0
- package/src/composite/store.ts +46 -0
- package/src/composite/stories/index.story.tsx +138 -265
- package/src/composite/typeahead.tsx +30 -0
- package/src/composite/types.ts +2 -2
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +10 -10
- package/src/custom-gradient-picker/style.scss +2 -21
- package/src/custom-select-control-v2/styles.ts +4 -4
- package/src/date-time/date/styles.ts +2 -2
- 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/dimension-control/README.md +4 -0
- package/src/dimension-control/index.tsx +7 -1
- package/src/dimension-control/stories/index.story.tsx +7 -2
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +16 -16
- package/src/dimension-control/test/index.test.js +1 -0
- package/src/draggable/index.tsx +4 -4
- 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 +57 -197
- 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 +102 -66
- 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/styles/focal-point-style.ts +6 -1
- package/src/form-toggle/style.scss +1 -1
- package/src/form-token-field/style.scss +2 -3
- package/src/form-token-field/types.ts +1 -0
- package/src/index.ts +5 -1
- 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 +3 -3
- package/src/item-group/test/__snapshots__/index.js.snap +3 -3
- package/src/modal/index.tsx +5 -5
- package/src/modal/style.scss +5 -4
- 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/hook.ts +1 -1
- package/src/navigator/navigator-button/hook.ts +1 -1
- package/src/navigator/navigator-provider/README.md +2 -3
- package/src/navigator/navigator-provider/component.tsx +97 -82
- package/src/navigator/navigator-to-parent-button/component.tsx +1 -1
- package/src/navigator/stories/index.story.tsx +82 -253
- package/src/navigator/types.ts +3 -1
- package/src/navigator/use-navigator.ts +1 -3
- package/src/palette-edit/index.tsx +2 -2
- package/src/private-apis.ts +5 -18
- package/src/range-control/styles/range-control-styles.ts +7 -7
- package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +2 -2
- package/src/resizable-box/style.scss +2 -2
- package/src/select-control/styles/select-control-styles.ts +5 -5
- package/src/slot-fill/bubbles-virtually/fill.tsx +4 -4
- package/src/snackbar/index.tsx +4 -4
- package/src/tab-panel/style.scss +0 -1
- package/src/tabs/index.tsx +8 -4
- package/src/tabs/styles.ts +2 -3
- package/src/text-control/style.scss +3 -2
- package/src/toggle-group-control/toggle-group-control/utils.ts +7 -7
- package/src/tools-panel/tools-panel/hook.ts +6 -6
- package/src/unit-control/styles/unit-control-styles.ts +2 -1
- package/src/utils/config-values.js +6 -4
- 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 -77
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.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-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 -72
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.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-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/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/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/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
|
@@ -7,17 +7,15 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import Button from '../../button';
|
|
10
|
-
import { Card, CardBody, CardFooter, CardHeader } from '../../card';
|
|
11
10
|
import { VStack } from '../../v-stack';
|
|
12
|
-
import Dropdown from '../../dropdown';
|
|
13
11
|
import {
|
|
14
12
|
NavigatorProvider,
|
|
15
13
|
NavigatorScreen,
|
|
16
14
|
NavigatorButton,
|
|
17
15
|
NavigatorBackButton,
|
|
18
|
-
NavigatorToParentButton,
|
|
19
16
|
useNavigator,
|
|
20
17
|
} from '..';
|
|
18
|
+
import { HStack } from '../../h-stack';
|
|
21
19
|
|
|
22
20
|
const meta: Meta< typeof NavigatorProvider > = {
|
|
23
21
|
component: NavigatorProvider,
|
|
@@ -33,268 +31,106 @@ const meta: Meta< typeof NavigatorProvider > = {
|
|
|
33
31
|
controls: { expanded: true },
|
|
34
32
|
docs: { canvas: { sourceState: 'shown' } },
|
|
35
33
|
},
|
|
34
|
+
decorators: [
|
|
35
|
+
( Story ) => {
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<style>{ `
|
|
39
|
+
/* These attributes are a private implementation detail of the
|
|
40
|
+
Navigator component. Do not use outside of its source code. */
|
|
41
|
+
[data-wp-component="NavigatorProvider"] {
|
|
42
|
+
height: calc(100vh - 2rem);
|
|
43
|
+
max-height: 250px;
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
[data-wp-component="NavigatorScreen"]:not([data-sticky]) {
|
|
47
|
+
padding: 8px;
|
|
48
|
+
}
|
|
49
|
+
` }</style>
|
|
50
|
+
<Story />
|
|
51
|
+
</>
|
|
52
|
+
);
|
|
53
|
+
},
|
|
54
|
+
],
|
|
36
55
|
};
|
|
37
56
|
export default meta;
|
|
38
57
|
|
|
39
58
|
export const Default: StoryObj< typeof NavigatorProvider > = {
|
|
40
59
|
args: {
|
|
41
60
|
initialPath: '/',
|
|
42
|
-
style: { height: '100vh', maxHeight: '450px' },
|
|
43
61
|
children: (
|
|
44
62
|
<>
|
|
45
63
|
<NavigatorScreen path="/">
|
|
46
|
-
<
|
|
47
|
-
<CardBody>
|
|
48
|
-
<p>This is the home screen.</p>
|
|
64
|
+
<h2>This is the home screen.</h2>
|
|
49
65
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
>
|
|
55
|
-
Navigate to child screen.
|
|
56
|
-
</NavigatorButton>
|
|
57
|
-
|
|
58
|
-
<NavigatorButton
|
|
59
|
-
variant="secondary"
|
|
60
|
-
path="/overflow-child"
|
|
61
|
-
>
|
|
62
|
-
Navigate to screen with horizontal overflow.
|
|
63
|
-
</NavigatorButton>
|
|
64
|
-
|
|
65
|
-
<NavigatorButton
|
|
66
|
-
variant="secondary"
|
|
67
|
-
path="/stickies"
|
|
68
|
-
>
|
|
69
|
-
Navigate to screen with sticky content.
|
|
70
|
-
</NavigatorButton>
|
|
66
|
+
<VStack alignment="left">
|
|
67
|
+
<NavigatorButton variant="primary" path="/child">
|
|
68
|
+
Go to child screen.
|
|
69
|
+
</NavigatorButton>
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
>
|
|
76
|
-
Navigate to product screen with id 1.
|
|
77
|
-
</NavigatorButton>
|
|
71
|
+
<NavigatorButton variant="primary" path="/product/1">
|
|
72
|
+
Go to dynamic path screen with id 1.
|
|
73
|
+
</NavigatorButton>
|
|
78
74
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}: {
|
|
84
|
-
// TODO: remove once `Dropdown` is refactored to TypeScript
|
|
85
|
-
isOpen: boolean;
|
|
86
|
-
onToggle: () => void;
|
|
87
|
-
} ) => (
|
|
88
|
-
<Button
|
|
89
|
-
onClick={ onToggle }
|
|
90
|
-
aria-expanded={ isOpen }
|
|
91
|
-
variant="primary"
|
|
92
|
-
>
|
|
93
|
-
Open test dialog
|
|
94
|
-
</Button>
|
|
95
|
-
) }
|
|
96
|
-
renderContent={ () => (
|
|
97
|
-
<Card>
|
|
98
|
-
<CardHeader>Go</CardHeader>
|
|
99
|
-
<CardBody>Stuff</CardBody>
|
|
100
|
-
</Card>
|
|
101
|
-
) }
|
|
102
|
-
/>
|
|
103
|
-
</VStack>
|
|
104
|
-
</CardBody>
|
|
105
|
-
</Card>
|
|
75
|
+
<NavigatorButton variant="primary" path="/product/2">
|
|
76
|
+
Go to dynamic path screen with id 2.
|
|
77
|
+
</NavigatorButton>
|
|
78
|
+
</VStack>
|
|
106
79
|
</NavigatorScreen>
|
|
107
80
|
|
|
108
81
|
<NavigatorScreen path="/child">
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<NavigatorBackButton variant="secondary">
|
|
123
|
-
Go back
|
|
124
|
-
</NavigatorBackButton>
|
|
125
|
-
<div
|
|
126
|
-
style={ {
|
|
127
|
-
display: 'inline-block',
|
|
128
|
-
background: 'papayawhip',
|
|
129
|
-
} }
|
|
130
|
-
>
|
|
131
|
-
<span
|
|
132
|
-
style={ {
|
|
133
|
-
color: 'palevioletred',
|
|
134
|
-
whiteSpace: 'nowrap',
|
|
135
|
-
fontSize: '42vw',
|
|
136
|
-
} }
|
|
137
|
-
>
|
|
138
|
-
¯\_(ツ)_/¯
|
|
139
|
-
</span>
|
|
140
|
-
</div>
|
|
141
|
-
</CardBody>
|
|
142
|
-
</Card>
|
|
82
|
+
<h2>This is the child screen.</h2>
|
|
83
|
+
<HStack spacing={ 2 } alignment="left">
|
|
84
|
+
<NavigatorBackButton variant="secondary">
|
|
85
|
+
Go back
|
|
86
|
+
</NavigatorBackButton>
|
|
87
|
+
|
|
88
|
+
<NavigatorButton
|
|
89
|
+
variant="primary"
|
|
90
|
+
path="/child/grandchild"
|
|
91
|
+
>
|
|
92
|
+
Go to grand child screen.
|
|
93
|
+
</NavigatorButton>
|
|
94
|
+
</HStack>
|
|
143
95
|
</NavigatorScreen>
|
|
144
96
|
|
|
145
|
-
<NavigatorScreen path="/
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
</NavigatorBackButton>
|
|
151
|
-
</CardHeader>
|
|
152
|
-
<CardBody>
|
|
153
|
-
<div
|
|
154
|
-
style={ getStickyStyles( {
|
|
155
|
-
top: 69,
|
|
156
|
-
bgColor: 'peachpuff',
|
|
157
|
-
} ) }
|
|
158
|
-
>
|
|
159
|
-
<h2>A wild sticky element appears</h2>
|
|
160
|
-
</div>
|
|
161
|
-
<MetaphorIpsum quantity={ 3 } />
|
|
162
|
-
</CardBody>
|
|
163
|
-
<CardBody>
|
|
164
|
-
<div
|
|
165
|
-
style={ getStickyStyles( {
|
|
166
|
-
top: 69,
|
|
167
|
-
bgColor: 'paleturquoise',
|
|
168
|
-
} ) }
|
|
169
|
-
>
|
|
170
|
-
<h2>Another wild sticky element appears</h2>
|
|
171
|
-
</div>
|
|
172
|
-
<MetaphorIpsum quantity={ 3 } />
|
|
173
|
-
</CardBody>
|
|
174
|
-
<CardFooter
|
|
175
|
-
style={ getStickyStyles( {
|
|
176
|
-
bgColor: 'mistyrose',
|
|
177
|
-
} ) }
|
|
178
|
-
>
|
|
179
|
-
<Button variant="primary">Primary noop</Button>
|
|
180
|
-
</CardFooter>
|
|
181
|
-
</Card>
|
|
97
|
+
<NavigatorScreen path="/child/grandchild">
|
|
98
|
+
<h2>This is the grand child screen.</h2>
|
|
99
|
+
<NavigatorBackButton variant="secondary">
|
|
100
|
+
Go back
|
|
101
|
+
</NavigatorBackButton>
|
|
182
102
|
</NavigatorScreen>
|
|
183
103
|
|
|
184
104
|
<NavigatorScreen path="/product/:id">
|
|
185
|
-
<
|
|
105
|
+
<DynamicScreen />
|
|
186
106
|
</NavigatorScreen>
|
|
187
107
|
</>
|
|
188
108
|
),
|
|
189
109
|
},
|
|
190
110
|
};
|
|
191
111
|
|
|
192
|
-
function
|
|
193
|
-
|
|
194
|
-
bgColor = 'whitesmoke',
|
|
195
|
-
top = 0,
|
|
196
|
-
zIndex = 1,
|
|
197
|
-
} ): React.CSSProperties {
|
|
198
|
-
return {
|
|
199
|
-
display: 'flex',
|
|
200
|
-
position: 'sticky',
|
|
201
|
-
top,
|
|
202
|
-
bottom,
|
|
203
|
-
zIndex,
|
|
204
|
-
backgroundColor: bgColor,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
112
|
+
function DynamicScreen() {
|
|
113
|
+
const { params } = useNavigator();
|
|
207
114
|
|
|
208
|
-
function MetaphorIpsum( { quantity }: { quantity: number } ) {
|
|
209
|
-
const list = [
|
|
210
|
-
'A loopy clarinet’s year comes with it the thought that the fenny step-son is an ophthalmologist. The literature would have us believe that a glabrate country is not but a rhythm. A beech is a rub from the right perspective. In ancient times few can name an unglossed walrus that isn’t an unspilt trial.',
|
|
211
|
-
'Authors often misinterpret the afterthought as a roseless mother-in-law, when in actuality it feels more like an uncapped thunderstorm. In recent years, some posit the tarry bottle to be less than acerb. They were lost without the unkissed timbale that composed their customer. A donna is a springtime breath.',
|
|
212
|
-
'It’s an undeniable fact, really; their museum was, in this moment, a snotty beef. The swordfishes could be said to resemble prowessed lasagnas. However, the rainier authority comes from a cureless soup. Unfortunately, that is wrong; on the contrary, the cover is a powder.',
|
|
213
|
-
];
|
|
214
|
-
quantity = Math.min( list.length, quantity );
|
|
215
115
|
return (
|
|
216
116
|
<>
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
117
|
+
<h2>This is the dynamic screen</h2>
|
|
118
|
+
<p>
|
|
119
|
+
This screen can parse params dynamically. The current id is:{ ' ' }
|
|
120
|
+
{ params.id }
|
|
121
|
+
</p>
|
|
122
|
+
<NavigatorBackButton variant="secondary">
|
|
123
|
+
Go back
|
|
124
|
+
</NavigatorBackButton>
|
|
222
125
|
</>
|
|
223
126
|
);
|
|
224
127
|
}
|
|
225
128
|
|
|
226
|
-
|
|
227
|
-
const { params } = useNavigator();
|
|
228
|
-
|
|
229
|
-
return (
|
|
230
|
-
<Card>
|
|
231
|
-
<CardBody>
|
|
232
|
-
<NavigatorBackButton variant="secondary">
|
|
233
|
-
Go back
|
|
234
|
-
</NavigatorBackButton>
|
|
235
|
-
<p>This is the screen for the product with id: { params.id }</p>
|
|
236
|
-
</CardBody>
|
|
237
|
-
</Card>
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export const NestedNavigator: StoryObj< typeof NavigatorProvider > = {
|
|
129
|
+
export const WithNestedInitialPath: StoryObj< typeof NavigatorProvider > = {
|
|
242
130
|
...Default,
|
|
243
131
|
args: {
|
|
244
132
|
...Default.args,
|
|
245
|
-
initialPath: '/
|
|
246
|
-
children: (
|
|
247
|
-
<>
|
|
248
|
-
<NavigatorScreen path="/">
|
|
249
|
-
<Card>
|
|
250
|
-
<CardBody>
|
|
251
|
-
<NavigatorButton variant="secondary" path="/child1">
|
|
252
|
-
Go to first child.
|
|
253
|
-
</NavigatorButton>
|
|
254
|
-
<NavigatorButton variant="secondary" path="/child2">
|
|
255
|
-
Go to second child.
|
|
256
|
-
</NavigatorButton>
|
|
257
|
-
</CardBody>
|
|
258
|
-
</Card>
|
|
259
|
-
</NavigatorScreen>
|
|
260
|
-
<NavigatorScreen path="/child1">
|
|
261
|
-
<Card>
|
|
262
|
-
<CardBody>
|
|
263
|
-
This is the first child
|
|
264
|
-
<NavigatorToParentButton variant="secondary">
|
|
265
|
-
Go back to parent
|
|
266
|
-
</NavigatorToParentButton>
|
|
267
|
-
</CardBody>
|
|
268
|
-
</Card>
|
|
269
|
-
</NavigatorScreen>
|
|
270
|
-
<NavigatorScreen path="/child2">
|
|
271
|
-
<Card>
|
|
272
|
-
<CardBody>
|
|
273
|
-
This is the second child
|
|
274
|
-
<NavigatorToParentButton variant="secondary">
|
|
275
|
-
Go back to parent
|
|
276
|
-
</NavigatorToParentButton>
|
|
277
|
-
<NavigatorButton
|
|
278
|
-
variant="secondary"
|
|
279
|
-
path="/child2/grandchild"
|
|
280
|
-
>
|
|
281
|
-
Go to grand child.
|
|
282
|
-
</NavigatorButton>
|
|
283
|
-
</CardBody>
|
|
284
|
-
</Card>
|
|
285
|
-
</NavigatorScreen>
|
|
286
|
-
<NavigatorScreen path="/child2/grandchild">
|
|
287
|
-
<Card>
|
|
288
|
-
<CardBody>
|
|
289
|
-
This is the grand child
|
|
290
|
-
<NavigatorToParentButton variant="secondary">
|
|
291
|
-
Go back to parent
|
|
292
|
-
</NavigatorToParentButton>
|
|
293
|
-
</CardBody>
|
|
294
|
-
</Card>
|
|
295
|
-
</NavigatorScreen>
|
|
296
|
-
</>
|
|
297
|
-
),
|
|
133
|
+
initialPath: '/child/grandchild',
|
|
298
134
|
},
|
|
299
135
|
};
|
|
300
136
|
|
|
@@ -308,6 +144,10 @@ const NavigatorButtonWithSkipFocus = ( {
|
|
|
308
144
|
return (
|
|
309
145
|
<Button
|
|
310
146
|
{ ...props }
|
|
147
|
+
style={ {
|
|
148
|
+
marginInline: '8px',
|
|
149
|
+
...props.style,
|
|
150
|
+
} }
|
|
311
151
|
onClick={ ( e: React.MouseEvent< HTMLButtonElement > ) => {
|
|
312
152
|
goTo( path, { skipFocus: true } );
|
|
313
153
|
onClick?.( e );
|
|
@@ -323,39 +163,28 @@ export const SkipFocus: StoryObj< typeof NavigatorProvider > = {
|
|
|
323
163
|
<>
|
|
324
164
|
<div
|
|
325
165
|
style={ {
|
|
326
|
-
height:
|
|
327
|
-
|
|
166
|
+
height: 150,
|
|
167
|
+
outline: '1px solid black',
|
|
168
|
+
outlineOffset: '-1px',
|
|
169
|
+
marginBlockEnd: '1rem',
|
|
328
170
|
} }
|
|
329
171
|
>
|
|
330
|
-
<NavigatorScreen
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
height: '100%',
|
|
334
|
-
} }
|
|
335
|
-
>
|
|
336
|
-
<h1>Home screen</h1>
|
|
337
|
-
<NavigatorButton variant="secondary" path="/child">
|
|
172
|
+
<NavigatorScreen path="/">
|
|
173
|
+
<h2>Home screen</h2>
|
|
174
|
+
<NavigatorButton variant="primary" path="/child">
|
|
338
175
|
Go to child screen.
|
|
339
176
|
</NavigatorButton>
|
|
340
177
|
</NavigatorScreen>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
style={ {
|
|
344
|
-
height: '100%',
|
|
345
|
-
} }
|
|
346
|
-
>
|
|
178
|
+
|
|
179
|
+
<NavigatorScreen path="/child">
|
|
347
180
|
<h2>Child screen</h2>
|
|
348
|
-
<
|
|
349
|
-
Go to
|
|
350
|
-
</
|
|
181
|
+
<NavigatorBackButton variant="secondary">
|
|
182
|
+
Go back to home screen
|
|
183
|
+
</NavigatorBackButton>
|
|
351
184
|
</NavigatorScreen>
|
|
352
185
|
</div>
|
|
353
186
|
|
|
354
|
-
<NavigatorButtonWithSkipFocus
|
|
355
|
-
variant="secondary"
|
|
356
|
-
path="/child"
|
|
357
|
-
style={ { margin: '1rem 2rem' } }
|
|
358
|
-
>
|
|
187
|
+
<NavigatorButtonWithSkipFocus path="/child">
|
|
359
188
|
Go to child screen, but keep focus on this button
|
|
360
189
|
</NavigatorButtonWithSkipFocus>
|
|
361
190
|
</>
|
package/src/navigator/types.ts
CHANGED
|
@@ -28,7 +28,9 @@ export type NavigateOptions = {
|
|
|
28
28
|
*/
|
|
29
29
|
skipFocus?: boolean;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Note: this option is deprecated and currently doesn't have any effect.
|
|
32
|
+
* @deprecated
|
|
33
|
+
* @ignore
|
|
32
34
|
*/
|
|
33
35
|
replace?: boolean;
|
|
34
36
|
};
|
|
@@ -12,7 +12,7 @@ import type { Navigator } from './types';
|
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves a `navigator` instance.
|
|
14
14
|
*/
|
|
15
|
-
function useNavigator(): Navigator {
|
|
15
|
+
export function useNavigator(): Navigator {
|
|
16
16
|
const { location, params, goTo, goBack, goToParent } =
|
|
17
17
|
useContext( NavigatorContext );
|
|
18
18
|
|
|
@@ -24,5 +24,3 @@ function useNavigator(): Navigator {
|
|
|
24
24
|
params,
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
export default useNavigator;
|
|
@@ -275,9 +275,9 @@ function PaletteEditListView< T extends Color | Gradient >( {
|
|
|
275
275
|
addColorRef,
|
|
276
276
|
}: PaletteEditListViewProps< T > ) {
|
|
277
277
|
// When unmounting the component if there are empty elements (the user did not complete the insertion) clean them.
|
|
278
|
-
const
|
|
278
|
+
const elementsReferenceRef = useRef< typeof elements >();
|
|
279
279
|
useEffect( () => {
|
|
280
|
-
|
|
280
|
+
elementsReferenceRef.current = elements;
|
|
281
281
|
}, [ elements ] );
|
|
282
282
|
|
|
283
283
|
const debounceOnChange = useDebounce( onChange, 100 );
|
package/src/private-apis.ts
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { Composite
|
|
4
|
+
import { Composite } from './composite';
|
|
5
|
+
import { useCompositeStore } from './composite/store';
|
|
5
6
|
import { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';
|
|
6
7
|
import { createPrivateSlotFill } from './slot-fill';
|
|
7
|
-
import {
|
|
8
|
-
DropdownMenu as DropdownMenuV2,
|
|
9
|
-
DropdownMenuGroup as DropdownMenuGroupV2,
|
|
10
|
-
DropdownMenuItem as DropdownMenuItemV2,
|
|
11
|
-
DropdownMenuCheckboxItem as DropdownMenuCheckboxItemV2,
|
|
12
|
-
DropdownMenuRadioItem as DropdownMenuRadioItemV2,
|
|
13
|
-
DropdownMenuSeparator as DropdownMenuSeparatorV2,
|
|
14
|
-
DropdownMenuItemLabel as DropdownMenuItemLabelV2,
|
|
15
|
-
DropdownMenuItemHelpText as DropdownMenuItemHelpTextV2,
|
|
16
|
-
} from './dropdown-menu-v2';
|
|
8
|
+
import { DropdownMenuV2 } from './dropdown-menu-v2';
|
|
17
9
|
import { ComponentsContext } from './context/context-system-provider';
|
|
18
10
|
import Theme from './theme';
|
|
19
11
|
import Tabs from './tabs';
|
|
@@ -26,6 +18,8 @@ lock( privateApis, {
|
|
|
26
18
|
CompositeGroupV2: Composite.Group,
|
|
27
19
|
CompositeItemV2: Composite.Item,
|
|
28
20
|
CompositeRowV2: Composite.Row,
|
|
21
|
+
CompositeTypeaheadV2: Composite.Typeahead,
|
|
22
|
+
CompositeHoverV2: Composite.Hover,
|
|
29
23
|
useCompositeStoreV2: useCompositeStore,
|
|
30
24
|
__experimentalPopoverLegacyPositionToPlacement,
|
|
31
25
|
createPrivateSlotFill,
|
|
@@ -33,12 +27,5 @@ lock( privateApis, {
|
|
|
33
27
|
Tabs,
|
|
34
28
|
Theme,
|
|
35
29
|
DropdownMenuV2,
|
|
36
|
-
DropdownMenuGroupV2,
|
|
37
|
-
DropdownMenuItemV2,
|
|
38
|
-
DropdownMenuCheckboxItemV2,
|
|
39
|
-
DropdownMenuRadioItemV2,
|
|
40
|
-
DropdownMenuSeparatorV2,
|
|
41
|
-
DropdownMenuItemLabelV2,
|
|
42
|
-
DropdownMenuItemHelpTextV2,
|
|
43
30
|
kebabCase,
|
|
44
31
|
} );
|
|
@@ -8,7 +8,7 @@ import styled from '@emotion/styled';
|
|
|
8
8
|
* Internal dependencies
|
|
9
9
|
*/
|
|
10
10
|
import NumberControl from '../../number-control';
|
|
11
|
-
import { COLORS, rtl } from '../../utils';
|
|
11
|
+
import { COLORS, rtl, CONFIG } from '../../utils';
|
|
12
12
|
import { space } from '../../utils/space';
|
|
13
13
|
|
|
14
14
|
import type {
|
|
@@ -102,7 +102,7 @@ export const Rail = styled.span`
|
|
|
102
102
|
position: absolute;
|
|
103
103
|
margin-top: ${ ( rangeHeightValue - railHeight ) / 2 }px;
|
|
104
104
|
top: 0;
|
|
105
|
-
border-radius: ${
|
|
105
|
+
border-radius: ${ CONFIG.radiusFull };
|
|
106
106
|
|
|
107
107
|
${ railBackgroundColor };
|
|
108
108
|
`;
|
|
@@ -119,7 +119,7 @@ const trackBackgroundColor = ( { disabled, trackColor }: TrackProps ) => {
|
|
|
119
119
|
|
|
120
120
|
export const Track = styled.span`
|
|
121
121
|
background-color: currentColor;
|
|
122
|
-
border-radius: ${
|
|
122
|
+
border-radius: ${ CONFIG.radiusFull };
|
|
123
123
|
height: ${ railHeight }px;
|
|
124
124
|
pointer-events: none;
|
|
125
125
|
display: block;
|
|
@@ -203,7 +203,7 @@ export const ThumbWrapper = styled.span`
|
|
|
203
203
|
top: 0;
|
|
204
204
|
user-select: none;
|
|
205
205
|
width: ${ thumbSize }px;
|
|
206
|
-
border-radius:
|
|
206
|
+
border-radius: ${ CONFIG.radiusRound };
|
|
207
207
|
|
|
208
208
|
${ thumbColor };
|
|
209
209
|
${ rtl( { marginLeft: -10 } ) };
|
|
@@ -221,7 +221,7 @@ const thumbFocus = ( { isFocused }: ThumbProps ) => {
|
|
|
221
221
|
position: absolute;
|
|
222
222
|
background-color: ${ COLORS.theme.accent };
|
|
223
223
|
opacity: 0.4;
|
|
224
|
-
border-radius:
|
|
224
|
+
border-radius: ${ CONFIG.radiusRound };
|
|
225
225
|
height: ${ thumbSize + 8 }px;
|
|
226
226
|
width: ${ thumbSize + 8 }px;
|
|
227
227
|
top: -4px;
|
|
@@ -233,7 +233,7 @@ const thumbFocus = ( { isFocused }: ThumbProps ) => {
|
|
|
233
233
|
|
|
234
234
|
export const Thumb = styled.span< ThumbProps >`
|
|
235
235
|
align-items: center;
|
|
236
|
-
border-radius:
|
|
236
|
+
border-radius: ${ CONFIG.radiusRound };
|
|
237
237
|
height: 100%;
|
|
238
238
|
outline: 0;
|
|
239
239
|
position: absolute;
|
|
@@ -281,7 +281,7 @@ const tooltipPosition = ( { position }: TooltipProps ) => {
|
|
|
281
281
|
|
|
282
282
|
export const Tooltip = styled.span< TooltipProps >`
|
|
283
283
|
background: rgba( 0, 0, 0, 0.8 );
|
|
284
|
-
border-radius:
|
|
284
|
+
border-radius: ${ CONFIG.radiusSmall };
|
|
285
285
|
color: white;
|
|
286
286
|
display: inline-block;
|
|
287
287
|
font-size: 12px;
|
|
@@ -7,7 +7,7 @@ import styled from '@emotion/styled';
|
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { Text } from '../../../text';
|
|
10
|
-
import { font, COLORS } from '../../../utils';
|
|
10
|
+
import { font, COLORS, CONFIG } from '../../../utils';
|
|
11
11
|
|
|
12
12
|
export const Root = styled.div`
|
|
13
13
|
bottom: 0;
|
|
@@ -31,7 +31,7 @@ export const TooltipWrapper = styled.div`
|
|
|
31
31
|
|
|
32
32
|
export const Tooltip = styled.div`
|
|
33
33
|
background: ${ COLORS.theme.foreground };
|
|
34
|
-
border-radius:
|
|
34
|
+
border-radius: ${ CONFIG.radiusSmall };
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
font-family: ${ font( 'default.fontFamily' ) };
|
|
37
37
|
font-size: 12px;
|
|
@@ -28,7 +28,7 @@ $resize-handler-container-size: $resize-handler-size + ($grid-unit-05 * 2); // M
|
|
|
28
28
|
content: "";
|
|
29
29
|
width: $resize-handler-size;
|
|
30
30
|
height: $resize-handler-size;
|
|
31
|
-
border-radius:
|
|
31
|
+
border-radius: $radius-round;
|
|
32
32
|
background: $white;
|
|
33
33
|
cursor: inherit;
|
|
34
34
|
position: absolute;
|
|
@@ -43,7 +43,7 @@ $resize-handler-container-size: $resize-handler-size + ($grid-unit-05 * 2); // M
|
|
|
43
43
|
// This is the "visible" resize handle for side handles - the line
|
|
44
44
|
.components-resizable-box__side-handle::before {
|
|
45
45
|
display: block;
|
|
46
|
-
border-radius:
|
|
46
|
+
border-radius: $radius-full;
|
|
47
47
|
content: "";
|
|
48
48
|
width: 3px;
|
|
49
49
|
height: 3px;
|
|
@@ -7,7 +7,7 @@ import styled from '@emotion/styled';
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
9
9
|
*/
|
|
10
|
-
import { COLORS, rtl } from '../../utils';
|
|
10
|
+
import { COLORS, rtl, CONFIG } from '../../utils';
|
|
11
11
|
import { space } from '../../utils/space';
|
|
12
12
|
import type { SelectControlProps } from '../types';
|
|
13
13
|
import InputControlSuffixWrapper from '../../input-control/input-suffix-wrapper';
|
|
@@ -108,10 +108,10 @@ const sizePaddings = ( {
|
|
|
108
108
|
selectSize = 'default',
|
|
109
109
|
}: SelectProps ) => {
|
|
110
110
|
const padding = {
|
|
111
|
-
default:
|
|
112
|
-
small:
|
|
113
|
-
compact:
|
|
114
|
-
'__unstable-large':
|
|
111
|
+
default: CONFIG.controlPaddingX,
|
|
112
|
+
small: CONFIG.controlPaddingXSmall,
|
|
113
|
+
compact: CONFIG.controlPaddingXSmall,
|
|
114
|
+
'__unstable-large': CONFIG.controlPaddingX,
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
if ( ! __next40pxDefaultSize ) {
|
|
@@ -12,17 +12,17 @@ import type { FillComponentProps } from '../types';
|
|
|
12
12
|
|
|
13
13
|
function useForceUpdate() {
|
|
14
14
|
const [ , setState ] = useState( {} );
|
|
15
|
-
const
|
|
15
|
+
const mountedRef = useRef( true );
|
|
16
16
|
|
|
17
17
|
useEffect( () => {
|
|
18
|
-
|
|
18
|
+
mountedRef.current = true;
|
|
19
19
|
return () => {
|
|
20
|
-
|
|
20
|
+
mountedRef.current = false;
|
|
21
21
|
};
|
|
22
22
|
}, [] );
|
|
23
23
|
|
|
24
24
|
return () => {
|
|
25
|
-
if (
|
|
25
|
+
if ( mountedRef.current ) {
|
|
26
26
|
setState( {} );
|
|
27
27
|
}
|
|
28
28
|
};
|
package/src/snackbar/index.tsx
CHANGED
|
@@ -96,17 +96,17 @@ function UnforwardedSnackbar(
|
|
|
96
96
|
|
|
97
97
|
// The `onDismiss/onRemove` can have unstable references,
|
|
98
98
|
// trigger side-effect cleanup, and reset timers.
|
|
99
|
-
const
|
|
99
|
+
const callbacksRef = useRef( { onDismiss, onRemove } );
|
|
100
100
|
useLayoutEffect( () => {
|
|
101
|
-
|
|
101
|
+
callbacksRef.current = { onDismiss, onRemove };
|
|
102
102
|
} );
|
|
103
103
|
|
|
104
104
|
useEffect( () => {
|
|
105
105
|
// Only set up the timeout dismiss if we're not explicitly dismissing.
|
|
106
106
|
const timeoutHandle = setTimeout( () => {
|
|
107
107
|
if ( ! explicitDismiss ) {
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
callbacksRef.current.onDismiss?.();
|
|
109
|
+
callbacksRef.current.onRemove?.();
|
|
110
110
|
}
|
|
111
111
|
}, NOTICE_TIMEOUT );
|
|
112
112
|
|