@wordpress/components 25.6.0 → 25.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/CONTRIBUTING.md +2 -2
- package/README.md +3 -8
- package/build/color-palette/utils.js +2 -9
- package/build/color-palette/utils.js.map +1 -1
- package/build/color-picker/hsv-color-picker.native.js +92 -0
- package/build/color-picker/hsv-color-picker.native.js.map +1 -0
- package/build/color-picker/hue-picker.native.js +195 -0
- package/build/color-picker/hue-picker.native.js.map +1 -0
- package/build/color-picker/index.native.js +3 -2
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/saturation-picker.native.js +178 -0
- package/build/color-picker/saturation-picker.native.js.map +1 -0
- package/build/item-group/item/component.js +0 -1
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item-group/component.js +0 -1
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/menu-item/index.js +6 -4
- package/build/menu-item/index.js.map +1 -1
- package/build/menu-item/types.js.map +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build/navigation/index.js +0 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +1 -2
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/palette-edit/styles.js +10 -10
- package/build/palette-edit/styles.js.map +1 -1
- package/build/popover/index.js +38 -75
- package/build/popover/index.js.map +1 -1
- package/build/popover/overlay-middlewares.js.map +1 -1
- package/build/popover/types.js.map +1 -1
- package/build/popover/utils.js +5 -50
- package/build/popover/utils.js.map +1 -1
- package/build/progress-bar/styles.js +6 -5
- package/build/progress-bar/styles.js.map +1 -1
- package/build/sandbox/index.js +1 -1
- package/build/sandbox/index.js.map +1 -1
- package/build/search-control/index.native.js +27 -24
- package/build/search-control/index.native.js.map +1 -1
- package/build/shortcut/index.js +13 -0
- package/build/shortcut/index.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +14 -8
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/index.js +5 -0
- package/build/slot-fill/index.js.map +1 -1
- package/build/snackbar/index.js +1 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/spinner/index.js +0 -1
- package/build/spinner/index.js.map +1 -1
- package/build/theme/color-algorithms.js +2 -2
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/theme/index.js +0 -1
- package/build/theme/index.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +1 -1
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/toolbar/toolbar-item/index.native.js +1 -1
- package/build/toolbar/toolbar-item/index.native.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +0 -1
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +5 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tree-select/index.js +0 -1
- package/build/tree-select/index.js.map +1 -1
- package/build/ui/context/constants.js +2 -6
- package/build/ui/context/constants.js.map +1 -1
- package/build/ui/context/context-connect.js +1 -1
- package/build/ui/context/context-connect.js.map +1 -1
- package/build/ui/context/context-system-provider.js +1 -1
- package/build/ui/context/context-system-provider.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/unit-control/index.js +0 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/utils/hooks/use-cx.js +2 -1
- package/build/utils/hooks/use-cx.js.map +1 -1
- package/build/utils/math.js +0 -12
- package/build/utils/math.js.map +1 -1
- package/build/utils/values.js +3 -66
- package/build/utils/values.js.map +1 -1
- package/build/view/component.js +1 -2
- package/build/view/component.js.map +1 -1
- package/build-module/color-palette/utils.js +0 -6
- package/build-module/color-palette/utils.js.map +1 -1
- package/build-module/color-picker/hsv-color-picker.native.js +84 -0
- package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
- package/build-module/color-picker/hue-picker.native.js +185 -0
- package/build-module/color-picker/hue-picker.native.js.map +1 -0
- package/build-module/color-picker/index.native.js +2 -1
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/saturation-picker.native.js +168 -0
- package/build-module/color-picker/saturation-picker.native.js.map +1 -0
- package/build-module/item-group/item/component.js +0 -1
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item-group/component.js +0 -1
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/menu-item/index.js +4 -2
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/menu-item/types.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build-module/navigation/index.js +0 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +1 -2
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/palette-edit/styles.js +10 -10
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/popover/index.js +42 -79
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/overlay-middlewares.js.map +1 -1
- package/build-module/popover/types.js.map +1 -1
- package/build-module/popover/utils.js +4 -47
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/progress-bar/styles.js +6 -5
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/sandbox/index.js +1 -1
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/search-control/index.native.js +28 -25
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/shortcut/index.js +13 -0
- package/build-module/shortcut/index.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/index.js +6 -1
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/snackbar/index.js +1 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/spinner/index.js +0 -1
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/theme/color-algorithms.js +2 -2
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/theme/index.js +0 -1
- package/build-module/theme/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js +1 -1
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.native.js +1 -1
- package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +0 -1
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +5 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tree-select/index.js +0 -1
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/ui/context/constants.js +0 -2
- package/build-module/ui/context/constants.js.map +1 -1
- package/build-module/ui/context/context-connect.js +1 -1
- package/build-module/ui/context/context-connect.js.map +1 -1
- package/build-module/ui/context/context-system-provider.js +1 -1
- package/build-module/ui/context/context-system-provider.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/unit-control/index.js +0 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/utils/hooks/use-cx.js +2 -1
- package/build-module/utils/hooks/use-cx.js.map +1 -1
- package/build-module/utils/math.js +0 -11
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/values.js +0 -60
- package/build-module/utils/values.js.map +1 -1
- package/build-module/view/component.js +1 -2
- package/build-module/view/component.js.map +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
- package/build-types/animate/stories/index.story.d.ts +9 -9
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts +4 -4
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +2 -2
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +2 -2
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +3 -3
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +10 -9
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts +3 -3
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +2 -2
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts +2 -2
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts +3 -3
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +3 -3
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/styles.d.ts +1 -1
- package/build-types/color-palette/utils.d.ts +0 -1
- package/build-types/color-palette/utils.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts +2 -2
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +2 -2
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts +5 -5
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts +5 -5
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +3 -3
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts +4 -4
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/divider/stories/index.story.d.ts +5 -5
- package/build-types/divider/stories/index.story.d.ts.map +1 -1
- package/build-types/draggable/stories/index.story.d.ts +4 -4
- package/build-types/draggable/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +2 -2
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +6 -5
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
- package/build-types/elevation/stories/index.story.d.ts +5 -5
- package/build-types/elevation/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts +3 -3
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/flex/stories/index.story.d.ts +4 -4
- package/build-types/flex/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +2 -2
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts +3 -3
- package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts +7 -7
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +2 -2
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/grid/stories/index.story.d.ts +3 -3
- package/build-types/grid/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts +2 -2
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
- package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.story.d.ts +3 -3
- package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/heading/stories/index.story.d.ts +3 -3
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +4 -4
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +2 -2
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/item-group/item/component.d.ts +0 -1
- package/build-types/item-group/item/component.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +1 -1
- package/build-types/item-group/item-group/component.d.ts +0 -1
- package/build-types/item-group/item-group/component.d.ts.map +1 -1
- package/build-types/item-group/stories/index.story.d.ts +6 -6
- package/build-types/item-group/stories/index.story.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts +3 -3
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts +5 -58
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +74 -0
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
- package/build-types/menu-item/types.d.ts +3 -2
- package/build-types/menu-item/types.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts +4 -4
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts +0 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts +2 -2
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/default.d.ts +2 -2
- package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/group.d.ts +2 -2
- package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/search.d.ts +2 -2
- package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts +0 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts +5 -5
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts +3 -3
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +1 -1
- package/build-types/palette-edit/styles.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts +6 -6
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.story.d.ts +3 -3
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/overlay-middlewares.d.ts +2 -2
- package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts +7 -7
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +6 -0
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +1 -21
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +3 -3
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts +4 -4
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts +3 -3
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts +9 -9
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +2 -2
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts +2 -2
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/stories/index.story.d.ts +3 -3
- package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +2 -16
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +2 -2
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/index.d.ts +13 -0
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts +13 -0
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
- package/build-types/slot-fill/index.d.ts +1 -1
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts +7 -7
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/list.story.d.ts +3 -3
- package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
- package/build-types/spacer/stories/index.story.d.ts +3 -3
- package/build-types/spacer/stories/index.story.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +0 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts +4 -4
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/surface/stories/index.story.d.ts +3 -3
- package/build-types/surface/stories/index.story.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +2 -2
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts +4 -4
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts +3 -3
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts +3 -3
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/index.d.ts +0 -1
- package/build-types/theme/index.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +4 -4
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/tip/stories/index.story.d.ts +3 -3
- package/build-types/tip/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +2 -2
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
- package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +2 -2
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts +8 -8
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +2 -2
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts +0 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts +2 -2
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/stories/index.story.d.ts +4 -4
- package/build-types/truncate/stories/index.story.d.ts.map +1 -1
- package/build-types/ui/context/constants.d.ts +0 -2
- package/build-types/ui/context/constants.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +0 -1
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts +7 -7
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/hooks/use-cx.d.ts +2 -1
- package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
- package/build-types/utils/math.d.ts +0 -8
- package/build-types/utils/math.d.ts.map +1 -1
- package/build-types/utils/values.d.ts +0 -13
- package/build-types/utils/values.d.ts.map +1 -1
- package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
- package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +2 -2
- package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/view/component.d.ts +0 -1
- package/build-types/view/component.d.ts.map +1 -1
- package/build-types/view/stories/index.story.d.ts +3 -3
- package/build-types/view/stories/index.story.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/build-types/z-stack/stories/index.story.d.ts +3 -3
- package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/alignment-matrix-control/stories/index.story.tsx +8 -4
- package/src/alignment-matrix-control/test/index.tsx +6 -2
- package/src/angle-picker-control/stories/index.story.tsx +4 -4
- package/src/animate/stories/index.story.tsx +13 -11
- package/src/base-control/stories/index.story.tsx +6 -10
- package/src/border-box-control/stories/index.story.tsx +6 -10
- package/src/border-control/stories/index.story.tsx +9 -15
- package/src/button/stories/e2e/index.story.tsx +3 -3
- package/src/button/stories/index.story.tsx +11 -11
- package/src/button-group/stories/index.story.tsx +5 -7
- package/src/card/stories/index.story.tsx +6 -6
- package/src/checkbox-control/stories/index.story.tsx +8 -7
- package/src/circular-option-picker/stories/index.story.tsx +20 -5
- package/src/color-indicator/stories/index.story.tsx +5 -7
- package/src/color-palette/stories/index.story.tsx +13 -22
- package/src/color-palette/test/index.tsx +15 -9
- package/src/color-palette/test/utils.ts +0 -15
- package/src/color-palette/utils.ts +0 -7
- package/src/color-picker/hsv-color-picker.native.js +88 -0
- package/src/color-picker/hue-picker.native.js +194 -0
- package/src/color-picker/index.native.js +2 -1
- package/src/color-picker/saturation-picker.native.js +163 -0
- package/src/color-picker/stories/index.story.tsx +4 -4
- package/src/color-picker/style.native.scss +23 -0
- package/src/combobox-control/stories/index.story.tsx +4 -4
- package/src/confirm-dialog/stories/index.story.js +1 -1
- package/src/custom-gradient-picker/stories/index.story.tsx +4 -4
- package/src/date-time/stories/date-time.story.tsx +9 -11
- package/src/date-time/stories/date.story.tsx +9 -10
- package/src/date-time/stories/time.story.tsx +5 -5
- package/src/dimension-control/stories/index.story.tsx +4 -4
- package/src/disabled/stories/index.story.tsx +5 -5
- package/src/divider/stories/index.story.tsx +7 -7
- package/src/draggable/stories/index.story.tsx +5 -7
- package/src/drop-zone/stories/index.story.tsx +4 -4
- package/src/dropdown/stories/index.story.tsx +8 -6
- package/src/dropdown-menu/stories/index.story.tsx +4 -4
- package/src/dropdown-menu-v2/stories/index.story.tsx +28 -11
- package/src/duotone-picker/stories/duotone-picker.story.tsx +4 -7
- package/src/duotone-picker/stories/duotone-swatch.story.tsx +4 -4
- package/src/elevation/stories/index.story.tsx +8 -8
- package/src/external-link/stories/index.story.tsx +5 -7
- package/src/flex/stories/index.story.tsx +7 -7
- package/src/focal-point-picker/stories/index.story.tsx +4 -4
- package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
- package/src/font-size-picker/stories/index.story.tsx +11 -11
- package/src/form-file-upload/stories/index.story.tsx +4 -4
- package/src/form-toggle/stories/index.story.tsx +5 -8
- package/src/form-token-field/stories/index.story.tsx +11 -12
- package/src/gradient-picker/stories/index.story.tsx +4 -4
- package/src/grid/stories/index.story.tsx +5 -5
- package/src/guide/stories/index.story.tsx +3 -3
- package/src/h-stack/stories/e2e/index.story.tsx +4 -4
- package/src/h-stack/stories/index.story.tsx +5 -5
- package/src/heading/stories/index.story.tsx +4 -4
- package/src/icon/stories/index.story.tsx +6 -6
- package/src/input-control/stories/index.story.tsx +6 -4
- package/src/item-group/item/component.tsx +0 -1
- package/src/item-group/item-group/component.tsx +0 -1
- package/src/item-group/stories/index.story.tsx +12 -13
- package/src/keyboard-shortcuts/stories/index.story.tsx +4 -4
- package/src/menu-group/stories/index.story.tsx +6 -6
- package/src/menu-item/README.md +1 -1
- package/src/menu-item/index.tsx +5 -2
- package/src/menu-item/stories/index.story.tsx +80 -0
- package/src/menu-item/types.ts +3 -2
- package/src/menu-items-choice/stories/index.story.tsx +5 -7
- package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
- package/src/modal/stories/index.story.tsx +5 -10
- package/src/navigable-container/stories/navigable-menu.story.tsx +4 -4
- package/src/navigable-container/stories/tabbable-container.story.tsx +4 -4
- package/src/navigation/index.tsx +0 -1
- package/src/navigation/stories/index.story.tsx +17 -3
- package/src/navigation/stories/utils/controlled-state.tsx +2 -2
- package/src/navigation/stories/utils/default.tsx +2 -2
- package/src/navigation/stories/utils/group.tsx +2 -2
- package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
- package/src/navigation/stories/utils/more-examples.tsx +2 -2
- package/src/navigation/stories/utils/search.tsx +2 -2
- package/src/navigator/navigator-provider/component.tsx +0 -1
- package/src/navigator/stories/index.story.tsx +10 -11
- package/src/notice/stories/index.story.tsx +7 -7
- package/src/number-control/stories/index.story.tsx +4 -4
- package/src/palette-edit/stories/index.story.tsx +4 -4
- package/src/palette-edit/styles.js +0 -1
- package/src/panel/stories/index.story.tsx +10 -12
- package/src/placeholder/stories/index.story.tsx +5 -7
- package/src/popover/README.md +2 -2
- package/src/popover/index.tsx +69 -103
- package/src/popover/overlay-middlewares.tsx +2 -2
- package/src/popover/stories/index.story.tsx +8 -10
- package/src/popover/test/index.tsx +15 -1
- package/src/popover/types.ts +6 -0
- package/src/popover/utils.ts +5 -56
- package/src/progress-bar/stories/index.story.tsx +5 -7
- package/src/progress-bar/styles.ts +4 -1
- package/src/query-controls/stories/index.story.tsx +6 -7
- package/src/radio-control/stories/index.story.tsx +5 -7
- package/src/radio-group/stories/index.story.js +1 -0
- package/src/range-control/stories/index.story.tsx +13 -19
- package/src/resizable-box/stories/index.story.tsx +4 -4
- package/src/responsive-wrapper/stories/index.story.tsx +5 -6
- package/src/sandbox/index.tsx +4 -1
- package/src/sandbox/stories/index.story.tsx +4 -6
- package/src/scroll-lock/stories/index.story.tsx +4 -4
- package/src/scrollable/stories/index.story.tsx +5 -5
- package/src/search-control/index.native.js +39 -27
- package/src/search-control/stories/index.story.tsx +4 -4
- package/src/select-control/stories/index.story.tsx +4 -4
- package/src/shortcut/index.tsx +13 -0
- package/src/shortcut/stories/index.story.tsx +33 -0
- package/src/slot-fill/README.md +5 -5
- package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
- package/src/slot-fill/bubbles-virtually/slot.js +17 -5
- package/src/slot-fill/index.js +6 -1
- package/src/slot-fill/stories/index.story.js +3 -1
- package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
- package/src/snackbar/stories/index.story.tsx +11 -14
- package/src/snackbar/stories/list.story.tsx +4 -4
- package/src/spacer/stories/index.story.tsx +5 -5
- package/src/spinner/index.tsx +0 -1
- package/src/spinner/stories/index.story.tsx +6 -6
- package/src/surface/stories/index.story.tsx +5 -5
- package/src/tab-panel/stories/index.story.tsx +6 -14
- package/src/tab-panel/test/index.tsx +9 -25
- package/src/text/test/index.tsx +1 -1
- package/src/text-control/stories/index.story.tsx +8 -7
- package/src/text-highlight/stories/index.story.tsx +5 -7
- package/src/textarea-control/stories/index.story.tsx +5 -7
- package/src/theme/index.tsx +0 -1
- package/src/theme/stories/index.story.tsx +7 -7
- package/src/tip/stories/index.story.tsx +5 -5
- package/src/toggle-control/stories/index.story.tsx +4 -4
- package/src/toggle-group-control/stories/index.story.tsx +18 -12
- package/src/toolbar/stories/index.story.tsx +14 -4
- package/src/tools-panel/stories/index.story.tsx +18 -13
- package/src/tools-panel/tools-panel/component.tsx +0 -1
- package/src/tools-panel/tools-panel-header/component.tsx +3 -0
- package/src/tooltip/stories/index.story.js +1 -1
- package/src/tree-grid/stories/index.story.tsx +5 -3
- package/src/tree-select/index.tsx +0 -1
- package/src/tree-select/stories/index.story.tsx +4 -4
- package/src/truncate/stories/index.story.tsx +6 -8
- package/src/ui/context/constants.js +0 -2
- package/src/unit-control/index.tsx +0 -1
- package/src/unit-control/stories/index.story.tsx +11 -10
- package/src/utils/hooks/use-cx.ts +2 -1
- package/src/utils/math.js +0 -11
- package/src/utils/values.js +0 -81
- package/src/v-stack/stories/e2e/index.story.tsx +4 -4
- package/src/v-stack/stories/index.story.tsx +4 -4
- package/src/view/component.tsx +0 -1
- package/src/view/stories/index.story.tsx +5 -5
- package/src/visually-hidden/stories/index.story.tsx +8 -8
- package/src/z-stack/stories/index.story.tsx +5 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/build/popover/limit-shift.js +0 -129
- package/build/popover/limit-shift.js.map +0 -1
- package/build/ui/utils/get-high-dpi.js +0 -16
- package/build/ui/utils/get-high-dpi.js.map +0 -1
- package/build/utils/browsers.js +0 -32
- package/build/utils/browsers.js.map +0 -1
- package/build/utils/events.js +0 -43
- package/build/utils/events.js.map +0 -1
- package/build-module/popover/limit-shift.js +0 -122
- package/build-module/popover/limit-shift.js.map +0 -1
- package/build-module/ui/utils/get-high-dpi.js +0 -11
- package/build-module/ui/utils/get-high-dpi.js.map +0 -1
- package/build-module/utils/browsers.js +0 -25
- package/build-module/utils/browsers.js.map +0 -1
- package/build-module/utils/events.js +0 -37
- package/build-module/utils/events.js.map +0 -1
- package/build-types/alignment-matrix-control/stories/index.d.ts +0 -14
- package/build-types/alignment-matrix-control/stories/index.d.ts.map +0 -1
- package/build-types/angle-picker-control/stories/index.d.ts +0 -15
- package/build-types/angle-picker-control/stories/index.d.ts.map +0 -1
- package/build-types/animate/stories/index.d.ts +0 -18
- package/build-types/animate/stories/index.d.ts.map +0 -1
- package/build-types/base-control/stories/index.d.ts +0 -25
- package/build-types/base-control/stories/index.d.ts.map +0 -1
- package/build-types/border-box-control/stories/index.d.ts +0 -17
- package/build-types/border-box-control/stories/index.d.ts.map +0 -1
- package/build-types/border-control/stories/index.d.ts +0 -119
- package/build-types/border-control/stories/index.d.ts.map +0 -1
- package/build-types/button/stories/e2e/index.d.ts +0 -15
- package/build-types/button/stories/e2e/index.d.ts.map +0 -1
- package/build-types/button/stories/index.d.ts +0 -20
- package/build-types/button/stories/index.d.ts.map +0 -1
- package/build-types/button-group/stories/index.d.ts +0 -12
- package/build-types/button-group/stories/index.d.ts.map +0 -1
- package/build-types/card/stories/index.d.ts +0 -32
- package/build-types/card/stories/index.d.ts.map +0 -1
- package/build-types/checkbox-control/stories/index.d.ts +0 -13
- package/build-types/checkbox-control/stories/index.d.ts.map +0 -1
- package/build-types/circular-option-picker/stories/index.d.ts +0 -14
- package/build-types/circular-option-picker/stories/index.d.ts.map +0 -1
- package/build-types/color-indicator/stories/index.d.ts +0 -12
- package/build-types/color-indicator/stories/index.d.ts.map +0 -1
- package/build-types/color-palette/stories/index.d.ts +0 -46
- package/build-types/color-palette/stories/index.d.ts.map +0 -1
- package/build-types/color-picker/stories/index.d.ts +0 -19
- package/build-types/color-picker/stories/index.d.ts.map +0 -1
- package/build-types/combobox-control/stories/index.d.ts +0 -18
- package/build-types/combobox-control/stories/index.d.ts.map +0 -1
- package/build-types/custom-gradient-picker/stories/index.d.ts +0 -12
- package/build-types/custom-gradient-picker/stories/index.d.ts.map +0 -1
- package/build-types/date-time/stories/date-time.d.ts +0 -14
- package/build-types/date-time/stories/date-time.d.ts.map +0 -1
- package/build-types/date-time/stories/date.d.ts +0 -14
- package/build-types/date-time/stories/date.d.ts.map +0 -1
- package/build-types/date-time/stories/time.d.ts +0 -12
- package/build-types/date-time/stories/time.d.ts.map +0 -1
- package/build-types/dimension-control/stories/index.d.ts +0 -12
- package/build-types/dimension-control/stories/index.d.ts.map +0 -1
- package/build-types/disabled/stories/index.d.ts +0 -13
- package/build-types/disabled/stories/index.d.ts.map +0 -1
- package/build-types/divider/stories/index.d.ts +0 -11
- package/build-types/divider/stories/index.d.ts.map +0 -1
- package/build-types/draggable/stories/index.d.ts +0 -20
- package/build-types/draggable/stories/index.d.ts.map +0 -1
- package/build-types/drop-zone/stories/index.d.ts +0 -12
- package/build-types/drop-zone/stories/index.d.ts.map +0 -1
- package/build-types/dropdown/stories/index.d.ts +0 -23
- package/build-types/dropdown/stories/index.d.ts.map +0 -1
- package/build-types/dropdown-menu/stories/index.d.ts +0 -14
- package/build-types/dropdown-menu/stories/index.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/stories/index.d.ts +0 -11
- package/build-types/dropdown-menu-v2/stories/index.d.ts.map +0 -1
- package/build-types/duotone-picker/stories/duotone-picker.d.ts +0 -12
- package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +0 -1
- package/build-types/duotone-picker/stories/duotone-swatch.d.ts +0 -14
- package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +0 -1
- package/build-types/elevation/stories/index.d.ts +0 -22
- package/build-types/elevation/stories/index.d.ts.map +0 -1
- package/build-types/external-link/stories/index.d.ts +0 -12
- package/build-types/external-link/stories/index.d.ts.map +0 -1
- package/build-types/flex/stories/index.d.ts +0 -13
- package/build-types/flex/stories/index.d.ts.map +0 -1
- package/build-types/focal-point-picker/stories/index.d.ts +0 -15
- package/build-types/focal-point-picker/stories/index.d.ts.map +0 -1
- package/build-types/font-size-picker/stories/e2e/index.d.ts +0 -16
- package/build-types/font-size-picker/stories/e2e/index.d.ts.map +0 -1
- package/build-types/font-size-picker/stories/index.d.ts +0 -31
- package/build-types/font-size-picker/stories/index.d.ts.map +0 -1
- package/build-types/form-file-upload/stories/index.d.ts +0 -23
- package/build-types/form-file-upload/stories/index.d.ts.map +0 -1
- package/build-types/form-toggle/stories/index.d.ts +0 -12
- package/build-types/form-toggle/stories/index.d.ts.map +0 -1
- package/build-types/form-token-field/stories/index.d.ts +0 -26
- package/build-types/form-token-field/stories/index.d.ts.map +0 -1
- package/build-types/gradient-picker/stories/index.d.ts +0 -14
- package/build-types/gradient-picker/stories/index.d.ts.map +0 -1
- package/build-types/grid/stories/index.d.ts +0 -9
- package/build-types/grid/stories/index.d.ts.map +0 -1
- package/build-types/guide/stories/index.d.ts +0 -9
- package/build-types/guide/stories/index.d.ts.map +0 -1
- package/build-types/h-stack/stories/e2e/index.d.ts +0 -9
- package/build-types/h-stack/stories/e2e/index.d.ts.map +0 -1
- package/build-types/h-stack/stories/index.d.ts +0 -9
- package/build-types/h-stack/stories/index.d.ts.map +0 -1
- package/build-types/heading/stories/index.d.ts +0 -12
- package/build-types/heading/stories/index.d.ts.map +0 -1
- package/build-types/icon/stories/index.d.ts +0 -22
- package/build-types/icon/stories/index.d.ts.map +0 -1
- package/build-types/input-control/stories/index.d.ts +0 -28
- package/build-types/input-control/stories/index.d.ts.map +0 -1
- package/build-types/item-group/stories/index.d.ts +0 -15
- package/build-types/item-group/stories/index.d.ts.map +0 -1
- package/build-types/keyboard-shortcuts/stories/index.d.ts +0 -12
- package/build-types/keyboard-shortcuts/stories/index.d.ts.map +0 -1
- package/build-types/menu-group/stories/index.d.ts +0 -17
- package/build-types/menu-group/stories/index.d.ts.map +0 -1
- package/build-types/menu-items-choice/stories/index.d.ts +0 -12
- package/build-types/menu-items-choice/stories/index.d.ts.map +0 -1
- package/build-types/modal/stories/index.d.ts +0 -10
- package/build-types/modal/stories/index.d.ts.map +0 -1
- package/build-types/navigable-container/stories/navigable-menu.d.ts +0 -12
- package/build-types/navigable-container/stories/navigable-menu.d.ts.map +0 -1
- package/build-types/navigable-container/stories/tabbable-container.d.ts +0 -12
- package/build-types/navigable-container/stories/tabbable-container.d.ts.map +0 -1
- package/build-types/navigation/stories/index.d.ts +0 -18
- package/build-types/navigation/stories/index.d.ts.map +0 -1
- package/build-types/navigator/stories/index.d.ts +0 -11
- package/build-types/navigator/stories/index.d.ts.map +0 -1
- package/build-types/notice/stories/index.d.ts +0 -17
- package/build-types/notice/stories/index.d.ts.map +0 -1
- package/build-types/number-control/stories/index.d.ts +0 -25
- package/build-types/number-control/stories/index.d.ts.map +0 -1
- package/build-types/palette-edit/stories/index.d.ts +0 -13
- package/build-types/palette-edit/stories/index.d.ts.map +0 -1
- package/build-types/panel/stories/index.d.ts +0 -19
- package/build-types/panel/stories/index.d.ts.map +0 -1
- package/build-types/placeholder/stories/index.d.ts +0 -12
- package/build-types/placeholder/stories/index.d.ts.map +0 -1
- package/build-types/popover/limit-shift.d.ts +0 -87
- package/build-types/popover/limit-shift.d.ts.map +0 -1
- package/build-types/popover/stories/e2e/index.d.ts +0 -8
- package/build-types/popover/stories/e2e/index.d.ts.map +0 -1
- package/build-types/popover/stories/index.d.ts +0 -13
- package/build-types/popover/stories/index.d.ts.map +0 -1
- package/build-types/progress-bar/stories/index.d.ts +0 -12
- package/build-types/progress-bar/stories/index.d.ts.map +0 -1
- package/build-types/query-controls/stories/index.d.ts +0 -13
- package/build-types/query-controls/stories/index.d.ts.map +0 -1
- package/build-types/radio-control/stories/index.d.ts +0 -12
- package/build-types/radio-control/stories/index.d.ts.map +0 -1
- package/build-types/range-control/stories/index.d.ts +0 -48
- package/build-types/range-control/stories/index.d.ts.map +0 -1
- package/build-types/resizable-box/stories/index.d.ts +0 -61
- package/build-types/resizable-box/stories/index.d.ts.map +0 -1
- package/build-types/responsive-wrapper/stories/index.d.ts +0 -22
- package/build-types/responsive-wrapper/stories/index.d.ts.map +0 -1
- package/build-types/sandbox/stories/index.d.ts +0 -12
- package/build-types/sandbox/stories/index.d.ts.map +0 -1
- package/build-types/scroll-lock/stories/index.d.ts +0 -9
- package/build-types/scroll-lock/stories/index.d.ts.map +0 -1
- package/build-types/scrollable/stories/index.d.ts +0 -9
- package/build-types/scrollable/stories/index.d.ts.map +0 -1
- package/build-types/search-control/stories/index.d.ts +0 -47
- package/build-types/search-control/stories/index.d.ts.map +0 -1
- package/build-types/select-control/stories/index.d.ts +0 -19
- package/build-types/select-control/stories/index.d.ts.map +0 -1
- package/build-types/snackbar/stories/index.d.ts +0 -16
- package/build-types/snackbar/stories/index.d.ts.map +0 -1
- package/build-types/snackbar/stories/list.d.ts +0 -12
- package/build-types/snackbar/stories/list.d.ts.map +0 -1
- package/build-types/spacer/stories/index.d.ts +0 -12
- package/build-types/spacer/stories/index.d.ts.map +0 -1
- package/build-types/spinner/stories/index.d.ts +0 -13
- package/build-types/spinner/stories/index.d.ts.map +0 -1
- package/build-types/surface/stories/index.d.ts +0 -12
- package/build-types/surface/stories/index.d.ts.map +0 -1
- package/build-types/tab-panel/stories/index.d.ts +0 -16
- package/build-types/tab-panel/stories/index.d.ts.map +0 -1
- package/build-types/text-control/stories/index.d.ts +0 -13
- package/build-types/text-control/stories/index.d.ts.map +0 -1
- package/build-types/text-highlight/stories/index.d.ts +0 -12
- package/build-types/text-highlight/stories/index.d.ts.map +0 -1
- package/build-types/textarea-control/stories/index.d.ts +0 -12
- package/build-types/textarea-control/stories/index.d.ts.map +0 -1
- package/build-types/theme/stories/index.d.ts +0 -17
- package/build-types/theme/stories/index.d.ts.map +0 -1
- package/build-types/tip/stories/index.d.ts +0 -12
- package/build-types/tip/stories/index.d.ts.map +0 -1
- package/build-types/toggle-control/stories/index.d.ts +0 -13
- package/build-types/toggle-control/stories/index.d.ts.map +0 -1
- package/build-types/toggle-group-control/stories/index.d.ts +0 -27
- package/build-types/toggle-group-control/stories/index.d.ts.map +0 -1
- package/build-types/toolbar/stories/index.d.ts +0 -14
- package/build-types/toolbar/stories/index.d.ts.map +0 -1
- package/build-types/tools-panel/stories/index.d.ts +0 -17
- package/build-types/tools-panel/stories/index.d.ts.map +0 -1
- package/build-types/tree-grid/stories/index.d.ts +0 -13
- package/build-types/tree-grid/stories/index.d.ts.map +0 -1
- package/build-types/tree-select/stories/index.d.ts +0 -12
- package/build-types/tree-select/stories/index.d.ts.map +0 -1
- package/build-types/truncate/stories/index.d.ts +0 -13
- package/build-types/truncate/stories/index.d.ts.map +0 -1
- package/build-types/ui/control-group/component.d.ts +0 -27
- package/build-types/ui/control-group/component.d.ts.map +0 -1
- package/build-types/ui/control-group/context.d.ts +0 -4
- package/build-types/ui/control-group/context.d.ts.map +0 -1
- package/build-types/ui/control-group/hook.d.ts +0 -266
- package/build-types/ui/control-group/hook.d.ts.map +0 -1
- package/build-types/ui/control-group/index.d.ts +0 -4
- package/build-types/ui/control-group/index.d.ts.map +0 -1
- package/build-types/ui/control-group/styles.d.ts +0 -8
- package/build-types/ui/control-group/styles.d.ts.map +0 -1
- package/build-types/ui/control-group/types.d.ts +0 -27
- package/build-types/ui/control-group/types.d.ts.map +0 -1
- package/build-types/ui/control-label/component.d.ts +0 -23
- package/build-types/ui/control-label/component.d.ts.map +0 -1
- package/build-types/ui/control-label/hook.d.ts +0 -265
- package/build-types/ui/control-label/hook.d.ts.map +0 -1
- package/build-types/ui/control-label/index.d.ts +0 -3
- package/build-types/ui/control-label/index.d.ts.map +0 -1
- package/build-types/ui/control-label/styles.d.ts +0 -7
- package/build-types/ui/control-label/styles.d.ts.map +0 -1
- package/build-types/ui/control-label/types.d.ts +0 -9
- package/build-types/ui/control-label/types.d.ts.map +0 -1
- package/build-types/ui/form-group/form-group-content.d.ts +0 -7
- package/build-types/ui/form-group/form-group-content.d.ts.map +0 -1
- package/build-types/ui/form-group/form-group-context.d.ts +0 -11
- package/build-types/ui/form-group/form-group-context.d.ts.map +0 -1
- package/build-types/ui/form-group/form-group-help.d.ts +0 -18
- package/build-types/ui/form-group/form-group-help.d.ts.map +0 -1
- package/build-types/ui/form-group/form-group-label.d.ts +0 -8
- package/build-types/ui/form-group/form-group-label.d.ts.map +0 -1
- package/build-types/ui/form-group/form-group-styles.d.ts +0 -2
- package/build-types/ui/form-group/form-group-styles.d.ts.map +0 -1
- package/build-types/ui/form-group/form-group.d.ts +0 -53
- package/build-types/ui/form-group/form-group.d.ts.map +0 -1
- package/build-types/ui/form-group/index.d.ts +0 -4
- package/build-types/ui/form-group/index.d.ts.map +0 -1
- package/build-types/ui/form-group/types.d.ts +0 -30
- package/build-types/ui/form-group/types.d.ts.map +0 -1
- package/build-types/ui/form-group/use-form-group.d.ts +0 -593
- package/build-types/ui/form-group/use-form-group.d.ts.map +0 -1
- package/build-types/ui/index.d.ts +0 -6
- package/build-types/ui/index.d.ts.map +0 -1
- package/build-types/ui/spinner/component.d.ts +0 -13
- package/build-types/ui/spinner/component.d.ts.map +0 -1
- package/build-types/ui/spinner/index.d.ts +0 -2
- package/build-types/ui/spinner/index.d.ts.map +0 -1
- package/build-types/ui/spinner/styles.d.ts +0 -13
- package/build-types/ui/spinner/styles.d.ts.map +0 -1
- package/build-types/ui/spinner/utils.d.ts +0 -3
- package/build-types/ui/spinner/utils.d.ts.map +0 -1
- package/build-types/ui/utils/get-high-dpi.d.ts +0 -3
- package/build-types/ui/utils/get-high-dpi.d.ts.map +0 -1
- package/build-types/unit-control/stories/index.d.ts +0 -33
- package/build-types/unit-control/stories/index.d.ts.map +0 -1
- package/build-types/utils/browsers.d.ts +0 -11
- package/build-types/utils/browsers.d.ts.map +0 -1
- package/build-types/utils/events.d.ts +0 -11
- package/build-types/utils/events.d.ts.map +0 -1
- package/build-types/v-stack/stories/e2e/index.d.ts +0 -9
- package/build-types/v-stack/stories/e2e/index.d.ts.map +0 -1
- package/build-types/v-stack/stories/index.d.ts +0 -13
- package/build-types/v-stack/stories/index.d.ts.map +0 -1
- package/build-types/view/stories/index.d.ts +0 -12
- package/build-types/view/stories/index.d.ts.map +0 -1
- package/build-types/visually-hidden/stories/index.d.ts +0 -14
- package/build-types/visually-hidden/stories/index.d.ts.map +0 -1
- package/build-types/z-stack/stories/index.d.ts +0 -6
- package/build-types/z-stack/stories/index.d.ts.map +0 -1
- package/src/popover/limit-shift.ts +0 -205
- package/src/ui/utils/get-high-dpi.ts +0 -20
- package/src/utils/browsers.js +0 -36
- package/src/utils/events.ts +0 -50
- package/src/utils/test/events.js +0 -63
- package/src/utils/test/values.js +0 -101
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.limitShift = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* External dependencies
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Parts of this source were derived and modified from `floating-ui`,
|
|
13
|
-
* released under the MIT license.
|
|
14
|
-
*
|
|
15
|
-
* https://github.com/floating-ui/floating-ui
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) 2021 Floating UI contributors
|
|
18
|
-
*
|
|
19
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
20
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
21
|
-
* in the Software without restriction, including without limitation the rights
|
|
22
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
23
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
24
|
-
* furnished to do so, subject to the following conditions:
|
|
25
|
-
*
|
|
26
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
27
|
-
* copies or substantial portions of the Software.
|
|
28
|
-
*
|
|
29
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
32
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
33
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
34
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
|
-
* SOFTWARE.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Custom limiter function for the `shift` middleware.
|
|
40
|
-
* This function is mostly identical default `limitShift` from ``@floating-ui`;
|
|
41
|
-
* the only difference is that, when computing the min/max shift limits, it
|
|
42
|
-
* also takes into account the iframe offset that is added by the
|
|
43
|
-
* custom "frameOffset" middleware.
|
|
44
|
-
*
|
|
45
|
-
* All unexported types and functions are also from the `@floating-ui` library,
|
|
46
|
-
* and have been copied to this file for convenience.
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
function getSide(placement) {
|
|
50
|
-
return placement.split('-')[0];
|
|
51
|
-
}
|
|
52
|
-
function getMainAxisFromPlacement(placement) {
|
|
53
|
-
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
|
54
|
-
}
|
|
55
|
-
function getCrossAxis(axis) {
|
|
56
|
-
return axis === 'x' ? 'y' : 'x';
|
|
57
|
-
}
|
|
58
|
-
const limitShift = (options = {}) => ({
|
|
59
|
-
options,
|
|
60
|
-
fn(middlewareArguments) {
|
|
61
|
-
const {
|
|
62
|
-
x,
|
|
63
|
-
y,
|
|
64
|
-
placement,
|
|
65
|
-
rects,
|
|
66
|
-
middlewareData
|
|
67
|
-
} = middlewareArguments;
|
|
68
|
-
const {
|
|
69
|
-
offset = 0,
|
|
70
|
-
mainAxis: checkMainAxis = true,
|
|
71
|
-
crossAxis: checkCrossAxis = true
|
|
72
|
-
} = options;
|
|
73
|
-
const coords = {
|
|
74
|
-
x,
|
|
75
|
-
y
|
|
76
|
-
};
|
|
77
|
-
const mainAxis = getMainAxisFromPlacement(placement);
|
|
78
|
-
const crossAxis = getCrossAxis(mainAxis);
|
|
79
|
-
let mainAxisCoord = coords[mainAxis];
|
|
80
|
-
let crossAxisCoord = coords[crossAxis];
|
|
81
|
-
const rawOffset = typeof offset === 'function' ? offset(middlewareArguments) : offset;
|
|
82
|
-
const computedOffset = typeof rawOffset === 'number' ? {
|
|
83
|
-
mainAxis: rawOffset,
|
|
84
|
-
crossAxis: 0
|
|
85
|
-
} : {
|
|
86
|
-
mainAxis: 0,
|
|
87
|
-
crossAxis: 0,
|
|
88
|
-
...rawOffset
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
// At the moment of writing, this is the only difference
|
|
92
|
-
// with the `limitShift` function from `@floating-ui`.
|
|
93
|
-
// This offset needs to be added to all min/max limits
|
|
94
|
-
// in order to make the shift-limiting work as expected.
|
|
95
|
-
const additionalFrameOffset = {
|
|
96
|
-
x: 0,
|
|
97
|
-
y: 0,
|
|
98
|
-
...middlewareData.frameOffset?.amount
|
|
99
|
-
};
|
|
100
|
-
if (checkMainAxis) {
|
|
101
|
-
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
102
|
-
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis + additionalFrameOffset[mainAxis];
|
|
103
|
-
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis + additionalFrameOffset[mainAxis];
|
|
104
|
-
if (mainAxisCoord < limitMin) {
|
|
105
|
-
mainAxisCoord = limitMin;
|
|
106
|
-
} else if (mainAxisCoord > limitMax) {
|
|
107
|
-
mainAxisCoord = limitMax;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (checkCrossAxis) {
|
|
111
|
-
var _middlewareData$offse, _middlewareData$offse2;
|
|
112
|
-
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
113
|
-
const isOriginSide = ['top', 'left'].includes(getSide(placement));
|
|
114
|
-
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? (_middlewareData$offse = middlewareData.offset?.[crossAxis]) !== null && _middlewareData$offse !== void 0 ? _middlewareData$offse : 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis) + additionalFrameOffset[crossAxis];
|
|
115
|
-
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : (_middlewareData$offse2 = middlewareData.offset?.[crossAxis]) !== null && _middlewareData$offse2 !== void 0 ? _middlewareData$offse2 : 0) - (isOriginSide ? computedOffset.crossAxis : 0) + additionalFrameOffset[crossAxis];
|
|
116
|
-
if (crossAxisCoord < limitMin) {
|
|
117
|
-
crossAxisCoord = limitMin;
|
|
118
|
-
} else if (crossAxisCoord > limitMax) {
|
|
119
|
-
crossAxisCoord = limitMax;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
[mainAxis]: mainAxisCoord,
|
|
124
|
-
[crossAxis]: crossAxisCoord
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
exports.limitShift = limitShift;
|
|
129
|
-
//# sourceMappingURL=limit-shift.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getSide","placement","split","getMainAxisFromPlacement","includes","getCrossAxis","axis","limitShift","options","fn","middlewareArguments","x","y","rects","middlewareData","offset","mainAxis","checkMainAxis","crossAxis","checkCrossAxis","coords","mainAxisCoord","crossAxisCoord","rawOffset","computedOffset","additionalFrameOffset","frameOffset","amount","len","limitMin","reference","floating","limitMax","_middlewareData$offse","_middlewareData$offse2","isOriginSide","exports"],"sources":["@wordpress/components/src/popover/limit-shift.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tAxis,\n\tCoords,\n\tPlacement,\n\tSide,\n\tMiddlewareArguments,\n} from '@floating-ui/react-dom';\n\n/**\n * Parts of this source were derived and modified from `floating-ui`,\n * released under the MIT license.\n *\n * https://github.com/floating-ui/floating-ui\n *\n * Copyright (c) 2021 Floating UI contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Custom limiter function for the `shift` middleware.\n * This function is mostly identical default `limitShift` from ``@floating-ui`;\n * the only difference is that, when computing the min/max shift limits, it\n * also takes into account the iframe offset that is added by the\n * custom \"frameOffset\" middleware.\n *\n * All unexported types and functions are also from the `@floating-ui` library,\n * and have been copied to this file for convenience.\n */\n\ntype LimitShiftOffset =\n\t| ( ( args: MiddlewareArguments ) =>\n\t\t\t| number\n\t\t\t| {\n\t\t\t\t\t/**\n\t\t\t\t\t * Offset the limiting of the axis that runs along the alignment of the\n\t\t\t\t\t * floating element.\n\t\t\t\t\t */\n\t\t\t\t\tmainAxis?: number;\n\t\t\t\t\t/**\n\t\t\t\t\t * Offset the limiting of the axis that runs along the side of the\n\t\t\t\t\t * floating element.\n\t\t\t\t\t */\n\t\t\t\t\tcrossAxis?: number;\n\t\t\t } )\n\t| number\n\t| {\n\t\t\t/**\n\t\t\t * Offset the limiting of the axis that runs along the alignment of the\n\t\t\t * floating element.\n\t\t\t */\n\t\t\tmainAxis?: number;\n\t\t\t/**\n\t\t\t * Offset the limiting of the axis that runs along the side of the\n\t\t\t * floating element.\n\t\t\t */\n\t\t\tcrossAxis?: number;\n\t };\n\ntype LimitShiftOptions = {\n\t/**\n\t * Offset when limiting starts. `0` will limit when the opposite edges of the\n\t * reference and floating elements are aligned.\n\t * - positive = start limiting earlier\n\t * - negative = start limiting later\n\t */\n\toffset: LimitShiftOffset;\n\t/**\n\t * Whether to limit the axis that runs along the alignment of the floating\n\t * element.\n\t */\n\tmainAxis: boolean;\n\t/**\n\t * Whether to limit the axis that runs along the side of the floating element.\n\t */\n\tcrossAxis: boolean;\n};\n\nfunction getSide( placement: Placement ): Side {\n\treturn placement.split( '-' )[ 0 ] as Side;\n}\n\nfunction getMainAxisFromPlacement( placement: Placement ): Axis {\n\treturn [ 'top', 'bottom' ].includes( getSide( placement ) ) ? 'x' : 'y';\n}\n\nfunction getCrossAxis( axis: Axis ): Axis {\n\treturn axis === 'x' ? 'y' : 'x';\n}\n\nexport const limitShift = (\n\toptions: Partial< LimitShiftOptions > = {}\n): {\n\toptions: Partial< LimitShiftOffset >;\n\tfn: ( middlewareArguments: MiddlewareArguments ) => Coords;\n} => ( {\n\toptions,\n\tfn( middlewareArguments ) {\n\t\tconst { x, y, placement, rects, middlewareData } = middlewareArguments;\n\t\tconst {\n\t\t\toffset = 0,\n\t\t\tmainAxis: checkMainAxis = true,\n\t\t\tcrossAxis: checkCrossAxis = true,\n\t\t} = options;\n\n\t\tconst coords = { x, y };\n\t\tconst mainAxis = getMainAxisFromPlacement( placement );\n\t\tconst crossAxis = getCrossAxis( mainAxis );\n\n\t\tlet mainAxisCoord = coords[ mainAxis ];\n\t\tlet crossAxisCoord = coords[ crossAxis ];\n\n\t\tconst rawOffset =\n\t\t\ttypeof offset === 'function'\n\t\t\t\t? offset( middlewareArguments )\n\t\t\t\t: offset;\n\t\tconst computedOffset =\n\t\t\ttypeof rawOffset === 'number'\n\t\t\t\t? { mainAxis: rawOffset, crossAxis: 0 }\n\t\t\t\t: { mainAxis: 0, crossAxis: 0, ...rawOffset };\n\n\t\t// At the moment of writing, this is the only difference\n\t\t// with the `limitShift` function from `@floating-ui`.\n\t\t// This offset needs to be added to all min/max limits\n\t\t// in order to make the shift-limiting work as expected.\n\t\tconst additionalFrameOffset = {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\t...middlewareData.frameOffset?.amount,\n\t\t};\n\n\t\tif ( checkMainAxis ) {\n\t\t\tconst len = mainAxis === 'y' ? 'height' : 'width';\n\t\t\tconst limitMin =\n\t\t\t\trects.reference[ mainAxis ] -\n\t\t\t\trects.floating[ len ] +\n\t\t\t\tcomputedOffset.mainAxis +\n\t\t\t\tadditionalFrameOffset[ mainAxis ];\n\t\t\tconst limitMax =\n\t\t\t\trects.reference[ mainAxis ] +\n\t\t\t\trects.reference[ len ] -\n\t\t\t\tcomputedOffset.mainAxis +\n\t\t\t\tadditionalFrameOffset[ mainAxis ];\n\n\t\t\tif ( mainAxisCoord < limitMin ) {\n\t\t\t\tmainAxisCoord = limitMin;\n\t\t\t} else if ( mainAxisCoord > limitMax ) {\n\t\t\t\tmainAxisCoord = limitMax;\n\t\t\t}\n\t\t}\n\n\t\tif ( checkCrossAxis ) {\n\t\t\tconst len = mainAxis === 'y' ? 'width' : 'height';\n\t\t\tconst isOriginSide = [ 'top', 'left' ].includes(\n\t\t\t\tgetSide( placement )\n\t\t\t);\n\t\t\tconst limitMin =\n\t\t\t\trects.reference[ crossAxis ] -\n\t\t\t\trects.floating[ len ] +\n\t\t\t\t( isOriginSide\n\t\t\t\t\t? middlewareData.offset?.[ crossAxis ] ?? 0\n\t\t\t\t\t: 0 ) +\n\t\t\t\t( isOriginSide ? 0 : computedOffset.crossAxis ) +\n\t\t\t\tadditionalFrameOffset[ crossAxis ];\n\t\t\tconst limitMax =\n\t\t\t\trects.reference[ crossAxis ] +\n\t\t\t\trects.reference[ len ] +\n\t\t\t\t( isOriginSide\n\t\t\t\t\t? 0\n\t\t\t\t\t: middlewareData.offset?.[ crossAxis ] ?? 0 ) -\n\t\t\t\t( isOriginSide ? computedOffset.crossAxis : 0 ) +\n\t\t\t\tadditionalFrameOffset[ crossAxis ];\n\n\t\t\tif ( crossAxisCoord < limitMin ) {\n\t\t\t\tcrossAxisCoord = limitMin;\n\t\t\t} else if ( crossAxisCoord > limitMax ) {\n\t\t\t\tcrossAxisCoord = limitMax;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t[ mainAxis ]: mainAxisCoord,\n\t\t\t[ crossAxis ]: crossAxisCoord,\n\t\t} as Coords;\n\t},\n} );\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkDA,SAASA,OAAOA,CAAEC,SAAoB,EAAS;EAC9C,OAAOA,SAAS,CAACC,KAAK,CAAE,GAAI,CAAC,CAAE,CAAC,CAAE;AACnC;AAEA,SAASC,wBAAwBA,CAAEF,SAAoB,EAAS;EAC/D,OAAO,CAAE,KAAK,EAAE,QAAQ,CAAE,CAACG,QAAQ,CAAEJ,OAAO,CAAEC,SAAU,CAAE,CAAC,GAAG,GAAG,GAAG,GAAG;AACxE;AAEA,SAASI,YAAYA,CAAEC,IAAU,EAAS;EACzC,OAAOA,IAAI,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG;AAChC;AAEO,MAAMC,UAAU,GAAGA,CACzBC,OAAqC,GAAG,CAAC,CAAC,MAIpC;EACNA,OAAO;EACPC,EAAEA,CAAEC,mBAAmB,EAAG;IACzB,MAAM;MAAEC,CAAC;MAAEC,CAAC;MAAEX,SAAS;MAAEY,KAAK;MAAEC;IAAe,CAAC,GAAGJ,mBAAmB;IACtE,MAAM;MACLK,MAAM,GAAG,CAAC;MACVC,QAAQ,EAAEC,aAAa,GAAG,IAAI;MAC9BC,SAAS,EAAEC,cAAc,GAAG;IAC7B,CAAC,GAAGX,OAAO;IAEX,MAAMY,MAAM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S,GAAII;IAChB,CAAC;EACF;AACD,CAAC,CAAE;AAACc,OAAA,CAAA7B,UAAA,GAAAA,UAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getHighDpi = getHighDpi;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
/**
|
|
9
|
-
* External dependencies
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
function getHighDpi(strings, ...interpolations) {
|
|
13
|
-
const interpolatedStyles = /*#__PURE__*/(0, _react.css)(strings, ...interpolations);
|
|
14
|
-
return /*#__PURE__*/(0, _react.css)("@media ( -webkit-min-device-pixel-ratio: 1.25 ),( min-resolution: 120dpi ){", interpolatedStyles, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:getHighDpi;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdXRpbHMvZ2V0LWhpZ2gtZHBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFXIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdXRpbHMvZ2V0LWhpZ2gtZHBpLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXJlc3RyaWN0ZWQtaW1wb3J0c1xuaW1wb3J0IHR5cGUgeyBDU1NJbnRlcnBvbGF0aW9uIH0gZnJvbSAnQGVtb3Rpb24vY3NzJztcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEhpZ2hEcGkoXG5cdHN0cmluZ3M6IFRlbXBsYXRlU3RyaW5nc0FycmF5LFxuXHQuLi5pbnRlcnBvbGF0aW9uczogQ1NTSW50ZXJwb2xhdGlvbltdXG4pIHtcblx0Y29uc3QgaW50ZXJwb2xhdGVkU3R5bGVzID0gY3NzKCBzdHJpbmdzLCAuLi5pbnRlcnBvbGF0aW9ucyApO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0QG1lZGlhICggLXdlYmtpdC1taW4tZGV2aWNlLXBpeGVsLXJhdGlvOiAxLjI1ICksXG5cdFx0XHQoIG1pbi1yZXNvbHV0aW9uOiAxMjBkcGkgKSB7XG5cdFx0XHQkeyBpbnRlcnBvbGF0ZWRTdHlsZXMgfVxuXHRcdH1cblx0YDtcbn1cbiJdfQ== */");
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=get-high-dpi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","getHighDpi","strings","interpolations","interpolatedStyles","css","process","env","NODE_ENV"],"sources":["@wordpress/components/src/ui/utils/get-high-dpi.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n// eslint-disable-next-line no-restricted-imports\nimport type { CSSInterpolation } from '@emotion/css';\n\nexport function getHighDpi(\n\tstrings: TemplateStringsArray,\n\t...interpolations: CSSInterpolation[]\n) {\n\tconst interpolatedStyles = css( strings, ...interpolations );\n\n\treturn css`\n\t\t@media ( -webkit-min-device-pixel-ratio: 1.25 ),\n\t\t\t( min-resolution: 120dpi ) {\n\t\t\t${ interpolatedStyles }\n\t\t}\n\t`;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAKO,SAASC,UAAUA,CACzBC,OAA6B,EAC7B,GAAGC,cAAkC,EACpC;EACD,MAAMC,kBAAkB,gBAAG,IAAAC,UAAG,EAAEH,OAAO,EAAE,GAAGC,cAAe,CAAC;EAE5D,wBAAOE,UAAG,iFAGLD,kBAAkB,UAAAE,OAAA,CAAAC,GAAA,CAAAC,QAAA,gDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAGxB"}
|
package/build/utils/browsers.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.firefoxOnly = firefoxOnly;
|
|
7
|
-
exports.safariOnly = safariOnly;
|
|
8
|
-
var _react = require("@emotion/react");
|
|
9
|
-
/**
|
|
10
|
-
* External dependencies
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/* eslint-disable jsdoc/no-undefined-types */
|
|
14
|
-
/**
|
|
15
|
-
* @param {TemplateStringsArray} strings
|
|
16
|
-
* @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations
|
|
17
|
-
*/
|
|
18
|
-
function firefoxOnly(strings, ...interpolations) {
|
|
19
|
-
const interpolatedStyles = /*#__PURE__*/(0, _react.css)(strings, ...interpolations);
|
|
20
|
-
return /*#__PURE__*/(0, _react.css)("@-moz-document url-prefix(){", interpolatedStyles, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:firefoxOnly;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdXRpbHMvYnJvd3NlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYVciLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy91dGlscy9icm93c2Vycy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3J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MDAxZHBjbSApIHtcblx0XHRcdEBzdXBwb3J0cyAoIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZSApIHtcblx0XHRcdFx0JHsgaW50ZXJwb2xhdGVkU3R5bGVzIH1cblx0XHRcdH1cblx0XHR9XG5cdGA7XG59XG4vKiBlc2xpbnQtZW5hYmxlIGpzZG9jL25vLXVuZGVmaW5lZC10eXBlcyAqL1xuIl19 */");
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @param {TemplateStringsArray} strings
|
|
25
|
-
* @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations
|
|
26
|
-
*/
|
|
27
|
-
function safariOnly(strings, ...interpolations) {
|
|
28
|
-
const interpolatedStyles = /*#__PURE__*/(0, _react.css)(strings, ...interpolations);
|
|
29
|
-
return /*#__PURE__*/(0, _react.css)("@media not all and ( min-resolution: 0.001dpcm ){@supports ( -webkit-appearance: none ){", interpolatedStyles, ";}}" + (process.env.NODE_ENV === "production" ? "" : ";label:safariOnly;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdXRpbHMvYnJvd3NlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkJXIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdXRpbHMvYnJvd3NlcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qIGVzbGludC1kaXNhYmxlIGpzZG9jL25vLXVuZGVmaW5lZC10eXBlcyAqL1xuLyoqXG4gKiBAcGFyYW0ge1RlbXBsYXRlU3RyaW5nc0FycmF5fSAgICAgICAgICAgICAgIC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x0fVxuXHRgO1xufVxuLyogZXNsaW50LWVuYWJsZSBqc2RvYy9uby11bmRlZmluZWQtdHlwZXMgKi9cbiJdfQ== */");
|
|
30
|
-
}
|
|
31
|
-
/* eslint-enable jsdoc/no-undefined-types */
|
|
32
|
-
//# sourceMappingURL=browsers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","firefoxOnly","strings","interpolations","interpolatedStyles","css","process","env","NODE_ENV","safariOnly"],"sources":["@wordpress/components/src/utils/browsers.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/* eslint-disable jsdoc/no-undefined-types */\n/**\n * @param {TemplateStringsArray} strings\n * @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations\n */\nexport function firefoxOnly( strings, ...interpolations ) {\n\tconst interpolatedStyles = css( strings, ...interpolations );\n\n\treturn css`\n\t\t@-moz-document url-prefix() {\n\t\t\t${ interpolatedStyles };\n\t\t}\n\t`;\n}\n\n/**\n * @param {TemplateStringsArray} strings\n * @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations\n */\nexport function safariOnly( strings, ...interpolations ) {\n\tconst interpolatedStyles = css( strings, ...interpolations );\n\n\treturn css`\n\t\t@media not all and ( min-resolution: 0.001dpcm ) {\n\t\t\t@supports ( -webkit-appearance: none ) {\n\t\t\t\t${ interpolatedStyles }\n\t\t\t}\n\t\t}\n\t`;\n}\n/* eslint-enable jsdoc/no-undefined-types */\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,SAASC,WAAWA,CAAEC,OAAO,EAAE,GAAGC,cAAc,EAAG;EACzD,MAAMC,kBAAkB,gBAAG,IAAAC,UAAG,EAAEH,OAAO,EAAE,GAAGC,cAAe,CAAC;EAE5D,wBAAOE,UAAG,kCAELD,kBAAkB,UAAAE,OAAA,CAAAC,GAAA,CAAAC,QAAA,iDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAGxB;;AAEA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEP,OAAO,EAAE,GAAGC,cAAc,EAAG;EACxD,MAAMC,kBAAkB,gBAAG,IAAAC,UAAG,EAAEH,OAAO,EAAE,GAAGC,cAAe,CAAC;EAE5D,wBAAOE,UAAG,8FAGJD,kBAAkB,WAAAE,OAAA,CAAAC,GAAA,CAAAC,QAAA,gDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAIzB;AACA"}
|
package/build/utils/events.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.mergeEventHandlers = mergeEventHandlers;
|
|
7
|
-
/**
|
|
8
|
-
* Merges event handlers together.
|
|
9
|
-
*
|
|
10
|
-
* @template TEvent
|
|
11
|
-
* @param handler
|
|
12
|
-
* @param otherHandler
|
|
13
|
-
*/
|
|
14
|
-
function mergeEvent(handler, otherHandler) {
|
|
15
|
-
return event => {
|
|
16
|
-
if (typeof handler === 'function') {
|
|
17
|
-
handler(event);
|
|
18
|
-
}
|
|
19
|
-
if (typeof otherHandler === 'function') {
|
|
20
|
-
otherHandler(event);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Merges two sets of event handlers together.
|
|
27
|
-
*
|
|
28
|
-
* @template TEvent
|
|
29
|
-
* @param handlers
|
|
30
|
-
* @param extraHandlers
|
|
31
|
-
*/
|
|
32
|
-
function mergeEventHandlers(handlers, extraHandlers) {
|
|
33
|
-
// @ts-ignore We'll fill in all the properties below
|
|
34
|
-
const mergedHandlers = {
|
|
35
|
-
...handlers
|
|
36
|
-
};
|
|
37
|
-
for (const [key, handler] of Object.entries(extraHandlers)) {
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
mergedHandlers[key] = key in mergedHandlers ? mergeEvent(mergedHandlers[key], handler) : handler;
|
|
40
|
-
}
|
|
41
|
-
return mergedHandlers;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=events.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mergeEvent","handler","otherHandler","event","mergeEventHandlers","handlers","extraHandlers","mergedHandlers","key","Object","entries"],"sources":["@wordpress/components/src/utils/events.ts"],"sourcesContent":["type EventHandler< T extends Event > = ( event: T ) => void;\n\n/**\n * Merges event handlers together.\n *\n * @template TEvent\n * @param handler\n * @param otherHandler\n */\nfunction mergeEvent< TEvent extends Event >(\n\thandler: EventHandler< TEvent >,\n\totherHandler: EventHandler< TEvent >\n): EventHandler< TEvent > {\n\treturn ( event: TEvent ) => {\n\t\tif ( typeof handler === 'function' ) {\n\t\t\thandler( event );\n\t\t}\n\t\tif ( typeof otherHandler === 'function' ) {\n\t\t\totherHandler( event );\n\t\t}\n\t};\n}\n\n/**\n * Merges two sets of event handlers together.\n *\n * @template TEvent\n * @param handlers\n * @param extraHandlers\n */\nexport function mergeEventHandlers<\n\tTEvent extends Event,\n\tTLeft extends Record< string, EventHandler< TEvent > >,\n\tTRight extends Record< string, EventHandler< TEvent > >\n>( handlers: TLeft, extraHandlers: TRight ): TLeft & TRight {\n\t// @ts-ignore We'll fill in all the properties below\n\tconst mergedHandlers: TLeft & TRight = {\n\t\t...handlers,\n\t};\n\n\tfor ( const [ key, handler ] of Object.entries( extraHandlers ) ) {\n\t\t// @ts-ignore\n\t\tmergedHandlers[ key as keyof typeof mergedHandlers ] =\n\t\t\tkey in mergedHandlers\n\t\t\t\t? mergeEvent( mergedHandlers[ key ], handler )\n\t\t\t\t: handler;\n\t}\n\n\treturn mergedHandlers;\n}\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAUA,CAClBC,OAA+B,EAC/BC,YAAoC,EACX;EACzB,OAASC,KAAa,IAAM;IAC3B,IAAK,OAAOF,OAAO,KAAK,UAAU,EAAG;MACpCA,OAAO,CAAEE,KAAM,CAAC;IACjB;IACA,IAAK,OAAOD,YAAY,KAAK,UAAU,EAAG;MACzCA,YAAY,CAAEC,KAAM,CAAC;IACtB;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAI/BC,QAAe,EAAEC,aAAqB,EAAmB;EAC3D;EACA,MAAMC,cAA8B,GAAG;IACtC,GAAGF;EACJ,CAAC;EAED,KAAM,MAAM,CAAEG,GAAG,EAAEP,OAAO,CAAE,IAAIQ,MAAM,CAACC,OAAO,CAAEJ,aAAc,CAAC,EAAG;IACjE;IACAC,cAAc,CAAEC,GAAG,CAAiC,GACnDA,GAAG,IAAID,cAAc,GAClBP,UAAU,CAAEO,cAAc,CAAEC,GAAG,CAAE,EAAEP,OAAQ,CAAC,GAC5CA,OAAO;EACZ;EAEA,OAAOM,cAAc;AACtB"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Parts of this source were derived and modified from `floating-ui`,
|
|
7
|
-
* released under the MIT license.
|
|
8
|
-
*
|
|
9
|
-
* https://github.com/floating-ui/floating-ui
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2021 Floating UI contributors
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
18
|
-
* furnished to do so, subject to the following conditions:
|
|
19
|
-
*
|
|
20
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
21
|
-
* copies or substantial portions of the Software.
|
|
22
|
-
*
|
|
23
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
-
* SOFTWARE.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Custom limiter function for the `shift` middleware.
|
|
34
|
-
* This function is mostly identical default `limitShift` from ``@floating-ui`;
|
|
35
|
-
* the only difference is that, when computing the min/max shift limits, it
|
|
36
|
-
* also takes into account the iframe offset that is added by the
|
|
37
|
-
* custom "frameOffset" middleware.
|
|
38
|
-
*
|
|
39
|
-
* All unexported types and functions are also from the `@floating-ui` library,
|
|
40
|
-
* and have been copied to this file for convenience.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
function getSide(placement) {
|
|
44
|
-
return placement.split('-')[0];
|
|
45
|
-
}
|
|
46
|
-
function getMainAxisFromPlacement(placement) {
|
|
47
|
-
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
|
48
|
-
}
|
|
49
|
-
function getCrossAxis(axis) {
|
|
50
|
-
return axis === 'x' ? 'y' : 'x';
|
|
51
|
-
}
|
|
52
|
-
export const limitShift = (options = {}) => ({
|
|
53
|
-
options,
|
|
54
|
-
fn(middlewareArguments) {
|
|
55
|
-
const {
|
|
56
|
-
x,
|
|
57
|
-
y,
|
|
58
|
-
placement,
|
|
59
|
-
rects,
|
|
60
|
-
middlewareData
|
|
61
|
-
} = middlewareArguments;
|
|
62
|
-
const {
|
|
63
|
-
offset = 0,
|
|
64
|
-
mainAxis: checkMainAxis = true,
|
|
65
|
-
crossAxis: checkCrossAxis = true
|
|
66
|
-
} = options;
|
|
67
|
-
const coords = {
|
|
68
|
-
x,
|
|
69
|
-
y
|
|
70
|
-
};
|
|
71
|
-
const mainAxis = getMainAxisFromPlacement(placement);
|
|
72
|
-
const crossAxis = getCrossAxis(mainAxis);
|
|
73
|
-
let mainAxisCoord = coords[mainAxis];
|
|
74
|
-
let crossAxisCoord = coords[crossAxis];
|
|
75
|
-
const rawOffset = typeof offset === 'function' ? offset(middlewareArguments) : offset;
|
|
76
|
-
const computedOffset = typeof rawOffset === 'number' ? {
|
|
77
|
-
mainAxis: rawOffset,
|
|
78
|
-
crossAxis: 0
|
|
79
|
-
} : {
|
|
80
|
-
mainAxis: 0,
|
|
81
|
-
crossAxis: 0,
|
|
82
|
-
...rawOffset
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
// At the moment of writing, this is the only difference
|
|
86
|
-
// with the `limitShift` function from `@floating-ui`.
|
|
87
|
-
// This offset needs to be added to all min/max limits
|
|
88
|
-
// in order to make the shift-limiting work as expected.
|
|
89
|
-
const additionalFrameOffset = {
|
|
90
|
-
x: 0,
|
|
91
|
-
y: 0,
|
|
92
|
-
...middlewareData.frameOffset?.amount
|
|
93
|
-
};
|
|
94
|
-
if (checkMainAxis) {
|
|
95
|
-
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
96
|
-
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis + additionalFrameOffset[mainAxis];
|
|
97
|
-
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis + additionalFrameOffset[mainAxis];
|
|
98
|
-
if (mainAxisCoord < limitMin) {
|
|
99
|
-
mainAxisCoord = limitMin;
|
|
100
|
-
} else if (mainAxisCoord > limitMax) {
|
|
101
|
-
mainAxisCoord = limitMax;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (checkCrossAxis) {
|
|
105
|
-
var _middlewareData$offse, _middlewareData$offse2;
|
|
106
|
-
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
107
|
-
const isOriginSide = ['top', 'left'].includes(getSide(placement));
|
|
108
|
-
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? (_middlewareData$offse = middlewareData.offset?.[crossAxis]) !== null && _middlewareData$offse !== void 0 ? _middlewareData$offse : 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis) + additionalFrameOffset[crossAxis];
|
|
109
|
-
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : (_middlewareData$offse2 = middlewareData.offset?.[crossAxis]) !== null && _middlewareData$offse2 !== void 0 ? _middlewareData$offse2 : 0) - (isOriginSide ? computedOffset.crossAxis : 0) + additionalFrameOffset[crossAxis];
|
|
110
|
-
if (crossAxisCoord < limitMin) {
|
|
111
|
-
crossAxisCoord = limitMin;
|
|
112
|
-
} else if (crossAxisCoord > limitMax) {
|
|
113
|
-
crossAxisCoord = limitMax;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
[mainAxis]: mainAxisCoord,
|
|
118
|
-
[crossAxis]: crossAxisCoord
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
//# sourceMappingURL=limit-shift.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getSide","placement","split","getMainAxisFromPlacement","includes","getCrossAxis","axis","limitShift","options","fn","middlewareArguments","x","y","rects","middlewareData","offset","mainAxis","checkMainAxis","crossAxis","checkCrossAxis","coords","mainAxisCoord","crossAxisCoord","rawOffset","computedOffset","additionalFrameOffset","frameOffset","amount","len","limitMin","reference","floating","limitMax","_middlewareData$offse","_middlewareData$offse2","isOriginSide"],"sources":["@wordpress/components/src/popover/limit-shift.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tAxis,\n\tCoords,\n\tPlacement,\n\tSide,\n\tMiddlewareArguments,\n} from '@floating-ui/react-dom';\n\n/**\n * Parts of this source were derived and modified from `floating-ui`,\n * released under the MIT license.\n *\n * https://github.com/floating-ui/floating-ui\n *\n * Copyright (c) 2021 Floating UI contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Custom limiter function for the `shift` middleware.\n * This function is mostly identical default `limitShift` from ``@floating-ui`;\n * the only difference is that, when computing the min/max shift limits, it\n * also takes into account the iframe offset that is added by the\n * custom \"frameOffset\" middleware.\n *\n * All unexported types and functions are also from the `@floating-ui` library,\n * and have been copied to this file for convenience.\n */\n\ntype LimitShiftOffset =\n\t| ( ( args: MiddlewareArguments ) =>\n\t\t\t| number\n\t\t\t| {\n\t\t\t\t\t/**\n\t\t\t\t\t * Offset the limiting of the axis that runs along the alignment of the\n\t\t\t\t\t * floating element.\n\t\t\t\t\t */\n\t\t\t\t\tmainAxis?: number;\n\t\t\t\t\t/**\n\t\t\t\t\t * Offset the limiting of the axis that runs along the side of the\n\t\t\t\t\t * floating element.\n\t\t\t\t\t */\n\t\t\t\t\tcrossAxis?: number;\n\t\t\t } )\n\t| number\n\t| {\n\t\t\t/**\n\t\t\t * Offset the limiting of the axis that runs along the alignment of the\n\t\t\t * floating element.\n\t\t\t */\n\t\t\tmainAxis?: number;\n\t\t\t/**\n\t\t\t * Offset the limiting of the axis that runs along the side of the\n\t\t\t * floating element.\n\t\t\t */\n\t\t\tcrossAxis?: number;\n\t };\n\ntype LimitShiftOptions = {\n\t/**\n\t * Offset when limiting starts. `0` will limit when the opposite edges of the\n\t * reference and floating elements are aligned.\n\t * - positive = start limiting earlier\n\t * - negative = start limiting later\n\t */\n\toffset: LimitShiftOffset;\n\t/**\n\t * Whether to limit the axis that runs along the alignment of the floating\n\t * element.\n\t */\n\tmainAxis: boolean;\n\t/**\n\t * Whether to limit the axis that runs along the side of the floating element.\n\t */\n\tcrossAxis: boolean;\n};\n\nfunction getSide( placement: Placement ): Side {\n\treturn placement.split( '-' )[ 0 ] as Side;\n}\n\nfunction getMainAxisFromPlacement( placement: Placement ): Axis {\n\treturn [ 'top', 'bottom' ].includes( getSide( placement ) ) ? 'x' : 'y';\n}\n\nfunction getCrossAxis( axis: Axis ): Axis {\n\treturn axis === 'x' ? 'y' : 'x';\n}\n\nexport const limitShift = (\n\toptions: Partial< LimitShiftOptions > = {}\n): {\n\toptions: Partial< LimitShiftOffset >;\n\tfn: ( middlewareArguments: MiddlewareArguments ) => Coords;\n} => ( {\n\toptions,\n\tfn( middlewareArguments ) {\n\t\tconst { x, y, placement, rects, middlewareData } = middlewareArguments;\n\t\tconst {\n\t\t\toffset = 0,\n\t\t\tmainAxis: checkMainAxis = true,\n\t\t\tcrossAxis: checkCrossAxis = true,\n\t\t} = options;\n\n\t\tconst coords = { x, y };\n\t\tconst mainAxis = getMainAxisFromPlacement( placement );\n\t\tconst crossAxis = getCrossAxis( mainAxis );\n\n\t\tlet mainAxisCoord = coords[ mainAxis ];\n\t\tlet crossAxisCoord = coords[ crossAxis ];\n\n\t\tconst rawOffset =\n\t\t\ttypeof offset === 'function'\n\t\t\t\t? offset( middlewareArguments )\n\t\t\t\t: offset;\n\t\tconst computedOffset =\n\t\t\ttypeof rawOffset === 'number'\n\t\t\t\t? { mainAxis: rawOffset, crossAxis: 0 }\n\t\t\t\t: { mainAxis: 0, crossAxis: 0, ...rawOffset };\n\n\t\t// At the moment of writing, this is the only difference\n\t\t// with the `limitShift` function from `@floating-ui`.\n\t\t// This offset needs to be added to all min/max limits\n\t\t// in order to make the shift-limiting work as expected.\n\t\tconst additionalFrameOffset = {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\t...middlewareData.frameOffset?.amount,\n\t\t};\n\n\t\tif ( checkMainAxis ) {\n\t\t\tconst len = mainAxis === 'y' ? 'height' : 'width';\n\t\t\tconst limitMin =\n\t\t\t\trects.reference[ mainAxis ] -\n\t\t\t\trects.floating[ len ] +\n\t\t\t\tcomputedOffset.mainAxis +\n\t\t\t\tadditionalFrameOffset[ mainAxis ];\n\t\t\tconst limitMax =\n\t\t\t\trects.reference[ mainAxis ] +\n\t\t\t\trects.reference[ len ] -\n\t\t\t\tcomputedOffset.mainAxis +\n\t\t\t\tadditionalFrameOffset[ mainAxis ];\n\n\t\t\tif ( mainAxisCoord < limitMin ) {\n\t\t\t\tmainAxisCoord = limitMin;\n\t\t\t} else if ( mainAxisCoord > limitMax ) {\n\t\t\t\tmainAxisCoord = limitMax;\n\t\t\t}\n\t\t}\n\n\t\tif ( checkCrossAxis ) {\n\t\t\tconst len = mainAxis === 'y' ? 'width' : 'height';\n\t\t\tconst isOriginSide = [ 'top', 'left' ].includes(\n\t\t\t\tgetSide( placement )\n\t\t\t);\n\t\t\tconst limitMin =\n\t\t\t\trects.reference[ crossAxis ] -\n\t\t\t\trects.floating[ len ] +\n\t\t\t\t( isOriginSide\n\t\t\t\t\t? middlewareData.offset?.[ crossAxis ] ?? 0\n\t\t\t\t\t: 0 ) +\n\t\t\t\t( isOriginSide ? 0 : computedOffset.crossAxis ) +\n\t\t\t\tadditionalFrameOffset[ crossAxis ];\n\t\t\tconst limitMax =\n\t\t\t\trects.reference[ crossAxis ] +\n\t\t\t\trects.reference[ len ] +\n\t\t\t\t( isOriginSide\n\t\t\t\t\t? 0\n\t\t\t\t\t: middlewareData.offset?.[ crossAxis ] ?? 0 ) -\n\t\t\t\t( isOriginSide ? computedOffset.crossAxis : 0 ) +\n\t\t\t\tadditionalFrameOffset[ crossAxis ];\n\n\t\t\tif ( crossAxisCoord < limitMin ) {\n\t\t\t\tcrossAxisCoord = limitMin;\n\t\t\t} else if ( crossAxisCoord > limitMax ) {\n\t\t\t\tcrossAxisCoord = limitMax;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t[ mainAxis ]: mainAxisCoord,\n\t\t\t[ crossAxis ]: crossAxisCoord,\n\t\t} as Coords;\n\t},\n} );\n"],"mappings":"AAAA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkDA,SAASA,OAAOA,CAAEC,SAAoB,EAAS;EAC9C,OAAOA,SAAS,CAACC,KAAK,CAAE,GAAI,CAAC,CAAE,CAAC,CAAE;AACnC;AAEA,SAASC,wBAAwBA,CAAEF,SAAoB,EAAS;EAC/D,OAAO,CAAE,KAAK,EAAE,QAAQ,CAAE,CAACG,QAAQ,CAAEJ,OAAO,CAAEC,SAAU,CAAE,CAAC,GAAG,GAAG,GAAG,GAAG;AACxE;AAEA,SAASI,YAAYA,CAAEC,IAAU,EAAS;EACzC,OAAOA,IAAI,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG;AAChC;AAEA,OAAO,MAAMC,UAAU,GAAGA,CACzBC,OAAqC,G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CAAE,IAC5CC,YAAY,GAAGX,cAAc,CAACN,SAAS,GAAG,CAAC,CAAE,GAC/CO,qBAAqB,CAAEP,SAAS,CAAE;MAEnC,IAAKI,cAAc,GAAGO,QAAQ,EAAG;QAChCP,cAAc,GAAGO,QAAQ;MAC1B,CAAC,MAAM,IAAKP,cAAc,GAAGU,QAAQ,EAAG;QACvCV,cAAc,GAAGU,QAAQ;MAC1B;IACD;IAEA,OAAO;MACN,CAAEhB,QAAQ,GAAIK,aAAa;MAC3B,CAAEH,SAAS,GAAII;IAChB,CAAC;EACF;AACD,CAAC,CAAE"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
-
// eslint-disable-next-line no-restricted-imports
|
|
6
|
-
|
|
7
|
-
export function getHighDpi(strings, ...interpolations) {
|
|
8
|
-
const interpolatedStyles = /*#__PURE__*/css(strings, ...interpolations);
|
|
9
|
-
return /*#__PURE__*/css("@media ( -webkit-min-device-pixel-ratio: 1.25 ),( min-resolution: 120dpi ){", interpolatedStyles, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:getHighDpi;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdXRpbHMvZ2V0LWhpZ2gtZHBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFXIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdWkvdXRpbHMvZ2V0LWhpZ2gtZHBpLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXJlc3RyaWN0ZWQtaW1wb3J0c1xuaW1wb3J0IHR5cGUgeyBDU1NJbnRlcnBvbGF0aW9uIH0gZnJvbSAnQGVtb3Rpb24vY3NzJztcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEhpZ2hEcGkoXG5cdHN0cmluZ3M6IFRlbXBsYXRlU3RyaW5nc0FycmF5LFxuXHQuLi5pbnRlcnBvbGF0aW9uczogQ1NTSW50ZXJwb2xhdGlvbltdXG4pIHtcblx0Y29uc3QgaW50ZXJwb2xhdGVkU3R5bGVzID0gY3NzKCBzdHJpbmdzLCAuLi5pbnRlcnBvbGF0aW9ucyApO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0QG1lZGlhICggLXdlYmtpdC1taW4tZGV2aWNlLXBpeGVsLXJhdGlvOiAxLjI1ICksXG5cdFx0XHQoIG1pbi1yZXNvbHV0aW9uOiAxMjBkcGkgKSB7XG5cdFx0XHQkeyBpbnRlcnBvbGF0ZWRTdHlsZXMgfVxuXHRcdH1cblx0YDtcbn1cbiJdfQ== */");
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=get-high-dpi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["css","getHighDpi","strings","interpolations","interpolatedStyles","process","env","NODE_ENV"],"sources":["@wordpress/components/src/ui/utils/get-high-dpi.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n// eslint-disable-next-line no-restricted-imports\nimport type { CSSInterpolation } from '@emotion/css';\n\nexport function getHighDpi(\n\tstrings: TemplateStringsArray,\n\t...interpolations: CSSInterpolation[]\n) {\n\tconst interpolatedStyles = css( strings, ...interpolations );\n\n\treturn css`\n\t\t@media ( -webkit-min-device-pixel-ratio: 1.25 ),\n\t\t\t( min-resolution: 120dpi ) {\n\t\t\t${ interpolatedStyles }\n\t\t}\n\t`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,gBAAgB;AACpC;;AAGA,OAAO,SAASC,UAAUA,CACzBC,OAA6B,EAC7B,GAAGC,cAAkC,EACpC;EACD,MAAMC,kBAAkB,gBAAGJ,GAAG,CAAEE,OAAO,EAAE,GAAGC,cAAe,CAAC;EAE5D,oBAAOH,GAAG,gFAGLI,kBAAkB,UAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,gDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAGxB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
-
|
|
6
|
-
/* eslint-disable jsdoc/no-undefined-types */
|
|
7
|
-
/**
|
|
8
|
-
* @param {TemplateStringsArray} strings
|
|
9
|
-
* @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations
|
|
10
|
-
*/
|
|
11
|
-
export function firefoxOnly(strings, ...interpolations) {
|
|
12
|
-
const interpolatedStyles = /*#__PURE__*/css(strings, ...interpolations);
|
|
13
|
-
return /*#__PURE__*/css("@-moz-document url-prefix(){", interpolatedStyles, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:firefoxOnly;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdXRpbHMvYnJvd3NlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYVciLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy91dGlscy9icm93c2Vycy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyogZXNsaW50LWRpc2Fib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wb3J0cyAoIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZSApIHtcblx0XHRcdFx0JHsgaW50ZXJwb2xhdGVkU3R5bGVzIH1cblx0XHRcdH1cblx0XHR9XG5cdGA7XG59XG4vKiBlc2xpbnQtZW5hYmxlIGpzZG9jL25vLXVuZGVmaW5lZC10eXBlcyAqL1xuIl19 */");
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @param {TemplateStringsArray} strings
|
|
18
|
-
* @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations
|
|
19
|
-
*/
|
|
20
|
-
export function safariOnly(strings, ...interpolations) {
|
|
21
|
-
const interpolatedStyles = /*#__PURE__*/css(strings, ...interpolations);
|
|
22
|
-
return /*#__PURE__*/css("@media not all and ( min-resolution: 0.001dpcm ){@supports ( -webkit-appearance: none ){", interpolatedStyles, ";}}" + (process.env.NODE_ENV === "production" ? "" : ";label:safariOnly;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdXRpbHMvYnJvd3NlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkJXIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdXRpbHMvYnJvd3NlcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qIGVzbGludC1kaXNhYmxlIGpzZG9jL25vLXVuZGVmaW5lZC10eXBlcyAqL1xuLyoqXG4gKiBAcGFyYW0ge1RlbXBsYXRlU3RyaW5nc0FycmF5fSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nc1xuICogQHBhc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vYy9uby11bmRlZmluZWQtdHlwZXMgKi9cbiJdfQ== */");
|
|
23
|
-
}
|
|
24
|
-
/* eslint-enable jsdoc/no-undefined-types */
|
|
25
|
-
//# sourceMappingURL=browsers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["css","firefoxOnly","strings","interpolations","interpolatedStyles","process","env","NODE_ENV","safariOnly"],"sources":["@wordpress/components/src/utils/browsers.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/* eslint-disable jsdoc/no-undefined-types */\n/**\n * @param {TemplateStringsArray} strings\n * @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations\n */\nexport function firefoxOnly( strings, ...interpolations ) {\n\tconst interpolatedStyles = css( strings, ...interpolations );\n\n\treturn css`\n\t\t@-moz-document url-prefix() {\n\t\t\t${ interpolatedStyles };\n\t\t}\n\t`;\n}\n\n/**\n * @param {TemplateStringsArray} strings\n * @param {import('@emotion/css/create-instance').CSSInterpolation[]} interpolations\n */\nexport function safariOnly( strings, ...interpolations ) {\n\tconst interpolatedStyles = css( strings, ...interpolations );\n\n\treturn css`\n\t\t@media not all and ( min-resolution: 0.001dpcm ) {\n\t\t\t@supports ( -webkit-appearance: none ) {\n\t\t\t\t${ interpolatedStyles }\n\t\t\t}\n\t\t}\n\t`;\n}\n/* eslint-enable jsdoc/no-undefined-types */\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAEC,OAAO,EAAE,GAAGC,cAAc,EAAG;EACzD,MAAMC,kBAAkB,gBAAGJ,GAAG,CAAEE,OAAO,EAAE,GAAGC,cAAe,CAAC;EAE5D,oBAAOH,GAAG,iCAELI,kBAAkB,UAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,iDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAGxB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAEN,OAAO,EAAE,GAAGC,cAAc,EAAG;EACxD,MAAMC,kBAAkB,gBAAGJ,GAAG,CAAEE,OAAO,EAAE,GAAGC,cAAe,CAAC;EAE5D,oBAAOH,GAAG,6FAGJI,kBAAkB,WAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,gDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAIzB;AACA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Merges event handlers together.
|
|
3
|
-
*
|
|
4
|
-
* @template TEvent
|
|
5
|
-
* @param handler
|
|
6
|
-
* @param otherHandler
|
|
7
|
-
*/
|
|
8
|
-
function mergeEvent(handler, otherHandler) {
|
|
9
|
-
return event => {
|
|
10
|
-
if (typeof handler === 'function') {
|
|
11
|
-
handler(event);
|
|
12
|
-
}
|
|
13
|
-
if (typeof otherHandler === 'function') {
|
|
14
|
-
otherHandler(event);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Merges two sets of event handlers together.
|
|
21
|
-
*
|
|
22
|
-
* @template TEvent
|
|
23
|
-
* @param handlers
|
|
24
|
-
* @param extraHandlers
|
|
25
|
-
*/
|
|
26
|
-
export function mergeEventHandlers(handlers, extraHandlers) {
|
|
27
|
-
// @ts-ignore We'll fill in all the properties below
|
|
28
|
-
const mergedHandlers = {
|
|
29
|
-
...handlers
|
|
30
|
-
};
|
|
31
|
-
for (const [key, handler] of Object.entries(extraHandlers)) {
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
mergedHandlers[key] = key in mergedHandlers ? mergeEvent(mergedHandlers[key], handler) : handler;
|
|
34
|
-
}
|
|
35
|
-
return mergedHandlers;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=events.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mergeEvent","handler","otherHandler","event","mergeEventHandlers","handlers","extraHandlers","mergedHandlers","key","Object","entries"],"sources":["@wordpress/components/src/utils/events.ts"],"sourcesContent":["type EventHandler< T extends Event > = ( event: T ) => void;\n\n/**\n * Merges event handlers together.\n *\n * @template TEvent\n * @param handler\n * @param otherHandler\n */\nfunction mergeEvent< TEvent extends Event >(\n\thandler: EventHandler< TEvent >,\n\totherHandler: EventHandler< TEvent >\n): EventHandler< TEvent > {\n\treturn ( event: TEvent ) => {\n\t\tif ( typeof handler === 'function' ) {\n\t\t\thandler( event );\n\t\t}\n\t\tif ( typeof otherHandler === 'function' ) {\n\t\t\totherHandler( event );\n\t\t}\n\t};\n}\n\n/**\n * Merges two sets of event handlers together.\n *\n * @template TEvent\n * @param handlers\n * @param extraHandlers\n */\nexport function mergeEventHandlers<\n\tTEvent extends Event,\n\tTLeft extends Record< string, EventHandler< TEvent > >,\n\tTRight extends Record< string, EventHandler< TEvent > >\n>( handlers: TLeft, extraHandlers: TRight ): TLeft & TRight {\n\t// @ts-ignore We'll fill in all the properties below\n\tconst mergedHandlers: TLeft & TRight = {\n\t\t...handlers,\n\t};\n\n\tfor ( const [ key, handler ] of Object.entries( extraHandlers ) ) {\n\t\t// @ts-ignore\n\t\tmergedHandlers[ key as keyof typeof mergedHandlers ] =\n\t\t\tkey in mergedHandlers\n\t\t\t\t? mergeEvent( mergedHandlers[ key ], handler )\n\t\t\t\t: handler;\n\t}\n\n\treturn mergedHandlers;\n}\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAUA,CAClBC,OAA+B,EAC/BC,YAAoC,EACX;EACzB,OAASC,KAAa,IAAM;IAC3B,IAAK,OAAOF,OAAO,KAAK,UAAU,EAAG;MACpCA,OAAO,CAAEE,KAAM,CAAC;IACjB;IACA,IAAK,OAAOD,YAAY,KAAK,UAAU,EAAG;MACzCA,YAAY,CAAEC,KAAM,CAAC;IACtB;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAI/BC,QAAe,EAAEC,aAAqB,EAAmB;EAC3D;EACA,MAAMC,cAA8B,GAAG;IACtC,GAAGF;EACJ,CAAC;EAED,KAAM,MAAM,CAAEG,GAAG,EAAEP,OAAO,CAAE,IAAIQ,MAAM,CAACC,OAAO,CAAEJ,aAAc,CAAC,EAAG;IACjE;IACAC,cAAc,CAAEC,GAAG,CAAiC,GACnDA,GAAG,IAAID,cAAc,GAClBP,UAAU,CAAEO,cAAc,CAAEC,GAAG,CAAE,EAAEP,OAAQ,CAAC,GAC5CA,OAAO;EACZ;EAEA,OAAOM,cAAc;AACtB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* External dependencies
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import AlignmentMatrixControl from '..';
|
|
10
|
-
declare const meta: ComponentMeta<typeof AlignmentMatrixControl>;
|
|
11
|
-
export default meta;
|
|
12
|
-
export declare const Default: ComponentStory<typeof AlignmentMatrixControl>;
|
|
13
|
-
export declare const IconSubcomponent: () => JSX.Element;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alignment-matrix-control/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQtE;;GAEG;AACH,OAAO,sBAAsB,MAAM,IAAI,CAAC;AAIxC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,sBAAsB,CAcvD,CAAC;AACF,eAAe,IAAI,CAAC;AA0BpB,eAAO,MAAM,OAAO,+CAAsB,CAAC;AAE3C,eAAO,MAAM,gBAAgB,mBAkB5B,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* External dependencies
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { AnglePickerControl } from '..';
|
|
10
|
-
declare const meta: ComponentMeta<typeof AnglePickerControl>;
|
|
11
|
-
export default meta;
|
|
12
|
-
export declare const Default: ComponentStory<import("react").ForwardRefExoticComponent<import("../types").AnglePickerControlProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "children" | "as" | keyof import("../types").AnglePickerControlProps> & {
|
|
13
|
-
as?: keyof JSX.IntrinsicElements | undefined;
|
|
14
|
-
} & import("react").RefAttributes<any>>>;
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/angle-picker-control/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,kBAAkB,CAcnD,CAAC;AAEF,eAAe,IAAI,CAAC;AAsBpB,eAAO,MAAM,OAAO;;wCAAkC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
8
|
-
import { Animate } from '..';
|
|
9
|
-
declare const meta: ComponentMeta<typeof Animate>;
|
|
10
|
-
export default meta;
|
|
11
|
-
export declare const Default: ComponentStory<typeof Animate>;
|
|
12
|
-
export declare const AppearTopLeft: ComponentStory<typeof Animate>;
|
|
13
|
-
export declare const AppearTopRight: ComponentStory<typeof Animate>;
|
|
14
|
-
export declare const AppearBottomLeft: ComponentStory<typeof Animate>;
|
|
15
|
-
export declare const AppearBottomRight: ComponentStory<typeof Animate>;
|
|
16
|
-
export declare const Loading: ComponentStory<typeof Animate>;
|
|
17
|
-
export declare const SlideIn: ComponentStory<typeof Animate>;
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/animate/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,OAAO,CAOxC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,OAAO,CAAwB,CAAC;AAS7E,eAAO,MAAM,aAAa,EAAE,cAAc,CAAE,OAAO,OAAO,CAEzD,CAAC;AAUF,eAAO,MAAM,cAAc,EAAE,cAAc,CAAE,OAAO,OAAO,CAE1D,CAAC;AAUF,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAE,OAAO,OAAO,CAE5D,CAAC;AAUF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAE,OAAO,OAAO,CAC1C,CAAC;AAWrB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,OAAO,CAAwB,CAAC;AAU7E,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,OAAO,CAAwB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* External dependencies
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import BaseControl from '..';
|
|
10
|
-
declare const meta: ComponentMeta<typeof BaseControl>;
|
|
11
|
-
export default meta;
|
|
12
|
-
export declare const Default: ComponentStory<typeof BaseControl>;
|
|
13
|
-
export declare const WithHelpText: ComponentStory<{
|
|
14
|
-
({ __nextHasNoMarginBottom, id, label, hideLabelFromVision, help, className, children, }: import("../types").BaseControlProps): JSX.Element;
|
|
15
|
-
VisualLabel: ({ className, children, ...props }: import("../../ui/context").WordPressComponentProps<import("../types").BaseControlVisualLabelProps, "span">) => JSX.Element;
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.
|
|
19
|
-
*
|
|
20
|
-
* It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,
|
|
21
|
-
* e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would
|
|
22
|
-
* otherwise use if the `label` prop was passed.
|
|
23
|
-
*/
|
|
24
|
-
export declare const WithVisualLabel: ComponentStory<typeof BaseControl>;
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base-control/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,WAAoC,MAAM,IAAI,CAAC;AAGtD,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CAY5C,CAAC;AACF,eAAe,IAAI,CAAC;AAcpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CACrB,CAAC;AAMpC,eAAO,MAAM,YAAY;;;EAAqC,CAAC;AAM/D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAE,OAAO,WAAW,CAc/D,CAAC"}
|