@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
|
@@ -47,6 +47,18 @@ export function FormFileUpload( {
|
|
|
47
47
|
{ children }
|
|
48
48
|
</Button>
|
|
49
49
|
);
|
|
50
|
+
// @todo: Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
|
|
51
|
+
// from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
|
|
52
|
+
// This can be removed once the Chromium fix is in the stable channel.
|
|
53
|
+
// Prevent Safari from adding "image/heic" and "image/heif" to the accept attribute.
|
|
54
|
+
const isSafari =
|
|
55
|
+
globalThis.window?.navigator.userAgent.includes( 'Safari' ) &&
|
|
56
|
+
! globalThis.window?.navigator.userAgent.includes( 'Chrome' ) &&
|
|
57
|
+
! globalThis.window?.navigator.userAgent.includes( 'Chromium' );
|
|
58
|
+
const compatAccept =
|
|
59
|
+
! isSafari && !! accept?.includes( 'image/*' )
|
|
60
|
+
? `${ accept }, image/heic, image/heif`
|
|
61
|
+
: accept;
|
|
50
62
|
|
|
51
63
|
return (
|
|
52
64
|
<div className="components-form-file-upload">
|
|
@@ -56,7 +68,7 @@ export function FormFileUpload( {
|
|
|
56
68
|
ref={ ref }
|
|
57
69
|
multiple={ multiple }
|
|
58
70
|
style={ { display: 'none' } }
|
|
59
|
-
accept={
|
|
71
|
+
accept={ compatAccept }
|
|
60
72
|
onChange={ onChange }
|
|
61
73
|
onClick={ onClick }
|
|
62
74
|
data-testid="form-file-upload-input"
|
|
@@ -14,7 +14,8 @@ import { upload as uploadIcon } from '@wordpress/icons';
|
|
|
14
14
|
import FormFileUpload from '..';
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof FormFileUpload > = {
|
|
17
|
-
title: 'Components/FormFileUpload',
|
|
17
|
+
title: 'Components/Selection & Input/File Upload/FormFileUpload',
|
|
18
|
+
id: 'components-formfileupload',
|
|
18
19
|
component: FormFileUpload,
|
|
19
20
|
argTypes: {
|
|
20
21
|
icon: { control: { type: null } },
|
|
@@ -15,7 +15,8 @@ import FormTokenField from '../';
|
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof FormTokenField > = {
|
|
17
17
|
component: FormTokenField,
|
|
18
|
-
title: 'Components/FormTokenField',
|
|
18
|
+
title: 'Components/Selection & Input/Common/FormTokenField',
|
|
19
|
+
id: 'components-formtokenfield',
|
|
19
20
|
argTypes: {
|
|
20
21
|
value: {
|
|
21
22
|
control: { type: null },
|
|
@@ -81,7 +81,12 @@
|
|
|
81
81
|
|
|
82
82
|
.components-form-token-field__token-text {
|
|
83
83
|
background: transparent;
|
|
84
|
-
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:not(.is-disabled) {
|
|
87
|
+
.components-form-token-field__token-text {
|
|
88
|
+
color: $components-color-accent;
|
|
89
|
+
}
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
.components-form-token-field__remove-token {
|
|
@@ -90,7 +95,6 @@
|
|
|
90
95
|
position: absolute;
|
|
91
96
|
top: 1px;
|
|
92
97
|
right: 0;
|
|
93
|
-
padding: 0;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
&.is-success {
|
|
@@ -112,18 +116,11 @@
|
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
|
-
|
|
116
|
-
&.is-disabled {
|
|
117
|
-
.components-form-token-field__remove-token {
|
|
118
|
-
cursor: default;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
119
|
}
|
|
122
120
|
|
|
123
121
|
.components-form-token-field__token-text,
|
|
124
122
|
.components-form-token-field__remove-token.components-button {
|
|
125
123
|
display: inline-block;
|
|
126
|
-
line-height: 24px;
|
|
127
124
|
height: auto;
|
|
128
125
|
background: $gray-300;
|
|
129
126
|
min-width: unset;
|
|
@@ -134,20 +131,19 @@
|
|
|
134
131
|
.components-form-token-field__token-text {
|
|
135
132
|
border-radius: $radius-x-small 0 0 $radius-x-small;
|
|
136
133
|
padding: 0 0 0 8px;
|
|
134
|
+
line-height: 24px;
|
|
137
135
|
white-space: nowrap;
|
|
138
136
|
overflow: hidden;
|
|
139
137
|
text-overflow: ellipsis;
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
.components-form-token-field__remove-token.components-button {
|
|
143
|
-
cursor: pointer;
|
|
144
141
|
border-radius: 0 $radius-x-small $radius-x-small 0;
|
|
145
|
-
padding: 0 2px;
|
|
146
142
|
color: $gray-900;
|
|
147
143
|
line-height: 10px;
|
|
148
144
|
overflow: initial;
|
|
149
145
|
|
|
150
|
-
&:hover {
|
|
146
|
+
&:hover:not(:disabled) {
|
|
151
147
|
color: $gray-900;
|
|
152
148
|
}
|
|
153
149
|
}
|
|
@@ -72,6 +72,7 @@ export default function Token( {
|
|
|
72
72
|
|
|
73
73
|
<Button
|
|
74
74
|
className="components-form-token-field__remove-token"
|
|
75
|
+
size="small"
|
|
75
76
|
icon={ closeSmall }
|
|
76
77
|
onClick={ ! disabled ? onClick : undefined }
|
|
77
78
|
// Disable reason: Even when FormTokenField itself is accessibly disabled, token reset buttons shouldn't be in the tab sequence.
|
|
@@ -1,110 +1,148 @@
|
|
|
1
1
|
# GradientPicker
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- This file is generated automatically and cannot be edited directly. Make edits via TypeScript types and TSDocs. -->
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p class="callout callout-info">See the <a href="https://wordpress.github.io/gutenberg/?path=/docs/components-gradientpicker--docs">WordPress Storybook</a> for more detailed, interactive documentation.</p>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
GradientPicker is a React component that renders a color gradient picker to
|
|
8
|
+
define a multi step gradient. There's either a _linear_ or a _radial_ type
|
|
9
|
+
available.
|
|
10
10
|
|
|
11
11
|
```jsx
|
|
12
12
|
import { useState } from 'react';
|
|
13
13
|
import { GradientPicker } from '@wordpress/components';
|
|
14
14
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
15
|
+
const MyGradientPicker = () => {
|
|
16
|
+
const [ gradient, setGradient ] = useState( null );
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<GradientPicker
|
|
20
|
+
value={ gradient }
|
|
21
|
+
onChange={ ( currentGradient ) => setGradient( currentGradient ) }
|
|
22
|
+
gradients={ [
|
|
23
|
+
{
|
|
24
|
+
name: 'JShine',
|
|
25
|
+
gradient:
|
|
26
|
+
'linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)',
|
|
27
|
+
slug: 'jshine',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Moonlit Asteroid',
|
|
31
|
+
gradient:
|
|
32
|
+
'linear-gradient(135deg,#0F2027 0%, #203A43 0%, #2c5364 100%)',
|
|
33
|
+
slug: 'moonlit-asteroid',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Rastafarie',
|
|
37
|
+
gradient:
|
|
38
|
+
'linear-gradient(135deg,#1E9600 0%, #FFF200 0%, #FF0000 100%)',
|
|
39
|
+
slug: 'rastafari',
|
|
40
|
+
},
|
|
41
|
+
] }
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
44
|
};
|
|
45
45
|
```
|
|
46
|
-
|
|
47
46
|
## Props
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
### `__experimentalIsRenderedInSidebar`
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
Whether this is rendered in the sidebar.
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
- Type: `boolean`
|
|
53
|
+
- Required: No
|
|
54
|
+
- Default: `false`
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
### `asButtons`
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
Whether the control should present as a set of buttons,
|
|
59
|
+
each with its own tab stop.
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
- Type: `boolean`
|
|
62
|
+
- Required: No
|
|
63
|
+
- Default: `false`
|
|
60
64
|
|
|
61
|
-
-
|
|
62
|
-
- Default: `linear-gradient(90deg, rgb(6, 147, 227) 0%, rgb(155, 81, 224) 100%)`
|
|
65
|
+
### `aria-label`
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
A label to identify the purpose of the control.
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
- Type: `string`
|
|
70
|
+
- Required: No
|
|
67
71
|
|
|
68
|
-
-
|
|
72
|
+
### `aria-labelledby`
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
An ID of an element to provide a label for the control.
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
- Type: `string`
|
|
77
|
+
- Required: No
|
|
78
|
+
|
|
79
|
+
### `className`
|
|
80
|
+
|
|
81
|
+
The class name added to the wrapper.
|
|
73
82
|
|
|
74
|
-
-
|
|
75
|
-
-
|
|
83
|
+
- Type: `string`
|
|
84
|
+
- Required: No
|
|
76
85
|
|
|
77
|
-
### `clearable
|
|
86
|
+
### `clearable`
|
|
78
87
|
|
|
79
88
|
Whether the palette should have a clearing button or not.
|
|
80
89
|
|
|
81
|
-
-
|
|
82
|
-
-
|
|
90
|
+
- Type: `boolean`
|
|
91
|
+
- Required: No
|
|
92
|
+
- Default: `true`
|
|
93
|
+
|
|
94
|
+
### `disableCustomGradients`
|
|
95
|
+
|
|
96
|
+
If true, the gradient picker will not be displayed and only defined
|
|
97
|
+
gradients from `gradients` will be shown.
|
|
98
|
+
|
|
99
|
+
- Type: `boolean`
|
|
100
|
+
- Required: No
|
|
101
|
+
- Default: `false`
|
|
102
|
+
|
|
103
|
+
### `gradients`
|
|
104
|
+
|
|
105
|
+
An array of objects as predefined gradients displayed above the gradient
|
|
106
|
+
selector. Alternatively, if there are multiple sets (or 'origins') of
|
|
107
|
+
gradients, you can pass an array of objects each with a `name` and a
|
|
108
|
+
`gradients` array which will in turn contain the predefined gradient objects.
|
|
109
|
+
|
|
110
|
+
- Type: `GradientsProp`
|
|
111
|
+
- Required: No
|
|
112
|
+
- Default: `[]`
|
|
83
113
|
|
|
84
|
-
### `
|
|
114
|
+
### `headingLevel`
|
|
85
115
|
|
|
86
|
-
|
|
116
|
+
The heading level. Only applies in cases where gradients are provided
|
|
117
|
+
from multiple origins (i.e. when the array passed as the `gradients` prop
|
|
118
|
+
contains two or more items).
|
|
87
119
|
|
|
88
|
-
-
|
|
89
|
-
-
|
|
120
|
+
- Type: `1 | 2 | 3 | 4 | 5 | 6 | "1" | "2" | "3" | "4" | ...`
|
|
121
|
+
- Required: No
|
|
122
|
+
- Default: `2`
|
|
90
123
|
|
|
91
|
-
### `
|
|
124
|
+
### `loop`
|
|
92
125
|
|
|
93
|
-
|
|
126
|
+
Prevents keyboard interaction from wrapping around.
|
|
127
|
+
Only used when `asButtons` is not true.
|
|
94
128
|
|
|
95
|
-
-
|
|
96
|
-
-
|
|
129
|
+
- Type: `boolean`
|
|
130
|
+
- Required: No
|
|
131
|
+
- Default: `true`
|
|
97
132
|
|
|
98
|
-
### `
|
|
133
|
+
### `onChange`
|
|
99
134
|
|
|
100
|
-
|
|
135
|
+
The function called when a new gradient has been defined. It is passed to
|
|
136
|
+
the `currentGradient` as an argument.
|
|
101
137
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
138
|
+
- Type: `(currentGradient: string) => void`
|
|
139
|
+
- Required: Yes
|
|
104
140
|
|
|
105
|
-
### `
|
|
141
|
+
### `value`
|
|
106
142
|
|
|
107
|
-
|
|
143
|
+
The current value of the gradient. Pass a css gradient string (See default value for example).
|
|
144
|
+
Optionally pass in a `null` value to specify no gradient is currently selected.
|
|
108
145
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
146
|
+
- Type: `string`
|
|
147
|
+
- Required: No
|
|
148
|
+
- Default: `'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)'`
|
|
@@ -166,44 +166,44 @@ function Component( props: PickerProps< any > ) {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
|
-
*
|
|
169
|
+
* GradientPicker is a React component that renders a color gradient picker to
|
|
170
170
|
* define a multi step gradient. There's either a _linear_ or a _radial_ type
|
|
171
171
|
* available.
|
|
172
172
|
*
|
|
173
173
|
* ```jsx
|
|
174
|
-
*import {
|
|
175
|
-
*import {
|
|
174
|
+
* import { useState } from 'react';
|
|
175
|
+
* import { GradientPicker } from '@wordpress/components';
|
|
176
176
|
*
|
|
177
|
-
*const
|
|
178
|
-
*
|
|
177
|
+
* const MyGradientPicker = () => {
|
|
178
|
+
* const [ gradient, setGradient ] = useState( null );
|
|
179
179
|
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*};
|
|
180
|
+
* return (
|
|
181
|
+
* <GradientPicker
|
|
182
|
+
* value={ gradient }
|
|
183
|
+
* onChange={ ( currentGradient ) => setGradient( currentGradient ) }
|
|
184
|
+
* gradients={ [
|
|
185
|
+
* {
|
|
186
|
+
* name: 'JShine',
|
|
187
|
+
* gradient:
|
|
188
|
+
* 'linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)',
|
|
189
|
+
* slug: 'jshine',
|
|
190
|
+
* },
|
|
191
|
+
* {
|
|
192
|
+
* name: 'Moonlit Asteroid',
|
|
193
|
+
* gradient:
|
|
194
|
+
* 'linear-gradient(135deg,#0F2027 0%, #203A43 0%, #2c5364 100%)',
|
|
195
|
+
* slug: 'moonlit-asteroid',
|
|
196
|
+
* },
|
|
197
|
+
* {
|
|
198
|
+
* name: 'Rastafarie',
|
|
199
|
+
* gradient:
|
|
200
|
+
* 'linear-gradient(135deg,#1E9600 0%, #FFF200 0%, #FF0000 100%)',
|
|
201
|
+
* slug: 'rastafari',
|
|
202
|
+
* },
|
|
203
|
+
* ] }
|
|
204
|
+
* />
|
|
205
|
+
* );
|
|
206
|
+
* };
|
|
207
207
|
*```
|
|
208
208
|
*
|
|
209
209
|
*/
|
|
@@ -247,6 +247,8 @@ export function GradientPicker( {
|
|
|
247
247
|
! disableCustomGradients && (
|
|
248
248
|
<CircularOptionPicker.ButtonAction
|
|
249
249
|
onClick={ clearGradient }
|
|
250
|
+
accessibleWhenDisabled
|
|
251
|
+
disabled={ ! value }
|
|
250
252
|
>
|
|
251
253
|
{ __( 'Clear' ) }
|
|
252
254
|
</CircularOptionPicker.ButtonAction>
|
|
@@ -13,7 +13,8 @@ import { useState } from '@wordpress/element';
|
|
|
13
13
|
import GradientPicker from '..';
|
|
14
14
|
|
|
15
15
|
const meta: Meta< typeof GradientPicker > = {
|
|
16
|
-
title: 'Components/GradientPicker',
|
|
16
|
+
title: 'Components/Selection & Input/Color/GradientPicker',
|
|
17
|
+
id: 'components-gradientpicker',
|
|
17
18
|
component: GradientPicker,
|
|
18
19
|
parameters: {
|
|
19
20
|
controls: { expanded: true },
|
|
@@ -36,7 +36,7 @@ type GradientPickerBaseProps = {
|
|
|
36
36
|
clearable?: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* The heading level. Only applies in cases where gradients are provided
|
|
39
|
-
* from multiple origins (
|
|
39
|
+
* from multiple origins (i.e. when the array passed as the `gradients` prop
|
|
40
40
|
* contains two or more items).
|
|
41
41
|
*
|
|
42
42
|
* @default 2
|
|
@@ -58,19 +58,17 @@ type GradientPickerBaseProps = {
|
|
|
58
58
|
loop?: boolean;
|
|
59
59
|
} & (
|
|
60
60
|
| {
|
|
61
|
+
// TODO: [#54055] Either this or `aria-labelledby` should be required
|
|
61
62
|
/**
|
|
62
63
|
* A label to identify the purpose of the control.
|
|
63
|
-
*
|
|
64
|
-
* @todo [#54055] Either this or `aria-labelledby` should be required
|
|
65
64
|
*/
|
|
66
65
|
'aria-label'?: string;
|
|
67
66
|
'aria-labelledby'?: never;
|
|
68
67
|
}
|
|
69
68
|
| {
|
|
69
|
+
// TODO: [#54055] Either this or `aria-label` should be required
|
|
70
70
|
/**
|
|
71
71
|
* An ID of an element to provide a label for the control.
|
|
72
|
-
*
|
|
73
|
-
* @todo [#54055] Either this or `aria-label` should be required
|
|
74
72
|
*/
|
|
75
73
|
'aria-labelledby'?: string;
|
|
76
74
|
'aria-label'?: never;
|
package/src/guide/style.scss
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
.components-guide__container {
|
|
38
38
|
display: flex;
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
justify-content: space-between;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
min-height: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
.components-guide__page {
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-direction: column;
|
|
48
48
|
justify-content: center;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
.components-guide__footer {
|
|
57
57
|
align-content: center;
|
|
58
58
|
display: flex;
|
|
59
59
|
height: $button-size;
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
width: 100%;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
.components-guide__page-control {
|
|
68
68
|
margin: 0;
|
|
69
69
|
text-align: center;
|
|
70
70
|
|
|
@@ -74,8 +74,6 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.components-button {
|
|
77
|
-
height: 30px;
|
|
78
|
-
min-width: 20px;
|
|
79
77
|
margin: -6px 0;
|
|
80
78
|
color: $gray-200;
|
|
81
79
|
}
|
|
@@ -42,7 +42,8 @@ const JUSTIFICATIONS = {
|
|
|
42
42
|
|
|
43
43
|
const meta: Meta< typeof HStack > = {
|
|
44
44
|
component: HStack,
|
|
45
|
-
title: 'Components (Experimental)/HStack',
|
|
45
|
+
title: 'Components (Experimental)/Layout/HStack',
|
|
46
|
+
id: 'components-experimental-hstack',
|
|
46
47
|
argTypes: {
|
|
47
48
|
as: {
|
|
48
49
|
control: { type: null },
|
|
@@ -10,7 +10,8 @@ import { Heading } from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof Heading > = {
|
|
12
12
|
component: Heading,
|
|
13
|
-
title: 'Components (Experimental)/Heading',
|
|
13
|
+
title: 'Components (Experimental)/Typography/Heading',
|
|
14
|
+
id: 'components-experimental-heading',
|
|
14
15
|
argTypes: {
|
|
15
16
|
as: { control: { type: 'text' } },
|
|
16
17
|
color: { control: { type: 'color' } },
|
|
@@ -22,8 +22,18 @@ const MyComponentWithConstrainedTabbing = () => {
|
|
|
22
22
|
const [ isConstrainedTabbing, setIsConstrainedTabbing ] = useState( false );
|
|
23
23
|
let form = (
|
|
24
24
|
<form>
|
|
25
|
-
<TextControl
|
|
26
|
-
|
|
25
|
+
<TextControl
|
|
26
|
+
__next40pxDefaultSize
|
|
27
|
+
__nextHasNoMarginBottom
|
|
28
|
+
label="Input 1"
|
|
29
|
+
onChange={ () => {} }
|
|
30
|
+
/>
|
|
31
|
+
<TextControl
|
|
32
|
+
__next40pxDefaultSize
|
|
33
|
+
__nextHasNoMarginBottom
|
|
34
|
+
label="Input 2"
|
|
35
|
+
onChange={ () => {} }
|
|
36
|
+
/>
|
|
27
37
|
</form>
|
|
28
38
|
);
|
|
29
39
|
if ( isConstrainedTabbing ) {
|
|
@@ -43,5 +53,5 @@ const MyComponentWithConstrainedTabbing = () => {
|
|
|
43
53
|
</Button>
|
|
44
54
|
</div>
|
|
45
55
|
);
|
|
46
|
-
}
|
|
56
|
+
};
|
|
47
57
|
```
|
|
@@ -13,7 +13,12 @@ import { withFocusReturn, TextControl, Button } from '@wordpress/components';
|
|
|
13
13
|
const EnhancedComponent = withFocusReturn( () => (
|
|
14
14
|
<div>
|
|
15
15
|
Focus will return to the previous input when this component is unmounted
|
|
16
|
-
<TextControl
|
|
16
|
+
<TextControl
|
|
17
|
+
__nextHasNoMarginBottom
|
|
18
|
+
__next40pxDefaultSize
|
|
19
|
+
autoFocus={ true }
|
|
20
|
+
onChange={ () => {} }
|
|
21
|
+
/>
|
|
17
22
|
</div>
|
|
18
23
|
) );
|
|
19
24
|
|
|
@@ -27,6 +32,8 @@ const MyComponentWithFocusReturn = () => {
|
|
|
27
32
|
return (
|
|
28
33
|
<div>
|
|
29
34
|
<TextControl
|
|
35
|
+
__nextHasNoMarginBottom
|
|
36
|
+
__next40pxDefaultSize
|
|
30
37
|
placeholder="Type something"
|
|
31
38
|
value={ text }
|
|
32
39
|
onChange={ ( value ) => setText( value ) }
|
|
@@ -39,7 +46,7 @@ const MyComponentWithFocusReturn = () => {
|
|
|
39
46
|
) }
|
|
40
47
|
</div>
|
|
41
48
|
);
|
|
42
|
-
}
|
|
49
|
+
};
|
|
43
50
|
```
|
|
44
51
|
|
|
45
52
|
`withFocusReturn` can optionally be called as a higher-order function creator. Provided an options object, a new higher-order function is returned.
|
|
@@ -16,7 +16,8 @@ import { InputControlSuffixWrapper } from '../input-suffix-wrapper';
|
|
|
16
16
|
import Button from '../../button';
|
|
17
17
|
|
|
18
18
|
const meta: Meta< typeof InputControl > = {
|
|
19
|
-
title: 'Components (Experimental)/InputControl',
|
|
19
|
+
title: 'Components (Experimental)/Selection & Input/InputControl',
|
|
20
|
+
id: 'components-experimental-inputcontrol',
|
|
20
21
|
component: InputControl,
|
|
21
22
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
22
23
|
subcomponents: { InputControlPrefixWrapper, InputControlSuffixWrapper },
|
|
@@ -22,7 +22,8 @@ import { createSlotFill, Provider as SlotFillProvider } from '../../slot-fill';
|
|
|
22
22
|
import { ContextSystemProvider } from '../../context';
|
|
23
23
|
|
|
24
24
|
const meta: Meta< typeof Menu > = {
|
|
25
|
-
|
|
25
|
+
id: 'components-experimental-menu',
|
|
26
|
+
title: 'Components (Experimental)/Actions/Menu',
|
|
26
27
|
component: Menu,
|
|
27
28
|
subcomponents: {
|
|
28
29
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
package/src/menu/styles.ts
CHANGED
|
@@ -380,7 +380,7 @@ export const MenuItemHelpText = styled( Truncate )`
|
|
|
380
380
|
font-size: ${ font( 'helpText.fontSize' ) };
|
|
381
381
|
line-height: 16px;
|
|
382
382
|
color: ${ LIGHTER_TEXT_COLOR };
|
|
383
|
-
|
|
383
|
+
overflow-wrap: anywhere;
|
|
384
384
|
|
|
385
385
|
[data-active-item]:not( [data-focus-visible] )
|
|
386
386
|
*:not( ${ MenuPopoverInnerWrapper } )
|
|
@@ -16,8 +16,9 @@ import MenuItemsChoice from '../../menu-items-choice';
|
|
|
16
16
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
17
17
|
|
|
18
18
|
const meta: Meta< typeof MenuGroup > = {
|
|
19
|
-
title: 'Components/MenuGroup',
|
|
19
|
+
title: 'Components/Actions/MenuGroup',
|
|
20
20
|
component: MenuGroup,
|
|
21
|
+
id: 'components-menugroup',
|
|
21
22
|
argTypes: {
|
|
22
23
|
children: { control: { type: null } },
|
|
23
24
|
},
|