@wordpress/components 16.0.1-next.5df0cd52b7.0 → 19.0.1
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 +71 -4
- package/CONTRIBUTING.md +398 -6
- package/README.md +9 -1
- package/build/angle-picker-control/index.js +29 -24
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +10 -13
- package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build/animate/index.js +1 -1
- package/build/animate/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js +5 -4
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/base-control/index.js +2 -2
- package/build/base-control/index.js.map +1 -1
- package/build/base-field/hook.js +1 -1
- package/build/base-field/hook.js.map +1 -1
- package/build/button/index.js +4 -1
- package/build/button/index.js.map +1 -1
- package/build/card/card/component.js +3 -3
- package/build/card/card/component.js.map +1 -1
- package/build/card/card/hook.js +4 -5
- package/build/card/card/hook.js.map +1 -1
- package/build/card/card-body/component.js +2 -2
- package/build/card/card-body/component.js.map +1 -1
- package/build/card/card-body/hook.js +1 -1
- package/build/card/card-body/hook.js.map +1 -1
- package/build/card/card-divider/component.js +2 -2
- package/build/card/card-divider/component.js.map +1 -1
- package/build/card/card-divider/hook.js +1 -1
- package/build/card/card-divider/hook.js.map +1 -1
- package/build/card/card-footer/component.js +2 -2
- package/build/card/card-footer/component.js.map +1 -1
- package/build/card/card-footer/hook.js +1 -1
- package/build/card/card-footer/hook.js.map +1 -1
- package/build/card/card-header/component.js +2 -2
- package/build/card/card-header/component.js.map +1 -1
- package/build/card/card-header/hook.js +1 -1
- package/build/card/card-header/hook.js.map +1 -1
- package/build/card/card-media/component.js +23 -7
- package/build/card/card-media/component.js.map +1 -1
- package/build/card/card-media/hook.js +1 -1
- package/build/card/card-media/hook.js.map +1 -1
- package/build/color-edit/index.js +181 -201
- package/build/color-edit/index.js.map +1 -1
- package/build/color-edit/styles.js +112 -0
- package/build/color-edit/styles.js.map +1 -0
- package/build/color-list-picker/index.js +6 -1
- package/build/color-list-picker/index.js.map +1 -1
- package/build/color-palette/index.js +115 -42
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/styles.js +31 -0
- package/build/color-palette/styles.js.map +1 -0
- package/build/{ui/color-picker → color-picker}/color-display.js +36 -21
- package/build/color-picker/color-display.js.map +1 -0
- package/build/{ui/color-picker → color-picker}/color-input.js +0 -0
- package/build/color-picker/color-input.js.map +1 -0
- package/build/{ui/color-picker → color-picker}/component.js +37 -49
- package/build/color-picker/component.js.map +1 -0
- package/build/color-picker/hex-input.js +63 -0
- package/build/color-picker/hex-input.js.map +1 -0
- package/build/{ui/color-picker → color-picker}/hsl-input.js +40 -30
- package/build/color-picker/hsl-input.js.map +1 -0
- package/build/color-picker/index.js +6 -276
- package/build/color-picker/index.js.map +1 -1
- package/build/color-picker/index.native.js +16 -11
- package/build/color-picker/index.native.js.map +1 -1
- package/build/{ui/color-picker → color-picker}/input-with-slider.js +10 -13
- package/build/color-picker/input-with-slider.js.map +1 -0
- package/build/color-picker/legacy-adapter.js +24 -0
- package/build/color-picker/legacy-adapter.js.map +1 -0
- package/build/color-picker/picker.js +37 -0
- package/build/color-picker/picker.js.map +1 -0
- package/build/{ui/color-picker → color-picker}/rgb-input.js +10 -12
- package/build/color-picker/rgb-input.js.map +1 -0
- package/build/color-picker/styles.js +102 -0
- package/build/color-picker/styles.js.map +1 -0
- package/build/{segmented-control → color-picker}/types.js +0 -0
- package/build/color-picker/types.js.map +1 -0
- package/build/color-picker/use-deprecated-props.js +81 -0
- package/build/color-picker/use-deprecated-props.js.map +1 -0
- package/build/combobox-control/index.js +25 -5
- package/build/combobox-control/index.js.map +1 -1
- package/build/custom-gradient-bar/constants.js +2 -2
- package/build/custom-gradient-bar/constants.js.map +1 -1
- package/build/custom-gradient-bar/control-points.js +29 -53
- package/build/custom-gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/index.js +4 -3
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build/custom-gradient-picker/utils.js +8 -4
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/custom-select-control/index.js +32 -8
- package/build/custom-select-control/index.js.map +1 -1
- package/build/dashicon/index.native.js +39 -0
- package/build/dashicon/index.native.js.map +1 -0
- package/build/date-time/index.js +1 -1
- package/build/date-time/index.js.map +1 -1
- package/build/dimension-control/sizes.js +5 -5
- package/build/dimension-control/sizes.js.map +1 -1
- package/build/divider/component.js.map +1 -1
- package/build/drop-zone/index.js +54 -3
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown/index.js +7 -1
- package/build/dropdown/index.js.map +1 -1
- package/build/dropdown-menu/index.js +21 -35
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +2 -22
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/duotone-picker/custom-duotone-bar.js +0 -1
- package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +1 -0
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/utils.js +6 -3
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/elevation/component.js +24 -8
- package/build/elevation/component.js.map +1 -1
- package/build/elevation/hook.js +5 -5
- package/build/elevation/hook.js.map +1 -1
- package/build/flex/flex/component.js +2 -2
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex/hook.js +26 -32
- package/build/flex/flex/hook.js.map +1 -1
- package/build/flex/flex-block/component.js +23 -7
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-block/hook.js +1 -1
- package/build/flex/flex-block/hook.js.map +1 -1
- package/build/flex/flex-item/component.js +23 -7
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/flex/flex-item/hook.js +2 -2
- package/build/flex/flex-item/hook.js.map +1 -1
- package/build/flyout/flyout/component.js +2 -2
- package/build/flyout/flyout/component.js.map +1 -1
- package/build/flyout/flyout/hook.js +1 -1
- package/build/flyout/flyout/hook.js.map +1 -1
- package/build/flyout/flyout-content/component.js +2 -2
- package/build/flyout/flyout-content/component.js.map +1 -1
- package/build/focal-point-picker/controls.js +1 -1
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focusable-iframe/index.js +6 -28
- package/build/focusable-iframe/index.js.map +1 -1
- package/build/font-size-picker/index.js +107 -72
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/index.native.js +162 -0
- package/build/font-size-picker/index.native.js.map +1 -0
- package/build/font-size-picker/utils.js +119 -0
- package/build/font-size-picker/utils.js.map +1 -0
- package/build/gradient-picker/index.js +69 -9
- package/build/gradient-picker/index.js.map +1 -1
- package/build/grid/component.js +21 -7
- package/build/grid/component.js.map +1 -1
- package/build/grid/hook.js +2 -2
- package/build/grid/hook.js.map +1 -1
- package/build/guide/index.js +10 -9
- package/build/guide/index.js.map +1 -1
- package/build/h-stack/component.js +23 -7
- package/build/h-stack/component.js.map +1 -1
- package/build/h-stack/hook.js +1 -1
- package/build/h-stack/hook.js.map +1 -1
- package/build/heading/component.js +25 -9
- package/build/heading/component.js.map +1 -1
- package/build/heading/hook.js +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/higher-order/navigate-regions/index.js +42 -29
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/index.js +50 -16
- package/build/index.js.map +1 -1
- package/build/index.native.js +20 -2
- package/build/index.native.js.map +1 -1
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/label.js.map +1 -1
- package/build/input-control/reducer/actions.js.map +1 -1
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/reducer/state.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +25 -25
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item/hook.js +10 -3
- package/build/item-group/item/hook.js.map +1 -1
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/item-group/item-group/hook.js.map +1 -1
- package/build/item-group/styles.js +18 -10
- package/build/item-group/styles.js.map +1 -1
- package/build/menu-group/index.js +9 -6
- package/build/menu-group/index.js.map +1 -1
- package/build/menu-item/index.js +20 -29
- package/build/menu-item/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +13 -4
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +11 -3
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js +3 -3
- package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +16 -4
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-cell.native.js +3 -2
- package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/action-button.native.js +42 -0
- package/build/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -0
- package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js +58 -0
- package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -0
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +115 -0
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -0
- package/build/mobile/bottom-sheet/nav-bar/heading.native.js +42 -0
- package/build/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -0
- package/build/mobile/bottom-sheet/nav-bar/index.native.js +43 -0
- package/build/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -0
- package/build/mobile/bottom-sheet/range-cell.native.js +14 -2
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-text-input.native.js +2 -1
- package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +3 -4
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js +5 -8
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/mobile/color-settings/gradient-picker-screen.native.js +4 -5
- package/build/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +11 -7
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/color-settings/picker-screen.native.js +2 -4
- package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build/mobile/dashicons/index.native.js +31 -0
- package/build/mobile/dashicons/index.native.js.map +1 -0
- package/build/mobile/focal-point-settings-panel/index.native.js +6 -7
- package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/index.native.js +4 -2
- package/build/mobile/global-styles-context/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +118 -10
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/html-text-input/index.native.js +14 -4
- package/build/mobile/html-text-input/index.native.js.map +1 -1
- package/build/mobile/inserter-button/index.native.js +5 -4
- package/build/mobile/inserter-button/index.native.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +6 -7
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-settings/image-link-destinations-screen.native.js +140 -0
- package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -0
- package/build/mobile/link-settings/index.native.js +3 -2
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js +1 -0
- package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-screen.native.js +11 -5
- package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build/mobile/picker/index.android.js +4 -2
- package/build/mobile/picker/index.android.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +2 -1
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/modal/index.js +111 -151
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +2 -0
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigable-container/index.js.map +1 -1
- package/build/navigable-container/menu.js +2 -0
- package/build/navigable-container/menu.js.map +1 -1
- package/build/navigable-container/tabbable.js +2 -0
- package/build/navigable-container/tabbable.js.map +1 -1
- package/build/navigation/group/index.js +1 -2
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/menu/index.js +1 -1
- package/build/navigation/menu/index.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +8 -27
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/menu-title.js +2 -2
- package/build/navigation/menu/menu-title.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +43 -30
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/navigator/context.js +16 -0
- package/build/navigator/context.js.map +1 -0
- package/build/navigator/index.js +32 -0
- package/build/navigator/index.js.map +1 -0
- package/build/navigator/navigator-provider/component.js +106 -0
- package/build/navigator/navigator-provider/component.js.map +1 -0
- package/build/{ui/color-picker → navigator/navigator-provider}/index.js +1 -1
- package/build/navigator/navigator-provider/index.js.map +1 -0
- package/build/navigator/navigator-screen/component.js +160 -0
- package/build/navigator/navigator-screen/component.js.map +1 -0
- package/build/navigator/navigator-screen/index.js +16 -0
- package/build/navigator/navigator-screen/index.js.map +1 -0
- package/build/{ui/color-picker → navigator}/types.js +0 -0
- package/build/navigator/types.js.map +1 -0
- package/build/navigator/use-navigator.js +38 -0
- package/build/navigator/use-navigator.js.map +1 -0
- package/build/number-control/index.js +25 -30
- package/build/number-control/index.js.map +1 -1
- package/build/panel/body.native.js +1 -0
- package/build/panel/body.native.js.map +1 -1
- package/build/popover/index.js +14 -22
- package/build/popover/index.js.map +1 -1
- package/build/popover/utils.js +57 -35
- package/build/popover/utils.js.map +1 -1
- package/build/query-controls/index.native.js +2 -2
- package/build/query-controls/index.native.js.map +1 -1
- package/build/range-control/index.js +9 -2
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/input-range.js +0 -17
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/rail.js +4 -0
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +51 -51
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/range-control/tooltip.js +11 -23
- package/build/range-control/tooltip.js.map +1 -1
- package/build/resizable-box/index.js +35 -32
- package/build/resizable-box/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js +0 -2
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js +8 -4
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -12
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +21 -30
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.js +3 -9
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +75 -31
- package/build/sandbox/index.native.js.map +1 -1
- package/build/scrollable/component.js +24 -8
- package/build/scrollable/component.js.map +1 -1
- package/build/scrollable/hook.js +1 -1
- package/build/scrollable/hook.js.map +1 -1
- package/build/search-control/index.js +37 -14
- package/build/search-control/index.js.map +1 -1
- package/build/search-control/index.native.js +11 -2
- package/build/search-control/index.native.js.map +1 -1
- package/build/select-control/index.js +3 -2
- package/build/select-control/index.js.map +1 -1
- package/build/snackbar/index.js +5 -2
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +6 -2
- package/build/snackbar/list.js.map +1 -1
- package/build/spacer/component.js +24 -8
- package/build/spacer/component.js.map +1 -1
- package/build/spacer/hook.js +1 -1
- package/build/spacer/hook.js.map +1 -1
- package/build/surface/component.js +22 -6
- package/build/surface/component.js.map +1 -1
- package/build/surface/hook.js +1 -1
- package/build/surface/hook.js.map +1 -1
- package/build/text/component.js +23 -7
- package/build/text/component.js.map +1 -1
- package/build/text/hook.js +5 -5
- package/build/text/hook.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build/toggle-control/index.native.js +9 -3
- package/build/toggle-control/index.native.js.map +1 -1
- package/build/toggle-group-control/context.js +20 -0
- package/build/toggle-group-control/context.js.map +1 -0
- package/build/toggle-group-control/index.js +22 -0
- package/build/toggle-group-control/index.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/component.js +128 -0
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/index.js +16 -0
- package/build/toggle-group-control/toggle-group-control/index.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/styles.js +37 -0
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -0
- package/build/{segmented-control/segmented-control-backdrop.js → toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js} +21 -6
- package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control-option/component.js +104 -0
- package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control-option/index.js +16 -0
- package/build/toggle-group-control/toggle-group-control-option/index.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control-option/styles.js +73 -0
- package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -0
- package/build/toggle-group-control/types.js +2 -0
- package/build/toggle-group-control/types.js.map +1 -0
- package/build/tools-panel/context.js +15 -1
- package/build/tools-panel/context.js.map +1 -1
- package/build/tools-panel/index.js +8 -0
- package/build/tools-panel/index.js.map +1 -1
- package/build/tools-panel/styles.js +69 -9
- package/build/tools-panel/styles.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +16 -10
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +123 -23
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel/index.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +99 -22
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/hook.js +12 -2
- package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/index.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js +9 -1
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +56 -20
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/index.js.map +1 -1
- package/build/tools-panel/types.js +2 -0
- package/build/tools-panel/types.js.map +1 -0
- package/build/tooltip/index.js +10 -4
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js +2 -1
- package/build/tooltip/index.native.js.map +1 -1
- package/build/tree-grid/index.js +3 -1
- package/build/tree-grid/index.js.map +1 -1
- package/build/truncate/component.js +23 -7
- package/build/truncate/component.js.map +1 -1
- package/build/truncate/hook.js +2 -2
- package/build/truncate/hook.js.map +1 -1
- package/build/ui/context/context-connect.js +3 -3
- package/build/ui/context/context-connect.js.map +1 -1
- package/build/ui/context/index.js +4 -4
- package/build/ui/context/index.js.map +1 -1
- package/build/ui/context/use-context-system.js +1 -1
- package/build/ui/context/use-context-system.js.map +1 -1
- package/build/ui/context/wordpress-component.js +2 -0
- package/build/ui/context/wordpress-component.js.map +1 -0
- package/build/ui/control-group/component.js +2 -2
- package/build/ui/control-group/component.js.map +1 -1
- package/build/ui/control-group/hook.js +1 -1
- package/build/ui/control-group/hook.js.map +1 -1
- package/build/ui/control-label/component.js +25 -7
- package/build/ui/control-label/component.js.map +1 -1
- package/build/ui/control-label/hook.js +1 -1
- package/build/ui/control-label/hook.js.map +1 -1
- package/build/ui/form-group/form-group-content.js +1 -1
- package/build/ui/form-group/form-group-content.js.map +1 -1
- package/build/ui/form-group/form-group-label.js +1 -1
- package/build/ui/form-group/form-group-label.js.map +1 -1
- package/build/ui/form-group/form-group.js +2 -2
- package/build/ui/form-group/form-group.js.map +1 -1
- package/build/ui/form-group/use-form-group.js +1 -1
- package/build/ui/form-group/use-form-group.js.map +1 -1
- package/build/ui/shortcut/component.js.map +1 -1
- package/build/ui/spinner/component.js +2 -2
- package/build/ui/spinner/component.js.map +1 -1
- package/build/ui/tooltip/component.js +2 -2
- package/build/ui/tooltip/component.js.map +1 -1
- package/build/ui/tooltip/content.js +2 -2
- package/build/ui/tooltip/content.js.map +1 -1
- package/build/ui/tooltip/styles.js +4 -4
- package/build/ui/tooltip/styles.js.map +1 -1
- package/build/ui/utils/colors.js +6 -6
- package/build/ui/utils/colors.js.map +1 -1
- package/build/ui/utils/index.js +0 -8
- package/build/ui/utils/index.js.map +1 -1
- package/build/ui/utils/space.js +2 -2
- package/build/ui/utils/space.js.map +1 -1
- package/build/ui/utils/use-responsive-value.js +0 -4
- package/build/ui/utils/use-responsive-value.js.map +1 -1
- package/build/unit-control/index.js +34 -18
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +5 -1
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +17 -17
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/unit-control/types.js +2 -0
- package/build/unit-control/types.js.map +1 -0
- package/build/unit-control/unit-select-control.js +11 -28
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/unit-control/utils.js +73 -45
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/colors.js +6 -8
- package/build/utils/colors.js.map +1 -1
- package/build/utils/config-values.js +8 -8
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/hooks/index.js +6 -6
- package/build/utils/hooks/index.js.map +1 -1
- package/build/utils/hooks/use-combined-ref.js +28 -0
- package/build/utils/hooks/use-combined-ref.js.map +1 -0
- package/build/v-stack/component.js +23 -7
- package/build/v-stack/component.js.map +1 -1
- package/build/v-stack/hook.js +1 -1
- package/build/v-stack/hook.js.map +1 -1
- package/build/view/component.js +2 -2
- package/build/view/component.js.map +1 -1
- package/build/visually-hidden/component.js +2 -2
- package/build/visually-hidden/component.js.map +1 -1
- package/build/z-stack/component.js.map +1 -1
- package/build-module/angle-picker-control/index.js +26 -21
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +8 -13
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build-module/animate/index.js +1 -1
- package/build-module/animate/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +5 -4
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/base-control/index.js +2 -2
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-field/hook.js +1 -1
- package/build-module/base-field/hook.js.map +1 -1
- package/build-module/button/index.js +4 -2
- package/build-module/button/index.js.map +1 -1
- package/build-module/card/card/component.js +3 -3
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card/hook.js +4 -5
- package/build-module/card/card/hook.js.map +1 -1
- package/build-module/card/card-body/component.js +2 -2
- package/build-module/card/card-body/component.js.map +1 -1
- package/build-module/card/card-body/hook.js +1 -1
- package/build-module/card/card-body/hook.js.map +1 -1
- package/build-module/card/card-divider/component.js +2 -2
- package/build-module/card/card-divider/component.js.map +1 -1
- package/build-module/card/card-divider/hook.js +1 -1
- package/build-module/card/card-divider/hook.js.map +1 -1
- package/build-module/card/card-footer/component.js +2 -2
- package/build-module/card/card-footer/component.js.map +1 -1
- package/build-module/card/card-footer/hook.js +1 -1
- package/build-module/card/card-footer/hook.js.map +1 -1
- package/build-module/card/card-header/component.js +2 -2
- package/build-module/card/card-header/component.js.map +1 -1
- package/build-module/card/card-header/hook.js +1 -1
- package/build-module/card/card-header/hook.js.map +1 -1
- package/build-module/card/card-media/component.js +19 -7
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/card/card-media/hook.js +1 -1
- package/build-module/card/card-media/hook.js.map +1 -1
- package/build-module/color-edit/index.js +175 -202
- package/build-module/color-edit/index.js.map +1 -1
- package/build-module/color-edit/styles.js +90 -0
- package/build-module/color-edit/styles.js.map +1 -0
- package/build-module/color-list-picker/index.js +6 -1
- package/build-module/color-list-picker/index.js.map +1 -1
- package/build-module/color-palette/index.js +110 -42
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/styles.js +27 -0
- package/build-module/color-palette/styles.js.map +1 -0
- package/build-module/{ui/color-picker → color-picker}/color-display.js +38 -20
- package/build-module/color-picker/color-display.js.map +1 -0
- package/build-module/{ui/color-picker → color-picker}/color-input.js +0 -0
- package/build-module/color-picker/color-input.js.map +1 -0
- package/build-module/{ui/color-picker → color-picker}/component.js +36 -49
- package/build-module/color-picker/component.js.map +1 -0
- package/build-module/color-picker/hex-input.js +48 -0
- package/build-module/color-picker/hex-input.js.map +1 -0
- package/build-module/{ui/color-picker → color-picker}/hsl-input.js +40 -31
- package/build-module/color-picker/hsl-input.js.map +1 -0
- package/build-module/color-picker/index.js +1 -264
- package/build-module/color-picker/index.js.map +1 -1
- package/build-module/color-picker/index.native.js +14 -8
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/{ui/color-picker → color-picker}/input-with-slider.js +11 -11
- package/build-module/color-picker/input-with-slider.js.map +1 -0
- package/build-module/color-picker/legacy-adapter.js +11 -0
- package/build-module/color-picker/legacy-adapter.js.map +1 -0
- package/build-module/color-picker/picker.js +27 -0
- package/build-module/color-picker/picker.js.map +1 -0
- package/build-module/{ui/color-picker → color-picker}/rgb-input.js +10 -10
- package/build-module/color-picker/rgb-input.js.map +1 -0
- package/build-module/color-picker/styles.js +84 -0
- package/build-module/color-picker/styles.js.map +1 -0
- package/build-module/{segmented-control → color-picker}/types.js +0 -0
- package/build-module/{segmented-control → color-picker}/types.js.map +0 -0
- package/build-module/color-picker/use-deprecated-props.js +73 -0
- package/build-module/color-picker/use-deprecated-props.js.map +1 -0
- package/build-module/combobox-control/index.js +25 -5
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/custom-gradient-bar/constants.js +2 -2
- package/build-module/custom-gradient-bar/constants.js.map +1 -1
- package/build-module/custom-gradient-bar/control-points.js +25 -50
- package/build-module/custom-gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +5 -4
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
- package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build-module/custom-gradient-picker/utils.js +5 -3
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/custom-select-control/index.js +31 -8
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/dashicon/index.native.js +24 -0
- package/build-module/dashicon/index.native.js.map +1 -0
- package/build-module/date-time/index.js +1 -1
- package/build-module/date-time/index.js.map +1 -1
- package/build-module/dimension-control/sizes.js +6 -6
- package/build-module/dimension-control/sizes.js.map +1 -1
- package/build-module/divider/component.js +1 -2
- package/build-module/divider/component.js.map +1 -1
- package/build-module/drop-zone/index.js +54 -4
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown/index.js +6 -1
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/dropdown-menu/index.js +20 -34
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +2 -21
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/duotone-picker/custom-duotone-bar.js +0 -1
- package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +1 -0
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/utils.js +4 -2
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/elevation/component.js +19 -7
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/elevation/hook.js +5 -5
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/flex/flex/component.js +2 -2
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex/hook.js +25 -31
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/flex/flex-block/component.js +19 -7
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-block/hook.js +1 -1
- package/build-module/flex/flex-block/hook.js.map +1 -1
- package/build-module/flex/flex-item/component.js +19 -7
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/flex/flex-item/hook.js +2 -2
- package/build-module/flex/flex-item/hook.js.map +1 -1
- package/build-module/flyout/flyout/component.js +2 -2
- package/build-module/flyout/flyout/component.js.map +1 -1
- package/build-module/flyout/flyout/hook.js +1 -1
- package/build-module/flyout/flyout/hook.js.map +1 -1
- package/build-module/flyout/flyout-content/component.js +2 -2
- package/build-module/flyout/flyout-content/component.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +1 -1
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focusable-iframe/index.js +6 -30
- package/build-module/focusable-iframe/index.js.map +1 -1
- package/build-module/font-size-picker/index.js +108 -74
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/index.native.js +144 -0
- package/build-module/font-size-picker/index.native.js.map +1 -0
- package/build-module/font-size-picker/utils.js +104 -0
- package/build-module/font-size-picker/utils.js.map +1 -0
- package/build-module/gradient-picker/index.js +67 -9
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/grid/component.js +19 -7
- package/build-module/grid/component.js.map +1 -1
- package/build-module/grid/hook.js +2 -2
- package/build-module/grid/hook.js.map +1 -1
- package/build-module/guide/index.js +9 -8
- package/build-module/guide/index.js.map +1 -1
- package/build-module/h-stack/component.js +19 -7
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/h-stack/hook.js +1 -1
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/heading/component.js +21 -8
- package/build-module/heading/component.js.map +1 -1
- package/build-module/heading/hook.js +2 -3
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/higher-order/navigate-regions/index.js +44 -31
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/index.js +5 -3
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +4 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/label.js.map +1 -1
- package/build-module/input-control/reducer/actions.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/reducer/state.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +25 -25
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item/hook.js +9 -3
- package/build-module/item-group/item/hook.js.map +1 -1
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/item-group/item-group/hook.js.map +1 -1
- package/build-module/item-group/styles.js +18 -10
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/menu-group/index.js +8 -6
- package/build-module/menu-group/index.js.map +1 -1
- package/build-module/menu-item/index.js +19 -29
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +14 -5
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +11 -3
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js +4 -3
- package/build-module/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +16 -4
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-cell.native.js +3 -2
- package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/action-button.native.js +30 -0
- package/build-module/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -0
- package/build-module/mobile/bottom-sheet/nav-bar/apply-button.native.js +43 -0
- package/build-module/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -0
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +99 -0
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -0
- package/build-module/mobile/bottom-sheet/nav-bar/heading.native.js +30 -0
- package/build-module/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -0
- package/build-module/mobile/bottom-sheet/nav-bar/index.native.js +29 -0
- package/build-module/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -0
- package/build-module/mobile/bottom-sheet/range-cell.native.js +14 -2
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-text-input.native.js +2 -1
- package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +2 -2
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +3 -4
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js +5 -8
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/gradient-picker-screen.native.js +4 -5
- package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +11 -7
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/picker-screen.native.js +1 -1
- package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build-module/mobile/dashicons/index.native.js +21 -0
- package/build-module/mobile/dashicons/index.native.js.map +1 -0
- package/build-module/mobile/focal-point-settings-panel/index.native.js +6 -7
- package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/index.native.js +5 -3
- package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +113 -11
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js +14 -4
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/inserter-button/index.native.js +4 -4
- package/build-module/mobile/inserter-button/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +6 -7
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +121 -0
- package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -0
- package/build-module/mobile/link-settings/index.native.js +3 -2
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -0
- package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-screen.native.js +11 -5
- package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build-module/mobile/picker/index.android.js +4 -2
- package/build-module/mobile/picker/index.android.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +2 -1
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/modal/index.js +109 -151
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigable-container/container.js +1 -0
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigable-container/index.js +2 -0
- package/build-module/navigable-container/index.js.map +1 -1
- package/build-module/navigable-container/menu.js +1 -0
- package/build-module/navigable-container/menu.js.map +1 -1
- package/build-module/navigable-container/tabbable.js +1 -0
- package/build-module/navigable-container/tabbable.js.map +1 -1
- package/build-module/navigation/group/index.js +1 -2
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/menu/index.js +1 -1
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +8 -24
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/menu-title.js +3 -3
- package/build-module/navigation/menu/menu-title.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +41 -29
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/navigator/context.js +11 -0
- package/build-module/navigator/context.js.map +1 -0
- package/build-module/navigator/index.js +4 -0
- package/build-module/navigator/index.js.map +1 -0
- package/build-module/navigator/navigator-provider/component.js +104 -0
- package/build-module/navigator/navigator-provider/component.js.map +1 -0
- package/build-module/navigator/navigator-provider/index.js +2 -0
- package/build-module/navigator/navigator-provider/index.js.map +1 -0
- package/build-module/navigator/navigator-screen/component.js +155 -0
- package/build-module/navigator/navigator-screen/component.js.map +1 -0
- package/build-module/navigator/navigator-screen/index.js +2 -0
- package/build-module/navigator/navigator-screen/index.js.map +1 -0
- package/build-module/{ui/color-picker → navigator}/types.js +0 -0
- package/build-module/{ui/color-picker → navigator}/types.js.map +0 -0
- package/build-module/navigator/use-navigator.js +28 -0
- package/build-module/navigator/use-navigator.js.map +1 -0
- package/build-module/number-control/index.js +25 -29
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/panel/body.native.js +1 -0
- package/build-module/panel/body.native.js.map +1 -1
- package/build-module/popover/index.js +15 -22
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/utils.js +57 -35
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/query-controls/index.native.js +3 -3
- package/build-module/query-controls/index.native.js.map +1 -1
- package/build-module/range-control/index.js +9 -2
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/input-range.js +0 -16
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/rail.js +4 -0
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +51 -52
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/range-control/tooltip.js +11 -22
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/resizable-box/index.js +35 -33
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +2 -4
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js +8 -4
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -12
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +20 -27
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.js +3 -7
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +74 -31
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/scrollable/component.js +20 -8
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/scrollable/hook.js +1 -1
- package/build-module/scrollable/hook.js.map +1 -1
- package/build-module/search-control/index.js +36 -15
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/search-control/index.native.js +11 -3
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/select-control/index.js +3 -2
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/snackbar/index.js +5 -2
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +7 -2
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spacer/component.js +20 -7
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spacer/hook.js +2 -3
- package/build-module/spacer/hook.js.map +1 -1
- package/build-module/surface/component.js +19 -6
- package/build-module/surface/component.js.map +1 -1
- package/build-module/surface/hook.js +1 -1
- package/build-module/surface/hook.js.map +1 -1
- package/build-module/text/component.js +21 -7
- package/build-module/text/component.js.map +1 -1
- package/build-module/text/hook.js +5 -5
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-module/toggle-control/index.native.js +8 -3
- package/build-module/toggle-control/index.native.js.map +1 -1
- package/build-module/toggle-group-control/context.js +12 -0
- package/build-module/toggle-group-control/context.js.map +1 -0
- package/build-module/toggle-group-control/index.js +3 -0
- package/build-module/toggle-group-control/index.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/component.js +111 -0
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/index.js +2 -0
- package/build-module/toggle-group-control/toggle-group-control/index.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/styles.js +30 -0
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -0
- package/build-module/{segmented-control/segmented-control-backdrop.js → toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js} +21 -6
- package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option/component.js +89 -0
- package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option/index.js +2 -0
- package/build-module/toggle-group-control/toggle-group-control-option/index.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js +61 -0
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -0
- package/build-module/toggle-group-control/types.js +2 -0
- package/{build/segmented-control → build-module/toggle-group-control}/types.js.map +0 -0
- package/build-module/tools-panel/context.js +19 -1
- package/build-module/tools-panel/context.js.map +1 -1
- package/build-module/tools-panel/index.js +1 -0
- package/build-module/tools-panel/index.js.map +1 -1
- package/build-module/tools-panel/styles.js +60 -8
- package/build-module/tools-panel/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +16 -9
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +124 -24
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +99 -24
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/hook.js +12 -2
- package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js +12 -3
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +57 -21
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/index.js.map +1 -1
- package/build-module/tools-panel/types.js +2 -0
- package/{build/ui/color-picker → build-module/tools-panel}/types.js.map +0 -0
- package/build-module/tooltip/index.js +9 -4
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +2 -1
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/tree-grid/index.js +3 -1
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/truncate/component.js +21 -7
- package/build-module/truncate/component.js.map +1 -1
- package/build-module/truncate/hook.js +2 -2
- package/build-module/truncate/hook.js.map +1 -1
- package/build-module/ui/context/context-connect.js +3 -3
- package/build-module/ui/context/context-connect.js.map +1 -1
- package/build-module/ui/context/index.js +1 -1
- package/build-module/ui/context/index.js.map +1 -1
- package/build-module/ui/context/use-context-system.js +1 -1
- package/build-module/ui/context/use-context-system.js.map +1 -1
- package/build-module/ui/context/wordpress-component.js +2 -0
- package/build-module/ui/context/{polymorphic-component.js.map → wordpress-component.js.map} +0 -0
- package/build-module/ui/control-group/component.js +2 -2
- package/build-module/ui/control-group/component.js.map +1 -1
- package/build-module/ui/control-group/hook.js +1 -1
- package/build-module/ui/control-group/hook.js.map +1 -1
- package/build-module/ui/control-label/component.js +21 -7
- package/build-module/ui/control-label/component.js.map +1 -1
- package/build-module/ui/control-label/hook.js +1 -1
- package/build-module/ui/control-label/hook.js.map +1 -1
- package/build-module/ui/form-group/form-group-content.js +1 -1
- package/build-module/ui/form-group/form-group-content.js.map +1 -1
- package/build-module/ui/form-group/form-group-label.js +1 -1
- package/build-module/ui/form-group/form-group-label.js.map +1 -1
- package/build-module/ui/form-group/form-group.js +2 -2
- package/build-module/ui/form-group/form-group.js.map +1 -1
- package/build-module/ui/form-group/use-form-group.js +1 -1
- package/build-module/ui/form-group/use-form-group.js.map +1 -1
- package/build-module/ui/shortcut/component.js +1 -2
- package/build-module/ui/shortcut/component.js.map +1 -1
- package/build-module/ui/spinner/component.js +2 -2
- package/build-module/ui/spinner/component.js.map +1 -1
- package/build-module/ui/tooltip/component.js +2 -2
- package/build-module/ui/tooltip/component.js.map +1 -1
- package/build-module/ui/tooltip/content.js +2 -2
- package/build-module/ui/tooltip/content.js.map +1 -1
- package/build-module/ui/tooltip/styles.js +4 -4
- package/build-module/ui/tooltip/styles.js.map +1 -1
- package/build-module/ui/utils/colors.js +5 -4
- package/build-module/ui/utils/colors.js.map +1 -1
- package/build-module/ui/utils/index.js +0 -1
- package/build-module/ui/utils/index.js.map +1 -1
- package/build-module/ui/utils/space.js +2 -2
- package/build-module/ui/utils/space.js.map +1 -1
- package/build-module/ui/utils/use-responsive-value.js +0 -4
- package/build-module/ui/utils/use-responsive-value.js.map +1 -1
- package/build-module/unit-control/index.js +36 -16
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +5 -1
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +17 -17
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/unit-control/types.js +2 -0
- package/{build/ui/context/polymorphic-component.js.map → build-module/unit-control/types.js.map} +0 -0
- package/build-module/unit-control/unit-select-control.js +12 -28
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/unit-control/utils.js +75 -44
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/colors.js +4 -7
- package/build-module/utils/colors.js.map +1 -1
- package/build-module/utils/config-values.js +8 -8
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/hooks/index.js +1 -1
- package/build-module/utils/hooks/index.js.map +1 -1
- package/build-module/utils/hooks/use-combined-ref.js +25 -0
- package/build-module/utils/hooks/use-combined-ref.js.map +1 -0
- package/build-module/v-stack/component.js +19 -7
- package/build-module/v-stack/component.js.map +1 -1
- package/build-module/v-stack/hook.js +1 -1
- package/build-module/v-stack/hook.js.map +1 -1
- package/build-module/view/component.js +2 -2
- package/build-module/view/component.js.map +1 -1
- package/build-module/visually-hidden/component.js +2 -2
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/z-stack/component.js +1 -2
- package/build-module/z-stack/component.js.map +1 -1
- package/build-style/style-rtl.css +136 -367
- package/build-style/style.css +136 -372
- package/build-types/animate/index.d.ts +4 -4
- package/build-types/animate/index.d.ts.map +1 -1
- package/build-types/base-control/index.d.ts +12 -3
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/styles/base-control-styles.d.ts +4 -4
- package/build-types/base-field/hook.d.ts +222 -222
- package/build-types/base-field/hook.d.ts.map +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/card/card/component.d.ts +1 -1
- package/build-types/card/card/component.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +222 -222
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/card-body/component.d.ts +1 -1
- package/build-types/card/card-body/component.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +222 -222
- package/build-types/card/card-body/hook.d.ts.map +1 -1
- package/build-types/card/card-divider/component.d.ts +1 -1
- package/build-types/card/card-divider/component.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +225 -225
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/card/card-footer/component.d.ts +1 -1
- package/build-types/card/card-footer/component.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +223 -223
- package/build-types/card/card-footer/hook.d.ts.map +1 -1
- package/build-types/card/card-header/component.d.ts +2 -2
- package/build-types/card/card-header/hook.d.ts +222 -222
- package/build-types/card/card-header/hook.d.ts.map +1 -1
- package/build-types/card/card-media/component.d.ts +3 -3
- package/build-types/card/card-media/component.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +222 -222
- package/build-types/card/card-media/hook.d.ts.map +1 -1
- package/build-types/dashicon/index.d.ts +1 -1
- package/build-types/dashicon/index.d.ts.map +1 -1
- package/build-types/disabled/styles/disabled-styles.d.ts +1 -1
- package/build-types/divider/component.d.ts +1 -1
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +1 -1
- package/build-types/dropdown/index.d.ts +14 -0
- package/build-types/dropdown/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/index.d.ts +3 -0
- package/build-types/dropdown-menu/index.d.ts.map +1 -0
- package/build-types/elevation/component.d.ts +2 -2
- package/build-types/elevation/component.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +221 -221
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/flex/flex/component.d.ts +1 -1
- package/build-types/flex/flex/component.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +222 -222
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/component.d.ts +2 -2
- package/build-types/flex/flex-block/component.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +222 -222
- package/build-types/flex/flex-block/hook.d.ts.map +1 -1
- package/build-types/flex/flex-item/component.d.ts +2 -2
- package/build-types/flex/flex-item/component.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +222 -222
- package/build-types/flex/flex-item/hook.d.ts.map +1 -1
- package/build-types/flex/types.d.ts +0 -1
- package/build-types/flex/types.d.ts.map +1 -1
- package/build-types/flyout/flyout/component.d.ts +1 -1
- package/build-types/flyout/flyout/component.d.ts.map +1 -1
- package/build-types/flyout/flyout/hook.d.ts +223 -223
- package/build-types/flyout/flyout/hook.d.ts.map +1 -1
- package/build-types/flyout/flyout-content/component.d.ts +1 -1
- package/build-types/flyout/flyout-content/component.d.ts.map +1 -1
- package/build-types/flyout/styles.d.ts +6 -6
- package/build-types/grid/component.d.ts +2 -2
- package/build-types/grid/component.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +222 -222
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/h-stack/component.d.ts +2 -2
- package/build-types/h-stack/component.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +222 -222
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/heading/component.d.ts +4 -3
- package/build-types/heading/component.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +227 -224
- package/build-types/heading/hook.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts +5 -5
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/label.d.ts +2 -2
- package/build-types/input-control/label.d.ts.map +1 -1
- package/build-types/input-control/reducer/actions.d.ts +1 -1
- package/build-types/input-control/reducer/actions.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts +1 -1
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/reducer/state.d.ts +1 -1
- package/build-types/input-control/reducer/state.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +13 -13
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +8 -7
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/item-group/item/component.d.ts +1 -1
- package/build-types/item-group/item/hook.d.ts +222 -225
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/component.d.ts +1 -1
- package/build-types/item-group/item-group/hook.d.ts +222 -222
- package/build-types/item-group/item-group/hook.d.ts.map +1 -1
- package/build-types/item-group/styles.d.ts.map +1 -1
- package/build-types/item-group/types.d.ts +0 -6
- package/build-types/item-group/types.d.ts.map +1 -1
- package/build-types/menu-group/index.d.ts +3 -0
- package/build-types/menu-group/index.d.ts.map +1 -0
- package/build-types/menu-item/index.d.ts +4 -0
- package/build-types/menu-item/index.d.ts.map +1 -0
- package/build-types/navigable-container/container.d.ts +3 -0
- package/build-types/navigable-container/container.d.ts.map +1 -0
- package/build-types/navigable-container/index.d.ts +3 -0
- package/build-types/navigable-container/index.d.ts.map +1 -0
- package/build-types/navigable-container/menu.d.ts +12 -0
- package/build-types/navigable-container/menu.d.ts.map +1 -0
- package/build-types/navigable-container/tabbable.d.ts +10 -0
- package/build-types/navigable-container/tabbable.d.ts.map +1 -0
- package/build-types/navigator/context.d.ts +7 -0
- package/build-types/navigator/context.d.ts.map +1 -0
- package/build-types/navigator/index.d.ts +4 -0
- package/build-types/navigator/index.d.ts.map +1 -0
- package/build-types/navigator/navigator-provider/component.d.ts +49 -0
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -0
- package/build-types/navigator/navigator-provider/index.d.ts +2 -0
- package/build-types/navigator/navigator-provider/index.d.ts.map +1 -0
- package/build-types/navigator/navigator-screen/component.d.ts +55 -0
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -0
- package/build-types/navigator/navigator-screen/index.d.ts +2 -0
- package/build-types/navigator/navigator-screen/index.d.ts.map +1 -0
- package/build-types/navigator/types.d.ts +39 -0
- package/build-types/navigator/types.d.ts.map +1 -0
- package/build-types/navigator/use-navigator.d.ts +7 -0
- package/build-types/navigator/use-navigator.d.ts.map +1 -0
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +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/utils.d.ts +29 -29
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts +0 -6
- package/build-types/range-control/input-range.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +14 -14
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/tooltip.d.ts +2 -2
- package/build-types/range-control/tooltip.d.ts.map +1 -1
- package/build-types/range-control/utils.d.ts +5 -5
- package/build-types/resizable-box/index.d.ts +29 -0
- package/build-types/resizable-box/index.d.ts.map +1 -0
- package/build-types/resizable-box/resize-tooltip/index.d.ts +22 -0
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -0
- package/build-types/resizable-box/resize-tooltip/label.d.ts +12 -0
- package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -0
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +20 -0
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -0
- package/build-types/resizable-box/resize-tooltip/utils.d.ts +39 -0
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -0
- package/build-types/resizable-box/styles/resizable-box.styles.d.ts +1 -0
- package/build-types/resizable-box/styles/resizable-box.styles.d.ts.map +1 -0
- package/build-types/scrollable/component.d.ts +3 -3
- package/build-types/scrollable/component.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +222 -222
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +6 -3
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +2 -2
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/spacer/component.d.ts +3 -2
- package/build-types/spacer/component.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +225 -222
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/spinner/styles/spinner-styles.d.ts +1 -1
- package/build-types/surface/component.d.ts +22 -2
- package/build-types/surface/component.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +222 -222
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/surface/styles.d.ts +4 -4
- package/build-types/text/component.d.ts +2 -2
- package/build-types/text/component.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +223 -223
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text/utils.d.ts +1 -1
- package/build-types/toggle-group-control/context.d.ts +9 -0
- package/build-types/toggle-group-control/context.d.ts.map +1 -0
- package/build-types/toggle-group-control/index.d.ts +3 -0
- package/build-types/toggle-group-control/index.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts +30 -0
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/index.d.ts +2 -0
- package/build-types/toggle-group-control/toggle-group-control/index.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +8 -0
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +9 -0
- package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +25 -0
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control-option/index.d.ts +2 -0
- package/build-types/toggle-group-control/toggle-group-control-option/index.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts +19 -0
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -0
- package/build-types/toggle-group-control/types.d.ts +73 -0
- package/build-types/toggle-group-control/types.d.ts.map +1 -0
- package/build-types/tools-panel/context.d.ts +8 -0
- package/build-types/tools-panel/context.d.ts.map +1 -0
- package/build-types/tools-panel/index.d.ts +4 -0
- package/build-types/tools-panel/index.d.ts.map +1 -0
- package/build-types/tools-panel/styles.d.ts +14 -0
- package/build-types/tools-panel/styles.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel/component.d.ts +4 -0
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel/hook.d.ts +279 -0
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel/index.d.ts +3 -0
- package/build-types/tools-panel/tools-panel/index.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel-header/component.d.ts +4 -0
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +272 -0
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel-header/index.d.ts +2 -0
- package/build-types/tools-panel/tools-panel-header/index.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel-item/component.d.ts +4 -0
- package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +266 -0
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel-item/index.d.ts +3 -0
- package/build-types/tools-panel/tools-panel-item/index.d.ts.map +1 -0
- package/build-types/tools-panel/types.d.ts +135 -0
- package/build-types/tools-panel/types.d.ts.map +1 -0
- package/build-types/tooltip/index.d.ts +2 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/truncate/component.d.ts +2 -2
- package/build-types/truncate/component.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +222 -222
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/ui/context/context-connect.d.ts +5 -5
- package/build-types/ui/context/context-connect.d.ts.map +1 -1
- package/build-types/ui/context/index.d.ts +1 -1
- package/build-types/ui/context/use-context-system.d.ts +1 -1
- package/build-types/ui/context/use-context-system.d.ts.map +1 -1
- package/build-types/ui/context/{polymorphic-component.d.ts → wordpress-component.d.ts} +6 -6
- package/build-types/ui/context/wordpress-component.d.ts.map +1 -0
- package/build-types/ui/control-group/component.d.ts +1 -1
- package/build-types/ui/control-group/component.d.ts.map +1 -1
- package/build-types/ui/control-group/hook.d.ts +224 -224
- package/build-types/ui/control-group/hook.d.ts.map +1 -1
- package/build-types/ui/control-label/component.d.ts +2 -2
- package/build-types/ui/control-label/component.d.ts.map +1 -1
- package/build-types/ui/control-label/hook.d.ts +224 -224
- package/build-types/ui/control-label/hook.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group-content.d.ts +2 -2
- package/build-types/ui/form-group/form-group-content.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group-context.d.ts +1 -1
- package/build-types/ui/form-group/form-group-context.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group-label.d.ts +2 -2
- package/build-types/ui/form-group/form-group-label.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group.d.ts +14 -14
- package/build-types/ui/form-group/use-form-group.d.ts +470 -470
- package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
- package/build-types/ui/shortcut/component.d.ts +1 -1
- package/build-types/ui/shortcut/component.d.ts.map +1 -1
- package/build-types/ui/spinner/component.d.ts +1 -1
- package/build-types/ui/spinner/styles.d.ts +3 -3
- package/build-types/ui/tooltip/component.d.ts +1 -1
- package/build-types/ui/tooltip/component.d.ts.map +1 -1
- package/build-types/ui/tooltip/content.d.ts +1 -1
- package/build-types/ui/tooltip/context.d.ts +1 -1
- package/build-types/ui/tooltip/styles.d.ts +4 -4
- package/build-types/ui/utils/colors.d.ts.map +1 -1
- package/build-types/ui/utils/index.d.ts +0 -1
- package/build-types/ui/utils/space.d.ts.map +1 -1
- package/build-types/ui/utils/use-responsive-value.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +35 -0
- package/build-types/unit-control/index.d.ts.map +1 -0
- package/build-types/unit-control/styles/unit-control-styles.d.ts +41 -0
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -0
- package/build-types/unit-control/types.d.ts +106 -0
- package/build-types/unit-control/types.d.ts.map +1 -0
- package/build-types/unit-control/unit-select-control.d.ts +8 -0
- package/build-types/unit-control/unit-select-control.d.ts.map +1 -0
- package/build-types/unit-control/utils.d.ts +102 -0
- package/build-types/unit-control/utils.d.ts.map +1 -0
- package/build-types/utils/colors.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +9 -9
- package/build-types/utils/hooks/index.d.ts +1 -1
- package/build-types/utils/hooks/use-combined-ref.d.ts +8 -0
- package/build-types/utils/hooks/use-combined-ref.d.ts.map +1 -0
- package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
- package/build-types/utils/rtl.d.ts +12 -0
- package/build-types/utils/rtl.d.ts.map +1 -1
- package/build-types/v-stack/component.d.ts +2 -2
- package/build-types/v-stack/component.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +222 -222
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/build-types/view/component.d.ts +2 -2
- package/build-types/view/component.d.ts.map +1 -1
- package/build-types/visually-hidden/component.d.ts +1 -1
- package/build-types/visually-hidden/component.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts +1 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/build-types/z-stack/styles.d.ts +2 -2
- package/package.json +18 -18
- package/src/alignment-matrix-control/README.md +60 -2
- package/src/alignment-matrix-control/stories/index.js +3 -0
- package/src/angle-picker-control/index.js +42 -40
- package/src/angle-picker-control/styles/angle-picker-control-styles.js +10 -7
- package/src/animate/index.js +1 -1
- package/src/autocomplete/autocompleter-ui.native.js +4 -3
- package/src/base-control/index.js +2 -2
- package/src/base-control/stories/index.js +7 -1
- package/src/base-field/hook.js +1 -1
- package/src/base-field/test/__snapshots__/index.js.snap +1 -1
- package/src/button/index.js +7 -2
- package/src/button/stories/index.js +14 -9
- package/src/card/card/component.js +2 -2
- package/src/card/card/hook.js +3 -5
- package/src/card/card-body/component.js +2 -2
- package/src/card/card-body/hook.js +1 -1
- package/src/card/card-divider/component.js +2 -2
- package/src/card/card-divider/hook.js +1 -1
- package/src/card/card-footer/component.js +2 -2
- package/src/card/card-footer/hook.js +1 -1
- package/src/card/card-header/component.js +2 -2
- package/src/card/card-header/hook.js +1 -1
- package/src/card/card-media/component.js +14 -7
- package/src/card/card-media/hook.js +1 -1
- package/src/card/stories/index.js +3 -0
- package/src/card/test/__snapshots__/index.js.snap +25 -25
- package/src/checkbox-control/stories/index.js +3 -0
- package/src/circular-option-picker/style.scss +3 -5
- package/src/clipboard-button/README.md +41 -1
- package/src/color-edit/index.js +248 -275
- package/src/color-edit/style.scss +4 -45
- package/src/color-edit/styles.js +97 -0
- package/src/color-indicator/stories/index.js +3 -0
- package/src/color-list-picker/index.js +5 -0
- package/src/color-list-picker/style.scss +4 -0
- package/src/color-palette/index.js +131 -59
- package/src/color-palette/stories/index.js +7 -1
- package/src/color-palette/style.native.scss +1 -1
- package/src/color-palette/style.scss +18 -0
- package/src/color-palette/styles.js +19 -0
- package/src/color-palette/test/__snapshots__/index.js.snap +453 -496
- package/src/color-picker/README.md +41 -12
- package/src/{ui/color-picker → color-picker}/color-display.tsx +41 -27
- package/src/{ui/color-picker → color-picker}/color-input.tsx +3 -3
- package/src/color-picker/component.tsx +138 -0
- package/src/color-picker/hex-input.tsx +54 -0
- package/src/{ui/color-picker → color-picker}/hsl-input.tsx +42 -26
- package/src/color-picker/index.native.js +14 -9
- package/src/color-picker/index.ts +4 -0
- package/src/{ui/color-picker → color-picker}/input-with-slider.tsx +13 -10
- package/src/color-picker/legacy-adapter.tsx +11 -0
- package/src/color-picker/picker.tsx +31 -0
- package/src/{ui/color-picker → color-picker}/rgb-input.tsx +9 -9
- package/src/color-picker/stories/index.js +63 -12
- package/src/color-picker/styles.ts +123 -0
- package/src/color-picker/test/index.js +114 -87
- package/src/{ui/color-picker → color-picker}/types.ts +0 -0
- package/src/color-picker/use-deprecated-props.ts +148 -0
- package/src/combobox-control/index.js +27 -4
- package/src/custom-gradient-bar/constants.js +2 -2
- package/src/custom-gradient-bar/control-points.js +44 -56
- package/src/custom-gradient-picker/index.js +5 -7
- package/src/custom-gradient-picker/style.scss +41 -18
- package/src/custom-gradient-picker/styles/custom-gradient-picker-styles.js +1 -1
- package/src/custom-gradient-picker/utils.js +6 -3
- package/src/custom-select-control/README.md +7 -0
- package/src/custom-select-control/index.js +28 -9
- package/src/custom-select-control/style.scss +10 -4
- package/src/dashicon/index.native.js +18 -0
- package/src/date-time/README.md +0 -9
- package/src/date-time/index.js +2 -1
- package/src/date-time/stories/index.js +3 -0
- package/src/date-time/stories/time.js +7 -1
- package/src/date-time/style.scss +5 -0
- package/src/dimension-control/sizes.js +6 -6
- package/src/divider/component.tsx +6 -4
- package/src/divider/stories/index.js +3 -0
- package/src/drop-zone/index.js +63 -11
- package/src/drop-zone/style.scss +11 -20
- package/src/dropdown/README.md +13 -12
- package/src/dropdown/index.js +5 -0
- package/src/dropdown/style.scss +8 -2
- package/src/dropdown-menu/index.js +18 -32
- package/src/dropdown-menu/index.native.js +0 -19
- package/src/dropdown-menu/stories/index.js +24 -10
- package/src/dropdown-menu/style.scss +11 -10
- package/src/duotone-picker/README.md +6 -6
- package/src/duotone-picker/custom-duotone-bar.js +0 -1
- package/src/duotone-picker/duotone-picker.js +1 -0
- package/src/duotone-picker/utils.js +5 -2
- package/src/elevation/component.js +14 -7
- package/src/elevation/hook.js +1 -1
- package/src/elevation/stories/index.js +3 -0
- package/src/external-link/stories/index.js +7 -1
- package/src/flex/flex/README.md +0 -3
- package/src/flex/flex/component.js +2 -2
- package/src/flex/flex/hook.js +41 -31
- package/src/flex/flex-block/component.js +14 -7
- package/src/flex/flex-block/hook.js +1 -1
- package/src/flex/flex-item/component.js +14 -7
- package/src/flex/flex-item/hook.js +1 -1
- package/src/flex/stories/index.js +1 -1
- package/src/flex/test/__snapshots__/index.js.snap +1 -1
- package/src/flex/types.ts +0 -1
- package/src/flyout/flyout/component.js +2 -2
- package/src/flyout/flyout/hook.js +1 -1
- package/src/flyout/flyout-content/component.js +2 -2
- package/src/flyout/test/__snapshots__/index.js.snap +1 -1
- package/src/focal-point-picker/controls.js +1 -1
- package/src/focusable-iframe/README.md +2 -0
- package/src/focusable-iframe/index.js +6 -29
- package/src/font-size-picker/README.md +9 -0
- package/src/font-size-picker/index.js +196 -108
- package/src/font-size-picker/index.native.js +184 -0
- package/src/font-size-picker/stories/index.js +55 -3
- package/src/font-size-picker/style.native.scss +6 -0
- package/src/font-size-picker/style.scss +16 -11
- package/src/font-size-picker/test/index.js +8 -0
- package/src/font-size-picker/utils.js +101 -0
- package/src/form-token-field/stories/index.js +3 -0
- package/src/gradient-picker/index.js +79 -11
- package/src/gradient-picker/stories/index.js +3 -0
- package/src/grid/component.js +14 -7
- package/src/grid/hook.js +1 -1
- package/src/grid/stories/index.js +3 -0
- package/src/guide/index.js +8 -9
- package/src/guide/stories/index.js +7 -1
- package/src/h-stack/component.js +14 -7
- package/src/h-stack/hook.js +1 -1
- package/src/h-stack/stories/index.js +1 -1
- package/src/h-stack/test/__snapshots__/index.js.snap +3 -3
- package/src/heading/component.tsx +37 -0
- package/src/heading/hook.ts +7 -8
- package/src/heading/stories/index.js +1 -1
- package/src/heading/test/__snapshots__/index.js.snap +1 -1
- package/src/higher-order/navigate-regions/index.js +62 -36
- package/src/icon/stories/index.js +17 -11
- package/src/index.js +12 -5
- package/src/index.native.js +4 -1
- package/src/input-control/input-field.tsx +2 -2
- package/src/input-control/label.tsx +2 -2
- package/src/input-control/reducer/actions.ts +1 -4
- package/src/input-control/reducer/reducer.ts +1 -1
- package/src/input-control/reducer/state.ts +1 -1
- package/src/input-control/stories/index.js +3 -0
- package/src/input-control/styles/input-control-styles.tsx +2 -2
- package/src/input-control/types.ts +10 -8
- package/src/item-group/item/README.md +2 -3
- package/src/item-group/item/component.tsx +2 -2
- package/src/item-group/item/hook.ts +24 -12
- package/src/item-group/item-group/component.tsx +2 -2
- package/src/item-group/item-group/hook.ts +2 -2
- package/src/item-group/stories/index.js +98 -15
- package/src/item-group/styles.ts +5 -1
- package/src/item-group/test/__snapshots__/index.js.snap +11 -32
- package/src/item-group/test/index.js +28 -10
- package/src/item-group/types.ts +0 -6
- package/src/menu-group/index.js +3 -6
- package/src/menu-group/style.scss +1 -0
- package/src/menu-item/README.md +8 -0
- package/src/menu-item/index.js +13 -24
- package/src/menu-item/style.scss +17 -3
- package/src/menu-item/test/__snapshots__/index.js.snap +2 -2
- package/src/mobile/README.md +3 -0
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +17 -7
- package/src/mobile/bottom-sheet/cell.native.js +29 -3
- package/src/mobile/bottom-sheet/cellStyles.android.scss +5 -1
- package/src/mobile/bottom-sheet/cellStyles.ios.scss +5 -1
- package/src/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js +7 -6
- package/src/mobile/bottom-sheet/index.native.js +18 -5
- package/src/mobile/bottom-sheet/link-cell.native.js +10 -3
- package/src/mobile/bottom-sheet/nav-bar/README.md +63 -0
- package/src/mobile/bottom-sheet/nav-bar/action-button.native.js +30 -0
- package/src/mobile/bottom-sheet/nav-bar/apply-button.native.js +53 -0
- package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +94 -0
- package/src/mobile/bottom-sheet/nav-bar/heading.native.js +33 -0
- package/src/mobile/bottom-sheet/nav-bar/index.native.js +23 -0
- package/src/mobile/bottom-sheet/nav-bar/styles.native.scss +69 -0
- package/src/mobile/bottom-sheet/range-cell.native.js +12 -2
- package/src/mobile/bottom-sheet/range-text-input.native.js +1 -0
- package/src/mobile/bottom-sheet/stepper-cell/stepper.ios.js +2 -2
- package/src/mobile/bottom-sheet/styles.native.scss +32 -14
- package/src/mobile/bottom-sheet/sub-sheet/README.md +4 -4
- package/src/mobile/bottom-sheet-select-control/index.native.js +6 -4
- package/src/mobile/bottom-sheet-text-control/index.native.js +8 -9
- package/src/mobile/color-settings/gradient-picker-screen.native.js +5 -5
- package/src/mobile/color-settings/palette.screen.native.js +25 -11
- package/src/mobile/color-settings/picker-screen.native.js +1 -1
- package/src/mobile/color-settings/style.native.scss +11 -0
- package/src/mobile/dashicons/index.native.js +22 -0
- package/src/mobile/focal-point-settings-panel/index.native.js +12 -7
- package/src/mobile/global-styles-context/index.native.js +15 -2
- package/src/mobile/global-styles-context/test/fixtures/theme.native.js +6 -0
- package/src/mobile/global-styles-context/test/utils.native.js +3 -3
- package/src/mobile/global-styles-context/utils.native.js +120 -7
- package/src/mobile/html-text-input/index.native.js +17 -10
- package/src/mobile/inserter-button/index.native.js +4 -7
- package/src/mobile/inserter-button/style.native.scss +0 -5
- package/src/mobile/link-picker/index.native.js +6 -7
- package/src/mobile/link-settings/image-link-destinations-screen.native.js +148 -0
- package/src/mobile/link-settings/index.native.js +3 -2
- package/src/mobile/link-settings/link-settings-navigation.native.js +1 -0
- package/src/mobile/link-settings/link-settings-screen.native.js +6 -2
- package/src/mobile/link-settings/style.native.scss +17 -0
- package/src/mobile/picker/index.android.js +2 -1
- package/src/mobile/segmented-control/index.native.js +1 -0
- package/src/modal/README.md +8 -0
- package/src/modal/index.js +158 -150
- package/src/modal/stories/index.js +11 -4
- package/src/modal/style.scss +5 -0
- package/src/navigable-container/container.js +1 -0
- package/src/navigable-container/index.js +1 -0
- package/src/navigable-container/menu.js +1 -0
- package/src/navigable-container/tabbable.js +1 -0
- package/src/navigation/README.md +9 -0
- package/src/navigation/group/index.js +1 -2
- package/src/navigation/menu/index.js +9 -7
- package/src/navigation/menu/menu-title-search.js +11 -26
- package/src/navigation/menu/menu-title.js +4 -4
- package/src/navigation/styles/navigation-styles.js +59 -74
- package/src/navigator/context.ts +12 -0
- package/src/navigator/index.ts +3 -0
- package/src/navigator/navigator-provider/README.md +75 -0
- package/src/navigator/navigator-provider/component.tsx +107 -0
- package/src/{tools-panel/tools-panel-header/index.js → navigator/navigator-provider/index.ts} +0 -0
- package/src/navigator/navigator-screen/README.md +21 -0
- package/src/navigator/navigator-screen/component.tsx +185 -0
- package/src/navigator/navigator-screen/index.ts +1 -0
- package/src/navigator/stories/index.js +188 -0
- package/src/navigator/test/index.js +218 -0
- package/src/navigator/types.ts +45 -0
- package/src/navigator/use-navigator.ts +25 -0
- package/src/notice/stories/index.js +3 -0
- package/src/number-control/README.md +18 -2
- package/src/number-control/index.js +32 -34
- package/src/number-control/stories/index.js +4 -1
- package/src/number-control/test/index.js +40 -0
- package/src/panel/body.native.js +4 -1
- package/src/panel/stories/index.js +13 -2
- package/src/panel/style.scss +1 -2
- package/src/placeholder/stories/index.js +7 -1
- package/src/popover/index.js +14 -24
- package/src/popover/stories/index.js +7 -1
- package/src/popover/utils.js +69 -36
- package/src/query-controls/index.native.js +33 -31
- package/src/range-control/README.md +13 -7
- package/src/range-control/index.js +9 -2
- package/src/range-control/input-range.js +0 -17
- package/src/range-control/rail.js +3 -0
- package/src/range-control/stories/index.js +36 -8
- package/src/range-control/styles/range-control-styles.js +29 -24
- package/src/range-control/tooltip.js +11 -22
- package/src/resizable-box/index.tsx +128 -0
- package/src/resizable-box/resize-tooltip/{index.js → index.tsx} +19 -6
- package/src/resizable-box/resize-tooltip/{label.js → label.tsx} +23 -9
- package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +1 -1
- package/src/resizable-box/resize-tooltip/{utils.js → utils.ts} +51 -30
- package/src/resizable-box/stories/index.js +7 -1
- package/src/resizable-box/style.scss +9 -1
- package/src/sandbox/index.js +3 -7
- package/src/sandbox/index.native.js +75 -25
- package/src/sandbox/style.native.scss +4 -0
- package/src/scrollable/README.md +1 -1
- package/src/scrollable/component.js +15 -8
- package/src/scrollable/hook.js +1 -1
- package/src/scrollable/stories/index.js +3 -0
- package/src/search-control/index.js +47 -23
- package/src/search-control/index.native.js +14 -5
- package/src/search-control/platform-style.android.scss +1 -4
- package/src/search-control/platform-style.ios.scss +0 -3
- package/src/search-control/stories/index.js +3 -0
- package/src/search-control/style.native.scss +1 -3
- package/src/search-control/style.scss +1 -1
- package/src/select-control/README.md +36 -4
- package/src/select-control/index.tsx +21 -19
- package/src/select-control/stories/index.js +38 -1
- package/src/select-control/test/select-control.js +82 -0
- package/src/slot-fill/stories/index.js +3 -0
- package/src/snackbar/index.js +4 -0
- package/src/snackbar/list.js +4 -1
- package/src/snackbar/stories/index.js +7 -1
- package/src/spacer/{component.ts → component.tsx} +20 -7
- package/src/spacer/hook.ts +2 -4
- package/src/spacer/stories/index.js +3 -0
- package/src/style.scss +1 -1
- package/src/surface/README.md +1 -1
- package/src/surface/component.js +15 -6
- package/src/surface/hook.js +1 -1
- package/src/surface/stories/index.js +3 -0
- package/src/tab-panel/stories/index.js +7 -1
- package/src/text/component.js +14 -7
- package/src/text/hook.js +1 -1
- package/src/text/styles.js +1 -1
- package/src/text/test/__snapshots__/index.js.snap +2 -2
- package/src/text-control/stories/index.js +3 -0
- package/src/text-highlight/stories/index.js +7 -1
- package/src/textarea-control/stories/index.js +3 -0
- package/src/tip/stories/index.js +7 -1
- package/src/toggle-control/index.native.js +8 -2
- package/src/toggle-control/stories/index.js +7 -1
- package/src/toggle-group-control/context.ts +16 -0
- package/src/toggle-group-control/index.ts +2 -0
- package/src/toggle-group-control/stories/index.js +142 -0
- package/src/{segmented-control → toggle-group-control}/test/__snapshots__/index.js.snap +95 -117
- package/src/toggle-group-control/test/index.js +41 -0
- package/src/toggle-group-control/toggle-group-control/README.md +76 -0
- package/src/toggle-group-control/toggle-group-control/component.tsx +150 -0
- package/src/toggle-group-control/toggle-group-control/index.ts +1 -0
- package/src/toggle-group-control/toggle-group-control/styles.ts +52 -0
- package/src/{segmented-control/segmented-control-backdrop.tsx → toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx} +18 -7
- package/src/toggle-group-control/toggle-group-control-option/README.md +40 -0
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +104 -0
- package/src/toggle-group-control/toggle-group-control-option/index.ts +1 -0
- package/src/{segmented-control → toggle-group-control/toggle-group-control-option}/styles.ts +2 -55
- package/src/{segmented-control → toggle-group-control}/types.ts +19 -24
- package/src/toolbar-button/stories/index.js +13 -3
- package/src/tools-panel/context.ts +25 -0
- package/src/tools-panel/{index.js → index.ts} +1 -0
- package/src/tools-panel/stories/index.js +166 -8
- package/src/tools-panel/stories/typography-panel.js +215 -0
- package/src/tools-panel/styles.ts +118 -0
- package/src/tools-panel/test/index.js +288 -38
- package/src/tools-panel/tools-panel/README.md +23 -10
- package/src/tools-panel/tools-panel/component.tsx +49 -0
- package/src/tools-panel/tools-panel/hook.ts +220 -0
- package/src/tools-panel/tools-panel/{index.js → index.ts} +0 -0
- package/src/tools-panel/tools-panel-header/README.md +6 -11
- package/src/tools-panel/tools-panel-header/component.tsx +194 -0
- package/src/tools-panel/tools-panel-header/hook.ts +51 -0
- package/src/tools-panel/tools-panel-header/index.ts +1 -0
- package/src/tools-panel/tools-panel-item/README.md +38 -2
- package/src/tools-panel/tools-panel-item/component.tsx +46 -0
- package/src/tools-panel/tools-panel-item/hook.ts +129 -0
- package/src/tools-panel/tools-panel-item/{index.js → index.ts} +0 -0
- package/src/tools-panel/types.ts +142 -0
- package/src/tooltip/README.md +8 -0
- package/src/tooltip/index.js +14 -3
- package/src/tooltip/index.native.js +1 -0
- package/src/tooltip/stories/index.js +40 -2
- package/src/tooltip/test/index.js +54 -0
- package/src/tooltip/test/index.native.js +103 -0
- package/src/tree-grid/index.js +3 -1
- package/src/tree-select/stories/index.js +3 -0
- package/src/truncate/component.js +14 -7
- package/src/truncate/hook.js +1 -1
- package/src/truncate/stories/index.js +4 -1
- package/src/ui/context/context-connect.js +3 -3
- package/src/ui/context/index.js +1 -1
- package/src/ui/context/stories/ComponentsProvider.stories.js +1 -1
- package/src/ui/context/use-context-system.js +1 -1
- package/src/ui/context/{polymorphic-component.ts → wordpress-component.ts} +7 -7
- package/src/ui/control-group/component.js +2 -2
- package/src/ui/control-group/hook.js +1 -1
- package/src/ui/control-group/test/__snapshots__/index.js.snap +1 -1
- package/src/ui/control-label/component.js +14 -7
- package/src/ui/control-label/hook.js +1 -1
- package/src/ui/control-label/stories/index.js +1 -1
- package/src/ui/control-label/test/__snapshots__/index.js.snap +3 -3
- package/src/ui/form-group/form-group-content.js +1 -1
- package/src/ui/form-group/form-group-label.js +1 -1
- package/src/ui/form-group/form-group.js +2 -2
- package/src/ui/form-group/stories/index.js +1 -1
- package/src/ui/form-group/test/__snapshots__/index.js.snap +2 -2
- package/src/ui/form-group/use-form-group.js +1 -1
- package/src/ui/shortcut/component.tsx +6 -4
- package/src/ui/spinner/component.js +2 -2
- package/src/ui/spinner/stories/index.js +1 -1
- package/src/ui/tooltip/component.js +2 -2
- package/src/ui/tooltip/content.js +2 -2
- package/src/ui/tooltip/stories/index.js +1 -1
- package/src/ui/tooltip/styles.js +1 -1
- package/src/ui/tooltip/test/__snapshots__/index.js.snap +1 -1
- package/src/ui/utils/colors.js +6 -7
- package/src/ui/utils/index.js +0 -1
- package/src/ui/utils/space.ts +2 -1
- package/src/ui/utils/use-responsive-value.ts +0 -3
- package/src/unit-control/README.md +21 -24
- package/src/unit-control/index.native.js +4 -0
- package/src/unit-control/{index.js → index.tsx} +73 -28
- package/src/unit-control/stories/index.js +47 -3
- package/src/unit-control/styles/{unit-control-styles.js → unit-control-styles.ts} +18 -7
- package/src/unit-control/test/index.js +18 -0
- package/src/unit-control/test/utils.js +123 -1
- package/src/unit-control/types.ts +115 -0
- package/src/unit-control/unit-select-control.tsx +62 -0
- package/src/unit-control/{utils.js → utils.ts} +121 -51
- package/src/utils/colors.js +5 -3
- package/src/utils/config-values.js +9 -8
- package/src/utils/hooks/index.js +1 -1
- package/src/utils/hooks/use-combined-ref.ts +29 -0
- package/src/utils/test/colors.js +11 -0
- package/src/v-stack/component.js +14 -7
- package/src/v-stack/hook.js +1 -1
- package/src/v-stack/test/__snapshots__/index.js.snap +3 -3
- package/src/view/component.js +1 -1
- package/src/visually-hidden/component.js +2 -2
- package/src/z-stack/component.tsx +2 -3
- package/src/z-stack/stories/index.js +3 -0
- package/tsconfig.json +15 -2
- package/tsconfig.tsbuildinfo +1 -10694
- package/build/color-picker/alpha.js +0 -202
- package/build/color-picker/alpha.js.map +0 -1
- package/build/color-picker/hue.js +0 -202
- package/build/color-picker/hue.js.map +0 -1
- package/build/color-picker/inputs.js +0 -345
- package/build/color-picker/inputs.js.map +0 -1
- package/build/color-picker/saturation.js +0 -209
- package/build/color-picker/saturation.js.map +0 -1
- package/build/color-picker/utils.js +0 -253
- package/build/color-picker/utils.js.map +0 -1
- package/build/mobile/bottom-sheet/navigation-header.native.js +0 -106
- package/build/mobile/bottom-sheet/navigation-header.native.js.map +0 -1
- package/build/modal/frame.js +0 -109
- package/build/modal/frame.js.map +0 -1
- package/build/modal/header.js +0 -53
- package/build/modal/header.js.map +0 -1
- package/build/segmented-control/component.js +0 -94
- package/build/segmented-control/component.js.map +0 -1
- package/build/segmented-control/index.js +0 -24
- package/build/segmented-control/index.js.map +0 -1
- package/build/segmented-control/segmented-control-backdrop.js.map +0 -1
- package/build/segmented-control/segmented-control-button.js +0 -85
- package/build/segmented-control/segmented-control-button.js.map +0 -1
- package/build/segmented-control/segmented-control-context.js +0 -20
- package/build/segmented-control/segmented-control-context.js.map +0 -1
- package/build/segmented-control/segmented-control-option.js +0 -70
- package/build/segmented-control/segmented-control-option.js.map +0 -1
- package/build/segmented-control/styles.js +0 -99
- package/build/segmented-control/styles.js.map +0 -1
- package/build/ui/color-picker/color-display.js.map +0 -1
- package/build/ui/color-picker/color-input.js.map +0 -1
- package/build/ui/color-picker/component.js.map +0 -1
- package/build/ui/color-picker/hex-input.js +0 -65
- package/build/ui/color-picker/hex-input.js.map +0 -1
- package/build/ui/color-picker/hsl-input.js.map +0 -1
- package/build/ui/color-picker/index.js.map +0 -1
- package/build/ui/color-picker/input-with-slider.js.map +0 -1
- package/build/ui/color-picker/picker.js +0 -36
- package/build/ui/color-picker/picker.js.map +0 -1
- package/build/ui/color-picker/rgb-input.js.map +0 -1
- package/build/ui/color-picker/styles.js +0 -51
- package/build/ui/color-picker/styles.js.map +0 -1
- package/build/ui/context/polymorphic-component.js +0 -2
- package/build/ui/utils/create-component.js +0 -59
- package/build/ui/utils/create-component.js.map +0 -1
- package/build/utils/hooks/use-jump-step.js +0 -57
- package/build/utils/hooks/use-jump-step.js.map +0 -1
- package/build-module/color-picker/alpha.js +0 -183
- package/build-module/color-picker/alpha.js.map +0 -1
- package/build-module/color-picker/hue.js +0 -182
- package/build-module/color-picker/hue.js.map +0 -1
- package/build-module/color-picker/inputs.js +0 -320
- package/build-module/color-picker/inputs.js.map +0 -1
- package/build-module/color-picker/saturation.js +0 -188
- package/build-module/color-picker/saturation.js.map +0 -1
- package/build-module/color-picker/utils.js +0 -232
- package/build-module/color-picker/utils.js.map +0 -1
- package/build-module/mobile/bottom-sheet/navigation-header.native.js +0 -91
- package/build-module/mobile/bottom-sheet/navigation-header.native.js.map +0 -1
- package/build-module/modal/frame.js +0 -96
- package/build-module/modal/frame.js.map +0 -1
- package/build-module/modal/header.js +0 -41
- package/build-module/modal/header.js.map +0 -1
- package/build-module/segmented-control/component.js +0 -77
- package/build-module/segmented-control/component.js.map +0 -1
- package/build-module/segmented-control/index.js +0 -3
- package/build-module/segmented-control/index.js.map +0 -1
- package/build-module/segmented-control/segmented-control-backdrop.js.map +0 -1
- package/build-module/segmented-control/segmented-control-button.js +0 -68
- package/build-module/segmented-control/segmented-control-button.js.map +0 -1
- package/build-module/segmented-control/segmented-control-context.js +0 -12
- package/build-module/segmented-control/segmented-control-context.js.map +0 -1
- package/build-module/segmented-control/segmented-control-option.js +0 -55
- package/build-module/segmented-control/segmented-control-option.js.map +0 -1
- package/build-module/segmented-control/styles.js +0 -83
- package/build-module/segmented-control/styles.js.map +0 -1
- package/build-module/ui/color-picker/color-display.js.map +0 -1
- package/build-module/ui/color-picker/color-input.js.map +0 -1
- package/build-module/ui/color-picker/component.js.map +0 -1
- package/build-module/ui/color-picker/hex-input.js +0 -48
- package/build-module/ui/color-picker/hex-input.js.map +0 -1
- package/build-module/ui/color-picker/hsl-input.js.map +0 -1
- package/build-module/ui/color-picker/index.js +0 -2
- package/build-module/ui/color-picker/index.js.map +0 -1
- package/build-module/ui/color-picker/input-with-slider.js.map +0 -1
- package/build-module/ui/color-picker/picker.js +0 -26
- package/build-module/ui/color-picker/picker.js.map +0 -1
- package/build-module/ui/color-picker/rgb-input.js.map +0 -1
- package/build-module/ui/color-picker/styles.js +0 -42
- package/build-module/ui/color-picker/styles.js.map +0 -1
- package/build-module/ui/context/polymorphic-component.js +0 -2
- package/build-module/ui/utils/create-component.js +0 -46
- package/build-module/ui/utils/create-component.js.map +0 -1
- package/build-module/utils/hooks/use-jump-step.js +0 -48
- package/build-module/utils/hooks/use-jump-step.js.map +0 -1
- package/build-types/segmented-control/component.d.ts +0 -4
- package/build-types/segmented-control/component.d.ts.map +0 -1
- package/build-types/segmented-control/index.d.ts +0 -3
- package/build-types/segmented-control/index.d.ts.map +0 -1
- package/build-types/segmented-control/segmented-control-backdrop.d.ts +0 -9
- package/build-types/segmented-control/segmented-control-backdrop.d.ts.map +0 -1
- package/build-types/segmented-control/segmented-control-button.d.ts +0 -6
- package/build-types/segmented-control/segmented-control-button.d.ts.map +0 -1
- package/build-types/segmented-control/segmented-control-context.d.ts +0 -9
- package/build-types/segmented-control/segmented-control-context.d.ts.map +0 -1
- package/build-types/segmented-control/segmented-control-option.d.ts +0 -4
- package/build-types/segmented-control/segmented-control-option.d.ts.map +0 -1
- package/build-types/segmented-control/styles.d.ts +0 -29
- package/build-types/segmented-control/styles.d.ts.map +0 -1
- package/build-types/segmented-control/types.d.ts +0 -77
- package/build-types/segmented-control/types.d.ts.map +0 -1
- package/build-types/ui/color-picker/color-display.d.ts +0 -14
- package/build-types/ui/color-picker/color-display.d.ts.map +0 -1
- package/build-types/ui/color-picker/color-input.d.ts +0 -14
- package/build-types/ui/color-picker/color-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/component.d.ts +0 -12
- package/build-types/ui/color-picker/component.d.ts.map +0 -1
- package/build-types/ui/color-picker/hex-input.d.ts +0 -13
- package/build-types/ui/color-picker/hex-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/hsl-input.d.ts +0 -13
- package/build-types/ui/color-picker/hsl-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/index.d.ts +0 -2
- package/build-types/ui/color-picker/index.d.ts.map +0 -1
- package/build-types/ui/color-picker/input-with-slider.d.ts +0 -12
- package/build-types/ui/color-picker/input-with-slider.d.ts.map +0 -1
- package/build-types/ui/color-picker/picker.d.ts +0 -13
- package/build-types/ui/color-picker/picker.d.ts.map +0 -1
- package/build-types/ui/color-picker/rgb-input.d.ts +0 -13
- package/build-types/ui/color-picker/rgb-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/styles.d.ts +0 -43
- package/build-types/ui/color-picker/styles.d.ts.map +0 -1
- package/build-types/ui/color-picker/types.d.ts +0 -2
- package/build-types/ui/color-picker/types.d.ts.map +0 -1
- package/build-types/ui/context/polymorphic-component.d.ts.map +0 -1
- package/build-types/ui/utils/create-component.d.ts +0 -22
- package/build-types/ui/utils/create-component.d.ts.map +0 -1
- package/build-types/utils/hooks/use-jump-step.d.ts +0 -25
- package/build-types/utils/hooks/use-jump-step.d.ts.map +0 -1
- package/src/color-picker/alpha.js +0 -184
- package/src/color-picker/hue.js +0 -184
- package/src/color-picker/index.js +0 -264
- package/src/color-picker/inputs.js +0 -305
- package/src/color-picker/saturation.js +0 -190
- package/src/color-picker/style.scss +0 -269
- package/src/color-picker/test/__snapshots__/index.js.snap +0 -817
- package/src/color-picker/test/input.js +0 -174
- package/src/color-picker/utils.js +0 -214
- package/src/focusable-iframe/stories/index.js +0 -19
- package/src/heading/component.ts +0 -25
- package/src/mobile/bottom-sheet/navigation-header.native.js +0 -137
- package/src/modal/frame.js +0 -111
- package/src/modal/header.js +0 -53
- package/src/resizable-box/index.js +0 -114
- package/src/segmented-control/README.md +0 -70
- package/src/segmented-control/component.tsx +0 -103
- package/src/segmented-control/index.ts +0 -2
- package/src/segmented-control/segmented-control-button.tsx +0 -72
- package/src/segmented-control/segmented-control-context.ts +0 -16
- package/src/segmented-control/segmented-control-option.tsx +0 -71
- package/src/segmented-control/stories/index.js +0 -59
- package/src/segmented-control/test/index.js +0 -42
- package/src/tools-panel/context.js +0 -7
- package/src/tools-panel/styles.js +0 -64
- package/src/tools-panel/tools-panel/component.js +0 -38
- package/src/tools-panel/tools-panel/hook.js +0 -79
- package/src/tools-panel/tools-panel-header/component.js +0 -81
- package/src/tools-panel/tools-panel-header/hook.js +0 -34
- package/src/tools-panel/tools-panel-item/component.js +0 -31
- package/src/tools-panel/tools-panel-item/hook.js +0 -67
- package/src/ui/color-picker/README.md +0 -57
- package/src/ui/color-picker/component.tsx +0 -141
- package/src/ui/color-picker/hex-input.tsx +0 -55
- package/src/ui/color-picker/index.ts +0 -1
- package/src/ui/color-picker/picker.tsx +0 -26
- package/src/ui/color-picker/stories/index.js +0 -59
- package/src/ui/color-picker/styles.ts +0 -61
- package/src/ui/utils/create-component.tsx +0 -59
- package/src/ui/utils/test/create-component.js +0 -70
- package/src/unit-control/unit-select-control.js +0 -70
- package/src/utils/hooks/test/use-jump-step.js +0 -127
- package/src/utils/hooks/use-jump-step.js +0 -51
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/visually-hidden/component.js"],"names":["VisuallyHidden","props","forwardedRef","style","styleProp","contextProps","visuallyHidden","ConnectedVisuallyHidden"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,SAASA,cAAT,CAAyBC,KAAzB,EAAgCC,YAAhC,EAA+C;AAC9C,QAAM;AAAEC,IAAAA,KAAK,EAAEC,SAAT;AAAoB,OAAGC;AAAvB,MAAwC,+BAC7CJ,KAD6C,EAE7C,gBAF6C,CAA9C;AAIA,SACC,4BAAC,UAAD;AACC,IAAA,GAAG,EAAGC;AADP,KAEMG,YAFN;AAGC,IAAA,KAAK,EAAG,EAAE,GAAGC,sBAAL;AAAqB,UAAKF,SAAS,IAAI,EAAlB;AAArB;AAHT,KADD;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,uBAAuB,GAAG,6BAC/BP,cAD+B,EAE/B,gBAF+B,CAAhC;eAKeO,uB","sourcesContent":["/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnect } from '../ui/context';\nimport { visuallyHidden } from './styles';\nimport { View } from '../view';\n\n/**\n * @param {import('../ui/context').
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/visually-hidden/component.js"],"names":["VisuallyHidden","props","forwardedRef","style","styleProp","contextProps","visuallyHidden","ConnectedVisuallyHidden"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,SAASA,cAAT,CAAyBC,KAAzB,EAAgCC,YAAhC,EAA+C;AAC9C,QAAM;AAAEC,IAAAA,KAAK,EAAEC,SAAT;AAAoB,OAAGC;AAAvB,MAAwC,+BAC7CJ,KAD6C,EAE7C,gBAF6C,CAA9C;AAIA,SACC,4BAAC,UAAD;AACC,IAAA,GAAG,EAAGC;AADP,KAEMG,YAFN;AAGC,IAAA,KAAK,EAAG,EAAE,GAAGC,sBAAL;AAAqB,UAAKF,SAAS,IAAI,EAAlB;AAArB;AAHT,KADD;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,uBAAuB,GAAG,6BAC/BP,cAD+B,EAE/B,gBAF+B,CAAhC;eAKeO,uB","sourcesContent":["/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnect } from '../ui/context';\nimport { visuallyHidden } from './styles';\nimport { View } from '../view';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props\n * @param {import('react').Ref<any>} forwardedRef\n */\nfunction VisuallyHidden( props, forwardedRef ) {\n\tconst { style: styleProp, ...contextProps } = useContextSystem(\n\t\tprops,\n\t\t'VisuallyHidden'\n\t);\n\treturn (\n\t\t<View\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...contextProps }\n\t\t\tstyle={ { ...visuallyHidden, ...( styleProp || {} ) } }\n\t\t/>\n\t);\n}\n\n/**\n * `VisuallyHidden` is a component used to render text intended to be visually\n * hidden, but will show for alternate devices, for example a screen reader.\n *\n * @example\n * ```jsx\n * import { VisuallyHidden } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VisuallyHidden>\n * \t\t\t<label>Code is Poetry</label>\n * \t\t</VisuallyHidden>\n * \t);\n * }\n * ```\n */\nconst ConnectedVisuallyHidden = contextConnect(\n\tVisuallyHidden,\n\t'VisuallyHidden'\n);\n\nexport default ConnectedVisuallyHidden;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/z-stack/component.tsx"],"names":["ZStack","props","forwardedRef","children","className","isLayered","isReversed","offset","otherProps","validChildren","childrenLastIndex","length","clonedChildren","map","child","index","zIndex","offsetAmount","key"],"mappings":";;;;;;;;;AASA;;;;AAKA;;AACA;;
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/z-stack/component.tsx"],"names":["ZStack","props","forwardedRef","children","className","isLayered","isReversed","offset","otherProps","validChildren","childrenLastIndex","length","clonedChildren","map","child","index","zIndex","offsetAmount","key"],"mappings":";;;;;;;;;AASA;;;;AAKA;;AACA;;AAEA;;AAjBA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AA+BA,SAASA,MAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,SAAS,GAAG,IAHP;AAILC,IAAAA,UAAU,GAAG,KAJR;AAKLC,IAAAA,MAAM,GAAG,CALJ;AAML,OAAGC;AANE,MAOF,+BAAkBP,KAAlB,EAAyB,QAAzB,CAPJ;AASA,QAAMQ,aAAa,GAAG,wCAAkBN,QAAlB,CAAtB;AACA,QAAMO,iBAAiB,GAAGD,aAAa,CAACE,MAAd,GAAuB,CAAjD;AAEA,QAAMC,cAAc,GAAGH,aAAa,CAACI,GAAd,CAAmB,CAAEC,KAAF,EAASC,KAAT,KAAoB;AAC7D,UAAMC,MAAM,GAAGV,UAAU,GAAGI,iBAAiB,GAAGK,KAAvB,GAA+BA,KAAxD;AACA,UAAME,YAAY,GAAGV,MAAM,GAAGQ,KAA9B;AAEA,UAAMG,GAAG,GAAG,6BAAgBJ,KAAhB,IAA0BA,KAAK,CAACI,GAAhC,GAAsCH,KAAlD;AAEA,WACC,4BAAC,uBAAD;AACC,MAAA,SAAS,EAAGV,SADb;AAEC,MAAA,YAAY,EAAGY,YAFhB;AAGC,MAAA,MAAM,EAAGD,MAHV;AAIC,MAAA,GAAG,EAAGE;AAJP,OAMGJ,KANH,CADD;AAUA,GAhBsB,CAAvB;AAkBA,SACC,4BAAC,kBAAD,6BACMN,UADN;AAEC,IAAA,SAAS,EAAGJ,SAFb;AAGC,IAAA,GAAG,EAAGF;AAHP,MAKGU,cALH,CADD;AASA;;eAEc,6BAAgBZ,MAAhB,EAAwB,QAAxB,C","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { Ref, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { isValidElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValidChildren } from '../ui/utils/get-valid-children';\nimport { contextConnect, useContextSystem } from '../ui/context';\nimport type { WordPressComponentProps } from '../ui/context';\nimport { ZStackView, ZStackChildView } from './styles';\n\nexport interface ZStackProps {\n\t/**\n\t * Layers children elements on top of each other (first: highest z-index, last: lowest z-index).\n\t *\n\t * @default true\n\t */\n\tisLayered?: boolean;\n\t/**\n\t * Reverse the layer ordering (first: lowest z-index, last: highest z-index).\n\t *\n\t * @default false\n\t */\n\tisReversed?: boolean;\n\t/**\n\t * The amount of offset between each child element.\n\t *\n\t * @default 0\n\t */\n\toffset?: number;\n\t/**\n\t * Child elements.\n\t */\n\tchildren: ReactNode;\n}\n\nfunction ZStack(\n\tprops: WordPressComponentProps< ZStackProps, 'div' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tisLayered = true,\n\t\tisReversed = false,\n\t\toffset = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ZStack' );\n\n\tconst validChildren = getValidChildren( children );\n\tconst childrenLastIndex = validChildren.length - 1;\n\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst zIndex = isReversed ? childrenLastIndex - index : index;\n\t\tconst offsetAmount = offset * index;\n\n\t\tconst key = isValidElement( child ) ? child.key : index;\n\n\t\treturn (\n\t\t\t<ZStackChildView\n\t\t\t\tisLayered={ isLayered }\n\t\t\t\toffsetAmount={ offsetAmount }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t\tkey={ key }\n\t\t\t>\n\t\t\t\t{ child }\n\t\t\t</ZStackChildView>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<ZStackView\n\t\t\t{ ...otherProps }\n\t\t\tclassName={ className }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ clonedChildren }\n\t\t</ZStackView>\n\t);\n}\n\nexport default contextConnect( ZStack, 'ZStack' );\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -9,52 +8,58 @@ import classnames from 'classnames';
|
|
|
9
8
|
* WordPress dependencies
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
|
-
import { useInstanceId } from '@wordpress/compose';
|
|
13
11
|
import { __ } from '@wordpress/i18n';
|
|
14
12
|
/**
|
|
15
13
|
* Internal dependencies
|
|
16
14
|
*/
|
|
17
15
|
|
|
18
|
-
import BaseControl from '../base-control';
|
|
19
16
|
import { FlexBlock, FlexItem } from '../flex';
|
|
20
|
-
import NumberControl from '../
|
|
17
|
+
import NumberControl from '../input-control';
|
|
21
18
|
import AngleCircle from './angle-circle';
|
|
22
19
|
import { Root } from './styles/angle-picker-control-styles';
|
|
20
|
+
import { space } from '../ui/utils/space';
|
|
21
|
+
import { Text } from '../text';
|
|
22
|
+
import { Spacer } from '../spacer';
|
|
23
23
|
export default function AnglePickerControl({
|
|
24
24
|
className,
|
|
25
|
-
hideLabelFromVision,
|
|
26
|
-
id: idProp,
|
|
27
25
|
label = __('Angle'),
|
|
28
26
|
onChange,
|
|
29
|
-
value
|
|
30
|
-
...props
|
|
27
|
+
value
|
|
31
28
|
}) {
|
|
32
|
-
const instanceId = useInstanceId(AnglePickerControl, 'components-angle-picker-control__input');
|
|
33
|
-
const id = idProp || instanceId;
|
|
34
|
-
|
|
35
29
|
const handleOnNumberChange = unprocessedValue => {
|
|
36
30
|
const inputValue = unprocessedValue !== '' ? parseInt(unprocessedValue, 10) : 0;
|
|
37
31
|
onChange(inputValue);
|
|
38
32
|
};
|
|
39
33
|
|
|
40
34
|
const classes = classnames('components-angle-picker-control', className);
|
|
41
|
-
return createElement(
|
|
42
|
-
className: classes
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
label: label
|
|
46
|
-
}, props), createElement(Root, null, createElement(FlexBlock, null, createElement(NumberControl, {
|
|
35
|
+
return createElement(Root, {
|
|
36
|
+
className: classes
|
|
37
|
+
}, createElement(FlexBlock, null, createElement(NumberControl, {
|
|
38
|
+
label: label,
|
|
47
39
|
className: "components-angle-picker-control__input-field",
|
|
48
|
-
id: id,
|
|
49
40
|
max: 360,
|
|
50
41
|
min: 0,
|
|
51
42
|
onChange: handleOnNumberChange,
|
|
52
43
|
step: "1",
|
|
53
|
-
value: value
|
|
54
|
-
|
|
44
|
+
value: value,
|
|
45
|
+
hideHTMLArrows: true,
|
|
46
|
+
suffix: createElement(Spacer, {
|
|
47
|
+
as: Text,
|
|
48
|
+
marginRight: space(3),
|
|
49
|
+
style: {
|
|
50
|
+
color: 'var( --wp-admin-theme-color )'
|
|
51
|
+
}
|
|
52
|
+
}, "\xB0")
|
|
53
|
+
})), createElement(FlexItem, {
|
|
54
|
+
style: {
|
|
55
|
+
marginLeft: space(4),
|
|
56
|
+
marginBottom: space(1),
|
|
57
|
+
marginTop: 'auto'
|
|
58
|
+
}
|
|
59
|
+
}, createElement(AngleCircle, {
|
|
55
60
|
"aria-hidden": "true",
|
|
56
61
|
value: value,
|
|
57
62
|
onChange: onChange
|
|
58
|
-
})))
|
|
63
|
+
})));
|
|
59
64
|
}
|
|
60
65
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/angle-picker-control/index.js"],"names":["classnames","
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/angle-picker-control/index.js"],"names":["classnames","__","FlexBlock","FlexItem","NumberControl","AngleCircle","Root","space","Text","Spacer","AnglePickerControl","className","label","onChange","value","handleOnNumberChange","unprocessedValue","inputValue","parseInt","classes","color","marginLeft","marginBottom","marginTop"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,EAAoBC,QAApB,QAAoC,SAApC;AACA,OAAOC,aAAP,MAA0B,kBAA1B;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,SAASC,IAAT,QAAqB,sCAArB;AACA,SAASC,KAAT,QAAsB,mBAAtB;AACA,SAASC,IAAT,QAAqB,SAArB;AACA,SAASC,MAAT,QAAuB,WAAvB;AAEA,eAAe,SAASC,kBAAT,CAA6B;AAC3CC,EAAAA,SAD2C;AAE3CC,EAAAA,KAAK,GAAGX,EAAE,CAAE,OAAF,CAFiC;AAG3CY,EAAAA,QAH2C;AAI3CC,EAAAA;AAJ2C,CAA7B,EAKX;AACH,QAAMC,oBAAoB,GAAKC,gBAAF,IAAwB;AACpD,UAAMC,UAAU,GACfD,gBAAgB,KAAK,EAArB,GAA0BE,QAAQ,CAAEF,gBAAF,EAAoB,EAApB,CAAlC,GAA6D,CAD9D;AAEAH,IAAAA,QAAQ,CAAEI,UAAF,CAAR;AACA,GAJD;;AAMA,QAAME,OAAO,GAAGnB,UAAU,CAAE,iCAAF,EAAqCW,SAArC,CAA1B;AAEA,SACC,cAAC,IAAD;AAAM,IAAA,SAAS,EAAGQ;AAAlB,KACC,cAAC,SAAD,QACC,cAAC,aAAD;AACC,IAAA,KAAK,EAAGP,KADT;AAEC,IAAA,SAAS,EAAC,8CAFX;AAGC,IAAA,GAAG,EAAG,GAHP;AAIC,IAAA,GAAG,EAAG,CAJP;AAKC,IAAA,QAAQ,EAAGG,oBALZ;AAMC,IAAA,IAAI,EAAC,GANN;AAOC,IAAA,KAAK,EAAGD,KAPT;AAQC,IAAA,cAAc,MARf;AASC,IAAA,MAAM,EACL,cAAC,MAAD;AACC,MAAA,EAAE,EAAGN,IADN;AAEC,MAAA,WAAW,EAAGD,KAAK,CAAE,CAAF,CAFpB;AAGC,MAAA,KAAK,EAAG;AACPa,QAAAA,KAAK,EAAE;AADA;AAHT;AAVF,IADD,CADD,EAwBC,cAAC,QAAD;AACC,IAAA,KAAK,EAAG;AACPC,MAAAA,UAAU,EAAEd,KAAK,CAAE,CAAF,CADV;AAEPe,MAAAA,YAAY,EAAEf,KAAK,CAAE,CAAF,CAFZ;AAGPgB,MAAAA,SAAS,EAAE;AAHJ;AADT,KAOC,cAAC,WAAD;AACC,mBAAY,MADb;AAEC,IAAA,KAAK,EAAGT,KAFT;AAGC,IAAA,QAAQ,EAAGD;AAHZ,IAPD,CAxBD,CADD;AAwCA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock, FlexItem } from '../flex';\nimport NumberControl from '../input-control';\nimport AngleCircle from './angle-circle';\nimport { Root } from './styles/angle-picker-control-styles';\nimport { space } from '../ui/utils/space';\nimport { Text } from '../text';\nimport { Spacer } from '../spacer';\n\nexport default function AnglePickerControl( {\n\tclassName,\n\tlabel = __( 'Angle' ),\n\tonChange,\n\tvalue,\n} ) {\n\tconst handleOnNumberChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== '' ? parseInt( unprocessedValue, 10 ) : 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = classnames( 'components-angle-picker-control', className );\n\n\treturn (\n\t\t<Root className={ classes }>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\thideHTMLArrows\n\t\t\t\t\tsuffix={\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas={ Text }\n\t\t\t\t\t\t\tmarginRight={ space( 3 ) }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tcolor: 'var( --wp-admin-theme-color )',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t°\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<FlexItem\n\t\t\t\tstyle={ {\n\t\t\t\t\tmarginLeft: space( 4 ),\n\t\t\t\t\tmarginBottom: space( 1 ),\n\t\t\t\t\tmarginTop: 'auto',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</FlexItem>\n\t\t</Root>\n\t);\n}\n"]}
|
|
@@ -11,27 +11,22 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
11
11
|
*/
|
|
12
12
|
import { Flex } from '../../flex';
|
|
13
13
|
import { COLORS } from '../../utils';
|
|
14
|
-
|
|
14
|
+
import { space } from '../../ui/utils/space';
|
|
15
|
+
import CONFIG from '../../utils/config-values';
|
|
16
|
+
const CIRCLE_SIZE = 32;
|
|
17
|
+
const INNER_CIRCLE_SIZE = 3;
|
|
15
18
|
export const Root = /*#__PURE__*/_styled(Flex, process.env.NODE_ENV === "production" ? {
|
|
16
19
|
target: "e65ony43"
|
|
17
20
|
} : {
|
|
18
21
|
target: "e65ony43",
|
|
19
22
|
label: "Root"
|
|
20
|
-
})(process.env.NODE_ENV === "production" ?
|
|
21
|
-
name: "1ww443i",
|
|
22
|
-
styles: "max-width:200px"
|
|
23
|
-
} : {
|
|
24
|
-
name: "1ww443i",
|
|
25
|
-
styles: "max-width:200px",
|
|
26
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFha0MiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9hbmdsZS1waWNrZXItY29udHJvbC9zdHlsZXMvYW5nbGUtcGlja2VyLWNvbnRyb2wtc3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tIC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IGJsb2NrO1xuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMDtcblx0bWFyZ2luOiBhdXRvO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IC0keyBDSVJDTEVfU0laRSAvIDIgfXB4O1xuXHR3aWR0aDogMXB4O1xuYDtcbiJdfQ== */",
|
|
27
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
-
});
|
|
23
|
+
})("margin-bottom:", space(2), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQmtDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91aS91dGlscy9zcGFjZSc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uLy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5jb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jogYXV0bztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRyaWdodDogMDtcblx0dG9wOiAtJHsgQ0lSQ0xFX1NJWkUgLyAyIH1weDtcblx0d2lkdGg6IDBweDtcbmA7XG4iXX0= */"));
|
|
29
24
|
export const CircleRoot = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
30
25
|
target: "e65ony42"
|
|
31
26
|
} : {
|
|
32
27
|
target: "e65ony42",
|
|
33
28
|
label: "CircleRoot"
|
|
34
|
-
})("border-radius:50%;border:
|
|
29
|
+
})("border-radius:50%;border:", CONFIG.borderWidth, " solid ", COLORS.ui.border, ";box-sizing:border-box;cursor:grab;height:", CIRCLE_SIZE, "px;overflow:hidden;width:", CIRCLE_SIZE, "px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQm9DIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3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tOiAwO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAwcHg7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogYXV0bztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRyaWdodDogMDtcblx0dG9wOiAtJHsgQ0lSQ0xFX1NJWkUgLyAyIH1weDtcblx0d2lkdGg6IDBweDtcbmA7XG4iXX0= */"));
|
|
35
30
|
export const CircleIndicatorWrapper = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
36
31
|
target: "e65ony41"
|
|
37
32
|
} : {
|
|
@@ -43,7 +38,7 @@ export const CircleIndicatorWrapper = _styled("div", process.env.NODE_ENV === "p
|
|
|
43
38
|
} : {
|
|
44
39
|
name: "1bhd2sw",
|
|
45
40
|
styles: "box-sizing:border-box;position:relative;width:100%;height:100%",
|
|
46
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
41
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QmdEIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb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ZGl1czogNTAlO1xuXHRib3JkZXI6ICR7IElOTkVSX0NJUkNMRV9TSVpFIH1weCBzb2xpZCAkeyBDT0xPUlMuYWRtaW4udGhlbWUgfTtcblx0Ym90dG9tOiAwO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAwcHg7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogYXV0bztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRyaWdodDogMDtcblx0dG9wOiAtJHsgQ0lSQ0xFX1NJWkUgLyAyIH1weDtcblx0d2lkdGg6IDBweDtcbmA7XG4iXX0= */",
|
|
47
42
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
48
43
|
});
|
|
49
44
|
export const CircleIndicator = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
@@ -51,5 +46,5 @@ export const CircleIndicator = _styled("div", process.env.NODE_ENV === "producti
|
|
|
51
46
|
} : {
|
|
52
47
|
target: "e65ony40",
|
|
53
48
|
label: "CircleIndicator"
|
|
54
|
-
})("background:", COLORS.
|
|
49
|
+
})("background:", COLORS.admin.theme, ";border-radius:50%;border:", INNER_CIRCLE_SIZE, "px solid ", COLORS.admin.theme, ";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-", CIRCLE_SIZE / 2, "px;width:0px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQ3lDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvb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zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaXJjbGVJbmRpY2F0b3IgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuYWRtaW4udGhlbWUgfTtcblx0Ym9yZGVyLXJhZGl1czogNTAlO1xuXHRib3JkZXI6ICR7IElOTkVSX0NJUkNMRV9TSVpFIH1weCBzb2xpZCAkeyBDT0xPUlMuYWRtaW4udGhlbWUgfTtcblx0Ym90dG9tOiAwO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAwcHg7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogYXV0bztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRyaWdodDogMDtcblx0dG9wOiAtJHsgQ0lSQ0xFX1NJWkUgLyAyIH1weDtcblx0d2lkdGg6IDBweDtcbmA7XG4iXX0= */"));
|
|
55
50
|
//# sourceMappingURL=angle-picker-control-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/angle-picker-control/styles/angle-picker-control-styles.js"],"names":["Flex","COLORS","CIRCLE_SIZE","Root","CircleRoot","ui","
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/angle-picker-control/styles/angle-picker-control-styles.js"],"names":["Flex","COLORS","space","CONFIG","CIRCLE_SIZE","INNER_CIRCLE_SIZE","Root","CircleRoot","borderWidth","ui","border","CircleIndicatorWrapper","CircleIndicator","admin","theme"],"mappings":";;;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,YAArB;AACA,SAASC,MAAT,QAAuB,aAAvB;AACA,SAASC,KAAT,QAAsB,sBAAtB;AACA,OAAOC,MAAP,MAAmB,2BAAnB;AAEA,MAAMC,WAAW,GAAG,EAApB;AACA,MAAMC,iBAAiB,GAAG,CAA1B;AAEA,OAAO,MAAMC,IAAI,GAAG,qBAAQN,IAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,mBACEE,KAAK,CAAE,CAAF,CADP,qgEAAV;AAIP,OAAO,MAAMK,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,gCAEXJ,MAAM,CAACK,WAFI,aAEmBP,MAAM,CAACQ,EAAP,CAAUC,MAF7B,gDAKXN,WALW,+BAOZA,WAPY,ugEAAhB;AAUP,OAAO,MAAMO,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA5B;AAOP,OAAO,MAAMC,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,kBACZX,MAAM,CAACY,KAAP,CAAaC,KADD,gCAGhBT,iBAHgB,eAGeJ,MAAM,CAACY,KAAP,CAAaC,KAH5B,iHAYlBV,WAAW,GAAG,CAZI,ihEAArB","sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport { COLORS } from '../../utils';\nimport { space } from '../../ui/utils/space';\nimport CONFIG from '../../utils/config-values';\n\nconst CIRCLE_SIZE = 32;\nconst INNER_CIRCLE_SIZE = 3;\n\nexport const Root = styled( Flex )`\n\tmargin-bottom: ${ space( 2 ) };\n`;\n\nexport const CircleRoot = styled.div`\n\tborder-radius: 50%;\n\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\tbox-sizing: border-box;\n\tcursor: grab;\n\theight: ${ CIRCLE_SIZE }px;\n\toverflow: hidden;\n\twidth: ${ CIRCLE_SIZE }px;\n`;\n\nexport const CircleIndicatorWrapper = styled.div`\n\tbox-sizing: border-box;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n`;\n\nexport const CircleIndicator = styled.div`\n\tbackground: ${ COLORS.admin.theme };\n\tborder-radius: 50%;\n\tborder: ${ INNER_CIRCLE_SIZE }px solid ${ COLORS.admin.theme };\n\tbottom: 0;\n\tbox-sizing: border-box;\n\tdisplay: block;\n\theight: 0px;\n\tleft: 0;\n\tmargin: auto;\n\tposition: absolute;\n\tright: 0;\n\ttop: -${ CIRCLE_SIZE / 2 }px;\n\twidth: 0px;\n`;\n"]}
|
|
@@ -7,7 +7,7 @@ import classnames from 'classnames';
|
|
|
7
7
|
* @typedef {'left' | 'right'} SlideInOrigin
|
|
8
8
|
* @typedef {{ type: 'appear'; origin?: AppearOrigin }} AppearOptions
|
|
9
9
|
* @typedef {{ type: 'slide-in'; origin?: SlideInOrigin }} SlideInOptions
|
|
10
|
-
* @typedef {{ type: 'loading'
|
|
10
|
+
* @typedef {{ type: 'loading' }} LoadingOptions
|
|
11
11
|
* @typedef {AppearOptions | SlideInOptions | LoadingOptions} GetAnimateOptions
|
|
12
12
|
*/
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/animate/index.js"],"names":["classnames","getDefaultOrigin","type","getAnimateClassName","options","origin","yAxis","xAxis","split","Animate","children","className"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AACA;AACA;AACA;AACA;;AACA,SAASC,gBAAT,CAA2BC,IAA3B,EAAkC;AACjC,SAAOA,IAAI,KAAK,QAAT,GAAoB,KAApB,GAA4B,MAAnC;AACA;AACD;;AAEA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASC,mBAAT,CAA8BC,OAA9B,EAAwC;AAC9C,MAAKA,OAAO,CAACF,IAAR,KAAiB,SAAtB,EAAkC;AACjC,WAAOF,UAAU,CAAE,6BAAF,CAAjB;AACA;;AAED,QAAM;AAAEE,IAAAA,IAAF;AAAQG,IAAAA,MAAM,GAAGJ,gBAAgB,CAAEC,IAAF;AAAjC,MAA8CE,OAApD;;AAEA,MAAKF,IAAI,KAAK,QAAd,EAAyB;AACxB,UAAM,CAAEI,KAAF,EAASC,KAAK,GAAG,QAAjB,IAA8BF,MAAM,CAACG,KAAP,CAAc,GAAd,CAApC;AACA,WAAOR,UAAU,CAAE,4BAAF,EAAgC;AAChD,OAAE,aAAaO,KAAf,GAAwBA,KAAK,KAAK,QADc;AAEhD,OAAE,aAAaD,KAAf,GAAwBA,KAAK,KAAK;AAFc,KAAhC,CAAjB;AAIA;;AAED,MAAKJ,IAAI,KAAK,UAAd,EAA2B;AAC1B,WAAOF,UAAU,CAChB,8BADgB,EAEhB,aAAaK,MAFG,CAAjB;AAIA;AACD,C,CAED;;AACA,eAAe,SAASI,OAAT,CAAkB;AAAEP,EAAAA,IAAF;AAAQE,EAAAA,OAAO,GAAG,EAAlB;AAAsBM,EAAAA;AAAtB,CAAlB,EAAqD;AACnE,SAAOA,QAAQ,CAAE;AAChBC,IAAAA,SAAS,EAAER,mBAAmB,CAAE;AAAED,MAAAA,IAAF;AAAQ,SAAGE;AAAX,KAAF;AADd,GAAF,CAAf;AAGA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * @typedef {'top' | 'top left' | 'top right' | 'middle' | 'middle left' | 'middle right' | 'bottom' | 'bottom left' | 'bottom right'} AppearOrigin\n * @typedef {'left' | 'right'} SlideInOrigin\n * @typedef {{ type: 'appear'; origin?: AppearOrigin }} AppearOptions\n * @typedef {{ type: 'slide-in'; origin?: SlideInOrigin }} SlideInOptions\n * @typedef {{ type: 'loading'
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/animate/index.js"],"names":["classnames","getDefaultOrigin","type","getAnimateClassName","options","origin","yAxis","xAxis","split","Animate","children","className"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AACA;AACA;AACA;AACA;;AACA,SAASC,gBAAT,CAA2BC,IAA3B,EAAkC;AACjC,SAAOA,IAAI,KAAK,QAAT,GAAoB,KAApB,GAA4B,MAAnC;AACA;AACD;;AAEA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASC,mBAAT,CAA8BC,OAA9B,EAAwC;AAC9C,MAAKA,OAAO,CAACF,IAAR,KAAiB,SAAtB,EAAkC;AACjC,WAAOF,UAAU,CAAE,6BAAF,CAAjB;AACA;;AAED,QAAM;AAAEE,IAAAA,IAAF;AAAQG,IAAAA,MAAM,GAAGJ,gBAAgB,CAAEC,IAAF;AAAjC,MAA8CE,OAApD;;AAEA,MAAKF,IAAI,KAAK,QAAd,EAAyB;AACxB,UAAM,CAAEI,KAAF,EAASC,KAAK,GAAG,QAAjB,IAA8BF,MAAM,CAACG,KAAP,CAAc,GAAd,CAApC;AACA,WAAOR,UAAU,CAAE,4BAAF,EAAgC;AAChD,OAAE,aAAaO,KAAf,GAAwBA,KAAK,KAAK,QADc;AAEhD,OAAE,aAAaD,KAAf,GAAwBA,KAAK,KAAK;AAFc,KAAhC,CAAjB;AAIA;;AAED,MAAKJ,IAAI,KAAK,UAAd,EAA2B;AAC1B,WAAOF,UAAU,CAChB,8BADgB,EAEhB,aAAaK,MAFG,CAAjB;AAIA;AACD,C,CAED;;AACA,eAAe,SAASI,OAAT,CAAkB;AAAEP,EAAAA,IAAF;AAAQE,EAAAA,OAAO,GAAG,EAAlB;AAAsBM,EAAAA;AAAtB,CAAlB,EAAqD;AACnE,SAAOA,QAAQ,CAAE;AAChBC,IAAAA,SAAS,EAAER,mBAAmB,CAAE;AAAED,MAAAA,IAAF;AAAQ,SAAGE;AAAX,KAAF;AADd,GAAF,CAAf;AAGA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * @typedef {'top' | 'top left' | 'top right' | 'middle' | 'middle left' | 'middle right' | 'bottom' | 'bottom left' | 'bottom right'} AppearOrigin\n * @typedef {'left' | 'right'} SlideInOrigin\n * @typedef {{ type: 'appear'; origin?: AppearOrigin }} AppearOptions\n * @typedef {{ type: 'slide-in'; origin?: SlideInOrigin }} SlideInOptions\n * @typedef {{ type: 'loading' }} LoadingOptions\n * @typedef {AppearOptions | SlideInOptions | LoadingOptions} GetAnimateOptions\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * @param {GetAnimateOptions['type']} type The animation type\n * @return {'top' | 'left'} Default origin\n */\nfunction getDefaultOrigin( type ) {\n\treturn type === 'appear' ? 'top' : 'left';\n}\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * @param {GetAnimateOptions} options\n *\n * @return {string | void} ClassName that applies the animations\n */\nexport function getAnimateClassName( options ) {\n\tif ( options.type === 'loading' ) {\n\t\treturn classnames( 'components-animate__loading' );\n\t}\n\n\tconst { type, origin = getDefaultOrigin( type ) } = options;\n\n\tif ( type === 'appear' ) {\n\t\tconst [ yAxis, xAxis = 'center' ] = origin.split( ' ' );\n\t\treturn classnames( 'components-animate__appear', {\n\t\t\t[ 'is-from-' + xAxis ]: xAxis !== 'center',\n\t\t\t[ 'is-from-' + yAxis ]: yAxis !== 'middle',\n\t\t} );\n\t}\n\n\tif ( type === 'slide-in' ) {\n\t\treturn classnames(\n\t\t\t'components-animate__slide-in',\n\t\t\t'is-from-' + origin\n\t\t);\n\t}\n}\n\n// @ts-ignore Reason: Planned for deprecation\nexport default function Animate( { type, options = {}, children } ) {\n\treturn children( {\n\t\tclassName: getAnimateClassName( { type, ...options } ),\n\t} );\n}\n"]}
|
|
@@ -106,28 +106,29 @@ export function getAutoCompleterUI(autocompleter) {
|
|
|
106
106
|
accessibilityLabel: // translators: Slash inserter autocomplete results
|
|
107
107
|
__('Slash inserter results')
|
|
108
108
|
}, filteredItems.map((option, index) => {
|
|
109
|
-
var _option$value, _option$
|
|
109
|
+
var _option$value, _option$value$icon, _option$value2, _option$value3, _option$value4;
|
|
110
110
|
|
|
111
111
|
const isActive = index === selectedIndex;
|
|
112
112
|
const itemStyle = stylesCompose(styles['components-autocomplete__item'], isActive && activeItemStyles);
|
|
113
113
|
const textStyle = stylesCompose(textStyles, isActive && activeTextStyles);
|
|
114
114
|
const iconStyle = stylesCompose(iconStyles, isActive && activeIconStyles);
|
|
115
|
+
const iconSource = (option === null || option === void 0 ? void 0 : (_option$value = option.value) === null || _option$value === void 0 ? void 0 : (_option$value$icon = _option$value.icon) === null || _option$value$icon === void 0 ? void 0 : _option$value$icon.src) || (option === null || option === void 0 ? void 0 : (_option$value2 = option.value) === null || _option$value2 === void 0 ? void 0 : _option$value2.icon);
|
|
115
116
|
return createElement(TouchableOpacity, {
|
|
116
117
|
activeOpacity: 0.5,
|
|
117
118
|
style: itemStyle,
|
|
118
119
|
key: index,
|
|
119
120
|
onPress: () => onSelect(option),
|
|
120
121
|
accessibilityLabel: sprintf( // translators: %s: Block name e.g. "Image block"
|
|
121
|
-
__('%s block'), option === null || option === void 0 ? void 0 : (_option$
|
|
122
|
+
__('%s block'), option === null || option === void 0 ? void 0 : (_option$value3 = option.value) === null || _option$value3 === void 0 ? void 0 : _option$value3.title)
|
|
122
123
|
}, createElement(View, {
|
|
123
124
|
style: styles['components-autocomplete__icon']
|
|
124
125
|
}, createElement(Icon, {
|
|
125
|
-
icon:
|
|
126
|
+
icon: iconSource,
|
|
126
127
|
size: 24,
|
|
127
128
|
style: iconStyle
|
|
128
129
|
})), createElement(Text, {
|
|
129
130
|
style: textStyle
|
|
130
|
-
}, option === null || option === void 0 ? void 0 : (_option$
|
|
131
|
+
}, option === null || option === void 0 ? void 0 : (_option$value4 = option.value) === null || _option$value4 === void 0 ? void 0 : _option$value4.title));
|
|
131
132
|
}))))));
|
|
132
133
|
}
|
|
133
134
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.native.js"],"names":["View","Animated","StyleSheet","Text","TouchableOpacity","ScrollView","useLayoutEffect","useEffect","useRef","useState","useCallback","__","sprintf","Icon","__unstableAutocompletionItemsFill","AutocompletionItemsFill","usePreferredColorSchemeStyle","BackgroundView","getDefaultUseItems","styles","compose","stylesCompose","getAutoCompleterUI","autocompleter","useItems","AutocompleterUI","filterValue","selectedIndex","onChangeOptions","onSelect","value","reset","items","filteredItems","filter","item","isDisabled","scrollViewRef","animationValue","Value","current","isVisible","setIsVisible","text","length","scrollTo","x","animated","startAnimation","activeItemStyles","iconStyles","activeIconStyles","textStyles","activeTextStyles","show","timing","toValue","duration","useNativeDriver","start","finished","contentStyles","transform","translateY","interpolate","inputRange","outputRange","height","map","option","index","isActive","itemStyle","textStyle","iconStyle","title","icon","src"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,IADD,EAECC,QAFD,EAGCC,UAHD,EAICC,IAJD,EAKCC,gBALD,EAMCC,UAND,QAOO,cAPP;AASA;AACA;AACA;;AACA,SACCC,eADD,EAECC,SAFD,EAGCC,MAHD,EAICC,QAJD,EAKCC,WALD,QAMO,oBANP;AAOA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SACCC,IADD,EAECC,iCAAiC,IAAIC,uBAFtC,QAGO,uBAHP;AAIA,SAASC,4BAAT,QAA6C,oBAA7C;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,MAAP,MAAmB,cAAnB;AAEA,MAAM;AAAEC,EAAAA,OAAO,EAAEC;AAAX,IAA6BnB,UAAnC;AAEA,OAAO,SAASoB,kBAAT,CAA6BC,aAA7B,EAA6C;AACnD,QAAMC,QAAQ,GAAGD,aAAa,CAACC,QAAd,GACdD,aAAa,CAACC,QADA,GAEdN,kBAAkB,CAAEK,aAAF,CAFrB;;AAIA,WAASE,eAAT,CAA0B;AACzBC,IAAAA,WADyB;AAEzBC,IAAAA,aAFyB;AAGzBC,IAAAA,eAHyB;AAIzBC,IAAAA,QAJyB;AAKzBC,IAAAA,KALyB;AAMzBC,IAAAA;AANyB,GAA1B,EAOI;AACH,UAAM,CAAEC,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UAAF,CAFyB,EAG3B0D,MAH2B,aAG3BA,MAH2B,wCAG3BA,MAAM,CAAEvC,KAHmB,kDAG3B,cAAe6C,KAHY;AAL7B,SAWC,cAAC,IAAD;AACC,QAAA,KAAK,EACJxD,MAAM,CACL,+BADK;AAFR,SAOC,cAAC,IAAD;AACC,QAAA,IAAI,EACHkD,MADG,aACHA,MADG,yCACHA,MAAM,CAAEvC,KADL,0EACH,eAAe8C,IADZ,wDACH,oBAAqBC,GAFvB;AAIC,QAAA,IAAI,EAAG,EAJR;AAKC,QAAA,KAAK,EAAGH;AALT,QAPD,CAXD,EA0BC,cAAC,IAAD;AAAM,QAAA,KAAK,EAAGD;AAAd,SACGJ,MADH,aACGA,MADH,yCACGA,MAAM,CAAEvC,KADX,mDACG,eAAe6C,KADlB,CA1BD,CADD;AAgCA,KAjDC,CAbH,CADD,CADD,CADD,CADD,CADD;AA0EA;;AAED,SAAOlD,eAAP;AACA;AAED,eAAeH,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tAnimated,\n\tStyleSheet,\n\tText,\n\tTouchableOpacity,\n\tScrollView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tIcon,\n\t__unstableAutocompletionItemsFill as AutocompletionItemsFill,\n} from '@wordpress/components';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackgroundView from './background-view';\nimport getDefaultUseItems from './get-default-use-items';\nimport styles from './style.scss';\n\nconst { compose: stylesCompose } = StyleSheet;\n\nexport function getAutoCompleterUI( autocompleter ) {\n\tconst useItems = autocompleter.useItems\n\t\t? autocompleter.useItems\n\t\t: getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tvalue,\n\t\treset,\n\t} ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst filteredItems = items.filter( ( item ) => ! item.isDisabled );\n\t\tconst scrollViewRef = useRef();\n\t\tconst animationValue = useRef( new Animated.Value( 0 ) ).current;\n\t\tconst [ isVisible, setIsVisible ] = useState( false );\n\t\tconst { text } = value;\n\n\t\tuseEffect( () => {\n\t\t\tif ( ! isVisible && text.length > 0 ) {\n\t\t\t\tsetIsVisible( true );\n\t\t\t}\n\t\t}, [ isVisible, text ] );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tscrollViewRef.current?.scrollTo( { x: 0, animated: false } );\n\n\t\t\tif ( isVisible && text.length > 0 ) {\n\t\t\t\tstartAnimation( true );\n\t\t\t} else if ( isVisible && text.length === 0 ) {\n\t\t\t\tstartAnimation( false );\n\t\t\t}\n\t\t}, [ items, isVisible, text ] );\n\n\t\tconst activeItemStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__item-active' ],\n\t\t\tstyles[ 'components-autocomplete__item-active-dark' ]\n\t\t);\n\n\t\tconst iconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst activeIconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon-active ' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst textStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text' ],\n\t\t\tstyles[ 'components-autocomplete__text-dark' ]\n\t\t);\n\n\t\tconst activeTextStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text-active' ],\n\t\t\tstyles[ 'components-autocomplete__text-active-dark' ]\n\t\t);\n\n\t\tconst startAnimation = useCallback(\n\t\t\t( show ) => {\n\t\t\t\tAnimated.timing( animationValue, {\n\t\t\t\t\ttoValue: show ? 1 : 0,\n\t\t\t\t\tduration: show ? 200 : 100,\n\t\t\t\t\tuseNativeDriver: true,\n\t\t\t\t} ).start( ( { finished } ) => {\n\t\t\t\t\tif ( finished && ! show && isVisible ) {\n\t\t\t\t\t\tsetIsVisible( false );\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[ isVisible ]\n\t\t);\n\n\t\tconst contentStyles = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: animationValue.interpolate( {\n\t\t\t\t\t\tinputRange: [ 0, 1 ],\n\t\t\t\t\t\toutputRange: [\n\t\t\t\t\t\t\tstyles[ 'components-autocomplete' ].height,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t],\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif ( ! filteredItems.length > 0 || ! isVisible ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<AutocompletionItemsFill>\n\t\t\t\t<View style={ styles[ 'components-autocomplete' ] }>\n\t\t\t\t\t<Animated.View style={ contentStyles }>\n\t\t\t\t\t\t<BackgroundView>\n\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\tref={ scrollViewRef }\n\t\t\t\t\t\t\t\thorizontal\n\t\t\t\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'components-autocomplete__content' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\t\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\t\t\t\t\taccessibilityLabel={\n\t\t\t\t\t\t\t\t\t// translators: Slash inserter autocomplete results\n\t\t\t\t\t\t\t\t\t__( 'Slash inserter results' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ filteredItems.map( ( option, index ) => {\n\t\t\t\t\t\t\t\t\tconst isActive = index === selectedIndex;\n\t\t\t\t\t\t\t\t\tconst itemStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__item'\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\tisActive && activeItemStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst textStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ttextStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeTextStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ticonStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeIconStyles\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ itemStyle }\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tonPress={ () => onSelect( option ) }\n\t\t\t\t\t\t\t\t\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Block name e.g. \"Image block\"\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%s block' ),\n\t\t\t\t\t\t\t\t\t\t\t\toption?.value?.title\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__icon'\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toption?.value?.icon?.src\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t\t\t<Text style={ textStyle }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ option?.value?.title }\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t</BackgroundView>\n\t\t\t\t\t</Animated.View>\n\t\t\t\t</View>\n\t\t\t</AutocompletionItemsFill>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nexport default getAutoCompleterUI;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.native.js"],"names":["View","Animated","StyleSheet","Text","TouchableOpacity","ScrollView","useLayoutEffect","useEffect","useRef","useState","useCallback","__","sprintf","Icon","__unstableAutocompletionItemsFill","AutocompletionItemsFill","usePreferredColorSchemeStyle","BackgroundView","getDefaultUseItems","styles","compose","stylesCompose","getAutoCompleterUI","autocompleter","useItems","AutocompleterUI","filterValue","selectedIndex","onChangeOptions","onSelect","value","reset","items","filteredItems","filter","item","isDisabled","scrollViewRef","animationValue","Value","current","isVisible","setIsVisible","text","length","scrollTo","x","animated","startAnimation","activeItemStyles","iconStyles","activeIconStyles","textStyles","activeTextStyles","show","timing","toValue","duration","useNativeDriver","start","finished","contentStyles","transform","translateY","interpolate","inputRange","outputRange","height","map","option","index","isActive","itemStyle","textStyle","iconStyle","iconSource","icon","src","title"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,IADD,EAECC,QAFD,EAGCC,UAHD,EAICC,IAJD,EAKCC,gBALD,EAMCC,UAND,QAOO,cAPP;AASA;AACA;AACA;;AACA,SACCC,eADD,EAECC,SAFD,EAGCC,MAHD,EAICC,QAJD,EAKCC,WALD,QAMO,oBANP;AAOA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SACCC,IADD,EAECC,iCAAiC,IAAIC,uBAFtC,QAGO,uBAHP;AAIA,SAASC,4BAAT,QAA6C,oBAA7C;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,MAAP,MAAmB,cAAnB;AAEA,MAAM;AAAEC,EAAAA,OAAO,EAAEC;AAAX,IAA6BnB,UAAnC;AAEA,OAAO,SAASoB,kBAAT,CAA6BC,aAA7B,EAA6C;AACnD,QAAMC,QAAQ,GAAGD,aAAa,CAACC,QAAd,GACdD,aAAa,CAACC,QADA,GAEdN,kBAAkB,CAAEK,aAAF,CAFrB;;AAIA,WAASE,eAAT,CAA0B;AACzBC,IAAAA,WADyB;AAEzBC,IAAAA,aAFyB;AAGzBC,IAAAA,eAHyB;AAIzBC,IAAAA,QAJyB;AAKzBC,IAAAA,KALyB;AAMzBC,IAAAA;AANyB,GAA1B,EAOI;AACH,UAAM,CAAEC,KAAF,IAAYR,QAAQ,CAAEE,WAAF,CAA1B;AACA,UAAMO,aAAa,GAAGD,KAAK,CAACE,MAAN,CAAgBC,IAAF,IAAY,CAAEA,IAAI,CAACC,UAAjC,CAAtB;AACA,UAAMC,aAAa,GAAG7B,MAAM,EAA5B;AACA,UAAM8B,cAAc,GAAG9B,MAAM,CAAE,IAAIP,QAAQ,CAACsC,KAAb,CAAoB,CAApB,CAAF,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,KAHmB,mDAG3B,eAAegD,KAHY;AAL7B,SAWC,cAAC,IAAD;AACC,QAAA,KAAK,EACJ3D,MAAM,CACL,+BADK;AAFR,SAOC,cAAC,IAAD;AACC,QAAA,IAAI,EAAGwD,UADR;AAEC,QAAA,IAAI,EAAG,EAFR;AAGC,QAAA,KAAK,EAAGD;AAHT,QAPD,CAXD,EAwBC,cAAC,IAAD;AAAM,QAAA,KAAK,EAAGD;AAAd,SACGJ,MADH,aACGA,MADH,yCACGA,MAAM,CAAEvC,KADX,mDACG,eAAegD,KADlB,CAxBD,CADD;AA8BA,KAlDC,CAbH,CADD,CADD,CADD,CADD,CADD;AA2EA;;AAED,SAAOrD,eAAP;AACA;AAED,eAAeH,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tAnimated,\n\tStyleSheet,\n\tText,\n\tTouchableOpacity,\n\tScrollView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tIcon,\n\t__unstableAutocompletionItemsFill as AutocompletionItemsFill,\n} from '@wordpress/components';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackgroundView from './background-view';\nimport getDefaultUseItems from './get-default-use-items';\nimport styles from './style.scss';\n\nconst { compose: stylesCompose } = StyleSheet;\n\nexport function getAutoCompleterUI( autocompleter ) {\n\tconst useItems = autocompleter.useItems\n\t\t? autocompleter.useItems\n\t\t: getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tvalue,\n\t\treset,\n\t} ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst filteredItems = items.filter( ( item ) => ! item.isDisabled );\n\t\tconst scrollViewRef = useRef();\n\t\tconst animationValue = useRef( new Animated.Value( 0 ) ).current;\n\t\tconst [ isVisible, setIsVisible ] = useState( false );\n\t\tconst { text } = value;\n\n\t\tuseEffect( () => {\n\t\t\tif ( ! isVisible && text.length > 0 ) {\n\t\t\t\tsetIsVisible( true );\n\t\t\t}\n\t\t}, [ isVisible, text ] );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tscrollViewRef.current?.scrollTo( { x: 0, animated: false } );\n\n\t\t\tif ( isVisible && text.length > 0 ) {\n\t\t\t\tstartAnimation( true );\n\t\t\t} else if ( isVisible && text.length === 0 ) {\n\t\t\t\tstartAnimation( false );\n\t\t\t}\n\t\t}, [ items, isVisible, text ] );\n\n\t\tconst activeItemStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__item-active' ],\n\t\t\tstyles[ 'components-autocomplete__item-active-dark' ]\n\t\t);\n\n\t\tconst iconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst activeIconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon-active ' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst textStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text' ],\n\t\t\tstyles[ 'components-autocomplete__text-dark' ]\n\t\t);\n\n\t\tconst activeTextStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text-active' ],\n\t\t\tstyles[ 'components-autocomplete__text-active-dark' ]\n\t\t);\n\n\t\tconst startAnimation = useCallback(\n\t\t\t( show ) => {\n\t\t\t\tAnimated.timing( animationValue, {\n\t\t\t\t\ttoValue: show ? 1 : 0,\n\t\t\t\t\tduration: show ? 200 : 100,\n\t\t\t\t\tuseNativeDriver: true,\n\t\t\t\t} ).start( ( { finished } ) => {\n\t\t\t\t\tif ( finished && ! show && isVisible ) {\n\t\t\t\t\t\tsetIsVisible( false );\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[ isVisible ]\n\t\t);\n\n\t\tconst contentStyles = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: animationValue.interpolate( {\n\t\t\t\t\t\tinputRange: [ 0, 1 ],\n\t\t\t\t\t\toutputRange: [\n\t\t\t\t\t\t\tstyles[ 'components-autocomplete' ].height,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t],\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif ( ! filteredItems.length > 0 || ! isVisible ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<AutocompletionItemsFill>\n\t\t\t\t<View style={ styles[ 'components-autocomplete' ] }>\n\t\t\t\t\t<Animated.View style={ contentStyles }>\n\t\t\t\t\t\t<BackgroundView>\n\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\tref={ scrollViewRef }\n\t\t\t\t\t\t\t\thorizontal\n\t\t\t\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'components-autocomplete__content' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\t\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\t\t\t\t\taccessibilityLabel={\n\t\t\t\t\t\t\t\t\t// translators: Slash inserter autocomplete results\n\t\t\t\t\t\t\t\t\t__( 'Slash inserter results' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ filteredItems.map( ( option, index ) => {\n\t\t\t\t\t\t\t\t\tconst isActive = index === selectedIndex;\n\t\t\t\t\t\t\t\t\tconst itemStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__item'\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\tisActive && activeItemStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst textStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ttextStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeTextStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ticonStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeIconStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconSource =\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon?.src ||\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ itemStyle }\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tonPress={ () => onSelect( option ) }\n\t\t\t\t\t\t\t\t\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Block name e.g. \"Image block\"\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%s block' ),\n\t\t\t\t\t\t\t\t\t\t\t\toption?.value?.title\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__icon'\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ iconSource }\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t\t\t<Text style={ textStyle }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ option?.value?.title }\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t</BackgroundView>\n\t\t\t\t\t</Animated.View>\n\t\t\t\t</View>\n\t\t\t</AutocompletionItemsFill>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nexport default getAutoCompleterUI;\n"]}
|
|
@@ -12,7 +12,7 @@ import { VisuallyHidden } from '../visually-hidden';
|
|
|
12
12
|
import { Wrapper, StyledField, StyledLabel, StyledHelp } from './styles/base-control-styles';
|
|
13
13
|
/**
|
|
14
14
|
* @typedef Props
|
|
15
|
-
* @property {string} id
|
|
15
|
+
* @property {string} [id] The id of the element to which labels and help text are being generated.
|
|
16
16
|
* That element should be passed as a child.
|
|
17
17
|
* @property {import('react').ReactNode} help If this property is added, a help text will be
|
|
18
18
|
* generated using help property as the content.
|
|
@@ -52,7 +52,7 @@ function BaseControl({
|
|
|
52
52
|
}, label)), label && !id && (hideLabelFromVision ? createElement(VisuallyHidden, {
|
|
53
53
|
as: "label"
|
|
54
54
|
}, label) : createElement(BaseControl.VisualLabel, null, label)), children), !!help && createElement(StyledHelp, {
|
|
55
|
-
id: id + '__help',
|
|
55
|
+
id: id ? id + '__help' : undefined,
|
|
56
56
|
className: "components-base-control__help"
|
|
57
57
|
}, help));
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/base-control/index.js"],"names":["classnames","VisuallyHidden","Wrapper","StyledField","StyledLabel","StyledHelp","BaseControl","id","label","hideLabelFromVision","help","className","children","VisualLabel"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SACCC,OADD,EAECC,WAFD,EAGCC,WAHD,EAICC,UAJD,QAKO,8BALP;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AACA,SAASC,WAAT,CAAsB;AACrBC,EAAAA,EADqB;AAErBC,EAAAA,KAFqB;AAGrBC,EAAAA,mBAHqB;AAIrBC,EAAAA,IAJqB;AAKrBC,EAAAA,SALqB;AAMrBC,EAAAA;AANqB,CAAtB,EAOI;AACH,SACC,cAAC,OAAD;AACC,IAAA,SAAS,EAAGZ,UAAU,CAAE,yBAAF,EAA6BW,SAA7B;AADvB,KAGC,cAAC,WAAD;AAAa,IAAA,SAAS,EAAC;AAAvB,KACGH,KAAK,IACND,EADC,KAECE,mBAAmB,GACpB,cAAC,cAAD;AAAgB,IAAA,EAAE,EAAC,OAAnB;AAA2B,IAAA,OAAO,EAAGF;AAArC,KACGC,KADH,CADoB,GAKpB,cAAC,WAAD;AACC,IAAA,SAAS,EAAC,gCADX;AAEC,IAAA,OAAO,EAAGD;AAFX,KAIGC,KAJH,CAPA,CADH,EAeGA,KAAK,IACN,CAAED,EADD,KAECE,mBAAmB,GACpB,cAAC,cAAD;AAAgB,IAAA,EAAE,EAAC;AAAnB,KAA6BD,KAA7B,CADoB,GAGpB,cAAC,WAAD,CAAa,WAAb,QACGA,KADH,CALA,CAfH,EAwBGI,QAxBH,CAHD,EA6BG,CAAC,CAAEF,IAAH,IACD,cAAC,UAAD;AACC,IAAA,EAAE,EAAGH,EAAE,GAAG,
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/base-control/index.js"],"names":["classnames","VisuallyHidden","Wrapper","StyledField","StyledLabel","StyledHelp","BaseControl","id","label","hideLabelFromVision","help","className","children","undefined","VisualLabel"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SACCC,OADD,EAECC,WAFD,EAGCC,WAHD,EAICC,UAJD,QAKO,8BALP;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AACA,SAASC,WAAT,CAAsB;AACrBC,EAAAA,EADqB;AAErBC,EAAAA,KAFqB;AAGrBC,EAAAA,mBAHqB;AAIrBC,EAAAA,IAJqB;AAKrBC,EAAAA,SALqB;AAMrBC,EAAAA;AANqB,CAAtB,EAOI;AACH,SACC,cAAC,OAAD;AACC,IAAA,SAAS,EAAGZ,UAAU,CAAE,yBAAF,EAA6BW,SAA7B;AADvB,KAGC,cAAC,WAAD;AAAa,IAAA,SAAS,EAAC;AAAvB,KACGH,KAAK,IACND,EADC,KAECE,mBAAmB,GACpB,cAAC,cAAD;AAAgB,IAAA,EAAE,EAAC,OAAnB;AAA2B,IAAA,OAAO,EAAGF;AAArC,KACGC,KADH,CADoB,GAKpB,cAAC,WAAD;AACC,IAAA,SAAS,EAAC,gCADX;AAEC,IAAA,OAAO,EAAGD;AAFX,KAIGC,KAJH,CAPA,CADH,EAeGA,KAAK,IACN,CAAED,EADD,KAECE,mBAAmB,GACpB,cAAC,cAAD;AAAgB,IAAA,EAAE,EAAC;AAAnB,KAA6BD,KAA7B,CADoB,GAGpB,cAAC,WAAD,CAAa,WAAb,QACGA,KADH,CALA,CAfH,EAwBGI,QAxBH,CAHD,EA6BG,CAAC,CAAEF,IAAH,IACD,cAAC,UAAD;AACC,IAAA,EAAE,EAAGH,EAAE,GAAGA,EAAE,GAAG,QAAR,GAAmBM,SAD3B;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGH,IAJH,CA9BF,CADD;AAwCA;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AACAJ,WAAW,CAACQ,WAAZ,GAA0B,CAAE;AAAEH,EAAAA,SAAF;AAAaC,EAAAA;AAAb,CAAF,KAA+B;AACxDD,EAAAA,SAAS,GAAGX,UAAU,CAAE,gCAAF,EAAoCW,SAApC,CAAtB;AACA,SAAO;AAAM,IAAA,SAAS,EAAGA;AAAlB,KAAgCC,QAAhC,CAAP;AACA,CAHD;;AAKA,eAAeN,WAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport {\n\tWrapper,\n\tStyledField,\n\tStyledLabel,\n\tStyledHelp,\n} from './styles/base-control-styles';\n\n/**\n * @typedef Props\n * @property {string} [id] The id of the element to which labels and help text are being generated.\n * That element should be passed as a child.\n * @property {import('react').ReactNode} help If this property is added, a help text will be\n * generated using help property as the content.\n * @property {import('react').ReactNode} [label] If this property is added, a label will be generated\n * using label property as the content.\n * @property {boolean} [hideLabelFromVision] If true, the label will only be visible to screen readers.\n * @property {string} [className] The class that will be added with \"components-base-control\" to the\n * classes of the wrapper div. If no className is passed only\n * components-base-control is used.\n * @property {import('react').ReactNode} [children] The content to be displayed within\n * the BaseControl.\n */\n\n/**\n * @param {Props} props\n * @return {JSX.Element} Element\n */\nfunction BaseControl( {\n\tid,\n\tlabel,\n\thideLabelFromVision,\n\thelp,\n\tclassName,\n\tchildren,\n} ) {\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName={ classnames( 'components-base-control', className ) }\n\t\t>\n\t\t\t<StyledField className=\"components-base-control__field\">\n\t\t\t\t{ label &&\n\t\t\t\t\tid &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\" htmlFor={ id }>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<StyledLabel\n\t\t\t\t\t\t\tclassName=\"components-base-control__label\"\n\t\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</StyledLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ label &&\n\t\t\t\t\t! id &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ children }\n\t\t\t</StyledField>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\tid={ id ? id + '__help' : undefined }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n\n/**\n * @typedef VisualLabelProps\n * @property {string} [className] Class name\n * @property {import('react').ReactNode} [children] Children\n */\n\n/**\n * @param {VisualLabelProps} Props\n * @return {JSX.Element} Element\n */\nBaseControl.VisualLabel = ( { className, children } ) => {\n\tclassName = classnames( 'components-base-control__label', className );\n\treturn <span className={ className }>{ children }</span>;\n};\n\nexport default BaseControl;\n"]}
|
|
@@ -22,7 +22,7 @@ import { useCx } from '../utils/hooks/use-cx';
|
|
|
22
22
|
/** @typedef {import('../flex/types').FlexProps & OwnProps} Props */
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* @param {import('../ui/context').
|
|
25
|
+
* @param {import('../ui/context').WordPressComponentProps<Props, 'div'>} props
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
export function useBaseField(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/base-field/hook.js"],"names":["useMemo","useContextSystem","useControlGroupContext","useFlex","styles","useCx","useBaseField","props","className","hasError","isInline","isSubtle","defaultValue","disabled","flexProps","controlGroupStyles","cx","classes","BaseField","subtle","error","inline"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAAiC,eAAjC;AACA,SAASC,sBAAT,QAAuC,qBAAvC;AACA,SAASC,OAAT,QAAwB,SAAxB;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,SAASC,KAAT,QAAsB,uBAAtB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBC,KAAvB,EAA+B;AACrC,QAAM;AACLC,IAAAA,SADK;AAELC,IAAAA,QAAQ,GAAG,KAFN;AAGLC,IAAAA,QAAQ,GAAG,KAHN;AAILC,IAAAA,QAAQ,GAAG,KAJN;AAKL;AACAC,IAAAA,YANK;AAOLC,IAAAA,QAPK;AAQL,OAAGC;AARE,MASFb,gBAAgB,CAAEM,KAAF,EAAS,WAAT,CATpB;AAWA,QAAM;AAAEH,IAAAA,MAAM,EAAEW;AAAV,MAAiCb,sBAAsB,EAA7D;AACA,QAAMc,EAAE,GAAGX,KAAK,EAAhB;AAEA,QAAMY,OAAO,GAAGjB,OAAO,CACtB,MACCgB,EAAE,CACDZ,MAAM,CAACc,SADN,EAEDH,kBAFC,EAGDJ,QAAQ,IAAIP,MAAM,CAACe,MAHlB,EAIDV,QAAQ,IAAIL,MAAM,CAACgB,KAJlB,EAKDV,QAAQ,IAAIN,MAAM,CAACiB,MALlB,EAMDb,SANC,CAFmB,EAUtB,CAAEA,SAAF,EAAaO,kBAAb,EAAiCN,QAAjC,EAA2CC,QAA3C,EAAqDC,QAArD,CAVsB,CAAvB;AAaA,SAAO,EACN,GAAGR,OAAO,CAAE,EAAE,GAAGW,SAAL;AAAgBN,MAAAA,SAAS,EAAES;AAA3B,KAAF,CADJ;AAENJ,IAAAA,QAFM;AAGND,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../ui/context';\nimport { useControlGroupContext } from '../ui/control-group';\nimport { useFlex } from '../flex';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\n\n/**\n * @typedef OwnProps\n * @property {boolean} [hasError=false] Renders an error.\n * @property {boolean} [disabled] Whether the field is disabled.\n * @property {boolean} [isInline=false] Renders as an inline element (layout).\n * @property {boolean} [isSubtle=false] Renders a subtle variant.\n */\n\n/** @typedef {import('../flex/types').FlexProps & OwnProps} Props */\n\n/**\n * @param {import('../ui/context').
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/base-field/hook.js"],"names":["useMemo","useContextSystem","useControlGroupContext","useFlex","styles","useCx","useBaseField","props","className","hasError","isInline","isSubtle","defaultValue","disabled","flexProps","controlGroupStyles","cx","classes","BaseField","subtle","error","inline"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAAiC,eAAjC;AACA,SAASC,sBAAT,QAAuC,qBAAvC;AACA,SAASC,OAAT,QAAwB,SAAxB;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,SAASC,KAAT,QAAsB,uBAAtB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBC,KAAvB,EAA+B;AACrC,QAAM;AACLC,IAAAA,SADK;AAELC,IAAAA,QAAQ,GAAG,KAFN;AAGLC,IAAAA,QAAQ,GAAG,KAHN;AAILC,IAAAA,QAAQ,GAAG,KAJN;AAKL;AACAC,IAAAA,YANK;AAOLC,IAAAA,QAPK;AAQL,OAAGC;AARE,MASFb,gBAAgB,CAAEM,KAAF,EAAS,WAAT,CATpB;AAWA,QAAM;AAAEH,IAAAA,MAAM,EAAEW;AAAV,MAAiCb,sBAAsB,EAA7D;AACA,QAAMc,EAAE,GAAGX,KAAK,EAAhB;AAEA,QAAMY,OAAO,GAAGjB,OAAO,CACtB,MACCgB,EAAE,CACDZ,MAAM,CAACc,SADN,EAEDH,kBAFC,EAGDJ,QAAQ,IAAIP,MAAM,CAACe,MAHlB,EAIDV,QAAQ,IAAIL,MAAM,CAACgB,KAJlB,EAKDV,QAAQ,IAAIN,MAAM,CAACiB,MALlB,EAMDb,SANC,CAFmB,EAUtB,CAAEA,SAAF,EAAaO,kBAAb,EAAiCN,QAAjC,EAA2CC,QAA3C,EAAqDC,QAArD,CAVsB,CAAvB;AAaA,SAAO,EACN,GAAGR,OAAO,CAAE,EAAE,GAAGW,SAAL;AAAgBN,MAAAA,SAAS,EAAES;AAA3B,KAAF,CADJ;AAENJ,IAAAA,QAFM;AAGND,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../ui/context';\nimport { useControlGroupContext } from '../ui/control-group';\nimport { useFlex } from '../flex';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\n\n/**\n * @typedef OwnProps\n * @property {boolean} [hasError=false] Renders an error.\n * @property {boolean} [disabled] Whether the field is disabled.\n * @property {boolean} [isInline=false] Renders as an inline element (layout).\n * @property {boolean} [isSubtle=false] Renders a subtle variant.\n */\n\n/** @typedef {import('../flex/types').FlexProps & OwnProps} Props */\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<Props, 'div'>} props\n */\nexport function useBaseField( props ) {\n\tconst {\n\t\tclassName,\n\t\thasError = false,\n\t\tisInline = false,\n\t\tisSubtle = false,\n\t\t// extract these because useFlex doesn't accept it\n\t\tdefaultValue,\n\t\tdisabled,\n\t\t...flexProps\n\t} = useContextSystem( props, 'BaseField' );\n\n\tconst { styles: controlGroupStyles } = useControlGroupContext();\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.BaseField,\n\t\t\t\tcontrolGroupStyles,\n\t\t\t\tisSubtle && styles.subtle,\n\t\t\t\thasError && styles.error,\n\t\t\t\tisInline && styles.inline,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, controlGroupStyles, hasError, isInline, isSubtle ]\n\t);\n\n\treturn {\n\t\t...useFlex( { ...flexProps, className: classes } ),\n\t\tdisabled,\n\t\tdefaultValue,\n\t};\n}\n"]}
|
|
@@ -6,13 +6,14 @@ import { createElement, Fragment } from "@wordpress/element";
|
|
|
6
6
|
* External dependencies
|
|
7
7
|
*/
|
|
8
8
|
import classnames from 'classnames';
|
|
9
|
-
import { isArray
|
|
9
|
+
import { isArray } from 'lodash';
|
|
10
10
|
/**
|
|
11
11
|
* WordPress dependencies
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import deprecated from '@wordpress/deprecated';
|
|
15
15
|
import { forwardRef } from '@wordpress/element';
|
|
16
|
+
import { useInstanceId } from '@wordpress/compose';
|
|
16
17
|
/**
|
|
17
18
|
* Internal dependencies
|
|
18
19
|
*/
|
|
@@ -96,6 +97,7 @@ export function Button(props, ref) {
|
|
|
96
97
|
describedBy,
|
|
97
98
|
...additionalProps
|
|
98
99
|
} = useDeprecatedProps(props);
|
|
100
|
+
const instanceId = useInstanceId(Button, 'components-button__description');
|
|
99
101
|
const classes = classnames('components-button', className, {
|
|
100
102
|
'is-secondary': variant === 'secondary',
|
|
101
103
|
'is-primary': variant === 'primary',
|
|
@@ -139,7 +141,7 @@ export function Button(props, ref) {
|
|
|
139
141
|
!!label && ( // the children are empty and...
|
|
140
142
|
!children || isArray(children) && !children.length) && // the tooltip is not explicitly disabled.
|
|
141
143
|
false !== showTooltip);
|
|
142
|
-
const descriptionId = describedBy ?
|
|
144
|
+
const descriptionId = describedBy ? instanceId : null;
|
|
143
145
|
const describedById = additionalProps['aria-describedby'] || descriptionId;
|
|
144
146
|
const element = createElement(Tag, _extends({}, tagProps, additionalProps, {
|
|
145
147
|
className: classes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/button/index.js"],"names":["classnames","isArray","
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/button/index.js"],"names":["classnames","isArray","deprecated","forwardRef","useInstanceId","Tooltip","Icon","VisuallyHidden","disabledEventsOnDisabledButton","useDeprecatedProps","isDefault","isPrimary","isSecondary","isTertiary","isLink","variant","otherProps","computedVariant","since","alternative","Button","props","ref","href","target","isSmall","isPressed","isBusy","isDestructive","className","disabled","icon","iconPosition","iconSize","showTooltip","tooltipPosition","shortcut","label","children","text","__experimentalIsFocusable","isFocusable","describedBy","additionalProps","instanceId","classes","trulyDisabled","Tag","undefined","tagProps","type","disabledEvent","event","stopPropagation","preventDefault","shouldShowTooltip","length","descriptionId","describedById","element"],"mappings":";;AAAA;;AACA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AACA,SAASC,OAAT,QAAwB,QAAxB;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,SAASC,aAAT,QAA8B,oBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAASC,cAAT,QAA+B,oBAA/B;AAEA,MAAMC,8BAA8B,GAAG,CAAE,aAAF,EAAiB,SAAjB,CAAvC;;AAEA,SAASC,kBAAT,CAA6B;AAC5BC,EAAAA,SAD4B;AAE5BC,EAAAA,SAF4B;AAG5BC,EAAAA,WAH4B;AAI5BC,EAAAA,UAJ4B;AAK5BC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AA,QAAQ,EAAGD;AAHZ,KAKGwB,OALH,CADD,EAQGjB,WAAW,IACZ,cAAC,cAAD,QACC;AAAM,IAAA,EAAE,EAAGe;AAAX,KAA6Bf,WAA7B,CADD,CATF,CADD;AAgBA;AAED,eAAevC,UAAU,CAAEiB,MAAF,CAAzB","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { isArray } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\n\nconst disabledEventsOnDisabledButton = [ 'onMouseDown', 'onClick' ];\n\nfunction useDeprecatedProps( {\n\tisDefault,\n\tisPrimary,\n\tisSecondary,\n\tisTertiary,\n\tisLink,\n\tvariant,\n\t...otherProps\n} ) {\n\tlet computedVariant = variant;\n\n\tif ( isPrimary ) {\n\t\tcomputedVariant ??= 'primary';\n\t}\n\n\tif ( isTertiary ) {\n\t\tcomputedVariant ??= 'tertiary';\n\t}\n\n\tif ( isSecondary ) {\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isDefault ) {\n\t\tdeprecated( 'Button isDefault prop', {\n\t\t\tsince: '5.4',\n\t\t\talternative: 'variant=\"secondary\"',\n\t\t} );\n\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isLink ) {\n\t\tcomputedVariant ??= 'link';\n\t}\n\n\treturn {\n\t\t...otherProps,\n\t\tvariant: computedVariant,\n\t};\n}\n\nexport function Button( props, ref ) {\n\tconst {\n\t\thref,\n\t\ttarget,\n\t\tisSmall,\n\t\tisPressed,\n\t\tisBusy,\n\t\tisDestructive,\n\t\tclassName,\n\t\tdisabled,\n\t\ticon,\n\t\ticonPosition = 'left',\n\t\ticonSize,\n\t\tshowTooltip,\n\t\ttooltipPosition,\n\t\tshortcut,\n\t\tlabel,\n\t\tchildren,\n\t\ttext,\n\t\tvariant,\n\t\t__experimentalIsFocusable: isFocusable,\n\t\tdescribedBy,\n\t\t...additionalProps\n\t} = useDeprecatedProps( props );\n\tconst instanceId = useInstanceId(\n\t\tButton,\n\t\t'components-button__description'\n\t);\n\n\tconst classes = classnames( 'components-button', className, {\n\t\t'is-secondary': variant === 'secondary',\n\t\t'is-primary': variant === 'primary',\n\t\t'is-small': isSmall,\n\t\t'is-tertiary': variant === 'tertiary',\n\t\t'is-pressed': isPressed,\n\t\t'is-busy': isBusy,\n\t\t'is-link': variant === 'link',\n\t\t'is-destructive': isDestructive,\n\t\t'has-text': !! icon && !! children,\n\t\t'has-icon': !! icon,\n\t} );\n\n\tconst trulyDisabled = disabled && ! isFocusable;\n\tconst Tag = href !== undefined && ! trulyDisabled ? 'a' : 'button';\n\tconst tagProps =\n\t\tTag === 'a'\n\t\t\t? { href, target }\n\t\t\t: {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tdisabled: trulyDisabled,\n\t\t\t\t\t'aria-pressed': isPressed,\n\t\t\t };\n\n\tif ( disabled && isFocusable ) {\n\t\t// In this case, the button will be disabled, but still focusable and\n\t\t// perceivable by screen reader users.\n\t\ttagProps[ 'aria-disabled' ] = true;\n\n\t\tfor ( const disabledEvent of disabledEventsOnDisabledButton ) {\n\t\t\tadditionalProps[ disabledEvent ] = ( event ) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t};\n\t\t}\n\t}\n\n\t// Should show the tooltip if...\n\tconst shouldShowTooltip =\n\t\t! trulyDisabled &&\n\t\t// an explicit tooltip is passed or...\n\t\t( ( showTooltip && label ) ||\n\t\t\t// there's a shortcut or...\n\t\t\tshortcut ||\n\t\t\t// there's a label and...\n\t\t\t( !! label &&\n\t\t\t\t// the children are empty and...\n\t\t\t\t( ! children ||\n\t\t\t\t\t( isArray( children ) && ! children.length ) ) &&\n\t\t\t\t// the tooltip is not explicitly disabled.\n\t\t\t\tfalse !== showTooltip ) );\n\n\tconst descriptionId = describedBy ? instanceId : null;\n\n\tconst describedById =\n\t\tadditionalProps[ 'aria-describedby' ] || descriptionId;\n\n\tconst element = (\n\t\t<Tag\n\t\t\t{ ...tagProps }\n\t\t\t{ ...additionalProps }\n\t\t\tclassName={ classes }\n\t\t\taria-label={ additionalProps[ 'aria-label' ] || label }\n\t\t\taria-describedby={ describedById }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ icon && iconPosition === 'left' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ text && <>{ text }</> }\n\t\t\t{ icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ children }\n\t\t</Tag>\n\t);\n\n\tif ( ! shouldShowTooltip ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ element }\n\t\t\t\t{ describedBy && (\n\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip\n\t\t\t\ttext={ describedBy ? describedBy : label }\n\t\t\t\tshortcut={ shortcut }\n\t\t\t\tposition={ tooltipPosition }\n\t\t\t>\n\t\t\t\t{ element }\n\t\t\t</Tooltip>\n\t\t\t{ describedBy && (\n\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default forwardRef( Button );\n"]}
|
|
@@ -22,8 +22,8 @@ import { useCard } from './hook';
|
|
|
22
22
|
import CONFIG from '../../utils/config-values';
|
|
23
23
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
24
24
|
/**
|
|
25
|
-
* @param {import('../../ui/context').
|
|
26
|
-
* @param {import('react').Ref<any>}
|
|
25
|
+
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
26
|
+
* @param {import('react').Ref<any>} forwardedRef
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
function Card(props, forwardedRef) {
|
|
@@ -39,7 +39,7 @@ function Card(props, forwardedRef) {
|
|
|
39
39
|
const cx = useCx();
|
|
40
40
|
const elevationClassName = useMemo(() => cx( /*#__PURE__*/css({
|
|
41
41
|
borderRadius: elevationBorderRadius
|
|
42
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:elevationClassName;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
42
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:elevationClassName;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2FyZC9jYXJkL2NvbXBvbmVudC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q1kiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9jYXJkL2NhcmQvY29tcG9uZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNvbnRleHRDb25uZWN0LCBDb250ZXh0U3lzdGVtUHJvdmlkZXI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ICApO1xuICogfVxuICogYGBgXG4gKi9cbmNvbnN0IENvbm5lY3RlZENhcmQgPSBjb250ZXh0Q29ubmVjdCggQ2FyZCwgJ0NhcmQnICk7XG5cbmV4cG9ydCBkZWZhdWx0IENvbm5lY3RlZENhcmQ7XG4iXX0= */")), [elevationBorderRadius]);
|
|
43
43
|
const contextProviderValue = useMemo(() => {
|
|
44
44
|
const contextProps = {
|
|
45
45
|
size,
|