@wordpress/components 29.0.0 → 29.1.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 +39 -1
- package/LICENSE.md +1 -1
- package/build/badge/index.js +64 -0
- package/build/badge/index.js.map +1 -0
- package/build/badge/types.js +6 -0
- package/build/badge/types.js.map +1 -0
- package/build/box-control/index.js +5 -1
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-control.js +90 -29
- package/build/box-control/input-control.js.map +1 -1
- package/build/box-control/types.js.map +1 -1
- package/build/box-control/utils.js +50 -0
- package/build/box-control/utils.js.map +1 -1
- package/build/button-group/index.js +10 -0
- package/build/button-group/index.js.map +1 -1
- package/build/button-group/types.js.map +1 -1
- package/build/custom-select-control/index.js +3 -5
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control-v2/custom-select.js +2 -3
- package/build/custom-select-control-v2/custom-select.js.map +1 -1
- package/build/date-time/date/index.js +1 -0
- package/build/date-time/date/index.js.map +1 -1
- package/build/dimension-control/index.js +1 -0
- package/build/dimension-control/index.js.map +1 -1
- package/build/font-size-picker/styles.js +9 -9
- package/build/font-size-picker/styles.js.map +1 -1
- package/build/heading/hook.js +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/input-control/index.js +9 -0
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/types.js.map +1 -1
- package/build/menu/checkbox-item.js +2 -0
- package/build/menu/checkbox-item.js.map +1 -1
- package/build/menu/index.js +25 -94
- package/build/menu/index.js.map +1 -1
- package/build/menu/item.js +10 -1
- package/build/menu/item.js.map +1 -1
- package/build/menu/popover.js +89 -0
- package/build/menu/popover.js.map +1 -0
- package/build/menu/radio-item.js +2 -0
- package/build/menu/radio-item.js.map +1 -1
- package/build/menu/submenu-trigger-item.js +58 -0
- package/build/menu/submenu-trigger-item.js.map +1 -0
- package/build/menu/trigger-button.js +45 -0
- package/build/menu/trigger-button.js.map +1 -0
- package/build/menu/types.js.map +1 -1
- package/build/navigation/back-button/index.js +1 -0
- package/build/navigation/back-button/index.js.map +1 -1
- package/build/navigation/index.js +6 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/index.js +1 -0
- package/build/navigation/item/index.js.map +1 -1
- package/build/number-control/index.js +1 -0
- package/build/number-control/index.js.map +1 -1
- package/build/palette-edit/index.js +1 -0
- package/build/palette-edit/index.js.map +1 -1
- package/build/private-apis.js +3 -1
- package/build/private-apis.js.map +1 -1
- package/build/radio-group/index.js +6 -0
- package/build/radio-group/index.js.map +1 -1
- package/build/radio-group/radio.js +2 -3
- package/build/radio-group/radio.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +28 -28
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/select-control/index.js +9 -0
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/types.js.map +1 -1
- package/build/slot-fill/context.js +4 -3
- package/build/slot-fill/context.js.map +1 -1
- package/build/slot-fill/fill.js +10 -15
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/provider.js +41 -55
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +31 -23
- package/build/slot-fill/slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/tab-panel/index.js +2 -3
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js +21 -4
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/types.js.map +1 -1
- package/build/text/hook.js +6 -6
- package/build/text/hook.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js +2 -3
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build/tooltip/index.js +2 -3
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-select/index.js +10 -2
- package/build/tree-select/index.js.map +1 -1
- package/build/tree-select/types.js.map +1 -1
- package/build-module/badge/index.js +57 -0
- package/build-module/badge/index.js.map +1 -0
- package/build-module/badge/types.js +2 -0
- package/build-module/badge/types.js.map +1 -0
- package/build-module/box-control/index.js +5 -1
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-control.js +92 -31
- package/build-module/box-control/input-control.js.map +1 -1
- package/build-module/box-control/types.js.map +1 -1
- package/build-module/box-control/utils.js +47 -0
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button-group/index.js +10 -0
- package/build-module/button-group/index.js.map +1 -1
- package/build-module/button-group/types.js.map +1 -1
- package/build-module/custom-select-control/index.js +3 -5
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control-v2/custom-select.js +1 -2
- package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
- package/build-module/date-time/date/index.js +1 -0
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/dimension-control/index.js +1 -0
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/font-size-picker/styles.js +9 -9
- package/build-module/font-size-picker/styles.js.map +1 -1
- package/build-module/heading/hook.js +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/input-control/index.js +9 -0
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/types.js.map +1 -1
- package/build-module/menu/checkbox-item.js +2 -0
- package/build-module/menu/checkbox-item.js.map +1 -1
- package/build-module/menu/index.js +28 -97
- package/build-module/menu/index.js.map +1 -1
- package/build-module/menu/item.js +10 -1
- package/build-module/menu/item.js.map +1 -1
- package/build-module/menu/popover.js +81 -0
- package/build-module/menu/popover.js.map +1 -0
- package/build-module/menu/radio-item.js +2 -0
- package/build-module/menu/radio-item.js.map +1 -1
- package/build-module/menu/submenu-trigger-item.js +50 -0
- package/build-module/menu/submenu-trigger-item.js.map +1 -0
- package/build-module/menu/trigger-button.js +37 -0
- package/build-module/menu/trigger-button.js.map +1 -0
- package/build-module/menu/types.js.map +1 -1
- package/build-module/navigation/back-button/index.js +1 -0
- package/build-module/navigation/back-button/index.js.map +1 -1
- package/build-module/navigation/index.js +6 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/index.js +1 -0
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/number-control/index.js +1 -0
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/palette-edit/index.js +1 -0
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/private-apis.js +3 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/radio-group/index.js +6 -0
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/radio-group/radio.js +1 -2
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +28 -28
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/select-control/index.js +9 -0
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/types.js.map +1 -1
- package/build-module/slot-fill/context.js +5 -3
- package/build-module/slot-fill/context.js.map +1 -1
- package/build-module/slot-fill/fill.js +10 -15
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/provider.js +41 -55
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +32 -24
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/tab-panel/index.js +1 -2
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js +21 -4
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/types.js.map +1 -1
- package/build-module/text/hook.js +6 -6
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +1 -2
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build-module/tooltip/index.js +1 -2
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-select/index.js +10 -2
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/tree-select/types.js.map +1 -1
- package/build-style/style-rtl.css +60 -13
- package/build-style/style.css +60 -13
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
- package/build-types/animate/stories/index.story.d.ts +7 -7
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/badge/index.d.ts +8 -0
- package/build-types/badge/index.d.ts.map +1 -0
- package/build-types/badge/stories/index.story.d.ts +17 -0
- package/build-types/badge/stories/index.story.d.ts.map +1 -0
- package/build-types/badge/test/index.d.ts +2 -0
- package/build-types/badge/test/index.d.ts.map +1 -0
- package/build-types/badge/types.d.ts +13 -0
- package/build-types/badge/types.d.ts.map +1 -0
- package/build-types/base-control/stories/index.story.d.ts +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +1 -1
- package/build-types/border-control/stories/index.story.d.ts +5 -5
- package/build-types/box-control/index.d.ts +1 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/input-control.d.ts +1 -1
- package/build-types/box-control/input-control.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts +356 -11
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +2 -2
- package/build-types/box-control/types.d.ts +17 -0
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/box-control/utils.d.ts +27 -1
- package/build-types/box-control/utils.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +7 -7
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts +3 -1
- package/build-types/button-group/index.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts +6 -0
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/types.d.ts +7 -0
- package/build-types/button-group/types.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts +5 -5
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +3 -3
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +2 -2
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +4 -4
- package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts +3 -3
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts +3 -3
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +4 -4
- package/build-types/dimension-control/index.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +3 -3
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +4 -4
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +3 -3
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts +1 -1
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +4 -4
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +1 -0
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +7 -7
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +11 -2
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/checkbox-item.d.ts.map +1 -1
- package/build-types/menu/index.d.ts +10 -1
- package/build-types/menu/index.d.ts.map +1 -1
- package/build-types/menu/item.d.ts.map +1 -1
- package/build-types/menu/popover.d.ts +3 -0
- package/build-types/menu/popover.d.ts.map +1 -0
- package/build-types/menu/radio-item.d.ts.map +1 -1
- package/build-types/menu/stories/index.story.d.ts +9 -9
- package/build-types/menu/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/submenu-trigger-item.d.ts +3 -0
- package/build-types/menu/submenu-trigger-item.d.ts.map +1 -0
- package/build-types/menu/trigger-button.d.ts +3 -0
- package/build-types/menu/trigger-button.d.ts.map +1 -0
- package/build-types/menu/types.d.ts +208 -57
- package/build-types/menu/types.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts +1 -1
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +4 -4
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/item/index.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts +6 -6
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts +4 -4
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts +1 -1
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/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 +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +2 -2
- package/build-types/responsive-wrapper/stories/index.story.d.ts +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts +1 -1
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +1 -1
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +1 -0
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +5 -5
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +1 -1
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts +1 -1
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/context.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +13 -11
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +4 -4
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +21 -4
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts +10 -10
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/types.d.ts +13 -13
- package/build-types/tabs/types.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +3 -3
- package/build-types/theme/stories/index.story.d.ts +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +3 -3
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts +3 -2
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts +1 -1
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/types.d.ts +5 -1
- package/build-types/tree-select/types.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +1 -1
- package/package.json +19 -19
- package/src/alignment-matrix-control/README.md +16 -15
- package/src/angle-picker-control/README.md +10 -9
- package/src/badge/README.md +24 -0
- package/src/badge/docs-manifest.json +5 -0
- package/src/badge/index.tsx +67 -0
- package/src/badge/stories/index.story.tsx +54 -0
- package/src/badge/styles.scss +49 -0
- package/src/badge/test/index.tsx +45 -0
- package/src/badge/types.ts +12 -0
- package/src/base-control/README.md +22 -21
- package/src/box-control/README.md +41 -24
- package/src/box-control/index.tsx +4 -0
- package/src/box-control/input-control.tsx +142 -40
- package/src/box-control/stories/index.story.tsx +12 -0
- package/src/box-control/types.ts +18 -0
- package/src/box-control/utils.ts +60 -0
- package/src/button/README.md +51 -50
- package/src/button/style.scss +9 -10
- package/src/button/test/index.tsx +9 -2
- package/src/button-group/README.md +4 -0
- package/src/button-group/index.tsx +11 -1
- package/src/button-group/stories/index.story.tsx +8 -1
- package/src/button-group/types.ts +7 -0
- package/src/custom-select-control/index.tsx +3 -3
- package/src/custom-select-control-v2/custom-select.tsx +1 -2
- package/src/custom-select-control-v2/stories/index.story.tsx +4 -0
- package/src/date-time/date/index.tsx +1 -0
- package/src/dimension-control/index.tsx +1 -0
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
- package/src/disabled/stories/index.story.tsx +1 -0
- package/src/drop-zone/stories/index.story.tsx +7 -1
- package/src/font-size-picker/styles.ts +1 -0
- package/src/form-file-upload/README.md +22 -21
- package/src/gradient-picker/README.md +36 -35
- package/src/heading/hook.ts +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +4 -4
- package/src/icon/README.md +9 -8
- package/src/input-control/README.md +1 -0
- package/src/input-control/index.tsx +10 -0
- package/src/input-control/stories/index.story.tsx +6 -1
- package/src/input-control/test/index.js +9 -3
- package/src/input-control/types.ts +11 -2
- package/src/menu/checkbox-item.tsx +2 -1
- package/src/menu/index.tsx +61 -165
- package/src/menu/item.tsx +17 -2
- package/src/menu/popover.tsx +103 -0
- package/src/menu/radio-item.tsx +2 -1
- package/src/menu/stories/index.story.tsx +533 -381
- package/src/menu/submenu-trigger-item.tsx +61 -0
- package/src/menu/test/index.tsx +266 -182
- package/src/menu/trigger-button.tsx +46 -0
- package/src/menu/types.ts +210 -63
- package/src/modal/stories/index.story.tsx +4 -1
- package/src/navigation/back-button/index.tsx +1 -0
- package/src/navigation/index.tsx +7 -0
- package/src/navigation/item/index.tsx +2 -0
- package/src/navigation/test/index.tsx +4 -0
- package/src/navigator/test/index.tsx +4 -0
- package/src/number-control/index.tsx +1 -0
- package/src/palette-edit/index.tsx +1 -0
- package/src/panel/stories/index.story.tsx +3 -3
- package/src/private-apis.ts +2 -0
- package/src/radio-group/index.tsx +12 -1
- package/src/radio-group/radio.tsx +1 -2
- package/src/range-control/styles/range-control-styles.ts +8 -4
- package/src/select-control/README.md +3 -0
- package/src/select-control/index.tsx +10 -0
- package/src/select-control/stories/index.story.tsx +2 -0
- package/src/select-control/test/select-control.tsx +7 -1
- package/src/select-control/types.ts +1 -0
- package/src/slot-fill/context.ts +5 -3
- package/src/slot-fill/fill.ts +10 -15
- package/src/slot-fill/provider.tsx +63 -64
- package/src/slot-fill/slot.tsx +40 -27
- package/src/slot-fill/types.ts +23 -11
- package/src/style.scss +1 -0
- package/src/tab-panel/index.tsx +1 -2
- package/src/tab-panel/stories/index.story.tsx +4 -0
- package/src/tabs/README.md +151 -187
- package/src/tabs/docs-manifest.json +22 -0
- package/src/tabs/index.tsx +21 -4
- package/src/tabs/stories/best-practices.mdx +99 -0
- package/src/tabs/stories/index.story.tsx +5 -0
- package/src/tabs/types.ts +13 -14
- package/src/text/hook.ts +2 -2
- package/src/text/styles.ts +1 -1
- package/src/text/test/__snapshots__/index.tsx.snap +3 -3
- package/src/text/test/index.tsx +1 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +2 -2
- package/src/toggle-group-control/test/index.tsx +7 -1
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -2
- package/src/tooltip/index.tsx +1 -2
- package/src/tree-grid/stories/index.story.tsx +2 -0
- package/src/tree-select/README.md +144 -28
- package/src/tree-select/docs-manifest.json +5 -0
- package/src/tree-select/index.tsx +11 -2
- package/src/tree-select/stories/index.story.tsx +1 -0
- package/src/tree-select/types.ts +8 -1
- package/tsconfig.json +0 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/build/slot-fill/use-slot.js +0 -32
- package/build/slot-fill/use-slot.js.map +0 -1
- package/build-module/slot-fill/use-slot.js +0 -24
- package/build-module/slot-fill/use-slot.js.map +0 -1
- package/build-types/slot-fill/use-slot.d.ts +0 -10
- package/build-types/slot-fill/use-slot.d.ts.map +0 -1
- package/src/slot-fill/use-slot.ts +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","
|
|
1
|
+
{"version":3,"names":["Ariakit","clsx","useInstanceId","Children","useContext","createContext","forwardRef","cloneElement","deprecated","Shortcut","positionToPlacement","jsx","_jsx","jsxs","_jsxs","TooltipInternalContext","isNestedInTooltip","TOOLTIP_DELAY","CONTEXT_VALUE","UnforwardedTooltip","props","ref","children","className","delay","hideOnClick","placement","position","shortcut","text","restProps","baseId","Tooltip","describedById","undefined","isOnlyChild","count","process","env","NODE_ENV","console","error","computedPlacement","since","alternative","tooltipStore","useTooltipStore","showTimeout","mounted","useStoreState","Role","render","addDescribedById","element","Provider","value","TooltipAnchor","onClick","hide","store","unmountOnHide","gutter","id","overflowPadding"],"sources":["@wordpress/components/src/tooltip/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tChildren,\n\tuseContext,\n\tcreateContext,\n\tforwardRef,\n\tcloneElement,\n} from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tTooltipProps,\n\tTooltipInternalContext as TooltipInternalContextType,\n} from './types';\nimport Shortcut from '../shortcut';\nimport { positionToPlacement } from '../popover/utils';\n\nconst TooltipInternalContext = createContext< TooltipInternalContextType >( {\n\tisNestedInTooltip: false,\n} );\n\n/**\n * Time over anchor to wait before showing tooltip\n */\nexport const TOOLTIP_DELAY = 700;\n\nconst CONTEXT_VALUE = {\n\tisNestedInTooltip: true,\n};\n\nfunction UnforwardedTooltip(\n\tprops: TooltipProps,\n\tref: React.ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tdelay = TOOLTIP_DELAY,\n\t\thideOnClick = true,\n\t\tplacement,\n\t\tposition,\n\t\tshortcut,\n\t\ttext,\n\n\t\t...restProps\n\t} = props;\n\n\tconst { isNestedInTooltip } = useContext( TooltipInternalContext );\n\n\tconst baseId = useInstanceId( Tooltip, 'tooltip' );\n\tconst describedById = text || shortcut ? baseId : undefined;\n\n\tconst isOnlyChild = Children.count( children ) === 1;\n\t// console error if more than one child element is added\n\tif ( ! isOnlyChild ) {\n\t\tif ( 'development' === process.env.NODE_ENV ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t'wp-components.Tooltip should be called with only a single child element.'\n\t\t\t);\n\t\t}\n\t}\n\n\t// Compute tooltip's placement:\n\t// - give priority to `placement` prop, if defined\n\t// - otherwise, compute it from the legacy `position` prop (if defined)\n\t// - finally, fallback to the default placement: 'bottom'\n\tlet computedPlacement;\n\tif ( placement !== undefined ) {\n\t\tcomputedPlacement = placement;\n\t} else if ( position !== undefined ) {\n\t\tcomputedPlacement = positionToPlacement( position );\n\t\tdeprecated( '`position` prop in wp.components.tooltip', {\n\t\t\tsince: '6.4',\n\t\t\talternative: '`placement` prop',\n\t\t} );\n\t}\n\tcomputedPlacement = computedPlacement || 'bottom';\n\n\tconst tooltipStore = Ariakit.useTooltipStore( {\n\t\tplacement: computedPlacement,\n\t\tshowTimeout: delay,\n\t} );\n\tconst mounted = Ariakit.useStoreState( tooltipStore, 'mounted' );\n\n\tif ( isNestedInTooltip ) {\n\t\treturn isOnlyChild ? (\n\t\t\t<Ariakit.Role { ...restProps } render={ children } />\n\t\t) : (\n\t\t\tchildren\n\t\t);\n\t}\n\n\t// TODO: this is a temporary workaround to minimize the effects of the\n\t// Ariakit upgrade. Ariakit doesn't pass the `aria-describedby` prop to\n\t// the tooltip anchor anymore since 0.4.0, so we need to add it manually.\n\t// The `aria-describedby` attribute is added only if the anchor doesn't have\n\t// one already, and if the tooltip text is not the same as the anchor's\n\t// `aria-label`\n\t// See: https://github.com/WordPress/gutenberg/pull/64066\n\t// See: https://github.com/WordPress/gutenberg/pull/65989\n\tfunction addDescribedById( element: React.ReactElement ) {\n\t\treturn describedById &&\n\t\t\tmounted &&\n\t\t\telement.props[ 'aria-describedby' ] === undefined &&\n\t\t\telement.props[ 'aria-label' ] !== text\n\t\t\t? cloneElement( element, { 'aria-describedby': describedById } )\n\t\t\t: element;\n\t}\n\n\treturn (\n\t\t<TooltipInternalContext.Provider value={ CONTEXT_VALUE }>\n\t\t\t<Ariakit.TooltipAnchor\n\t\t\t\tonClick={ hideOnClick ? tooltipStore.hide : undefined }\n\t\t\t\tstore={ tooltipStore }\n\t\t\t\trender={\n\t\t\t\t\tisOnlyChild ? addDescribedById( children ) : undefined\n\t\t\t\t}\n\t\t\t\tref={ ref }\n\t\t\t>\n\t\t\t\t{ isOnlyChild ? undefined : children }\n\t\t\t</Ariakit.TooltipAnchor>\n\t\t\t{ isOnlyChild && ( text || shortcut ) && (\n\t\t\t\t<Ariakit.Tooltip\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx( 'components-tooltip', className ) }\n\t\t\t\t\tunmountOnHide\n\t\t\t\t\tgutter={ 4 }\n\t\t\t\t\tid={ describedById }\n\t\t\t\t\toverflowPadding={ 0.5 }\n\t\t\t\t\tstore={ tooltipStore }\n\t\t\t\t>\n\t\t\t\t\t{ text }\n\t\t\t\t\t{ shortcut && (\n\t\t\t\t\t\t<Shortcut\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\ttext ? 'components-tooltip__shortcut' : ''\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Ariakit.Tooltip>\n\t\t\t) }\n\t\t</TooltipInternalContext.Provider>\n\t);\n}\nexport const Tooltip = forwardRef( UnforwardedTooltip );\n\nexport default Tooltip;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,QAAQ,EACRC,UAAU,EACVC,aAAa,EACbC,UAAU,EACVC,YAAY,QACN,oBAAoB;AAC3B,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;;AAKA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,mBAAmB,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvD,MAAMC,sBAAsB,GAAGV,aAAa,CAAgC;EAC3EW,iBAAiB,EAAE;AACpB,CAAE,CAAC;;AAEH;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,GAAG;AAEhC,MAAMC,aAAa,GAAG;EACrBF,iBAAiB,EAAE;AACpB,CAAC;AAED,SAASG,kBAAkBA,CAC1BC,KAAmB,EACnBC,GAA8B,EAC7B;EACD,MAAM;IACLC,QAAQ;IACRC,SAAS;IACTC,KAAK,GAAGP,aAAa;IACrBQ,WAAW,GAAG,IAAI;IAClBC,SAAS;IACTC,QAAQ;IACRC,QAAQ;IACRC,IAAI;IAEJ,GAAGC;EACJ,CAAC,GAAGV,KAAK;EAET,MAAM;IAAEJ;EAAkB,CAAC,GAAGZ,UAAU,CAAEW,sBAAuB,CAAC;EAElE,MAAMgB,MAAM,GAAG7B,aAAa,CAAE8B,OAAO,EAAE,SAAU,CAAC;EAClD,MAAMC,aAAa,GAAGJ,IAAI,IAAID,QAAQ,GAAGG,MAAM,GAAGG,SAAS;EAE3D,MAAMC,WAAW,GAAGhC,QAAQ,CAACiC,KAAK,CAAEd,QAAS,CAAC,KAAK,CAAC;EACpD;EACA,IAAK,CAAEa,WAAW,EAAG;IACpB,IAAK,aAAa,KAAKE,OAAO,CAACC,GAAG,CAACC,QAAQ,EAAG;MAC7C;MACAC,OAAO,CAACC,KAAK,CACZ,0EACD,CAAC;IACF;EACD;;EAEA;EACA;EACA;EACA;EACA,IAAIC,iBAAiB;EACrB,IAAKhB,SAAS,KAAKQ,SAAS,EAAG;IAC9BQ,iBAAiB,GAAGhB,SAAS;EAC9B,CAAC,MAAM,IAAKC,QAAQ,KAAKO,SAAS,EAAG;IACpCQ,iBAAiB,GAAGhC,mBAAmB,CAAEiB,QAAS,CAAC;IACnDnB,UAAU,CAAE,0CAA0C,EAAE;MACvDmC,KAAK,EAAE,KAAK;MACZC,WAAW,EAAE;IACd,CAAE,CAAC;EACJ;EACAF,iBAAiB,GAAGA,iBAAiB,IAAI,QAAQ;EAEjD,MAAMG,YAAY,GAAG7C,OAAO,CAAC8C,eAAe,CAAE;IAC7CpB,SAAS,EAAEgB,iBAAiB;IAC5BK,WAAW,EAAEvB;EACd,CAAE,CAAC;EACH,MAAMwB,OAAO,GAAGhD,OAAO,CAACiD,aAAa,CAAEJ,YAAY,EAAE,SAAU,CAAC;EAEhE,IAAK7B,iBAAiB,EAAG;IACxB,OAAOmB,WAAW,gBACjBvB,IAAA,CAACZ,OAAO,CAACkD,IAAI;MAAA,GAAMpB,SAAS;MAAGqB,MAAM,EAAG7B;IAAU,CAAE,CAAC,GAErDA,QACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS8B,gBAAgBA,CAAEC,OAA2B,EAAG;IACxD,OAAOpB,aAAa,IACnBe,OAAO,IACPK,OAAO,CAACjC,KAAK,CAAE,kBAAkB,CAAE,KAAKc,SAAS,IACjDmB,OAAO,CAACjC,KAAK,CAAE,YAAY,CAAE,KAAKS,IAAI,GACpCtB,YAAY,CAAE8C,OAAO,EAAE;MAAE,kBAAkB,EAAEpB;IAAc,CAAE,CAAC,GAC9DoB,OAAO;EACX;EAEA,oBACCvC,KAAA,CAACC,sBAAsB,CAACuC,QAAQ;IAACC,KAAK,EAAGrC,aAAe;IAAAI,QAAA,gBACvDV,IAAA,CAACZ,OAAO,CAACwD,aAAa;MACrBC,OAAO,EAAGhC,WAAW,GAAGoB,YAAY,CAACa,IAAI,GAAGxB,SAAW;MACvDyB,KAAK,EAAGd,YAAc;MACtBM,MAAM,EACLhB,WAAW,GAAGiB,gBAAgB,CAAE9B,QAAS,CAAC,GAAGY,SAC7C;MACDb,GAAG,EAAGA,GAAK;MAAAC,QAAA,EAETa,WAAW,GAAGD,SAAS,GAAGZ;IAAQ,CACd,CAAC,EACtBa,WAAW,KAAMN,IAAI,IAAID,QAAQ,CAAE,iBACpCd,KAAA,CAACd,OAAO,CAACgC,OAAO;MAAA,GACVF,SAAS;MACdP,SAAS,EAAGtB,IAAI,CAAE,oBAAoB,EAAEsB,SAAU,CAAG;MACrDqC,aAAa;MACbC,MAAM,EAAG,CAAG;MACZC,EAAE,EAAG7B,aAAe;MACpB8B,eAAe,EAAG,GAAK;MACvBJ,KAAK,EAAGd,YAAc;MAAAvB,QAAA,GAEpBO,IAAI,EACJD,QAAQ,iBACThB,IAAA,CAACH,QAAQ;QACRc,SAAS,EACRM,IAAI,GAAG,8BAA8B,GAAG,EACxC;QACDD,QAAQ,EAAGA;MAAU,CACrB,CACD;IAAA,CACe,CACjB;EAAA,CAC+B,CAAC;AAEpC;AACA,OAAO,MAAMI,OAAO,GAAG1B,UAAU,CAAEa,kBAAmB,CAAC;AAEvD,eAAea,OAAO","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ import { decodeEntities } from '@wordpress/html-entities';
|
|
|
11
11
|
import { SelectControl } from '../select-control';
|
|
12
12
|
import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
|
|
13
13
|
import { ContextSystemProvider } from '../context';
|
|
14
|
+
import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
const CONTEXT_VALUE = {
|
|
16
17
|
BaseControl: {
|
|
@@ -29,11 +30,11 @@ function getSelectOptions(tree, level = 0) {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
|
-
*
|
|
33
|
+
* Generates a hierarchical select input.
|
|
33
34
|
*
|
|
34
35
|
* ```jsx
|
|
36
|
+
* import { useState } from 'react';
|
|
35
37
|
* import { TreeSelect } from '@wordpress/components';
|
|
36
|
-
* import { useState } from '@wordpress/element';
|
|
37
38
|
*
|
|
38
39
|
* const MyTreeSelect = () => {
|
|
39
40
|
* const [ page, setPage ] = useState( 'p21' );
|
|
@@ -41,6 +42,7 @@ function getSelectOptions(tree, level = 0) {
|
|
|
41
42
|
* return (
|
|
42
43
|
* <TreeSelect
|
|
43
44
|
* __nextHasNoMarginBottom
|
|
45
|
+
* __next40pxDefaultSize
|
|
44
46
|
* label="Parent page"
|
|
45
47
|
* noOptionLabel="No parent page"
|
|
46
48
|
* onChange={ ( newPage ) => setPage( newPage ) }
|
|
@@ -91,9 +93,15 @@ export function TreeSelect(props) {
|
|
|
91
93
|
label: noOptionLabel
|
|
92
94
|
}, ...getSelectOptions(tree)].filter(option => !!option);
|
|
93
95
|
}, [noOptionLabel, tree]);
|
|
96
|
+
maybeWarnDeprecated36pxSize({
|
|
97
|
+
componentName: 'TreeSelect',
|
|
98
|
+
size: restProps.size,
|
|
99
|
+
__next40pxDefaultSize: restProps.__next40pxDefaultSize
|
|
100
|
+
});
|
|
94
101
|
return /*#__PURE__*/_jsx(ContextSystemProvider, {
|
|
95
102
|
value: CONTEXT_VALUE,
|
|
96
103
|
children: /*#__PURE__*/_jsx(SelectControl, {
|
|
104
|
+
__shouldNotWarnDeprecated36pxSize: true,
|
|
97
105
|
label,
|
|
98
106
|
options,
|
|
99
107
|
onChange,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","decodeEntities","SelectControl","useDeprecated36pxDefaultSizeProp","ContextSystemProvider","jsx","_jsx","CONTEXT_VALUE","BaseControl","_overrides","__associatedWPComponentName","getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","name","children","TreeSelect","props","noOptionLabel","onChange","selectedId","restProps","options","filter","option"],"sources":["@wordpress/components/src/tree-select/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, Truthy } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { ContextSystemProvider } from '../context';\n\nconst CONTEXT_VALUE = {\n\tBaseControl: {\n\t\t// Temporary during deprecation grace period: Overrides the underlying `__associatedWPComponentName`\n\t\t// via the context system to override the value set by SelectControl.\n\t\t_overrides: { __associatedWPComponentName: 'TreeSelect' },\n\t},\n};\n\nfunction getSelectOptions(\n\ttree: Tree[],\n\tlevel = 0\n): NonNullable< TreeSelectProps[ 'options' ] > {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + decodeEntities( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"names":["useMemo","decodeEntities","SelectControl","useDeprecated36pxDefaultSizeProp","ContextSystemProvider","maybeWarnDeprecated36pxSize","jsx","_jsx","CONTEXT_VALUE","BaseControl","_overrides","__associatedWPComponentName","getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","name","children","TreeSelect","props","noOptionLabel","onChange","selectedId","restProps","options","filter","option","componentName","size","__next40pxDefaultSize","__shouldNotWarnDeprecated36pxSize"],"sources":["@wordpress/components/src/tree-select/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, Truthy } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { ContextSystemProvider } from '../context';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst CONTEXT_VALUE = {\n\tBaseControl: {\n\t\t// Temporary during deprecation grace period: Overrides the underlying `__associatedWPComponentName`\n\t\t// via the context system to override the value set by SelectControl.\n\t\t_overrides: { __associatedWPComponentName: 'TreeSelect' },\n\t},\n};\n\nfunction getSelectOptions(\n\ttree: Tree[],\n\tlevel = 0\n): NonNullable< TreeSelectProps[ 'options' ] > {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + decodeEntities( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n * Generates a hierarchical select input.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { TreeSelect } from '@wordpress/components';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\t__next40pxDefaultSize\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\n * \t\t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t],\n * \t\t\t\t\t\t},\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nexport function TreeSelect( props: TreeSelectProps ) {\n\tconst {\n\t\tlabel,\n\t\tnoOptionLabel,\n\t\tonChange,\n\t\tselectedId,\n\t\ttree = [],\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst options = useMemo( () => {\n\t\treturn [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t].filter( < T, >( option: T ): option is Truthy< T > => !! option );\n\t}, [ noOptionLabel, tree ] );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'TreeSelect',\n\t\tsize: restProps.size,\n\t\t__next40pxDefaultSize: restProps.__next40pxDefaultSize,\n\t} );\n\n\treturn (\n\t\t<ContextSystemProvider value={ CONTEXT_VALUE }>\n\t\t\t<SelectControl\n\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t{ ...{ label, options, onChange } }\n\t\t\t\tvalue={ selectedId }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\nexport default TreeSelect;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,SAASC,aAAa,QAAQ,mBAAmB;AAEjD,SAASC,gCAAgC,QAAQ,+BAA+B;AAChF,SAASC,qBAAqB,QAAQ,YAAY;AAClD,SAASC,2BAA2B,QAAQ,+BAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5E,MAAMC,aAAa,GAAG;EACrBC,WAAW,EAAE;IACZ;IACA;IACAC,UAAU,EAAE;MAAEC,2BAA2B,EAAE;IAAa;EACzD;AACD,CAAC;AAED,SAASC,gBAAgBA,CACxBC,IAAY,EACZC,KAAK,GAAG,CAAC,EACqC;EAC9C,OAAOD,IAAI,CAACE,OAAO,CAAIC,QAAQ,IAAM,CACpC;IACCC,KAAK,EAAED,QAAQ,CAACE,EAAE;IAClBC,KAAK,EACJ,QAAQ,CAACC,MAAM,CAAEN,KAAK,GAAG,CAAE,CAAC,GAAGb,cAAc,CAAEe,QAAQ,CAACK,IAAK;EAC/D,CAAC,EACD,GAAGT,gBAAgB,CAAEI,QAAQ,CAACM,QAAQ,IAAI,EAAE,EAAER,KAAK,GAAG,CAAE,CAAC,CACxD,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASS,UAAUA,CAAEC,KAAsB,EAAG;EACpD,MAAM;IACLL,KAAK;IACLM,aAAa;IACbC,QAAQ;IACRC,UAAU;IACVd,IAAI,GAAG,EAAE;IACT,GAAGe;EACJ,CAAC,GAAGzB,gCAAgC,CAAEqB,KAAM,CAAC;EAE7C,MAAMK,OAAO,GAAG7B,OAAO,CAAE,MAAM;IAC9B,OAAO,CACNyB,aAAa,IAAI;MAAER,KAAK,EAAE,EAAE;MAAEE,KAAK,EAAEM;IAAc,CAAC,EACpD,GAAGb,gBAAgB,CAAEC,IAAK,CAAC,CAC3B,CAACiB,MAAM,CAAUC,MAAS,IAA6B,CAAC,CAAEA,MAAO,CAAC;EACpE,CAAC,EAAE,CAAEN,aAAa,EAAEZ,IAAI,CAAG,CAAC;EAE5BR,2BAA2B,CAAE;IAC5B2B,aAAa,EAAE,YAAY;IAC3BC,IAAI,EAAEL,SAAS,CAACK,IAAI;IACpBC,qBAAqB,EAAEN,SAAS,CAACM;EAClC,CAAE,CAAC;EAEH,oBACC3B,IAAA,CAACH,qBAAqB;IAACa,KAAK,EAAGT,aAAe;IAAAc,QAAA,eAC7Cf,IAAA,CAACL,aAAa;MACbiC,iCAAiC;MAC1BhB,KAAK;MAAEU,OAAO;MAAEH,QAAQ;MAC/BT,KAAK,EAAGU,UAAY;MAAA,GACfC;IAAS,CACd;EAAC,CACoB,CAAC;AAE1B;AAEA,eAAeL,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/tree-select/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { SelectControlSingleSelectionProps } from '../select-control/types';\n\nexport type Truthy< T > = T extends false | '' | 0 | null | undefined\n\t? never\n\t: T;\n\nexport interface Tree {\n\tid: string;\n\tname: string;\n\tchildren?: Tree[];\n}\n\n// `TreeSelect` inherits props from `SelectControl`, but only\n// in single selection mode (ie. when the `multiple` prop is not defined).\nexport interface TreeSelectProps\n\textends Omit
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/tree-select/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { SelectControlSingleSelectionProps } from '../select-control/types';\n\nexport type Truthy< T > = T extends false | '' | 0 | null | undefined\n\t? never\n\t: T;\n\nexport interface Tree {\n\tid: string;\n\tname: string;\n\tchildren?: Tree[];\n}\n\n// `TreeSelect` inherits props from `SelectControl`, but only\n// in single selection mode (ie. when the `multiple` prop is not defined).\nexport interface TreeSelectProps\n\textends Omit<\n\t\tSelectControlSingleSelectionProps,\n\t\t'value' | 'multiple' | 'onChange'\n\t> {\n\t/**\n\t * If this property is added, an option will be added with this label to represent empty selection.\n\t */\n\tnoOptionLabel?: string;\n\t/**\n\t * A function that receives the value of the new option that is being selected as input.\n\t */\n\tonChange?: SelectControlSingleSelectionProps[ 'onChange' ];\n\t/**\n\t * An array containing the tree objects with the possible nodes the user can select.\n\t */\n\ttree?: Tree[];\n\t/**\n\t * The id of the currently selected node.\n\t */\n\tselectedId?: SelectControlSingleSelectionProps[ 'value' ];\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -199,6 +199,56 @@
|
|
|
199
199
|
outline: 2px solid transparent;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
.components-badge {
|
|
203
|
+
box-sizing: border-box;
|
|
204
|
+
background-color: color-mix(in srgb, #fff 90%, var(--base-color));
|
|
205
|
+
color: color-mix(in srgb, #000 50%, var(--base-color));
|
|
206
|
+
padding: 0 8px;
|
|
207
|
+
min-height: 24px;
|
|
208
|
+
max-width: 100%;
|
|
209
|
+
border-radius: 2px;
|
|
210
|
+
font-size: 12px;
|
|
211
|
+
font-weight: 400;
|
|
212
|
+
line-height: 20px;
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
gap: 2px;
|
|
216
|
+
}
|
|
217
|
+
.components-badge *,
|
|
218
|
+
.components-badge *::before,
|
|
219
|
+
.components-badge *::after {
|
|
220
|
+
box-sizing: inherit;
|
|
221
|
+
}
|
|
222
|
+
.components-badge:where(.is-default) {
|
|
223
|
+
background-color: #f0f0f0;
|
|
224
|
+
color: #2f2f2f;
|
|
225
|
+
}
|
|
226
|
+
.components-badge.has-icon {
|
|
227
|
+
padding-inline-start: 4px;
|
|
228
|
+
}
|
|
229
|
+
.components-badge.is-info {
|
|
230
|
+
--base-color: #3858e9;
|
|
231
|
+
}
|
|
232
|
+
.components-badge.is-warning {
|
|
233
|
+
--base-color: #f0b849;
|
|
234
|
+
}
|
|
235
|
+
.components-badge.is-error {
|
|
236
|
+
--base-color: #cc1818;
|
|
237
|
+
}
|
|
238
|
+
.components-badge.is-success {
|
|
239
|
+
--base-color: #4ab866;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.components-badge__icon {
|
|
243
|
+
flex-shrink: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.components-badge__content {
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
text-overflow: ellipsis;
|
|
250
|
+
}
|
|
251
|
+
|
|
202
252
|
.components-button-group {
|
|
203
253
|
display: inline-block;
|
|
204
254
|
}
|
|
@@ -235,7 +285,6 @@
|
|
|
235
285
|
display: inline-flex;
|
|
236
286
|
text-decoration: none;
|
|
237
287
|
font-family: inherit;
|
|
238
|
-
font-weight: normal;
|
|
239
288
|
font-size: 13px;
|
|
240
289
|
margin: 0;
|
|
241
290
|
border: 0;
|
|
@@ -339,8 +388,10 @@
|
|
|
339
388
|
color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
340
389
|
background: transparent;
|
|
341
390
|
}
|
|
342
|
-
.components-button.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
|
|
343
|
-
box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-
|
|
391
|
+
.components-button.is-secondary:hover:not(:disabled, [aria-disabled=true], .is-pressed) {
|
|
392
|
+
box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
393
|
+
color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
394
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
344
395
|
}
|
|
345
396
|
.components-button.is-secondary:disabled:not(:focus), .components-button.is-secondary[aria-disabled=true]:not(:focus), .components-button.is-secondary[aria-disabled=true]:hover:not(:focus) {
|
|
346
397
|
box-shadow: inset 0 0 0 1px #ddd;
|
|
@@ -354,12 +405,11 @@
|
|
|
354
405
|
background: transparent;
|
|
355
406
|
}
|
|
356
407
|
.components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
|
|
357
|
-
|
|
358
|
-
|
|
408
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
409
|
+
color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
359
410
|
}
|
|
360
411
|
.components-button.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
|
|
361
|
-
|
|
362
|
-
background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
412
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 8%, transparent);
|
|
363
413
|
}
|
|
364
414
|
p + .components-button.is-tertiary {
|
|
365
415
|
margin-right: -6px;
|
|
@@ -388,10 +438,10 @@ p + .components-button.is-tertiary {
|
|
|
388
438
|
.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):disabled, .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link)[aria-disabled=true] {
|
|
389
439
|
color: #949494;
|
|
390
440
|
}
|
|
391
|
-
.components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
|
|
441
|
+
.components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
|
|
392
442
|
background: rgba(204, 24, 24, 0.04);
|
|
393
443
|
}
|
|
394
|
-
.components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
|
|
444
|
+
.components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:active:not(:disabled, [aria-disabled=true]) {
|
|
395
445
|
background: rgba(204, 24, 24, 0.08);
|
|
396
446
|
}
|
|
397
447
|
.components-button.is-link {
|
|
@@ -1078,8 +1128,7 @@ input.components-combobox-control__input[type=text]:focus {
|
|
|
1078
1128
|
}
|
|
1079
1129
|
|
|
1080
1130
|
body.is-dragging-components-draggable {
|
|
1081
|
-
cursor: move;
|
|
1082
|
-
/* Fallback for IE/Edge < 14 */
|
|
1131
|
+
cursor: move; /* Fallback for IE/Edge < 14 */
|
|
1083
1132
|
cursor: grabbing !important;
|
|
1084
1133
|
}
|
|
1085
1134
|
|
|
@@ -2917,7 +2966,6 @@ See https://bugs.webkit.org/show_bug.cgi?id=187903. */
|
|
|
2917
2966
|
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
|
|
2918
2967
|
animation: none;
|
|
2919
2968
|
}
|
|
2920
|
-
|
|
2921
2969
|
.components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
|
|
2922
2970
|
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
|
|
2923
2971
|
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
|
|
@@ -3016,7 +3064,6 @@ body.lockscroll {
|
|
|
3016
3064
|
}
|
|
3017
3065
|
@media (min-width: 600px) {
|
|
3018
3066
|
.components-snackbar {
|
|
3019
|
-
width: -moz-fit-content;
|
|
3020
3067
|
width: fit-content;
|
|
3021
3068
|
}
|
|
3022
3069
|
}
|
package/build-style/style.css
CHANGED
|
@@ -199,6 +199,56 @@
|
|
|
199
199
|
outline: 2px solid transparent;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
.components-badge {
|
|
203
|
+
box-sizing: border-box;
|
|
204
|
+
background-color: color-mix(in srgb, #fff 90%, var(--base-color));
|
|
205
|
+
color: color-mix(in srgb, #000 50%, var(--base-color));
|
|
206
|
+
padding: 0 8px;
|
|
207
|
+
min-height: 24px;
|
|
208
|
+
max-width: 100%;
|
|
209
|
+
border-radius: 2px;
|
|
210
|
+
font-size: 12px;
|
|
211
|
+
font-weight: 400;
|
|
212
|
+
line-height: 20px;
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
gap: 2px;
|
|
216
|
+
}
|
|
217
|
+
.components-badge *,
|
|
218
|
+
.components-badge *::before,
|
|
219
|
+
.components-badge *::after {
|
|
220
|
+
box-sizing: inherit;
|
|
221
|
+
}
|
|
222
|
+
.components-badge:where(.is-default) {
|
|
223
|
+
background-color: #f0f0f0;
|
|
224
|
+
color: #2f2f2f;
|
|
225
|
+
}
|
|
226
|
+
.components-badge.has-icon {
|
|
227
|
+
padding-inline-start: 4px;
|
|
228
|
+
}
|
|
229
|
+
.components-badge.is-info {
|
|
230
|
+
--base-color: #3858e9;
|
|
231
|
+
}
|
|
232
|
+
.components-badge.is-warning {
|
|
233
|
+
--base-color: #f0b849;
|
|
234
|
+
}
|
|
235
|
+
.components-badge.is-error {
|
|
236
|
+
--base-color: #cc1818;
|
|
237
|
+
}
|
|
238
|
+
.components-badge.is-success {
|
|
239
|
+
--base-color: #4ab866;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.components-badge__icon {
|
|
243
|
+
flex-shrink: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.components-badge__content {
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
text-overflow: ellipsis;
|
|
250
|
+
}
|
|
251
|
+
|
|
202
252
|
.components-button-group {
|
|
203
253
|
display: inline-block;
|
|
204
254
|
}
|
|
@@ -235,7 +285,6 @@
|
|
|
235
285
|
display: inline-flex;
|
|
236
286
|
text-decoration: none;
|
|
237
287
|
font-family: inherit;
|
|
238
|
-
font-weight: normal;
|
|
239
288
|
font-size: 13px;
|
|
240
289
|
margin: 0;
|
|
241
290
|
border: 0;
|
|
@@ -339,8 +388,10 @@
|
|
|
339
388
|
color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
340
389
|
background: transparent;
|
|
341
390
|
}
|
|
342
|
-
.components-button.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
|
|
343
|
-
box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-
|
|
391
|
+
.components-button.is-secondary:hover:not(:disabled, [aria-disabled=true], .is-pressed) {
|
|
392
|
+
box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
393
|
+
color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
394
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
344
395
|
}
|
|
345
396
|
.components-button.is-secondary:disabled:not(:focus), .components-button.is-secondary[aria-disabled=true]:not(:focus), .components-button.is-secondary[aria-disabled=true]:hover:not(:focus) {
|
|
346
397
|
box-shadow: inset 0 0 0 1px #ddd;
|
|
@@ -354,12 +405,11 @@
|
|
|
354
405
|
background: transparent;
|
|
355
406
|
}
|
|
356
407
|
.components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
|
|
357
|
-
|
|
358
|
-
|
|
408
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
409
|
+
color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
359
410
|
}
|
|
360
411
|
.components-button.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
|
|
361
|
-
|
|
362
|
-
background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
412
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 8%, transparent);
|
|
363
413
|
}
|
|
364
414
|
p + .components-button.is-tertiary {
|
|
365
415
|
margin-left: -6px;
|
|
@@ -388,10 +438,10 @@ p + .components-button.is-tertiary {
|
|
|
388
438
|
.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):disabled, .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link)[aria-disabled=true] {
|
|
389
439
|
color: #949494;
|
|
390
440
|
}
|
|
391
|
-
.components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
|
|
441
|
+
.components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
|
|
392
442
|
background: rgba(204, 24, 24, 0.04);
|
|
393
443
|
}
|
|
394
|
-
.components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
|
|
444
|
+
.components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:active:not(:disabled, [aria-disabled=true]) {
|
|
395
445
|
background: rgba(204, 24, 24, 0.08);
|
|
396
446
|
}
|
|
397
447
|
.components-button.is-link {
|
|
@@ -1083,8 +1133,7 @@ input.components-combobox-control__input[type=text]:focus {
|
|
|
1083
1133
|
}
|
|
1084
1134
|
|
|
1085
1135
|
body.is-dragging-components-draggable {
|
|
1086
|
-
cursor: move;
|
|
1087
|
-
/* Fallback for IE/Edge < 14 */
|
|
1136
|
+
cursor: move; /* Fallback for IE/Edge < 14 */
|
|
1088
1137
|
cursor: grabbing !important;
|
|
1089
1138
|
}
|
|
1090
1139
|
|
|
@@ -2926,7 +2975,6 @@ See https://bugs.webkit.org/show_bug.cgi?id=187903. */
|
|
|
2926
2975
|
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
|
|
2927
2976
|
animation: none;
|
|
2928
2977
|
}
|
|
2929
|
-
|
|
2930
2978
|
.components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
|
|
2931
2979
|
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
|
|
2932
2980
|
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
|
|
@@ -3028,7 +3076,6 @@ body.lockscroll {
|
|
|
3028
3076
|
}
|
|
3029
3077
|
@media (min-width: 600px) {
|
|
3030
3078
|
.components-snackbar {
|
|
3031
|
-
width: -moz-fit-content;
|
|
3032
3079
|
width: fit-content;
|
|
3033
3080
|
}
|
|
3034
3081
|
}
|
|
@@ -9,6 +9,6 @@ import AlignmentMatrixControl from '..';
|
|
|
9
9
|
import type { AlignmentMatrixControlProps } from '../types';
|
|
10
10
|
declare const meta: Meta<typeof AlignmentMatrixControl>;
|
|
11
11
|
export default meta;
|
|
12
|
-
export declare const Default: import("@storybook/
|
|
12
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, AlignmentMatrixControlProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "as" | keyof AlignmentMatrixControlProps>>;
|
|
13
13
|
export declare const IconSubcomponent: () => import("react").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/alignment-matrix-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAQtD;;GAEG;AACH,OAAO,sBAAsB,MAAM,IAAI,CAAC;AAExC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAgB9C,CAAC;AACF,eAAe,IAAI,CAAC;AAqBpB,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/alignment-matrix-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAQtD;;GAEG;AACH,OAAO,sBAAsB,MAAM,IAAI,CAAC;AAExC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAgB9C,CAAC;AACF,eAAe,IAAI,CAAC;AAqBpB,eAAO,MAAM,OAAO,gSAAsB,CAAC;AAE3C,eAAO,MAAM,gBAAgB,mCAS5B,CAAC"}
|
|
@@ -8,7 +8,7 @@ import type { Meta } from '@storybook/react';
|
|
|
8
8
|
import { AnglePickerControl } from '..';
|
|
9
9
|
declare const meta: Meta<typeof AnglePickerControl>;
|
|
10
10
|
export default meta;
|
|
11
|
-
export declare const Default: import("@storybook/
|
|
11
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnglePickerControlProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "as" | keyof import("../types").AnglePickerControlProps> & {
|
|
12
12
|
as?: keyof JSX.IntrinsicElements | undefined;
|
|
13
13
|
} & import("react").RefAttributes<any>>;
|
|
14
14
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -8,11 +8,11 @@ import type { Meta } from '@storybook/react';
|
|
|
8
8
|
import { Animate } from '..';
|
|
9
9
|
declare const meta: Meta<typeof Animate>;
|
|
10
10
|
export default meta;
|
|
11
|
-
export declare const Default: import("@storybook/
|
|
12
|
-
export declare const AppearTopLeft: import("@storybook/
|
|
13
|
-
export declare const AppearTopRight: import("@storybook/
|
|
14
|
-
export declare const AppearBottomLeft: import("@storybook/
|
|
15
|
-
export declare const AppearBottomRight: import("@storybook/
|
|
16
|
-
export declare const Loading: import("@storybook/
|
|
17
|
-
export declare const SlideIn: import("@storybook/
|
|
11
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
|
|
12
|
+
export declare const AppearTopLeft: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
|
|
13
|
+
export declare const AppearTopRight: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
|
|
14
|
+
export declare const AppearBottomLeft: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
|
|
15
|
+
export declare const AppearBottomRight: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
|
|
16
|
+
export declare const Loading: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
|
|
17
|
+
export declare const SlideIn: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
|
|
18
18
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/animate/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAQ/B,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/animate/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAQ/B,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,sHAAsB,CAAC;AAc3C,eAAO,MAAM,aAAa,sHAAsB,CAAC;AAUjD,eAAO,MAAM,cAAc,sHAAsB,CAAC;AAUlD,eAAO,MAAM,gBAAgB,sHAAsB,CAAC;AAUpD,eAAO,MAAM,iBAAiB,sHAAsB,CAAC;AAWrD,eAAO,MAAM,OAAO,sHAAsB,CAAC;AAU3C,eAAO,MAAM,OAAO,sHAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { BadgeProps } from './types';
|
|
5
|
+
import type { WordPressComponentProps } from '../context';
|
|
6
|
+
declare function Badge({ className, intent, children, ...props }: WordPressComponentProps<BadgeProps, 'span', false>): import("react").JSX.Element;
|
|
7
|
+
export default Badge;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/badge/index.tsx"],"names":[],"mappings":"AAUA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,iBAAS,KAAK,CAAE,EACf,SAAS,EACT,MAAkB,EAClB,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,uBAAuB,CAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAE,+BA0CtD;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import Badge from '..';
|
|
9
|
+
declare const meta: Meta<typeof Badge>;
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Info: Story;
|
|
14
|
+
export declare const Success: Story;
|
|
15
|
+
export declare const Warning: Story;
|
|
16
|
+
export declare const Error: Story;
|
|
17
|
+
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/badge/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,KAAK,MAAM,IAAI,CAAC;AAEvB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAK7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/badge/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type BadgeProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Badge variant.
|
|
4
|
+
*
|
|
5
|
+
* @default 'default'
|
|
6
|
+
*/
|
|
7
|
+
intent?: 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
8
|
+
/**
|
|
9
|
+
* Text to display inside the badge.
|
|
10
|
+
*/
|
|
11
|
+
children: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/badge/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC9D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -9,7 +9,7 @@ import BaseControl from '..';
|
|
|
9
9
|
declare const meta: Meta<typeof BaseControl>;
|
|
10
10
|
export default meta;
|
|
11
11
|
export declare const Default: StoryFn<typeof BaseControl>;
|
|
12
|
-
export declare const WithHelpText: import("@storybook/
|
|
12
|
+
export declare const WithHelpText: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").BaseControlProps & {
|
|
13
13
|
as?: keyof JSX.IntrinsicElements | null | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
/**
|
|
@@ -5,7 +5,7 @@ import type { Meta } from '@storybook/react';
|
|
|
5
5
|
import { BorderBoxControl } from '../';
|
|
6
6
|
declare const meta: Meta<typeof BorderBoxControl>;
|
|
7
7
|
export default meta;
|
|
8
|
-
export declare const Default: import("@storybook/
|
|
8
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
|
|
9
9
|
disableCustomColors?: boolean;
|
|
10
10
|
enableAlpha?: boolean;
|
|
11
11
|
} & import("../../border-control/types").LabelProps & Pick<import("../../border-control/types").BorderControlProps, "size" | "enableStyle"> & {
|
|
@@ -9,7 +9,7 @@ import { BorderControl } from '..';
|
|
|
9
9
|
import type { Border } from '../types';
|
|
10
10
|
declare const meta: Meta<typeof BorderControl>;
|
|
11
11
|
export default meta;
|
|
12
|
-
export declare const Default: import("@storybook/
|
|
12
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
|
|
13
13
|
disableCustomColors?: boolean;
|
|
14
14
|
enableAlpha?: boolean;
|
|
15
15
|
} & import("../types").LabelProps & {
|
|
@@ -31,7 +31,7 @@ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import
|
|
|
31
31
|
/**
|
|
32
32
|
* Render a slider beside the control.
|
|
33
33
|
*/
|
|
34
|
-
export declare const WithSlider: import("@storybook/
|
|
34
|
+
export declare const WithSlider: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
|
|
35
35
|
disableCustomColors?: boolean;
|
|
36
36
|
enableAlpha?: boolean;
|
|
37
37
|
} & import("../types").LabelProps & {
|
|
@@ -53,7 +53,7 @@ export declare const WithSlider: import("@storybook/types").AnnotatedStoryFn<imp
|
|
|
53
53
|
/**
|
|
54
54
|
* When rendering with a slider, the `width` prop is useful to customize the width of the number input.
|
|
55
55
|
*/
|
|
56
|
-
export declare const WithSliderCustomWidth: import("@storybook/
|
|
56
|
+
export declare const WithSliderCustomWidth: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
|
|
57
57
|
disableCustomColors?: boolean;
|
|
58
58
|
enableAlpha?: boolean;
|
|
59
59
|
} & import("../types").LabelProps & {
|
|
@@ -76,7 +76,7 @@ export declare const WithSliderCustomWidth: import("@storybook/types").Annotated
|
|
|
76
76
|
* Restrict the width of the control and prevent it from expanding to take up additional space.
|
|
77
77
|
* When `true`, the `width` prop will be ignored.
|
|
78
78
|
*/
|
|
79
|
-
export declare const IsCompact: import("@storybook/
|
|
79
|
+
export declare const IsCompact: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
|
|
80
80
|
disableCustomColors?: boolean;
|
|
81
81
|
enableAlpha?: boolean;
|
|
82
82
|
} & import("../types").LabelProps & {
|
|
@@ -98,7 +98,7 @@ export declare const IsCompact: import("@storybook/types").AnnotatedStoryFn<impo
|
|
|
98
98
|
/**
|
|
99
99
|
* The `colors` object can contain multiple origins.
|
|
100
100
|
*/
|
|
101
|
-
export declare const WithMultipleOrigins: import("@storybook/
|
|
101
|
+
export declare const WithMultipleOrigins: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
|
|
102
102
|
disableCustomColors?: boolean;
|
|
103
103
|
enableAlpha?: boolean;
|
|
104
104
|
} & import("../types").LabelProps & {
|
|
@@ -25,7 +25,7 @@ import type { BoxControlProps } from './types';
|
|
|
25
25
|
* };
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
declare function BoxControl({ __next40pxDefaultSize, id: idProp, inputProps, onChange, label, values: valuesProp, units, sides, splitOnAxis, allowReset, resetValues, onMouseOver, onMouseOut, }: BoxControlProps): import("react").JSX.Element;
|
|
28
|
+
declare function BoxControl({ __next40pxDefaultSize, id: idProp, inputProps, onChange, label, values: valuesProp, units, sides, splitOnAxis, allowReset, resetValues, presets, presetKey, onMouseOver, onMouseOut, }: BoxControlProps): import("react").JSX.Element;
|
|
29
29
|
export { applyValueToSides } from './utils';
|
|
30
30
|
export default BoxControl;
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box-control/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,UAAU,CAAE,EACpB,qBAA6B,EAC7B,EAAE,EAAE,MAAM,EACV,UAA8B,EAC9B,QAAe,EACf,KAA2B,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,UAAiB,EACjB,WAA4B,EAC5B,WAAW,EACX,UAAU,GACV,EAAE,eAAe,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box-control/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,UAAU,CAAE,EACpB,qBAA6B,EAC7B,EAAE,EAAE,MAAM,EACV,UAA8B,EAC9B,QAAe,EACf,KAA2B,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,UAAiB,EACjB,WAA4B,EAC5B,OAAO,EACP,SAAS,EACT,WAAW,EACX,UAAU,GACV,EAAE,eAAe,+BAuIjB;AAED,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,eAAe,UAAU,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { BoxControlInputControlProps } from './types';
|
|
2
|
-
export default function BoxInputControl({ __next40pxDefaultSize, onChange, onFocus, values, selectedUnits, setSelectedUnits, sides, side, ...props }: BoxControlInputControlProps): import("react").JSX.Element;
|
|
2
|
+
export default function BoxInputControl({ __next40pxDefaultSize, onChange, onFocus, values, selectedUnits, setSelectedUnits, sides, side, min, presets, presetKey, ...props }: BoxControlInputControlProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=input-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/input-control.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/input-control.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,2BAA2B,EAAmB,MAAM,SAAS,CAAC;AA+C5E,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,IAAI,EACJ,GAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAgN7B"}
|