@wordpress/components 33.0.1-next.v.202604201441.0 → 33.1.1-next.v.202605131006.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 +35 -1
- package/build/alignment-matrix-control/cell.cjs +79 -5
- package/build/alignment-matrix-control/cell.cjs.map +3 -3
- package/build/alignment-matrix-control/index.cjs +79 -5
- package/build/alignment-matrix-control/index.cjs.map +3 -3
- package/build/angle-picker-control/angle-circle.cjs +79 -5
- package/build/angle-picker-control/angle-circle.cjs.map +3 -3
- package/build/autocomplete/autocompleter-ui.cjs.map +2 -2
- package/build/color-palette/index.cjs +14 -8
- package/build/color-palette/index.cjs.map +2 -2
- package/build/color-palette/utils.cjs +9 -2
- package/build/color-palette/utils.cjs.map +2 -2
- package/build/color-picker/hex-input.cjs +1 -1
- package/build/color-picker/hex-input.cjs.map +2 -2
- package/build/custom-gradient-picker/index.cjs.map +2 -2
- package/build/focal-point-picker/index.cjs.map +2 -2
- package/build/form-token-field/index.cjs +22 -6
- package/build/form-token-field/index.cjs.map +3 -3
- package/build/form-token-field/token-input.cjs +1 -1
- package/build/form-token-field/token-input.cjs.map +2 -2
- package/build/menu/popover.cjs +7 -3
- package/build/menu/popover.cjs.map +2 -2
- package/build/menu/styles.cjs +39 -16
- package/build/menu/styles.cjs.map +2 -2
- package/build/modal/index.cjs +1 -5
- package/build/modal/index.cjs.map +2 -2
- package/build/modal/use-modal-exit-animation.cjs +52 -41
- package/build/modal/use-modal-exit-animation.cjs.map +2 -2
- package/build/palette-edit/index.cjs.map +2 -2
- package/build/slot-fill/fill.cjs +2 -2
- package/build/slot-fill/fill.cjs.map +2 -2
- package/build/style-provider/index.cjs +82 -3
- package/build/style-provider/index.cjs.map +4 -4
- package/build/text/styles.cjs +7 -7
- package/build/text/styles.cjs.map +2 -2
- package/build/utils/breakpoint.cjs.map +1 -1
- package/build/utils/config-values.cjs +3 -0
- package/build/utils/config-values.cjs.map +2 -2
- package/build/utils/dropdown-motion.cjs +2 -2
- package/build/utils/dropdown-motion.cjs.map +2 -2
- package/build/utils/font.cjs.map +1 -1
- package/build/visually-hidden/component.cjs +1 -0
- package/build/visually-hidden/component.cjs.map +2 -2
- package/build-module/alignment-matrix-control/cell.mjs +79 -5
- package/build-module/alignment-matrix-control/cell.mjs.map +3 -3
- package/build-module/alignment-matrix-control/index.mjs +79 -5
- package/build-module/alignment-matrix-control/index.mjs.map +3 -3
- package/build-module/angle-picker-control/angle-circle.mjs +79 -5
- package/build-module/angle-picker-control/angle-circle.mjs.map +3 -3
- package/build-module/autocomplete/autocompleter-ui.mjs.map +2 -2
- package/build-module/color-palette/index.mjs +14 -8
- package/build-module/color-palette/index.mjs.map +2 -2
- package/build-module/color-palette/utils.mjs +9 -2
- package/build-module/color-palette/utils.mjs.map +2 -2
- package/build-module/color-picker/hex-input.mjs +1 -1
- package/build-module/color-picker/hex-input.mjs.map +2 -2
- package/build-module/custom-gradient-picker/index.mjs.map +2 -2
- package/build-module/focal-point-picker/index.mjs.map +2 -2
- package/build-module/form-token-field/index.mjs +22 -6
- package/build-module/form-token-field/index.mjs.map +2 -2
- package/build-module/form-token-field/token-input.mjs +1 -1
- package/build-module/form-token-field/token-input.mjs.map +2 -2
- package/build-module/menu/popover.mjs +7 -3
- package/build-module/menu/popover.mjs.map +2 -2
- package/build-module/menu/styles.mjs +37 -16
- package/build-module/menu/styles.mjs.map +2 -2
- package/build-module/modal/index.mjs +1 -5
- package/build-module/modal/index.mjs.map +2 -2
- package/build-module/modal/use-modal-exit-animation.mjs +52 -41
- package/build-module/modal/use-modal-exit-animation.mjs.map +2 -2
- package/build-module/palette-edit/index.mjs.map +2 -2
- package/build-module/slot-fill/fill.mjs +2 -2
- package/build-module/slot-fill/fill.mjs.map +2 -2
- package/build-module/style-provider/index.mjs +82 -3
- package/build-module/style-provider/index.mjs.map +4 -4
- package/build-module/text/styles.mjs +7 -7
- package/build-module/text/styles.mjs.map +2 -2
- package/build-module/utils/breakpoint.mjs.map +1 -1
- package/build-module/utils/config-values.mjs +3 -0
- package/build-module/utils/config-values.mjs.map +2 -2
- package/build-module/utils/dropdown-motion.mjs +2 -2
- package/build-module/utils/dropdown-motion.mjs.map +2 -2
- package/build-module/utils/font.mjs.map +1 -1
- package/build-module/visually-hidden/component.mjs +1 -0
- package/build-module/visually-hidden/component.mjs.map +2 -2
- package/build-style/style-rtl.css +90 -34
- package/build-style/style.css +90 -34
- package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
- package/build-types/angle-picker-control/index.d.ts +1 -1
- package/build-types/angle-picker-control/index.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
- package/build-types/animate/index.d.ts.map +1 -1
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/autocomplete/get-default-use-items.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts +3 -3
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/badge/index.d.ts.map +1 -1
- package/build-types/badge/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +4 -4
- package/build-types/base-control/index.d.ts +2 -2
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts +4 -4
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +124 -124
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +117 -117
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +4 -4
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +116 -116
- package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +106 -106
- package/build-types/border-box-control/stories/index.story.d.ts +5 -5
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/styles.d.ts +3 -3
- package/build-types/border-box-control/styles.d.ts.map +1 -1
- package/build-types/border-box-control/utils.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +5 -5
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +129 -129
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts +3 -3
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +122 -122
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-style-picker/component.d.ts +1 -1
- package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +30 -30
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts +2 -2
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts +1 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +15 -15
- package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
- package/build-types/box-control/utils.d.ts +2 -2
- package/build-types/box-control/utils.d.ts.map +1 -1
- package/build-types/button/deprecated.d.ts +34 -34
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/calendar/date-calendar/index.d.ts.map +1 -1
- package/build-types/calendar/date-range-calendar/index.d.ts +1 -1
- package/build-types/calendar/date-range-calendar/index.d.ts.map +1 -1
- package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
- package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
- package/build-types/calendar/test/__utils__/index.d.ts.map +1 -1
- package/build-types/calendar/utils/constants.d.ts +2 -2
- package/build-types/calendar/utils/constants.d.ts.map +1 -1
- package/build-types/calendar/utils/use-localization-props.d.ts +3 -3
- package/build-types/calendar/utils/use-localization-props.d.ts.map +1 -1
- package/build-types/card/card/component.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +110 -110
- package/build-types/card/card-body/component.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +107 -107
- package/build-types/card/card-divider/component.d.ts +2 -2
- package/build-types/card/card-divider/component.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +108 -108
- package/build-types/card/card-footer/component.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +113 -113
- package/build-types/card/card-header/component.d.ts.map +1 -1
- package/build-types/card/card-header/hook.d.ts +113 -113
- package/build-types/card/card-media/component.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +106 -106
- package/build-types/card/get-padding-by-size.d.ts +1 -1
- package/build-types/card/get-padding-by-size.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +0 -6
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/index.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +1 -1
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts +8 -0
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/circular-option-picker/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-indicator/index.d.ts +1 -1
- package/build-types/color-indicator/index.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +1 -0
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/styles.d.ts +5 -5
- package/build-types/color-palette/types.d.ts +16 -2
- package/build-types/color-palette/types.d.ts.map +1 -1
- package/build-types/color-palette/utils.d.ts +1 -1
- package/build-types/color-palette/utils.d.ts.map +1 -1
- package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
- package/build-types/color-picker/color-input.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts +1 -1
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/hsl-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/rgb-input.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +20 -20
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +8 -8
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/styles.d.ts +1 -1
- package/build-types/composite/index.d.ts +25 -25
- package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/context/constants.d.ts +3 -3
- package/build-types/context/constants.d.ts.map +1 -1
- package/build-types/context/context-system-provider.d.ts +4 -4
- package/build-types/context/context-system-provider.d.ts.map +1 -1
- package/build-types/context/use-context-system.d.ts +4 -4
- package/build-types/context/use-context-system.d.ts.map +1 -1
- package/build-types/context/utils.d.ts +2 -2
- package/build-types/context/utils.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/constants.d.ts +2 -2
- package/build-types/custom-gradient-picker/constants.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts +1 -1
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/serializer.d.ts +3 -3
- package/build-types/custom-gradient-picker/serializer.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts +6 -6
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/styles.d.ts +6 -6
- package/build-types/dashicon/index.d.ts.map +1 -1
- package/build-types/date-time/date-picker/index.d.ts +1 -1
- package/build-types/date-time/date-picker/index.d.ts.map +1 -1
- package/build-types/date-time/date-picker/styles.d.ts +9 -9
- package/build-types/date-time/date-picker/use-lilius/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts +1 -1
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +4 -4
- package/build-types/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/date-time/time-picker/index.d.ts +1 -1
- package/build-types/date-time/time-picker/index.d.ts.map +1 -1
- package/build-types/date-time/time-picker/styles.d.ts +28 -28
- package/build-types/date-time/time-picker/time-input/index.d.ts +1 -1
- package/build-types/date-time/time-picker/time-input/index.d.ts.map +1 -1
- package/build-types/date-time/time-picker/timezone.d.ts.map +1 -1
- package/build-types/date-time/utils.d.ts.map +1 -1
- package/build-types/disabled/context.d.ts.map +1 -1
- package/build-types/disabled/index.d.ts +2 -0
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/disclosure/index.d.ts.map +1 -1
- package/build-types/divider/component.d.ts +2 -2
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/stories/index.story.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +2 -2
- package/build-types/draggable/index.d.ts +1 -1
- package/build-types/draggable/index.d.ts.map +1 -1
- package/build-types/draggable/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/index.d.ts.map +1 -1
- package/build-types/drop-zone/provider.d.ts +1 -1
- package/build-types/drop-zone/provider.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
- package/build-types/duotone-picker/custom-duotone-bar.d.ts +1 -1
- package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
- 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.map +1 -1
- package/build-types/elevation/component.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +105 -105
- package/build-types/elevation/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/flex/context.d.ts +2 -2
- package/build-types/flex/flex/component.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +108 -108
- package/build-types/flex/flex-block/component.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +106 -106
- package/build-types/flex/flex-item/component.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +106 -106
- package/build-types/flex/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/controls.d.ts +1 -1
- package/build-types/focal-point-picker/controls.d.ts.map +1 -1
- package/build-types/focal-point-picker/index.d.ts +16 -11
- package/build-types/focal-point-picker/index.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +16 -16
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +254 -254
- package/build-types/focal-point-picker/utils.d.ts.map +1 -1
- package/build-types/font-size-picker/constants.d.ts +2 -2
- package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +5 -5
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/index.d.ts +1 -1
- package/build-types/form-toggle/index.d.ts.map +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts +1 -1
- package/build-types/form-token-field/suggestions-list.d.ts +1 -1
- package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
- package/build-types/form-token-field/token-input.d.ts +1 -1
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/form-token-field/token.d.ts +1 -1
- package/build-types/form-token-field/token.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +16 -2
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/grid/component.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +106 -106
- package/build-types/grid/stories/index.story.d.ts.map +1 -1
- package/build-types/grid/utils.d.ts.map +1 -1
- package/build-types/guide/index.d.ts +1 -1
- package/build-types/guide/index.d.ts.map +1 -1
- package/build-types/guide/page-control.d.ts +1 -1
- package/build-types/guide/page-control.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/h-stack/component.d.ts +3 -3
- package/build-types/h-stack/component.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +107 -107
- package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/heading/component.d.ts +4 -4
- package/build-types/heading/component.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +107 -107
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
- package/build-types/higher-order/with-fallback-styles/index.d.ts +1 -1
- package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
- package/build-types/higher-order/with-filters/index.d.ts +2 -2
- package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
- package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
- package/build-types/higher-order/with-notices/index.d.ts +3 -3
- package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
- package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/backdrop.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
- package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts +9 -9
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +3 -3
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/isolated-event-container/index.d.ts.map +1 -1
- package/build-types/item-group/item/component.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +104 -104
- package/build-types/item-group/item-group/component.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +105 -105
- package/build-types/item-group/stories/index.story.d.ts.map +1 -1
- package/build-types/item-group/styles.d.ts +1 -1
- package/build-types/item-group/styles.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/index.d.ts +1 -1
- package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/lock-unlock.d.ts +1 -2
- package/build-types/lock-unlock.d.ts.map +1 -1
- package/build-types/menu/group-label.d.ts +1 -1
- package/build-types/menu/group.d.ts +1 -1
- package/build-types/menu/index.d.ts +5 -5
- package/build-types/menu/index.d.ts.map +1 -1
- package/build-types/menu/item-help-text.d.ts +1 -1
- package/build-types/menu/item-label.d.ts +1 -1
- package/build-types/menu/popover.d.ts.map +1 -1
- package/build-types/menu/separator.d.ts +1 -1
- package/build-types/menu/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts +23 -8
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-group/index.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts +2 -2
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +8 -8
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/index.d.ts +1 -1
- package/build-types/menu-items-choice/index.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/mobile/image/constants.d.ts +4 -4
- package/build-types/mobile/image/constants.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/use-modal-exit-animation.d.ts +0 -3
- package/build-types/modal/use-modal-exit-animation.d.ts.map +1 -1
- package/build-types/navigable-container/container.d.ts +2 -2
- package/build-types/navigable-container/container.d.ts.map +1 -1
- package/build-types/navigable-container/menu.d.ts +1 -1
- package/build-types/navigable-container/menu.d.ts.map +1 -1
- 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.map +1 -1
- package/build-types/navigable-container/tabbable.d.ts +2 -2
- package/build-types/navigable-container/tabbable.d.ts.map +1 -1
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/group/index.d.ts +1 -1
- package/build-types/navigation/group/index.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts +1 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/item/index.d.ts.map +1 -1
- package/build-types/navigation/item/use-navigation-tree-item.d.ts.map +1 -1
- package/build-types/navigation/menu/index.d.ts.map +1 -1
- package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -1
- package/build-types/navigation/menu/menu-title.d.ts +1 -1
- package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts +1 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +6 -6
- package/build-types/navigation/utils.d.ts.map +1 -1
- package/build-types/navigator/index.d.ts +12 -12
- package/build-types/navigator/legacy.d.ts +18 -18
- package/build-types/navigator/navigator-back-button/component.d.ts +6 -6
- package/build-types/navigator/navigator-back-button/hook.d.ts +136 -136
- package/build-types/navigator/navigator-button/component.d.ts +6 -6
- package/build-types/navigator/navigator-button/hook.d.ts +136 -136
- package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts +1 -1
- package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts.map +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +6 -6
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/navigator/styles.d.ts.map +1 -1
- package/build-types/notice/index.d.ts +1 -1
- package/build-types/notice/index.d.ts.map +1 -1
- package/build-types/notice/list.d.ts +1 -1
- package/build-types/notice/list.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +7 -7
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +7 -7
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +759 -759
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/panel/header.d.ts.map +1 -1
- package/build-types/panel/index.d.ts.map +1 -1
- package/build-types/panel/row.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/placeholder/index.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/overlay-middlewares.d.ts +2 -2
- package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
- package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/test/utils/index.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +3 -3
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts +1 -1
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/author-select.d.ts +1 -1
- package/build-types/query-controls/author-select.d.ts.map +1 -1
- package/build-types/query-controls/index.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts +1 -1
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +8 -8
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts +1 -1
- package/build-types/range-control/input-range.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +9 -9
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/utils.d.ts +1 -1
- package/build-types/range-control/utils.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts +3 -3
- package/build-types/resizable-box/resize-tooltip/utils.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/index.d.ts +1 -1
- package/build-types/responsive-wrapper/index.d.ts.map +1 -1
- 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.map +1 -1
- package/build-types/scroll-lock/index.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/component.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +106 -106
- package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/index.d.ts +9 -9
- package/build-types/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +9 -9
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/chevron-down.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +2 -2
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
- package/build-types/slot-fill/context.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +2 -2
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +3 -3
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
- package/build-types/spacer/component.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +106 -106
- package/build-types/spacer/stories/index.story.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/style-provider/index.d.ts +0 -3
- package/build-types/style-provider/index.d.ts.map +1 -1
- package/build-types/style-provider/test/index.d.ts.map +1 -0
- package/build-types/surface/component.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +106 -106
- package/build-types/surface/stories/index.story.d.ts.map +1 -1
- package/build-types/surface/styles.d.ts +1 -1
- package/build-types/surface/styles.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +1 -1
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts +3 -3
- package/build-types/tabs/tablist.d.ts +1 -1
- package/build-types/text/component.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +106 -106
- package/build-types/text/stories/index.story.d.ts +3 -3
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/text/utils.d.ts +1 -1
- package/build-types/text/utils.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +3 -3
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/index.d.ts +4 -19
- package/build-types/text-highlight/index.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/index.d.ts +3 -3
- package/build-types/textarea-control/index.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/color-algorithms.d.ts +1 -1
- package/build-types/theme/color-algorithms.d.ts.map +1 -1
- package/build-types/theme/index.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +1 -1
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/styles.d.ts.map +1 -1
- package/build-types/tip/index.d.ts.map +1 -1
- package/build-types/tip/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-control/index.d.ts +2 -2
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +4 -4
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/context.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +3 -3
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
- package/build-types/toolbar/index.d.ts +6 -6
- package/build-types/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +128 -128
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +116 -116
- package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +108 -108
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/cell.d.ts.map +1 -1
- package/build-types/tree-grid/index.d.ts.map +1 -1
- package/build-types/tree-grid/item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index.d.ts +1 -1
- package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
- package/build-types/tree-grid/row.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/component.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +106 -106
- package/build-types/truncate/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/utils.d.ts +5 -5
- package/build-types/truncate/utils.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +2 -2
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +7 -7
- package/build-types/unit-control/unit-select-control.d.ts +1 -1
- package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
- package/build-types/unit-control/utils.d.ts.map +1 -1
- package/build-types/utils/breakpoint-values.d.ts.map +1 -1
- package/build-types/utils/breakpoint.d.ts +9 -1
- package/build-types/utils/breakpoint.d.ts.map +1 -1
- package/build-types/utils/colors-values.d.ts +1 -1
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/build-types/utils/colors.d.ts +3 -3
- package/build-types/utils/colors.d.ts.map +1 -1
- package/build-types/utils/deprecated-36px-size.d.ts +1 -1
- package/build-types/utils/deprecated-36px-size.d.ts.map +1 -1
- package/build-types/utils/dropdown-motion.d.ts +3 -3
- package/build-types/utils/dropdown-motion.d.ts.map +1 -1
- package/build-types/utils/font-values.d.ts.map +1 -1
- package/build-types/utils/font.d.ts +6 -2
- package/build-types/utils/font.d.ts.map +1 -1
- package/build-types/utils/get-node-text.d.ts.map +1 -1
- package/build-types/utils/hooks/index.d.ts +4 -4
- package/build-types/utils/hooks/index.d.ts.map +1 -1
- package/build-types/utils/hooks/use-animated-offset-rect.d.ts +1 -1
- package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts +2 -8
- package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts +1 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
- package/build-types/utils/hooks/use-update-effect.d.ts +1 -1
- package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
- package/build-types/utils/index.d.ts +2 -2
- package/build-types/utils/index.d.ts.map +1 -1
- package/build-types/utils/math.d.ts +5 -5
- package/build-types/utils/math.d.ts.map +1 -1
- package/build-types/utils/rtl.d.ts +11 -16
- package/build-types/utils/rtl.d.ts.map +1 -1
- package/build-types/utils/strings.d.ts.map +1 -1
- package/build-types/utils/style-mixins.d.ts +9 -9
- package/build-types/utils/style-mixins.d.ts.map +1 -1
- package/build-types/utils/use-responsive-value.d.ts.map +1 -1
- package/build-types/utils/values.d.ts +19 -5
- package/build-types/utils/values.d.ts.map +1 -1
- package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
- package/build-types/v-stack/component.d.ts +3 -3
- package/build-types/v-stack/component.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +107 -107
- package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +4 -4
- package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts +2 -2
- package/build-types/validated-form-controls/components/combobox-control.d.ts +2 -2
- package/build-types/validated-form-controls/components/number-control.d.ts +7 -7
- package/build-types/validated-form-controls/components/radio-control.d.ts +2 -2
- package/build-types/validated-form-controls/components/radio-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/range-control.d.ts +8 -8
- package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/select-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/text-control.d.ts +3 -3
- package/build-types/validated-form-controls/components/textarea-control.d.ts +3 -3
- package/build-types/validated-form-controls/components/toggle-control.d.ts +2 -2
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts +3 -3
- package/build-types/validated-form-controls/control-with-error.d.ts +1 -1
- package/build-types/validated-form-controls/validity-indicator.d.ts +1 -1
- package/build-types/validated-form-controls/validity-indicator.d.ts.map +1 -1
- package/build-types/view/component.d.ts +251 -251
- package/build-types/view/component.d.ts.map +1 -1
- package/build-types/view/stories/index.story.d.ts.map +1 -1
- package/build-types/visually-hidden/component.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +0 -6
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
- package/package.json +24 -23
- package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
- package/src/angle-picker-control/stories/index.story.tsx +1 -1
- package/src/autocomplete/autocompleter-ui.tsx +0 -1
- package/src/base-control/stories/index.story.tsx +1 -1
- package/src/border-box-control/stories/index.story.tsx +1 -1
- package/src/border-control/stories/index.story.tsx +1 -1
- package/src/button/stories/index.story.tsx +1 -1
- package/src/button/style.scss +2 -0
- package/src/button-group/style.scss +1 -2
- package/src/card/stories/index.story.tsx +2 -9
- package/src/checkbox-control/stories/index.story.tsx +1 -1
- package/src/circular-option-picker/style.scss +8 -6
- package/src/color-indicator/stories/index.story.tsx +1 -1
- package/src/color-palette/index.tsx +25 -9
- package/src/color-palette/stories/index.story.tsx +21 -3
- package/src/color-palette/test/index.tsx +152 -1
- package/src/color-palette/test/utils.ts +18 -0
- package/src/color-palette/types.ts +19 -2
- package/src/color-palette/utils.ts +14 -2
- package/src/color-picker/hex-input.tsx +1 -1
- package/src/color-picker/stories/index.story.tsx +1 -1
- package/src/color-picker/test/index.tsx +24 -2
- package/src/combobox-control/stories/index.story.tsx +1 -1
- package/src/composite/legacy/test/index.tsx +13 -13
- package/src/composite/stories/index.story.tsx +1 -1
- package/src/confirm-dialog/stories/index.story.tsx +1 -1
- package/src/custom-gradient-picker/index.tsx +0 -1
- package/src/custom-select-control/stories/index.story.tsx +1 -1
- package/src/disabled/stories/index.story.tsx +1 -1
- package/src/drop-zone/stories/index.story.tsx +1 -1
- package/src/dropdown/stories/index.story.tsx +1 -1
- package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
- package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
- package/src/external-link/stories/index.story.tsx +2 -2
- package/src/external-link/style.scss +34 -2
- package/src/focal-point-picker/README.md +12 -8
- package/src/focal-point-picker/index.tsx +16 -11
- package/src/focal-point-picker/stories/index.story.tsx +1 -1
- package/src/font-size-picker/stories/index.story.tsx +1 -1
- package/src/form-file-upload/stories/index.story.tsx +1 -1
- package/src/form-toggle/stories/index.story.tsx +1 -1
- package/src/form-toggle/style.scss +3 -2
- package/src/form-token-field/README.md +2 -1
- package/src/form-token-field/index.tsx +39 -9
- package/src/form-token-field/stories/index.story.tsx +2 -1
- package/src/form-token-field/test/index.tsx +70 -10
- package/src/form-token-field/token-input.tsx +1 -6
- package/src/form-token-field/types.ts +16 -2
- package/src/gradient-picker/stories/index.story.tsx +1 -1
- package/src/guide/stories/index.story.tsx +1 -1
- package/src/higher-order/with-notices/test/index.tsx +12 -10
- package/src/icon/stories/index.story.tsx +1 -1
- package/src/input-control/stories/index.story.tsx +1 -1
- package/src/item-group/stories/index.story.tsx +1 -1
- package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
- package/src/menu/popover.tsx +15 -8
- package/src/menu/stories/index.story.tsx +1 -1
- package/src/menu/styles.ts +25 -15
- package/src/menu/test/index.tsx +28 -37
- package/src/menu-group/stories/index.story.tsx +1 -1
- package/src/menu-item/stories/index.story.tsx +1 -1
- package/src/menu-items-choice/stories/index.story.tsx +1 -1
- package/src/modal/index.tsx +2 -7
- package/src/modal/stories/index.story.tsx +1 -1
- package/src/modal/style.scss +68 -24
- package/src/modal/use-modal-exit-animation.ts +10 -7
- package/src/navigator/stories/index.story.tsx +1 -1
- package/src/notice/stories/index.story.tsx +1 -1
- package/src/notice/test/__snapshots__/index.tsx.snap +1 -0
- package/src/number-control/stories/index.story.tsx +1 -1
- package/src/palette-edit/index.tsx +0 -1
- package/src/palette-edit/stories/index.story.tsx +1 -1
- package/src/panel/stories/index.story.tsx +1 -1
- package/src/placeholder/stories/index.story.tsx +1 -1
- package/src/popover/stories/index.story.tsx +1 -1
- package/src/popover/style.scss +0 -4
- package/src/progress-bar/stories/index.story.tsx +1 -1
- package/src/query-controls/stories/index.story.tsx +1 -1
- package/src/radio-control/stories/index.story.tsx +1 -1
- package/src/range-control/stories/index.story.tsx +1 -1
- package/src/resizable-box/stories/index.story.tsx +1 -1
- package/src/resizable-box/style.scss +4 -5
- package/src/sandbox/stories/index.story.tsx +1 -1
- package/src/scroll-lock/stories/index.story.tsx +1 -1
- package/src/search-control/stories/index.story.tsx +1 -1
- package/src/select-control/stories/index.story.tsx +1 -1
- package/src/shortcut/stories/index.story.tsx +1 -1
- package/src/slot-fill/fill.tsx +2 -2
- package/src/slot-fill/stories/index.story.tsx +1 -1
- package/src/snackbar/stories/index.story.tsx +1 -1
- package/src/spinner/stories/index.story.tsx +1 -1
- package/src/style-provider/index.tsx +10 -7
- package/src/style-provider/test/index.tsx +38 -0
- package/src/tab-panel/style.scss +2 -2
- package/src/tabs/stories/index.story.tsx +1 -1
- package/src/text/styles.ts +1 -1
- package/src/text/test/index.tsx +1 -1
- package/src/text-control/stories/index.story.tsx +1 -1
- package/src/text-highlight/stories/index.story.tsx +1 -1
- package/src/textarea-control/stories/index.story.tsx +1 -1
- package/src/toggle-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toolbar/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar-group/index.tsx +2 -2
- package/src/tools-panel/stories/index.story.tsx +1 -1
- package/src/tooltip/stories/index.story.tsx +1 -1
- package/src/tooltip/test/index.tsx +3 -2
- package/src/tree-grid/stories/index.story.tsx +1 -1
- package/src/tree-select/stories/index.story.tsx +1 -1
- package/src/truncate/stories/index.story.tsx +1 -1
- package/src/unit-control/stories/index.story.tsx +1 -1
- package/src/utils/breakpoint.js +1 -1
- package/src/utils/config-values.js +3 -0
- package/src/utils/dropdown-motion.ts +6 -2
- package/src/utils/font.js +1 -1
- package/src/visually-hidden/component.tsx +1 -0
- package/src/visually-hidden/stories/index.story.tsx +2 -9
- package/build-types/visually-hidden/test/index.d.ts.map +0 -1
- package/src/visually-hidden/test/__snapshots__/index.tsx.snap +0 -12
- package/src/visually-hidden/test/index.tsx +0 -17
- /package/build-types/{visually-hidden → style-provider}/test/index.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
## 33.
|
|
5
|
+
## 33.1.0-next.0 (2026-05-13)
|
|
6
6
|
|
|
7
7
|
### Enhancements
|
|
8
8
|
|
|
9
|
+
- `StyleProvider`: Add support for injecting package CSS module styles into target documents ([#77965](https://github.com/WordPress/gutenberg/pull/77965)).
|
|
10
|
+
- `Button`: Align `link` variant underline (offset and thickness) with `ExternalLink` and `Link` from `@wordpress/ui` ([#77842](https://github.com/WordPress/gutenberg/pull/77842)).
|
|
11
|
+
- `Modal`: render as a bottom sheet on mobile so the height adapts to the content and CTAs stay within thumb reach ([#77956](https://github.com/WordPress/gutenberg/pull/77956)).
|
|
12
|
+
- `Text`: Use a theme-aware gray token for the muted variant ([#77999](https://github.com/WordPress/gutenberg/pull/77999)).
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- `TabPanel`: Fix tab indicator animation while switching tabs ([#77812](https://github.com/WordPress/gutenberg/pull/77812)).
|
|
17
|
+
- `ColorPicker`: Fix issue where clearing the hex input entirely doesn't reset the selected color to black ([#77912](https://github.com/WordPress/gutenberg/pull/77912)).
|
|
18
|
+
- `ExternalLink`: Fix focus outline rendered in wp-admin ([#77935](https://github.com/WordPress/gutenberg/pull/77935)).
|
|
19
|
+
- `ColorPalette`: Fix duplicate-key warnings and incorrect selected swatch behavior when multiple palette entries share the same color value ([#78004](https://github.com/WordPress/gutenberg/pull/78004)).
|
|
20
|
+
|
|
21
|
+
### Internal
|
|
22
|
+
|
|
23
|
+
- `Modal`, `Menu`, `DropdownMenu`: Adopt `--wpds-motion-easing-*` and `--wpds-motion-duration-*` design tokens for animation timing ([#76097](https://github.com/WordPress/gutenberg/pull/76097)).
|
|
24
|
+
- Update `date-fns` dependency to `v4.1.0` ([#78057](https://github.com/WordPress/gutenberg/pull/78057)).
|
|
25
|
+
- Update code to comply with `eslint-plugin-react-hooks` v7 ([#69962](https://github.com/WordPress/gutenberg/pull/69962)).
|
|
26
|
+
- `SlotFill`: Add dependencies to `updateFill` effect ([#77907](https://github.com/WordPress/gutenberg/pull/77907)).
|
|
27
|
+
- `Popover`: Remove unnecessary close button z-index style ([#78180](https://github.com/WordPress/gutenberg/pull/78180)).
|
|
28
|
+
|
|
29
|
+
## 33.0.0 (2026-04-29)
|
|
30
|
+
|
|
31
|
+
### Enhancements
|
|
32
|
+
|
|
33
|
+
- `ExternalLink`: Align appearance with `Link` from `@wordpress/ui` (brand color, underline thickness/offset, focus ring, and external-link icon spacing) ([#77790](https://github.com/WordPress/gutenberg/pull/77790)).
|
|
9
34
|
- `Menu`: Remove `cursor: not-allowed` and added pointer styles to menu ([#70412](https://github.com/WordPress/gutenberg/pull/70412))
|
|
35
|
+
- `FormToggle`: Add stacking context isolation ([#77619](https://github.com/WordPress/gutenberg/pull/77619)).
|
|
36
|
+
- `CircularOptionPicker`: Add stacking context isolation ([#77715](https://github.com/WordPress/gutenberg/pull/77715)).
|
|
37
|
+
- `FormTokenField`: Add `help` prop to render additional help text below the field, and deprecate the `__experimentalShowHowTo` prop in favor of it. The `help` prop now defaults to the previous how-to text; pass an empty string to hide it ([#77552](https://github.com/WordPress/gutenberg/pull/77552)).
|
|
38
|
+
|
|
39
|
+
### Deprecations
|
|
40
|
+
|
|
41
|
+
- `FormTokenField`: Deprecate the `__experimentalShowHowTo` prop in favor of `help` prop. The `help` prop now defaults to the previous how-to text; pass an empty string to hide it ([#77552](https://github.com/WordPress/gutenberg/pull/77552)).
|
|
10
42
|
|
|
11
43
|
### Breaking Changes
|
|
12
44
|
|
|
@@ -15,6 +47,8 @@
|
|
|
15
47
|
### Internal
|
|
16
48
|
|
|
17
49
|
- `NavigableContainer`: Refactor from class component to function component with hooks ([#77171](https://github.com/WordPress/gutenberg/pull/77171)).
|
|
50
|
+
- `Menu`: Refactor `Menu.Popover` to use Ariakit’s `render` prop, wrapping content in `MenuMotionRoot` (motion styles) and `MenuSurface` (panel layout and `variant` chrome) ([#77460](https://github.com/WordPress/gutenberg/pull/77460)).
|
|
51
|
+
- Fix types for TypeScript 7.0 ([#77177](https://github.com/WordPress/gutenberg/pull/77177)).
|
|
18
52
|
|
|
19
53
|
## 32.6.0 (2026-04-15)
|
|
20
54
|
|
|
@@ -39,12 +39,86 @@ var import_tooltip = __toESM(require("../tooltip/index.cjs"));
|
|
|
39
39
|
var import_visually_hidden = require("../visually-hidden/index.cjs");
|
|
40
40
|
var import_utils = require("./utils.cjs");
|
|
41
41
|
|
|
42
|
+
// packages/style-runtime/src/index.ts
|
|
43
|
+
var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
44
|
+
function getRuntime() {
|
|
45
|
+
const globalScope = globalThis;
|
|
46
|
+
if (globalScope.__wpStyleRuntime) {
|
|
47
|
+
return globalScope.__wpStyleRuntime;
|
|
48
|
+
}
|
|
49
|
+
globalScope.__wpStyleRuntime = {
|
|
50
|
+
documents: /* @__PURE__ */ new Map(),
|
|
51
|
+
styles: /* @__PURE__ */ new Map(),
|
|
52
|
+
injectedStyles: /* @__PURE__ */ new WeakMap()
|
|
53
|
+
};
|
|
54
|
+
if (typeof document !== "undefined") {
|
|
55
|
+
registerDocument(document);
|
|
56
|
+
}
|
|
57
|
+
return globalScope.__wpStyleRuntime;
|
|
58
|
+
}
|
|
59
|
+
function documentContainsStyleHash(targetDocument, hash) {
|
|
60
|
+
if (!targetDocument.head) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
|
|
64
|
+
if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
function injectStyle(targetDocument, hash, css) {
|
|
71
|
+
if (!targetDocument.head) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const runtime = getRuntime();
|
|
75
|
+
let injectedStyles = runtime.injectedStyles.get(targetDocument);
|
|
76
|
+
if (!injectedStyles) {
|
|
77
|
+
injectedStyles = /* @__PURE__ */ new Set();
|
|
78
|
+
runtime.injectedStyles.set(targetDocument, injectedStyles);
|
|
79
|
+
}
|
|
80
|
+
if (injectedStyles.has(hash)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (documentContainsStyleHash(targetDocument, hash)) {
|
|
84
|
+
injectedStyles.add(hash);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const style = targetDocument.createElement("style");
|
|
88
|
+
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
|
|
89
|
+
style.appendChild(targetDocument.createTextNode(css));
|
|
90
|
+
targetDocument.head.appendChild(style);
|
|
91
|
+
injectedStyles.add(hash);
|
|
92
|
+
}
|
|
93
|
+
function registerDocument(targetDocument) {
|
|
94
|
+
const runtime = getRuntime();
|
|
95
|
+
runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
|
|
96
|
+
for (const [hash, css] of runtime.styles) {
|
|
97
|
+
injectStyle(targetDocument, hash, css);
|
|
98
|
+
}
|
|
99
|
+
return () => {
|
|
100
|
+
const count = runtime.documents.get(targetDocument);
|
|
101
|
+
if (count === void 0) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (count <= 1) {
|
|
105
|
+
runtime.documents.delete(targetDocument);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
runtime.documents.set(targetDocument, count - 1);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function registerStyle(hash, css) {
|
|
112
|
+
const runtime = getRuntime();
|
|
113
|
+
runtime.styles.set(hash, css);
|
|
114
|
+
for (const targetDocument of runtime.documents.keys()) {
|
|
115
|
+
injectStyle(targetDocument, hash, css);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
42
119
|
// packages/components/src/alignment-matrix-control/style.module.scss
|
|
43
|
-
if (typeof
|
|
44
|
-
|
|
45
|
-
style.setAttribute("data-wp-hash", "9251e317a9");
|
|
46
|
-
style.appendChild(document.createTextNode("._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer);direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}"));
|
|
47
|
-
document.head.appendChild(style);
|
|
120
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
|
|
121
|
+
registerStyle("9251e317a9", "._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer);direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}");
|
|
48
122
|
}
|
|
49
123
|
var style_module_default = { "grid-container": "_02e2af5803bf5bda__grid-container", "grid-row": "c421f8ed08c23077__grid-row", "cell": "_3af769f755097fdb__cell", "point": "_37ef12d4fb6d6131__point" };
|
|
50
124
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/alignment-matrix-control/cell.tsx", "../../src/alignment-matrix-control/style.module.scss"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { Composite } from '../composite';\nimport Tooltip from '../tooltip';\nimport { VisuallyHidden } from '../visually-hidden';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENT_LABEL } from './utils';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function Cell({\n id,\n value,\n ...props\n}) {\n return /*#__PURE__*/_jsx(Tooltip, {\n text: ALIGNMENT_LABEL[value],\n children: /*#__PURE__*/_jsxs(Composite.Item, {\n id: id,\n render: /*#__PURE__*/_jsx(\"span\", {\n ...props,\n className: clsx(styles.cell, props.className),\n role: \"gridcell\"\n }),\n children: [/*#__PURE__*/_jsx(VisuallyHidden, {\n children: value\n }), /*#__PURE__*/_jsx(\"span\", {\n className: styles.point,\n role: \"presentation\"\n })]\n })\n });\n}", "if (typeof document !== 'undefined'
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,uBAA0B;AAC1B,qBAAoB;AACpB,6BAA+B;AAK/B,mBAAgC;;;ACfhC,
|
|
3
|
+
"sources": ["../../src/alignment-matrix-control/cell.tsx", "../../../style-runtime/src/index.ts", "../../src/alignment-matrix-control/style.module.scss"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { Composite } from '../composite';\nimport Tooltip from '../tooltip';\nimport { VisuallyHidden } from '../visually-hidden';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENT_LABEL } from './utils';\nimport styles from './style.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function Cell({\n id,\n value,\n ...props\n}) {\n return /*#__PURE__*/_jsx(Tooltip, {\n text: ALIGNMENT_LABEL[value],\n children: /*#__PURE__*/_jsxs(Composite.Item, {\n id: id,\n render: /*#__PURE__*/_jsx(\"span\", {\n ...props,\n className: clsx(styles.cell, props.className),\n role: \"gridcell\"\n }),\n children: [/*#__PURE__*/_jsx(VisuallyHidden, {\n children: value\n }), /*#__PURE__*/_jsx(\"span\", {\n className: styles.point,\n role: \"presentation\"\n })]\n })\n });\n}", "const STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n const globalScope = globalThis;\n if (globalScope.__wpStyleRuntime) {\n return globalScope.__wpStyleRuntime;\n }\n globalScope.__wpStyleRuntime = {\n documents: new Map(),\n styles: new Map(),\n injectedStyles: new WeakMap()\n };\n if (typeof document !== 'undefined') {\n registerDocument(document);\n }\n return globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(targetDocument, hash) {\n if (!targetDocument.head) {\n return false;\n }\n for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {\n if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle(targetDocument, hash, css) {\n if (!targetDocument.head) {\n return;\n }\n const runtime = getRuntime();\n let injectedStyles = runtime.injectedStyles.get(targetDocument);\n if (!injectedStyles) {\n injectedStyles = new Set();\n runtime.injectedStyles.set(targetDocument, injectedStyles);\n }\n if (injectedStyles.has(hash)) {\n return;\n }\n\n // Older generated CSS module output can still inject matching style tags\n // after this document's cache is created, so keep the DOM as the fallback\n // source of truth on cache misses.\n if (documentContainsStyleHash(targetDocument, hash)) {\n injectedStyles.add(hash);\n return;\n }\n const style = targetDocument.createElement('style');\n style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);\n style.appendChild(targetDocument.createTextNode(css));\n targetDocument.head.appendChild(style);\n injectedStyles.add(hash);\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument(targetDocument) {\n const runtime = getRuntime();\n runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);\n for (const [hash, css] of runtime.styles) {\n injectStyle(targetDocument, hash, css);\n }\n return () => {\n const count = runtime.documents.get(targetDocument);\n if (count === undefined) {\n return;\n }\n if (count <= 1) {\n runtime.documents.delete(targetDocument);\n return;\n }\n runtime.documents.set(targetDocument, count - 1);\n };\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle(hash, css) {\n const runtime = getRuntime();\n runtime.styles.set(hash, css);\n for (const targetDocument of runtime.documents.keys()) {\n injectStyle(targetDocument, hash, css);\n }\n}", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"9251e317a9\", \"._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer);direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}\");\n}\nexport default {\"grid-container\":\"_02e2af5803bf5bda__grid-container\",\"grid-row\":\"c421f8ed08c23077__grid-row\",\"cell\":\"_3af769f755097fdb__cell\",\"point\":\"_37ef12d4fb6d6131__point\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,uBAA0B;AAC1B,qBAAoB;AACpB,6BAA+B;AAK/B,mBAAgC;;;ACfhC,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,cAAc;AACpB,MAAI,YAAY,kBAAkB;AAChC,WAAO,YAAY;AAAA,EACrB;AACA,cAAY,mBAAmB;AAAA,IAC7B,WAAW,oBAAI,IAAI;AAAA,IACnB,QAAQ,oBAAI,IAAI;AAAA,IAChB,gBAAgB,oBAAI,QAAQ;AAAA,EAC9B;AACA,MAAI,OAAO,aAAa,aAAa;AACnC,qBAAiB,QAAQ;AAAA,EAC3B;AACA,SAAO,YAAY;AACrB;AAUA,SAAS,0BAA0B,gBAAgB,MAAM;AACvD,MAAI,CAAC,eAAe,MAAM;AACxB,WAAO;AAAA,EACT;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QAAM,UAAU,WAAW;AAC3B,UAAQ,OAAO,IAAI,MAAM,GAAG;AAC5B,aAAW,kBAAkB,QAAQ,UAAU,KAAK,GAAG;AACrD,gBAAY,gBAAgB,MAAM,GAAG;AAAA,EACvC;AACF;;;AChIA,IAAI,OAAO,YAAY,eAAe,QAAQ,IAAI,aAAa,QAAQ;AACtE,gBAAc,cAAc,w2CAAw2C;AACr4C;AACA,IAAO,uBAAQ,EAAC,kBAAiB,qCAAoC,YAAW,8BAA6B,QAAO,2BAA0B,SAAQ,2BAA0B;;;AFahL,yBAA2C;AAC5B,SAAR,KAAsB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,SAAoB,uCAAAA,KAAK,eAAAC,SAAS;AAAA,IAChC,MAAM,6BAAgB,KAAK;AAAA,IAC3B,UAAuB,uCAAAC,MAAM,2BAAU,MAAM;AAAA,MAC3C;AAAA,MACA,QAAqB,uCAAAF,KAAK,QAAQ;AAAA,QAChC,GAAG;AAAA,QACH,eAAW,YAAAG,SAAK,qBAAO,MAAM,MAAM,SAAS;AAAA,QAC5C,MAAM;AAAA,MACR,CAAC;AAAA,MACD,UAAU,CAAc,uCAAAH,KAAK,uCAAgB;AAAA,QAC3C,UAAU;AAAA,MACZ,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,QAC5B,WAAW,qBAAO;AAAA,QAClB,MAAM;AAAA,MACR,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;",
|
|
6
6
|
"names": ["_jsx", "Tooltip", "_jsxs", "clsx"]
|
|
7
7
|
}
|
|
@@ -43,12 +43,86 @@ var import_composite = require("../composite/index.cjs");
|
|
|
43
43
|
var import_icon = __toESM(require("./icon.cjs"));
|
|
44
44
|
var import_utils = require("./utils.cjs");
|
|
45
45
|
|
|
46
|
+
// packages/style-runtime/src/index.ts
|
|
47
|
+
var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
48
|
+
function getRuntime() {
|
|
49
|
+
const globalScope = globalThis;
|
|
50
|
+
if (globalScope.__wpStyleRuntime) {
|
|
51
|
+
return globalScope.__wpStyleRuntime;
|
|
52
|
+
}
|
|
53
|
+
globalScope.__wpStyleRuntime = {
|
|
54
|
+
documents: /* @__PURE__ */ new Map(),
|
|
55
|
+
styles: /* @__PURE__ */ new Map(),
|
|
56
|
+
injectedStyles: /* @__PURE__ */ new WeakMap()
|
|
57
|
+
};
|
|
58
|
+
if (typeof document !== "undefined") {
|
|
59
|
+
registerDocument(document);
|
|
60
|
+
}
|
|
61
|
+
return globalScope.__wpStyleRuntime;
|
|
62
|
+
}
|
|
63
|
+
function documentContainsStyleHash(targetDocument, hash) {
|
|
64
|
+
if (!targetDocument.head) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
|
|
68
|
+
if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
function injectStyle(targetDocument, hash, css) {
|
|
75
|
+
if (!targetDocument.head) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const runtime = getRuntime();
|
|
79
|
+
let injectedStyles = runtime.injectedStyles.get(targetDocument);
|
|
80
|
+
if (!injectedStyles) {
|
|
81
|
+
injectedStyles = /* @__PURE__ */ new Set();
|
|
82
|
+
runtime.injectedStyles.set(targetDocument, injectedStyles);
|
|
83
|
+
}
|
|
84
|
+
if (injectedStyles.has(hash)) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (documentContainsStyleHash(targetDocument, hash)) {
|
|
88
|
+
injectedStyles.add(hash);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const style = targetDocument.createElement("style");
|
|
92
|
+
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
|
|
93
|
+
style.appendChild(targetDocument.createTextNode(css));
|
|
94
|
+
targetDocument.head.appendChild(style);
|
|
95
|
+
injectedStyles.add(hash);
|
|
96
|
+
}
|
|
97
|
+
function registerDocument(targetDocument) {
|
|
98
|
+
const runtime = getRuntime();
|
|
99
|
+
runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
|
|
100
|
+
for (const [hash, css] of runtime.styles) {
|
|
101
|
+
injectStyle(targetDocument, hash, css);
|
|
102
|
+
}
|
|
103
|
+
return () => {
|
|
104
|
+
const count = runtime.documents.get(targetDocument);
|
|
105
|
+
if (count === void 0) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (count <= 1) {
|
|
109
|
+
runtime.documents.delete(targetDocument);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
runtime.documents.set(targetDocument, count - 1);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function registerStyle(hash, css) {
|
|
116
|
+
const runtime = getRuntime();
|
|
117
|
+
runtime.styles.set(hash, css);
|
|
118
|
+
for (const targetDocument of runtime.documents.keys()) {
|
|
119
|
+
injectStyle(targetDocument, hash, css);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
46
123
|
// packages/components/src/alignment-matrix-control/style.module.scss
|
|
47
|
-
if (typeof
|
|
48
|
-
|
|
49
|
-
style.setAttribute("data-wp-hash", "9251e317a9");
|
|
50
|
-
style.appendChild(document.createTextNode("._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer);direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}"));
|
|
51
|
-
document.head.appendChild(style);
|
|
124
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
|
|
125
|
+
registerStyle("9251e317a9", "._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer);direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}");
|
|
52
126
|
}
|
|
53
127
|
var style_module_default = { "grid-container": "_02e2af5803bf5bda__grid-container", "grid-row": "c421f8ed08c23077__grid-row", "cell": "_3af769f755097fdb__cell", "point": "_37ef12d4fb6d6131__point" };
|
|
54
128
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/alignment-matrix-control/index.tsx", "../../src/alignment-matrix-control/style.module.scss"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Cell from './cell';\nimport { Composite } from '../composite';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId, getItemValue } from './utils';\nimport styles from './style.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedAlignmentMatrixControl({\n className,\n id,\n label = __('Alignment Matrix Control'),\n defaultValue = 'center center',\n value,\n onChange,\n width = 92,\n ...props\n}) {\n const baseId = useInstanceId(UnforwardedAlignmentMatrixControl, 'alignment-matrix-control', id);\n const setActiveId = useCallback(nextActiveId => {\n const nextValue = getItemValue(baseId, nextActiveId);\n if (nextValue) {\n onChange?.(nextValue);\n }\n }, [baseId, onChange]);\n const classes = clsx('component-alignment-matrix-control', styles['grid-container'], className);\n return /*#__PURE__*/_jsx(Composite, {\n defaultActiveId: getItemId(baseId, defaultValue),\n activeId: getItemId(baseId, value),\n setActiveId: setActiveId,\n rtl: isRTL(),\n render: /*#__PURE__*/_jsx(\"div\", {\n ...props,\n className: classes,\n \"aria-label\": label,\n id: baseId,\n role: \"grid\",\n style: {\n width: `${width}px`\n }\n }),\n children: GRID.map((cells, index) => /*#__PURE__*/_jsx(Composite.Row, {\n render: /*#__PURE__*/_jsx(\"div\", {\n className: styles['grid-row'],\n role: \"row\"\n }),\n children: cells.map(cell => /*#__PURE__*/_jsx(Cell, {\n id: getItemId(baseId, cell),\n value: cell\n }, cell))\n }, index))\n });\n}\n\n/**\n * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.\n *\n * ```jsx\n * import { AlignmentMatrixControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ alignment, setAlignment ] = useState( 'center center' );\n *\n * \treturn (\n * \t\t<AlignmentMatrixControl\n * \t\t\tvalue={ alignment }\n * \t\t\tonChange={ setAlignment }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const AlignmentMatrixControl = Object.assign(UnforwardedAlignmentMatrixControl, {\n /**\n * Render an alignment matrix as an icon.\n *\n * ```jsx\n * import { AlignmentMatrixControl } from '@wordpress/components';\n *\n * <Icon icon={<AlignmentMatrixControl.Icon value=\"top left\" />} />\n * ```\n */\n Icon: Object.assign(AlignmentMatrixControlIcon, {\n displayName: 'AlignmentMatrixControl.Icon'\n })\n});\nexport default AlignmentMatrixControl;", "if (typeof document !== 'undefined'
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAA0B;AAC1B,qBAA8B;AAC9B,qBAA4B;AAK5B,kBAAiB;AACjB,uBAA0B;AAC1B,kBAAuC;AACvC,mBAA8C;;;AClB9C,
|
|
3
|
+
"sources": ["../../src/alignment-matrix-control/index.tsx", "../../../style-runtime/src/index.ts", "../../src/alignment-matrix-control/style.module.scss"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Cell from './cell';\nimport { Composite } from '../composite';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId, getItemValue } from './utils';\nimport styles from './style.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedAlignmentMatrixControl({\n className,\n id,\n label = __('Alignment Matrix Control'),\n defaultValue = 'center center',\n value,\n onChange,\n width = 92,\n ...props\n}) {\n const baseId = useInstanceId(UnforwardedAlignmentMatrixControl, 'alignment-matrix-control', id);\n const setActiveId = useCallback(nextActiveId => {\n const nextValue = getItemValue(baseId, nextActiveId);\n if (nextValue) {\n onChange?.(nextValue);\n }\n }, [baseId, onChange]);\n const classes = clsx('component-alignment-matrix-control', styles['grid-container'], className);\n return /*#__PURE__*/_jsx(Composite, {\n defaultActiveId: getItemId(baseId, defaultValue),\n activeId: getItemId(baseId, value),\n setActiveId: setActiveId,\n rtl: isRTL(),\n render: /*#__PURE__*/_jsx(\"div\", {\n ...props,\n className: classes,\n \"aria-label\": label,\n id: baseId,\n role: \"grid\",\n style: {\n width: `${width}px`\n }\n }),\n children: GRID.map((cells, index) => /*#__PURE__*/_jsx(Composite.Row, {\n render: /*#__PURE__*/_jsx(\"div\", {\n className: styles['grid-row'],\n role: \"row\"\n }),\n children: cells.map(cell => /*#__PURE__*/_jsx(Cell, {\n id: getItemId(baseId, cell),\n value: cell\n }, cell))\n }, index))\n });\n}\n\n/**\n * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.\n *\n * ```jsx\n * import { AlignmentMatrixControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ alignment, setAlignment ] = useState( 'center center' );\n *\n * \treturn (\n * \t\t<AlignmentMatrixControl\n * \t\t\tvalue={ alignment }\n * \t\t\tonChange={ setAlignment }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const AlignmentMatrixControl = Object.assign(UnforwardedAlignmentMatrixControl, {\n /**\n * Render an alignment matrix as an icon.\n *\n * ```jsx\n * import { AlignmentMatrixControl } from '@wordpress/components';\n *\n * <Icon icon={<AlignmentMatrixControl.Icon value=\"top left\" />} />\n * ```\n */\n Icon: Object.assign(AlignmentMatrixControlIcon, {\n displayName: 'AlignmentMatrixControl.Icon'\n })\n});\nexport default AlignmentMatrixControl;", "const STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n const globalScope = globalThis;\n if (globalScope.__wpStyleRuntime) {\n return globalScope.__wpStyleRuntime;\n }\n globalScope.__wpStyleRuntime = {\n documents: new Map(),\n styles: new Map(),\n injectedStyles: new WeakMap()\n };\n if (typeof document !== 'undefined') {\n registerDocument(document);\n }\n return globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(targetDocument, hash) {\n if (!targetDocument.head) {\n return false;\n }\n for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {\n if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle(targetDocument, hash, css) {\n if (!targetDocument.head) {\n return;\n }\n const runtime = getRuntime();\n let injectedStyles = runtime.injectedStyles.get(targetDocument);\n if (!injectedStyles) {\n injectedStyles = new Set();\n runtime.injectedStyles.set(targetDocument, injectedStyles);\n }\n if (injectedStyles.has(hash)) {\n return;\n }\n\n // Older generated CSS module output can still inject matching style tags\n // after this document's cache is created, so keep the DOM as the fallback\n // source of truth on cache misses.\n if (documentContainsStyleHash(targetDocument, hash)) {\n injectedStyles.add(hash);\n return;\n }\n const style = targetDocument.createElement('style');\n style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);\n style.appendChild(targetDocument.createTextNode(css));\n targetDocument.head.appendChild(style);\n injectedStyles.add(hash);\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument(targetDocument) {\n const runtime = getRuntime();\n runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);\n for (const [hash, css] of runtime.styles) {\n injectStyle(targetDocument, hash, css);\n }\n return () => {\n const count = runtime.documents.get(targetDocument);\n if (count === undefined) {\n return;\n }\n if (count <= 1) {\n runtime.documents.delete(targetDocument);\n return;\n }\n runtime.documents.set(targetDocument, count - 1);\n };\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle(hash, css) {\n const runtime = getRuntime();\n runtime.styles.set(hash, css);\n for (const targetDocument of runtime.documents.keys()) {\n injectStyle(targetDocument, hash, css);\n }\n}", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"9251e317a9\", \"._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer);direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}\");\n}\nexport default {\"grid-container\":\"_02e2af5803bf5bda__grid-container\",\"grid-row\":\"c421f8ed08c23077__grid-row\",\"cell\":\"_3af769f755097fdb__cell\",\"point\":\"_37ef12d4fb6d6131__point\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAA0B;AAC1B,qBAA8B;AAC9B,qBAA4B;AAK5B,kBAAiB;AACjB,uBAA0B;AAC1B,kBAAuC;AACvC,mBAA8C;;;AClB9C,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,cAAc;AACpB,MAAI,YAAY,kBAAkB;AAChC,WAAO,YAAY;AAAA,EACrB;AACA,cAAY,mBAAmB;AAAA,IAC7B,WAAW,oBAAI,IAAI;AAAA,IACnB,QAAQ,oBAAI,IAAI;AAAA,IAChB,gBAAg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W;AAAA,MACX,cAAc;AAAA,MACd,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,QACL,OAAO,GAAG,KAAK;AAAA,MACjB;AAAA,IACF,CAAC;AAAA,IACD,UAAU,kBAAK,IAAI,CAAC,OAAO,UAAuB,uCAAAA,KAAK,2BAAU,KAAK;AAAA,MACpE,QAAqB,uCAAAA,KAAK,OAAO;AAAA,QAC/B,WAAW,qBAAO,UAAU;AAAA,QAC5B,MAAM;AAAA,MACR,CAAC;AAAA,MACD,UAAU,MAAM,IAAI,UAAqB,uCAAAA,KAAK,YAAAC,SAAM;AAAA,QAClD,QAAI,wBAAU,QAAQ,IAAI;AAAA,QAC1B,OAAO;AAAA,MACT,GAAG,IAAI,CAAC;AAAA,IACV,GAAG,KAAK,CAAC;AAAA,EACX,CAAC;AACH;AAqBO,IAAM,yBAAyB,OAAO,OAAO,mCAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUrF,MAAM,OAAO,OAAO,YAAAC,SAA4B;AAAA,IAC9C,aAAa;AAAA,EACf,CAAC;AACH,CAAC;AACD,IAAO,mCAAQ;",
|
|
6
6
|
"names": ["clsx", "_jsx", "Cell", "AlignmentMatrixControlIcon"]
|
|
7
7
|
}
|
|
@@ -37,12 +37,86 @@ var import_clsx = __toESM(require("clsx"));
|
|
|
37
37
|
var import_element = require("@wordpress/element");
|
|
38
38
|
var import_compose = require("@wordpress/compose");
|
|
39
39
|
|
|
40
|
+
// packages/style-runtime/src/index.ts
|
|
41
|
+
var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
42
|
+
function getRuntime() {
|
|
43
|
+
const globalScope = globalThis;
|
|
44
|
+
if (globalScope.__wpStyleRuntime) {
|
|
45
|
+
return globalScope.__wpStyleRuntime;
|
|
46
|
+
}
|
|
47
|
+
globalScope.__wpStyleRuntime = {
|
|
48
|
+
documents: /* @__PURE__ */ new Map(),
|
|
49
|
+
styles: /* @__PURE__ */ new Map(),
|
|
50
|
+
injectedStyles: /* @__PURE__ */ new WeakMap()
|
|
51
|
+
};
|
|
52
|
+
if (typeof document !== "undefined") {
|
|
53
|
+
registerDocument(document);
|
|
54
|
+
}
|
|
55
|
+
return globalScope.__wpStyleRuntime;
|
|
56
|
+
}
|
|
57
|
+
function documentContainsStyleHash(targetDocument, hash) {
|
|
58
|
+
if (!targetDocument.head) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {
|
|
62
|
+
if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
function injectStyle(targetDocument, hash, css) {
|
|
69
|
+
if (!targetDocument.head) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const runtime = getRuntime();
|
|
73
|
+
let injectedStyles = runtime.injectedStyles.get(targetDocument);
|
|
74
|
+
if (!injectedStyles) {
|
|
75
|
+
injectedStyles = /* @__PURE__ */ new Set();
|
|
76
|
+
runtime.injectedStyles.set(targetDocument, injectedStyles);
|
|
77
|
+
}
|
|
78
|
+
if (injectedStyles.has(hash)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (documentContainsStyleHash(targetDocument, hash)) {
|
|
82
|
+
injectedStyles.add(hash);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const style = targetDocument.createElement("style");
|
|
86
|
+
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
|
|
87
|
+
style.appendChild(targetDocument.createTextNode(css));
|
|
88
|
+
targetDocument.head.appendChild(style);
|
|
89
|
+
injectedStyles.add(hash);
|
|
90
|
+
}
|
|
91
|
+
function registerDocument(targetDocument) {
|
|
92
|
+
const runtime = getRuntime();
|
|
93
|
+
runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
|
|
94
|
+
for (const [hash, css] of runtime.styles) {
|
|
95
|
+
injectStyle(targetDocument, hash, css);
|
|
96
|
+
}
|
|
97
|
+
return () => {
|
|
98
|
+
const count = runtime.documents.get(targetDocument);
|
|
99
|
+
if (count === void 0) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (count <= 1) {
|
|
103
|
+
runtime.documents.delete(targetDocument);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
runtime.documents.set(targetDocument, count - 1);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function registerStyle(hash, css) {
|
|
110
|
+
const runtime = getRuntime();
|
|
111
|
+
runtime.styles.set(hash, css);
|
|
112
|
+
for (const targetDocument of runtime.documents.keys()) {
|
|
113
|
+
injectStyle(targetDocument, hash, css);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
40
117
|
// packages/components/src/angle-picker-control/style.module.scss
|
|
41
|
-
if (typeof
|
|
42
|
-
|
|
43
|
-
style.setAttribute("data-wp-hash", "e91ec3f005");
|
|
44
|
-
style.appendChild(document.createTextNode("._8f57b8d483c51fbe__circle-root{border:1px solid var(--wp-components-color-gray-600,#949494);border-radius:50%;box-sizing:border-box;cursor:grab;height:32px;overflow:hidden;width:32px}._8f57b8d483c51fbe__circle-root:active{cursor:grabbing}.b1bae984ac10fcc3__circle-indicator-wrapper{box-sizing:border-box;height:100%;position:relative;width:100%}.b1bae984ac10fcc3__circle-indicator-wrapper:focus-visible{outline:none}._6d2fe0a2cbb31bf0__circle-indicator{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-radius:50%;box-sizing:border-box;display:block;height:6px;left:50%;position:absolute;top:4px;transform:translateX(-50%);width:6px}"));
|
|
45
|
-
document.head.appendChild(style);
|
|
118
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
|
|
119
|
+
registerStyle("e91ec3f005", "._8f57b8d483c51fbe__circle-root{border:1px solid var(--wp-components-color-gray-600,#949494);border-radius:50%;box-sizing:border-box;cursor:grab;height:32px;overflow:hidden;width:32px}._8f57b8d483c51fbe__circle-root:active{cursor:grabbing}.b1bae984ac10fcc3__circle-indicator-wrapper{box-sizing:border-box;height:100%;position:relative;width:100%}.b1bae984ac10fcc3__circle-indicator-wrapper:focus-visible{outline:none}._6d2fe0a2cbb31bf0__circle-indicator{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-radius:50%;box-sizing:border-box;display:block;height:6px;left:50%;position:absolute;top:4px;transform:translateX(-50%);width:6px}");
|
|
46
120
|
}
|
|
47
121
|
var style_module_default = { "circle-root": "_8f57b8d483c51fbe__circle-root", "circle-indicator-wrapper": "b1bae984ac10fcc3__circle-indicator-wrapper", "circle-indicator": "_6d2fe0a2cbb31bf0__circle-indicator" };
|
|
48
122
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/angle-picker-control/angle-circle.tsx", "../../src/angle-picker-control/style.module.scss"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { __experimentalUseDragging as useDragging } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction AngleCircle({\n value,\n onChange,\n className,\n ...props\n}) {\n const angleCircleRef = useRef(null);\n const angleCircleCenterRef = useRef(undefined);\n const previousCursorValueRef = useRef(undefined);\n const setAngleCircleCenter = () => {\n if (angleCircleRef.current === null) {\n return;\n }\n const rect = angleCircleRef.current.getBoundingClientRect();\n angleCircleCenterRef.current = {\n x: rect.x + rect.width / 2,\n y: rect.y + rect.height / 2\n };\n };\n const changeAngleToPosition = event => {\n if (event === undefined) {\n return;\n }\n\n // Prevent (drag) mouse events from selecting and accidentally\n // triggering actions from other elements.\n event.preventDefault();\n // Input control needs to lose focus and by preventDefault above, it doesn't.\n event.target?.focus();\n if (angleCircleCenterRef.current !== undefined && onChange !== undefined) {\n const {\n x: centerX,\n y: centerY\n } = angleCircleCenterRef.current;\n onChange(getAngle(centerX, centerY, event.clientX, event.clientY));\n }\n };\n const {\n startDrag,\n isDragging\n } = useDragging({\n onDragStart: event => {\n setAngleCircleCenter();\n changeAngleToPosition(event);\n },\n onDragMove: changeAngleToPosition,\n onDragEnd: changeAngleToPosition\n });\n useEffect(() => {\n if (isDragging) {\n if (previousCursorValueRef.current === undefined) {\n previousCursorValueRef.current = document.body.style.cursor;\n }\n document.body.style.cursor = 'grabbing';\n } else {\n document.body.style.cursor = previousCursorValueRef.current || '';\n previousCursorValueRef.current = undefined;\n }\n }, [isDragging]);\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n _jsx(\"div\", {\n ref: angleCircleRef,\n onMouseDown: startDrag,\n className: clsx('components-angle-picker-control__angle-circle', styles['circle-root'], className),\n ...props,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: value ? {\n transform: `rotate(${value}deg)`\n } : undefined,\n className: clsx('components-angle-picker-control__angle-circle-indicator-wrapper', styles['circle-indicator-wrapper']),\n tabIndex: -1,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-angle-picker-control__angle-circle-indicator', styles['circle-indicator'])\n })\n })\n })\n );\n}\nfunction getAngle(centerX, centerY, pointX, pointY) {\n const y = pointY - centerY;\n const x = pointX - centerX;\n const angleInRadians = Math.atan2(y, x);\n const angleInDeg = Math.round(angleInRadians * (180 / Math.PI)) + 90;\n if (angleInDeg < 0) {\n return 360 + angleInDeg;\n }\n return angleInDeg;\n}\nexport default AngleCircle;", "if (typeof document !== 'undefined'
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAyD;;;ACTzD,
|
|
3
|
+
"sources": ["../../src/angle-picker-control/angle-circle.tsx", "../../../style-runtime/src/index.ts", "../../src/angle-picker-control/style.module.scss"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { __experimentalUseDragging as useDragging } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction AngleCircle({\n value,\n onChange,\n className,\n ...props\n}) {\n const angleCircleRef = useRef(null);\n const angleCircleCenterRef = useRef(undefined);\n const previousCursorValueRef = useRef(undefined);\n const setAngleCircleCenter = () => {\n if (angleCircleRef.current === null) {\n return;\n }\n const rect = angleCircleRef.current.getBoundingClientRect();\n angleCircleCenterRef.current = {\n x: rect.x + rect.width / 2,\n y: rect.y + rect.height / 2\n };\n };\n const changeAngleToPosition = event => {\n if (event === undefined) {\n return;\n }\n\n // Prevent (drag) mouse events from selecting and accidentally\n // triggering actions from other elements.\n event.preventDefault();\n // Input control needs to lose focus and by preventDefault above, it doesn't.\n event.target?.focus();\n if (angleCircleCenterRef.current !== undefined && onChange !== undefined) {\n const {\n x: centerX,\n y: centerY\n } = angleCircleCenterRef.current;\n onChange(getAngle(centerX, centerY, event.clientX, event.clientY));\n }\n };\n const {\n startDrag,\n isDragging\n } = useDragging({\n onDragStart: event => {\n setAngleCircleCenter();\n changeAngleToPosition(event);\n },\n onDragMove: changeAngleToPosition,\n onDragEnd: changeAngleToPosition\n });\n useEffect(() => {\n if (isDragging) {\n if (previousCursorValueRef.current === undefined) {\n previousCursorValueRef.current = document.body.style.cursor;\n }\n document.body.style.cursor = 'grabbing';\n } else {\n document.body.style.cursor = previousCursorValueRef.current || '';\n previousCursorValueRef.current = undefined;\n }\n }, [isDragging]);\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n _jsx(\"div\", {\n ref: angleCircleRef,\n onMouseDown: startDrag,\n className: clsx('components-angle-picker-control__angle-circle', styles['circle-root'], className),\n ...props,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: value ? {\n transform: `rotate(${value}deg)`\n } : undefined,\n className: clsx('components-angle-picker-control__angle-circle-indicator-wrapper', styles['circle-indicator-wrapper']),\n tabIndex: -1,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-angle-picker-control__angle-circle-indicator', styles['circle-indicator'])\n })\n })\n })\n );\n}\nfunction getAngle(centerX, centerY, pointX, pointY) {\n const y = pointY - centerY;\n const x = pointX - centerX;\n const angleInRadians = Math.atan2(y, x);\n const angleInDeg = Math.round(angleInRadians * (180 / Math.PI)) + 90;\n if (angleInDeg < 0) {\n return 360 + angleInDeg;\n }\n return angleInDeg;\n}\nexport default AngleCircle;", "const STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n const globalScope = globalThis;\n if (globalScope.__wpStyleRuntime) {\n return globalScope.__wpStyleRuntime;\n }\n globalScope.__wpStyleRuntime = {\n documents: new Map(),\n styles: new Map(),\n injectedStyles: new WeakMap()\n };\n if (typeof document !== 'undefined') {\n registerDocument(document);\n }\n return globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(targetDocument, hash) {\n if (!targetDocument.head) {\n return false;\n }\n for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) {\n if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle(targetDocument, hash, css) {\n if (!targetDocument.head) {\n return;\n }\n const runtime = getRuntime();\n let injectedStyles = runtime.injectedStyles.get(targetDocument);\n if (!injectedStyles) {\n injectedStyles = new Set();\n runtime.injectedStyles.set(targetDocument, injectedStyles);\n }\n if (injectedStyles.has(hash)) {\n return;\n }\n\n // Older generated CSS module output can still inject matching style tags\n // after this document's cache is created, so keep the DOM as the fallback\n // source of truth on cache misses.\n if (documentContainsStyleHash(targetDocument, hash)) {\n injectedStyles.add(hash);\n return;\n }\n const style = targetDocument.createElement('style');\n style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);\n style.appendChild(targetDocument.createTextNode(css));\n targetDocument.head.appendChild(style);\n injectedStyles.add(hash);\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument(targetDocument) {\n const runtime = getRuntime();\n runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);\n for (const [hash, css] of runtime.styles) {\n injectStyle(targetDocument, hash, css);\n }\n return () => {\n const count = runtime.documents.get(targetDocument);\n if (count === undefined) {\n return;\n }\n if (count <= 1) {\n runtime.documents.delete(targetDocument);\n return;\n }\n runtime.documents.set(targetDocument, count - 1);\n };\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle(hash, css) {\n const runtime = getRuntime();\n runtime.styles.set(hash, css);\n for (const targetDocument of runtime.documents.keys()) {\n injectStyle(targetDocument, hash, css);\n }\n}", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"e91ec3f005\", \"._8f57b8d483c51fbe__circle-root{border:1px solid var(--wp-components-color-gray-600,#949494);border-radius:50%;box-sizing:border-box;cursor:grab;height:32px;overflow:hidden;width:32px}._8f57b8d483c51fbe__circle-root:active{cursor:grabbing}.b1bae984ac10fcc3__circle-indicator-wrapper{box-sizing:border-box;height:100%;position:relative;width:100%}.b1bae984ac10fcc3__circle-indicator-wrapper:focus-visible{outline:none}._6d2fe0a2cbb31bf0__circle-indicator{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-radius:50%;box-sizing:border-box;display:block;height:6px;left:50%;position:absolute;top:4px;transform:translateX(-50%);width:6px}\");\n}\nexport default {\"circle-root\":\"_8f57b8d483c51fbe__circle-root\",\"circle-indicator-wrapper\":\"b1bae984ac10fcc3__circle-indicator-wrapper\",\"circle-indicator\":\"_6d2fe0a2cbb31bf0__circle-indicator\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAyD;;;ACTzD,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACpB,QAAM,cAAc;AACpB,MAAI,YAAY,kBAAkB;AAChC,WAAO,YAAY;AAAA,EACrB;AACA,cAAY,mBAAmB;AAAA,IAC7B,WAAW,oBAAI,IAAI;AAAA,IACnB,QAAQ,oBAAI,IAAI;AAAA,IAChB,gBAAgB,oBAAI,QAAQ;AAAA,EAC9B;AACA,MAAI,OAAO,aAAa,aAAa;AACnC,qBAAiB,QAAQ;AAAA,EAC3B;AACA,SAAO,YAAY;AACrB;AAUA,SAAS,0BAA0B,gBAAgB,MAAM;AACvD,MAAI,CAAC,eAAe,MAAM;AACxB,WAAO;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"version": 3,
|
|
3
3
|
"sources": ["../../src/autocomplete/autocompleter-ui.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { createPortal } from 'react-dom';\n\n/**\n * WordPress dependencies\n */\nimport { useLayoutEffect, useRef, useEffect, useState } from '@wordpress/element';\nimport { useAnchor } from '@wordpress/rich-text';\nimport { useDebounce, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport getDefaultUseItems from './get-default-use-items';\nimport Button from '../button';\nimport Popover from '../popover';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListBox({\n items,\n onSelect,\n selectedIndex,\n instanceId,\n listBoxId,\n className,\n Component = 'div'\n}) {\n return /*#__PURE__*/_jsx(Component, {\n id: listBoxId,\n role: \"listbox\",\n className: \"components-autocomplete__results\",\n children: items.map((option, index) => /*#__PURE__*/_jsx(Button, {\n id: `components-autocomplete-item-${instanceId}-${option.key}`,\n role: \"option\",\n __next40pxDefaultSize: true,\n \"aria-selected\": index === selectedIndex,\n accessibleWhenDisabled: true,\n disabled: option.isDisabled,\n className: clsx('components-autocomplete__result', className, {\n // Unused, for backwards compatibility.\n 'is-selected': index === selectedIndex\n }),\n variant: index === selectedIndex ? 'primary' : undefined,\n onClick: () => onSelect(option),\n children: option.label\n }, option.key))\n });\n}\nexport function AutocompleterUI({\n autocompleter,\n filterValue,\n instanceId,\n listBoxId,\n className,\n selectedIndex,\n onChangeOptions,\n onSelect,\n reset,\n contentRef\n}) {\n // The useItems hook is derived from the autocompleter prop. This is safe\n // because the parent renders this component with key={autocompleter.name},\n // ensuring a fresh mount (and stable hook identity) when the completer changes.\n const useItems = autocompleter.useItems ?? getDefaultUseItems(autocompleter);\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AACjB,uBAA6B;AAK7B,qBAA6D;AAC7D,uBAA0B;AAC1B,qBAAwD;AACxD,kBAAsB;AACtB,kBAAgC;AAKhC,mCAA+B;AAC/B,oBAAmB;AACnB,qBAAoB;AACpB,6BAA+B;AAC/B,yBAAkE;AAClE,SAAS,QAAQ;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AACd,GAAG;AACD,SAAoB,uCAAAA,KAAK,WAAW;AAAA,IAClC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU,MAAM,IAAI,CAAC,QAAQ,UAAuB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAC/D,IAAI,gCAAgC,UAAU,IAAI,OAAO,GAAG;AAAA,MAC5D,MAAM;AAAA,MACN,uBAAuB;AAAA,MACvB,iBAAiB,UAAU;AAAA,MAC3B,wBAAwB;AAAA,MACxB,UAAU,OAAO;AAAA,MACjB,eAAW,YAAAC,SAAK,mCAAmC,WAAW;AAAA;AAAA,QAE5D,eAAe,UAAU;AAAA,MAC3B,CAAC;AAAA,MACD,SAAS,UAAU,gBAAgB,YAAY;AAAA,MAC/C,SAAS,MAAM,SAAS,MAAM;AAAA,MAC9B,UAAU,OAAO;AAAA,IACnB,GAAG,OAAO,GAAG,CAAC;AAAA,EAChB,CAAC;AACH;AACO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAID,QAAM,WAAW,cAAc,gBAAY,6BAAAC,SAAmB,aAAa;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { createPortal } from 'react-dom';\n\n/**\n * WordPress dependencies\n */\nimport { useLayoutEffect, useRef, useEffect, useState } from '@wordpress/element';\nimport { useAnchor } from '@wordpress/rich-text';\nimport { useDebounce, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport getDefaultUseItems from './get-default-use-items';\nimport Button from '../button';\nimport Popover from '../popover';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListBox({\n items,\n onSelect,\n selectedIndex,\n instanceId,\n listBoxId,\n className,\n Component = 'div'\n}) {\n return /*#__PURE__*/_jsx(Component, {\n id: listBoxId,\n role: \"listbox\",\n className: \"components-autocomplete__results\",\n children: items.map((option, index) => /*#__PURE__*/_jsx(Button, {\n id: `components-autocomplete-item-${instanceId}-${option.key}`,\n role: \"option\",\n __next40pxDefaultSize: true,\n \"aria-selected\": index === selectedIndex,\n accessibleWhenDisabled: true,\n disabled: option.isDisabled,\n className: clsx('components-autocomplete__result', className, {\n // Unused, for backwards compatibility.\n 'is-selected': index === selectedIndex\n }),\n variant: index === selectedIndex ? 'primary' : undefined,\n onClick: () => onSelect(option),\n children: option.label\n }, option.key))\n });\n}\nexport function AutocompleterUI({\n autocompleter,\n filterValue,\n instanceId,\n listBoxId,\n className,\n selectedIndex,\n onChangeOptions,\n onSelect,\n reset,\n contentRef\n}) {\n // The useItems hook is derived from the autocompleter prop. This is safe\n // because the parent renders this component with key={autocompleter.name},\n // ensuring a fresh mount (and stable hook identity) when the completer changes.\n const useItems = autocompleter.useItems ?? getDefaultUseItems(autocompleter);\n const [items] = useItems(filterValue);\n const popoverAnchor = useAnchor({\n editableContentElement: contentRef.current\n });\n const [needsA11yCompat, setNeedsA11yCompat] = useState(false);\n const popoverRef = useRef(null);\n const popoverRefs = useMergeRefs([popoverRef, useRefEffect(node => {\n if (!contentRef.current) {\n return;\n }\n\n // If the popover is rendered in a different document than\n // the content, we need to duplicate the options list in the\n // content document so that it's available to the screen\n // readers, which check the DOM ID based aria-* attributes.\n setNeedsA11yCompat(node.ownerDocument !== contentRef.current.ownerDocument);\n }, [contentRef])]);\n useOnClickOutside(popoverRef, reset);\n const debouncedSpeak = useDebounce(speak, 500);\n function announce(options) {\n if (!debouncedSpeak) {\n return;\n }\n if (!!options.length) {\n if (filterValue) {\n debouncedSpeak(sprintf(/* translators: %d: number of results. */\n _n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', options.length), options.length), 'assertive');\n } else {\n debouncedSpeak(sprintf(/* translators: %d: number of results. */\n _n('Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.', 'Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.', options.length), options.length), 'assertive');\n }\n } else {\n debouncedSpeak(__('No results.'), 'assertive');\n }\n }\n useLayoutEffect(() => {\n onChangeOptions(items);\n announce(items);\n // We want to avoid introducing unexpected side effects.\n // See https://github.com/WordPress/gutenberg/pull/41820\n }, [items]);\n if (items.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Popover, {\n offset: 8,\n focusOnMount: false,\n placement: \"top-start\",\n className: \"components-autocomplete__popover\",\n anchor: popoverAnchor,\n ref: popoverRefs,\n children: /*#__PURE__*/_jsx(ListBox, {\n items: items,\n onSelect: onSelect,\n selectedIndex: selectedIndex,\n instanceId: instanceId,\n listBoxId: listBoxId,\n className: className\n })\n }), contentRef.current && needsA11yCompat && createPortal(/*#__PURE__*/_jsx(ListBox, {\n items: items,\n onSelect: onSelect,\n selectedIndex: selectedIndex,\n instanceId: instanceId,\n listBoxId: listBoxId,\n className: className,\n Component: VisuallyHidden\n }), contentRef.current.ownerDocument.body)]\n });\n}\nfunction useOnClickOutside(ref, handler) {\n useEffect(() => {\n const listener = event => {\n // Do nothing if clicking ref's element or descendent elements, or if the ref is not referencing an element\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n handler(event);\n };\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, [handler, ref]);\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AACjB,uBAA6B;AAK7B,qBAA6D;AAC7D,uBAA0B;AAC1B,qBAAwD;AACxD,kBAAsB;AACtB,kBAAgC;AAKhC,mCAA+B;AAC/B,oBAAmB;AACnB,qBAAoB;AACpB,6BAA+B;AAC/B,yBAAkE;AAClE,SAAS,QAAQ;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AACd,GAAG;AACD,SAAoB,uCAAAA,KAAK,WAAW;AAAA,IAClC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU,MAAM,IAAI,CAAC,QAAQ,UAAuB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAC/D,IAAI,gCAAgC,UAAU,IAAI,OAAO,GAAG;AAAA,MAC5D,MAAM;AAAA,MACN,uBAAuB;AAAA,MACvB,iBAAiB,UAAU;AAAA,MAC3B,wBAAwB;AAAA,MACxB,UAAU,OAAO;AAAA,MACjB,eAAW,YAAAC,SAAK,mCAAmC,WAAW;AAAA;AAAA,QAE5D,eAAe,UAAU;AAAA,MAC3B,CAAC;AAAA,MACD,SAAS,UAAU,gBAAgB,YAAY;AAAA,MAC/C,SAAS,MAAM,SAAS,MAAM;AAAA,MAC9B,UAAU,OAAO;AAAA,IACnB,GAAG,OAAO,GAAG,CAAC;AAAA,EAChB,CAAC;AACH;AACO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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AAS;AAAA,MACpC,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,MACX,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,UAAuB,uCAAAN,KAAK,SAAS;AAAA,QACnC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,GAAG,WAAW,WAAW,uBAAmB,+BAA0B,uCAAAA,KAAK,SAAS;AAAA,MACnF;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,IACb,CAAC,GAAG,WAAW,QAAQ,cAAc,IAAI,CAAC;AAAA,EAC5C,CAAC;AACH;AACA,SAAS,kBAAkB,KAAK,SAAS;AACvC,gCAAU,MAAM;AACd,UAAM,WAAW,WAAS;AAExB,UAAI,CAAC,IAAI,WAAW,IAAI,QAAQ,SAAS,MAAM,MAAM,GAAG;AACtD;AAAA,MACF;AACA,cAAQ,KAAK;AAAA,IACf;AACA,aAAS,iBAAiB,aAAa,QAAQ;AAC/C,aAAS,iBAAiB,cAAc,QAAQ;AAChD,WAAO,MAAM;AACX,eAAS,oBAAoB,aAAa,QAAQ;AAClD,eAAS,oBAAoB,cAAc,QAAQ;AAAA,IACrD;AAAA,EACF,GAAG,CAAC,SAAS,GAAG,CAAC;AACnB;",
|
|
6
6
|
"names": ["_jsx", "Button", "clsx", "getDefaultUseItems", "_jsxs", "_Fragment", "Popover"]
|
|
7
7
|
}
|
|
@@ -58,15 +58,17 @@ function SinglePalette({
|
|
|
58
58
|
colors,
|
|
59
59
|
onChange,
|
|
60
60
|
value,
|
|
61
|
+
selectedSlug,
|
|
61
62
|
...additionalProps
|
|
62
63
|
}) {
|
|
63
64
|
const colorOptions = (0, import_element.useMemo)(() => {
|
|
64
65
|
return colors.map(({
|
|
65
66
|
color,
|
|
66
|
-
name
|
|
67
|
+
name,
|
|
68
|
+
slug
|
|
67
69
|
}, index) => {
|
|
68
70
|
const colordColor = (0, import_colord.colord)(color);
|
|
69
|
-
const isSelected = value === color;
|
|
71
|
+
const isSelected = selectedSlug ? slug === selectedSlug : value === color;
|
|
70
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_circular_option_picker.default.Option, {
|
|
71
73
|
isSelected,
|
|
72
74
|
selectedIconProps: isSelected ? {
|
|
@@ -78,10 +80,10 @@ function SinglePalette({
|
|
|
78
80
|
backgroundColor: color,
|
|
79
81
|
color
|
|
80
82
|
},
|
|
81
|
-
onClick: isSelected ? clearColor : () => onChange(color, index)
|
|
82
|
-
}, `${color}-${index}`);
|
|
83
|
+
onClick: isSelected ? clearColor : () => onChange(color, index, slug)
|
|
84
|
+
}, slug ?? `${color}-${index}`);
|
|
83
85
|
});
|
|
84
|
-
}, [colors, value, onChange, clearColor]);
|
|
86
|
+
}, [colors, value, selectedSlug, onChange, clearColor]);
|
|
85
87
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_circular_option_picker.default.OptionGroup, {
|
|
86
88
|
className,
|
|
87
89
|
options: colorOptions,
|
|
@@ -94,6 +96,7 @@ function MultiplePalettes({
|
|
|
94
96
|
colors,
|
|
95
97
|
onChange,
|
|
96
98
|
value,
|
|
99
|
+
selectedSlug,
|
|
97
100
|
headingLevel
|
|
98
101
|
}) {
|
|
99
102
|
const instanceId = (0, import_compose.useInstanceId)(MultiplePalettes, "color-palette");
|
|
@@ -117,8 +120,9 @@ function MultiplePalettes({
|
|
|
117
120
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SinglePalette, {
|
|
118
121
|
clearColor,
|
|
119
122
|
colors: colorPalette,
|
|
120
|
-
onChange: (newColor) => onChange(newColor, index),
|
|
123
|
+
onChange: (newColor, _colorIndex, slug) => onChange(newColor, index, slug),
|
|
121
124
|
value,
|
|
125
|
+
selectedSlug,
|
|
122
126
|
"aria-labelledby": id
|
|
123
127
|
})]
|
|
124
128
|
}, index);
|
|
@@ -164,6 +168,7 @@ function UnforwardedColorPalette(props, forwardedRef) {
|
|
|
164
168
|
enableAlpha = false,
|
|
165
169
|
onChange,
|
|
166
170
|
value,
|
|
171
|
+
selectedSlug,
|
|
167
172
|
__experimentalIsRenderedInSidebar = false,
|
|
168
173
|
headingLevel = 2,
|
|
169
174
|
"aria-label": ariaLabel,
|
|
@@ -176,7 +181,7 @@ function UnforwardedColorPalette(props, forwardedRef) {
|
|
|
176
181
|
setNormalizedColorValue((0, import_utils.normalizeColorValue)(value, node));
|
|
177
182
|
}, [value]);
|
|
178
183
|
const hasMultipleColorOrigins = (0, import_utils.isMultiplePaletteArray)(colors);
|
|
179
|
-
const buttonLabelName = (0, import_element.useMemo)(() => (0, import_utils.extractColorNameFromCurrentValue)(value, colors, hasMultipleColorOrigins), [value, colors, hasMultipleColorOrigins]);
|
|
184
|
+
const buttonLabelName = (0, import_element.useMemo)(() => (0, import_utils.extractColorNameFromCurrentValue)(value, colors, hasMultipleColorOrigins, selectedSlug), [value, colors, hasMultipleColorOrigins, selectedSlug]);
|
|
180
185
|
const renderCustomColorPicker = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_content_wrapper.default, {
|
|
181
186
|
paddingSize: "none",
|
|
182
187
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_color_picker.ColorPicker, {
|
|
@@ -196,7 +201,8 @@ function UnforwardedColorPalette(props, forwardedRef) {
|
|
|
196
201
|
const paletteCommonProps = {
|
|
197
202
|
clearColor,
|
|
198
203
|
onChange,
|
|
199
|
-
value
|
|
204
|
+
value,
|
|
205
|
+
selectedSlug
|
|
200
206
|
};
|
|
201
207
|
const actions = !!clearable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_circular_option_picker.default.ButtonAction, {
|
|
202
208
|
onClick: clearColor,
|