@wordpress/components 28.11.0 → 28.13.1-next.082ed6819.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 +68 -0
- package/build/autocomplete/autocompleter-ui.js +1 -0
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +1 -0
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js +2 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-control/border-control/component.js +2 -1
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +3 -1
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +1 -1
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/types.js.map +1 -1
- package/build/box-control/all-input-control.js +1 -0
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js +1 -0
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/input-controls.js +1 -0
- package/build/box-control/input-controls.js.map +1 -1
- package/build/color-palette/index.js +2 -0
- package/build/color-palette/index.js.map +1 -1
- package/build/color-picker/color-copy-button.js +6 -4
- package/build/color-picker/color-copy-button.js.map +1 -1
- package/build/color-picker/component.js +1 -0
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/styles.js +21 -28
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +17 -12
- package/build/combobox-control/index.js.map +1 -1
- package/build/composite/hover.js +1 -1
- package/build/composite/hover.js.map +1 -1
- package/build/composite/typeahead.js +1 -1
- package/build/composite/typeahead.js.map +1 -1
- package/build/dashicon/types.js.map +1 -1
- package/build/dimension-control/index.js +7 -0
- package/build/dimension-control/index.js.map +1 -1
- package/build/disabled/index.js +8 -1
- package/build/disabled/index.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +2 -0
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/font-size-picker/font-size-picker-toggle-group.js +1 -0
- package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build/font-size-picker/index.js +7 -0
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-file-upload/index.js +7 -1
- package/build/form-file-upload/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 +34 -32
- package/build/gradient-picker/index.js.map +1 -1
- package/build/gradient-picker/types.js.map +1 -1
- package/build/guide/page-control.js +1 -0
- package/build/guide/page-control.js.map +1 -1
- package/build/menu/styles.js +16 -16
- package/build/menu/styles.js.map +1 -1
- package/build/menu-item/index.js +1 -0
- package/build/menu-item/index.js.map +1 -1
- package/build/modal/index.js +2 -2
- package/build/modal/index.js.map +1 -1
- package/build/notice/index.js +2 -0
- package/build/notice/index.js.map +1 -1
- package/build/palette-edit/index.js +5 -0
- package/build/palette-edit/index.js.map +1 -1
- package/build/panel/body.js +1 -0
- package/build/panel/body.js.map +1 -1
- package/build/popover/index.js +4 -1
- package/build/popover/index.js.map +1 -1
- package/build/private-apis.js +0 -2
- package/build/private-apis.js.map +1 -1
- package/build/radio-group/radio.js +6 -0
- package/build/radio-group/radio.js.map +1 -1
- package/build/radio-group/types.js.map +1 -1
- package/build/range-control/index.js +11 -0
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/types.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +14 -31
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +13 -4
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +11 -9
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot.js +1 -8
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/fill.js +7 -24
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/index.js +5 -10
- package/build/slot-fill/index.js.map +1 -1
- package/build/slot-fill/provider.js +2 -2
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +37 -77
- package/build/slot-fill/slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/snackbar/index.js +2 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/tabs/tablist.js +13 -2
- package/build/tabs/tablist.js.map +1 -1
- package/build/text-control/index.js +7 -0
- package/build/text-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +10 -1
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +1 -0
- package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js +1 -1
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build/toggle-group-control/types.js.map +1 -1
- package/build/utils/deprecated-36px-size.js +3 -2
- package/build/utils/deprecated-36px-size.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +1 -0
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +1 -0
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js +2 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-control/border-control/component.js +2 -1
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js +3 -1
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +1 -1
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/types.js.map +1 -1
- package/build-module/box-control/all-input-control.js +1 -0
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +1 -0
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/input-controls.js +1 -0
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/color-palette/index.js +2 -0
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-picker/color-copy-button.js +6 -4
- package/build-module/color-picker/color-copy-button.js.map +1 -1
- package/build-module/color-picker/component.js +1 -0
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/styles.js +20 -27
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +18 -13
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/composite/hover.js +1 -1
- package/build-module/composite/hover.js.map +1 -1
- package/build-module/composite/typeahead.js +1 -1
- package/build-module/composite/typeahead.js.map +1 -1
- package/build-module/dashicon/types.js.map +1 -1
- package/build-module/dimension-control/index.js +7 -0
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/disabled/index.js +8 -1
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +2 -0
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-toggle-group.js +1 -0
- package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build-module/font-size-picker/index.js +7 -0
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/form-file-upload/index.js +7 -1
- package/build-module/form-file-upload/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 +34 -32
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/gradient-picker/types.js.map +1 -1
- package/build-module/guide/page-control.js +1 -0
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/menu/styles.js +16 -16
- package/build-module/menu/styles.js.map +1 -1
- package/build-module/menu-item/index.js +1 -0
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/modal/index.js +2 -2
- package/build-module/modal/index.js.map +1 -1
- package/build-module/notice/index.js +2 -0
- package/build-module/notice/index.js.map +1 -1
- package/build-module/palette-edit/index.js +5 -0
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/panel/body.js +1 -0
- package/build-module/panel/body.js.map +1 -1
- package/build-module/popover/index.js +4 -1
- package/build-module/popover/index.js.map +1 -1
- package/build-module/private-apis.js +0 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/radio-group/radio.js +6 -0
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/radio-group/types.js.map +1 -1
- package/build-module/range-control/index.js +11 -0
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/types.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +15 -32
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +13 -4
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +11 -9
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +2 -9
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/fill.js +7 -24
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/index.js +5 -8
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/slot-fill/provider.js +2 -3
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +38 -78
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/snackbar/index.js +2 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/tabs/tablist.js +13 -2
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/text-control/index.js +7 -0
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +10 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/component.js +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build-module/toggle-group-control/types.js.map +1 -1
- package/build-module/utils/deprecated-36px-size.js +3 -2
- package/build-module/utils/deprecated-36px-size.js.map +1 -1
- package/build-style/style-rtl.css +15 -36
- package/build-style/style.css +15 -36
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +1 -0
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +10 -5
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/types.d.ts +7 -0
- package/build-types/border-control/types.d.ts.map +1 -1
- package/build-types/box-control/all-input-control.d.ts.map +1 -1
- package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
- package/build-types/box-control/input-controls.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +2 -1
- package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +2 -4
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts +1 -0
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/typeahead.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +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.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/dashicon/types.d.ts +1 -1
- package/build-types/dashicon/types.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/dimension-control/index.d.ts +1 -0
- package/build-types/dimension-control/index.d.ts.map +1 -1
- package/build-types/disabled/index.d.ts +8 -1
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/token.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts +32 -32
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/gradient-picker/types.d.ts +1 -5
- package/build-types/gradient-picker/types.d.ts.map +1 -1
- package/build-types/guide/page-control.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/lock-unlock.d.ts +2 -2
- package/build-types/menu/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/index.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/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.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts +4 -2
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/types.d.ts +5 -1
- package/build-types/radio-group/types.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +3 -1
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/types.d.ts +7 -0
- package/build-types/range-control/types.d.ts.map +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +3 -7
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +5 -12
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +15 -18
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/slot-fill/use-slot.d.ts +1 -1
- package/build-types/slot-fill/use-slot.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +1 -0
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/tip/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -0
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -0
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
- package/build-types/toggle-group-control/types.d.ts +7 -0
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/stories/index.story.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/deprecated-36px-size.d.ts +3 -2
- package/build-types/utils/deprecated-36px-size.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
- package/package.json +21 -21
- package/src/autocomplete/autocompleter-ui.tsx +1 -0
- package/src/base-control/stories/index.story.tsx +2 -1
- package/src/border-box-control/border-box-control/component.tsx +1 -0
- package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -0
- package/src/border-control/border-control/component.tsx +1 -0
- package/src/border-control/border-control/hook.ts +2 -0
- package/src/border-control/border-control-dropdown/component.tsx +1 -1
- package/src/border-control/types.ts +7 -0
- package/src/box-control/all-input-control.tsx +1 -0
- package/src/box-control/axial-input-controls.tsx +1 -0
- package/src/box-control/input-controls.tsx +1 -0
- package/src/checkbox-control/stories/index.story.tsx +2 -1
- package/src/circular-option-picker/stories/index.story.tsx +2 -1
- package/src/color-indicator/stories/index.story.tsx +2 -1
- package/src/color-palette/index.tsx +5 -1
- package/src/color-palette/stories/index.story.tsx +2 -1
- package/src/color-picker/color-copy-button.tsx +8 -10
- package/src/color-picker/component.tsx +1 -0
- package/src/color-picker/stories/index.story.tsx +2 -1
- package/src/color-picker/styles.ts +0 -13
- package/src/combobox-control/README.md +1 -0
- package/src/combobox-control/index.tsx +19 -13
- package/src/combobox-control/stories/index.story.tsx +3 -1
- package/src/combobox-control/style.scss +0 -6
- package/src/combobox-control/test/index.tsx +7 -1
- package/src/composite/hover.tsx +1 -1
- package/src/composite/typeahead.tsx +3 -1
- package/src/confirm-dialog/stories/index.story.tsx +2 -1
- package/src/custom-gradient-picker/stories/index.story.tsx +2 -1
- package/src/custom-select-control/stories/index.story.tsx +2 -1
- package/src/custom-select-control-v2/stories/index.story.tsx +2 -1
- package/src/dashicon/types.ts +0 -2
- package/src/date-time/stories/date-time.story.tsx +2 -1
- package/src/date-time/stories/date.story.tsx +2 -1
- package/src/date-time/stories/time.story.tsx +2 -1
- package/src/dimension-control/README.md +1 -0
- package/src/dimension-control/index.tsx +8 -0
- package/src/dimension-control/stories/index.story.tsx +1 -0
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +24 -24
- package/src/dimension-control/test/index.test.js +7 -1
- package/src/disabled/README.md +9 -7
- package/src/disabled/index.tsx +8 -1
- package/src/disabled/stories/index.story.tsx +1 -0
- package/src/drop-zone/stories/index.story.tsx +2 -1
- package/src/dropdown/stories/index.story.tsx +2 -1
- package/src/dropdown-menu/stories/index.story.tsx +2 -1
- package/src/duotone-picker/duotone-picker.tsx +2 -0
- package/src/external-link/stories/index.story.tsx +2 -1
- package/src/font-size-picker/README.md +1 -0
- package/src/font-size-picker/font-size-picker-toggle-group.tsx +1 -0
- package/src/font-size-picker/index.tsx +8 -0
- package/src/font-size-picker/stories/index.story.tsx +1 -0
- package/src/font-size-picker/test/index.tsx +5 -1
- package/src/form-file-upload/index.tsx +13 -1
- package/src/form-file-upload/stories/index.story.tsx +2 -1
- package/src/form-token-field/stories/index.story.tsx +2 -1
- package/src/form-token-field/style.scss +8 -12
- package/src/form-token-field/token.tsx +1 -0
- package/src/gradient-picker/README.md +107 -69
- package/src/gradient-picker/docs-manifest.json +5 -0
- package/src/gradient-picker/index.tsx +34 -32
- package/src/gradient-picker/stories/index.story.tsx +2 -1
- package/src/gradient-picker/types.ts +3 -5
- package/src/guide/page-control.tsx +1 -0
- package/src/guide/style.scss +4 -6
- package/src/h-stack/stories/index.story.tsx +2 -1
- package/src/heading/stories/index.story.tsx +2 -1
- package/src/higher-order/with-constrained-tabbing/README.md +13 -3
- package/src/higher-order/with-focus-return/README.md +9 -2
- package/src/input-control/stories/index.story.tsx +2 -1
- package/src/menu/stories/index.story.tsx +2 -1
- package/src/menu/styles.ts +1 -1
- package/src/menu-group/stories/index.story.tsx +2 -1
- package/src/menu-item/index.tsx +1 -0
- package/src/menu-item/stories/index.story.tsx +2 -1
- package/src/menu-item/test/__snapshots__/index.js.snap +4 -4
- package/src/menu-items-choice/stories/index.story.tsx +2 -1
- package/src/modal/index.tsx +2 -2
- package/src/modal/stories/index.story.tsx +3 -2
- package/src/navigator/stories/index.story.tsx +2 -1
- package/src/notice/index.tsx +2 -0
- package/src/notice/stories/index.story.tsx +7 -2
- package/src/notice/test/__snapshots__/index.tsx.snap +4 -4
- package/src/number-control/stories/index.story.tsx +2 -1
- package/src/palette-edit/index.tsx +5 -0
- package/src/panel/body.tsx +1 -0
- package/src/placeholder/stories/index.story.tsx +1 -0
- package/src/popover/index.tsx +3 -0
- package/src/popover/stories/index.story.tsx +2 -1
- package/src/private-apis.ts +0 -2
- package/src/progress-bar/stories/index.story.tsx +2 -1
- package/src/radio-control/stories/index.story.tsx +2 -1
- package/src/radio-group/README.md +8 -8
- package/src/radio-group/radio.tsx +7 -0
- package/src/radio-group/stories/index.story.tsx +16 -4
- package/src/radio-group/types.ts +6 -1
- package/src/range-control/README.md +4 -3
- package/src/range-control/index.tsx +11 -0
- package/src/range-control/stories/index.story.tsx +9 -1
- package/src/range-control/test/index.tsx +7 -1
- package/src/range-control/types.ts +7 -0
- package/src/responsive-wrapper/stories/index.story.tsx +2 -1
- package/src/search-control/stories/index.story.tsx +2 -1
- package/src/select-control/stories/index.story.tsx +2 -1
- package/src/slot-fill/README.md +26 -15
- package/src/slot-fill/bubbles-virtually/fill.tsx +18 -28
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +26 -16
- package/src/slot-fill/bubbles-virtually/slot.tsx +13 -9
- package/src/slot-fill/bubbles-virtually/use-slot.ts +3 -26
- package/src/slot-fill/fill.ts +7 -22
- package/src/slot-fill/index.tsx +5 -7
- package/src/slot-fill/provider.tsx +8 -17
- package/src/slot-fill/slot.tsx +48 -85
- package/src/slot-fill/types.ts +14 -51
- package/src/snackbar/index.tsx +2 -1
- package/src/snackbar/stories/index.story.tsx +2 -1
- package/src/snackbar/stories/list.story.tsx +2 -1
- package/src/snackbar/style.scss +7 -16
- package/src/spinner/stories/index.story.tsx +2 -1
- package/src/tabs/tablist.tsx +13 -2
- package/src/text/stories/index.story.tsx +2 -1
- package/src/text-control/README.md +1 -0
- package/src/text-control/index.tsx +8 -0
- package/src/text-control/stories/index.story.tsx +3 -1
- package/src/text-control/test/text-control.tsx +7 -1
- package/src/text-highlight/stories/index.story.tsx +2 -1
- package/src/textarea-control/stories/index.story.tsx +2 -1
- package/src/tip/stories/index.story.tsx +2 -1
- package/src/toggle-control/stories/index.story.tsx +2 -1
- package/src/toggle-group-control/stories/index.story.tsx +3 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -12
- package/src/toggle-group-control/test/index.tsx +7 -1
- package/src/toggle-group-control/toggle-group-control/README.md +2 -1
- package/src/toggle-group-control/toggle-group-control/component.tsx +11 -1
- package/src/toggle-group-control/toggle-group-control-option/README.md +1 -1
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
- package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -1
- package/src/toggle-group-control/types.ts +7 -0
- package/src/tools-panel/stories/index.story.tsx +3 -0
- package/src/tooltip/stories/index.story.tsx +2 -1
- package/src/tree-grid/stories/index.story.tsx +2 -1
- package/src/tree-select/stories/index.story.tsx +2 -1
- package/src/truncate/stories/index.story.tsx +2 -1
- package/src/unit-control/stories/index.story.tsx +2 -1
- package/src/utils/deprecated-36px-size.ts +8 -2
- package/src/v-stack/stories/index.story.tsx +2 -1
- package/src/visually-hidden/stories/index.story.tsx +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/src/slot-fill/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { ReactNode, RefObject } from 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -108,38 +108,17 @@ export type SlotFillProviderProps = {
|
|
|
108
108
|
passthrough?: boolean;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
export type
|
|
112
|
-
export type
|
|
113
|
-
rerender: () => void;
|
|
114
|
-
} >;
|
|
111
|
+
export type SlotRef = RefObject< HTMLElement >;
|
|
112
|
+
export type Rerenderable = { rerender: () => void };
|
|
115
113
|
|
|
116
114
|
export type SlotFillBubblesVirtuallyContext = {
|
|
117
|
-
slots: ObservableMap<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
fills: ObservableMap< SlotKey, SlotFillBubblesVirtuallyFillRef[] >;
|
|
125
|
-
registerSlot: (
|
|
126
|
-
name: SlotKey,
|
|
127
|
-
ref: SlotFillBubblesVirtuallySlotRef,
|
|
128
|
-
fillProps: FillProps
|
|
129
|
-
) => void;
|
|
130
|
-
unregisterSlot: (
|
|
131
|
-
name: SlotKey,
|
|
132
|
-
ref: SlotFillBubblesVirtuallySlotRef
|
|
133
|
-
) => void;
|
|
134
|
-
updateSlot: ( name: SlotKey, fillProps: FillProps ) => void;
|
|
135
|
-
registerFill: (
|
|
136
|
-
name: SlotKey,
|
|
137
|
-
ref: SlotFillBubblesVirtuallyFillRef
|
|
138
|
-
) => void;
|
|
139
|
-
unregisterFill: (
|
|
140
|
-
name: SlotKey,
|
|
141
|
-
ref: SlotFillBubblesVirtuallyFillRef
|
|
142
|
-
) => void;
|
|
115
|
+
slots: ObservableMap< SlotKey, { ref: SlotRef; fillProps: FillProps } >;
|
|
116
|
+
fills: ObservableMap< SlotKey, Rerenderable[] >;
|
|
117
|
+
registerSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;
|
|
118
|
+
unregisterSlot: ( name: SlotKey, ref: SlotRef ) => void;
|
|
119
|
+
updateSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;
|
|
120
|
+
registerFill: ( name: SlotKey, ref: Rerenderable ) => void;
|
|
121
|
+
unregisterFill: ( name: SlotKey, ref: Rerenderable ) => void;
|
|
143
122
|
|
|
144
123
|
/**
|
|
145
124
|
* This helps the provider know if it's using the default context value or not.
|
|
@@ -148,30 +127,14 @@ export type SlotFillBubblesVirtuallyContext = {
|
|
|
148
127
|
};
|
|
149
128
|
|
|
150
129
|
export type BaseSlotFillContext = {
|
|
151
|
-
registerSlot: (
|
|
152
|
-
|
|
153
|
-
slot: Component< BaseSlotComponentProps >
|
|
154
|
-
) => void;
|
|
155
|
-
unregisterSlot: (
|
|
156
|
-
name: SlotKey,
|
|
157
|
-
slot: Component< BaseSlotComponentProps >
|
|
158
|
-
) => void;
|
|
130
|
+
registerSlot: ( name: SlotKey, slot: Rerenderable ) => void;
|
|
131
|
+
unregisterSlot: ( name: SlotKey, slot: Rerenderable ) => void;
|
|
159
132
|
registerFill: ( name: SlotKey, instance: FillComponentProps ) => void;
|
|
160
133
|
unregisterFill: ( name: SlotKey, instance: FillComponentProps ) => void;
|
|
161
|
-
getSlot: (
|
|
162
|
-
name: SlotKey
|
|
163
|
-
) => Component< BaseSlotComponentProps > | undefined;
|
|
134
|
+
getSlot: ( name: SlotKey ) => Rerenderable | undefined;
|
|
164
135
|
getFills: (
|
|
165
136
|
name: SlotKey,
|
|
166
|
-
slotInstance:
|
|
137
|
+
slotInstance: Rerenderable
|
|
167
138
|
) => FillComponentProps[];
|
|
168
139
|
subscribe: ( listener: () => void ) => () => void;
|
|
169
140
|
};
|
|
170
|
-
|
|
171
|
-
export type BaseSlotComponentProps = Pick<
|
|
172
|
-
BaseSlotFillContext,
|
|
173
|
-
'registerSlot' | 'unregisterSlot' | 'getFills'
|
|
174
|
-
> &
|
|
175
|
-
Omit< SlotComponentProps, 'bubblesVirtually' > & {
|
|
176
|
-
children?: ( fills: ReactNode ) => ReactNode;
|
|
177
|
-
};
|
package/src/snackbar/index.tsx
CHANGED
|
@@ -150,9 +150,10 @@ function UnforwardedSnackbar(
|
|
|
150
150
|
{ actions.map( ( { label, onClick, url }, index ) => {
|
|
151
151
|
return (
|
|
152
152
|
<Button
|
|
153
|
+
__next40pxDefaultSize
|
|
153
154
|
key={ index }
|
|
154
155
|
href={ url }
|
|
155
|
-
variant="
|
|
156
|
+
variant="link"
|
|
156
157
|
onClick={ (
|
|
157
158
|
event: MouseEvent< HTMLButtonElement >
|
|
158
159
|
) => onActionClick( event, onClick ) }
|
|
@@ -15,7 +15,8 @@ import Icon from '../../icon';
|
|
|
15
15
|
import Snackbar from '..';
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof Snackbar > = {
|
|
18
|
-
title: 'Components/Snackbar',
|
|
18
|
+
title: 'Components/Feedback/Snackbar',
|
|
19
|
+
id: 'components-snackbar',
|
|
19
20
|
component: Snackbar,
|
|
20
21
|
argTypes: {
|
|
21
22
|
as: { control: { type: null } },
|
|
@@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
import SnackbarList from '../list';
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof SnackbarList > = {
|
|
17
|
-
title: 'Components/SnackbarList',
|
|
17
|
+
title: 'Components/Feedback/SnackbarList',
|
|
18
|
+
id: 'components-snackbarlist',
|
|
18
19
|
component: SnackbarList,
|
|
19
20
|
argTypes: {
|
|
20
21
|
as: { control: { type: null } },
|
package/src/snackbar/style.scss
CHANGED
|
@@ -48,25 +48,16 @@
|
|
|
48
48
|
.components-snackbar__action.components-button {
|
|
49
49
|
margin-left: $grid-unit-40;
|
|
50
50
|
color: $white;
|
|
51
|
-
height: auto;
|
|
52
51
|
flex-shrink: 0;
|
|
53
|
-
line-height: $default-line-height;
|
|
54
|
-
padding: 0;
|
|
55
|
-
|
|
56
|
-
&:not(:disabled):not([aria-disabled="true"]):not(.is-secondary) {
|
|
57
|
-
text-decoration: underline;
|
|
58
|
-
background-color: transparent;
|
|
59
52
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
53
|
+
&:focus {
|
|
54
|
+
box-shadow: none;
|
|
55
|
+
outline: 1px dotted $white;
|
|
56
|
+
}
|
|
65
57
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
58
|
+
&:hover {
|
|
59
|
+
text-decoration: none;
|
|
60
|
+
color: currentColor;
|
|
70
61
|
}
|
|
71
62
|
}
|
|
72
63
|
|
|
@@ -10,7 +10,8 @@ import Spinner from '../';
|
|
|
10
10
|
import { space } from '../../utils/space';
|
|
11
11
|
|
|
12
12
|
const meta: Meta< typeof Spinner > = {
|
|
13
|
-
title: 'Components/Spinner',
|
|
13
|
+
title: 'Components/Feedback/Spinner',
|
|
14
|
+
id: 'components-spinner',
|
|
14
15
|
component: Spinner,
|
|
15
16
|
parameters: {
|
|
16
17
|
controls: {
|
package/src/tabs/tablist.tsx
CHANGED
|
@@ -48,10 +48,21 @@ function useScrollRectIntoView(
|
|
|
48
48
|
const childRightEdge = childLeft + childWidth;
|
|
49
49
|
const rightOverflow = childRightEdge + margin - parentRightEdge;
|
|
50
50
|
const leftOverflow = parentScroll - ( childLeft - margin );
|
|
51
|
+
|
|
52
|
+
let scrollLeft = null;
|
|
51
53
|
if ( leftOverflow > 0 ) {
|
|
52
|
-
|
|
54
|
+
scrollLeft = parentScroll - leftOverflow;
|
|
53
55
|
} else if ( rightOverflow > 0 ) {
|
|
54
|
-
|
|
56
|
+
scrollLeft = parentScroll + rightOverflow;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if ( scrollLeft !== null ) {
|
|
60
|
+
/**
|
|
61
|
+
* The optional chaining is used here to avoid unit test failures.
|
|
62
|
+
* It can be removed when JSDOM supports `Element` scroll methods.
|
|
63
|
+
* See: https://github.com/WordPress/gutenberg/pull/66498#issuecomment-2441146096
|
|
64
|
+
*/
|
|
65
|
+
parent.scroll?.( { left: scrollLeft } );
|
|
55
66
|
}
|
|
56
67
|
}, [ margin, parent, rect ] );
|
|
57
68
|
}
|
|
@@ -10,7 +10,8 @@ import { Text } from '../component';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof Text > = {
|
|
12
12
|
component: Text,
|
|
13
|
-
title: 'Components (Experimental)/Text',
|
|
13
|
+
title: 'Components (Experimental)/Typography/Text',
|
|
14
|
+
id: 'components-experimental-text',
|
|
14
15
|
argTypes: {
|
|
15
16
|
as: { control: { type: 'text' } },
|
|
16
17
|
color: { control: { type: 'color' } },
|
|
@@ -16,6 +16,7 @@ import { forwardRef } from '@wordpress/element';
|
|
|
16
16
|
import BaseControl from '../base-control';
|
|
17
17
|
import type { WordPressComponentProps } from '../context';
|
|
18
18
|
import type { TextControlProps } from './types';
|
|
19
|
+
import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
|
|
19
20
|
|
|
20
21
|
function UnforwardedTextControl(
|
|
21
22
|
props: WordPressComponentProps< TextControlProps, 'input', false >,
|
|
@@ -38,6 +39,12 @@ function UnforwardedTextControl(
|
|
|
38
39
|
const onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>
|
|
39
40
|
onChange( event.target.value );
|
|
40
41
|
|
|
42
|
+
maybeWarnDeprecated36pxSize( {
|
|
43
|
+
componentName: 'TextControl',
|
|
44
|
+
size: undefined,
|
|
45
|
+
__next40pxDefaultSize,
|
|
46
|
+
} );
|
|
47
|
+
|
|
41
48
|
return (
|
|
42
49
|
<BaseControl
|
|
43
50
|
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
|
|
@@ -77,6 +84,7 @@ function UnforwardedTextControl(
|
|
|
77
84
|
* return (
|
|
78
85
|
* <TextControl
|
|
79
86
|
* __nextHasNoMarginBottom
|
|
87
|
+
* __next40pxDefaultSize
|
|
80
88
|
* label="Additional CSS Class"
|
|
81
89
|
* value={ className }
|
|
82
90
|
* onChange={ ( value ) => setClassName( value ) }
|
|
@@ -15,7 +15,8 @@ import TextControl from '..';
|
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof TextControl > = {
|
|
17
17
|
component: TextControl,
|
|
18
|
-
title: 'Components/TextControl',
|
|
18
|
+
title: 'Components/Selection & Input/Common/TextControl',
|
|
19
|
+
id: 'components-textcontrol',
|
|
19
20
|
argTypes: {
|
|
20
21
|
help: { control: { type: 'text' } },
|
|
21
22
|
label: { control: { type: 'text' } },
|
|
@@ -54,6 +55,7 @@ export const Default: StoryFn< typeof TextControl > = DefaultTemplate.bind(
|
|
|
54
55
|
);
|
|
55
56
|
Default.args = {
|
|
56
57
|
__nextHasNoMarginBottom: true,
|
|
58
|
+
__next40pxDefaultSize: true,
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
export const WithLabelAndHelpText: StoryFn< typeof TextControl > =
|
|
@@ -9,7 +9,13 @@ import { render, screen } from '@testing-library/react';
|
|
|
9
9
|
import _TextControl from '..';
|
|
10
10
|
|
|
11
11
|
const TextControl = ( props: React.ComponentProps< typeof _TextControl > ) => {
|
|
12
|
-
return
|
|
12
|
+
return (
|
|
13
|
+
<_TextControl
|
|
14
|
+
{ ...props }
|
|
15
|
+
__nextHasNoMarginBottom
|
|
16
|
+
__next40pxDefaultSize
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
13
19
|
};
|
|
14
20
|
|
|
15
21
|
const noop = () => {};
|
|
@@ -10,7 +10,8 @@ import TextHighlight from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof TextHighlight > = {
|
|
12
12
|
component: TextHighlight,
|
|
13
|
-
title: 'Components/TextHighlight',
|
|
13
|
+
title: 'Components/Typography/TextHighlight',
|
|
14
|
+
id: 'components-texthighlight',
|
|
14
15
|
parameters: {
|
|
15
16
|
controls: {
|
|
16
17
|
expanded: true,
|
|
@@ -15,7 +15,8 @@ import TextareaControl from '..';
|
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof TextareaControl > = {
|
|
17
17
|
component: TextareaControl,
|
|
18
|
-
title: 'Components/TextareaControl',
|
|
18
|
+
title: 'Components/Selection & Input/Common/TextareaControl',
|
|
19
|
+
id: 'components-textareacontrol',
|
|
19
20
|
argTypes: {
|
|
20
21
|
onChange: { action: 'onChange' },
|
|
21
22
|
label: { control: { type: 'text' } },
|
|
@@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
import ToggleControl from '..';
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof ToggleControl > = {
|
|
17
|
-
title: 'Components/ToggleControl',
|
|
17
|
+
title: 'Components/Selection & Input/Common/ToggleControl',
|
|
18
|
+
id: 'components-togglecontrol',
|
|
18
19
|
component: ToggleControl,
|
|
19
20
|
argTypes: {
|
|
20
21
|
checked: { control: { type: null } },
|
|
@@ -27,7 +27,8 @@ const meta: Meta< typeof ToggleGroupControl > = {
|
|
|
27
27
|
component: ToggleGroupControl,
|
|
28
28
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
29
29
|
subcomponents: { ToggleGroupControlOption, ToggleGroupControlOptionIcon },
|
|
30
|
-
title: 'Components (Experimental)/ToggleGroupControl',
|
|
30
|
+
title: 'Components (Experimental)/Selection & Input/ToggleGroupControl',
|
|
31
|
+
id: 'components-experimental-togglegroupcontrol',
|
|
31
32
|
argTypes: {
|
|
32
33
|
help: { control: { type: 'text' } },
|
|
33
34
|
onChange: { action: 'onChange' },
|
|
@@ -50,6 +51,7 @@ const Template: StoryFn< typeof ToggleGroupControl > = ( {
|
|
|
50
51
|
return (
|
|
51
52
|
<ToggleGroupControl
|
|
52
53
|
__nextHasNoMarginBottom
|
|
54
|
+
__next40pxDefaultSize
|
|
53
55
|
{ ...props }
|
|
54
56
|
onChange={ ( ...changeArgs ) => {
|
|
55
57
|
setValue( ...changeArgs );
|
|
@@ -44,8 +44,8 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
|
|
|
44
44
|
display: inline-flex;
|
|
45
45
|
min-width: 0;
|
|
46
46
|
position: relative;
|
|
47
|
-
min-height:
|
|
48
|
-
padding:
|
|
47
|
+
min-height: 40px;
|
|
48
|
+
padding: 3px;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.emotion-8:hover {
|
|
@@ -159,7 +159,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
|
|
|
159
159
|
width: 100%;
|
|
160
160
|
z-index: 2;
|
|
161
161
|
color: #1e1e1e;
|
|
162
|
-
height:
|
|
162
|
+
height: 32px;
|
|
163
163
|
aspect-ratio: 1;
|
|
164
164
|
padding-left: 0;
|
|
165
165
|
padding-right: 0;
|
|
@@ -236,7 +236,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
|
|
|
236
236
|
width: 100%;
|
|
237
237
|
z-index: 2;
|
|
238
238
|
color: #1e1e1e;
|
|
239
|
-
height:
|
|
239
|
+
height: 32px;
|
|
240
240
|
aspect-ratio: 1;
|
|
241
241
|
padding-left: 0;
|
|
242
242
|
padding-right: 0;
|
|
@@ -409,8 +409,8 @@ exports[`ToggleGroupControl controlled should render correctly with text options
|
|
|
409
409
|
display: inline-flex;
|
|
410
410
|
min-width: 0;
|
|
411
411
|
position: relative;
|
|
412
|
-
min-height:
|
|
413
|
-
padding:
|
|
412
|
+
min-height: 40px;
|
|
413
|
+
padding: 3px;
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
.emotion-8:hover {
|
|
@@ -678,8 +678,8 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
|
|
|
678
678
|
display: inline-flex;
|
|
679
679
|
min-width: 0;
|
|
680
680
|
position: relative;
|
|
681
|
-
min-height:
|
|
682
|
-
padding:
|
|
681
|
+
min-height: 40px;
|
|
682
|
+
padding: 3px;
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
.emotion-8:hover {
|
|
@@ -793,7 +793,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
|
|
|
793
793
|
width: 100%;
|
|
794
794
|
z-index: 2;
|
|
795
795
|
color: #1e1e1e;
|
|
796
|
-
height:
|
|
796
|
+
height: 32px;
|
|
797
797
|
aspect-ratio: 1;
|
|
798
798
|
padding-left: 0;
|
|
799
799
|
padding-right: 0;
|
|
@@ -870,7 +870,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
|
|
|
870
870
|
width: 100%;
|
|
871
871
|
z-index: 2;
|
|
872
872
|
color: #1e1e1e;
|
|
873
|
-
height:
|
|
873
|
+
height: 32px;
|
|
874
874
|
aspect-ratio: 1;
|
|
875
875
|
padding-left: 0;
|
|
876
876
|
padding-right: 0;
|
|
@@ -1037,8 +1037,8 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
|
|
|
1037
1037
|
display: inline-flex;
|
|
1038
1038
|
min-width: 0;
|
|
1039
1039
|
position: relative;
|
|
1040
|
-
min-height:
|
|
1041
|
-
padding:
|
|
1040
|
+
min-height: 40px;
|
|
1041
|
+
padding: 3px;
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
1044
|
.emotion-8:hover {
|
|
@@ -28,7 +28,13 @@ const hoverOutside = async () => {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const ToggleGroupControl = ( props: ToggleGroupControlProps ) => {
|
|
31
|
-
return
|
|
31
|
+
return (
|
|
32
|
+
<_ToggleGroupControl
|
|
33
|
+
{ ...props }
|
|
34
|
+
__nextHasNoMarginBottom
|
|
35
|
+
__next40pxDefaultSize
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
32
38
|
};
|
|
33
39
|
|
|
34
40
|
const ControlledToggleGroupControl = ( {
|
|
@@ -25,6 +25,7 @@ function Example() {
|
|
|
25
25
|
value="vertical"
|
|
26
26
|
isBlock
|
|
27
27
|
__nextHasNoMarginBottom
|
|
28
|
+
__next40pxDefaultSize
|
|
28
29
|
>
|
|
29
30
|
<ToggleGroupControlOption value="horizontal" label="Horizontal" />
|
|
30
31
|
<ToggleGroupControlOption value="vertical" label="Vertical" />
|
|
@@ -100,4 +101,4 @@ Start opting into the larger default height that will become the default size in
|
|
|
100
101
|
Start opting into the new margin-free styles that will become the default in a future version.
|
|
101
102
|
|
|
102
103
|
- Required: No
|
|
103
|
-
- Default: `false`
|
|
104
|
+
- Default: `false`
|
|
@@ -23,6 +23,7 @@ import { ToggleGroupControlAsButtonGroup } from './as-button-group';
|
|
|
23
23
|
import { useTrackElementOffsetRect } from '../../utils/element-rect';
|
|
24
24
|
import { useMergeRefs } from '@wordpress/compose';
|
|
25
25
|
import { useAnimatedOffsetRect } from '../../utils/hooks/use-animated-offset-rect';
|
|
26
|
+
import { maybeWarnDeprecated36pxSize } from '../../utils/deprecated-36px-size';
|
|
26
27
|
|
|
27
28
|
function UnconnectedToggleGroupControl(
|
|
28
29
|
props: WordPressComponentProps< ToggleGroupControlProps, 'div', false >,
|
|
@@ -31,6 +32,7 @@ function UnconnectedToggleGroupControl(
|
|
|
31
32
|
const {
|
|
32
33
|
__nextHasNoMarginBottom = false,
|
|
33
34
|
__next40pxDefaultSize = false,
|
|
35
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
34
36
|
className,
|
|
35
37
|
isAdaptiveWidth = false,
|
|
36
38
|
isBlock = false,
|
|
@@ -52,7 +54,7 @@ function UnconnectedToggleGroupControl(
|
|
|
52
54
|
const [ controlElement, setControlElement ] = useState< HTMLElement >();
|
|
53
55
|
const refs = useMergeRefs( [ setControlElement, forwardedRef ] );
|
|
54
56
|
const selectedRect = useTrackElementOffsetRect(
|
|
55
|
-
value ? selectedElement : undefined
|
|
57
|
+
value || value === 0 ? selectedElement : undefined
|
|
56
58
|
);
|
|
57
59
|
useAnimatedOffsetRect( controlElement, selectedRect, {
|
|
58
60
|
prefix: 'selected',
|
|
@@ -81,6 +83,13 @@ function UnconnectedToggleGroupControl(
|
|
|
81
83
|
? ToggleGroupControlAsButtonGroup
|
|
82
84
|
: ToggleGroupControlAsRadioGroup;
|
|
83
85
|
|
|
86
|
+
maybeWarnDeprecated36pxSize( {
|
|
87
|
+
componentName: 'ToggleGroupControl',
|
|
88
|
+
size,
|
|
89
|
+
__next40pxDefaultSize,
|
|
90
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
91
|
+
} );
|
|
92
|
+
|
|
84
93
|
return (
|
|
85
94
|
<BaseControl
|
|
86
95
|
help={ help }
|
|
@@ -135,6 +144,7 @@ function UnconnectedToggleGroupControl(
|
|
|
135
144
|
* value="vertical"
|
|
136
145
|
* isBlock
|
|
137
146
|
* __nextHasNoMarginBottom
|
|
147
|
+
* __next40pxDefaultSize
|
|
138
148
|
* >
|
|
139
149
|
* <ToggleGroupControlOption value="horizontal" label="Horizontal" />
|
|
140
150
|
* <ToggleGroupControlOption value="vertical" label="Vertical" />
|
|
@@ -6,7 +6,6 @@ This feature is still experimental. “Experimental” means this is an early im
|
|
|
6
6
|
|
|
7
7
|
`ToggleGroupControlOption` is a form component and is meant to be used as a child of [`ToggleGroupControl`](/packages/components/src/toggle-group-control/toggle-group-control/README.md).
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
## Usage
|
|
11
10
|
|
|
12
11
|
```js
|
|
@@ -22,6 +21,7 @@ function Example() {
|
|
|
22
21
|
value="vertical"
|
|
23
22
|
isBlock
|
|
24
23
|
__nextHasNoMarginBottom
|
|
24
|
+
__next40pxDefaultSize
|
|
25
25
|
>
|
|
26
26
|
<ToggleGroupControlOption
|
|
27
27
|
value="horizontal"
|
|
@@ -53,6 +53,7 @@ function UnforwardedToggleGroupControlOption(
|
|
|
53
53
|
* value="vertical"
|
|
54
54
|
* isBlock
|
|
55
55
|
* __nextHasNoMarginBottom
|
|
56
|
+
* __next40pxDefaultSize
|
|
56
57
|
* >
|
|
57
58
|
* <ToggleGroupControlOption value="horizontal" label="Horizontal" />
|
|
58
59
|
* <ToggleGroupControlOption value="vertical" label="Vertical" />
|
|
@@ -17,7 +17,7 @@ import { formatLowercase, formatUppercase } from '@wordpress/icons';
|
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
19
19
|
return (
|
|
20
|
-
<ToggleGroupControl __nextHasNoMarginBottom>
|
|
20
|
+
<ToggleGroupControl __nextHasNoMarginBottom __next40pxDefaultSize>
|
|
21
21
|
<ToggleGroupControlOptionIcon
|
|
22
22
|
value="uppercase"
|
|
23
23
|
icon={ formatUppercase }
|
|
@@ -52,7 +52,7 @@ function UnforwardedToggleGroupControlOptionIcon(
|
|
|
52
52
|
*
|
|
53
53
|
* function Example() {
|
|
54
54
|
* return (
|
|
55
|
-
* <ToggleGroupControl __nextHasNoMarginBottom>
|
|
55
|
+
* <ToggleGroupControl __nextHasNoMarginBottom __next40pxDefaultSize>
|
|
56
56
|
* <ToggleGroupControlOptionIcon
|
|
57
57
|
* value="uppercase"
|
|
58
58
|
* label="Uppercase"
|
|
@@ -128,6 +128,13 @@ export type ToggleGroupControlProps = Pick<
|
|
|
128
128
|
* @default false
|
|
129
129
|
*/
|
|
130
130
|
__next40pxDefaultSize?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Do not throw a warning for the deprecated 36px default size.
|
|
133
|
+
* For internal components of other components that already throw the warning.
|
|
134
|
+
*
|
|
135
|
+
* @ignore
|
|
136
|
+
*/
|
|
137
|
+
__shouldNotWarnDeprecated36pxSize?: boolean;
|
|
131
138
|
};
|
|
132
139
|
|
|
133
140
|
export type ToggleGroupControlContextProps = {
|
|
@@ -110,6 +110,7 @@ export const Default: StoryFn< typeof ToolsPanel > = ( {
|
|
|
110
110
|
>
|
|
111
111
|
<ToggleGroupControl
|
|
112
112
|
__nextHasNoMarginBottom
|
|
113
|
+
__next40pxDefaultSize
|
|
113
114
|
label="Scale"
|
|
114
115
|
value={ scale }
|
|
115
116
|
onChange={ ( next ) => setScale( next ) }
|
|
@@ -457,6 +458,7 @@ export const WithConditionalDefaultControl: StoryFn< typeof ToolsPanel > = ( {
|
|
|
457
458
|
>
|
|
458
459
|
<ToggleGroupControl
|
|
459
460
|
__nextHasNoMarginBottom
|
|
461
|
+
__next40pxDefaultSize
|
|
460
462
|
label="Scale"
|
|
461
463
|
value={ scale }
|
|
462
464
|
onChange={ ( next ) =>
|
|
@@ -559,6 +561,7 @@ export const WithConditionallyRenderedControl: StoryFn<
|
|
|
559
561
|
>
|
|
560
562
|
<ToggleGroupControl
|
|
561
563
|
__nextHasNoMarginBottom
|
|
564
|
+
__next40pxDefaultSize
|
|
562
565
|
label="Scale"
|
|
563
566
|
value={ scale }
|
|
564
567
|
onChange={ ( next ) =>
|
|
@@ -15,7 +15,8 @@ import Tooltip from '..';
|
|
|
15
15
|
import Button from '../../button';
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof Tooltip > = {
|
|
18
|
-
title: 'Components/Tooltip',
|
|
18
|
+
title: 'Components/Overlays/Tooltip',
|
|
19
|
+
id: 'components-tooltip',
|
|
19
20
|
component: Tooltip,
|
|
20
21
|
argTypes: {
|
|
21
22
|
children: { control: { type: null } },
|
|
@@ -16,7 +16,8 @@ import { Button } from '../../button';
|
|
|
16
16
|
import InputControl from '../../input-control';
|
|
17
17
|
|
|
18
18
|
const meta: Meta< typeof TreeGrid > = {
|
|
19
|
-
title: 'Components (Experimental)/TreeGrid',
|
|
19
|
+
title: 'Components (Experimental)/Navigation/TreeGrid',
|
|
20
|
+
id: 'components-experimental-treegrid',
|
|
20
21
|
component: TreeGrid,
|
|
21
22
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
22
23
|
subcomponents: { TreeGridRow, TreeGridCell },
|
|
@@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
import TreeSelect from '../';
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof TreeSelect > = {
|
|
17
|
-
title: 'Components/TreeSelect',
|
|
17
|
+
title: 'Components/Selection & Input/Common/TreeSelect',
|
|
18
|
+
id: 'components-treeselect',
|
|
18
19
|
component: TreeSelect,
|
|
19
20
|
argTypes: {
|
|
20
21
|
help: { control: { type: 'text' } },
|
|
@@ -10,7 +10,8 @@ import { Truncate } from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof Truncate > = {
|
|
12
12
|
component: Truncate,
|
|
13
|
-
title: 'Components (Experimental)/Truncate',
|
|
13
|
+
title: 'Components (Experimental)/Typography/Truncate',
|
|
14
|
+
id: 'components-experimental-truncate',
|
|
14
15
|
argTypes: {
|
|
15
16
|
children: { control: { type: 'text' } },
|
|
16
17
|
as: { control: { type: 'text' } },
|
|
@@ -16,7 +16,8 @@ import { CSS_UNITS } from '../utils';
|
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof UnitControl > = {
|
|
18
18
|
component: UnitControl,
|
|
19
|
-
title: 'Components (Experimental)/UnitControl',
|
|
19
|
+
title: 'Components (Experimental)/Selection & Input/UnitControl',
|
|
20
|
+
id: 'components-experimental-unitcontrol',
|
|
20
21
|
argTypes: {
|
|
21
22
|
__unstableInputWidth: { control: { type: 'text' } },
|
|
22
23
|
__unstableStateReducer: { control: { type: null } },
|
|
@@ -7,12 +7,18 @@ export function maybeWarnDeprecated36pxSize( {
|
|
|
7
7
|
componentName,
|
|
8
8
|
__next40pxDefaultSize,
|
|
9
9
|
size,
|
|
10
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
10
11
|
}: {
|
|
11
12
|
componentName: string;
|
|
12
13
|
__next40pxDefaultSize: boolean | undefined;
|
|
13
|
-
size: string;
|
|
14
|
+
size: string | undefined;
|
|
15
|
+
__shouldNotWarnDeprecated36pxSize?: boolean;
|
|
14
16
|
} ) {
|
|
15
|
-
if (
|
|
17
|
+
if (
|
|
18
|
+
__shouldNotWarnDeprecated36pxSize ||
|
|
19
|
+
__next40pxDefaultSize ||
|
|
20
|
+
( size !== undefined && size !== 'default' )
|
|
21
|
+
) {
|
|
16
22
|
return;
|
|
17
23
|
}
|
|
18
24
|
|