@wordpress/components 28.12.0 → 28.13.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 +45 -1
- package/CONTRIBUTING.md +16 -16
- 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/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/index.js +13 -13
- package/build/box-control/index.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/box-control/types.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-actions.js +1 -0
- package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +1 -0
- package/build/circular-option-picker/circular-option-picker-option.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/custom-gradient-picker/gradient-bar/control-points.js +2 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.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 +3 -1
- package/build/form-file-upload/index.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/icon/index.js +9 -0
- package/build/icon/index.js.map +1 -1
- package/build/menu/styles.js +16 -16
- package/build/menu/styles.js.map +1 -1
- package/build/modal/index.js +2 -2
- package/build/modal/index.js.map +1 -1
- package/build/private-apis.js +0 -2
- package/build/private-apis.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/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 +9 -0
- 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/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/index.js +13 -13
- package/build-module/box-control/index.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/box-control/types.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-actions.js +1 -0
- package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +1 -0
- package/build-module/circular-option-picker/circular-option-picker-option.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/custom-gradient-picker/gradient-bar/control-points.js +2 -0
- package/build-module/custom-gradient-picker/gradient-bar/control-points.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 +3 -1
- package/build-module/form-file-upload/index.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/icon/index.js +9 -0
- package/build-module/icon/index.js.map +1 -1
- package/build-module/menu/styles.js +16 -16
- package/build-module/menu/styles.js.map +1 -1
- package/build-module/modal/index.js +2 -2
- package/build-module/modal/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/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/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 +9 -0
- 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 +3 -10
- package/build-style/style.css +3 -10
- 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/index.d.ts +13 -13
- 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/box-control/types.d.ts +2 -0
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/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/custom-gradient-picker/gradient-bar/control-points.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-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-picker.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/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/h-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/icon/index.d.ts +23 -7
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +7 -1
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/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/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/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.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/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/textarea-control/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/tree-select/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 +2 -1
- 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 +2 -2
- 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/types.ts +7 -0
- package/src/box-control/README.md +79 -60
- package/src/box-control/all-input-control.tsx +1 -0
- package/src/box-control/axial-input-controls.tsx +1 -0
- package/src/box-control/docs-manifest.json +5 -0
- package/src/box-control/index.tsx +13 -13
- package/src/box-control/input-controls.tsx +1 -0
- package/src/box-control/types.ts +2 -0
- package/src/checkbox-control/stories/index.story.tsx +2 -1
- package/src/circular-option-picker/circular-option-picker-actions.tsx +1 -0
- package/src/circular-option-picker/circular-option-picker-option.tsx +1 -0
- package/src/circular-option-picker/stories/index.story.tsx +2 -1
- package/src/circular-option-picker/style.scss +2 -2
- 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/custom-gradient-picker/gradient-bar/control-points.tsx +2 -0
- package/src/custom-gradient-picker/stories/index.story.tsx +2 -1
- package/src/custom-gradient-picker/style.scss +1 -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-menu/stories/index.story.tsx +2 -1
- package/src/duotone-picker/duotone-picker.tsx +2 -0
- 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 +9 -3
- package/src/form-file-upload/stories/index.story.tsx +2 -1
- package/src/form-token-field/stories/index.story.tsx +2 -1
- 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/h-stack/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/icon/README.md +22 -65
- package/src/icon/docs-manifest.json +5 -0
- package/src/icon/index.tsx +28 -13
- package/src/icon/stories/index.story.tsx +50 -8
- package/src/input-control/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/stories/index.story.tsx +2 -1
- 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 +1 -1
- package/src/number-control/stories/index.story.tsx +2 -1
- package/src/placeholder/stories/index.story.tsx +1 -0
- package/src/private-apis.ts +0 -2
- package/src/radio-control/stories/index.story.tsx +2 -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/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/textarea-control/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 +10 -0
- 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/tree-select/stories/index.story.tsx +2 -1
- package/src/unit-control/stories/index.story.tsx +2 -1
- package/src/utils/deprecated-36px-size.ts +3 -0
- package/src/v-stack/stories/index.story.tsx +2 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -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;
|
|
@@ -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 },
|
|
@@ -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.
|
package/src/icon/README.md
CHANGED
|
@@ -1,82 +1,39 @@
|
|
|
1
1
|
# Icon
|
|
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-icon--docs">WordPress Storybook</a> for more detailed, interactive documentation.</p>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Renders a raw icon without any initial styling or wrappers.
|
|
8
8
|
|
|
9
9
|
```jsx
|
|
10
|
-
import {
|
|
10
|
+
import { wordpress } from '@wordpress/icons';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
<Icon icon={ wordpress } />
|
|
13
13
|
```
|
|
14
|
-
|
|
15
|
-
#### With a function
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
import { Icon } from '@wordpress/components';
|
|
19
|
-
|
|
20
|
-
const MyIcon = () => (
|
|
21
|
-
<Icon
|
|
22
|
-
icon={ () => (
|
|
23
|
-
<svg>
|
|
24
|
-
<path d="M5 4v3h5.5v12h3V7H19V4z" />
|
|
25
|
-
</svg>
|
|
26
|
-
) }
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
#### With a Component
|
|
32
|
-
|
|
33
|
-
```jsx
|
|
34
|
-
import { MyIconComponent } from '../my-icon-component';
|
|
35
|
-
import { Icon } from '@wordpress/components';
|
|
36
|
-
|
|
37
|
-
const MyIcon = () => <Icon icon={ MyIconComponent } />;
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
#### With an SVG
|
|
41
|
-
|
|
42
|
-
```jsx
|
|
43
|
-
import { Icon } from '@wordpress/components';
|
|
44
|
-
|
|
45
|
-
const MyIcon = () => (
|
|
46
|
-
<Icon
|
|
47
|
-
icon={
|
|
48
|
-
<svg>
|
|
49
|
-
<path d="M5 4v3h5.5v12h3V7H19V4z" />
|
|
50
|
-
</svg>
|
|
51
|
-
}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
#### Specifying a className
|
|
57
|
-
|
|
58
|
-
```jsx
|
|
59
|
-
import { Icon } from '@wordpress/components';
|
|
60
|
-
|
|
61
|
-
const MyIcon = () => <Icon icon="screenoptions" className="example-class" />;
|
|
62
|
-
```
|
|
63
|
-
|
|
64
14
|
## Props
|
|
65
15
|
|
|
66
|
-
|
|
16
|
+
### `icon`
|
|
67
17
|
|
|
68
|
-
|
|
18
|
+
The icon to render. In most cases, you should use an icon from
|
|
19
|
+
[the `@wordpress/icons` package](https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library).
|
|
69
20
|
|
|
70
|
-
|
|
21
|
+
Other supported values are: component instances, functions,
|
|
22
|
+
[Dashicons](https://developer.wordpress.org/resource/dashicons/)
|
|
23
|
+
(specified as strings), and `null`.
|
|
71
24
|
|
|
72
|
-
|
|
73
|
-
- Required: No
|
|
74
|
-
- Default: `null`
|
|
25
|
+
The `size` value, as well as any other additional props, will be passed through.
|
|
75
26
|
|
|
76
|
-
|
|
27
|
+
- Type: `IconType`
|
|
28
|
+
- Required: No
|
|
29
|
+
- Default: `null`
|
|
30
|
+
|
|
31
|
+
### `size`
|
|
77
32
|
|
|
78
33
|
The size (width and height) of the icon.
|
|
79
34
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
35
|
+
Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.
|
|
36
|
+
|
|
37
|
+
- Type: `number`
|
|
38
|
+
- Required: No
|
|
39
|
+
- Default: `'string' === typeof icon ? 20 : 24`
|
package/src/icon/index.tsx
CHANGED
|
@@ -25,10 +25,22 @@ export type IconType =
|
|
|
25
25
|
| ( ( props: { size?: number } ) => JSX.Element )
|
|
26
26
|
| JSX.Element;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
type AdditionalProps< T > = T extends ComponentType< infer U >
|
|
29
|
+
? U
|
|
30
|
+
: T extends DashiconIconKey
|
|
31
|
+
? SVGProps< SVGSVGElement >
|
|
32
|
+
: {};
|
|
33
|
+
|
|
34
|
+
export type Props = {
|
|
29
35
|
/**
|
|
30
|
-
* The icon to render.
|
|
31
|
-
*
|
|
36
|
+
* The icon to render. In most cases, you should use an icon from
|
|
37
|
+
* [the `@wordpress/icons` package](https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library).
|
|
38
|
+
*
|
|
39
|
+
* Other supported values are: component instances, functions,
|
|
40
|
+
* [Dashicons](https://developer.wordpress.org/resource/dashicons/)
|
|
41
|
+
* (specified as strings), and `null`.
|
|
42
|
+
*
|
|
43
|
+
* The `size` value, as well as any other additional props, will be passed through.
|
|
32
44
|
*
|
|
33
45
|
* @default null
|
|
34
46
|
*/
|
|
@@ -36,19 +48,22 @@ interface BaseProps {
|
|
|
36
48
|
/**
|
|
37
49
|
* The size (width and height) of the icon.
|
|
38
50
|
*
|
|
39
|
-
*
|
|
51
|
+
* Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.
|
|
52
|
+
*
|
|
53
|
+
* @default `'string' === typeof icon ? 20 : 24`.
|
|
40
54
|
*/
|
|
41
55
|
size?: number;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
type AdditionalProps< T > = T extends ComponentType< infer U >
|
|
45
|
-
? U
|
|
46
|
-
: T extends DashiconIconKey
|
|
47
|
-
? SVGProps< SVGSVGElement >
|
|
48
|
-
: {};
|
|
49
|
-
|
|
50
|
-
export type Props = BaseProps & AdditionalProps< IconType >;
|
|
56
|
+
} & AdditionalProps< IconType >;
|
|
51
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Renders a raw icon without any initial styling or wrappers.
|
|
60
|
+
*
|
|
61
|
+
* ```jsx
|
|
62
|
+
* import { wordpress } from '@wordpress/icons';
|
|
63
|
+
*
|
|
64
|
+
* <Icon icon={ wordpress } />
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
52
67
|
function Icon( {
|
|
53
68
|
icon = null,
|
|
54
69
|
size = 'string' === typeof icon ? 20 : 24,
|
|
@@ -47,26 +47,68 @@ FillColor.args = {
|
|
|
47
47
|
...Default.args,
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* When `icon` is a function, it will be passed the `size` prop and any other additional props.
|
|
52
|
+
*/
|
|
50
53
|
export const WithAFunction = Template.bind( {} );
|
|
51
54
|
WithAFunction.args = {
|
|
52
55
|
...Default.args,
|
|
53
|
-
icon: () => (
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
icon: ( { size }: { size?: number } ) => (
|
|
57
|
+
<img
|
|
58
|
+
width={ size }
|
|
59
|
+
height={ size }
|
|
60
|
+
src="https://s.w.org/style/images/about/WordPress-logotype-wmark.png"
|
|
61
|
+
alt="WordPress"
|
|
62
|
+
/>
|
|
57
63
|
),
|
|
58
64
|
};
|
|
65
|
+
WithAFunction.parameters = {
|
|
66
|
+
docs: {
|
|
67
|
+
source: {
|
|
68
|
+
code: `
|
|
69
|
+
<Icon
|
|
70
|
+
icon={ ( { size } ) => (
|
|
71
|
+
<img
|
|
72
|
+
width={ size }
|
|
73
|
+
height={ size }
|
|
74
|
+
src="https://s.w.org/style/images/about/WordPress-logotype-wmark.png"
|
|
75
|
+
alt="WordPress"
|
|
76
|
+
/>
|
|
77
|
+
) }
|
|
78
|
+
/>
|
|
79
|
+
`,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
59
83
|
|
|
60
|
-
const MyIconComponent = () => (
|
|
61
|
-
<SVG>
|
|
84
|
+
const MyIconComponent = ( { size }: { size?: number } ) => (
|
|
85
|
+
<SVG width={ size } height={ size }>
|
|
62
86
|
<Path d="M5 4v3h5.5v12h3V7H19V4z" />
|
|
63
87
|
</SVG>
|
|
64
88
|
);
|
|
65
89
|
|
|
90
|
+
/**
|
|
91
|
+
* When `icon` is a component, it will be passed the `size` prop and any other additional props.
|
|
92
|
+
*/
|
|
66
93
|
export const WithAComponent = Template.bind( {} );
|
|
67
94
|
WithAComponent.args = {
|
|
68
95
|
...Default.args,
|
|
69
|
-
icon: MyIconComponent
|
|
96
|
+
icon: <MyIconComponent />,
|
|
97
|
+
};
|
|
98
|
+
WithAComponent.parameters = {
|
|
99
|
+
docs: {
|
|
100
|
+
source: {
|
|
101
|
+
code: `
|
|
102
|
+
const MyIconComponent = ( { size } ) => (
|
|
103
|
+
<SVG width={ size } height={ size }>
|
|
104
|
+
<Path d="M5 4v3h5.5v12h3V7H19V4z" />
|
|
105
|
+
</SVG>
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
<Icon icon={ <MyIconComponent /> } />
|
|
109
|
+
`,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
70
112
|
};
|
|
71
113
|
|
|
72
114
|
export const WithAnSVG = Template.bind( {} );
|
|
@@ -80,7 +122,7 @@ WithAnSVG.args = {
|
|
|
80
122
|
};
|
|
81
123
|
|
|
82
124
|
/**
|
|
83
|
-
* Although it's preferred to use icons from the `@wordpress/icons` package, Dashicons are still supported,
|
|
125
|
+
* Although it's preferred to use icons from the `@wordpress/icons` package, [Dashicons](https://developer.wordpress.org/resource/dashicons/) are still supported,
|
|
84
126
|
* as long as you are in a context where the Dashicons stylesheet is loaded. To simulate that here,
|
|
85
127
|
* use the Global CSS Injector in the Storybook toolbar at the top and select the "WordPress" preset.
|
|
86
128
|
*/
|
|
@@ -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 },
|
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
|
},
|
|
@@ -17,7 +17,8 @@ import Shortcut from '../../shortcut';
|
|
|
17
17
|
|
|
18
18
|
const meta: Meta< typeof MenuItem > = {
|
|
19
19
|
component: MenuItem,
|
|
20
|
-
title: 'Components/MenuItem',
|
|
20
|
+
title: 'Components/Actions/MenuItem',
|
|
21
|
+
id: 'components-menuitem',
|
|
21
22
|
argTypes: {
|
|
22
23
|
children: { control: { type: null } },
|
|
23
24
|
icon: {
|
|
@@ -16,7 +16,8 @@ import MenuGroup from '../../menu-group';
|
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof MenuItemsChoice > = {
|
|
18
18
|
component: MenuItemsChoice,
|
|
19
|
-
title: 'Components/MenuItemsChoice',
|
|
19
|
+
title: 'Components/Actions/MenuItemsChoice',
|
|
20
|
+
id: 'components-menuitemschoice',
|
|
20
21
|
argTypes: {
|
|
21
22
|
onHover: { action: 'onHover' },
|
|
22
23
|
onSelect: { action: 'onSelect' },
|
package/src/modal/index.tsx
CHANGED
|
@@ -335,10 +335,10 @@ function UnforwardedModal(
|
|
|
335
335
|
<>
|
|
336
336
|
<Spacer
|
|
337
337
|
marginBottom={ 0 }
|
|
338
|
-
marginLeft={
|
|
338
|
+
marginLeft={ 2 }
|
|
339
339
|
/>
|
|
340
340
|
<Button
|
|
341
|
-
size="
|
|
341
|
+
size="compact"
|
|
342
342
|
onClick={ (
|
|
343
343
|
event: React.MouseEvent< HTMLButtonElement >
|
|
344
344
|
) =>
|
|
@@ -111,7 +111,7 @@ export const WithHeaderActions: StoryFn< typeof Modal > = Template.bind( {} );
|
|
|
111
111
|
WithHeaderActions.args = {
|
|
112
112
|
...Default.args,
|
|
113
113
|
headerActions: (
|
|
114
|
-
<Button icon={ fullscreen } label="Fullscreen mode" size="
|
|
114
|
+
<Button icon={ fullscreen } label="Fullscreen mode" size="compact" />
|
|
115
115
|
),
|
|
116
116
|
children: <div style={ { height: '200px' } } />,
|
|
117
117
|
};
|
|
@@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
import NumberControl from '..';
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof NumberControl > = {
|
|
17
|
-
title: 'Components (Experimental)/NumberControl',
|
|
17
|
+
title: 'Components (Experimental)/Selection & Input/NumberControl',
|
|
18
|
+
id: 'components-experimental-numbercontrol',
|
|
18
19
|
component: NumberControl,
|
|
19
20
|
argTypes: {
|
|
20
21
|
onChange: { action: 'onChange' },
|
package/src/private-apis.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';
|
|
5
|
-
import { createPrivateSlotFill } from './slot-fill';
|
|
6
5
|
import { Menu } from './menu';
|
|
7
6
|
import { ComponentsContext } from './context/context-system-provider';
|
|
8
7
|
import Theme from './theme';
|
|
@@ -13,7 +12,6 @@ import { lock } from './lock-unlock';
|
|
|
13
12
|
export const privateApis = {};
|
|
14
13
|
lock( privateApis, {
|
|
15
14
|
__experimentalPopoverLegacyPositionToPlacement,
|
|
16
|
-
createPrivateSlotFill,
|
|
17
15
|
ComponentsContext,
|
|
18
16
|
Tabs,
|
|
19
17
|
Theme,
|
|
@@ -15,7 +15,8 @@ import RadioControl from '..';
|
|
|
15
15
|
|
|
16
16
|
const meta: Meta< typeof RadioControl > = {
|
|
17
17
|
component: RadioControl,
|
|
18
|
-
title: 'Components/RadioControl',
|
|
18
|
+
title: 'Components/Selection & Input/Common/RadioControl',
|
|
19
|
+
id: 'components-radiocontrol',
|
|
19
20
|
argTypes: {
|
|
20
21
|
onChange: {
|
|
21
22
|
action: 'onChange',
|
|
@@ -88,9 +88,10 @@ import { RangeControl } from '@wordpress/components';
|
|
|
88
88
|
const MyRangeControl = () => {
|
|
89
89
|
const [ columns, setColumns ] = useState( 2 );
|
|
90
90
|
|
|
91
|
-
return(
|
|
91
|
+
return (
|
|
92
92
|
<RangeControl
|
|
93
93
|
__nextHasNoMarginBottom
|
|
94
|
+
__next40pxDefaultSize
|
|
94
95
|
label="Columns"
|
|
95
96
|
value={ columns }
|
|
96
97
|
onChange={ ( value ) => setColumns( value ) }
|
|
@@ -153,7 +154,6 @@ Disables the `input`, preventing new values from being applied.
|
|
|
153
154
|
- Required: No
|
|
154
155
|
- Platform: Web
|
|
155
156
|
|
|
156
|
-
|
|
157
157
|
### `help`: `string|Element`
|
|
158
158
|
|
|
159
159
|
If this property is added, a help text will be generated using help property as the content.
|
|
@@ -165,7 +165,7 @@ If this property is added, a help text will be generated using help property as
|
|
|
165
165
|
|
|
166
166
|
Provides control over whether the label will only be visible to screen readers.
|
|
167
167
|
|
|
168
|
-
-
|
|
168
|
+
- Required: No
|
|
169
169
|
|
|
170
170
|
### `icon`: `string`
|
|
171
171
|
|
|
@@ -334,6 +334,7 @@ The minimum amount by which `value` changes. It is also a factor in validation a
|
|
|
334
334
|
|
|
335
335
|
- Required: No
|
|
336
336
|
- Platform: Web
|
|
337
|
+
|
|
337
338
|
### `trackColor`: `CSSProperties[ 'color' ]`
|
|
338
339
|
|
|
339
340
|
CSS color string to customize the track element's background.
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
import type { RangeControlProps } from './types';
|
|
39
39
|
import type { WordPressComponentProps } from '../context';
|
|
40
40
|
import { space } from '../utils/space';
|
|
41
|
+
import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
|
|
41
42
|
|
|
42
43
|
const noop = () => {};
|
|
43
44
|
|
|
@@ -96,6 +97,7 @@ function UnforwardedRangeControl(
|
|
|
96
97
|
trackColor,
|
|
97
98
|
value: valueProp,
|
|
98
99
|
withInputField = true,
|
|
100
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
99
101
|
...otherProps
|
|
100
102
|
} = props;
|
|
101
103
|
|
|
@@ -229,6 +231,14 @@ function UnforwardedRangeControl(
|
|
|
229
231
|
[ isRTL() ? 'right' : 'left' ]: fillValueOffset,
|
|
230
232
|
};
|
|
231
233
|
|
|
234
|
+
// Add default size deprecation warning.
|
|
235
|
+
maybeWarnDeprecated36pxSize( {
|
|
236
|
+
componentName: 'RangeControl',
|
|
237
|
+
__next40pxDefaultSize,
|
|
238
|
+
size: undefined,
|
|
239
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
240
|
+
} );
|
|
241
|
+
|
|
232
242
|
return (
|
|
233
243
|
<BaseControl
|
|
234
244
|
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
|
|
@@ -384,6 +394,7 @@ function UnforwardedRangeControl(
|
|
|
384
394
|
* return (
|
|
385
395
|
* <RangeControl
|
|
386
396
|
* __nextHasNoMarginBottom
|
|
397
|
+
* __next40pxDefaultSize
|
|
387
398
|
* help="Please select how transparent you would like this."
|
|
388
399
|
* initialPosition={50}
|
|
389
400
|
* label="Opacity"
|