@wordpress/components 21.2.0 → 22.0.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 +99 -3
- package/CONTRIBUTING.md +20 -0
- package/build/angle-picker-control/index.js +1 -1
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +28 -2
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +65 -15
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control/hook.js +11 -4
- package/build/border-box-control/border-box-control/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/hook.js +3 -3
- package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js +3 -3
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/hook.js +8 -11
- package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/hook.js +3 -7
- package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build/border-box-control/styles.js +34 -34
- package/build/border-box-control/styles.js.map +1 -1
- package/build/border-control/border-control/component.js +7 -4
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +12 -5
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/hook.js +5 -5
- package/build/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build/border-control/styles.js +19 -34
- package/build/border-control/styles.js.map +1 -1
- package/build/box-control/index.js +6 -2
- package/build/box-control/index.js.map +1 -1
- package/build/circular-option-picker/index.js +14 -14
- package/build/circular-option-picker/index.js.map +1 -1
- package/build/color-palette/index.js +83 -30
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/styles.js +3 -3
- package/build/color-palette/styles.js.map +1 -1
- package/build/color-palette/types.js +6 -0
- package/build/color-palette/types.js.map +1 -0
- package/build/color-picker/input-with-slider.js +1 -1
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +1 -3
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-select-control/index.js +8 -4
- package/build/custom-select-control/index.js.map +1 -1
- package/build/date-time/date-time/index.js +2 -0
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/time/index.js +4 -4
- package/build/date-time/time/index.js.map +1 -1
- package/build/disabled/index.js +14 -27
- package/build/disabled/index.js.map +1 -1
- package/build/external-link/index.js +13 -2
- package/build/external-link/index.js.map +1 -1
- package/build/focusable-iframe/index.js +0 -1
- package/build/focusable-iframe/index.js.map +1 -1
- package/build/font-size-picker/index.js +62 -49
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/styles.js +5 -13
- package/build/font-size-picker/styles.js.map +1 -1
- package/build/font-size-picker/utils.js +1 -22
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/form-file-upload/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +5 -5
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js +1 -1
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js +1 -7
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/index.js +15 -7
- package/build/index.js.map +1 -1
- package/build/input-control/index.js +2 -0
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +1 -1
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +21 -21
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/isolated-event-container/index.js +5 -9
- package/build/isolated-event-container/index.js.map +1 -1
- package/build/item-group/styles.js +10 -10
- package/build/item-group/styles.js.map +1 -1
- package/build/modal/aria-helper.js +2 -3
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +42 -11
- package/build/modal/index.js.map +1 -1
- package/build/modal/types.js +6 -0
- package/build/modal/types.js.map +1 -0
- package/build/navigator/index.js +8 -8
- package/build/navigator/index.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js +5 -4
- package/build/navigator/navigator-back-button/component.js.map +1 -1
- package/build/navigator/navigator-back-button/index.js +1 -1
- package/build/navigator/navigator-back-button/index.js.map +1 -1
- package/build/navigator/navigator-button/component.js +5 -4
- package/build/navigator/navigator-button/component.js.map +1 -1
- package/build/navigator/navigator-button/index.js +1 -1
- package/build/navigator/navigator-button/index.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +10 -7
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-provider/index.js +1 -1
- package/build/navigator/navigator-provider/index.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +11 -8
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/navigator-screen/index.js +1 -1
- package/build/navigator/navigator-screen/index.js.map +1 -1
- package/build/number-control/index.js +82 -22
- package/build/number-control/index.js.map +1 -1
- package/build/number-control/styles/number-control-styles.js +36 -6
- package/build/number-control/styles/number-control-styles.js.map +1 -1
- package/build/popover/index.js +15 -29
- package/build/popover/index.js.map +1 -1
- package/build/radio-group/index.js +7 -1
- package/build/radio-group/index.js.map +1 -1
- package/build/{radio → radio-group/radio}/index.js +7 -1
- package/build/radio-group/radio/index.js.map +1 -0
- package/build/{radio-context → radio-group/radio-context}/index.js +0 -0
- package/build/radio-group/radio-context/index.js.map +1 -0
- package/build/sandbox/index.js +55 -59
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +63 -62
- package/build/sandbox/index.native.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +9 -5
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +13 -8
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot.js +15 -9
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/fill.js +12 -4
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/use-slot.js +3 -1
- package/build/slot-fill/use-slot.js.map +1 -1
- package/build/snackbar/index.js +1 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/tab-panel/index.js +5 -9
- package/build/tab-panel/index.js.map +1 -1
- package/build/text-control/index.js +0 -2
- package/build/text-control/index.js.map +1 -1
- package/build/theme/index.js +62 -0
- package/build/theme/index.js.map +1 -0
- package/build/theme/styles.js +33 -0
- package/build/theme/styles.js.map +1 -0
- package/build/theme/types.js +6 -0
- package/build/theme/types.js.map +1 -0
- package/build/toggle-control/index.js +15 -3
- package/build/toggle-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-button-group.js +90 -0
- package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js +90 -0
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/component.js +21 -50
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +8 -8
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +39 -17
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +23 -23
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toolbar-dropdown-menu/index.js +1 -1
- package/build/toolbar-dropdown-menu/index.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +3 -3
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +6 -6
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tooltip/index.js +4 -1
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js +17 -4
- package/build/tooltip/index.native.js.map +1 -1
- package/build/ui/context/context-system-provider.js +9 -22
- package/build/ui/context/context-system-provider.js.map +1 -1
- package/build/unit-control/index.js +7 -9
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +15 -25
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/utils/config-values.js +0 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/hooks/use-update-effect.js +5 -1
- package/build/utils/hooks/use-update-effect.js.map +1 -1
- package/build-module/angle-picker-control/index.js +1 -1
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +29 -3
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +63 -13
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control/hook.js +11 -4
- package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/hook.js +3 -3
- package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js +3 -3
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/hook.js +9 -10
- package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-visualizer/hook.js +4 -6
- package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build-module/border-box-control/styles.js +26 -28
- package/build-module/border-box-control/styles.js.map +1 -1
- package/build-module/border-control/border-control/component.js +7 -4
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js +12 -5
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/hook.js +5 -5
- package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build-module/border-control/styles.js +20 -36
- package/build-module/border-control/styles.js.map +1 -1
- package/build-module/box-control/index.js +6 -2
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/circular-option-picker/index.js +14 -14
- package/build-module/circular-option-picker/index.js.map +1 -1
- package/build-module/color-palette/index.js +81 -28
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/styles.js +3 -3
- package/build-module/color-palette/styles.js.map +1 -1
- package/build-module/color-palette/types.js +2 -0
- package/build-module/color-palette/types.js.map +1 -0
- package/build-module/color-picker/input-with-slider.js +1 -1
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-select-control/index.js +8 -4
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/date-time/date-time/index.js +2 -0
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/time/index.js +4 -4
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/disabled/index.js +15 -27
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/external-link/index.js +13 -2
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/focusable-iframe/index.js +0 -1
- package/build-module/focusable-iframe/index.js.map +1 -1
- package/build-module/font-size-picker/index.js +66 -51
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/styles.js +5 -13
- package/build-module/font-size-picker/styles.js.map +1 -1
- package/build-module/font-size-picker/utils.js +1 -20
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +5 -5
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +2 -2
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js +1 -6
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/index.js +4 -3
- package/build-module/index.js.map +1 -1
- package/build-module/input-control/index.js +2 -0
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +1 -1
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +21 -21
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/isolated-event-container/index.js +7 -9
- package/build-module/isolated-event-container/index.js.map +1 -1
- package/build-module/item-group/styles.js +10 -10
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/modal/aria-helper.js +2 -3
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +44 -12
- package/build-module/modal/index.js.map +1 -1
- package/build-module/modal/types.js +2 -0
- package/build-module/modal/types.js.map +1 -0
- package/build-module/navigator/index.js +4 -4
- package/build-module/navigator/index.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js +3 -3
- package/build-module/navigator/navigator-back-button/component.js.map +1 -1
- package/build-module/navigator/navigator-back-button/index.js +1 -1
- package/build-module/navigator/navigator-back-button/index.js.map +1 -1
- package/build-module/navigator/navigator-button/component.js +3 -3
- package/build-module/navigator/navigator-button/component.js.map +1 -1
- package/build-module/navigator/navigator-button/index.js +1 -1
- package/build-module/navigator/navigator-button/index.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +8 -6
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-provider/index.js +1 -1
- package/build-module/navigator/navigator-provider/index.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +9 -7
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/index.js +1 -1
- package/build-module/navigator/navigator-screen/index.js.map +1 -1
- package/build-module/number-control/index.js +81 -26
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/number-control/styles/number-control-styles.js +30 -4
- package/build-module/number-control/styles/number-control-styles.js.map +1 -1
- package/build-module/popover/index.js +15 -29
- package/build-module/popover/index.js.map +1 -1
- package/build-module/radio-group/index.js +6 -1
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/{radio → radio-group/radio}/index.js +6 -1
- package/build-module/radio-group/radio/index.js.map +1 -0
- package/build-module/{radio-context → radio-group/radio-context}/index.js +0 -0
- package/build-module/radio-group/radio-context/index.js.map +1 -0
- package/build-module/sandbox/index.js +56 -59
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +54 -52
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +9 -5
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +13 -8
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +15 -9
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/fill.js +12 -4
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/use-slot.js +3 -1
- package/build-module/slot-fill/use-slot.js.map +1 -1
- package/build-module/snackbar/index.js +1 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/tab-panel/index.js +5 -9
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/text-control/index.js +0 -2
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/theme/index.js +52 -0
- package/build-module/theme/index.js.map +1 -0
- package/build-module/theme/styles.js +25 -0
- package/build-module/theme/styles.js.map +1 -0
- package/build-module/theme/types.js +2 -0
- package/build-module/theme/types.js.map +1 -0
- package/build-module/toggle-control/index.js +15 -3
- package/build-module/toggle-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +76 -0
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +75 -0
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/component.js +19 -49
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -6
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +39 -17
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +21 -18
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toolbar-dropdown-menu/index.js +1 -1
- package/build-module/toolbar-dropdown-menu/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +3 -3
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +6 -6
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tooltip/index.js +4 -1
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +17 -4
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/ui/context/context-system-provider.js +6 -20
- package/build-module/ui/context/context-system-provider.js.map +1 -1
- package/build-module/unit-control/index.js +8 -10
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +8 -24
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/utils/config-values.js +0 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/hooks/use-update-effect.js +5 -1
- package/build-module/utils/hooks/use-update-effect.js.map +1 -1
- package/build-style/style-rtl.css +45 -61
- package/build-style/style.css +43 -59
- package/build-types/base-field/hook.d.ts +11 -11
- package/build-types/border-box-control/border-box-control/component.d.ts +53 -4
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +14 -12
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -12
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +12 -12
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +12 -12
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.d.ts +17 -0
- package/build-types/border-box-control/stories/index.d.ts.map +1 -0
- package/build-types/border-box-control/styles.d.ts +7 -6
- package/build-types/border-box-control/styles.d.ts.map +1 -1
- package/build-types/border-box-control/types.d.ts +12 -16
- package/build-types/border-box-control/types.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +2 -1
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +14 -13
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +11 -11
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-style-picker/hook.d.ts +11 -11
- package/build-types/border-control/stories/index.d.ts +12 -6
- package/build-types/border-control/stories/index.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts +3 -3
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/border-control/types.d.ts +11 -9
- package/build-types/border-control/types.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +12 -12
- package/build-types/card/card-body/hook.d.ts +12 -12
- package/build-types/card/card-divider/hook.d.ts +13 -13
- package/build-types/card/card-footer/hook.d.ts +12 -12
- package/build-types/card/card-header/hook.d.ts +12 -12
- package/build-types/card/card-media/hook.d.ts +12 -12
- package/build-types/card/stories/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/index.d.ts +4 -24
- package/build-types/circular-option-picker/index.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts +33 -18
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.d.ts +21 -0
- package/build-types/color-palette/stories/index.d.ts.map +1 -0
- package/build-types/color-palette/styles.d.ts +3 -2
- package/build-types/color-palette/styles.d.ts.map +1 -1
- package/build-types/color-palette/test/index.d.ts +2 -0
- package/build-types/color-palette/test/index.d.ts.map +1 -0
- package/build-types/color-palette/types.d.ts +86 -0
- package/build-types/color-palette/types.d.ts.map +1 -0
- package/build-types/color-picker/styles.d.ts +5 -4
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts +4 -4
- package/build-types/confirm-dialog/types.d.ts +5 -1
- package/build-types/confirm-dialog/types.d.ts.map +1 -1
- package/build-types/custom-select-control/index.d.ts +1 -12
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control/styles.d.ts +3 -1
- package/build-types/custom-select-control/styles.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +3 -3
- package/build-types/date-time/date-time/index.d.ts +2 -0
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +3 -3
- package/build-types/date-time/stories/date-time.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +8 -4
- package/build-types/date-time/time/styles.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/elevation/hook.d.ts +12 -12
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
- package/build-types/external-link/test/index.d.ts +2 -0
- package/build-types/external-link/test/index.d.ts.map +1 -0
- package/build-types/flex/flex/hook.d.ts +12 -12
- package/build-types/flex/flex-block/hook.d.ts +12 -12
- package/build-types/flex/flex-item/hook.d.ts +12 -12
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -2
- package/build-types/focal-point-picker/styles/focal-point-style.d.ts +3 -3
- package/build-types/focusable-iframe/index.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/font-size-picker/types.d.ts +1 -1
- package/build-types/font-size-picker/utils.d.ts +0 -8
- package/build-types/font-size-picker/utils.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/types.d.ts +5 -4
- package/build-types/form-file-upload/types.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +12 -12
- package/build-types/h-stack/component.d.ts +1 -1
- package/build-types/h-stack/hook.d.ts +12 -12
- package/build-types/heading/hook.d.ts +12 -12
- package/build-types/input-control/index.d.ts +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts +5 -2
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +3 -8
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/input-control/utils.d.ts +1 -1
- package/build-types/isolated-event-container/index.d.ts +3 -2
- package/build-types/isolated-event-container/index.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +13 -13
- package/build-types/item-group/item-group/hook.d.ts +13 -13
- package/build-types/modal/aria-helper.d.ts +4 -4
- package/build-types/modal/aria-helper.d.ts.map +1 -1
- package/build-types/modal/index.d.ts +35 -2
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.d.ts +9 -0
- package/build-types/modal/stories/index.d.ts.map +1 -0
- package/build-types/modal/test/aria-helper.d.ts +2 -0
- package/build-types/modal/test/aria-helper.d.ts.map +1 -0
- package/build-types/modal/test/index.d.ts +2 -0
- package/build-types/modal/test/index.d.ts.map +1 -0
- package/build-types/modal/types.d.ts +134 -0
- package/build-types/modal/types.d.ts.map +1 -0
- package/build-types/navigator/index.d.ts +4 -4
- package/build-types/navigator/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +4 -2
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +14 -13
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/index.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +4 -2
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +14 -13
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/index.d.ts +1 -1
- package/build-types/navigator/navigator-button/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts +2 -2
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/index.d.ts +1 -1
- package/build-types/navigator/navigator-provider/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +2 -2
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/index.d.ts +1 -1
- package/build-types/navigator/navigator-screen/index.d.ts.map +1 -1
- package/build-types/navigator/stories/index.d.ts +9 -0
- package/build-types/navigator/stories/index.d.ts.map +1 -0
- package/build-types/navigator/test/index.d.ts +2 -0
- package/build-types/navigator/test/index.d.ts.map +1 -0
- package/build-types/navigator/types.d.ts +4 -1
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +2 -4
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +5 -0
- package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
- package/build-types/number-control/types.d.ts +12 -0
- package/build-types/number-control/types.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/stories/e2e/index.d.ts +1 -1
- package/build-types/popover/stories/index.d.ts +2 -0
- package/build-types/popover/stories/index.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +18 -14
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts +10 -0
- package/build-types/radio-group/index.d.ts.map +1 -0
- package/build-types/radio-group/radio/index.d.ts +7 -0
- package/build-types/radio-group/radio/index.d.ts.map +1 -0
- package/build-types/{radio-context → radio-group/radio-context}/index.d.ts +0 -0
- package/build-types/radio-group/radio-context/index.d.ts.map +1 -0
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +2 -1
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
- package/build-types/scrollable/hook.d.ts +12 -12
- package/build-types/search-control/index.d.ts +2 -2
- package/build-types/search-control/stories/index.d.ts +4 -4
- package/build-types/select-control/stories/index.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/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/use-slot.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +12 -12
- package/build-types/spinner/index.d.ts +1 -1
- package/build-types/surface/hook.d.ts +12 -12
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +12 -12
- package/build-types/text-control/index.d.ts +2 -4
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-control/stories/index.d.ts.map +1 -1
- package/build-types/theme/index.d.ts +31 -0
- package/build-types/theme/index.d.ts.map +1 -0
- package/build-types/theme/stories/index.d.ts +13 -0
- package/build-types/theme/stories/index.d.ts.map +1 -0
- package/build-types/theme/styles.d.ts +10 -0
- package/build-types/theme/styles.d.ts.map +1 -0
- package/build-types/theme/test/index.d.ts +2 -0
- package/build-types/theme/test/index.d.ts.map +1 -0
- package/build-types/theme/types.d.ts +21 -0
- package/build-types/theme/types.d.ts.map +1 -0
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/types.d.ts +2 -1
- package/build-types/toggle-control/types.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.d.ts +2 -2
- package/build-types/toggle-group-control/stories/index.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +6 -0
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +6 -0
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +4 -7
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
- package/build-types/toggle-group-control/types.d.ts +19 -14
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +12 -12
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +12 -12
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +12 -12
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +12 -12
- package/build-types/ui/context/context-system-provider.d.ts.map +1 -1
- package/build-types/ui/control-group/hook.d.ts +12 -12
- package/build-types/ui/control-label/component.d.ts +1 -1
- package/build-types/ui/control-label/hook.d.ts +12 -12
- package/build-types/ui/form-group/form-group.d.ts +4 -4
- package/build-types/ui/form-group/use-form-group.d.ts +28 -28
- package/build-types/unit-control/index.d.ts +2 -2
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -5
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +3 -3
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +0 -1
- package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
- package/build-types/utils/types.d.ts +0 -14
- package/build-types/utils/types.d.ts.map +1 -1
- package/build-types/v-stack/component.d.ts +2 -2
- package/build-types/v-stack/hook.d.ts +12 -12
- package/build-types/v-stack/stories/index.d.ts +2 -2
- package/package.json +17 -17
- package/src/angle-picker-control/index.js +1 -1
- package/src/angle-picker-control/stories/index.js +3 -0
- package/src/autocomplete/autocompleter-ui.js +29 -2
- package/src/autocomplete/test/index.js +89 -0
- package/src/base-field/test/index.js +4 -6
- package/src/border-box-control/border-box-control/README.md +8 -0
- package/src/border-box-control/border-box-control/component.tsx +66 -13
- package/src/border-box-control/border-box-control/hook.ts +11 -2
- package/src/border-box-control/border-box-control-linked-button/hook.ts +3 -6
- package/src/border-box-control/border-box-control-split-controls/component.tsx +3 -6
- package/src/border-box-control/border-box-control-split-controls/hook.ts +11 -14
- package/src/border-box-control/border-box-control-visualizer/hook.ts +4 -7
- package/src/border-box-control/stories/index.tsx +90 -0
- package/src/border-box-control/styles.ts +28 -22
- package/src/border-box-control/test/index.js +291 -121
- package/src/border-box-control/types.ts +12 -16
- package/src/border-control/border-control/README.md +14 -0
- package/src/border-control/border-control/component.tsx +6 -3
- package/src/border-control/border-control/hook.ts +10 -6
- package/src/border-control/border-control-dropdown/hook.ts +5 -7
- package/src/border-control/stories/index.tsx +12 -14
- package/src/border-control/styles.ts +20 -23
- package/src/border-control/test/index.js +139 -96
- package/src/border-control/types.ts +11 -9
- package/src/box-control/README.md +14 -0
- package/src/box-control/index.js +4 -0
- package/src/box-control/stories/index.js +8 -27
- package/src/button/README.md +2 -15
- package/src/button/stories/index.js +109 -178
- package/src/button/style.scss +40 -77
- package/src/button/test/index.js +3 -5
- package/src/card/stories/index.tsx +27 -31
- package/src/card/test/__snapshots__/index.tsx.snap +36 -35
- package/src/card/test/index.tsx +2 -6
- package/src/circular-option-picker/index.js +14 -20
- package/src/color-palette/README.md +51 -49
- package/src/color-palette/{index.js → index.tsx} +132 -51
- package/src/color-palette/stories/{index.js → index.tsx} +38 -27
- package/src/color-palette/style.scss +2 -2
- package/src/color-palette/{styles.js → styles.ts} +0 -0
- package/src/color-palette/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/color-palette/test/{index.js → index.tsx} +1 -1
- package/src/color-palette/types.ts +93 -0
- package/src/color-picker/input-with-slider.tsx +1 -1
- package/src/combobox-control/test/index.js +1 -1
- package/src/confirm-dialog/types.ts +6 -0
- package/src/custom-gradient-picker/gradient-bar/index.js +1 -3
- package/src/custom-select-control/README.md +14 -0
- package/src/custom-select-control/index.js +22 -15
- package/src/date-time/date-time/index.tsx +2 -0
- package/src/date-time/stories/date-time.tsx +4 -0
- package/src/date-time/time/index.tsx +4 -4
- package/src/date-time/time/test/index.tsx +2 -6
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -0
- package/src/disabled/README.md +2 -0
- package/src/disabled/index.tsx +19 -34
- package/src/disabled/test/index.tsx +9 -82
- package/src/dropdown/test/index.js +4 -3
- package/src/external-link/index.tsx +14 -6
- package/src/external-link/test/index.tsx +106 -0
- package/src/focusable-iframe/index.js +0 -1
- package/src/font-size-picker/README.md +3 -3
- package/src/font-size-picker/index.tsx +153 -143
- package/src/font-size-picker/styles.ts +3 -1
- package/src/font-size-picker/test/index.tsx +447 -174
- package/src/font-size-picker/test/utils.ts +6 -50
- package/src/font-size-picker/types.ts +1 -1
- package/src/font-size-picker/utils.ts +1 -23
- package/src/form-file-upload/README.md +1 -3
- package/src/form-file-upload/index.tsx +1 -0
- package/src/form-file-upload/test/index.tsx +1 -1
- package/src/form-file-upload/types.ts +5 -4
- package/src/form-toggle/test/__snapshots__/index.tsx.snap +15 -13
- package/src/form-toggle/test/index.tsx +1 -1
- package/src/form-token-field/suggestions-list.tsx +5 -5
- package/src/h-stack/test/__snapshots__/index.tsx.snap +36 -30
- package/src/h-stack/test/index.tsx +3 -3
- package/src/higher-order/with-fallback-styles/index.js +6 -2
- package/src/higher-order/with-filters/index.js +4 -9
- package/src/higher-order/with-focus-outside/test/index.js +44 -45
- package/src/higher-order/with-focus-return/test/index.js +34 -30
- package/src/higher-order/with-notices/test/index.js +1 -1
- package/src/index.js +4 -2
- package/src/input-control/index.tsx +2 -0
- package/src/input-control/input-base.tsx +3 -3
- package/src/input-control/styles/input-control-styles.tsx +1 -0
- package/src/input-control/test/index.js +2 -2
- package/src/input-control/types.ts +4 -11
- package/src/isolated-event-container/index.tsx +32 -0
- package/src/item-group/styles.ts +1 -1
- package/src/item-group/test/__snapshots__/index.js.snap +90 -85
- package/src/item-group/test/index.js +8 -18
- package/src/menu-item/test/index.js +0 -3
- package/src/mobile/bottom-sheet/test/range-cell.native.js +16 -14
- package/src/modal/README.md +53 -54
- package/src/modal/{aria-helper.js → aria-helper.ts} +5 -7
- package/src/modal/{index.js → index.tsx} +48 -12
- package/src/modal/stories/{index.js → index.tsx} +47 -42
- package/src/modal/test/{aria-helper.js → aria-helper.ts} +0 -0
- package/src/modal/test/{index.js → index.tsx} +13 -3
- package/src/modal/types.ts +144 -0
- package/src/navigation/test/index.js +1 -1
- package/src/navigator/index.ts +4 -4
- package/src/navigator/navigator-back-button/component.tsx +4 -4
- package/src/navigator/navigator-back-button/index.ts +1 -1
- package/src/navigator/navigator-button/component.tsx +4 -4
- package/src/navigator/navigator-button/index.ts +1 -1
- package/src/navigator/navigator-provider/component.tsx +6 -4
- package/src/navigator/navigator-provider/index.ts +1 -1
- package/src/navigator/navigator-screen/component.tsx +17 -6
- package/src/navigator/navigator-screen/index.ts +1 -1
- package/src/navigator/stories/index.tsx +210 -0
- package/src/navigator/test/index.tsx +509 -0
- package/src/navigator/types.ts +2 -0
- package/src/notice/test/__snapshots__/index.js.snap +39 -38
- package/src/notice/test/index.js +15 -36
- package/src/notice/test/list.js +6 -14
- package/src/number-control/README.md +9 -4
- package/src/number-control/index.tsx +100 -33
- package/src/number-control/styles/number-control-styles.js +26 -1
- package/src/number-control/test/index.js +53 -2
- package/src/number-control/types.ts +12 -0
- package/src/panel/test/body.js +2 -2
- package/src/placeholder/style.scss +5 -0
- package/src/popover/README.md +12 -7
- package/src/popover/index.tsx +20 -30
- package/src/popover/stories/index.tsx +29 -1
- package/src/popover/style.scss +9 -0
- package/src/popover/types.ts +18 -15
- package/src/radio-group/README.md +4 -0
- package/src/radio-group/index.js +6 -1
- package/src/{radio → radio-group/radio}/index.js +6 -1
- package/src/{radio-context → radio-group/radio-context}/index.js +0 -0
- package/src/radio-group/stories/index.js +11 -2
- package/src/sandbox/index.js +62 -47
- package/src/sandbox/index.native.js +72 -52
- package/src/sandbox/test/index.js +8 -11
- package/src/select-control/stories/index.tsx +9 -4
- package/src/shortcut/test/index.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/fill.js +5 -5
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +5 -3
- package/src/slot-fill/bubbles-virtually/slot.js +10 -8
- package/src/slot-fill/bubbles-virtually/use-slot.js +15 -9
- package/src/slot-fill/fill.js +12 -2
- package/src/slot-fill/use-slot.js +3 -0
- package/src/snackbar/index.js +1 -1
- package/src/style.scss +4 -0
- package/src/surface/test/__snapshots__/index.tsx.snap +58 -46
- package/src/surface/test/index.tsx +6 -16
- package/src/tab-panel/index.tsx +5 -9
- package/src/tab-panel/test/index.tsx +78 -1
- package/src/text/test/__snapshots__/index.tsx.snap +19 -15
- package/src/text/test/index.tsx +2 -2
- package/src/text-control/index.tsx +0 -2
- package/src/text-control/stories/index.tsx +5 -6
- package/src/text-highlight/test/index.tsx +1 -3
- package/src/theme/README.md +34 -0
- package/src/theme/index.tsx +51 -0
- package/src/theme/stories/index.tsx +47 -0
- package/src/theme/styles.ts +28 -0
- package/src/theme/test/index.tsx +101 -0
- package/src/theme/types.ts +21 -0
- package/src/toggle-control/README.md +6 -4
- package/src/toggle-control/index.tsx +13 -2
- package/src/toggle-control/types.ts +2 -4
- package/src/toggle-group-control/stories/index.tsx +4 -4
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +219 -160
- package/src/toggle-group-control/test/index.tsx +129 -2
- package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +103 -0
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +99 -0
- package/src/toggle-group-control/toggle-group-control/component.tsx +29 -74
- package/src/toggle-group-control/toggle-group-control/styles.ts +12 -10
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +49 -25
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +39 -19
- package/src/toggle-group-control/types.ts +75 -63
- package/src/toolbar/test/index.js +2 -2
- package/src/toolbar-dropdown-menu/index.js +1 -1
- package/src/toolbar-group/test/index.js +6 -10
- package/src/tools-panel/stories/index.js +0 -1
- package/src/tools-panel/stories/tools-panel-with-item-group-slot.js +0 -1
- package/src/tools-panel/test/index.js +4 -6
- package/src/tools-panel/tools-panel/hook.ts +2 -9
- package/src/tools-panel/tools-panel-item/hook.ts +17 -3
- package/src/tooltip/index.js +3 -0
- package/src/tooltip/index.native.js +15 -0
- package/src/tooltip/test/index.native.js +1 -2
- package/src/tree-grid/test/__snapshots__/cell.js.snap +20 -20
- package/src/tree-grid/test/__snapshots__/roving-tab-index-item.js.snap +17 -15
- package/src/tree-grid/test/__snapshots__/roving-tab-index.js.snap +3 -1
- package/src/tree-grid/test/__snapshots__/row.js.snap +33 -25
- package/src/tree-grid/test/cell.js +4 -4
- package/src/tree-grid/test/roving-tab-index-item.js +8 -8
- package/src/tree-grid/test/roving-tab-index.js +3 -3
- package/src/tree-grid/test/row.js +20 -16
- package/src/truncate/test/index.tsx +4 -4
- package/src/ui/context/context-system-provider.js +5 -18
- package/src/ui/context/test/__snapshots__/context-system-provider.js.snap +23 -17
- package/src/ui/context/test/context-system-provider.js +3 -3
- package/src/ui/control-group/test/__snapshots__/index.js.snap +18 -16
- package/src/ui/control-group/test/index.js +1 -1
- package/src/ui/control-label/test/__snapshots__/index.js.snap +27 -21
- package/src/ui/control-label/test/index.js +3 -3
- package/src/ui/form-group/test/__snapshots__/index.js.snap +34 -30
- package/src/ui/form-group/test/index.js +2 -2
- package/src/ui/shortcut/test/__snapshots__/index.js.snap +1 -1
- package/src/ui/shortcut/test/index.js +3 -2
- package/src/ui/spinner/test/__snapshots__/index.js.snap +75 -73
- package/src/ui/spinner/test/index.js +10 -13
- package/src/ui/tooltip/test/index.js +16 -14
- package/src/unit-control/index.tsx +29 -30
- package/src/unit-control/styles/unit-control-styles.ts +6 -12
- package/src/unit-control/test/utils.ts +43 -0
- package/src/unit-control/types.ts +5 -6
- package/src/utils/config-values.js +0 -1
- package/src/utils/hooks/use-update-effect.js +5 -1
- package/src/utils/theme-variables.scss +8 -0
- package/src/utils/types.ts +0 -15
- package/src/v-stack/test/__snapshots__/index.tsx.snap +36 -30
- package/src/v-stack/test/index.tsx +3 -3
- package/src/view/test/__snapshots__/index.js.snap +34 -24
- package/src/view/test/index.js +5 -5
- package/src/visually-hidden/README.md +4 -0
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/radio/index.js.map +0 -1
- package/build/radio-context/index.js.map +0 -1
- package/build-module/radio/index.js.map +0 -1
- package/build-module/radio-context/index.js.map +0 -1
- package/build-types/radio-context/index.d.ts.map +0 -1
- package/src/border-box-control/stories/index.js +0 -106
- package/src/form-file-upload/stories/index.js +0 -51
- package/src/isolated-event-container/index.js +0 -28
- package/src/navigator/stories/index.js +0 -194
- package/src/navigator/test/index.js +0 -472
- package/src/radio/stories/index.js +0 -20
package/src/button/README.md
CHANGED
|
@@ -127,7 +127,6 @@ Whether the button is disabled. If `true`, this will force a `button` element to
|
|
|
127
127
|
|
|
128
128
|
- Type: `Boolean`
|
|
129
129
|
- Required: No
|
|
130
|
-
- Default: `false`
|
|
131
130
|
|
|
132
131
|
#### href
|
|
133
132
|
|
|
@@ -135,7 +134,6 @@ If provided, renders `a` instead of `button`.
|
|
|
135
134
|
|
|
136
135
|
- Type: `String`
|
|
137
136
|
- Required: No
|
|
138
|
-
- Default: `undefined`
|
|
139
137
|
|
|
140
138
|
#### variant
|
|
141
139
|
|
|
@@ -143,7 +141,6 @@ Specifies the button's style. The accepted values are `'primary'` (the primary b
|
|
|
143
141
|
|
|
144
142
|
- Type: `String`
|
|
145
143
|
- Required: No
|
|
146
|
-
- Default: `undefined`
|
|
147
144
|
|
|
148
145
|
#### isDestructive
|
|
149
146
|
|
|
@@ -151,7 +148,6 @@ Renders a red text-based button style to indicate destructive behavior.
|
|
|
151
148
|
|
|
152
149
|
- Type: `Boolean`
|
|
153
150
|
- Required: No
|
|
154
|
-
- Default: `false`
|
|
155
151
|
|
|
156
152
|
#### isSmall
|
|
157
153
|
|
|
@@ -159,7 +155,6 @@ Decreases the size of the button.
|
|
|
159
155
|
|
|
160
156
|
- Type: `Boolean`
|
|
161
157
|
- Required: No
|
|
162
|
-
- Default: `false`
|
|
163
158
|
|
|
164
159
|
#### isPressed
|
|
165
160
|
|
|
@@ -167,7 +162,6 @@ Renders a pressed button style.
|
|
|
167
162
|
|
|
168
163
|
- Type: `Boolean`
|
|
169
164
|
- Required: No
|
|
170
|
-
- Default: `false`
|
|
171
165
|
|
|
172
166
|
#### isBusy
|
|
173
167
|
|
|
@@ -175,7 +169,6 @@ Indicates activity while a action is being performed.
|
|
|
175
169
|
|
|
176
170
|
- Type: `Boolean`
|
|
177
171
|
- Required: No
|
|
178
|
-
- Default: `false`
|
|
179
172
|
|
|
180
173
|
#### focus
|
|
181
174
|
|
|
@@ -183,7 +176,6 @@ Whether the button is focused.
|
|
|
183
176
|
|
|
184
177
|
- Type: `Boolean`
|
|
185
178
|
- Required: No
|
|
186
|
-
- Default: `false`
|
|
187
179
|
|
|
188
180
|
#### target
|
|
189
181
|
|
|
@@ -205,15 +197,13 @@ If provided, renders an [Icon](/packages/components/src/icon/README.md) componen
|
|
|
205
197
|
|
|
206
198
|
- Type: `String|Function|WPComponent|null`
|
|
207
199
|
- Required: No
|
|
208
|
-
- Default: `null`
|
|
209
200
|
|
|
210
201
|
#### iconSize
|
|
211
202
|
|
|
212
|
-
If provided with `icon`, sets the icon size.
|
|
203
|
+
If provided with `icon`, sets the icon size. Please refer to the [Icon](/packages/components/src/icon/README.md) component for more details regarding the default value of its `size` prop.
|
|
213
204
|
|
|
214
205
|
- Type: `Number`
|
|
215
206
|
- Required: No
|
|
216
|
-
- Default: `20 when a Dashicon is rendered, 24 for all other icons.`
|
|
217
207
|
|
|
218
208
|
#### iconPosition
|
|
219
209
|
|
|
@@ -236,15 +226,13 @@ If provided, renders a [Tooltip](/packages/components/src/tooltip/README.md) com
|
|
|
236
226
|
|
|
237
227
|
- Type: `Boolean`
|
|
238
228
|
- Required: No
|
|
239
|
-
- Default: `false`
|
|
240
229
|
|
|
241
230
|
#### tooltipPosition
|
|
242
231
|
|
|
243
|
-
If provided with`showTooltip`, sets the position of the tooltip.
|
|
232
|
+
If provided with`showTooltip`, sets the position of the tooltip. Please refer to the [Tooltip](/packages/components/src/tooltip/README.md) component for more details regarding the defaults.
|
|
244
233
|
|
|
245
234
|
- Type: `String`
|
|
246
235
|
- Require: No
|
|
247
|
-
- Default:`top center`
|
|
248
236
|
|
|
249
237
|
#### shortcut
|
|
250
238
|
|
|
@@ -252,7 +240,6 @@ If provided with `showTooltip`, appends the Shortcut label to the tooltip conten
|
|
|
252
240
|
|
|
253
241
|
- Type: `String|Object`
|
|
254
242
|
- Required: No
|
|
255
|
-
- Default: `undefined`
|
|
256
243
|
|
|
257
244
|
#### label
|
|
258
245
|
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { text, number, boolean } from '@storybook/addon-knobs';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
9
4
|
import {
|
|
10
5
|
formatBold,
|
|
11
6
|
formatItalic,
|
|
12
|
-
link
|
|
7
|
+
link,
|
|
13
8
|
more,
|
|
14
9
|
wordpress,
|
|
15
10
|
} from '@wordpress/icons';
|
|
@@ -23,142 +18,120 @@ import Button from '../';
|
|
|
23
18
|
export default {
|
|
24
19
|
title: 'Components/Button',
|
|
25
20
|
component: Button,
|
|
21
|
+
argTypes: {
|
|
22
|
+
label: {
|
|
23
|
+
control: { type: 'text' },
|
|
24
|
+
description:
|
|
25
|
+
'Sets the `aria-label` of the component, if none is provided. Sets the Tooltip content if `showTooltip` is provided.',
|
|
26
|
+
},
|
|
27
|
+
children: {
|
|
28
|
+
control: { type: 'text' },
|
|
29
|
+
},
|
|
30
|
+
href: {
|
|
31
|
+
control: { type: 'text' },
|
|
32
|
+
description: 'If provided, renders `a` instead of `button`.',
|
|
33
|
+
},
|
|
34
|
+
icon: {
|
|
35
|
+
control: { type: 'select' },
|
|
36
|
+
description:
|
|
37
|
+
'If provided, renders an `Icon` component inside the button.',
|
|
38
|
+
options: [ 'wordpress', 'link', 'more' ],
|
|
39
|
+
mapping: {
|
|
40
|
+
wordpress,
|
|
41
|
+
link,
|
|
42
|
+
more,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
iconSize: {
|
|
46
|
+
control: { type: 'number' },
|
|
47
|
+
description: 'If provided with `icon`, sets the icon size.',
|
|
48
|
+
},
|
|
49
|
+
iconPosition: {
|
|
50
|
+
control: { type: 'select' },
|
|
51
|
+
description:
|
|
52
|
+
'If provided with `icon`, sets the position of icon relative to the `text`. Available options are `left|right`.',
|
|
53
|
+
options: [ 'left', 'right' ],
|
|
54
|
+
table: {
|
|
55
|
+
defaultValue: { summary: `left` },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
isBusy: {
|
|
59
|
+
control: 'boolean',
|
|
60
|
+
description:
|
|
61
|
+
'Indicates activity while a action is being performed.',
|
|
62
|
+
},
|
|
63
|
+
isDestructive: {
|
|
64
|
+
control: 'boolean',
|
|
65
|
+
description:
|
|
66
|
+
'Renders a red text-based button style to indicate destructive behavior.',
|
|
67
|
+
},
|
|
68
|
+
isPressed: {
|
|
69
|
+
control: 'boolean',
|
|
70
|
+
description: 'Renders a pressed button style.',
|
|
71
|
+
},
|
|
72
|
+
isSmall: {
|
|
73
|
+
control: 'boolean',
|
|
74
|
+
description: 'Decreases the size of the button.',
|
|
75
|
+
},
|
|
76
|
+
disabled: {
|
|
77
|
+
control: 'boolean',
|
|
78
|
+
description:
|
|
79
|
+
'Whether the button is disabled. If `true`, this will force a `button` element to be rendered.',
|
|
80
|
+
},
|
|
81
|
+
shortcut: {
|
|
82
|
+
control: { type: 'text' },
|
|
83
|
+
description:
|
|
84
|
+
'If provided with `showTooltip`, appends the Shortcut label to the tooltip content. If an `Object` is provided, it should contain `display` and `ariaLabel` keys.',
|
|
85
|
+
},
|
|
86
|
+
showTooltip: {
|
|
87
|
+
control: 'boolean',
|
|
88
|
+
description:
|
|
89
|
+
'If provided, renders a `Tooltip` component for the button.',
|
|
90
|
+
},
|
|
91
|
+
tooltipPosition: {
|
|
92
|
+
control: { type: 'text' },
|
|
93
|
+
description:
|
|
94
|
+
'If provided with `showTooltip`, sets the position of the tooltip.',
|
|
95
|
+
},
|
|
96
|
+
text: {
|
|
97
|
+
control: { type: 'text' },
|
|
98
|
+
description:
|
|
99
|
+
'If provided, displays the given text inside the button. If the button contains `children` elements, the text is displayed before them.',
|
|
100
|
+
},
|
|
101
|
+
target: {
|
|
102
|
+
control: { type: 'text' },
|
|
103
|
+
description:
|
|
104
|
+
'If provided with `href`, sets the `target` attribute to the `a`.',
|
|
105
|
+
},
|
|
106
|
+
variant: {
|
|
107
|
+
control: { type: 'select' },
|
|
108
|
+
description: "Specifies the button's style.",
|
|
109
|
+
options: [ 'primary', 'secondary', 'tertiary', 'link' ],
|
|
110
|
+
},
|
|
111
|
+
__experimentalIsFocusable: {
|
|
112
|
+
control: 'boolean',
|
|
113
|
+
description: 'Makes the button focusable even when disabled',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
26
116
|
parameters: {
|
|
27
|
-
|
|
117
|
+
controls: { expanded: true },
|
|
118
|
+
docs: { source: { state: 'open' } },
|
|
28
119
|
},
|
|
29
120
|
};
|
|
30
121
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return <Button>{ label }</Button>;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const primary = () => {
|
|
38
|
-
const label = text( 'Label', 'Primary Button' );
|
|
39
|
-
|
|
40
|
-
return <Button variant="primary">{ label }</Button>;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const secondary = () => {
|
|
44
|
-
const label = text( 'Label', 'Secondary Button' );
|
|
45
|
-
|
|
46
|
-
return <Button variant="secondary">{ label }</Button>;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const tertiary = () => {
|
|
50
|
-
const label = text( 'Label', 'Tertiary Button' );
|
|
51
|
-
|
|
52
|
-
return <Button variant="tertiary">{ label }</Button>;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const isDestructive = () => {
|
|
56
|
-
const label = text( 'Label', 'Destructive Button' );
|
|
57
|
-
const isSmall = boolean( 'isSmall', false );
|
|
58
|
-
const disabled = boolean( 'disabled', false );
|
|
122
|
+
function Template( { children, ...props } ) {
|
|
123
|
+
return <Button { ...props }>{ children }</Button>;
|
|
124
|
+
}
|
|
59
125
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</Button>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const isPrimaryDestructive = () => {
|
|
68
|
-
const label = text( 'Label', 'Destructive Primary Button' );
|
|
69
|
-
const isSmall = boolean( 'isSmall', false );
|
|
70
|
-
const disabled = boolean( 'disabled', false );
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<Button
|
|
74
|
-
variant="primary"
|
|
75
|
-
isDestructive
|
|
76
|
-
isSmall={ isSmall }
|
|
77
|
-
disabled={ disabled }
|
|
78
|
-
>
|
|
79
|
-
{ label }
|
|
80
|
-
</Button>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const small = () => {
|
|
85
|
-
const label = text( 'Label', 'Small Button' );
|
|
86
|
-
|
|
87
|
-
return <Button isSmall>{ label }</Button>;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const pressed = () => {
|
|
91
|
-
const label = text( 'Label', 'Pressed Button' );
|
|
92
|
-
|
|
93
|
-
return <Button isPressed>{ label }</Button>;
|
|
126
|
+
export const Default = Template.bind( {} );
|
|
127
|
+
Default.args = {
|
|
128
|
+
children: 'Code is poetry',
|
|
94
129
|
};
|
|
95
130
|
|
|
96
|
-
export const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const disabledFocusable = () => {
|
|
103
|
-
const label = text( 'Label', 'Disabled Button' );
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<Button disabled __experimentalIsFocusable>
|
|
107
|
-
{ label }
|
|
108
|
-
</Button>
|
|
109
|
-
);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export const link = () => {
|
|
113
|
-
const label = text( 'Label', 'Link Button' );
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<Button href="https://wordpress.org/" target="_blank">
|
|
117
|
-
{ label }
|
|
118
|
-
</Button>
|
|
119
|
-
);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export const disabledLink = () => {
|
|
123
|
-
const label = text( 'Label', 'Disabled Link Button' );
|
|
124
|
-
|
|
125
|
-
return (
|
|
126
|
-
<Button href="https://wordpress.org/" target="_blank" disabled>
|
|
127
|
-
{ label }
|
|
128
|
-
</Button>
|
|
129
|
-
);
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export const destructiveLink = () => {
|
|
133
|
-
const label = text( 'Label', 'Destructive Link' );
|
|
134
|
-
|
|
135
|
-
return (
|
|
136
|
-
<Button isDestructive variant="link">
|
|
137
|
-
{ label }
|
|
138
|
-
</Button>
|
|
139
|
-
);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export const icon = () => {
|
|
143
|
-
const label = text( 'Label', 'Code is poetry' );
|
|
144
|
-
const size = number( 'Size', 24 );
|
|
145
|
-
|
|
146
|
-
return <Button icon={ wordpress } label={ label } iconSize={ size } />;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const disabledFocusableIcon = () => {
|
|
150
|
-
const label = text( 'Label', 'Code is poetry' );
|
|
151
|
-
const size = number( 'Size', 24 );
|
|
152
|
-
|
|
153
|
-
return (
|
|
154
|
-
<Button
|
|
155
|
-
icon={ wordpress }
|
|
156
|
-
label={ label }
|
|
157
|
-
iconSize={ size }
|
|
158
|
-
disabled
|
|
159
|
-
__experimentalIsFocusable
|
|
160
|
-
/>
|
|
161
|
-
);
|
|
131
|
+
export const Icon = Template.bind( {} );
|
|
132
|
+
Icon.args = {
|
|
133
|
+
label: 'Code is poetry',
|
|
134
|
+
icon: 'wordpress',
|
|
162
135
|
};
|
|
163
136
|
|
|
164
137
|
export const groupedIcons = () => {
|
|
@@ -170,49 +143,7 @@ export const groupedIcons = () => {
|
|
|
170
143
|
<GroupContainer>
|
|
171
144
|
<Button icon={ formatBold } label="Bold" />
|
|
172
145
|
<Button icon={ formatItalic } label="Italic" />
|
|
173
|
-
<Button icon={
|
|
146
|
+
<Button icon={ link } label="Link" />
|
|
174
147
|
</GroupContainer>
|
|
175
148
|
);
|
|
176
149
|
};
|
|
177
|
-
|
|
178
|
-
export const buttons = () => {
|
|
179
|
-
return (
|
|
180
|
-
<div style={ { padding: '20px' } }>
|
|
181
|
-
<h2>Small Buttons</h2>
|
|
182
|
-
<div className="story-buttons-container">
|
|
183
|
-
<Button isSmall>Button</Button>
|
|
184
|
-
<Button variant="primary" isSmall>
|
|
185
|
-
Primary Button
|
|
186
|
-
</Button>
|
|
187
|
-
<Button variant="secondary" isSmall>
|
|
188
|
-
Secondary Button
|
|
189
|
-
</Button>
|
|
190
|
-
<Button variant="tertiary" isSmall>
|
|
191
|
-
Tertiary Button
|
|
192
|
-
</Button>
|
|
193
|
-
<Button isSmall icon={ more } />
|
|
194
|
-
<Button isSmall variant="primary" icon={ more } />
|
|
195
|
-
<Button isSmall variant="secondary" icon={ more } />
|
|
196
|
-
<Button isSmall variant="tertiary" icon={ more } />
|
|
197
|
-
<Button isSmall variant="primary" icon={ more }>
|
|
198
|
-
Icon & Text
|
|
199
|
-
</Button>
|
|
200
|
-
</div>
|
|
201
|
-
|
|
202
|
-
<h2>Regular Buttons</h2>
|
|
203
|
-
<div className="story-buttons-container">
|
|
204
|
-
<Button>Button</Button>
|
|
205
|
-
<Button variant="primary">Primary Button</Button>
|
|
206
|
-
<Button variant="secondary">Secondary Button</Button>
|
|
207
|
-
<Button variant="tertiary">Tertiary Button</Button>
|
|
208
|
-
<Button icon={ more } />
|
|
209
|
-
<Button variant="primary" icon={ more } />
|
|
210
|
-
<Button variant="secondary" icon={ more } />
|
|
211
|
-
<Button variant="tertiary" icon={ more } />
|
|
212
|
-
<Button variant="primary" icon={ more }>
|
|
213
|
-
Icon & Text
|
|
214
|
-
</Button>
|
|
215
|
-
</div>
|
|
216
|
-
</div>
|
|
217
|
-
);
|
|
218
|
-
};
|
package/src/button/style.scss
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
&[aria-expanded="true"],
|
|
22
22
|
&:hover {
|
|
23
|
-
color:
|
|
23
|
+
color: $components-color-accent;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// Unset some hovers, instead of adding :not specificity.
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
// Focus.
|
|
32
32
|
// See https://github.com/WordPress/gutenberg/issues/13267 for more context on these selectors.
|
|
33
33
|
&:focus:not(:disabled) {
|
|
34
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus)
|
|
34
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
|
|
35
35
|
|
|
36
36
|
// Windows High Contrast mode will show this outline, but not the box-shadow.
|
|
37
37
|
outline: 3px solid transparent;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
&.is-primary {
|
|
45
45
|
white-space: nowrap;
|
|
46
|
-
background:
|
|
46
|
+
background: $components-color-accent;
|
|
47
47
|
color: $white;
|
|
48
48
|
text-decoration: none;
|
|
49
49
|
text-shadow: none;
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
outline: 1px solid transparent;
|
|
53
53
|
|
|
54
54
|
&:hover:not(:disabled) {
|
|
55
|
-
background:
|
|
55
|
+
background: $components-color-accent-darker-10;
|
|
56
56
|
color: $white;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
&:active:not(:disabled) {
|
|
60
|
-
background:
|
|
61
|
-
border-color:
|
|
60
|
+
background: $components-color-accent-darker-20;
|
|
61
|
+
border-color: $components-color-accent-darker-20;
|
|
62
62
|
color: $white;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
&:focus:not(:disabled) {
|
|
66
|
-
box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus)
|
|
66
|
+
box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&:disabled,
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
&[aria-disabled="true"]:enabled, // This catches a situation where a Button is aria-disabled, but not disabled.
|
|
73
73
|
&[aria-disabled="true"]:active:enabled {
|
|
74
74
|
color: rgba($white, 0.4);
|
|
75
|
-
background:
|
|
76
|
-
border-color:
|
|
75
|
+
background: $components-color-accent;
|
|
76
|
+
border-color: $components-color-accent;
|
|
77
77
|
opacity: 1;
|
|
78
78
|
outline: none;
|
|
79
79
|
|
|
80
80
|
&:focus:enabled {
|
|
81
81
|
box-shadow:
|
|
82
82
|
0 0 0 $border-width $white,
|
|
83
|
-
0 0 0 3px
|
|
83
|
+
0 0 0 3px $components-color-accent;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -93,13 +93,13 @@
|
|
|
93
93
|
/* stylelint-disable */
|
|
94
94
|
background-image: linear-gradient(
|
|
95
95
|
-45deg,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
$components-color-accent 33%,
|
|
97
|
+
$components-color-accent-darker-20 33%,
|
|
98
|
+
$components-color-accent-darker-20 70%,
|
|
99
|
+
$components-color-accent 70%
|
|
100
100
|
);
|
|
101
101
|
/* stylelint-enable */
|
|
102
|
-
border-color:
|
|
102
|
+
border-color: $components-color-accent;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -114,13 +114,13 @@
|
|
|
114
114
|
|
|
115
115
|
&:active:not(:disabled) {
|
|
116
116
|
background: $gray-300;
|
|
117
|
-
color:
|
|
117
|
+
color: $components-color-accent-darker-10;
|
|
118
118
|
box-shadow: none;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
&:hover:not(:disabled) {
|
|
122
|
-
color:
|
|
123
|
-
box-shadow: inset 0 0 0 $border-width
|
|
122
|
+
color: $components-color-accent-darker-10;
|
|
123
|
+
box-shadow: inset 0 0 0 $border-width $components-color-accent-darker-10;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
&:disabled,
|
|
@@ -140,10 +140,10 @@
|
|
|
140
140
|
*/
|
|
141
141
|
|
|
142
142
|
&.is-secondary {
|
|
143
|
-
box-shadow: inset 0 0 0 $border-width
|
|
143
|
+
box-shadow: inset 0 0 0 $border-width $components-color-accent;
|
|
144
144
|
outline: 1px solid transparent; // Shown in high contrast mode.
|
|
145
145
|
white-space: nowrap;
|
|
146
|
-
color:
|
|
146
|
+
color: $components-color-accent;
|
|
147
147
|
background: transparent;
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
|
|
154
154
|
&.is-tertiary {
|
|
155
155
|
white-space: nowrap;
|
|
156
|
-
color:
|
|
156
|
+
color: $components-color-accent;
|
|
157
157
|
background: transparent;
|
|
158
158
|
padding: $grid-unit-15 * 0.5; // This reduces the horizontal padding on tertiary/text buttons, so as to space them optically.
|
|
159
159
|
|
|
@@ -171,52 +171,30 @@
|
|
|
171
171
|
/**
|
|
172
172
|
* Destructive buttons.
|
|
173
173
|
*/
|
|
174
|
-
|
|
175
174
|
&.is-destructive {
|
|
176
|
-
color: $alert-red;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
&:hover:not(:disabled) {
|
|
180
|
-
color: darken($alert-red, 20%);
|
|
181
|
-
box-shadow: inset 0 0 0 $border-width darken($alert-red, 20%);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
&:focus:not(:disabled) {
|
|
185
|
-
color: var(--wp-admin-theme-color);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
&:active:not(:disabled) {
|
|
189
|
-
background: $gray-400;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
175
|
+
--wp-components-color-accent: #{$alert-red};
|
|
176
|
+
--wp-components-color-accent-darker-10: #{darken($alert-red, 10%)};
|
|
177
|
+
--wp-components-color-accent-darker-20: #{darken($alert-red, 20%)};
|
|
192
178
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
&:hover:not(:disabled) {
|
|
199
|
-
color: #fff;
|
|
200
|
-
background: darken($alert-red, 20%);
|
|
201
|
-
box-shadow: inset 0 0 0 $border-width darken($alert-red, 20%);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
179
|
+
// Only the default variant is styled differently from the non-destructive counterparts.
|
|
180
|
+
&:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link) {
|
|
181
|
+
color: $alert-red;
|
|
182
|
+
box-shadow: inset 0 0 0 $border-width $alert-red;
|
|
204
183
|
|
|
205
|
-
|
|
206
|
-
|
|
184
|
+
&:hover:not(:disabled) {
|
|
185
|
+
color: darken($alert-red, 20%);
|
|
186
|
+
}
|
|
207
187
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
188
|
+
&:focus:not(:disabled) {
|
|
189
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) $alert-red;
|
|
190
|
+
}
|
|
212
191
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
192
|
+
&:active:not(:disabled) {
|
|
193
|
+
background: $gray-400;
|
|
194
|
+
}
|
|
216
195
|
}
|
|
217
196
|
}
|
|
218
197
|
|
|
219
|
-
|
|
220
198
|
/**
|
|
221
199
|
* Link buttons.
|
|
222
200
|
*/
|
|
@@ -230,7 +208,7 @@
|
|
|
230
208
|
background: none;
|
|
231
209
|
outline: none;
|
|
232
210
|
text-align: left;
|
|
233
|
-
color:
|
|
211
|
+
color: $components-color-accent;
|
|
234
212
|
text-decoration: underline;
|
|
235
213
|
transition-property: border, background, color;
|
|
236
214
|
transition-duration: 0.05s;
|
|
@@ -241,21 +219,6 @@
|
|
|
241
219
|
&:focus {
|
|
242
220
|
border-radius: $radius-block-ui;
|
|
243
221
|
}
|
|
244
|
-
|
|
245
|
-
// Link buttons that are red to indicate destructive behavior.
|
|
246
|
-
&.is-destructive {
|
|
247
|
-
color: $alert-red;
|
|
248
|
-
|
|
249
|
-
&:active:not(:disabled),
|
|
250
|
-
&:hover:not(:disabled) {
|
|
251
|
-
color: darken($alert-red, 20%);
|
|
252
|
-
background: none;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
&:focus:not(:disabled) {
|
|
256
|
-
color: var(--wp-admin-theme-color);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
222
|
}
|
|
260
223
|
|
|
261
224
|
&:not([aria-disabled="true"]):active {
|
|
@@ -315,7 +278,7 @@
|
|
|
315
278
|
}
|
|
316
279
|
|
|
317
280
|
&.has-text {
|
|
318
|
-
justify-content:
|
|
281
|
+
justify-content: start;
|
|
319
282
|
}
|
|
320
283
|
|
|
321
284
|
&.has-text svg {
|
|
@@ -333,7 +296,7 @@
|
|
|
333
296
|
background: $gray-900;
|
|
334
297
|
|
|
335
298
|
&:focus:not(:disabled) {
|
|
336
|
-
box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus)
|
|
299
|
+
box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
|
|
337
300
|
|
|
338
301
|
// Windows High Contrast mode will show this outline, but not the box-shadow.
|
|
339
302
|
outline: 2px solid transparent;
|
package/src/button/test/index.js
CHANGED
|
@@ -27,7 +27,7 @@ describe( 'Button', () => {
|
|
|
27
27
|
expect( button ).not.toHaveClass( 'is-large' );
|
|
28
28
|
expect( button ).not.toHaveClass( 'is-primary' );
|
|
29
29
|
expect( button ).not.toHaveClass( 'is-pressed' );
|
|
30
|
-
expect( button ).
|
|
30
|
+
expect( button ).toBeEnabled();
|
|
31
31
|
expect( button ).not.toHaveAttribute( 'aria-disabled' );
|
|
32
32
|
expect( button ).toHaveAttribute( 'type', 'button' );
|
|
33
33
|
} );
|
|
@@ -114,16 +114,14 @@ describe( 'Button', () => {
|
|
|
114
114
|
it( 'should add a disabled prop to the button', () => {
|
|
115
115
|
render( <Button disabled /> );
|
|
116
116
|
|
|
117
|
-
expect( screen.getByRole( 'button' ) ).
|
|
118
|
-
'disabled'
|
|
119
|
-
);
|
|
117
|
+
expect( screen.getByRole( 'button' ) ).toBeDisabled();
|
|
120
118
|
} );
|
|
121
119
|
|
|
122
120
|
it( 'should add only aria-disabled attribute when disabled and isFocusable are true', () => {
|
|
123
121
|
render( <Button disabled __experimentalIsFocusable /> );
|
|
124
122
|
const button = screen.getByRole( 'button' );
|
|
125
123
|
|
|
126
|
-
expect( button ).
|
|
124
|
+
expect( button ).toBeEnabled();
|
|
127
125
|
expect( button ).toHaveAttribute( 'aria-disabled' );
|
|
128
126
|
} );
|
|
129
127
|
|