@wordpress/components 28.13.1-next.082ed6819.0 → 29.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -2
- package/CONTRIBUTING.md +16 -16
- package/build/alignment-matrix-control/icon.js +1 -0
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/index.js +1 -0
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/angle-picker-control/index.js +1 -1
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/animation/index.js +0 -6
- package/build/animation/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +1 -0
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js +1 -0
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js +1 -0
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-box-control/utils.js +1 -0
- package/build/border-box-control/utils.js.map +1 -1
- package/build/border-control/border-control/component.js +2 -0
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +1 -0
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-style-picker/component.js +1 -0
- package/build/border-control/border-control-style-picker/component.js.map +1 -1
- package/build/box-control/index.js +35 -28
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-control.js +161 -0
- package/build/box-control/input-control.js.map +1 -0
- package/build/box-control/types.js.map +1 -1
- package/build/box-control/utils.js +51 -48
- package/build/box-control/utils.js.map +1 -1
- package/build/button/index.native.js +1 -0
- package/build/button/index.native.js.map +1 -1
- package/build/button/types.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-actions.js +1 -0
- package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +1 -0
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/clipboard-button/index.js +5 -3
- package/build/clipboard-button/index.js.map +1 -1
- package/build/color-indicator/index.native.js +1 -0
- package/build/color-indicator/index.native.js.map +1 -1
- package/build/color-palette/index.js +1 -0
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/utils.js +1 -0
- package/build/color-palette/utils.js.map +1 -1
- package/build/color-picker/input-with-slider.js +2 -2
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/combobox-control/index.js +1 -0
- package/build/combobox-control/index.js.map +1 -1
- package/build/composite/item.js +0 -9
- package/build/composite/item.js.map +1 -1
- package/build/composite/legacy/index.js +1 -0
- package/build/composite/legacy/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +3 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +1 -0
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js +1 -0
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build/custom-gradient-picker/index.js +3 -0
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js +1 -0
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/types.js.map +1 -1
- package/build/custom-gradient-picker/utils.js +1 -0
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/custom-select-control/index.js +11 -2
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control/types.js.map +1 -1
- package/build/dashicon/index.js +1 -0
- package/build/dashicon/index.js.map +1 -1
- package/build/date-time/date/index.js +1 -0
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date/use-lilius/index.js +1 -0
- package/build/date-time/date/use-lilius/index.js.map +1 -1
- package/build/date-time/time/index.js +1 -0
- package/build/date-time/time/index.js.map +1 -1
- package/build/dimension-control/index.js +1 -0
- package/build/dimension-control/index.js.map +1 -1
- package/build/dimension-control/sizes.js +1 -0
- package/build/dimension-control/sizes.js.map +1 -1
- package/build/draggable/index.js +1 -0
- package/build/draggable/index.js.map +1 -1
- package/build/draggable/index.native.js +1 -0
- package/build/draggable/index.native.js.map +1 -1
- package/build/drop-zone/index.js +19 -13
- package/build/drop-zone/index.js.map +1 -1
- package/build/drop-zone/types.js.map +1 -1
- package/build/dropdown-menu/index.js +2 -0
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +1 -0
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/duotone-picker/color-list-picker/index.js +10 -14
- package/build/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +1 -0
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/utils.js +1 -0
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/font-size-picker/font-size-picker-select.js +2 -0
- package/build/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build/font-size-picker/font-size-picker-toggle-group.js +1 -0
- package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build/font-size-picker/index.js +2 -0
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/index.native.js +1 -0
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/font-size-picker/utils.js +1 -0
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/form-file-upload/index.js +11 -1
- package/build/form-file-upload/index.js.map +1 -1
- package/build/form-file-upload/types.js.map +1 -1
- package/build/form-token-field/index.js +6 -0
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +1 -0
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/gradient-picker/index.js +3 -0
- package/build/gradient-picker/index.js.map +1 -1
- package/build/gradient-picker/types.js.map +1 -1
- package/build/guide/index.js +1 -0
- package/build/guide/index.js.map +1 -1
- package/build/guide/page-control.js +1 -0
- package/build/guide/page-control.js.map +1 -1
- package/build/h-stack/hook.js +1 -0
- package/build/h-stack/hook.js.map +1 -1
- package/build/higher-order/navigate-regions/index.js +1 -0
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js +1 -0
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js +1 -0
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/higher-order/with-notices/index.js +1 -0
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/icon/index.js +9 -0
- package/build/icon/index.js.map +1 -1
- package/build/index.js +0 -6
- package/build/index.js.map +1 -1
- package/build/keyboard-shortcuts/index.js +1 -0
- package/build/keyboard-shortcuts/index.js.map +1 -1
- package/build/menu/checkbox-item.js +5 -9
- package/build/menu/checkbox-item.js.map +1 -1
- package/build/menu/group-label.js +4 -1
- package/build/menu/group-label.js.map +1 -1
- package/build/menu/group.js +4 -1
- package/build/menu/group.js.map +1 -1
- package/build/menu/item-help-text.js +5 -0
- package/build/menu/item-help-text.js.map +1 -1
- package/build/menu/item-label.js +5 -0
- package/build/menu/item-label.js.map +1 -1
- package/build/menu/item.js +4 -8
- package/build/menu/item.js.map +1 -1
- package/build/menu/radio-item.js +5 -9
- package/build/menu/radio-item.js.map +1 -1
- package/build/menu/separator.js +5 -2
- package/build/menu/separator.js.map +1 -1
- package/build/menu/styles.js +16 -16
- package/build/menu/styles.js.map +1 -1
- package/build/menu-items-choice/index.js +1 -0
- package/build/menu-items-choice/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build/mobile/bottom-sheet/picker-cell.native.js +1 -0
- package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +1 -0
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +1 -0
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js +1 -0
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js +1 -0
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/mobile/picker/index.android.js +1 -0
- package/build/mobile/picker/index.android.js.map +1 -1
- package/build/mobile/picker/index.ios.js +1 -0
- package/build/mobile/picker/index.ios.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +1 -0
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/mobile/utils/get-px-from-css-unit.native.js +1 -0
- package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build/modal/aria-helper.js +0 -1
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +0 -1
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +1 -0
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigation/group/index.js +1 -0
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +1 -0
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/search-no-results-found.js +1 -0
- package/build/navigation/menu/search-no-results-found.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +12 -12
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/navigator/navigator/component.js +1 -0
- package/build/navigator/navigator/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +1 -0
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/utils/router.js +1 -0
- package/build/navigator/utils/router.js.map +1 -1
- package/build/notice/index.js +1 -0
- package/build/notice/index.js.map +1 -1
- package/build/notice/list.js +1 -0
- package/build/notice/list.js.map +1 -1
- package/build/notice/list.native.js +1 -0
- package/build/notice/list.native.js.map +1 -1
- package/build/number-control/index.js +8 -0
- package/build/number-control/index.js.map +1 -1
- package/build/number-control/types.js.map +1 -1
- package/build/palette-edit/index.js +1 -0
- package/build/palette-edit/index.js.map +1 -1
- package/build/panel/actions.native.js +1 -0
- package/build/panel/actions.native.js.map +1 -1
- package/build/query-controls/index.js +1 -0
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/terms.js +1 -0
- package/build/query-controls/terms.js.map +1 -1
- package/build/radio-control/index.js +1 -0
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-control/index.native.js +1 -0
- package/build/radio-control/index.native.js.map +1 -1
- package/build/range-control/index.js +2 -1
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/mark.js +0 -1
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/rail.js +1 -0
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +33 -45
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/resizable-box/index.js +10 -1
- package/build/resizable-box/index.js.map +1 -1
- package/build/sandbox/index.js +1 -0
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +1 -0
- package/build/sandbox/index.native.js.map +1 -1
- package/build/search-control/index.native.js +1 -0
- package/build/search-control/index.native.js.map +1 -1
- package/build/select-control/index.js +1 -0
- package/build/select-control/index.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +8 -12
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -10
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +4 -10
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/provider.js +1 -0
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +1 -0
- package/build/slot-fill/slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/snackbar/index.js +1 -0
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +1 -0
- package/build/snackbar/list.js.map +1 -1
- package/build/style-provider/index.js +0 -1
- package/build/style-provider/index.js.map +1 -1
- package/build/tab-panel/index.js +1 -0
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js +1 -0
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/tab.js +0 -17
- package/build/tabs/tab.js.map +1 -1
- package/build/text/utils.js +1 -0
- package/build/text/utils.js.map +1 -1
- package/build/theme/color-algorithms.js +1 -0
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +2 -0
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-group/index.js +1 -0
- package/build/toolbar/toolbar-group/index.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +2 -0
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +1 -0
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +1 -0
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tree-grid/cell.js +4 -1
- package/build/tree-grid/cell.js.map +1 -1
- package/build/tree-grid/index.js +1 -0
- package/build/tree-grid/index.js.map +1 -1
- package/build/tree-grid/types.js.map +1 -1
- package/build/tree-select/index.js +1 -0
- package/build/tree-select/index.js.map +1 -1
- package/build/unit-control/index.js +11 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +1 -0
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/types.js.map +1 -1
- package/build/unit-control/unit-select-control.js +1 -0
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/unit-control/utils.js +1 -0
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/colors-values.js +3 -0
- package/build/utils/colors-values.js.map +1 -1
- package/build/utils/config-values.js +0 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/get-valid-children.js +1 -0
- package/build/utils/get-valid-children.js.map +1 -1
- package/build/utils/hooks/use-animated-offset-rect.js +1 -0
- package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
- package/build/utils/hooks/use-cx.js +1 -0
- package/build/utils/hooks/use-cx.js.map +1 -1
- package/build/utils/math.js +1 -0
- package/build/utils/math.js.map +1 -1
- package/build/utils/rtl.js +1 -0
- package/build/utils/rtl.js.map +1 -1
- package/build/utils/values.js +1 -0
- package/build/utils/values.js.map +1 -1
- package/build/z-stack/component.js +1 -0
- package/build/z-stack/component.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js +1 -0
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +1 -0
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/angle-picker-control/index.js +1 -1
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/animation/index.js +1 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +1 -0
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +1 -0
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +1 -0
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-box-control/utils.js +1 -0
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/border-control/border-control/component.js +2 -0
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +1 -0
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-style-picker/component.js +1 -0
- package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
- package/build-module/box-control/index.js +37 -30
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-control.js +153 -0
- package/build-module/box-control/input-control.js.map +1 -0
- package/build-module/box-control/types.js.map +1 -1
- package/build-module/box-control/utils.js +48 -46
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button/index.native.js +1 -0
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/button/types.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-actions.js +1 -0
- package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +1 -0
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/clipboard-button/index.js +5 -3
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/color-indicator/index.native.js +1 -0
- package/build-module/color-indicator/index.native.js.map +1 -1
- package/build-module/color-palette/index.js +1 -0
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/utils.js +1 -0
- package/build-module/color-palette/utils.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +2 -2
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/combobox-control/index.js +1 -0
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/composite/item.js +0 -9
- package/build-module/composite/item.js.map +1 -1
- package/build-module/composite/legacy/index.js +1 -0
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +3 -0
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -0
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/utils.js +1 -0
- package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +3 -0
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/serializer.js +1 -0
- package/build-module/custom-gradient-picker/serializer.js.map +1 -1
- package/build-module/custom-gradient-picker/types.js.map +1 -1
- package/build-module/custom-gradient-picker/utils.js +1 -0
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/custom-select-control/index.js +11 -2
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control/types.js.map +1 -1
- package/build-module/dashicon/index.js +1 -0
- package/build-module/dashicon/index.js.map +1 -1
- package/build-module/date-time/date/index.js +1 -0
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date/use-lilius/index.js +1 -0
- package/build-module/date-time/date/use-lilius/index.js.map +1 -1
- package/build-module/date-time/time/index.js +1 -0
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/dimension-control/index.js +1 -0
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/dimension-control/sizes.js +1 -0
- package/build-module/dimension-control/sizes.js.map +1 -1
- package/build-module/draggable/index.js +1 -0
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/draggable/index.native.js +1 -0
- package/build-module/draggable/index.native.js.map +1 -1
- package/build-module/drop-zone/index.js +19 -13
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/drop-zone/types.js.map +1 -1
- package/build-module/dropdown-menu/index.js +2 -0
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +1 -0
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/duotone-picker/color-list-picker/index.js +11 -15
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +1 -0
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/utils.js +1 -0
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-select.js +2 -0
- package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-toggle-group.js +1 -0
- package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build-module/font-size-picker/index.js +2 -0
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/index.native.js +1 -0
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/font-size-picker/utils.js +1 -0
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/form-file-upload/index.js +13 -2
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-file-upload/types.js.map +1 -1
- package/build-module/form-token-field/index.js +6 -0
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +1 -0
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/gradient-picker/index.js +3 -0
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/gradient-picker/types.js.map +1 -1
- package/build-module/guide/index.js +1 -0
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/page-control.js +1 -0
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/h-stack/hook.js +1 -0
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/higher-order/navigate-regions/index.js +1 -0
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +1 -0
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js +1 -0
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js +1 -0
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/icon/index.js +9 -0
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/keyboard-shortcuts/index.js +1 -0
- package/build-module/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/menu/checkbox-item.js +5 -9
- package/build-module/menu/checkbox-item.js.map +1 -1
- package/build-module/menu/group-label.js +4 -1
- package/build-module/menu/group-label.js.map +1 -1
- package/build-module/menu/group.js +4 -1
- package/build-module/menu/group.js.map +1 -1
- package/build-module/menu/item-help-text.js +6 -1
- package/build-module/menu/item-help-text.js.map +1 -1
- package/build-module/menu/item-label.js +6 -1
- package/build-module/menu/item-label.js.map +1 -1
- package/build-module/menu/item.js +4 -8
- package/build-module/menu/item.js.map +1 -1
- package/build-module/menu/radio-item.js +5 -9
- package/build-module/menu/radio-item.js.map +1 -1
- package/build-module/menu/separator.js +5 -2
- package/build-module/menu/separator.js.map +1 -1
- package/build-module/menu/styles.js +16 -16
- package/build-module/menu/styles.js.map +1 -1
- package/build-module/menu-items-choice/index.js +1 -0
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/picker-cell.native.js +1 -0
- package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -0
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +1 -0
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +1 -0
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js +1 -0
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/mobile/picker/index.android.js +1 -0
- package/build-module/mobile/picker/index.android.js.map +1 -1
- package/build-module/mobile/picker/index.ios.js +1 -0
- package/build-module/mobile/picker/index.ios.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +1 -0
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/mobile/utils/get-px-from-css-unit.native.js +1 -0
- package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build-module/modal/aria-helper.js +0 -1
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +0 -1
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigable-container/container.js +1 -0
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigation/group/index.js +1 -0
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +1 -0
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/search-no-results-found.js +1 -0
- package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +12 -12
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/navigator/navigator/component.js +1 -0
- package/build-module/navigator/navigator/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +1 -0
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/utils/router.js +1 -0
- package/build-module/navigator/utils/router.js.map +1 -1
- package/build-module/notice/index.js +1 -0
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/list.js +1 -0
- package/build-module/notice/list.js.map +1 -1
- package/build-module/notice/list.native.js +1 -0
- package/build-module/notice/list.native.js.map +1 -1
- package/build-module/number-control/index.js +8 -0
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/number-control/types.js.map +1 -1
- package/build-module/palette-edit/index.js +1 -0
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/panel/actions.native.js +1 -0
- package/build-module/panel/actions.native.js.map +1 -1
- package/build-module/query-controls/index.js +1 -0
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/terms.js +1 -0
- package/build-module/query-controls/terms.js.map +1 -1
- package/build-module/radio-control/index.js +1 -0
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-control/index.native.js +1 -0
- package/build-module/radio-control/index.native.js.map +1 -1
- package/build-module/range-control/index.js +2 -1
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/mark.js +0 -1
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js +1 -0
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +33 -45
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/index.js +10 -1
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/sandbox/index.js +1 -0
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -0
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/search-control/index.native.js +1 -0
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/select-control/index.js +1 -0
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +9 -13
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -10
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +4 -10
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/provider.js +1 -0
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +1 -0
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/snackbar/index.js +1 -0
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +1 -0
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/style-provider/index.js +0 -1
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/tab-panel/index.js +1 -0
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js +1 -0
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/tab.js +0 -15
- package/build-module/tabs/tab.js.map +1 -1
- package/build-module/text/utils.js +1 -0
- package/build-module/text/utils.js.map +1 -1
- package/build-module/theme/color-algorithms.js +1 -0
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +2 -0
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js +1 -0
- package/build-module/toolbar/toolbar-group/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +2 -0
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +1 -0
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +1 -0
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tree-grid/cell.js +4 -1
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/tree-grid/index.js +1 -0
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/tree-grid/types.js.map +1 -1
- package/build-module/tree-select/index.js +1 -0
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/unit-control/index.js +11 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +1 -0
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/types.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +1 -0
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/unit-control/utils.js +1 -0
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/colors-values.js +3 -0
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/utils/config-values.js +0 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/get-valid-children.js +1 -0
- package/build-module/utils/get-valid-children.js.map +1 -1
- package/build-module/utils/hooks/use-animated-offset-rect.js +1 -0
- package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
- package/build-module/utils/hooks/use-cx.js +1 -0
- package/build-module/utils/hooks/use-cx.js.map +1 -1
- package/build-module/utils/math.js +1 -0
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/rtl.js +1 -0
- package/build-module/utils/rtl.js.map +1 -1
- package/build-module/utils/values.js +1 -0
- package/build-module/utils/values.js.map +1 -1
- package/build-module/z-stack/component.js +1 -0
- package/build-module/z-stack/component.js.map +1 -1
- package/build-style/style-rtl.css +15 -11
- package/build-style/style.css +15 -11
- package/build-types/alignment-matrix-control/styles.d.ts.map +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
- package/build-types/animation/index.d.ts +1 -1
- package/build-types/animation/index.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +4 -4
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +83 -83
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +93 -93
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +83 -83
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +83 -83
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +83 -83
- package/build-types/border-control/border-control-dropdown/hook.d.ts +83 -83
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts +14 -13
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/input-control.d.ts +3 -0
- package/build-types/box-control/input-control.d.ts.map +1 -0
- package/build-types/box-control/stories/index.story.d.ts +852 -816
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +3 -2
- package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
- package/build-types/box-control/types.d.ts +25 -3
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/box-control/utils.d.ts +23 -15
- package/build-types/box-control/utils.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +18 -0
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button/types.d.ts +6 -4
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +83 -83
- package/build-types/card/card-body/hook.d.ts +83 -83
- package/build-types/card/card-divider/hook.d.ts +84 -84
- package/build-types/card/card-footer/hook.d.ts +83 -83
- package/build-types/card/card-header/hook.d.ts +83 -83
- package/build-types/card/card-media/hook.d.ts +83 -83
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +3 -2
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/index.d.ts.map +1 -1
- package/build-types/composite/item.d.ts.map +1 -1
- package/build-types/context/constants.d.ts.map +1 -1
- package/build-types/context/get-styled-class-name-from-key.d.ts +1 -9
- package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts +1 -1
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/types.d.ts +6 -0
- package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
- 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/types.d.ts +7 -0
- package/build-types/custom-select-control/types.d.ts.map +1 -1
- 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.map +1 -1
- package/build-types/date-time/date/styles.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/styles.d.ts +8 -4
- package/build-types/date-time/time/styles.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/index.d.ts +1 -1
- package/build-types/drop-zone/index.d.ts.map +1 -1
- package/build-types/drop-zone/types.d.ts +5 -0
- package/build-types/drop-zone/types.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +83 -83
- package/build-types/flex/flex/hook.d.ts +83 -83
- package/build-types/flex/flex-block/hook.d.ts +83 -83
- package/build-types/flex/flex-item/hook.d.ts +83 -83
- 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 +2 -1
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts +2 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/types.d.ts +10 -8
- package/build-types/form-file-upload/types.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/gradient-picker/index.d.ts +1 -1
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/types.d.ts +6 -0
- package/build-types/gradient-picker/types.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +83 -83
- package/build-types/h-stack/hook.d.ts +83 -83
- package/build-types/heading/hook.d.ts +82 -82
- package/build-types/higher-order/with-fallback-styles/index.d.ts +2 -2
- package/build-types/higher-order/with-filters/index.d.ts +4 -4
- package/build-types/icon/index.d.ts +23 -7
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +7 -1
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/index.d.ts +1 -1
- package/build-types/index.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +83 -83
- package/build-types/item-group/item-group/hook.d.ts +83 -83
- package/build-types/lock-unlock.d.ts +2 -2
- package/build-types/menu/checkbox-item.d.ts.map +1 -1
- package/build-types/menu/group-label.d.ts.map +1 -1
- package/build-types/menu/group.d.ts.map +1 -1
- package/build-types/menu/index.d.ts.map +1 -1
- package/build-types/menu/item-help-text.d.ts.map +1 -1
- package/build-types/menu/item-label.d.ts.map +1 -1
- package/build-types/menu/item.d.ts.map +1 -1
- package/build-types/menu/radio-item.d.ts.map +1 -1
- package/build-types/menu/separator.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +92 -92
- package/build-types/navigator/navigator-button/hook.d.ts +92 -92
- package/build-types/number-control/index.d.ts +2 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -1
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/types.d.ts +7 -0
- package/build-types/number-control/types.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/mark.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +4 -3
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +83 -83
- package/build-types/scrollable/stories/index.story.d.ts.map +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.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
- package/build-types/slot-fill/types.d.ts +4 -3
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +83 -83
- package/build-types/spinner/styles.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +83 -83
- package/build-types/tabs/tab.d.ts +3 -0
- package/build-types/tabs/tab.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +83 -83
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts +2 -0
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +83 -83
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +83 -83
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +83 -83
- package/build-types/tree-grid/cell.d.ts.map +1 -1
- package/build-types/tree-grid/types.d.ts +1 -1
- package/build-types/tree-grid/types.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +83 -83
- package/build-types/unit-control/index.d.ts +3 -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 +2 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +7 -0
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/colors-values.d.ts +3 -0
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +0 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
- package/build-types/utils/rtl.d.ts +1 -1
- package/build-types/utils/rtl.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +83 -83
- package/build-types/z-stack/styles.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/alignment-matrix-control/stories/index.story.tsx +2 -2
- package/src/angle-picker-control/index.tsx +1 -1
- package/src/angle-picker-control/stories/index.story.tsx +2 -2
- package/src/animation/index.tsx +0 -1
- package/src/base-control/stories/index.story.tsx +1 -1
- package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -1
- package/src/border-box-control/stories/index.story.tsx +1 -1
- package/src/border-control/border-control/component.tsx +2 -0
- package/src/border-control/stories/index.story.tsx +1 -1
- package/src/box-control/README.md +80 -60
- package/src/box-control/docs-manifest.json +5 -0
- package/src/box-control/index.tsx +47 -29
- package/src/box-control/input-control.tsx +197 -0
- package/src/box-control/stories/index.story.tsx +2 -1
- package/src/box-control/test/index.tsx +33 -26
- package/src/box-control/types.ts +80 -55
- package/src/box-control/utils.ts +62 -60
- package/src/button/README.md +108 -219
- package/src/button/docs-manifest.json +5 -0
- package/src/button/stories/best-practices.mdx +31 -0
- package/src/button/stories/index.story.tsx +18 -0
- package/src/button/types.ts +6 -4
- package/src/button-group/stories/index.story.tsx +1 -1
- package/src/card/stories/index.story.tsx +2 -2
- package/src/checkbox-control/stories/index.story.tsx +1 -1
- package/src/circular-option-picker/circular-option-picker-actions.tsx +1 -0
- package/src/circular-option-picker/circular-option-picker-option.tsx +1 -0
- package/src/circular-option-picker/stories/index.story.tsx +2 -2
- package/src/circular-option-picker/style.scss +2 -2
- package/src/clipboard-button/index.tsx +5 -3
- package/src/color-palette/stories/index.story.tsx +3 -3
- package/src/color-picker/input-with-slider.tsx +1 -1
- package/src/color-picker/stories/index.story.tsx +2 -2
- package/src/combobox-control/stories/index.story.tsx +1 -1
- package/src/composite/item.tsx +1 -19
- package/src/composite/stories/index.story.tsx +3 -3
- package/src/confirm-dialog/stories/index.story.tsx +1 -1
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +2 -0
- package/src/custom-gradient-picker/index.tsx +2 -0
- package/src/custom-gradient-picker/style.scss +1 -1
- package/src/custom-gradient-picker/types.ts +6 -0
- package/src/custom-select-control/README.md +2 -0
- package/src/custom-select-control/index.tsx +11 -2
- package/src/custom-select-control/stories/index.story.tsx +3 -2
- package/src/custom-select-control/test/index.tsx +13 -9
- package/src/custom-select-control/types.ts +7 -0
- package/src/custom-select-control-v2/stories/index.story.tsx +2 -2
- package/src/date-time/stories/date-time.story.tsx +4 -1
- package/src/date-time/stories/date.story.tsx +4 -1
- package/src/date-time/stories/time.story.tsx +4 -1
- package/src/dimension-control/stories/index.story.tsx +1 -1
- package/src/disabled/stories/index.story.tsx +3 -3
- package/src/divider/stories/index.story.tsx +1 -1
- package/src/draggable/stories/index.story.tsx +2 -2
- package/src/drop-zone/index.tsx +21 -24
- package/src/drop-zone/types.ts +5 -0
- package/src/dropdown/stories/index.story.tsx +7 -7
- package/src/dropdown-menu/index.tsx +4 -1
- package/src/dropdown-menu/stories/index.story.tsx +3 -3
- package/src/dropdown-menu/style.scss +1 -1
- package/src/duotone-picker/color-list-picker/index.tsx +8 -8
- package/src/duotone-picker/color-list-picker/style.scss +0 -6
- package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
- package/src/flex/stories/index.story.tsx +1 -1
- package/src/font-size-picker/font-size-picker-select.tsx +1 -0
- package/src/font-size-picker/index.tsx +1 -0
- package/src/font-size-picker/stories/index.story.tsx +1 -1
- package/src/form-file-upload/README.md +58 -48
- package/src/form-file-upload/docs-manifest.json +5 -0
- package/src/form-file-upload/index.tsx +12 -1
- package/src/form-file-upload/stories/index.story.tsx +4 -3
- package/src/form-file-upload/test/index.tsx +5 -1
- package/src/form-file-upload/types.ts +10 -8
- package/src/form-token-field/README.md +1 -0
- package/src/form-token-field/index.tsx +7 -0
- package/src/form-token-field/stories/index.story.tsx +4 -2
- package/src/form-token-field/test/index.tsx +5 -1
- package/src/gradient-picker/README.md +8 -0
- package/src/gradient-picker/index.tsx +2 -0
- package/src/gradient-picker/stories/index.story.tsx +1 -1
- package/src/gradient-picker/types.ts +6 -0
- package/src/grid/stories/index.story.tsx +1 -1
- package/src/h-stack/stories/index.story.tsx +2 -2
- package/src/icon/README.md +22 -65
- package/src/icon/docs-manifest.json +5 -0
- package/src/icon/index.tsx +28 -13
- package/src/icon/stories/index.story.tsx +50 -8
- package/src/index.ts +1 -5
- package/src/input-control/stories/index.story.tsx +4 -4
- package/src/item-group/stories/index.story.tsx +2 -2
- package/src/menu/checkbox-item.tsx +9 -7
- package/src/menu/group-label.tsx +8 -1
- package/src/menu/group.tsx +8 -1
- package/src/menu/item-help-text.tsx +10 -1
- package/src/menu/item-label.tsx +10 -1
- package/src/menu/item.tsx +8 -6
- package/src/menu/radio-item.tsx +9 -7
- package/src/menu/separator.tsx +9 -2
- package/src/menu/stories/index.story.tsx +2 -2
- package/src/menu/styles.ts +1 -1
- 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/menu-items-choice/style.scss +1 -0
- package/src/modal/stories/index.story.tsx +2 -2
- package/src/modal/test/index.tsx +2 -1
- package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
- package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
- package/src/navigation/stories/index.story.tsx +4 -4
- package/src/navigation/styles/navigation-styles.tsx +3 -2
- package/src/navigator/stories/index.story.tsx +3 -3
- package/src/number-control/README.md +2 -1
- package/src/number-control/index.tsx +9 -0
- package/src/number-control/stories/index.story.tsx +2 -1
- package/src/number-control/test/index.tsx +5 -1
- package/src/number-control/types.ts +7 -0
- package/src/panel/stories/index.story.tsx +1 -1
- package/src/placeholder/stories/index.story.tsx +3 -3
- package/src/popover/stories/index.story.tsx +11 -9
- package/src/query-controls/stories/index.story.tsx +6 -6
- package/src/radio-control/stories/index.story.tsx +1 -1
- package/src/radio-group/stories/index.story.tsx +3 -3
- package/src/range-control/index.tsx +1 -0
- package/src/range-control/mark.tsx +0 -1
- package/src/range-control/stories/index.story.tsx +7 -7
- package/src/range-control/styles/range-control-styles.ts +18 -19
- package/src/resizable-box/index.tsx +10 -0
- package/src/resizable-box/stories/index.story.tsx +1 -1
- package/src/resizable-box/style.scss +8 -0
- package/src/responsive-wrapper/stories/index.story.tsx +1 -1
- package/src/sandbox/stories/index.story.tsx +1 -1
- package/src/scrollable/stories/index.story.tsx +2 -1
- package/src/search-control/stories/index.story.tsx +1 -1
- package/src/select-control/stories/index.story.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/fill.tsx +7 -11
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -13
- package/src/slot-fill/bubbles-virtually/slot.tsx +4 -7
- package/src/slot-fill/stories/index.story.tsx +2 -2
- package/src/slot-fill/types.ts +4 -3
- package/src/snackbar/stories/index.story.tsx +4 -4
- package/src/snackbar/stories/list.story.tsx +2 -2
- package/src/surface/stories/index.story.tsx +1 -1
- package/src/tabs/tab.tsx +0 -18
- package/src/tabs/test/index.tsx +1492 -947
- package/src/text-control/stories/index.story.tsx +1 -1
- package/src/textarea-control/stories/index.story.tsx +1 -1
- package/src/theme/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/toggle-group-control/test/__snapshots__/index.tsx.snap +22 -22
- package/src/toggle-group-control/toggle-group-control/styles.ts +1 -1
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +6 -6
- package/src/toolbar/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar-button/index.tsx +2 -0
- package/src/tools-panel/stories/index.story.tsx +15 -3
- package/src/tools-panel/test/index.tsx +0 -17
- package/src/tools-panel/tools-panel/README.md +4 -0
- package/src/tools-panel/tools-panel/component.tsx +2 -0
- package/src/tooltip/stories/index.story.tsx +1 -1
- package/src/tree-grid/cell.tsx +5 -1
- package/src/tree-grid/stories/index.story.tsx +1 -1
- package/src/tree-grid/types.ts +1 -1
- package/src/tree-select/stories/index.story.tsx +1 -1
- package/src/unit-control/README.md +3 -3
- package/src/unit-control/index.tsx +11 -1
- package/src/unit-control/stories/index.story.tsx +5 -4
- package/src/unit-control/test/index.tsx +5 -1
- package/src/unit-control/types.ts +7 -0
- package/src/utils/colors-values.js +3 -0
- package/src/utils/config-values.js +0 -1
- package/src/view/stories/index.story.tsx +1 -1
- package/src/visually-hidden/stories/index.story.tsx +1 -1
- package/src/z-stack/stories/index.story.tsx +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/box-control/all-input-control.js +0 -90
- package/build/box-control/all-input-control.js.map +0 -1
- package/build/box-control/axial-input-controls.js +0 -124
- package/build/box-control/axial-input-controls.js.map +0 -1
- package/build/box-control/input-controls.js +0 -132
- package/build/box-control/input-controls.js.map +0 -1
- package/build/menu/use-temporary-focus-visible-fix.js +0 -27
- package/build/menu/use-temporary-focus-visible-fix.js.map +0 -1
- package/build-module/box-control/all-input-control.js +0 -83
- package/build-module/box-control/all-input-control.js.map +0 -1
- package/build-module/box-control/axial-input-controls.js +0 -115
- package/build-module/box-control/axial-input-controls.js.map +0 -1
- package/build-module/box-control/input-controls.js +0 -123
- package/build-module/box-control/input-controls.js.map +0 -1
- package/build-module/menu/use-temporary-focus-visible-fix.js +0 -20
- package/build-module/menu/use-temporary-focus-visible-fix.js.map +0 -1
- package/build-types/box-control/all-input-control.d.ts +0 -3
- package/build-types/box-control/all-input-control.d.ts.map +0 -1
- package/build-types/box-control/axial-input-controls.d.ts +0 -3
- package/build-types/box-control/axial-input-controls.d.ts.map +0 -1
- package/build-types/box-control/input-controls.d.ts +0 -3
- package/build-types/box-control/input-controls.d.ts.map +0 -1
- package/build-types/menu/use-temporary-focus-visible-fix.d.ts +0 -8
- package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +0 -1
- package/src/box-control/all-input-control.tsx +0 -109
- package/src/box-control/axial-input-controls.tsx +0 -164
- package/src/box-control/input-controls.tsx +0 -166
- package/src/menu/use-temporary-focus-visible-fix.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 29.0.0 (2024-12-11)
|
|
6
|
+
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- Removed the unused `__unstableMotionContext` export ([#67623](https://github.com/WordPress/gutenberg/pull/67623)).
|
|
10
|
+
|
|
11
|
+
### Enhancements
|
|
12
|
+
|
|
13
|
+
- `GradientPicker`: Add `enableAlpha` prop ([#66974](https://github.com/WordPress/gutenberg/pull/66974))
|
|
14
|
+
- `CustomGradientPicker`: Add `enableAlpha` prop ([#66974](https://github.com/WordPress/gutenberg/pull/66974))
|
|
15
|
+
- `Menu`: Replace hardcoded white color with theme-ready variable ([#67649](https://github.com/WordPress/gutenberg/pull/67649)).
|
|
16
|
+
- `Navigation` (deprecated): Replace hardcoded white color with theme-ready variable ([#67649](https://github.com/WordPress/gutenberg/pull/67649)).
|
|
17
|
+
- `ToggleGroupControl`: Replace hardcoded white color with theme-ready variable ([#67649](https://github.com/WordPress/gutenberg/pull/67649)).
|
|
18
|
+
- `RangeControl`: Update the design of the range control marks ([#67611](https://github.com/WordPress/gutenberg/pull/67611))
|
|
19
|
+
- `BorderBoxControl`: Reduce gap value when unlinked ([#67049](https://github.com/WordPress/gutenberg/pull/67049)).
|
|
20
|
+
- `DropdownMenu`: Increase option height to 40px ([#67435](https://github.com/WordPress/gutenberg/pull/67435)).
|
|
21
|
+
- `MenuItem`: Increase height to 40px ([#67435](https://github.com/WordPress/gutenberg/pull/67435)).
|
|
22
|
+
- `MenuItemsChoice`: Increase option height to 40px ([#67435](https://github.com/WordPress/gutenberg/pull/67435)).
|
|
23
|
+
- `Navigation`: Fix active item hover color ([#67732](https://github.com/WordPress/gutenberg/pull/67732)).
|
|
24
|
+
|
|
25
|
+
### Deprecations
|
|
26
|
+
|
|
27
|
+
- `BoxControl`: Passive deprecate `onMouseOver`/`onMouseOut`. Pass to the `inputProps` prop instead ([#67332](https://github.com/WordPress/gutenberg/pull/67332)).
|
|
28
|
+
- `BoxControl`: Deprecate 36px default size ([#66704](https://github.com/WordPress/gutenberg/pull/66704)).
|
|
29
|
+
- `CustomSelectControl`: Deprecate 36px default size ([#67441](https://github.com/WordPress/gutenberg/pull/67441)).
|
|
30
|
+
- `NumberControl`: Deprecate 36px default size ([#66730](https://github.com/WordPress/gutenberg/pull/66730)).
|
|
31
|
+
- `UnitControl`: Deprecate 36px default size ([#66791](https://github.com/WordPress/gutenberg/pull/66791)).
|
|
32
|
+
- `FormFileUpload`: Deprecate 36px default size ([#67438](https://github.com/WordPress/gutenberg/pull/67438)).
|
|
33
|
+
- `FormTokenField`: Deprecate 36px default size ([#67454](https://github.com/WordPress/gutenberg/pull/67454)).
|
|
34
|
+
|
|
35
|
+
### Experimental
|
|
36
|
+
|
|
37
|
+
- `Menu`: throw when subcomponents are not rendered inside top level `Menu` ([#67411](https://github.com/WordPress/gutenberg/pull/67411)).
|
|
38
|
+
|
|
39
|
+
### Internal
|
|
40
|
+
|
|
41
|
+
- Upgraded `@ariakit/react` (v0.4.13) and `@ariakit/test` (v0.4.5) ([#65907](https://github.com/WordPress/gutenberg/pull/65907)).
|
|
42
|
+
- Upgraded `@ariakit/react` (v0.4.15) and `@ariakit/test` (v0.4.7) ([#67404](https://github.com/WordPress/gutenberg/pull/67404)).
|
|
43
|
+
- `ToolbarButton`: Set size to "compact" ([#67440](https://github.com/WordPress/gutenberg/pull/67440)).
|
|
44
|
+
- `SlotFill`: remove manual rerenders from the portal `Fill` component ([#67471](https://github.com/WordPress/gutenberg/pull/67471)).
|
|
45
|
+
- `BoxControl`: Refactor internals to unify the different combinations of sides ([#67626](https://github.com/WordPress/gutenberg/pull/67626)).
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
- `ResizableBox`: Make drag handles focusable ([#67305](https://github.com/WordPress/gutenberg/pull/67305)).
|
|
50
|
+
- `CustomSelectControl`: Update correctly when `showSelectedHint` is enabled ([#67733](https://github.com/WordPress/gutenberg/pull/67733)).
|
|
51
|
+
|
|
52
|
+
## 28.13.0 (2024-11-27)
|
|
6
53
|
|
|
7
54
|
### Deprecations
|
|
8
55
|
|
|
@@ -11,7 +58,7 @@
|
|
|
11
58
|
- `FontSizePicker`: Deprecate 36px default size ([#66920](https://github.com/WordPress/gutenberg/pull/66920)).
|
|
12
59
|
- `ComboboxControl`: Deprecate 36px default size ([#66900](https://github.com/WordPress/gutenberg/pull/66900)).
|
|
13
60
|
- `ToggleGroupControl`: Deprecate 36px default size ([#66747](https://github.com/WordPress/gutenberg/pull/66747)).
|
|
14
|
-
- `RangeControl`: Deprecate 36px default size ([#66721](https://github.com/WordPress/gutenberg/pull/66721)).
|
|
61
|
+
- `RangeControl`: Deprecate 36px default size ([#66721](https://github.com/WordPress/gutenberg/pull/66721)).
|
|
15
62
|
|
|
16
63
|
### Bug Fixes
|
|
17
64
|
|
|
@@ -32,6 +79,9 @@
|
|
|
32
79
|
- `ColorPicker`: Update sizes of color format select and copy button ([#67093](https://github.com/WordPress/gutenberg/pull/67093)).
|
|
33
80
|
- `ComboboxControl`: Update reset button size ([#67215](https://github.com/WordPress/gutenberg/pull/67215)).
|
|
34
81
|
- `Autocomplete`: Increase option height ([#67214](https://github.com/WordPress/gutenberg/pull/67214)).
|
|
82
|
+
- `DropZone`: Add `isEligible` prop to allow customizing whether the drop zone should activate ([#67317](https://github.com/WordPress/gutenberg/pull/67317)).
|
|
83
|
+
- `CircularOptionPicker`: Update `Button` sizes to be ready for 40px default size ([#67285](https://github.com/WordPress/gutenberg/pull/67285)).
|
|
84
|
+
- `DuotonePicker`: Simplify Button styles ([#66641](https://github.com/WordPress/gutenberg/pull/66641)).
|
|
35
85
|
|
|
36
86
|
### Experimental
|
|
37
87
|
|
|
@@ -44,6 +94,7 @@
|
|
|
44
94
|
- `SlotFill`: rewrite the `Slot` component from class component to functional ([#67153](https://github.com/WordPress/gutenberg/pull/67153)).
|
|
45
95
|
- `Menu.ItemHelpText`: Fix text wrapping to prevent unintended word breaks ([#67011](https://github.com/WordPress/gutenberg/pull/67011)).
|
|
46
96
|
- `BorderBoxControl`: Suppress redundant warnings for deprecated 36px size ([#67213](https://github.com/WordPress/gutenberg/pull/67213)).
|
|
97
|
+
- `CustomGradientPicker`: Prepare `Button`s for 40px default size ([#67286](https://github.com/WordPress/gutenberg/pull/67286)).
|
|
47
98
|
|
|
48
99
|
## 28.12.0 (2024-11-16)
|
|
49
100
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Thank you for taking the time to contribute.
|
|
4
4
|
|
|
5
|
-
The following is a set of guidelines for contributing to the `@wordpress/components` package to be considered in addition to the general ones described in our [Contributing Policy](/CONTRIBUTING.md).
|
|
5
|
+
The following is a set of guidelines for contributing to the `@wordpress/components` package to be considered in addition to the general ones described in our [Contributing Policy](https://github.com/WordPress/gutenberg/blob/HEAD/CONTRIBUTING.md).
|
|
6
6
|
|
|
7
7
|
This set of guidelines should apply especially to newly introduced components. In fact, while these guidelines should also be retroactively applied to existing components, it is sometimes impossible to do so for legacy/compatibility reasons.
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ To determine if a component should be added, ask yourself:
|
|
|
36
36
|
|
|
37
37
|
Here’s a flowchart that can help determine if a new component is necessary:
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+

|
|
40
40
|
|
|
41
41
|
### First steps
|
|
42
42
|
|
|
@@ -95,12 +95,12 @@ In these situations, one possible approach is to "soft-deprecate" a given legacy
|
|
|
95
95
|
2. Updating all places in Gutenberg that use that API.
|
|
96
96
|
3. Adding deprecation warnings (only after the previous point is completed, otherwise the Browser Console will be polluted by all those warnings and some e2e tests may fail).
|
|
97
97
|
|
|
98
|
-
When adding new components or new props to existing components, it's recommended to create a [private version](/packages/private-apis/
|
|
98
|
+
When adding new components or new props to existing components, it's recommended to create a [private version](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-private-apis/) of the component until the changes are stable enough to be exposed as part of the public API.
|
|
99
99
|
|
|
100
100
|
### Learn more
|
|
101
101
|
|
|
102
|
-
- [How to preserve backward compatibility for a React Component](/
|
|
103
|
-
- [Experimental and Unstable APIs](/
|
|
102
|
+
- [How to preserve backward compatibility for a React Component](https://developer.wordpress.org/block-editor/contributors/code/backward-compatibility/#how-to-preserve-backward-compatibility-for-a-react-component)
|
|
103
|
+
- [Experimental and Unstable APIs](https://developer.wordpress.org/block-editor/contributors/code/coding-guidelines/#legacy-experimental-apis-plugin-only-apis-and-private-apis)
|
|
104
104
|
- [Deprecating styles](#deprecating-styles)
|
|
105
105
|
|
|
106
106
|
<!-- ## Polymorphic Components (i.e. the `as` prop)
|
|
@@ -216,8 +216,8 @@ function Example(
|
|
|
216
216
|
|
|
217
217
|
A couple of good examples of how hooks are used for composition are:
|
|
218
218
|
|
|
219
|
-
- the `Card` component, which builds on top of the `Surface` component by [calling the `useSurface` hook inside its own hook](/packages/components/src/card/card/hook.ts);
|
|
220
|
-
- the `HStack` component, which builds on top of the `Flex` component and [calls the `useFlex` hook inside its own hook](/packages/components/src/h-stack/hook.tsx).
|
|
219
|
+
- the `Card` component, which builds on top of the `Surface` component by [calling the `useSurface` hook inside its own hook](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/card/card/hook.ts);
|
|
220
|
+
- the `HStack` component, which builds on top of the `Flex` component and [calls the `useFlex` hook inside its own hook](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/h-stack/hook.tsx).
|
|
221
221
|
|
|
222
222
|
<!-- ## API Consinstency
|
|
223
223
|
|
|
@@ -418,7 +418,7 @@ On the component's main named export, add a JSDoc comment that includes the main
|
|
|
418
418
|
|
|
419
419
|
All new component should be styled using [Emotion](https://emotion.sh/docs/introduction).
|
|
420
420
|
|
|
421
|
-
Note: Instead of using Emotion's standard `cx` function, the custom [`useCx` hook](/packages/components/src/utils/hooks/use-cx.ts) should be used instead.
|
|
421
|
+
Note: Instead of using Emotion's standard `cx` function, the custom [`useCx` hook](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/utils/hooks/use-cx.ts) should be used instead.
|
|
422
422
|
|
|
423
423
|
### Deprecating styles
|
|
424
424
|
|
|
@@ -462,7 +462,7 @@ export const Wrapper = styled.div`
|
|
|
462
462
|
|
|
463
463
|
Once deprecated, code examples in docs/stories should include the opt-in prop set to `true` so that new consumers are encouraged to adopt it from the start.
|
|
464
464
|
|
|
465
|
-
Remember to [add a **Needs Dev Note** label](/
|
|
465
|
+
Remember to [add a **Needs Dev Note** label](https://developer.wordpress.org/block-editor/contributors/code/backward-compatibility/#dev-notes) to the pull request so third-party developers can be informed of the deprecation.
|
|
466
466
|
|
|
467
467
|
When the grace period is over and the deprecation version arrives, the `__next*` prop, deprecation notice, and deprecated styles should all be completely removed from the codebase.
|
|
468
468
|
|
|
@@ -491,7 +491,7 @@ Components can use this system via a couple of functions:
|
|
|
491
491
|
- they can connect to the Context via `contextConnect`
|
|
492
492
|
- they can read the "computed" values from the context via `useContextSystem`
|
|
493
493
|
|
|
494
|
-
An example of how this is used can be found in the [`Card` component family](/packages/components/src/card). For example, this is how the `Card` component injects the `size` and `isBorderless` props down to its `CardBody` subcomponent — which makes it use the correct spacing and border settings "auto-magically".
|
|
494
|
+
An example of how this is used can be found in the [`Card` component family](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/card). For example, this is how the `Card` component injects the `size` and `isBorderless` props down to its `CardBody` subcomponent — which makes it use the correct spacing and border settings "auto-magically".
|
|
495
495
|
|
|
496
496
|
```jsx
|
|
497
497
|
//=========================================================================
|
|
@@ -564,7 +564,7 @@ export function useCardBody( props ) {
|
|
|
564
564
|
|
|
565
565
|
## Unit tests
|
|
566
566
|
|
|
567
|
-
Please refer to the [JavaScript Testing Overview docs](/
|
|
567
|
+
Please refer to the [JavaScript Testing Overview docs](https://developer.wordpress.org/block-editor/contributors/code/testing-overview/#snapshot-testing).
|
|
568
568
|
|
|
569
569
|
## Storybook
|
|
570
570
|
|
|
@@ -596,13 +596,13 @@ Primary.args = {
|
|
|
596
596
|
|
|
597
597
|
A great tool to use when writing stories is the [Storybook Controls addon](https://storybook.js.org/addons/@storybook/addon-controls). Ideally props should be exposed by using this addon, which provides a graphical UI to interact dynamically with the component without needing to write code. Historically, we used [Knobs](https://storybook.js.org/addons/@storybook/addon-knobs), but it was deprecated and later removed in [#47152](https://github.com/WordPress/gutenberg/pull/47152).
|
|
598
598
|
|
|
599
|
-
The default value of each control should coincide with the default value of the props (i.e. it should be `undefined` if a prop is not required). A story should, therefore, also explicitly show how values from the Context System are applied to (sub)components. A good example of how this may look like is the [`Card` story](https://wordpress.github.io/gutenberg/?path=/story/components-card--default) (code [here](/packages/components/src/card/stories/index.tsx)).
|
|
599
|
+
The default value of each control should coincide with the default value of the props (i.e. it should be `undefined` if a prop is not required). A story should, therefore, also explicitly show how values from the Context System are applied to (sub)components. A good example of how this may look like is the [`Card` story](https://wordpress.github.io/gutenberg/?path=/story/components-card--default) (code [here](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/card/stories/index.story.tsx)).
|
|
600
600
|
|
|
601
601
|
Storybook can be started on a local machine by running `npm run storybook:dev`. Alternatively, the components' catalogue (up to date with the latest code on `trunk`) can be found at [wordpress.github.io/gutenberg/](https://wordpress.github.io/gutenberg/).
|
|
602
602
|
|
|
603
603
|
## Documentation
|
|
604
604
|
|
|
605
|
-
All components, in addition to being typed, should be using JSDoc when necessary — as explained in the [Coding Guidelines](/
|
|
605
|
+
All components, in addition to being typed, should be using JSDoc when necessary — as explained in the [Coding Guidelines](https://developer.wordpress.org/block-editor/contributors/code/coding-guidelines/#javascript-documentation-using-jsdoc).
|
|
606
606
|
|
|
607
607
|
Each component that is exported from the `@wordpress/components` package should include a `README.md` file, explaining how to use the component, showing examples, and documenting all the props.
|
|
608
608
|
|
|
@@ -625,7 +625,7 @@ Description of the component.
|
|
|
625
625
|
|
|
626
626
|
## Usage
|
|
627
627
|
|
|
628
|
-
Code example using correct markdown syntax and formatted using project's formatting rules. See [ItemGroup](/packages/components/src/item-group/item-group/README.md
|
|
628
|
+
Code example using correct markdown syntax and formatted using project's formatting rules. See [ItemGroup](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/item-group/item-group/README.md) for a real-world example.
|
|
629
629
|
|
|
630
630
|
```jsx
|
|
631
631
|
import { ExampleComponent } from '@wordpress/components';
|
|
@@ -653,13 +653,13 @@ Prop description. With a new line before and after the description and before an
|
|
|
653
653
|
|
|
654
654
|
### Inherited props
|
|
655
655
|
|
|
656
|
-
Add this section when there are props that are drilled down into an internal component. See [ClipboardButton](/packages/components/src/clipboard-button/README.md) for an example.
|
|
656
|
+
Add this section when there are props that are drilled down into an internal component. See [ClipboardButton](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/clipboard-button/README.md) for an example.
|
|
657
657
|
|
|
658
658
|
<!-- Only add the next section if the component relies on the [Context System](#context-system) -->
|
|
659
659
|
|
|
660
660
|
## Context
|
|
661
661
|
|
|
662
|
-
See examples for this section for the [ItemGroup](/packages/components/src/item-group/item-group/README.md#context) and [`Card`](/packages/components/src/card/card
|
|
662
|
+
See examples for this section for the [ItemGroup](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/item-group/item-group/README.md#context) and [`Card`](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/card/card#context) components.
|
|
663
663
|
````
|
|
664
664
|
|
|
665
665
|
## Folder structure
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_primitives","_utils","_jsxRuntime","BASE_SIZE","GRID_CELL_SIZE","GRID_PADDING","DOT_SIZE","DOT_SIZE_SELECTED","AlignmentMatrixControlIcon","className","disablePointerEvents","size","width","height","style","value","props","_ref","_ref2","jsx","SVG","xmlns","viewBox","role","clsx","pointerEvents","undefined","children","ALIGNMENTS","map","align","index","dotSize","getAlignmentIndex","Rect","x","y","Math","floor","fill","_default","exports","default"],"sources":["@wordpress/components/src/alignment-matrix-control/icon.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Rect, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENTS, getAlignmentIndex } from './utils';\nimport type { AlignmentMatrixControlIconProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst BASE_SIZE = 24;\nconst GRID_CELL_SIZE = 7;\nconst GRID_PADDING = ( BASE_SIZE - 3 * GRID_CELL_SIZE ) / 2;\nconst DOT_SIZE = 2;\nconst DOT_SIZE_SELECTED = 4;\n\nfunction AlignmentMatrixControlIcon( {\n\tclassName,\n\tdisablePointerEvents = true,\n\tsize,\n\twidth,\n\theight,\n\tstyle = {},\n\tvalue = 'center',\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlIconProps, 'svg', false > ) {\n\treturn (\n\t\t<SVG\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox={ `0 0 ${ BASE_SIZE } ${ BASE_SIZE }` }\n\t\t\twidth={ size ?? width ?? BASE_SIZE }\n\t\t\theight={ size ?? height ?? BASE_SIZE }\n\t\t\trole=\"presentation\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'component-alignment-matrix-control-icon',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tstyle={ {\n\t\t\t\tpointerEvents: disablePointerEvents ? 'none' : undefined,\n\t\t\t\t...style,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ALIGNMENTS.map( ( align, index ) => {\n\t\t\t\tconst dotSize =\n\t\t\t\t\tgetAlignmentIndex( value ) === index\n\t\t\t\t\t\t? DOT_SIZE_SELECTED\n\t\t\t\t\t\t: DOT_SIZE;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Rect\n\t\t\t\t\t\tkey={ align }\n\t\t\t\t\t\tx={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\t( index % 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\tMath.floor( index / 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidth={ dotSize }\n\t\t\t\t\t\theight={ dotSize }\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</SVG>\n\t);\n}\n\nexport default AlignmentMatrixControlIcon;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_primitives","_utils","_jsxRuntime","BASE_SIZE","GRID_CELL_SIZE","GRID_PADDING","DOT_SIZE","DOT_SIZE_SELECTED","AlignmentMatrixControlIcon","className","disablePointerEvents","size","width","height","style","value","props","_ref","_ref2","jsx","SVG","xmlns","viewBox","role","clsx","pointerEvents","undefined","children","ALIGNMENTS","map","align","index","dotSize","getAlignmentIndex","Rect","x","y","Math","floor","fill","_default","exports","default"],"sources":["@wordpress/components/src/alignment-matrix-control/icon.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Rect, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENTS, getAlignmentIndex } from './utils';\nimport type { AlignmentMatrixControlIconProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst BASE_SIZE = 24;\nconst GRID_CELL_SIZE = 7;\nconst GRID_PADDING = ( BASE_SIZE - 3 * GRID_CELL_SIZE ) / 2;\nconst DOT_SIZE = 2;\nconst DOT_SIZE_SELECTED = 4;\n\nfunction AlignmentMatrixControlIcon( {\n\tclassName,\n\tdisablePointerEvents = true,\n\tsize,\n\twidth,\n\theight,\n\tstyle = {},\n\tvalue = 'center',\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlIconProps, 'svg', false > ) {\n\treturn (\n\t\t<SVG\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox={ `0 0 ${ BASE_SIZE } ${ BASE_SIZE }` }\n\t\t\twidth={ size ?? width ?? BASE_SIZE }\n\t\t\theight={ size ?? height ?? BASE_SIZE }\n\t\t\trole=\"presentation\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'component-alignment-matrix-control-icon',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tstyle={ {\n\t\t\t\tpointerEvents: disablePointerEvents ? 'none' : undefined,\n\t\t\t\t...style,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ALIGNMENTS.map( ( align, index ) => {\n\t\t\t\tconst dotSize =\n\t\t\t\t\tgetAlignmentIndex( value ) === index\n\t\t\t\t\t\t? DOT_SIZE_SELECTED\n\t\t\t\t\t\t: DOT_SIZE;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Rect\n\t\t\t\t\t\tkey={ align }\n\t\t\t\t\t\tx={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\t( index % 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\tMath.floor( index / 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidth={ dotSize }\n\t\t\t\t\t\theight={ dotSize }\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</SVG>\n\t);\n}\n\nexport default AlignmentMatrixControlIcon;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAAwD,IAAAG,WAAA,GAAAH,OAAA;AAbxD;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAKA,MAAMI,SAAS,GAAG,EAAE;AACpB,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,YAAY,GAAG,CAAEF,SAAS,GAAG,CAAC,GAAGC,cAAc,IAAK,CAAC;AAC3D,MAAME,QAAQ,GAAG,CAAC;AAClB,MAAMC,iBAAiB,GAAG,CAAC;AAE3B,SAASC,0BAA0BA,CAAE;EACpCC,SAAS;EACTC,oBAAoB,GAAG,IAAI;EAC3BC,IAAI;EACJC,KAAK;EACLC,MAAM;EACNC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK,GAAG,QAAQ;EAChB,GAAGC;AACsE,CAAC,EAAG;EAAA,IAAAC,IAAA,EAAAC,KAAA;EAC7E,oBACC,IAAAhB,WAAA,CAAAiB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OAAA,CAAAC,OAAA,GAEclC,0BAA0B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_compose","_element","_cell","_composite","_styles","_icon","_utils","_jsxRuntime","UnforwardedAlignmentMatrixControl","className","id","label","__","defaultValue","value","onChange","width","props","baseId","useInstanceId","setActiveId","useCallback","nextActiveId","nextValue","getItemValue","classes","clsx","jsx","Composite","defaultActiveId","getItemId","activeId","rtl","isRTL","render","GridContainer","role","size","children","GRID","map","cells","index","Row","GridRow","cell","default","AlignmentMatrixControl","exports","Object","assign","Icon","AlignmentMatrixControlIcon","displayName","_default"],"sources":["@wordpress/components/src/alignment-matrix-control/index.tsx"],"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 { GridContainer, GridRow } from './styles';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId, getItemValue } from './utils';\nimport type { WordPressComponentProps } from '../context';\nimport type { AlignmentMatrixControlProps } from './types';\n\nfunction UnforwardedAlignmentMatrixControl( {\n\tclassName,\n\tid,\n\tlabel = __( 'Alignment Matrix Control' ),\n\tdefaultValue = 'center center',\n\tvalue,\n\tonChange,\n\twidth = 92,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlProps, 'div', false > ) {\n\tconst baseId = useInstanceId(\n\t\tUnforwardedAlignmentMatrixControl,\n\t\t'alignment-matrix-control',\n\t\tid\n\t);\n\n\tconst setActiveId = useCallback<\n\t\tNonNullable< React.ComponentProps< typeof Composite >[ 'setActiveId' ] >\n\t>(\n\t\t( nextActiveId ) => {\n\t\t\tconst nextValue = getItemValue( baseId, nextActiveId );\n\t\t\tif ( nextValue ) {\n\t\t\t\tonChange?.( nextValue );\n\t\t\t}\n\t\t},\n\t\t[ baseId, onChange ]\n\t);\n\n\tconst classes = clsx( 'component-alignment-matrix-control', className );\n\n\treturn (\n\t\t<Composite\n\t\t\tdefaultActiveId={ getItemId( baseId, defaultValue ) }\n\t\t\tactiveId={ getItemId( baseId, value ) }\n\t\t\tsetActiveId={ setActiveId }\n\t\t\trtl={ isRTL() }\n\t\t\trender={\n\t\t\t\t<GridContainer\n\t\t\t\t\t{ ...props }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tid={ baseId }\n\t\t\t\t\trole=\"grid\"\n\t\t\t\t\tsize={ width }\n\t\t\t\t/>\n\t\t\t}\n\t\t>\n\t\t\t{ GRID.map( ( cells, index ) => (\n\t\t\t\t<Composite.Row render={ <GridRow role=\"row\" /> } key={ index }>\n\t\t\t\t\t{ cells.map( ( cell ) => (\n\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\tid={ getItemId( baseId, cell ) }\n\t\t\t\t\t\t\tkey={ cell }\n\t\t\t\t\t\t\tvalue={ cell }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite.Row>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\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(\n\tUnforwardedAlignmentMatrixControl,\n\t{\n\t\t/**\n\t\t * Render an alignment matrix as an icon.\n\t\t *\n\t\t * ```jsx\n\t\t * import { AlignmentMatrixControl } from '@wordpress/components';\n\t\t *\n\t\t * <Icon icon={<AlignmentMatrixControl.Icon value=\"top left\" />} />\n\t\t * ```\n\t\t */\n\t\tIcon: Object.assign( AlignmentMatrixControlIcon, {\n\t\t\tdisplayName: 'AlignmentMatrixControl.Icon',\n\t\t} ),\n\t}\n);\n\nexport default AlignmentMatrixControl;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_compose","_element","_cell","_composite","_styles","_icon","_utils","_jsxRuntime","UnforwardedAlignmentMatrixControl","className","id","label","__","defaultValue","value","onChange","width","props","baseId","useInstanceId","setActiveId","useCallback","nextActiveId","nextValue","getItemValue","classes","clsx","jsx","Composite","defaultActiveId","getItemId","activeId","rtl","isRTL","render","GridContainer","role","size","children","GRID","map","cells","index","Row","GridRow","cell","default","AlignmentMatrixControl","exports","Object","assign","Icon","AlignmentMatrixControlIcon","displayName","_default"],"sources":["@wordpress/components/src/alignment-matrix-control/index.tsx"],"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 { GridContainer, GridRow } from './styles';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId, getItemValue } from './utils';\nimport type { WordPressComponentProps } from '../context';\nimport type { AlignmentMatrixControlProps } from './types';\n\nfunction UnforwardedAlignmentMatrixControl( {\n\tclassName,\n\tid,\n\tlabel = __( 'Alignment Matrix Control' ),\n\tdefaultValue = 'center center',\n\tvalue,\n\tonChange,\n\twidth = 92,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlProps, 'div', false > ) {\n\tconst baseId = useInstanceId(\n\t\tUnforwardedAlignmentMatrixControl,\n\t\t'alignment-matrix-control',\n\t\tid\n\t);\n\n\tconst setActiveId = useCallback<\n\t\tNonNullable< React.ComponentProps< typeof Composite >[ 'setActiveId' ] >\n\t>(\n\t\t( nextActiveId ) => {\n\t\t\tconst nextValue = getItemValue( baseId, nextActiveId );\n\t\t\tif ( nextValue ) {\n\t\t\t\tonChange?.( nextValue );\n\t\t\t}\n\t\t},\n\t\t[ baseId, onChange ]\n\t);\n\n\tconst classes = clsx( 'component-alignment-matrix-control', className );\n\n\treturn (\n\t\t<Composite\n\t\t\tdefaultActiveId={ getItemId( baseId, defaultValue ) }\n\t\t\tactiveId={ getItemId( baseId, value ) }\n\t\t\tsetActiveId={ setActiveId }\n\t\t\trtl={ isRTL() }\n\t\t\trender={\n\t\t\t\t<GridContainer\n\t\t\t\t\t{ ...props }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tid={ baseId }\n\t\t\t\t\trole=\"grid\"\n\t\t\t\t\tsize={ width }\n\t\t\t\t/>\n\t\t\t}\n\t\t>\n\t\t\t{ GRID.map( ( cells, index ) => (\n\t\t\t\t<Composite.Row render={ <GridRow role=\"row\" /> } key={ index }>\n\t\t\t\t\t{ cells.map( ( cell ) => (\n\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\tid={ getItemId( baseId, cell ) }\n\t\t\t\t\t\t\tkey={ cell }\n\t\t\t\t\t\t\tvalue={ cell }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite.Row>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\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(\n\tUnforwardedAlignmentMatrixControl,\n\t{\n\t\t/**\n\t\t * Render an alignment matrix as an icon.\n\t\t *\n\t\t * ```jsx\n\t\t * import { AlignmentMatrixControl } from '@wordpress/components';\n\t\t *\n\t\t * <Icon icon={<AlignmentMatrixControl.Icon value=\"top left\" />} />\n\t\t * ```\n\t\t */\n\t\tIcon: Object.assign( AlignmentMatrixControlIcon, {\n\t\t\tdisplayName: 'AlignmentMatrixControl.Icon',\n\t\t} ),\n\t}\n);\n\nexport default AlignmentMatrixControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAwD,IAAAS,WAAA,GAAAT,OAAA;AAnBxD;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AASA,SAASU,iCAAiCA,CAAE;EAC3CC,SAAS;EACTC,EAAE;EACFC,KAAK,GAAG,IAAAC,QAAE,EAAE,0BAA2B,CAAC;EACxCC,YAAY,GAAG,eAAe;EAC9BC,KAAK;EACLC,QAAQ;EACRC,KAAK,GAAG,EAAE;EACV,GAAGC;AACkE,CAAC,EAAG;EACzE,MAAMC,MAAM,GAAG,IAAAC,sBAAa,EAC3BX,iCAAiC,EACjC,0BAA0B,EAC1BE,EACD,CAAC;EAED,MAAMU,WAAW,GAAG,IAAAC,oBAAW,EAG5BC,YAAY,IAAM;IACnB,MAAMC,SAAS,GAAG,IAAAC,mBAAY,EAAEN,MAAM,EAAEI,YAAa,CAAC;IACtD,IAAKC,SAAS,EAAG;MAChBR,QAAQ,GAAIQ,SAAU,CAAC;IACxB;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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAGE,MAAM,CAACC,MAAM,CAClD1C,iCAAiC,EACjC;EACC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE2C,IAAI,EAAEF,MAAM,CAACC,MAAM,CAAEE,aAA0B,EAAE;IAChDC,WAAW,EAAE;EACd,CAAE;AACH,CACD,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAF,OAAA,GAEaC,sBAAsB","ignoreList":[]}
|
|
@@ -53,12 +53,12 @@ function UnforwardedAnglePickerControl(props, ref) {
|
|
|
53
53
|
gap: 2,
|
|
54
54
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_flex.FlexBlock, {
|
|
55
55
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_numberControl.default, {
|
|
56
|
+
__next40pxDefaultSize: true,
|
|
56
57
|
label: label,
|
|
57
58
|
className: "components-angle-picker-control__input-field",
|
|
58
59
|
max: 360,
|
|
59
60
|
min: 0,
|
|
60
61
|
onChange: handleOnNumberChange,
|
|
61
|
-
size: "__unstable-large",
|
|
62
62
|
step: "1",
|
|
63
63
|
value: value,
|
|
64
64
|
spinControls: "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_flex","_spacer","_numberControl","_angleCircle","_anglePickerControlStyles","_jsxRuntime","UnforwardedAnglePickerControl","props","ref","className","label","__","onChange","value","restProps","handleOnNumberChange","unprocessedValue","undefined","inputValue","parseInt","classes","clsx","unitText","jsx","UnitText","children","prefixedUnitText","suffixedUnitText","isRTL","jsxs","Flex","gap","FlexBlock","default","
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_flex","_spacer","_numberControl","_angleCircle","_anglePickerControlStyles","_jsxRuntime","UnforwardedAnglePickerControl","props","ref","className","label","__","onChange","value","restProps","handleOnNumberChange","unprocessedValue","undefined","inputValue","parseInt","classes","clsx","unitText","jsx","UnitText","children","prefixedUnitText","suffixedUnitText","isRTL","jsxs","Flex","gap","FlexBlock","default","__next40pxDefaultSize","max","min","step","spinControls","prefix","suffix","Spacer","marginBottom","marginTop","AnglePickerControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/angle-picker-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Flex, FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport AngleCircle from './angle-circle';\nimport { UnitText } from './styles/angle-picker-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type { AnglePickerControlProps } from './types';\n\nfunction UnforwardedAnglePickerControl(\n\tprops: WordPressComponentProps< AnglePickerControlProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\tclassName,\n\t\tlabel = __( 'Angle' ),\n\t\tonChange,\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\tconst handleOnNumberChange = ( unprocessedValue: string | undefined ) => {\n\t\tif ( onChange === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== undefined && unprocessedValue !== ''\n\t\t\t\t? parseInt( unprocessedValue, 10 )\n\t\t\t\t: 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = clsx( 'components-angle-picker-control', className );\n\n\tconst unitText = <UnitText>°</UnitText>;\n\tconst [ prefixedUnitText, suffixedUnitText ] = isRTL()\n\t\t? [ unitText, null ]\n\t\t: [ null, unitText ];\n\n\treturn (\n\t\t<Flex { ...restProps } ref={ ref } className={ classes } gap={ 2 }>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\tprefix={ prefixedUnitText }\n\t\t\t\t\tsuffix={ suffixedUnitText }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<Spacer marginBottom=\"1\" marginTop=\"auto\">\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t</Flex>\n\t);\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * </>\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef( UnforwardedAnglePickerControl );\n\nexport default AnglePickerControl;\n"],"mappings":";;;;;;;AAIA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAAgE,IAAAQ,WAAA,GAAAR,OAAA;AAnB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D,SAAS,EAAC,8CAA8C;QACxD0B,GAAG,EAAG,GAAK;QACXC,GAAG,EAAG,CAAG;QACTxB,QAAQ,EAAGG,oBAAsB;QACjCsB,IAAI,EAAC,GAAG;QACRxB,KAAK,EAAGA,KAAO;QACfyB,YAAY,EAAC,MAAM;QACnBC,MAAM,EAAGb,gBAAkB;QAC3Bc,MAAM,EAAGb;MAAkB,CAC3B;IAAC,CACQ,CAAC,eACZ,IAAAtB,WAAA,CAAAkB,GAAA,EAACtB,OAAA,CAAAwC,MAAM;MAACC,YAAY,EAAC,GAAG;MAACC,SAAS,EAAC,MAAM;MAAAlB,QAAA,eACxC,IAAApB,WAAA,CAAAkB,GAAA,EAACpB,YAAA,CAAA8B,OAAW;QACX,eAAY,MAAM;QAClBpB,KAAK,EAAGA,KAAO;QACfD,QAAQ,EAAGA;MAAU,CACrB;IAAC,CACK,CAAC;EAAA,CACJ,CAAC;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMgC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,mBAAU,EAAExC,6BAA8B,CAAC;AAAC,IAAAyC,QAAA,GAAAF,OAAA,CAAAZ,OAAA,GAE/DW,kBAAkB","ignoreList":[]}
|
package/build/animation/index.js
CHANGED
|
@@ -15,11 +15,5 @@ Object.defineProperty(exports, "__unstableMotion", {
|
|
|
15
15
|
return _framerMotion.motion;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "__unstableMotionContext", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _framerMotion.MotionContext;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
18
|
var _framerMotion = require("framer-motion");
|
|
25
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_framerMotion","require"],"sources":["@wordpress/components/src/animation/index.tsx"],"sourcesContent":["/**\n * Framer Motion is used to create animated, interactive interfaces. The package is roughly ~30kb so\n * this should ideally be loaded once across all Gutenberg packages. To give ourselves more flexibility\n * in trying animation options, we avoid making this public API.\n *\n * @see https://www.framer.com/docs/animation/\n */\n\nexport {\n\tmotion as __unstableMotion,\n\tAnimatePresence as __unstableAnimatePresence,\n
|
|
1
|
+
{"version":3,"names":["_framerMotion","require"],"sources":["@wordpress/components/src/animation/index.tsx"],"sourcesContent":["/**\n * Framer Motion is used to create animated, interactive interfaces. The package is roughly ~30kb so\n * this should ideally be loaded once across all Gutenberg packages. To give ourselves more flexibility\n * in trying animation options, we avoid making this public API.\n *\n * @see https://www.framer.com/docs/animation/\n */\n\nexport {\n\tmotion as __unstableMotion,\n\tAnimatePresence as __unstableAnimatePresence,\n} from 'framer-motion';\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,IAAAA,aAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_richText","_compose","_a11y","_i18n","_getDefaultUseItems","_button","_popover","_visuallyHidden","_reactDom","_jsxRuntime","ListBox","items","onSelect","selectedIndex","instanceId","listBoxId","className","Component","jsx","id","role","children","map","option","index","default","key","__next40pxDefaultSize","accessibleWhenDisabled","disabled","isDisabled","clsx","variant","undefined","onClick","label","getAutoCompleterUI","autocompleter","_autocompleter$useIte","useItems","getDefaultUseItems","AutocompleterUI","filterValue","onChangeOptions","onReset","reset","contentRef","popoverAnchor","useAnchor","editableContentElement","current","needsA11yCompat","setNeedsA11yCompat","useState","popoverRef","useRef","popoverRefs","useMergeRefs","useRefEffect","node","ownerDocument","useOnClickOutside","debouncedSpeak","useDebounce","speak","announce","options","length","sprintf","_n","__","useLayoutEffect","jsxs","Fragment","focusOnMount","onClose","placement","anchor","ref","createPortal","VisuallyHidden","body","handler","useEffect","listener","event","contains","target","document","addEventListener","removeEventListener"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseRef,\n\tuseEffect,\n\tuseState,\n} 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 { createPortal } from 'react-dom';\nimport type { AutocompleterUIProps, KeyedOption, WPCompleter } from './types';\n\ntype ListBoxProps = {\n\titems: KeyedOption[];\n\tonSelect: ( option: KeyedOption ) => void;\n\tselectedIndex: number;\n\tinstanceId: number;\n\tlistBoxId: string | undefined;\n\tclassName?: string;\n\tComponent?: React.ElementType;\n};\n\nfunction ListBox( {\n\titems,\n\tonSelect,\n\tselectedIndex,\n\tinstanceId,\n\tlistBoxId,\n\tclassName,\n\tComponent = 'div',\n}: ListBoxProps ) {\n\treturn (\n\t\t<Component\n\t\t\tid={ listBoxId }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"components-autocomplete__results\"\n\t\t>\n\t\t\t{ items.map( ( option, index ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ option.key }\n\t\t\t\t\tid={ `components-autocomplete-item-${ instanceId }-${ option.key }` }\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ option.isDisabled }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-autocomplete__result',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Unused, for backwards compatibility.\n\t\t\t\t\t\t\t'is-selected': index === selectedIndex,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tvariant={ index === selectedIndex ? 'primary' : undefined }\n\t\t\t\t\tonClick={ () => onSelect( option ) }\n\t\t\t\t>\n\t\t\t\t\t{ option.label }\n\t\t\t\t</Button>\n\t\t\t) ) }\n\t\t</Component>\n\t);\n}\n\nexport function getAutoCompleterUI( autocompleter: WPCompleter ) {\n\tconst useItems =\n\t\tautocompleter.useItems ?? getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tinstanceId,\n\t\tlistBoxId,\n\t\tclassName,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tonReset,\n\t\treset,\n\t\tcontentRef,\n\t}: AutocompleterUIProps ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst popoverAnchor = useAnchor( {\n\t\t\teditableContentElement: contentRef.current,\n\t\t} );\n\n\t\tconst [ needsA11yCompat, setNeedsA11yCompat ] = useState( false );\n\t\tconst popoverRef = useRef< HTMLElement >( null );\n\t\tconst popoverRefs = useMergeRefs( [\n\t\t\tpopoverRef,\n\t\t\tuseRefEffect(\n\t\t\t\t( node ) => {\n\t\t\t\t\tif ( ! contentRef.current ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the popover is rendered in a different document than\n\t\t\t\t\t// the content, we need to duplicate the options list in the\n\t\t\t\t\t// content document so that it's available to the screen\n\t\t\t\t\t// readers, which check the DOM ID based aria-* attributes.\n\t\t\t\t\tsetNeedsA11yCompat(\n\t\t\t\t\t\tnode.ownerDocument !== contentRef.current.ownerDocument\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t[ contentRef ]\n\t\t\t),\n\t\t] );\n\n\t\tuseOnClickOutside( popoverRef, reset );\n\n\t\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\t\tfunction announce( options: Array< KeyedOption > ) {\n\t\t\tif ( ! debouncedSpeak ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !! options.length ) {\n\t\t\t\tif ( filterValue ) {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdebouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t\t}\n\t\t}\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tannounce( items );\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items ] );\n\n\t\tif ( items.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Popover\n\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\tonClose={ onReset }\n\t\t\t\t\tplacement=\"top-start\"\n\t\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tref={ popoverRefs }\n\t\t\t\t>\n\t\t\t\t\t<ListBox\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t/>\n\t\t\t\t</Popover>\n\t\t\t\t{ contentRef.current &&\n\t\t\t\t\tneedsA11yCompat &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<ListBox\n\t\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tComponent={ VisuallyHidden }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\tcontentRef.current.ownerDocument.body\n\t\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nfunction useOnClickOutside(\n\tref: React.RefObject< HTMLElement >,\n\thandler: AutocompleterUIProps[ 'reset' ]\n) {\n\tuseEffect( () => {\n\t\tconst listener = ( event: MouseEvent | TouchEvent ) => {\n\t\t\t// Do nothing if clicking ref's element or descendent elements, or if the ref is not referencing an element\n\t\t\tif (\n\t\t\t\t! ref.current ||\n\t\t\t\tref.current.contains( event.target as Node )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\thandler( event );\n\t\t};\n\t\tdocument.addEventListener( 'mousedown', listener );\n\t\tdocument.addEventListener( 'touchstart', listener );\n\t\treturn () => {\n\t\t\tdocument.removeEventListener( 'mousedown', listener );\n\t\t\tdocument.removeEventListener( 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EAAEN,QAAS,CAAC;IACvD,CAAC;EACF,CAAC,EAAE,CAAEF,OAAO,EAAEJ,GAAG,CAAG,CAAC;AACtB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_richText","_compose","_a11y","_i18n","_getDefaultUseItems","_button","_popover","_visuallyHidden","_reactDom","_jsxRuntime","ListBox","items","onSelect","selectedIndex","instanceId","listBoxId","className","Component","jsx","id","role","children","map","option","index","default","key","__next40pxDefaultSize","accessibleWhenDisabled","disabled","isDisabled","clsx","variant","undefined","onClick","label","getAutoCompleterUI","autocompleter","_autocompleter$useIte","useItems","getDefaultUseItems","AutocompleterUI","filterValue","onChangeOptions","onReset","reset","contentRef","popoverAnchor","useAnchor","editableContentElement","current","needsA11yCompat","setNeedsA11yCompat","useState","popoverRef","useRef","popoverRefs","useMergeRefs","useRefEffect","node","ownerDocument","useOnClickOutside","debouncedSpeak","useDebounce","speak","announce","options","length","sprintf","_n","__","useLayoutEffect","jsxs","Fragment","focusOnMount","onClose","placement","anchor","ref","createPortal","VisuallyHidden","body","handler","useEffect","listener","event","contains","target","document","addEventListener","removeEventListener"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseRef,\n\tuseEffect,\n\tuseState,\n} 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 { createPortal } from 'react-dom';\nimport type { AutocompleterUIProps, KeyedOption, WPCompleter } from './types';\n\ntype ListBoxProps = {\n\titems: KeyedOption[];\n\tonSelect: ( option: KeyedOption ) => void;\n\tselectedIndex: number;\n\tinstanceId: number;\n\tlistBoxId: string | undefined;\n\tclassName?: string;\n\tComponent?: React.ElementType;\n};\n\nfunction ListBox( {\n\titems,\n\tonSelect,\n\tselectedIndex,\n\tinstanceId,\n\tlistBoxId,\n\tclassName,\n\tComponent = 'div',\n}: ListBoxProps ) {\n\treturn (\n\t\t<Component\n\t\t\tid={ listBoxId }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"components-autocomplete__results\"\n\t\t>\n\t\t\t{ items.map( ( option, index ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ option.key }\n\t\t\t\t\tid={ `components-autocomplete-item-${ instanceId }-${ option.key }` }\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ option.isDisabled }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-autocomplete__result',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Unused, for backwards compatibility.\n\t\t\t\t\t\t\t'is-selected': index === selectedIndex,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tvariant={ index === selectedIndex ? 'primary' : undefined }\n\t\t\t\t\tonClick={ () => onSelect( option ) }\n\t\t\t\t>\n\t\t\t\t\t{ option.label }\n\t\t\t\t</Button>\n\t\t\t) ) }\n\t\t</Component>\n\t);\n}\n\nexport function getAutoCompleterUI( autocompleter: WPCompleter ) {\n\tconst useItems =\n\t\tautocompleter.useItems ?? getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tinstanceId,\n\t\tlistBoxId,\n\t\tclassName,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tonReset,\n\t\treset,\n\t\tcontentRef,\n\t}: AutocompleterUIProps ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst popoverAnchor = useAnchor( {\n\t\t\teditableContentElement: contentRef.current,\n\t\t} );\n\n\t\tconst [ needsA11yCompat, setNeedsA11yCompat ] = useState( false );\n\t\tconst popoverRef = useRef< HTMLElement >( null );\n\t\tconst popoverRefs = useMergeRefs( [\n\t\t\tpopoverRef,\n\t\t\tuseRefEffect(\n\t\t\t\t( node ) => {\n\t\t\t\t\tif ( ! contentRef.current ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the popover is rendered in a different document than\n\t\t\t\t\t// the content, we need to duplicate the options list in the\n\t\t\t\t\t// content document so that it's available to the screen\n\t\t\t\t\t// readers, which check the DOM ID based aria-* attributes.\n\t\t\t\t\tsetNeedsA11yCompat(\n\t\t\t\t\t\tnode.ownerDocument !== contentRef.current.ownerDocument\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t[ contentRef ]\n\t\t\t),\n\t\t] );\n\n\t\tuseOnClickOutside( popoverRef, reset );\n\n\t\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\t\tfunction announce( options: Array< KeyedOption > ) {\n\t\t\tif ( ! debouncedSpeak ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !! options.length ) {\n\t\t\t\tif ( filterValue ) {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdebouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t\t}\n\t\t}\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tannounce( items );\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items ] );\n\n\t\tif ( items.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Popover\n\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\tonClose={ onReset }\n\t\t\t\t\tplacement=\"top-start\"\n\t\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tref={ popoverRefs }\n\t\t\t\t>\n\t\t\t\t\t<ListBox\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t/>\n\t\t\t\t</Popover>\n\t\t\t\t{ contentRef.current &&\n\t\t\t\t\tneedsA11yCompat &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<ListBox\n\t\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tComponent={ VisuallyHidden }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\tcontentRef.current.ownerDocument.body\n\t\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nfunction useOnClickOutside(\n\tref: React.RefObject< HTMLElement >,\n\thandler: AutocompleterUIProps[ 'reset' ]\n) {\n\tuseEffect( () => {\n\t\tconst listener = ( event: MouseEvent | TouchEvent ) => {\n\t\t\t// Do nothing if clicking ref's element or descendent elements, or if the ref is not referencing an element\n\t\t\tif (\n\t\t\t\t! ref.current ||\n\t\t\t\tref.current.contains( event.target as Node )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\thandler( event );\n\t\t};\n\t\tdocument.addEventListener( 'mousedown', listener );\n\t\tdocument.addEventListener( 'touchstart', listener );\n\t\treturn () => {\n\t\t\tdocument.removeEventListener( 'mousedown', listener );\n\t\t\tdocument.removeEventListener( 'touchstart', listener );\n\t\t};\n\t}, [ handler, ref ] );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,mBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,OAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,QAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAAyC,IAAAW,WAAA,GAAAX,OAAA;AA1BzC;AACA;AACA;;AA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EAAGA,SAAW;QACvBC,SAAS,EAAG+D;MAAgB,CAC5B,CAAC,EACFlC,UAAU,CAACI,OAAO,CAACU,aAAa,CAACqB,IAClC,CAAC;IAAA,CACD,CAAC;EAEL;EAEA,OAAOxC,eAAe;AACvB;AAEA,SAASoB,iBAAiBA,CACzBiB,GAAmC,EACnCI,OAAwC,EACvC;EACD,IAAAC,kBAAS,EAAE,MAAM;IAChB,MAAMC,QAAQ,GAAKC,KAA8B,IAAM;MACtD;MACA,IACC,CAAEP,GAAG,CAAC5B,OAAO,IACb4B,GAAG,CAAC5B,OAAO,CAACoC,QAAQ,CAAED,KAAK,CAACE,MAAe,CAAC,EAC3C;QACD;MACD;MACAL,OAAO,CAAEG,KAAM,CAAC;IACjB,CAAC;IACDG,QAAQ,CAACC,gBAAgB,CAAE,WAAW,EAAEL,QAAS,CAAC;IAClDI,QAAQ,CAACC,gBAAgB,CAAE,YAAY,EAAEL,QAAS,CAAC;IACnD,OAAO,MAAM;MACZI,QAAQ,CAACE,mBAAmB,CAAE,WAAW,EAAEN,QAAS,CAAC;MACrDI,QAAQ,CAACE,mBAAmB,CAAE,YAAY,EAAEN,QAAS,CAAC;IACvD,CAAC;EACF,CAAC,EAAE,CAAEF,OAAO,EAAEJ,GAAG,CAAG,CAAC;AACtB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_element","_i18n","_compose","_backgroundView","_interopRequireDefault","_getDefaultUseItems","_style","_icon","_autocompletionItems","_jsxRuntime","compose","stylesCompose","StyleSheet","getAutoCompleterUI","autocompleter","useItems","getDefaultUseItems","AutocompleterUI","filterValue","selectedIndex","onChangeOptions","onSelect","value","reset","items","filteredItems","filter","item","isDisabled","scrollViewRef","useRef","animationValue","Animated","Value","current","isVisible","setIsVisible","useState","text","useEffect","length","useLayoutEffect","scrollTo","x","animated","startAnimation","activeItemStyles","usePreferredColorSchemeStyle","styles","iconStyles","activeIconStyles","textStyles","activeTextStyles","useCallback","show","timing","toValue","duration","useNativeDriver","start","finished","contentStyles","transform","translateY","interpolate","inputRange","outputRange","height","jsx","__unstableAutocompletionItemsFill","children","View","style","default","ScrollView","testID","ref","horizontal","contentContainerStyle","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","accessibilityLabel","__","map","option","index","isActive","itemStyle","textStyle","iconStyle","iconSource","icon","src","jsxs","TouchableOpacity","activeOpacity","onPress","sprintf","title","size","Text","_default","exports"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tAnimated,\n\tStyleSheet,\n\tText,\n\tTouchableOpacity,\n\tScrollView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackgroundView from './background-view';\nimport getDefaultUseItems from './get-default-use-items';\nimport styles from './style.scss';\nimport Icon from '../icon';\nimport { __unstableAutocompletionItemsFill as AutocompletionItemsFill } from '../mobile/autocompletion-items';\n\nconst { compose: stylesCompose } = StyleSheet;\n\nexport function getAutoCompleterUI( autocompleter ) {\n\tconst useItems = autocompleter.useItems\n\t\t? autocompleter.useItems\n\t\t: getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tvalue,\n\t\treset,\n\t} ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst filteredItems = items.filter( ( item ) => ! item.isDisabled );\n\t\tconst scrollViewRef = useRef();\n\t\tconst animationValue = useRef( new Animated.Value( 0 ) ).current;\n\t\tconst [ isVisible, setIsVisible ] = useState( false );\n\t\tconst { text } = value;\n\n\t\tuseEffect( () => {\n\t\t\tif ( ! isVisible && text.length > 0 ) {\n\t\t\t\tsetIsVisible( true );\n\t\t\t}\n\t\t}, [ isVisible, text ] );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tscrollViewRef.current?.scrollTo( { x: 0, animated: false } );\n\n\t\t\tif ( isVisible && text.length > 0 ) {\n\t\t\t\tstartAnimation( true );\n\t\t\t} else if ( isVisible && text.length === 0 ) {\n\t\t\t\tstartAnimation( false );\n\t\t\t}\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items, isVisible, text ] );\n\n\t\tconst activeItemStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__item-active' ],\n\t\t\tstyles[ 'components-autocomplete__item-active-dark' ]\n\t\t);\n\n\t\tconst iconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst activeIconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon-active ' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst textStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text' ],\n\t\t\tstyles[ 'components-autocomplete__text-dark' ]\n\t\t);\n\n\t\tconst activeTextStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text-active' ],\n\t\t\tstyles[ 'components-autocomplete__text-active-dark' ]\n\t\t);\n\n\t\tconst startAnimation = useCallback(\n\t\t\t( show ) => {\n\t\t\t\tAnimated.timing( animationValue, {\n\t\t\t\t\ttoValue: show ? 1 : 0,\n\t\t\t\t\tduration: show ? 200 : 100,\n\t\t\t\t\tuseNativeDriver: true,\n\t\t\t\t} ).start( ( { finished } ) => {\n\t\t\t\t\tif ( finished && ! show && isVisible ) {\n\t\t\t\t\t\tsetIsVisible( false );\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t\t[ isVisible ]\n\t\t);\n\n\t\tconst contentStyles = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: animationValue.interpolate( {\n\t\t\t\t\t\tinputRange: [ 0, 1 ],\n\t\t\t\t\t\toutputRange: [\n\t\t\t\t\t\t\tstyles[ 'components-autocomplete' ].height,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t],\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif ( ! filteredItems.length > 0 || ! isVisible ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<AutocompletionItemsFill>\n\t\t\t\t<View style={ styles[ 'components-autocomplete' ] }>\n\t\t\t\t\t<Animated.View style={ contentStyles }>\n\t\t\t\t\t\t<BackgroundView>\n\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\ttestID=\"autocompleter\"\n\t\t\t\t\t\t\t\tref={ scrollViewRef }\n\t\t\t\t\t\t\t\thorizontal\n\t\t\t\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'components-autocomplete__content' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\t\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\t\t\t\t\taccessibilityLabel={\n\t\t\t\t\t\t\t\t\t// translators: Slash inserter autocomplete results\n\t\t\t\t\t\t\t\t\t__( 'Slash inserter results' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ filteredItems.map( ( option, index ) => {\n\t\t\t\t\t\t\t\t\tconst isActive = index === selectedIndex;\n\t\t\t\t\t\t\t\t\tconst itemStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__item'\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\tisActive && activeItemStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst textStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ttextStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeTextStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ticonStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeIconStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconSource =\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon?.src ||\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ itemStyle }\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tonPress={ () => onSelect( option ) }\n\t\t\t\t\t\t\t\t\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Block name e.g. \"Image block\"\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%s block' ),\n\t\t\t\t\t\t\t\t\t\t\t\toption?.value?.title\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__icon'\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ iconSource }\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t\t\t<Text style={ textStyle }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ option?.value?.title }\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t</BackgroundView>\n\t\t\t\t\t</Animated.View>\n\t\t\t\t</View>\n\t\t\t</AutocompletionItemsFill>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nexport default getAutoCompleterUI;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAYA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,eAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,KAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,oBAAA,GAAAT,OAAA;AAA8G,IAAAU,WAAA,GAAAV,OAAA;AAhC9G;AACA;AACA;;AAUA;AACA;AACA;;AAWA;AACA;AACA;;AAOA,MAAM;EAAEW,OAAO,EAAEC;AAAc,CAAC,GAAGC,uBAAU;AAEtC,SAAS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;EAEA,OAAOpE,eAAe;AACvB;AAAC,IAAAoF,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEc5D,kBAAkB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_element","_i18n","_compose","_backgroundView","_interopRequireDefault","_getDefaultUseItems","_style","_icon","_autocompletionItems","_jsxRuntime","compose","stylesCompose","StyleSheet","getAutoCompleterUI","autocompleter","useItems","getDefaultUseItems","AutocompleterUI","filterValue","selectedIndex","onChangeOptions","onSelect","value","reset","items","filteredItems","filter","item","isDisabled","scrollViewRef","useRef","animationValue","Animated","Value","current","isVisible","setIsVisible","useState","text","useEffect","length","useLayoutEffect","scrollTo","x","animated","startAnimation","activeItemStyles","usePreferredColorSchemeStyle","styles","iconStyles","activeIconStyles","textStyles","activeTextStyles","useCallback","show","timing","toValue","duration","useNativeDriver","start","finished","contentStyles","transform","translateY","interpolate","inputRange","outputRange","height","jsx","__unstableAutocompletionItemsFill","children","View","style","default","ScrollView","testID","ref","horizontal","contentContainerStyle","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","accessibilityLabel","__","map","option","index","isActive","itemStyle","textStyle","iconStyle","iconSource","icon","src","jsxs","TouchableOpacity","activeOpacity","onPress","sprintf","title","size","Text","_default","exports"],"sources":["@wordpress/components/src/autocomplete/autocompleter-ui.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tAnimated,\n\tStyleSheet,\n\tText,\n\tTouchableOpacity,\n\tScrollView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackgroundView from './background-view';\nimport getDefaultUseItems from './get-default-use-items';\nimport styles from './style.scss';\nimport Icon from '../icon';\nimport { __unstableAutocompletionItemsFill as AutocompletionItemsFill } from '../mobile/autocompletion-items';\n\nconst { compose: stylesCompose } = StyleSheet;\n\nexport function getAutoCompleterUI( autocompleter ) {\n\tconst useItems = autocompleter.useItems\n\t\t? autocompleter.useItems\n\t\t: getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tvalue,\n\t\treset,\n\t} ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst filteredItems = items.filter( ( item ) => ! item.isDisabled );\n\t\tconst scrollViewRef = useRef();\n\t\tconst animationValue = useRef( new Animated.Value( 0 ) ).current;\n\t\tconst [ isVisible, setIsVisible ] = useState( false );\n\t\tconst { text } = value;\n\n\t\tuseEffect( () => {\n\t\t\tif ( ! isVisible && text.length > 0 ) {\n\t\t\t\tsetIsVisible( true );\n\t\t\t}\n\t\t}, [ isVisible, text ] );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tscrollViewRef.current?.scrollTo( { x: 0, animated: false } );\n\n\t\t\tif ( isVisible && text.length > 0 ) {\n\t\t\t\tstartAnimation( true );\n\t\t\t} else if ( isVisible && text.length === 0 ) {\n\t\t\t\tstartAnimation( false );\n\t\t\t}\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items, isVisible, text ] );\n\n\t\tconst activeItemStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__item-active' ],\n\t\t\tstyles[ 'components-autocomplete__item-active-dark' ]\n\t\t);\n\n\t\tconst iconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst activeIconStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__icon-active ' ],\n\t\t\tstyles[ 'components-autocomplete__icon-active-dark' ]\n\t\t);\n\n\t\tconst textStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text' ],\n\t\t\tstyles[ 'components-autocomplete__text-dark' ]\n\t\t);\n\n\t\tconst activeTextStyles = usePreferredColorSchemeStyle(\n\t\t\tstyles[ 'components-autocomplete__text-active' ],\n\t\t\tstyles[ 'components-autocomplete__text-active-dark' ]\n\t\t);\n\n\t\tconst startAnimation = useCallback(\n\t\t\t( show ) => {\n\t\t\t\tAnimated.timing( animationValue, {\n\t\t\t\t\ttoValue: show ? 1 : 0,\n\t\t\t\t\tduration: show ? 200 : 100,\n\t\t\t\t\tuseNativeDriver: true,\n\t\t\t\t} ).start( ( { finished } ) => {\n\t\t\t\t\tif ( finished && ! show && isVisible ) {\n\t\t\t\t\t\tsetIsVisible( false );\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t\t[ isVisible ]\n\t\t);\n\n\t\tconst contentStyles = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: animationValue.interpolate( {\n\t\t\t\t\t\tinputRange: [ 0, 1 ],\n\t\t\t\t\t\toutputRange: [\n\t\t\t\t\t\t\tstyles[ 'components-autocomplete' ].height,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t],\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif ( ! filteredItems.length > 0 || ! isVisible ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<AutocompletionItemsFill>\n\t\t\t\t<View style={ styles[ 'components-autocomplete' ] }>\n\t\t\t\t\t<Animated.View style={ contentStyles }>\n\t\t\t\t\t\t<BackgroundView>\n\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\ttestID=\"autocompleter\"\n\t\t\t\t\t\t\t\tref={ scrollViewRef }\n\t\t\t\t\t\t\t\thorizontal\n\t\t\t\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'components-autocomplete__content' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\t\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\t\t\t\t\taccessibilityLabel={\n\t\t\t\t\t\t\t\t\t// translators: Slash inserter autocomplete results\n\t\t\t\t\t\t\t\t\t__( 'Slash inserter results' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ filteredItems.map( ( option, index ) => {\n\t\t\t\t\t\t\t\t\tconst isActive = index === selectedIndex;\n\t\t\t\t\t\t\t\t\tconst itemStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__item'\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\tisActive && activeItemStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst textStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ttextStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeTextStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconStyle = stylesCompose(\n\t\t\t\t\t\t\t\t\t\ticonStyles,\n\t\t\t\t\t\t\t\t\t\tisActive && activeIconStyles\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst iconSource =\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon?.src ||\n\t\t\t\t\t\t\t\t\t\toption?.value?.icon;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ itemStyle }\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tonPress={ () => onSelect( option ) }\n\t\t\t\t\t\t\t\t\t\t\taccessibilityLabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: %s: Block name e.g. \"Image block\"\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%s block' ),\n\t\t\t\t\t\t\t\t\t\t\t\toption?.value?.title\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'components-autocomplete__icon'\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ iconSource }\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t\t\t<Text style={ textStyle }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ option?.value?.title }\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t</BackgroundView>\n\t\t\t\t\t</Animated.View>\n\t\t\t\t</View>\n\t\t\t</AutocompletionItemsFill>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nexport default getAutoCompleterUI;\n"],"mappings":";;;;;;;;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oBACJC,KAAK,EACJxB,cAAM,CACL,+BAA+B,CAEhC;oBAAAsB,QAAA,eAED,IAAA7D,WAAA,CAAA2D,GAAA,EAAC7D,KAAA,CAAAkE,OAAI;sBACJkB,IAAI,EAAGD,UAAY;sBACnBS,IAAI,EAAG,EAAI;sBACX3B,KAAK,EAAGiB;oBAAW,CACnB;kBAAC,CACG,CAAC,eACP,IAAAhF,WAAA,CAAA2D,GAAA,EAACtE,YAAA,CAAAsG,IAAI;oBAAC5B,KAAK,EAAGgB,SAAW;oBAAAlB,QAAA,EACtBc,MAAM,EAAE9D,KAAK,EAAE4E;kBAAK,CACjB,CAAC;gBAAA,GAvBDb,KAwBW,CAAC;cAErB,CAAE;YAAC,CACQ;UAAC,CACE;QAAC,CACH;MAAC,CACX;IAAC,CACiB,CAAC;EAE5B;EAEA,OAAOpE,eAAe;AACvB;AAAC,IAAAoF,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEc5D,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_removeAccents","_interopRequireDefault","require","_compose","_element","_strings","filterOptions","search","options","maxResults","filtered","i","length","option","keywords","label","isMatch","some","keyword","test","removeAccents","push","getDefaultUseItems","autocompleter","filterValue","items","setItems","useState","useLayoutEffect","isDebounced","loadOptions","debounce","promise","Promise","resolve","then","optionsData","canceled","keyedOptions","map","optionData","optionIndex","key","name","value","getOptionLabel","getOptionKeywords","isDisabled","isOptionDisabled","RegExp","escapeRegExp","cancel"],"sources":["@wordpress/components/src/autocomplete/get-default-use-items.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport type { CancelablePromise, KeyedOption, WPCompleter } from './types';\n\nfunction filterOptions(\n\tsearch: RegExp,\n\toptions: Array< KeyedOption > = [],\n\tmaxResults = 10\n) {\n\tconst filtered = [];\n\tfor ( let i = 0; i < options.length; i++ ) {\n\t\tconst option = options[ i ];\n\n\t\t// Merge label into keywords.\n\t\tlet { keywords = [] } = option;\n\t\tif ( 'string' === typeof option.label ) {\n\t\t\tkeywords = [ ...keywords, option.label ];\n\t\t}\n\n\t\tconst isMatch = keywords.some( ( keyword ) =>\n\t\t\tsearch.test( removeAccents( keyword ) )\n\t\t);\n\t\tif ( ! isMatch ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfiltered.push( option );\n\n\t\t// Abort early if max reached.\n\t\tif ( filtered.length === maxResults ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn filtered;\n}\n\nexport default function getDefaultUseItems( autocompleter: WPCompleter ) {\n\treturn ( filterValue: string ) => {\n\t\tconst [ items, setItems ] = useState< Array< KeyedOption > >( [] );\n\t\t/*\n\t\t * We support both synchronous and asynchronous retrieval of completer options\n\t\t * but internally treat all as async so we maintain a single, consistent code path.\n\t\t *\n\t\t * Because networks can be slow, and the internet is wonderfully unpredictable,\n\t\t * we don't want two promises updating the state at once. This ensures that only\n\t\t * the most recent promise will act on `optionsData`. This doesn't use the state\n\t\t * because `setState` is batched, and so there's no guarantee that setting\n\t\t * `activePromise` in the state would result in it actually being in `this.state`\n\t\t * before the promise resolves and we check to see if this is the active promise or not.\n\t\t */\n\t\tuseLayoutEffect( () => {\n\t\t\tconst { options, isDebounced } = autocompleter;\n\t\t\tconst loadOptions = debounce(\n\t\t\t\t() => {\n\t\t\t\t\tconst promise: CancelablePromise = Promise.resolve(\n\t\t\t\t\t\ttypeof options === 'function'\n\t\t\t\t\t\t\t? options( filterValue )\n\t\t\t\t\t\t\t: options\n\t\t\t\t\t).then( ( optionsData ) => {\n\t\t\t\t\t\tif ( promise.canceled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst keyedOptions = optionsData.map(\n\t\t\t\t\t\t\t( optionData, optionIndex ) => ( {\n\t\t\t\t\t\t\t\tkey: `${ autocompleter.name }-${ optionIndex }`,\n\t\t\t\t\t\t\t\tvalue: optionData,\n\t\t\t\t\t\t\t\tlabel: autocompleter.getOptionLabel(\n\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tkeywords: autocompleter.getOptionKeywords\n\t\t\t\t\t\t\t\t\t? autocompleter.getOptionKeywords(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t\t\tisDisabled: autocompleter.isOptionDisabled\n\t\t\t\t\t\t\t\t\t? autocompleter.isOptionDisabled(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Create a regular expression to filter the options.\n\t\t\t\t\t\tconst search = new RegExp(\n\t\t\t\t\t\t\t'(?:\\\\b|\\\\s|^)' + escapeRegExp( filterValue ),\n\t\t\t\t\t\t\t'i'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetItems( filterOptions( search, keyedOptions ) );\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn promise;\n\t\t\t\t},\n\t\t\t\tisDebounced ? 250 : 0\n\t\t\t);\n\n\t\t\tconst promise = loadOptions();\n\n\t\t\treturn () => {\n\t\t\t\tloadOptions.cancel();\n\t\t\t\tif ( promise ) {\n\t\t\t\t\tpromise.canceled = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}, [ filterValue ] );\n\n\t\treturn [ items ] as const;\n\t};\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_removeAccents","_interopRequireDefault","require","_compose","_element","_strings","filterOptions","search","options","maxResults","filtered","i","length","option","keywords","label","isMatch","some","keyword","test","removeAccents","push","getDefaultUseItems","autocompleter","filterValue","items","setItems","useState","useLayoutEffect","isDebounced","loadOptions","debounce","promise","Promise","resolve","then","optionsData","canceled","keyedOptions","map","optionData","optionIndex","key","name","value","getOptionLabel","getOptionKeywords","isDisabled","isOptionDisabled","RegExp","escapeRegExp","cancel"],"sources":["@wordpress/components/src/autocomplete/get-default-use-items.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport type { CancelablePromise, KeyedOption, WPCompleter } from './types';\n\nfunction filterOptions(\n\tsearch: RegExp,\n\toptions: Array< KeyedOption > = [],\n\tmaxResults = 10\n) {\n\tconst filtered = [];\n\tfor ( let i = 0; i < options.length; i++ ) {\n\t\tconst option = options[ i ];\n\n\t\t// Merge label into keywords.\n\t\tlet { keywords = [] } = option;\n\t\tif ( 'string' === typeof option.label ) {\n\t\t\tkeywords = [ ...keywords, option.label ];\n\t\t}\n\n\t\tconst isMatch = keywords.some( ( keyword ) =>\n\t\t\tsearch.test( removeAccents( keyword ) )\n\t\t);\n\t\tif ( ! isMatch ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfiltered.push( option );\n\n\t\t// Abort early if max reached.\n\t\tif ( filtered.length === maxResults ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn filtered;\n}\n\nexport default function getDefaultUseItems( autocompleter: WPCompleter ) {\n\treturn ( filterValue: string ) => {\n\t\tconst [ items, setItems ] = useState< Array< KeyedOption > >( [] );\n\t\t/*\n\t\t * We support both synchronous and asynchronous retrieval of completer options\n\t\t * but internally treat all as async so we maintain a single, consistent code path.\n\t\t *\n\t\t * Because networks can be slow, and the internet is wonderfully unpredictable,\n\t\t * we don't want two promises updating the state at once. This ensures that only\n\t\t * the most recent promise will act on `optionsData`. This doesn't use the state\n\t\t * because `setState` is batched, and so there's no guarantee that setting\n\t\t * `activePromise` in the state would result in it actually being in `this.state`\n\t\t * before the promise resolves and we check to see if this is the active promise or not.\n\t\t */\n\t\tuseLayoutEffect( () => {\n\t\t\tconst { options, isDebounced } = autocompleter;\n\t\t\tconst loadOptions = debounce(\n\t\t\t\t() => {\n\t\t\t\t\tconst promise: CancelablePromise = Promise.resolve(\n\t\t\t\t\t\ttypeof options === 'function'\n\t\t\t\t\t\t\t? options( filterValue )\n\t\t\t\t\t\t\t: options\n\t\t\t\t\t).then( ( optionsData ) => {\n\t\t\t\t\t\tif ( promise.canceled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst keyedOptions = optionsData.map(\n\t\t\t\t\t\t\t( optionData, optionIndex ) => ( {\n\t\t\t\t\t\t\t\tkey: `${ autocompleter.name }-${ optionIndex }`,\n\t\t\t\t\t\t\t\tvalue: optionData,\n\t\t\t\t\t\t\t\tlabel: autocompleter.getOptionLabel(\n\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tkeywords: autocompleter.getOptionKeywords\n\t\t\t\t\t\t\t\t\t? autocompleter.getOptionKeywords(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t\t\tisDisabled: autocompleter.isOptionDisabled\n\t\t\t\t\t\t\t\t\t? autocompleter.isOptionDisabled(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Create a regular expression to filter the options.\n\t\t\t\t\t\tconst search = new RegExp(\n\t\t\t\t\t\t\t'(?:\\\\b|\\\\s|^)' + escapeRegExp( filterValue ),\n\t\t\t\t\t\t\t'i'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetItems( filterOptions( search, keyedOptions ) );\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn promise;\n\t\t\t\t},\n\t\t\t\tisDebounced ? 250 : 0\n\t\t\t);\n\n\t\t\tconst promise = loadOptions();\n\n\t\t\treturn () => {\n\t\t\t\tloadOptions.cancel();\n\t\t\t\tif ( promise ) {\n\t\t\t\t\tpromise.canceled = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}, [ filterValue ] );\n\n\t\treturn [ items ] as const;\n\t};\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,aAAaA,CACrBC,MAAc,EACdC,OAA6B,GAAG,EAAE,EAClCC,UAAU,GAAG,EAAE,EACd;EACD,MAAMC,QAAQ,GAAG,EAAE;EACnB,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAG;IAC1C,MAAME,MAAM,GAAGL,OAAO,CAAEG,CAAC,CAAE;;IAE3B;IACA,IAAI;MAAEG,QAAQ,GAAG;IAAG,CAAC,GAAGD,MAAM;IAC9B,IAAK,QAAQ,KAAK,OAAOA,MAAM,CAACE,KAAK,EAAG;MACvCD,QAAQ,GAAG,CAAE,GAAGA,QAAQ,EAAED,MAAM,CAACE,KAAK,CAAE;IACzC;IAEA,MAAMC,OAAO,GAAGF,QAAQ,CAACG,IAAI,CAAIC,OAAO,IACvCX,MAAM,CAACY,IAAI,CAAE,IAAAC,sBAAa,EAAEF,OAAQ,CAAE,CACvC,CAAC;IACD,IAAK,CAAEF,OAAO,EAAG;MAChB;IACD;IAEAN,QAAQ,CAACW,IAAI,CAAER,MAAO,CAAC;;IAEvB;IACA,IAAKH,Q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QAAQ,CAAEpB,aAAa,CAAEC,MAAM,EAAE+B,YAAa,CAAE,CAAC;QAClD,CAAE,CAAC;QAEH,OAAON,OAAO;MACf,CAAC,EACDH,WAAW,GAAG,GAAG,GAAG,CACrB,CAAC;MAED,MAAMG,OAAO,GAAGF,WAAW,CAAC,CAAC;MAE7B,OAAO,MAAM;QACZA,WAAW,CAACqB,MAAM,CAAC,CAAC;QACpB,IAAKnB,OAAO,EAAG;UACdA,OAAO,CAACK,QAAQ,GAAG,IAAI;QACxB;MACD,CAAC;IACF,CAAC,EAAE,CAAEb,WAAW,CAAG,CAAC;IAEpB,OAAO,CAAEC,KAAK,CAAE;EACjB,CAAC;AACF","ignoreList":[]}
|
|
@@ -64,7 +64,7 @@ const BorderBoxControlSplitControls = (props, forwardedRef) => {
|
|
|
64
64
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_grid.Grid, {
|
|
65
65
|
...otherProps,
|
|
66
66
|
ref: mergedRef,
|
|
67
|
-
gap:
|
|
67
|
+
gap: 3,
|
|
68
68
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_borderBoxControlVisualizer.default, {
|
|
69
69
|
value: value,
|
|
70
70
|
size: size
|