@wordpress/components 25.14.0 → 25.15.1-next.79a6196f.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 +51 -0
- package/CONTRIBUTING.md +57 -115
- package/LICENSE.md +1 -1
- package/build/base-control/index.js +17 -13
- package/build/base-control/index.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/component.js +1 -1
- package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build/border-control/border-control-style-picker/component.js +1 -1
- package/build/border-control/border-control-style-picker/component.js.map +1 -1
- package/build/box-control/index.js +1 -1
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/linked-button.js +1 -1
- package/build/box-control/linked-button.js.map +1 -1
- package/build/button/index.js +1 -1
- package/build/button/index.js.map +1 -1
- package/build/color-palette/index.native.js +11 -7
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/color-copy-button.js +1 -1
- package/build/color-picker/color-copy-button.js.map +1 -1
- package/build/context/wordpress-component.js.map +1 -1
- package/build/custom-select-control-v2/index.js +11 -10
- package/build/custom-select-control-v2/index.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/dropdown-menu-v2/index.js +205 -159
- package/build/dropdown-menu-v2/index.js.map +1 -1
- package/build/dropdown-menu-v2/styles.js +86 -77
- package/build/dropdown-menu-v2/styles.js.map +1 -1
- package/build/dropdown-menu-v2/types.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +4 -3
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/font-size-picker/index.js +4 -2
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/index.native.js +6 -3
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/form-token-field/index.js +10 -5
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/token.js +1 -0
- package/build/form-token-field/token.js.map +1 -1
- package/build/gradient-picker/index.js +3 -2
- package/build/gradient-picker/index.js.map +1 -1
- package/build/index.native.js +20 -3
- package/build/index.native.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +32 -29
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/input-control/types.js.map +1 -1
- package/build/lock-unlock.js +18 -0
- package/build/lock-unlock.js.map +1 -0
- package/build/mobile/bottom-sheet/index.native.js +8 -0
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +8 -4
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +26 -13
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/image/constants.js +12 -0
- package/build/mobile/image/constants.js.map +1 -0
- package/build/mobile/image/index.native.js +26 -18
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js +40 -8
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +44 -68
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +39 -0
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
- package/build/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -29
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
- package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js +93 -0
- package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
- package/build/mobile/utils/get-px-from-css-unit.native.js +302 -0
- package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
- package/build/modal/index.js +18 -13
- package/build/modal/index.js.map +1 -1
- package/build/navigation/menu/menu-title.js +1 -1
- package/build/navigation/menu/menu-title.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +13 -15
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +23 -63
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/styles.js +52 -0
- package/build/navigator/styles.js.map +1 -0
- package/build/number-control/index.js +4 -8
- package/build/number-control/index.js.map +1 -1
- package/build/number-control/types.js.map +1 -1
- package/build/palette-edit/index.js +15 -54
- package/build/palette-edit/index.js.map +1 -1
- package/build/private-apis.js +11 -26
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +21 -0
- package/build/private-apis.native.js.map +1 -0
- package/build/radio-control/index.js +1 -0
- package/build/radio-control/index.js.map +1 -1
- package/build/range-control/index.js +1 -1
- package/build/range-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +15 -25
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/index.js +3 -2
- package/build/slot-fill/index.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/snackbar/types.js.map +1 -1
- package/build/tabs/styles.js +3 -3
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tabpanel.js +9 -7
- package/build/tabs/tabpanel.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +4 -4
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +29 -15
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +3 -1
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +9 -8
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/types.js.map +1 -1
- package/build/tooltip/index.js +34 -10
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/types.js.map +1 -1
- package/build/truncate/hook.js +10 -4
- package/build/truncate/hook.js.map +1 -1
- package/build/truncate/types.js.map +1 -1
- package/build/unit-control/index.js +1 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/utils/strings.js +34 -3
- package/build/utils/strings.js.map +1 -1
- package/build-module/base-control/index.js +16 -12
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/component.js +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build-module/border-control/border-control-style-picker/component.js +1 -1
- package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
- package/build-module/box-control/index.js +1 -1
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/linked-button.js +1 -1
- package/build-module/box-control/linked-button.js.map +1 -1
- package/build-module/button/index.js +1 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +11 -7
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/color-copy-button.js +1 -1
- package/build-module/color-picker/color-copy-button.js.map +1 -1
- package/build-module/context/wordpress-component.js.map +1 -1
- package/build-module/custom-select-control-v2/index.js +11 -10
- package/build-module/custom-select-control-v2/index.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/dropdown-menu-v2/index.js +201 -154
- package/build-module/dropdown-menu-v2/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/styles.js +68 -61
- 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/duotone-picker/duotone-picker.js +4 -3
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/font-size-picker/index.js +4 -2
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/index.native.js +5 -2
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/form-token-field/index.js +10 -5
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/token.js +1 -0
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/gradient-picker/index.js +3 -2
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/index.native.js +6 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +31 -29
- 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/lock-unlock.js +9 -0
- package/build-module/lock-unlock.js.map +1 -0
- package/build-module/mobile/bottom-sheet/index.native.js +9 -1
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +8 -4
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +25 -13
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/image/constants.js +5 -0
- package/build-module/mobile/image/constants.js.map +1 -0
- package/build-module/mobile/image/index.native.js +25 -16
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +40 -6
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +46 -68
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +33 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
- package/build-module/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +21 -27
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js +86 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
- package/build-module/mobile/utils/get-px-from-css-unit.native.js +294 -0
- package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
- package/build-module/modal/index.js +18 -13
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title.js +1 -1
- package/build-module/navigation/menu/menu-title.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +3 -16
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +16 -70
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/styles.js +47 -0
- package/build-module/navigator/styles.js.map +1 -0
- package/build-module/number-control/index.js +4 -8
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/number-control/types.js.map +1 -1
- package/build-module/palette-edit/index.js +15 -51
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/private-apis.js +10 -23
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +14 -0
- package/build-module/private-apis.native.js.map +1 -0
- package/build-module/radio-control/index.js +1 -0
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/range-control/index.js +1 -1
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +15 -25
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/index.js +3 -2
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/snackbar/types.js.map +1 -1
- package/build-module/tabs/styles.js +3 -3
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tabpanel.js +9 -7
- package/build-module/tabs/tabpanel.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +4 -4
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +29 -15
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +3 -1
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +9 -8
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/types.js.map +1 -1
- package/build-module/tooltip/index.js +34 -12
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/types.js.map +1 -1
- package/build-module/truncate/hook.js +10 -4
- package/build-module/truncate/hook.js.map +1 -1
- package/build-module/truncate/types.js.map +1 -1
- package/build-module/unit-control/index.js +1 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/utils/strings.js +32 -2
- package/build-module/utils/strings.js.map +1 -1
- package/build-style/style-rtl.css +29 -5
- package/build-style/style.css +29 -5
- package/build-types/base-control/index.d.ts +3 -27
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts +4 -1
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +4 -4
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +6 -6
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +4 -4
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +4 -4
- package/build-types/border-box-control/stories/index.story.d.ts +1 -1
- package/build-types/border-control/border-control/hook.d.ts +4 -4
- package/build-types/border-control/border-control-dropdown/hook.d.ts +4 -4
- package/build-types/border-control/border-control-style-picker/hook.d.ts +4 -4
- package/build-types/border-control/stories/index.story.d.ts +6 -6
- package/build-types/box-control/stories/index.story.d.ts +42 -42
- package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
- package/build-types/button/deprecated.d.ts +3 -3
- package/build-types/card/card/hook.d.ts +4 -4
- package/build-types/card/card-body/hook.d.ts +4 -4
- package/build-types/card/card-divider/hook.d.ts +4 -4
- package/build-types/card/card-footer/hook.d.ts +4 -4
- package/build-types/card/card-header/hook.d.ts +4 -4
- package/build-types/card/card-media/hook.d.ts +4 -4
- package/build-types/color-palette/styles.d.ts +2 -2
- package/build-types/color-picker/component.d.ts +2 -2
- package/build-types/color-picker/stories/index.story.d.ts +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +3 -3
- package/build-types/composite/test/index.d.ts.map +1 -0
- package/build-types/context/wordpress-component.d.ts +3 -3
- package/build-types/context/wordpress-component.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/index.d.ts +3 -2
- package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -3
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +3 -3
- package/build-types/date-time/date-time/styles.d.ts +1 -1
- package/build-types/date-time/time/styles.d.ts +4 -4
- package/build-types/dropdown/index.d.ts +1 -1
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +3 -3
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/index.d.ts +18 -15
- package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts +7 -2
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/styles.d.ts +77 -23
- package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/types.d.ts +89 -173
- package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +4 -4
- package/build-types/flex/flex/hook.d.ts +4 -4
- package/build-types/flex/flex-block/hook.d.ts +4 -4
- package/build-types/flex/flex-item/hook.d.ts +4 -4
- 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/index.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/token.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +4 -4
- package/build-types/h-stack/hook.d.ts +4 -4
- package/build-types/heading/component.d.ts +1 -1
- package/build-types/heading/hook.d.ts +4 -4
- package/build-types/input-control/styles/input-control-styles.d.ts +11 -0
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +1 -1
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +4 -4
- package/build-types/item-group/item-group/hook.d.ts +4 -4
- package/build-types/lock-unlock.d.ts +3 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/menu-item/index.d.ts +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +4 -4
- package/build-types/mobile/image/constants.d.ts +5 -0
- package/build-types/mobile/image/constants.d.ts.map +1 -0
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +3 -3
- package/build-types/navigator/navigator-back-button/hook.d.ts +6 -6
- package/build-types/navigator/navigator-button/hook.d.ts +6 -6
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +1 -7
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/styles.d.ts +9 -0
- package/build-types/navigator/styles.d.ts.map +1 -0
- 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 +1 -1
- package/build-types/number-control/types.d.ts +1 -1
- package/build-types/palette-edit/index.d.ts +3 -8
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +3 -3
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
- package/build-types/private-apis.d.ts +0 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/radio-control/index.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/resizable-box/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +2 -2
- package/build-types/scrollable/hook.d.ts +4 -4
- package/build-types/search-control/index.d.ts +1 -1
- package/build-types/search-control/stories/index.story.d.ts +2 -2
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +1 -1
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +4 -0
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +2 -2
- package/build-types/snackbar/stories/index.story.d.ts +0 -3
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/types.d.ts +1 -1
- package/build-types/snackbar/types.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +4 -4
- package/build-types/surface/hook.d.ts +4 -4
- package/build-types/tabs/styles.d.ts.map +1 -1
- package/build-types/tabs/tabpanel.d.ts +1 -1
- package/build-types/tabs/tabpanel.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +4 -4
- package/build-types/text-control/index.d.ts +1 -1
- package/build-types/textarea-control/index.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-button-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +3 -3
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +5 -4
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +5 -4
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +4 -4
- package/build-types/tools-panel/types.d.ts +9 -0
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts +10 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/types.d.ts +3 -0
- package/build-types/tooltip/types.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +5 -5
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/truncate/types.d.ts +4 -0
- package/build-types/truncate/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/utils/strings.d.ts +14 -2
- package/build-types/utils/strings.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +4 -4
- package/build-types/v-stack/stories/index.story.d.ts +1 -1
- package/package.json +20 -21
- package/src/alignment-matrix-control/test/index.tsx +10 -16
- package/src/base-control/index.tsx +21 -16
- package/src/border-box-control/border-box-control-linked-button/component.tsx +1 -1
- package/src/border-control/border-control-style-picker/component.tsx +1 -1
- package/src/box-control/index.tsx +1 -1
- package/src/box-control/linked-button.tsx +1 -1
- package/src/button/README.md +32 -6
- package/src/button/index.tsx +1 -1
- package/src/button-group/README.md +0 -6
- package/src/card/card/README.md +1 -1
- package/src/checkbox-control/README.md +1 -9
- package/src/color-palette/index.native.js +18 -7
- package/src/color-picker/color-copy-button.tsx +1 -1
- package/src/combobox-control/README.md +0 -6
- package/src/composite/test/index.tsx +576 -0
- package/src/context/wordpress-component.ts +11 -6
- package/src/custom-select-control/README.md +0 -6
- package/src/custom-select-control-v2/index.tsx +13 -12
- package/src/date-time/date/styles.ts +3 -3
- package/src/dropdown-menu/README.md +0 -5
- package/src/dropdown-menu-v2/README.md +75 -136
- package/src/dropdown-menu-v2/index.tsx +321 -231
- package/src/dropdown-menu-v2/stories/index.story.tsx +522 -126
- package/src/dropdown-menu-v2/styles.ts +226 -151
- package/src/dropdown-menu-v2/test/index.tsx +480 -188
- package/src/dropdown-menu-v2/types.ts +98 -184
- package/src/duotone-picker/duotone-picker.tsx +7 -3
- package/src/font-size-picker/index.native.js +8 -2
- package/src/font-size-picker/index.tsx +4 -2
- package/src/form-toggle/README.md +0 -6
- package/src/form-token-field/index.tsx +11 -7
- package/src/form-token-field/test/index.tsx +97 -0
- package/src/form-token-field/token.tsx +1 -0
- package/src/gradient-picker/index.tsx +2 -2
- package/src/index.native.js +6 -1
- package/src/input-control/styles/input-control-styles.tsx +10 -8
- package/src/input-control/types.ts +1 -1
- package/src/lock-unlock.js +10 -0
- package/src/menu-group/README.md +0 -8
- package/src/menu-items-choice/README.md +0 -7
- package/src/mobile/bottom-sheet/index.native.js +15 -1
- package/src/mobile/color-settings/palette.screen.native.js +7 -5
- package/src/mobile/global-styles-context/test/fixtures/theme.native.js +0 -20
- package/src/mobile/global-styles-context/utils.native.js +28 -19
- package/src/mobile/image/constants.js +1 -0
- package/src/mobile/image/index.native.js +55 -18
- package/src/mobile/image/style.native.scss +35 -9
- package/src/mobile/keyboard-aware-flat-list/index.android.js +50 -5
- package/src/mobile/keyboard-aware-flat-list/index.ios.js +65 -91
- package/src/mobile/keyboard-aware-flat-list/test/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +27 -25
- package/src/mobile/keyboard-aware-flat-list/test/use-scroll.native.js +71 -0
- package/src/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +41 -0
- package/src/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -27
- package/src/mobile/keyboard-aware-flat-list/use-scroll.native.js +100 -0
- package/src/mobile/utils/get-px-from-css-unit.native.js +329 -0
- package/src/mobile/utils/test/get-px-from-css-unit.native.js +172 -0
- package/src/modal/README.md +0 -6
- package/src/modal/index.tsx +18 -16
- package/src/modal/test/index.tsx +90 -1
- package/src/navigation/menu/menu-title.tsx +1 -1
- package/src/navigator/navigator-provider/component.tsx +3 -4
- package/src/navigator/navigator-screen/component.tsx +15 -93
- package/src/navigator/styles.ts +71 -0
- package/src/navigator/test/index.tsx +0 -64
- package/src/notice/README.md +0 -6
- package/src/number-control/README.md +2 -2
- package/src/number-control/index.tsx +4 -8
- package/src/number-control/types.ts +1 -1
- package/src/palette-edit/index.tsx +15 -58
- package/src/palette-edit/test/index.tsx +1 -75
- package/src/panel/README.md +0 -6
- package/src/private-apis.native.js +13 -0
- package/src/private-apis.ts +12 -37
- package/src/radio-control/README.md +0 -6
- package/src/radio-control/index.tsx +4 -1
- package/src/radio-control/style.scss +29 -2
- package/src/radio-group/README.md +0 -6
- package/src/range-control/README.md +1 -9
- package/src/range-control/index.tsx +1 -1
- package/src/search-control/README.md +0 -6
- package/src/select-control/README.md +0 -6
- package/src/select-control/styles/select-control-styles.ts +10 -28
- package/src/slot-fill/index.tsx +5 -2
- package/src/slot-fill/types.ts +5 -0
- package/src/snackbar/README.md +0 -6
- package/src/snackbar/stories/index.story.tsx +7 -5
- package/src/snackbar/style.scss +4 -3
- package/src/snackbar/types.ts +2 -1
- package/src/spacer/README.md +0 -2
- package/src/tab-panel/README.md +0 -5
- package/src/tab-panel/test/index.tsx +39 -56
- package/src/tabs/styles.ts +7 -1
- package/src/tabs/tabpanel.tsx +7 -6
- package/src/tabs/test/index.tsx +56 -0
- package/src/text-control/README.md +0 -6
- package/src/textarea-control/README.md +0 -6
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -16
- package/src/toggle-group-control/test/index.tsx +58 -45
- package/src/toggle-group-control/toggle-group-control/component.tsx +5 -4
- package/src/toggle-group-control/toggle-group-control/styles.ts +13 -19
- package/src/toggle-group-control/toggle-group-control-option/README.md +1 -1
- package/src/toggle-group-control/toggle-group-control-option-base/README.md +1 -1
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +3 -2
- package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
- package/src/toolbar/toolbar/README.md +0 -6
- package/src/tools-panel/test/index.tsx +12 -20
- package/src/tools-panel/tools-panel/README.md +7 -0
- package/src/tools-panel/tools-panel/component.tsx +2 -0
- package/src/tools-panel/tools-panel-header/README.md +7 -0
- package/src/tools-panel/tools-panel-header/component.tsx +20 -13
- package/src/tools-panel/types.ts +9 -0
- package/src/tooltip/README.md +4 -0
- package/src/tooltip/index.tsx +48 -10
- package/src/tooltip/stories/index.story.tsx +18 -1
- package/src/tooltip/test/index.tsx +404 -254
- package/src/tooltip/types.ts +4 -0
- package/src/tree-grid/README.md +0 -4
- package/src/truncate/README.md +8 -0
- package/src/truncate/hook.ts +17 -10
- package/src/truncate/test/index.tsx +54 -27
- package/src/truncate/types.ts +4 -0
- package/src/unit-control/index.tsx +1 -1
- package/src/utils/strings.ts +30 -2
- package/src/utils/test/strings.js +96 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/dropdown-menu-v2-ariakit/index.js +0 -256
- package/build/dropdown-menu-v2-ariakit/index.js.map +0 -1
- package/build/dropdown-menu-v2-ariakit/styles.js +0 -180
- package/build/dropdown-menu-v2-ariakit/styles.js.map +0 -1
- package/build/dropdown-menu-v2-ariakit/types.js +0 -6
- package/build/dropdown-menu-v2-ariakit/types.js.map +0 -1
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
- package/build-module/dropdown-menu-v2-ariakit/index.js +0 -237
- package/build-module/dropdown-menu-v2-ariakit/index.js.map +0 -1
- package/build-module/dropdown-menu-v2-ariakit/styles.js +0 -165
- package/build-module/dropdown-menu-v2-ariakit/styles.js.map +0 -1
- package/build-module/dropdown-menu-v2-ariakit/types.js +0 -2
- package/build-module/dropdown-menu-v2-ariakit/types.js.map +0 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
- package/build-types/dropdown-menu-v2-ariakit/index.d.ts +0 -20
- package/build-types/dropdown-menu-v2-ariakit/index.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts +0 -16
- package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2-ariakit/styles.d.ts +0 -96
- package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2-ariakit/test/index.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2-ariakit/types.d.ts +0 -168
- package/build-types/dropdown-menu-v2-ariakit/types.d.ts.map +0 -1
- package/src/dropdown-menu-v2-ariakit/README.md +0 -331
- package/src/dropdown-menu-v2-ariakit/index.tsx +0 -383
- package/src/dropdown-menu-v2-ariakit/stories/index.story.tsx +0 -617
- package/src/dropdown-menu-v2-ariakit/styles.ts +0 -345
- package/src/dropdown-menu-v2-ariakit/test/index.tsx +0 -1108
- package/src/dropdown-menu-v2-ariakit/types.ts +0 -179
- /package/build-types/{dropdown-menu-v2-ariakit → composite}/test/index.d.ts +0 -0
package/src/private-apis.ts
CHANGED
|
@@ -19,35 +19,19 @@ import { default as ProgressBar } from './progress-bar';
|
|
|
19
19
|
import { createPrivateSlotFill } from './slot-fill';
|
|
20
20
|
import {
|
|
21
21
|
DropdownMenu as DropdownMenuV2,
|
|
22
|
-
DropdownMenuCheckboxItem as DropdownMenuCheckboxItemV2,
|
|
23
22
|
DropdownMenuGroup as DropdownMenuGroupV2,
|
|
24
23
|
DropdownMenuItem as DropdownMenuItemV2,
|
|
25
|
-
|
|
26
|
-
DropdownMenuRadioGroup as DropdownMenuRadioGroupV2,
|
|
24
|
+
DropdownMenuCheckboxItem as DropdownMenuCheckboxItemV2,
|
|
27
25
|
DropdownMenuRadioItem as DropdownMenuRadioItemV2,
|
|
28
26
|
DropdownMenuSeparator as DropdownMenuSeparatorV2,
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
DropdownMenuItemLabel as DropdownMenuItemLabelV2,
|
|
28
|
+
DropdownMenuItemHelpText as DropdownMenuItemHelpTextV2,
|
|
31
29
|
} from './dropdown-menu-v2';
|
|
32
|
-
import {
|
|
33
|
-
DropdownMenu as DropdownMenuV2Ariakit,
|
|
34
|
-
DropdownMenuGroup as DropdownMenuGroupV2Ariakit,
|
|
35
|
-
DropdownMenuItem as DropdownMenuItemV2Ariakit,
|
|
36
|
-
DropdownMenuCheckboxItem as DropdownMenuCheckboxItemV2Ariakit,
|
|
37
|
-
DropdownMenuRadioItem as DropdownMenuRadioItemV2Ariakit,
|
|
38
|
-
DropdownMenuSeparator as DropdownMenuSeparatorV2Ariakit,
|
|
39
|
-
DropdownMenuItemLabel as DropdownMenuItemLabelV2Ariakit,
|
|
40
|
-
DropdownMenuItemHelpText as DropdownMenuItemHelpTextV2Ariakit,
|
|
41
|
-
} from './dropdown-menu-v2-ariakit';
|
|
42
30
|
import { ComponentsContext } from './context/context-system-provider';
|
|
43
31
|
import Theme from './theme';
|
|
44
32
|
import Tabs from './tabs';
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
__dangerousOptInToUnstableAPIsOnlyForCoreModules(
|
|
48
|
-
'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',
|
|
49
|
-
'@wordpress/components'
|
|
50
|
-
);
|
|
33
|
+
import { kebabCase } from './utils/strings';
|
|
34
|
+
import { lock } from './lock-unlock';
|
|
51
35
|
|
|
52
36
|
export const privateApis = {};
|
|
53
37
|
lock( privateApis, {
|
|
@@ -60,25 +44,16 @@ lock( privateApis, {
|
|
|
60
44
|
__experimentalPopoverLegacyPositionToPlacement,
|
|
61
45
|
createPrivateSlotFill,
|
|
62
46
|
ComponentsContext,
|
|
47
|
+
ProgressBar,
|
|
48
|
+
Tabs,
|
|
49
|
+
Theme,
|
|
63
50
|
DropdownMenuV2,
|
|
64
|
-
DropdownMenuCheckboxItemV2,
|
|
65
51
|
DropdownMenuGroupV2,
|
|
66
52
|
DropdownMenuItemV2,
|
|
67
|
-
|
|
68
|
-
DropdownMenuRadioGroupV2,
|
|
53
|
+
DropdownMenuCheckboxItemV2,
|
|
69
54
|
DropdownMenuRadioItemV2,
|
|
70
55
|
DropdownMenuSeparatorV2,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Tabs,
|
|
75
|
-
Theme,
|
|
76
|
-
DropdownMenuV2Ariakit,
|
|
77
|
-
DropdownMenuGroupV2Ariakit,
|
|
78
|
-
DropdownMenuItemV2Ariakit,
|
|
79
|
-
DropdownMenuCheckboxItemV2Ariakit,
|
|
80
|
-
DropdownMenuRadioItemV2Ariakit,
|
|
81
|
-
DropdownMenuSeparatorV2Ariakit,
|
|
82
|
-
DropdownMenuItemLabelV2Ariakit,
|
|
83
|
-
DropdownMenuItemHelpTextV2Ariakit,
|
|
56
|
+
DropdownMenuItemLabelV2,
|
|
57
|
+
DropdownMenuItemHelpTextV2,
|
|
58
|
+
kebabCase,
|
|
84
59
|
} );
|
|
@@ -5,12 +5,6 @@ Use radio buttons when you want users to select one option from a set, and you w
|
|
|
5
5
|

|
|
6
6
|
Selected and unselected radio buttons
|
|
7
7
|
|
|
8
|
-
## Table of contents
|
|
9
|
-
|
|
10
|
-
1. [Design guidelines](#design-guidelines)
|
|
11
|
-
2. [Development guidelines](#development-guidelines)
|
|
12
|
-
3. [Related components](#related-components)
|
|
13
|
-
|
|
14
8
|
## Design guidelines
|
|
15
9
|
|
|
16
10
|
### Usage
|
|
@@ -1,5 +1,32 @@
|
|
|
1
|
+
.components-radio-control__option {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.components-radio-control__input[type="radio"] {
|
|
2
7
|
@include radio-control;
|
|
3
|
-
|
|
4
|
-
|
|
8
|
+
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
margin: 0 6px 0 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
appearance: none;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
|
|
15
|
+
&:focus {
|
|
16
|
+
box-shadow: 0 0 0 ($border-width * 2) $components-color-background, 0 0 0 ($border-width * 2 + $border-width-focus-fallback) $components-color-accent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:checked {
|
|
20
|
+
background: $components-color-accent;
|
|
21
|
+
border-color: $components-color-accent;
|
|
22
|
+
|
|
23
|
+
&::before {
|
|
24
|
+
content: "";
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.components-radio-control__label {
|
|
31
|
+
cursor: pointer;
|
|
5
32
|
}
|
|
@@ -12,12 +12,6 @@ Use a RadioGroup component when you want users to select one option from a small
|
|
|
12
12
|
|
|
13
13
|

|
|
14
14
|
|
|
15
|
-
## Table of contents
|
|
16
|
-
|
|
17
|
-
1. [Design guidelines](#design-guidelines)
|
|
18
|
-
2. [Development guidelines](#development-guidelines)
|
|
19
|
-
3. [Related components](#related-components)
|
|
20
|
-
|
|
21
15
|
## Design guidelines
|
|
22
16
|
|
|
23
17
|
### Usage
|
|
@@ -2,15 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
RangeControls are used to make selections from a range of incremental values.
|
|
4
4
|
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
A RangeControl for volume
|
|
8
|
-
|
|
9
|
-
## Table of contents
|
|
10
|
-
|
|
11
|
-
1. [Design guidelines](#design-guidelines)
|
|
12
|
-
2. [Development guidelines](#development-guidelines)
|
|
13
|
-
3. [Related components](#related-components)
|
|
5
|
+

|
|
14
6
|
|
|
15
7
|
## Design guidelines
|
|
16
8
|
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
SearchControl components let users display a search control.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
## Table of contents
|
|
7
|
-
|
|
8
|
-
1. [Development guidelines](#development-guidelines)
|
|
9
|
-
2. [Related components](#related-components)
|
|
10
|
-
|
|
11
5
|
Check out the [Storybook page](https://wordpress.github.io/gutenberg/?path=/docs/components-searchcontrol--docs) for a visual exploration of this component.
|
|
12
6
|
|
|
13
7
|
## Development guidelines
|
|
@@ -4,12 +4,6 @@ SelectControl allow users to select from a single or multiple option menu. It fu
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
## Table of contents
|
|
8
|
-
|
|
9
|
-
1. [Design guidelines](#design-guidelines)
|
|
10
|
-
2. [Development guidelines](#development-guidelines)
|
|
11
|
-
3. [Related components](#related-components)
|
|
12
|
-
|
|
13
7
|
## Design guidelines
|
|
14
8
|
|
|
15
9
|
### Usage
|
|
@@ -11,6 +11,7 @@ import { COLORS, rtl } 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';
|
|
14
|
+
import { fontSizeStyles } from '../../input-control/styles/input-control-styles';
|
|
14
15
|
|
|
15
16
|
interface SelectProps
|
|
16
17
|
extends Pick<
|
|
@@ -30,27 +31,6 @@ const disabledStyles = ( { disabled }: SelectProps ) => {
|
|
|
30
31
|
} );
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const fontSizeStyles = ( { selectSize = 'default' }: SelectProps ) => {
|
|
34
|
-
const sizes = {
|
|
35
|
-
default: '13px',
|
|
36
|
-
small: '11px',
|
|
37
|
-
'__unstable-large': '13px',
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const fontSize = sizes[ selectSize ];
|
|
41
|
-
const fontSizeMobile = '16px';
|
|
42
|
-
|
|
43
|
-
if ( ! fontSize ) return '';
|
|
44
|
-
|
|
45
|
-
return css`
|
|
46
|
-
font-size: ${ fontSizeMobile };
|
|
47
|
-
|
|
48
|
-
@media ( min-width: 600px ) {
|
|
49
|
-
font-size: ${ fontSize };
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
34
|
const sizeStyles = ( {
|
|
55
35
|
__next40pxDefaultSize,
|
|
56
36
|
multiple,
|
|
@@ -75,6 +55,12 @@ const sizeStyles = ( {
|
|
|
75
55
|
paddingTop: 0,
|
|
76
56
|
paddingBottom: 0,
|
|
77
57
|
},
|
|
58
|
+
compact: {
|
|
59
|
+
height: 32,
|
|
60
|
+
minHeight: 32,
|
|
61
|
+
paddingTop: 0,
|
|
62
|
+
paddingBottom: 0,
|
|
63
|
+
},
|
|
78
64
|
'__unstable-large': {
|
|
79
65
|
height: 40,
|
|
80
66
|
minHeight: 40,
|
|
@@ -84,12 +70,7 @@ const sizeStyles = ( {
|
|
|
84
70
|
};
|
|
85
71
|
|
|
86
72
|
if ( ! __next40pxDefaultSize ) {
|
|
87
|
-
sizes.default =
|
|
88
|
-
height: 32,
|
|
89
|
-
minHeight: 32,
|
|
90
|
-
paddingTop: 0,
|
|
91
|
-
paddingBottom: 0,
|
|
92
|
-
};
|
|
73
|
+
sizes.default = sizes.compact;
|
|
93
74
|
}
|
|
94
75
|
|
|
95
76
|
const style = sizes[ selectSize ] || sizes.default;
|
|
@@ -107,11 +88,12 @@ const sizePaddings = ( {
|
|
|
107
88
|
const padding = {
|
|
108
89
|
default: 16,
|
|
109
90
|
small: 8,
|
|
91
|
+
compact: 8,
|
|
110
92
|
'__unstable-large': 16,
|
|
111
93
|
};
|
|
112
94
|
|
|
113
95
|
if ( ! __next40pxDefaultSize ) {
|
|
114
|
-
padding.default =
|
|
96
|
+
padding.default = padding.compact;
|
|
115
97
|
}
|
|
116
98
|
|
|
117
99
|
const selectedPadding = padding[ selectSize ] || padding.default;
|
package/src/slot-fill/index.tsx
CHANGED
|
@@ -55,9 +55,12 @@ export function UnforwardedSlot(
|
|
|
55
55
|
}
|
|
56
56
|
export const Slot = forwardRef( UnforwardedSlot );
|
|
57
57
|
|
|
58
|
-
export function Provider( {
|
|
58
|
+
export function Provider( {
|
|
59
|
+
children,
|
|
60
|
+
passthrough = false,
|
|
61
|
+
}: SlotFillProviderProps ) {
|
|
59
62
|
const parent = useContext( SlotFillContext );
|
|
60
|
-
if ( ! parent.isDefault ) {
|
|
63
|
+
if ( ! parent.isDefault && passthrough ) {
|
|
61
64
|
return <>{ children }</>;
|
|
62
65
|
}
|
|
63
66
|
return (
|
package/src/slot-fill/types.ts
CHANGED
|
@@ -96,6 +96,11 @@ export type SlotFillProviderProps = {
|
|
|
96
96
|
* The children elements.
|
|
97
97
|
*/
|
|
98
98
|
children: ReactNode;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Whether to pass slots to the parent provider if existent.
|
|
102
|
+
*/
|
|
103
|
+
passthrough?: boolean;
|
|
99
104
|
};
|
|
100
105
|
|
|
101
106
|
export type SlotFillBubblesVirtuallySlotRef = RefObject< HTMLElement >;
|
package/src/snackbar/README.md
CHANGED
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Use Snackbars to communicate low priority, non-interruptive messages to the user.
|
|
4
4
|
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
1. [Design guidelines](#design-guidelines)
|
|
8
|
-
2. [Development guidelines](#development-guidelines)
|
|
9
|
-
3. [Related components](#related-components)
|
|
10
|
-
|
|
11
5
|
## Design guidelines
|
|
12
6
|
|
|
13
7
|
A Snackbar displays a succinct message that is cleared out after a small delay. It can also offer the user options, like viewing a published post but these options should also be available elsewhere in the UI.
|
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { wordpress } from '@wordpress/icons';
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* Internal dependencies
|
|
8
13
|
*/
|
|
14
|
+
import Icon from '../../icon';
|
|
9
15
|
import Snackbar from '..';
|
|
10
16
|
|
|
11
17
|
const meta: Meta< typeof Snackbar > = {
|
|
@@ -63,11 +69,7 @@ WithActions.args = {
|
|
|
63
69
|
export const WithIcon: StoryFn< typeof Snackbar > = DefaultTemplate.bind( {} );
|
|
64
70
|
WithIcon.args = {
|
|
65
71
|
children: 'Add an icon to make your snackbar stand out',
|
|
66
|
-
icon:
|
|
67
|
-
<span role="img" aria-label="Icon" style={ { fontSize: 21 } }>
|
|
68
|
-
🌮
|
|
69
|
-
</span>
|
|
70
|
-
),
|
|
72
|
+
icon: <Icon style={ { fill: 'currentcolor' } } icon={ wordpress } />,
|
|
71
73
|
};
|
|
72
74
|
|
|
73
75
|
export const WithExplicitDismiss: StoryFn< typeof Snackbar > =
|
package/src/snackbar/style.scss
CHANGED
|
@@ -29,13 +29,14 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.components-snackbar__content-with-icon {
|
|
32
|
-
|
|
32
|
+
position: relative;
|
|
33
|
+
padding-left: $icon-size;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.components-snackbar__icon {
|
|
36
37
|
position: absolute;
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
left: $grid-unit-10 * -1;
|
|
39
|
+
top: calc((#{$icon-size - ($default-font-size * $default-line-height)}) / -2);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
.components-snackbar__dismiss-button {
|
package/src/snackbar/types.ts
CHANGED
|
@@ -28,7 +28,8 @@ type SnackbarOnlyProps = {
|
|
|
28
28
|
listRef?: MutableRefObject< HTMLDivElement | null >;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export type SnackbarProps = NoticeProps &
|
|
31
|
+
export type SnackbarProps = Omit< NoticeProps, '__unstableHTML' > &
|
|
32
|
+
SnackbarOnlyProps;
|
|
32
33
|
|
|
33
34
|
export type SnackbarListProps = {
|
|
34
35
|
notices: Array<
|
package/src/spacer/README.md
CHANGED
|
@@ -6,8 +6,6 @@ This feature is still experimental. “Experimental” means this is an early im
|
|
|
6
6
|
|
|
7
7
|
`Spacer` is a primitive layout component that providers inner (`padding`) or outer (`margin`) space in-between components. It can also be used to adaptively provide space within an `HStack` or `VStack`.
|
|
8
8
|
|
|
9
|
-
## Table of contents
|
|
10
|
-
|
|
11
9
|
## Usage
|
|
12
10
|
|
|
13
11
|
`Spacer` comes with a bunch of shorthand props to adjust `margin` and `padding`. The values of these props work as a multiplier to the library's grid system (base of `4px`).
|
package/src/tab-panel/README.md
CHANGED
|
@@ -6,11 +6,6 @@ TabPanels organize content across different screens, data sets, and interactions
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
## Table of contents
|
|
10
|
-
|
|
11
|
-
1. Design guidelines
|
|
12
|
-
2. Development guidelines
|
|
13
|
-
|
|
14
9
|
## Design guidelines
|
|
15
10
|
|
|
16
11
|
### Usage
|