@wordpress/components 27.4.0 → 27.6.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 +47 -1
- package/build/alignment-matrix-control/icon.js +2 -2
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/index.js +5 -3
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +8 -8
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build/alignment-matrix-control/utils.js +6 -2
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/angle-picker-control/index.js +2 -2
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/animate/index.js +4 -4
- package/build/animate/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +5 -3
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/index.js +21 -7
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/hooks.js +1 -4
- package/build/base-control/hooks.js.map +1 -1
- package/build/base-control/index.js +2 -2
- package/build/base-control/index.js.map +1 -1
- package/build/base-control/types.js.map +1 -1
- package/build/border-control/types.js.map +1 -1
- package/build/button/index.js +2 -2
- package/build/button/index.js.map +1 -1
- package/build/button-group/index.js +2 -2
- package/build/button-group/index.js.map +1 -1
- package/build/checkbox-control/index.js +11 -4
- package/build/checkbox-control/index.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-actions.js +3 -3
- package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option-group.js +2 -2
- package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +2 -2
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker.js +2 -2
- package/build/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build/clipboard-button/index.js +2 -2
- package/build/clipboard-button/index.js.map +1 -1
- package/build/color-indicator/index.js +2 -2
- package/build/color-indicator/index.js.map +1 -1
- package/build/color-palette/index.js +2 -2
- package/build/color-palette/index.js.map +1 -1
- package/build/color-picker/hex-input.js +3 -1
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/hue-picker.native.js +6 -2
- package/build/color-picker/hue-picker.native.js.map +1 -1
- package/build/color-picker/index.native.js +9 -3
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/saturation-picker.native.js +6 -2
- package/build/color-picker/saturation-picker.native.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js +9 -3
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/combobox-control/index.js +7 -2
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/types.js.map +1 -1
- package/build/context/context-connect.js +6 -2
- package/build/context/context-connect.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +3 -3
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +2 -2
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-select-control/index.js +3 -3
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control-v2/legacy-component/index.js +3 -1
- package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build/dimension-control/index.js +2 -2
- package/build/dimension-control/index.js.map +1 -1
- package/build/drop-zone/index.js +74 -66
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown/index.js +2 -2
- package/build/dropdown/index.js.map +1 -1
- package/build/dropdown/styles.js +5 -3
- package/build/dropdown/styles.js.map +1 -1
- package/build/dropdown-menu/index.js +5 -5
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +4 -4
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/duotone-picker/utils.js +3 -1
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/elevation/hook.js +5 -6
- package/build/elevation/hook.js.map +1 -1
- package/build/external-link/index.js +2 -2
- package/build/external-link/index.js.map +1 -1
- package/build/focal-point-picker/controls.js +3 -1
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/focal-point.js +2 -2
- package/build/focal-point-picker/focal-point.js.map +1 -1
- package/build/focal-point-picker/index.js +23 -9
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-picker-style.js +12 -12
- package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +3 -8
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/focal-point-picker/utils.js +3 -1
- package/build/focal-point-picker/utils.js.map +1 -1
- package/build/font-size-picker/index.js +3 -2
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/types.js.map +1 -1
- package/build/form-toggle/index.js +2 -2
- package/build/form-toggle/index.js.map +1 -1
- package/build/form-token-field/index.js +3 -3
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +9 -5
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/form-token-field/token-input.js +2 -2
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/form-token-field/token.js +2 -2
- package/build/form-token-field/token.js.map +1 -1
- package/build/guide/index.js +2 -2
- package/build/guide/index.js.map +1 -1
- package/build/input-control/index.js +3 -6
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-field.js +3 -1
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/label.js +3 -1
- package/build/input-control/label.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +31 -23
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/input-control/utils.js +8 -4
- package/build/input-control/utils.js.map +1 -1
- package/build/item-group/item/hook.js +0 -4
- package/build/item-group/item/hook.js.map +1 -1
- package/build/menu-group/index.js +2 -2
- package/build/menu-group/index.js.map +1 -1
- package/build/menu-item/index.js +3 -3
- package/build/menu-item/index.js.map +1 -1
- package/build/mobile/color-settings/utils.native.js +1 -1
- package/build/mobile/color-settings/utils.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js +3 -1
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js +9 -3
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +15 -13
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/shared.native.js +33 -0
- package/build/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
- package/build/modal/aria-helper.js +9 -3
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +10 -6
- package/build/modal/index.js.map +1 -1
- package/build/navigation/back-button/index.js +2 -2
- package/build/navigation/back-button/index.js.map +1 -1
- package/build/navigation/group/index.js +2 -2
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/index.js +3 -3
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/base.js +2 -2
- package/build/navigation/item/base.js.map +1 -1
- package/build/navigation/item/index.js +2 -2
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/menu/index.js +2 -2
- package/build/navigation/menu/index.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/notice/index.js +3 -3
- package/build/notice/index.js.map +1 -1
- package/build/notice/list.js +2 -2
- package/build/notice/list.js.map +1 -1
- package/build/number-control/index.js +2 -2
- package/build/number-control/index.js.map +1 -1
- package/build/palette-edit/index.js +5 -5
- package/build/palette-edit/index.js.map +1 -1
- package/build/palette-edit/styles.js +14 -15
- package/build/palette-edit/styles.js.map +1 -1
- package/build/panel/body.js +5 -3
- package/build/panel/body.js.map +1 -1
- package/build/panel/index.js +2 -2
- package/build/panel/index.js.map +1 -1
- package/build/panel/row.js +2 -2
- package/build/panel/row.js.map +1 -1
- package/build/placeholder/index.js +3 -3
- package/build/placeholder/index.js.map +1 -1
- package/build/popover/index.js +5 -3
- package/build/popover/index.js.map +1 -1
- package/build/popover/overlay-middlewares.js +3 -1
- package/build/popover/overlay-middlewares.js.map +1 -1
- package/build/query-controls/author-select.js +3 -1
- package/build/query-controls/author-select.js.map +1 -1
- package/build/radio-control/index.js +2 -2
- package/build/radio-control/index.js.map +1 -1
- package/build/range-control/index.js +3 -3
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/mark.js +3 -3
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/rail.js +1 -1
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +29 -29
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/range-control/tooltip.js +2 -2
- package/build/range-control/tooltip.js.map +1 -1
- package/build/resizable-box/index.js +10 -10
- package/build/resizable-box/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js +5 -3
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js +3 -1
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +12 -4
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/responsive-wrapper/index.js +2 -2
- package/build/responsive-wrapper/index.js.map +1 -1
- package/build/search-control/index.js +2 -2
- package/build/search-control/index.js.map +1 -1
- package/build/select-control/index.js +5 -3
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +8 -6
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -3
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +3 -3
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot.js +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/snackbar/index.js +3 -3
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +2 -2
- package/build/snackbar/list.js.map +1 -1
- package/build/spinner/index.js +2 -2
- package/build/spinner/index.js.map +1 -1
- package/build/tab-panel/index.js +2 -2
- package/build/tab-panel/index.js.map +1 -1
- package/build/text/get-line-height.js +6 -2
- package/build/text/get-line-height.js.map +1 -1
- package/build/text/utils.js +6 -2
- package/build/text/utils.js.map +1 -1
- package/build/text-control/index.js +2 -2
- package/build/text-control/index.js.map +1 -1
- package/build/theme/color-algorithms.js +6 -2
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toolbar/toolbar/index.js +2 -2
- package/build/toolbar/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +3 -3
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-group/index.js +2 -2
- package/build/toolbar/toolbar-group/index.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +5 -6
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +6 -8
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tools-panel/types.js.map +1 -1
- package/build/tree-grid/roving-tab-index-item.js +3 -1
- package/build/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build/truncate/hook.js +1 -1
- package/build/truncate/hook.js.map +1 -1
- package/build/unit-control/index.js +5 -3
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/unit-select-control.js +2 -2
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/utils/colors.js +21 -7
- package/build/utils/colors.js.map +1 -1
- package/build/utils/font-size.js +3 -1
- package/build/utils/font-size.js.map +1 -1
- package/build/utils/get-valid-children.js +3 -1
- package/build/utils/get-valid-children.js.map +1 -1
- package/build/utils/input/base.js +2 -3
- package/build/utils/input/base.js.map +1 -1
- package/build/utils/strings.js +11 -57
- package/build/utils/strings.js.map +1 -1
- package/build/utils/use-responsive-value.js +3 -1
- package/build/utils/use-responsive-value.js.map +1 -1
- package/build/view/component.js +26 -8
- package/build/view/component.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js +2 -2
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +5 -3
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -9
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +6 -2
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/angle-picker-control/index.js +2 -2
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/animate/index.js +4 -4
- package/build-module/animate/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +5 -3
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/index.js +21 -7
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/hooks.js +1 -4
- package/build-module/base-control/hooks.js.map +1 -1
- package/build-module/base-control/index.js +2 -2
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/types.js.map +1 -1
- package/build-module/border-control/types.js.map +1 -1
- package/build-module/button/index.js +2 -2
- package/build-module/button/index.js.map +1 -1
- package/build-module/button-group/index.js +2 -2
- package/build-module/button-group/index.js.map +1 -1
- package/build-module/checkbox-control/index.js +11 -4
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-actions.js +3 -3
- package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option-group.js +2 -2
- package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +2 -2
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker.js +2 -2
- package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build-module/clipboard-button/index.js +2 -2
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/color-indicator/index.js +2 -2
- package/build-module/color-indicator/index.js.map +1 -1
- package/build-module/color-palette/index.js +2 -2
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-picker/hex-input.js +3 -1
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/hue-picker.native.js +6 -2
- package/build-module/color-picker/hue-picker.native.js.map +1 -1
- package/build-module/color-picker/index.native.js +9 -3
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/saturation-picker.native.js +6 -2
- package/build-module/color-picker/saturation-picker.native.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js +9 -3
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/combobox-control/index.js +7 -2
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/types.js.map +1 -1
- package/build-module/context/context-connect.js +6 -2
- package/build-module/context/context-connect.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +3 -3
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +2 -2
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-select-control/index.js +3 -3
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js +3 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build-module/dimension-control/index.js +2 -2
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/drop-zone/index.js +74 -66
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown/index.js +2 -2
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/dropdown/styles.js +5 -3
- package/build-module/dropdown/styles.js.map +1 -1
- package/build-module/dropdown-menu/index.js +5 -5
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +4 -4
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/duotone-picker/utils.js +3 -1
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/elevation/hook.js +6 -7
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/external-link/index.js +2 -2
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +3 -1
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.js +2 -2
- package/build-module/focal-point-picker/focal-point.js.map +1 -1
- package/build-module/focal-point-picker/index.js +23 -9
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js +13 -13
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +3 -8
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/focal-point-picker/utils.js +3 -1
- package/build-module/focal-point-picker/utils.js.map +1 -1
- package/build-module/font-size-picker/index.js +3 -2
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/types.js.map +1 -1
- package/build-module/form-toggle/index.js +2 -2
- package/build-module/form-toggle/index.js.map +1 -1
- package/build-module/form-token-field/index.js +3 -3
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +9 -5
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/form-token-field/token-input.js +2 -2
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/form-token-field/token.js +2 -2
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/guide/index.js +2 -2
- package/build-module/guide/index.js.map +1 -1
- package/build-module/input-control/index.js +3 -6
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-field.js +3 -1
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/label.js +3 -1
- package/build-module/input-control/label.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +31 -23
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/input-control/utils.js +8 -4
- package/build-module/input-control/utils.js.map +1 -1
- package/build-module/item-group/item/hook.js +0 -4
- package/build-module/item-group/item/hook.js.map +1 -1
- package/build-module/menu-group/index.js +2 -2
- package/build-module/menu-group/index.js.map +1 -1
- package/build-module/menu-item/index.js +3 -3
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/mobile/color-settings/utils.native.js +1 -1
- package/build-module/mobile/color-settings/utils.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +3 -1
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +9 -3
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +16 -15
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/shared.native.js +27 -0
- package/build-module/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
- package/build-module/modal/aria-helper.js +9 -3
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +10 -6
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigation/back-button/index.js +2 -2
- package/build-module/navigation/back-button/index.js.map +1 -1
- package/build-module/navigation/group/index.js +2 -2
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/index.js +3 -3
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/base.js +2 -2
- package/build-module/navigation/item/base.js.map +1 -1
- package/build-module/navigation/item/index.js +2 -2
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/menu/index.js +2 -2
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +13 -13
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/notice/index.js +3 -3
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/list.js +2 -2
- package/build-module/notice/list.js.map +1 -1
- package/build-module/number-control/index.js +2 -2
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/palette-edit/index.js +6 -6
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/styles.js +13 -14
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/panel/body.js +5 -3
- package/build-module/panel/body.js.map +1 -1
- package/build-module/panel/index.js +2 -2
- package/build-module/panel/index.js.map +1 -1
- package/build-module/panel/row.js +2 -2
- package/build-module/panel/row.js.map +1 -1
- package/build-module/placeholder/index.js +3 -3
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/popover/index.js +5 -3
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/overlay-middlewares.js +3 -1
- package/build-module/popover/overlay-middlewares.js.map +1 -1
- package/build-module/query-controls/author-select.js +3 -1
- package/build-module/query-controls/author-select.js.map +1 -1
- package/build-module/radio-control/index.js +2 -2
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/range-control/index.js +3 -3
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/mark.js +3 -3
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js +1 -1
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +30 -30
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/range-control/tooltip.js +2 -2
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/resizable-box/index.js +10 -10
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +5 -3
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js +3 -1
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +12 -4
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/responsive-wrapper/index.js +2 -2
- package/build-module/responsive-wrapper/index.js.map +1 -1
- package/build-module/search-control/index.js +2 -2
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/select-control/index.js +5 -3
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +8 -6
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +2 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/snackbar/index.js +3 -3
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +2 -2
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spinner/index.js +2 -2
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/tab-panel/index.js +2 -2
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/text/get-line-height.js +6 -2
- package/build-module/text/get-line-height.js.map +1 -1
- package/build-module/text/utils.js +6 -2
- package/build-module/text/utils.js.map +1 -1
- package/build-module/text-control/index.js +2 -2
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/theme/color-algorithms.js +6 -2
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +10 -10
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js +2 -2
- package/build-module/toolbar/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +3 -3
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js +2 -2
- package/build-module/toolbar/toolbar-group/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +5 -6
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +6 -8
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tools-panel/types.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-item.js +3 -1
- package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build-module/truncate/hook.js +1 -1
- package/build-module/truncate/hook.js.map +1 -1
- package/build-module/unit-control/index.js +5 -3
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +2 -2
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/utils/colors.js +21 -7
- package/build-module/utils/colors.js.map +1 -1
- package/build-module/utils/font-size.js +3 -1
- package/build-module/utils/font-size.js.map +1 -1
- package/build-module/utils/get-valid-children.js +3 -1
- package/build-module/utils/get-valid-children.js.map +1 -1
- package/build-module/utils/input/base.js +2 -3
- package/build-module/utils/input/base.js.map +1 -1
- package/build-module/utils/strings.js +12 -57
- package/build-module/utils/strings.js.map +1 -1
- package/build-module/utils/use-responsive-value.js +3 -1
- package/build-module/utils/use-responsive-value.js.map +1 -1
- package/build-module/view/component.js +26 -8
- package/build-module/view/component.js.map +1 -1
- package/build-style/style-rtl.css +56 -55
- package/build-style/style.css +56 -55
- package/build-types/alignment-matrix-control/cell.d.ts +1 -1
- package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/icon.d.ts +1 -1
- package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/index.d.ts +1 -1
- package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +4 -4
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +4 -4
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/utils.d.ts.map +1 -1
- package/build-types/angle-picker-control/angle-circle.d.ts +1 -1
- package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
- package/build-types/angle-picker-control/index.d.ts +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +4 -4
- package/build-types/animate/index.d.ts.map +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts +3 -3
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +1 -0
- package/build-types/base-control/hooks.d.ts.map +1 -1
- package/build-types/base-control/index.d.ts +2 -2
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/styles/base-control-styles.d.ts +5 -5
- package/build-types/base-control/types.d.ts +1 -2
- package/build-types/base-control/types.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +69 -59
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +70 -61
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +69 -59
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +69 -59
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +1 -0
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +70 -59
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +69 -59
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-style-picker/component.d.ts +1 -1
- package/build-types/border-control/stories/index.story.d.ts +12 -6
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/types.d.ts +4 -0
- package/build-types/border-control/types.d.ts.map +1 -1
- package/build-types/box-control/all-input-control.d.ts +1 -1
- package/build-types/box-control/all-input-control.d.ts.map +1 -1
- package/build-types/box-control/axial-input-controls.d.ts +1 -1
- package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
- package/build-types/box-control/icon.d.ts +1 -1
- package/build-types/box-control/icon.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts +1 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/input-controls.d.ts +1 -1
- package/build-types/box-control/input-controls.d.ts.map +1 -1
- package/build-types/box-control/linked-button.d.ts +1 -1
- package/build-types/box-control/linked-button.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts +439 -390
- 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 +6 -6
- package/build-types/box-control/styles/box-control-styles.d.ts +5 -5
- package/build-types/button/deprecated.d.ts +5 -51
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +1 -1
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts +1 -1
- package/build-types/button-group/index.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +69 -59
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +69 -59
- package/build-types/card/card-body/hook.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +69 -59
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +69 -59
- package/build-types/card/card-footer/hook.d.ts.map +1 -1
- package/build-types/card/card-header/hook.d.ts +69 -59
- package/build-types/card/card-header/hook.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +69 -59
- package/build-types/card/card-media/hook.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +2 -2
- package/build-types/checkbox-control/index.d.ts +1 -1
- package/build-types/checkbox-control/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +2 -2
- 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-group.d.ts +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts +1 -1
- package/build-types/clipboard-button/index.d.ts.map +1 -1
- package/build-types/color-indicator/index.d.ts +1 -1
- package/build-types/color-indicator/index.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/styles.d.ts +1 -1
- package/build-types/color-picker/color-copy-button.d.ts +1 -1
- package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
- package/build-types/color-picker/color-input.d.ts +1 -1
- package/build-types/color-picker/color-input.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts +2 -2
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts +1 -1
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/hsl-input.d.ts +1 -1
- package/build-types/color-picker/hsl-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts +1 -1
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +1 -1
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/rgb-input.d.ts +1 -1
- package/build-types/color-picker/rgb-input.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +6 -6
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts +3 -1
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +22 -2
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/styles.d.ts +1 -1
- package/build-types/combobox-control/types.d.ts +1 -0
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/composite/current/stories/utils.d.ts +1 -1
- package/build-types/composite/current/stories/utils.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/context/context-connect.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +2 -2
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts +1 -1
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
- package/build-types/custom-select-control/index.d.ts +2 -2
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/custom-select.d.ts +1 -1
- package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/default-component/index.d.ts +1 -1
- package/build-types/custom-select-control-v2/default-component/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/item.d.ts +1 -1
- package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts +1 -1
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/default.story.d.ts +3 -3
- package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/styles.d.ts +8 -8
- package/build-types/dashicon/index.d.ts +1 -1
- package/build-types/dashicon/index.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +5 -5
- package/build-types/date-time/date-time/styles.d.ts +1 -1
- package/build-types/date-time/time/index.d.ts +1 -1
- package/build-types/date-time/time/index.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +10 -10
- package/build-types/date-time/time/timezone.d.ts +1 -1
- package/build-types/date-time/time/timezone.d.ts.map +1 -1
- package/build-types/dimension-control/index.d.ts +1 -1
- package/build-types/dimension-control/index.d.ts.map +1 -1
- package/build-types/disabled/index.d.ts +1 -1
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/disclosure/index.d.ts +1 -1
- package/build-types/disclosure/index.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +1 -1
- package/build-types/draggable/index.d.ts +1 -1
- package/build-types/draggable/index.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/stories/index.story.d.ts +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/index.d.ts +1 -1
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +4 -4
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/styles.d.ts +1 -1
- package/build-types/dropdown/styles.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/index.d.ts +7 -7
- package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/styles.d.ts +12 -12
- package/build-types/duotone-picker/color-list-picker/index.d.ts +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
- package/build-types/duotone-picker/custom-duotone-bar.d.ts +1 -1
- package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-swatch.d.ts +1 -1
- package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
- package/build-types/duotone-picker/utils.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +68 -58
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +69 -59
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +69 -59
- package/build-types/flex/flex-block/hook.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +69 -59
- package/build-types/flex/flex-item/hook.d.ts.map +1 -1
- package/build-types/focal-point-picker/controls.d.ts +1 -1
- package/build-types/focal-point-picker/controls.d.ts.map +1 -1
- package/build-types/focal-point-picker/focal-point.d.ts +1 -1
- package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
- package/build-types/focal-point-picker/grid.d.ts +1 -1
- package/build-types/focal-point-picker/grid.d.ts.map +1 -1
- package/build-types/focal-point-picker/index.d.ts +1 -1
- package/build-types/focal-point-picker/index.d.ts.map +1 -1
- package/build-types/focal-point-picker/media.d.ts +1 -1
- package/build-types/focal-point-picker/media.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +8 -8
- 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 +9 -9
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
- package/build-types/focal-point-picker/styles/focal-point-style.d.ts +1 -1
- package/build-types/focal-point-picker/test/index.d.ts +2 -0
- package/build-types/focal-point-picker/test/index.d.ts.map +1 -0
- package/build-types/focal-point-picker/test/media.d.ts +2 -0
- package/build-types/focal-point-picker/test/media.d.ts.map +1 -0
- package/build-types/focal-point-picker/utils.d.ts.map +1 -1
- package/build-types/focusable-iframe/index.d.ts +1 -1
- package/build-types/focusable-iframe/index.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-select.d.ts +1 -1
- package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +1 -1
- package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +4 -4
- package/build-types/font-size-picker/types.d.ts +2 -0
- package/build-types/font-size-picker/types.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts +1 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/index.d.ts +2 -2
- package/build-types/form-toggle/index.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts +1 -1
- package/build-types/form-token-field/suggestions-list.d.ts +2 -1
- package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
- package/build-types/form-token-field/token-input.d.ts +2 -2
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/form-token-field/token.d.ts +1 -1
- package/build-types/form-token-field/token.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts +1 -1
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +69 -59
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/guide/icons.d.ts +1 -1
- package/build-types/guide/icons.d.ts.map +1 -1
- package/build-types/guide/index.d.ts +1 -1
- package/build-types/guide/index.d.ts.map +1 -1
- package/build-types/guide/page-control.d.ts +1 -1
- package/build-types/guide/page-control.d.ts.map +1 -1
- package/build-types/guide/page.d.ts +1 -1
- package/build-types/guide/page.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +69 -59
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +69 -59
- package/build-types/heading/hook.d.ts.map +1 -1
- package/build-types/higher-order/navigate-regions/index.d.ts +1 -1
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts +1 -1
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
- package/build-types/higher-order/with-fallback-styles/index.d.ts +1 -1
- package/build-types/higher-order/with-filters/index.d.ts +2 -2
- package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
- package/build-types/higher-order/with-notices/index.d.ts +2 -2
- package/build-types/higher-order/with-spoken-messages/index.d.ts +1 -1
- package/build-types/icon/index.d.ts +1 -1
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/input-control/backdrop.d.ts +1 -1
- package/build-types/input-control/backdrop.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/label.d.ts +1 -1
- package/build-types/input-control/label.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +2 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +8 -8
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/utils.d.ts.map +1 -1
- package/build-types/isolated-event-container/index.d.ts +1 -1
- package/build-types/isolated-event-container/index.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +70 -60
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +69 -59
- package/build-types/item-group/item-group/hook.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/index.d.ts +1 -1
- package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
- package/build-types/menu-group/index.d.ts +1 -1
- package/build-types/menu-group/index.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts +1 -1
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +4 -4
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/index.d.ts +1 -1
- package/build-types/menu-items-choice/index.d.ts.map +1 -1
- package/build-types/modal/aria-helper.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/navigable-container/container.d.ts +1 -1
- package/build-types/navigable-container/menu.d.ts +2 -2
- package/build-types/navigable-container/menu.d.ts.map +1 -1
- package/build-types/navigable-container/tabbable.d.ts +2 -2
- package/build-types/navigable-container/tabbable.d.ts.map +1 -1
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/group/index.d.ts +1 -1
- package/build-types/navigation/group/index.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts +1 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/item/base-content.d.ts +1 -1
- package/build-types/navigation/item/base-content.d.ts.map +1 -1
- package/build-types/navigation/item/base.d.ts +1 -1
- package/build-types/navigation/item/base.d.ts.map +1 -1
- package/build-types/navigation/item/index.d.ts +1 -1
- package/build-types/navigation/item/index.d.ts.map +1 -1
- package/build-types/navigation/menu/index.d.ts +1 -1
- package/build-types/navigation/menu/index.d.ts.map +1 -1
- package/build-types/navigation/menu/menu-title-search.d.ts +1 -1
- package/build-types/navigation/menu/menu-title.d.ts +1 -1
- package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts +1 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +11 -11
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +70 -61
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +70 -61
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/notice/index.d.ts +1 -1
- package/build-types/notice/index.d.ts.map +1 -1
- package/build-types/notice/list.d.ts +1 -1
- package/build-types/notice/list.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +1 -1
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +1009 -19
- package/build-types/palette-edit/styles.d.ts.map +1 -1
- package/build-types/panel/body.d.ts +1 -1
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/panel/header.d.ts +1 -1
- package/build-types/panel/header.d.ts.map +1 -1
- package/build-types/placeholder/index.d.ts +1 -1
- package/build-types/placeholder/index.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
- package/build-types/popover/stories/e2e/index.story.d.ts +2 -2
- package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/test/utils/index.d.ts +1 -1
- package/build-types/popover/test/utils/index.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts +1 -1
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts +3 -3
- package/build-types/query-controls/author-select.d.ts +1 -1
- package/build-types/query-controls/author-select.d.ts.map +1 -1
- package/build-types/query-controls/category-select.d.ts +1 -1
- package/build-types/query-controls/category-select.d.ts.map +1 -1
- package/build-types/query-controls/index.d.ts +1 -1
- package/build-types/query-controls/index.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts +1 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts +1 -1
- package/build-types/radio-group/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts +1 -1
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts +1 -1
- package/build-types/range-control/mark.d.ts +1 -1
- package/build-types/range-control/mark.d.ts.map +1 -1
- package/build-types/range-control/rail.d.ts +1 -1
- package/build-types/range-control/rail.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +15 -15
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/tooltip.d.ts +1 -1
- package/build-types/range-control/tooltip.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts +3 -3
- package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +4 -4
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +6 -6
- package/build-types/responsive-wrapper/index.d.ts +1 -1
- package/build-types/responsive-wrapper/index.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts +1 -1
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +69 -59
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/styles.d.ts +1 -1
- package/build-types/select-control/chevron-down.d.ts +1 -1
- package/build-types/select-control/chevron-down.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +3 -3
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/shortcut/index.d.ts +1 -1
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +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 +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +7 -7
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts +1 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +2 -2
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +2 -2
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +69 -59
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +2 -2
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/styles.d.ts +3 -3
- package/build-types/style-provider/index.d.ts +1 -1
- package/build-types/style-provider/index.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +69 -59
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +4 -4
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +2 -2
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts +3 -3
- package/build-types/tabs/tablist.d.ts +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/text/get-line-height.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +68 -59
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +3 -3
- package/build-types/text/utils.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +3 -3
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-highlight/index.d.ts +1 -1
- package/build-types/text-highlight/index.d.ts.map +1 -1
- package/build-types/textarea-control/index.d.ts +2 -2
- package/build-types/textarea-control/index.d.ts.map +1 -1
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts +1 -1
- package/build-types/theme/color-algorithms.d.ts.map +1 -1
- package/build-types/theme/index.d.ts +1 -1
- package/build-types/theme/index.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +1 -1
- package/build-types/theme/styles.d.ts +1 -1
- package/build-types/tip/index.d.ts +1 -1
- package/build-types/tip/index.d.ts.map +1 -1
- package/build-types/toggle-control/index.d.ts +2 -2
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +2 -2
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +3 -3
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts +1 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts +1 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +5 -51
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +1 -1
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/index.d.ts +1 -1
- package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
- package/build-types/tools-panel/styles.d.ts +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +71 -61
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +70 -60
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +69 -59
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +1 -1
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/tree-grid/index.d.ts +1 -1
- package/build-types/tree-grid/index.d.ts.map +1 -1
- package/build-types/tree-grid/item.d.ts +1 -1
- package/build-types/tree-grid/item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index-item.d.ts +1 -1
- package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index.d.ts +1 -1
- package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
- package/build-types/tree-grid/row.d.ts +1 -1
- package/build-types/tree-grid/row.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +69 -59
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +1 -1
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +3 -3
- package/build-types/unit-control/unit-select-control.d.ts +1 -1
- package/build-types/utils/colors.d.ts.map +1 -1
- package/build-types/utils/font-size.d.ts.map +1 -1
- package/build-types/utils/get-valid-children.d.ts.map +1 -1
- package/build-types/utils/input/base.d.ts.map +1 -1
- package/build-types/utils/strings.d.ts.map +1 -1
- package/build-types/utils/use-responsive-value.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +69 -59
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +1 -1
- package/build-types/view/component.d.ts +255 -7
- package/build-types/view/component.d.ts.map +1 -1
- package/build-types/z-stack/styles.d.ts +2 -2
- package/package.json +22 -22
- package/src/alignment-matrix-control/icon.tsx +2 -2
- package/src/alignment-matrix-control/index.tsx +5 -6
- package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +4 -3
- package/src/alignment-matrix-control/utils.tsx +6 -2
- package/src/angle-picker-control/index.tsx +2 -2
- package/src/animate/index.tsx +4 -7
- package/src/autocomplete/autocompleter-ui.tsx +5 -3
- package/src/autocomplete/index.tsx +21 -7
- package/src/autocomplete/style.scss +10 -4
- package/src/base-control/README.md +1 -1
- package/src/base-control/hooks.ts +1 -5
- package/src/base-control/index.tsx +2 -5
- package/src/base-control/test/index.tsx +3 -3
- package/src/base-control/types.ts +1 -2
- package/src/border-control/types.ts +4 -0
- package/src/box-control/test/index.tsx +22 -0
- package/src/button/index.tsx +2 -2
- package/src/button/style.scss +4 -6
- package/src/button-group/index.tsx +2 -2
- package/src/card/test/__snapshots__/index.tsx.snap +44 -47
- package/src/checkbox-control/index.tsx +46 -37
- package/src/checkbox-control/style.scss +12 -1
- package/src/checkbox-control/test/__snapshots__/index.tsx.snap +27 -26
- package/src/checkbox-control/test/index.tsx +5 -0
- package/src/circular-option-picker/circular-option-picker-actions.tsx +3 -3
- package/src/circular-option-picker/circular-option-picker-option-group.tsx +2 -2
- package/src/circular-option-picker/circular-option-picker-option.tsx +2 -2
- package/src/circular-option-picker/circular-option-picker.tsx +2 -5
- package/src/circular-option-picker/style.scss +1 -2
- package/src/clipboard-button/index.tsx +2 -2
- package/src/color-indicator/index.tsx +2 -2
- package/src/color-palette/index.tsx +2 -2
- package/src/color-picker/hex-input.tsx +3 -1
- package/src/color-picker/hue-picker.native.js +6 -2
- package/src/color-picker/index.native.js +9 -3
- package/src/color-picker/saturation-picker.native.js +6 -2
- package/src/color-picker/use-deprecated-props.ts +9 -3
- package/src/combobox-control/README.md +1 -1
- package/src/combobox-control/index.tsx +8 -5
- package/src/combobox-control/stories/index.story.tsx +28 -0
- package/src/combobox-control/types.ts +1 -0
- package/src/context/context-connect.ts +6 -2
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +3 -3
- package/src/custom-gradient-picker/gradient-bar/index.tsx +2 -2
- package/src/custom-gradient-picker/index.tsx +2 -2
- package/src/custom-select-control/index.js +3 -6
- package/src/custom-select-control-v2/README.md +0 -4
- package/src/custom-select-control-v2/legacy-component/index.tsx +3 -1
- package/src/custom-select-control-v2/stories/default.story.tsx +1 -1
- package/src/custom-select-control-v2/stories/legacy.story.tsx +1 -1
- package/src/dimension-control/index.tsx +2 -5
- package/src/drop-zone/index.tsx +68 -68
- package/src/dropdown/index.tsx +2 -2
- package/src/dropdown/styles.ts +3 -1
- package/src/dropdown-menu/index.native.js +6 -12
- package/src/dropdown-menu/index.tsx +9 -16
- package/src/duotone-picker/utils.ts +3 -1
- package/src/elevation/hook.ts +6 -3
- package/src/elevation/test/__snapshots__/index.tsx.snap +18 -24
- package/src/external-link/index.tsx +2 -2
- package/src/flex/test/__snapshots__/index.tsx.snap +4 -4
- package/src/focal-point-picker/controls.tsx +3 -1
- package/src/focal-point-picker/focal-point.tsx +2 -4
- package/src/focal-point-picker/index.tsx +22 -12
- package/src/focal-point-picker/styles/focal-point-picker-style.ts +4 -3
- package/src/focal-point-picker/test/{index.js → index.tsx} +44 -17
- package/src/focal-point-picker/test/{media.js → media.tsx} +18 -13
- package/src/focal-point-picker/tooltip/index.native.js +1 -7
- package/src/focal-point-picker/utils.ts +3 -1
- package/src/font-size-picker/README.md +1 -0
- package/src/font-size-picker/index.tsx +4 -2
- package/src/font-size-picker/stories/index.story.tsx +0 -1
- package/src/font-size-picker/types.ts +2 -0
- package/src/form-toggle/index.tsx +2 -2
- package/src/form-token-field/index.tsx +10 -8
- package/src/form-token-field/style.scss +9 -0
- package/src/form-token-field/suggestions-list.tsx +16 -10
- package/src/form-token-field/token-input.tsx +2 -2
- package/src/form-token-field/token.tsx +2 -2
- package/src/guide/index.tsx +2 -2
- package/src/higher-order/navigate-regions/style.scss +3 -3
- package/src/input-control/index.tsx +3 -6
- package/src/input-control/input-field.tsx +3 -1
- package/src/input-control/label.tsx +3 -1
- package/src/input-control/stories/index.story.tsx +31 -1
- package/src/input-control/styles/input-control-styles.tsx +12 -4
- package/src/input-control/test/index.js +10 -6
- package/src/input-control/utils.ts +3 -2
- package/src/item-group/item/hook.ts +1 -10
- package/src/item-group/test/__snapshots__/index.js.snap +16 -16
- package/src/menu-group/index.tsx +2 -2
- package/src/menu-item/index.tsx +3 -3
- package/src/mobile/color-settings/utils.native.js +1 -1
- package/src/mobile/gradient/index.native.js +3 -1
- package/src/mobile/keyboard-aware-flat-list/index.android.js +11 -2
- package/src/mobile/keyboard-aware-flat-list/index.ios.js +30 -19
- package/src/mobile/keyboard-aware-flat-list/shared.native.js +26 -0
- package/src/mobile/keyboard-aware-flat-list/styles.native.scss +8 -0
- package/src/modal/aria-helper.ts +8 -3
- package/src/modal/index.tsx +10 -6
- package/src/modal/test/index.tsx +11 -4
- package/src/navigation/back-button/index.tsx +2 -5
- package/src/navigation/group/index.tsx +2 -2
- package/src/navigation/index.tsx +3 -3
- package/src/navigation/item/base.tsx +2 -2
- package/src/navigation/item/index.tsx +2 -2
- package/src/navigation/menu/index.tsx +2 -2
- package/src/navigation/styles/navigation-styles.tsx +4 -3
- package/src/notice/index.tsx +5 -10
- package/src/notice/list.tsx +2 -2
- package/src/number-control/index.tsx +2 -2
- package/src/palette-edit/index.tsx +10 -8
- package/src/palette-edit/styles.ts +2 -3
- package/src/panel/body.tsx +5 -3
- package/src/panel/index.tsx +2 -2
- package/src/panel/row.tsx +2 -2
- package/src/panel/style.scss +1 -0
- package/src/placeholder/index.tsx +3 -3
- package/src/placeholder/style.scss +12 -35
- package/src/popover/index.tsx +4 -3
- package/src/popover/overlay-middlewares.tsx +3 -1
- package/src/popover/stories/index.story.tsx +0 -2
- package/src/query-controls/author-select.tsx +3 -1
- package/src/radio-control/index.tsx +2 -2
- package/src/range-control/index.tsx +3 -3
- package/src/range-control/mark.tsx +3 -3
- package/src/range-control/rail.tsx +1 -1
- package/src/range-control/styles/range-control-styles.ts +5 -3
- package/src/range-control/tooltip.tsx +2 -2
- package/src/resizable-box/index.tsx +10 -10
- package/src/resizable-box/resize-tooltip/index.tsx +5 -3
- package/src/resizable-box/resize-tooltip/label.tsx +3 -1
- package/src/resizable-box/resize-tooltip/utils.ts +12 -4
- package/src/responsive-wrapper/index.tsx +2 -2
- package/src/search-control/index.tsx +2 -5
- package/src/select-control/index.tsx +5 -3
- package/src/select-control/styles/select-control-styles.ts +3 -1
- package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +2 -1
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +1 -1
- package/src/slot-fill/bubbles-virtually/use-slot.ts +1 -1
- package/src/slot-fill/types.ts +2 -2
- package/src/snackbar/index.tsx +5 -8
- package/src/snackbar/list.tsx +2 -2
- package/src/spinner/index.tsx +2 -2
- package/src/surface/test/__snapshots__/index.tsx.snap +10 -10
- package/src/tab-panel/index.tsx +2 -2
- package/src/text/get-line-height.ts +6 -2
- package/src/text/utils.ts +6 -2
- package/src/text-control/index.tsx +2 -2
- package/src/theme/color-algorithms.ts +6 -2
- package/src/theme/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +18 -26
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +3 -1
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +7 -6
- package/src/toolbar/toolbar/index.tsx +2 -2
- package/src/toolbar/toolbar/style.scss +2 -14
- package/src/toolbar/toolbar-button/index.tsx +3 -3
- package/src/toolbar/toolbar-group/index.tsx +2 -2
- package/src/tools-panel/tools-panel/hook.ts +9 -6
- package/src/tools-panel/tools-panel-item/hook.ts +12 -8
- package/src/tools-panel/types.ts +1 -0
- package/src/tree-grid/roving-tab-index-item.tsx +3 -1
- package/src/truncate/hook.ts +1 -1
- package/src/unit-control/index.tsx +7 -3
- package/src/unit-control/unit-select-control.tsx +2 -2
- package/src/utils/colors.js +21 -7
- package/src/utils/font-size.ts +3 -1
- package/src/utils/get-valid-children.ts +3 -1
- package/src/utils/input/base.js +4 -3
- package/src/utils/strings.ts +11 -59
- package/src/utils/test/strings.js +62 -0
- package/src/utils/theme-variables.scss +4 -0
- package/src/utils/use-responsive-value.ts +2 -1
- package/src/view/component.tsx +18 -11
- package/tsconfig.json +1 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/slot-fill/bubbles-virtually/observable-map.js +0 -68
- package/build/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
- package/build/view/types.js +0 -6
- package/build/view/types.js.map +0 -1
- package/build-module/slot-fill/bubbles-virtually/observable-map.js +0 -60
- package/build-module/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
- package/build-module/view/types.js +0 -2
- package/build-module/view/types.js.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts +0 -19
- package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts.map +0 -1
- package/build-types/view/types.d.ts +0 -8
- package/build-types/view/types.d.ts.map +0 -1
- package/src/slot-fill/bubbles-virtually/observable-map.ts +0 -79
- package/src/slot-fill/test/observable-map.js +0 -83
- package/src/utils/hooks/stories/use-cx.js +0 -157
- package/src/view/types.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react2","require","_flex","_text","_utils","_space","_EMOTION_STRINGIFIED_CSS_ERROR__","Prefix","exports","_base","default","process","env","NODE_ENV","target","label","name","styles","map","toString","Suffix","backdropBorderColor","disabled","isBorderless","COLORS","ui","borderDisabled","border","BackdropUI","rtl","paddingLeft","Root","Flex","borderFocus","CONFIG","controlBoxShadowFocus","containerDisabledStyles","backgroundColor","backgroundDisabled","background","css","_ref","containerWidthStyles","__unstableInputWidth","labelPosition","flex","width","Container","disabledStyles","color","textDisabled","fontSizeStyles","inputSize","size","sizes","small","compact","fontSize","fontSizeMobile","getSizeConfig","__next40pxDefaultSize","height","lineHeight","minHeight","space","paddingRight","sizeStyles","props","customPaddings","paddingInlineStart","paddingInlineEnd","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","theme","foreground","BaseLabel","Text","baseLabelTypography","Label","_react","createElement","as","LabelWrapper","FlexItem"],"sources":["@wordpress/components/src/input-control/styles/input-control-styles.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { baseLabelTypography, COLORS, CONFIG, rtl } from '../../utils';\nimport type { LabelPosition, Size } from '../types';\nimport { space } from '../../utils/space';\n\ntype ContainerProps = {\n\tdisabled?: boolean;\n\thideLabel?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\tlabelPosition?: LabelPosition;\n};\n\nexport const Prefix = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n`;\n\nexport const Suffix = styled.span`\n\talign-items: center;\n\talign-self: stretch;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n`;\n\ntype BackdropProps = {\n\tdisabled?: boolean;\n\tisBorderless?: boolean;\n};\n\nconst backdropBorderColor = ( {\n\tdisabled,\n\tisBorderless,\n}: BackdropProps ): CSSProperties[ 'borderColor' ] => {\n\tif ( isBorderless ) {\n\t\treturn 'transparent';\n\t}\n\n\tif ( disabled ) {\n\t\treturn COLORS.ui.borderDisabled;\n\t}\n\n\treturn COLORS.ui.border;\n};\n\nexport const BackdropUI = styled.div< BackdropProps >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tborder-color: ${ backdropBorderColor };\n\t\tborder-radius: inherit;\n\t\tborder-style: solid;\n\t\tborder-width: 1px;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\n\t\t${ rtl( { paddingLeft: 2 } ) }\n\t}\n`;\n\nexport const Root = styled( Flex )`\n\tbox-sizing: border-box;\n\tposition: relative;\n\tborder-radius: 2px;\n\tpadding-top: 0;\n\n\t// Focus within, excluding cases where auxiliary controls in prefix or suffix have focus.\n\t&:focus-within:not( :has( :is( ${ Prefix }, ${ Suffix } ):focus-within ) ) {\n\t\tz-index: 1;\n\n\t\t${ BackdropUI } {\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tbox-shadow: ${ CONFIG.controlBoxShadowFocus };\n\t\t\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\t\t\toutline: 2px solid transparent;\n\t\t\toutline-offset: -2px;\n\t\t}\n\t}\n`;\n\nconst containerDisabledStyles = ( { disabled }: ContainerProps ) => {\n\tconst backgroundColor = disabled\n\t\t? COLORS.ui.backgroundDisabled\n\t\t: COLORS.ui.background;\n\n\treturn css( { backgroundColor } );\n};\n\nconst containerWidthStyles = ( {\n\t__unstableInputWidth,\n\tlabelPosition,\n}: ContainerProps ) => {\n\tif ( ! __unstableInputWidth ) return css( { width: '100%' } );\n\n\tif ( labelPosition === 'side' ) return '';\n\n\tif ( labelPosition === 'edge' ) {\n\t\treturn css( {\n\t\t\tflex: `0 0 ${ __unstableInputWidth }`,\n\t\t} );\n\t}\n\n\treturn css( { width: __unstableInputWidth } );\n};\n\nexport const Container = styled.div< ContainerProps >`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tborder-radius: inherit;\n\tdisplay: flex;\n\tflex: 1;\n\tposition: relative;\n\n\t${ containerDisabledStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\t__next40pxDefaultSize?: boolean;\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n};\n\nconst disabledStyles = ( { disabled }: InputProps ) => {\n\tif ( ! disabled ) return '';\n\n\treturn css( {\n\t\tcolor: COLORS.ui.textDisabled,\n\t} );\n};\n\nexport const fontSizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\tcompact: '13px',\n\t\t'__unstable-large': '13px',\n\t};\n\n\tconst fontSize = sizes[ size as Size ] || sizes.default;\n\tconst fontSizeMobile = '16px';\n\n\tif ( ! fontSize ) return '';\n\n\treturn css`\n\t\tfont-size: ${ fontSizeMobile };\n\n\t\t@media ( min-width: 600px ) {\n\t\t\tfont-size: ${ fontSize };\n\t\t}\n\t`;\n};\n\nexport const getSizeConfig = ( {\n\tinputSize: size,\n\t__next40pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 24,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t},\n\t\tcompact: {\n\t\t\theight: 32,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 32,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t};\n\n\tif ( ! __next40pxDefaultSize ) {\n\t\tsizes.default = sizes.compact;\n\t}\n\n\treturn sizes[ size as Size ] || sizes.default;\n};\n\nconst sizeStyles = ( props: InputProps ) => {\n\treturn css( getSizeConfig( props ) );\n};\n\nconst customPaddings = ( {\n\tpaddingInlineStart,\n\tpaddingInlineEnd,\n}: InputProps ) => {\n\treturn css( { paddingInlineStart, paddingInlineEnd } );\n};\n\nconst dragStyles = ( { isDragging, dragCursor }: InputProps ) => {\n\tlet defaultArrowStyles: SerializedStyles | undefined;\n\tlet activeDragCursorStyles: SerializedStyles | undefined;\n\n\tif ( isDragging ) {\n\t\tdefaultArrowStyles = css`\n\t\t\tcursor: ${ dragCursor };\n\t\t\tuser-select: none;\n\n\t\t\t&::-webkit-outer-spin-button,\n\t\t\t&::-webkit-inner-spin-button {\n\t\t\t\t-webkit-appearance: none !important;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t`;\n\t}\n\n\tif ( isDragging && dragCursor ) {\n\t\tactiveDragCursorStyles = css`\n\t\t\t&:active {\n\t\t\t\tcursor: ${ dragCursor };\n\t\t\t}\n\t\t`;\n\t}\n\n\treturn css`\n\t\t${ defaultArrowStyles }\n\t\t${ activeDragCursorStyles }\n\t`;\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Input = styled.input< InputProps >`\n\t&&& {\n\t\tbackground-color: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: ${ COLORS.theme.foreground };\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\toutline: none;\n\t\twidth: 100%;\n\n\t\t${ dragStyles }\n\t\t${ disabledStyles }\n\t\t${ fontSizeStyles }\n\t\t${ sizeStyles }\n\t\t${ customPaddings }\n\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\t}\n`;\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\t${ baseLabelTypography };\n\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\tpadding-top: 0;\n\t\tpadding-bottom: 0;\n\t\tmax-width: 100%;\n\t\tz-index: 1;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n`;\n\nexport const Label = (\n\tprops: WordPressComponentProps<\n\t\t{ labelPosition?: LabelPosition; children: ReactNode },\n\t\t'label',\n\t\tfalse\n\t>\n) => <BaseLabel { ...props } as=\"label\" />;\n\nexport const LabelWrapper = styled( FlexItem )`\n\tmax-width: calc( 100% - 10px );\n`;\n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A;AAE3B,CAAC;;AAED;AACA;;AAEO,MAAM+D,KAAK,GAAApE,OAAA,CAAAoE,KAAA,oBAAAnE,KAAA,CAAAC,OAAA,WAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,0GAMNS,aAAM,CAACqD,KAAK,CAACC,UAAU,0EAO9BP,UAAU,OACVvB,cAAc,OACdG,cAAc,OACde,UAAU,OACVE,cAAc,2DAAAzD,OAAA,CAAAC,GAAA,CAAAC,QAAA,o8TAMlB;AAED,MAAMkE,SAAS,gBAAG,IAAAtE,KAAA,CAAAC,OAAA,EAAQsE,UAAI,EAAArE,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,SAE3BkE,0BAAmB,gKAAAtE,OAAA,CAAAC,GAAA,CAAAC,QAAA,o8TAavB;AAEM,MAAMqE,KAAK,GACjBf,KAIC,IACG,IAAAgB,MAAA,CAAAC,aAAA,EAACL,SAAS;EAAA,GAAMZ,KAAK;EAAGkB,EAAE,EAAC;AAAO,CAAE,CAAC;AAAC7E,OAAA,CAAA0E,KAAA,GAAAA,KAAA;AAEpC,MAAMI,YAAY,GAAA9E,OAAA,CAAA8E,YAAA,gBAAG,IAAA7E,KAAA,CAAAC,OAAA,EAAQ6E,cAAQ,EAAA5E,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAb;AAAA,EAE7C","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react2","require","_flex","_text","_utils","_space","_EMOTION_STRINGIFIED_CSS_ERROR__","Prefix","exports","_base","default","process","env","NODE_ENV","target","label","name","styles","map","toString","Suffix","backdropBorderColor","disabled","isBorderless","COLORS","ui","borderDisabled","border","BackdropUI","rtl","paddingLeft","Root","Flex","borderFocus","CONFIG","controlBoxShadowFocus","containerDisabledStyles","backgroundColor","backgroundDisabled","background","css","_ref","containerWidthStyles","__unstableInputWidth","labelPosition","flex","width","Container","disabledStyles","color","textDisabled","fontSizeStyles","inputSize","size","sizes","small","compact","fontSize","fontSizeMobile","getSizeConfig","__next40pxDefaultSize","height","lineHeight","minHeight","space","paddingRight","sizeStyles","props","customPaddings","paddingInlineStart","paddingInlineEnd","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","theme","foreground","BaseLabel","Text","baseLabelTypography","Label","_react","createElement","as","LabelWrapper","FlexItem"],"sources":["@wordpress/components/src/input-control/styles/input-control-styles.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { baseLabelTypography, COLORS, CONFIG, rtl } from '../../utils';\nimport type { LabelPosition, Size } from '../types';\nimport { space } from '../../utils/space';\n\ntype ContainerProps = {\n\tdisabled?: boolean;\n\thideLabel?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\tlabelPosition?: LabelPosition;\n};\n\nexport const Prefix = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n`;\n\nexport const Suffix = styled.span`\n\talign-items: center;\n\talign-self: stretch;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n`;\n\ntype BackdropProps = {\n\tdisabled?: boolean;\n\tisBorderless?: boolean;\n};\n\nconst backdropBorderColor = ( {\n\tdisabled,\n\tisBorderless,\n}: BackdropProps ): CSSProperties[ 'borderColor' ] => {\n\tif ( isBorderless ) {\n\t\treturn 'transparent';\n\t}\n\n\tif ( disabled ) {\n\t\treturn COLORS.ui.borderDisabled;\n\t}\n\n\treturn COLORS.ui.border;\n};\n\nexport const BackdropUI = styled.div< BackdropProps >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tborder-color: ${ backdropBorderColor };\n\t\tborder-radius: inherit;\n\t\tborder-style: solid;\n\t\tborder-width: 1px;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\n\t\t${ rtl( { paddingLeft: 2 } ) }\n\t}\n`;\n\nexport const Root = styled( Flex )`\n\tbox-sizing: border-box;\n\tposition: relative;\n\tborder-radius: 2px;\n\tpadding-top: 0;\n\n\t// Focus within, excluding cases where auxiliary controls in prefix or suffix have focus.\n\t&:focus-within:not( :has( :is( ${ Prefix }, ${ Suffix } ):focus-within ) ) {\n\t\tz-index: 1;\n\n\t\t${ BackdropUI } {\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tbox-shadow: ${ CONFIG.controlBoxShadowFocus };\n\t\t\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\t\t\toutline: 2px solid transparent;\n\t\t\toutline-offset: -2px;\n\t\t}\n\t}\n`;\n\nconst containerDisabledStyles = ( { disabled }: ContainerProps ) => {\n\tconst backgroundColor = disabled\n\t\t? COLORS.ui.backgroundDisabled\n\t\t: COLORS.ui.background;\n\n\treturn css( { backgroundColor } );\n};\n\nconst containerWidthStyles = ( {\n\t__unstableInputWidth,\n\tlabelPosition,\n}: ContainerProps ) => {\n\tif ( ! __unstableInputWidth ) {\n\t\treturn css( { width: '100%' } );\n\t}\n\n\tif ( labelPosition === 'side' ) {\n\t\treturn '';\n\t}\n\n\tif ( labelPosition === 'edge' ) {\n\t\treturn css( {\n\t\t\tflex: `0 0 ${ __unstableInputWidth }`,\n\t\t} );\n\t}\n\n\treturn css( { width: __unstableInputWidth } );\n};\n\nexport const Container = styled.div< ContainerProps >`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tborder-radius: inherit;\n\tdisplay: flex;\n\tflex: 1;\n\tposition: relative;\n\n\t${ containerDisabledStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\t__next40pxDefaultSize?: boolean;\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n};\n\nconst disabledStyles = ( { disabled }: InputProps ) => {\n\tif ( ! disabled ) {\n\t\treturn '';\n\t}\n\n\treturn css( {\n\t\tcolor: COLORS.ui.textDisabled,\n\t} );\n};\n\nexport const fontSizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\tcompact: '13px',\n\t\t'__unstable-large': '13px',\n\t};\n\n\tconst fontSize = sizes[ size as Size ] || sizes.default;\n\tconst fontSizeMobile = '16px';\n\n\tif ( ! fontSize ) {\n\t\treturn '';\n\t}\n\n\treturn css`\n\t\tfont-size: ${ fontSizeMobile };\n\n\t\t@media ( min-width: 600px ) {\n\t\t\tfont-size: ${ fontSize };\n\t\t}\n\t`;\n};\n\nexport const getSizeConfig = ( {\n\tinputSize: size,\n\t__next40pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 24,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t},\n\t\tcompact: {\n\t\t\theight: 32,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 32,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t};\n\n\tif ( ! __next40pxDefaultSize ) {\n\t\tsizes.default = sizes.compact;\n\t}\n\n\treturn sizes[ size as Size ] || sizes.default;\n};\n\nconst sizeStyles = ( props: InputProps ) => {\n\treturn css( getSizeConfig( props ) );\n};\n\nconst customPaddings = ( {\n\tpaddingInlineStart,\n\tpaddingInlineEnd,\n}: InputProps ) => {\n\treturn css( { paddingInlineStart, paddingInlineEnd } );\n};\n\nconst dragStyles = ( { isDragging, dragCursor }: InputProps ) => {\n\tlet defaultArrowStyles: SerializedStyles | undefined;\n\tlet activeDragCursorStyles: SerializedStyles | undefined;\n\n\tif ( isDragging ) {\n\t\tdefaultArrowStyles = css`\n\t\t\tcursor: ${ dragCursor };\n\t\t\tuser-select: none;\n\n\t\t\t&::-webkit-outer-spin-button,\n\t\t\t&::-webkit-inner-spin-button {\n\t\t\t\t-webkit-appearance: none !important;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t`;\n\t}\n\n\tif ( isDragging && dragCursor ) {\n\t\tactiveDragCursorStyles = css`\n\t\t\t&:active {\n\t\t\t\tcursor: ${ dragCursor };\n\t\t\t}\n\t\t`;\n\t}\n\n\treturn css`\n\t\t${ defaultArrowStyles }\n\t\t${ activeDragCursorStyles }\n\t`;\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Input = styled.input< InputProps >`\n\t&&& {\n\t\tbackground-color: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: ${ COLORS.theme.foreground };\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\toutline: none;\n\t\twidth: 100%;\n\n\t\t${ dragStyles }\n\t\t${ disabledStyles }\n\t\t${ fontSizeStyles }\n\t\t${ sizeStyles }\n\t\t${ customPaddings }\n\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\t}\n`;\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\t${ baseLabelTypography };\n\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\tpadding-top: 0;\n\t\tpadding-bottom: 0;\n\t\tmax-width: 100%;\n\t\tz-index: 1;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n`;\n\nexport const Label = (\n\tprops: WordPressComponentProps<\n\t\t{ labelPosition?: LabelPosition; children: ReactNode },\n\t\t'label',\n\t\tfalse\n\t>\n) => <BaseLabel { ...props } as=\"label\" />;\n\nexport const LabelWrapper = styled( FlexItem )`\n\tmax-width: calc( 100% - 10px );\n`;\n"],"mappings":";;;;;;;;;AAIA,IAAAA,OAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA0C,SAAAK,iCAAA,gPAhB1C;AACA;AACA,GAFA,CAQA;AACA;AACA;AAeO,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,oBAAAE,KAAA,CAAAC,OAAA,UAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,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AAAC,KAAA;AAAA,CAAC,CAAC,SAE3BkE,0BAAmB,gKAAAtE,OAAA,CAAAC,GAAA,CAAAC,QAAA,ogUAavB;AAEM,MAAMqE,KAAK,GACjBf,KAIC,IACG,IAAAgB,MAAA,CAAAC,aAAA,EAACL,SAAS;EAAA,GAAMZ,KAAK;EAAGkB,EAAE,EAAC;AAAO,CAAE,CAAC;AAAC7E,OAAA,CAAA0E,KAAA,GAAAA,KAAA;AAEpC,MAAMI,YAAY,GAAA9E,OAAA,CAAA8E,YAAA,gBAAG,IAAA7E,KAAA,CAAAC,OAAA,EAAQ6E,cAAQ,EAAA5E,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAb;AAAA,EAE7C","ignoreList":[]}
|
|
@@ -73,10 +73,14 @@ function useDraft(props) {
|
|
|
73
73
|
current: previousValue
|
|
74
74
|
} = refPreviousValue;
|
|
75
75
|
refPreviousValue.current = props.value;
|
|
76
|
-
if (draft.value !== undefined && !draft.isStale)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
if (draft.value !== undefined && !draft.isStale) {
|
|
77
|
+
setDraft({
|
|
78
|
+
...draft,
|
|
79
|
+
isStale: true
|
|
80
|
+
});
|
|
81
|
+
} else if (draft.isStale && props.value !== previousValue) {
|
|
82
|
+
setDraft({});
|
|
83
|
+
}
|
|
80
84
|
}, [props.value, draft]);
|
|
81
85
|
const onChange = (nextValue, extra) => {
|
|
82
86
|
// Mutates the draft value to avoid an extra effect run.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","getDragCursor","dragDirection","dragCursor","useDragCursor","isDragging","useEffect","document","documentElement","style","cursor","useDraft","props","refPreviousValue","useRef","value","draft","setDraft","useState","undefined","useLayoutEffect","current","previousValue","isStale","onChange","nextValue","extra","Object","assign","onBlur","event"],"sources":["@wordpress/components/src/input-control/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { InputChangeCallback } from './types';\n\n/**\n * Gets a CSS cursor value based on a drag direction.\n *\n * @param dragDirection The drag direction.\n * @return The CSS cursor value.\n */\nexport function getDragCursor( dragDirection: string ): string {\n\tlet dragCursor = 'ns-resize';\n\n\tswitch ( dragDirection ) {\n\t\tcase 'n':\n\t\tcase 's':\n\t\t\tdragCursor = 'ns-resize';\n\t\t\tbreak;\n\n\t\tcase 'e':\n\t\tcase 'w':\n\t\t\tdragCursor = 'ew-resize';\n\t\t\tbreak;\n\t}\n\n\treturn dragCursor;\n}\n\n/**\n * Custom hook that renders a drag cursor when dragging.\n *\n * @param {boolean} isDragging The dragging state.\n * @param {string} dragDirection The drag direction.\n *\n * @return {string} The CSS cursor value.\n */\nexport function useDragCursor(\n\tisDragging: boolean,\n\tdragDirection: string\n): string {\n\tconst dragCursor = getDragCursor( dragDirection );\n\n\tuseEffect( () => {\n\t\tif ( isDragging ) {\n\t\t\tdocument.documentElement.style.cursor = dragCursor;\n\t\t} else {\n\t\t\t// @ts-expect-error\n\t\t\tdocument.documentElement.style.cursor = null;\n\t\t}\n\t}, [ isDragging, dragCursor ] );\n\n\treturn dragCursor;\n}\n\nexport function useDraft( props: {\n\tvalue: string | undefined;\n\tonBlur?: FocusEventHandler;\n\tonChange: InputChangeCallback;\n} ) {\n\tconst refPreviousValue = useRef( props.value );\n\tconst [ draft, setDraft ] = useState< {\n\t\tvalue?: string;\n\t\tisStale?: boolean;\n\t} >( {} );\n\tconst value = draft.value !== undefined ? draft.value : props.value;\n\n\t// Determines when to discard the draft value to restore controlled status.\n\t// To do so, it tracks the previous value and marks the draft value as stale\n\t// after each render.\n\tuseLayoutEffect( () => {\n\t\tconst { current: previousValue } = refPreviousValue;\n\t\trefPreviousValue.current = props.value;\n\t\tif ( draft.value !== undefined && ! draft.isStale )\n\t\t\tsetDraft( { ...draft, isStale: true } );\n\t\
|
|
1
|
+
{"version":3,"names":["_element","require","getDragCursor","dragDirection","dragCursor","useDragCursor","isDragging","useEffect","document","documentElement","style","cursor","useDraft","props","refPreviousValue","useRef","value","draft","setDraft","useState","undefined","useLayoutEffect","current","previousValue","isStale","onChange","nextValue","extra","Object","assign","onBlur","event"],"sources":["@wordpress/components/src/input-control/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { InputChangeCallback } from './types';\n\n/**\n * Gets a CSS cursor value based on a drag direction.\n *\n * @param dragDirection The drag direction.\n * @return The CSS cursor value.\n */\nexport function getDragCursor( dragDirection: string ): string {\n\tlet dragCursor = 'ns-resize';\n\n\tswitch ( dragDirection ) {\n\t\tcase 'n':\n\t\tcase 's':\n\t\t\tdragCursor = 'ns-resize';\n\t\t\tbreak;\n\n\t\tcase 'e':\n\t\tcase 'w':\n\t\t\tdragCursor = 'ew-resize';\n\t\t\tbreak;\n\t}\n\n\treturn dragCursor;\n}\n\n/**\n * Custom hook that renders a drag cursor when dragging.\n *\n * @param {boolean} isDragging The dragging state.\n * @param {string} dragDirection The drag direction.\n *\n * @return {string} The CSS cursor value.\n */\nexport function useDragCursor(\n\tisDragging: boolean,\n\tdragDirection: string\n): string {\n\tconst dragCursor = getDragCursor( dragDirection );\n\n\tuseEffect( () => {\n\t\tif ( isDragging ) {\n\t\t\tdocument.documentElement.style.cursor = dragCursor;\n\t\t} else {\n\t\t\t// @ts-expect-error\n\t\t\tdocument.documentElement.style.cursor = null;\n\t\t}\n\t}, [ isDragging, dragCursor ] );\n\n\treturn dragCursor;\n}\n\nexport function useDraft( props: {\n\tvalue: string | undefined;\n\tonBlur?: FocusEventHandler;\n\tonChange: InputChangeCallback;\n} ) {\n\tconst refPreviousValue = useRef( props.value );\n\tconst [ draft, setDraft ] = useState< {\n\t\tvalue?: string;\n\t\tisStale?: boolean;\n\t} >( {} );\n\tconst value = draft.value !== undefined ? draft.value : props.value;\n\n\t// Determines when to discard the draft value to restore controlled status.\n\t// To do so, it tracks the previous value and marks the draft value as stale\n\t// after each render.\n\tuseLayoutEffect( () => {\n\t\tconst { current: previousValue } = refPreviousValue;\n\t\trefPreviousValue.current = props.value;\n\t\tif ( draft.value !== undefined && ! draft.isStale ) {\n\t\t\tsetDraft( { ...draft, isStale: true } );\n\t\t} else if ( draft.isStale && props.value !== previousValue ) {\n\t\t\tsetDraft( {} );\n\t\t}\n\t}, [ props.value, draft ] );\n\n\tconst onChange: InputChangeCallback = ( nextValue, extra ) => {\n\t\t// Mutates the draft value to avoid an extra effect run.\n\t\tsetDraft( ( current ) =>\n\t\t\tObject.assign( current, { value: nextValue, isStale: false } )\n\t\t);\n\t\tprops.onChange( nextValue, extra );\n\t};\n\tconst onBlur: FocusEventHandler = ( event ) => {\n\t\tsetDraft( {} );\n\t\tprops.onBlur?.( event );\n\t};\n\n\treturn { value, onBlur, onChange };\n}\n"],"mappings":";;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,aAAaA,CAAEC,aAAqB,EAAW;EAC9D,IAAIC,UAAU,GAAG,WAAW;EAE5B,QAASD,aAAa;IACrB,KAAK,GAAG;IACR,KAAK,GAAG;MACPC,UAAU,GAAG,WAAW;MACxB;IAED,KAAK,GAAG;IACR,KAAK,GAAG;MACPA,UAAU,GAAG,W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,CAAE,CAAC;IACf;EACD,CAAC,EAAE,CAAEL,KAAK,CAACG,KAAK,EAAEC,KAAK,CAAG,CAAC;EAE3B,MAAMQ,QAA6B,GAAGA,CAAEC,SAAS,EAAEC,KAAK,KAAM;IAC7D;IACAT,QAAQ,CAAII,OAAO,IAClBM,MAAM,CAACC,MAAM,CAAEP,OAAO,EAAE;MAAEN,KAAK,EAAEU,SAAS;MAAEF,OAAO,EAAE;IAAM,CAAE,CAC9D,CAAC;IACDX,KAAK,CAACY,QAAQ,CAAEC,SAAS,EAAEC,KAAM,CAAC;EACnC,CAAC;EACD,MAAMG,MAAyB,GAAKC,KAAK,IAAM;IAC9Cb,QAAQ,CAAE,CAAC,CAAE,CAAC;IACdL,KAAK,CAACiB,MAAM,GAAIC,KAAM,CAAC;EACxB,CAAC;EAED,OAAO;IAAEf,KAAK;IAAEc,MAAM;IAAEL;EAAS,CAAC;AACnC","ignoreList":[]}
|
|
@@ -11,10 +11,6 @@ var _context2 = require("../context");
|
|
|
11
11
|
var _useCx = require("../../utils/hooks/use-cx");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
/**
|
|
15
|
-
* External dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
14
|
/**
|
|
19
15
|
* WordPress dependencies
|
|
20
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_context","styles","_interopRequireWildcard","_context2","_useCx","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useItem","props","as","asProp","className","onClick","role","size","sizeProp","otherProps","useContextSystem","spacedAround","contextSize","useItemGroupContext","cx","useCx","classes","useMemo","unstyledButton","itemSizes","medium","item","wrapperClassName","itemWrapper"],"sources":["@wordpress/components/src/item-group/item/hook.ts"],"sourcesContent":["/**\n *
|
|
1
|
+
{"version":3,"names":["_element","require","_context","styles","_interopRequireWildcard","_context2","_useCx","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useItem","props","as","asProp","className","onClick","role","size","sizeProp","otherProps","useContextSystem","spacedAround","contextSize","useItemGroupContext","cx","useCx","classes","useMemo","unstyledButton","itemSizes","medium","item","wrapperClassName","itemWrapper"],"sources":["@wordpress/components/src/item-group/item/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport * as styles from '../styles';\nimport { useItemGroupContext } from '../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ItemProps } from '../types';\n\nexport function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {\n\tconst {\n\t\tas: asProp,\n\t\tclassName,\n\t\tonClick,\n\t\trole = 'listitem',\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Item' );\n\n\tconst { spacedAround, size: contextSize } = useItemGroupContext();\n\n\tconst size = sizeProp || contextSize;\n\n\tconst as = asProp || ( typeof onClick !== 'undefined' ? 'button' : 'div' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\t( as === 'button' || as === 'a' ) &&\n\t\t\t\t\tstyles.unstyledButton( as ),\n\t\t\t\tstyles.itemSizes[ size ] || styles.itemSizes.medium,\n\t\t\t\tstyles.item,\n\t\t\t\tspacedAround && styles.spacedAround,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ as, className, cx, size, spacedAround ]\n\t);\n\n\tconst wrapperClassName = cx( styles.itemWrapper );\n\n\treturn {\n\t\tas,\n\t\tclassName: classes,\n\t\tonClick,\n\t\twrapperClassName,\n\t\trole,\n\t\t...otherProps,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAAiD,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA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6C,IAAI,EACXV,YAAY,IAAInC,MAAM,CAACmC,YAAY,EACnCP,SACD,CAAC,EACF,CAAEF,EAAE,EAAEE,SAAS,EAAEU,EAAE,EAAEP,IAAI,EAAEI,YAAY,CACxC,CAAC;EAED,MAAMW,gBAAgB,GAAGR,EAAE,CAAEtC,MAAM,CAAC+C,WAAY,CAAC;EAEjD,OAAO;IACNrB,EAAE;IACFE,SAAS,EAAEY,OAAO;IAClBX,OAAO;IACPiB,gBAAgB;IAChBhB,IAAI;IACJ,GAAGG;EACJ,CAAC;AACF","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.MenuGroup = MenuGroup;
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
10
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
11
|
var _element = require("@wordpress/element");
|
|
12
12
|
var _compose = require("@wordpress/compose");
|
|
13
13
|
/**
|
|
@@ -49,7 +49,7 @@ function MenuGroup(props) {
|
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
51
|
const labelId = `components-menu-group-label-${instanceId}`;
|
|
52
|
-
const classNames = (0,
|
|
52
|
+
const classNames = (0, _clsx.default)(className, 'components-menu-group', {
|
|
53
53
|
'has-hidden-separator': hideSeparator
|
|
54
54
|
});
|
|
55
55
|
return (0, _react.createElement)("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_compose","MenuGroup","props","children","className","label","hideSeparator","instanceId","useInstanceId","Children","count","labelId","classNames","clsx","_react","createElement","id","role","undefined","_default","exports","default"],"sources":["@wordpress/components/src/menu-group/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { MenuGroupProps } from './types';\n\n/**\n * `MenuGroup` wraps a series of related `MenuItem` components into a common\n * section.\n *\n * ```jsx\n * import { MenuGroup, MenuItem } from '@wordpress/components';\n *\n * const MyMenuGroup = () => (\n * <MenuGroup label=\"Settings\">\n * <MenuItem>Setting 1</MenuItem>\n * <MenuItem>Setting 2</MenuItem>\n * </MenuGroup>\n * );\n * ```\n */\nexport function MenuGroup( props: MenuGroupProps ) {\n\tconst { children, className = '', label, hideSeparator } = props;\n\tconst instanceId = useInstanceId( MenuGroup );\n\n\tif ( ! Children.count( children ) ) {\n\t\treturn null;\n\t}\n\n\tconst labelId = `components-menu-group-label-${ instanceId }`;\n\tconst classNames = clsx( className, 'components-menu-group', {\n\t\t'has-hidden-separator': hideSeparator,\n\t} );\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t{ label && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-menu-group__label\"\n\t\t\t\t\tid={ labelId }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div role=\"group\" aria-labelledby={ label ? labelId : undefined }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default MenuGroup;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,SAASA,CAAEC,KAAqB,EAAG;EAClD,MAAM;IAAEC,QAAQ;IAAEC,SAAS,GAAG,EAAE;IAAEC,KAAK;IAAEC;EAAc,CAAC,GAAGJ,KAAK;EAChE,MAAMK,UAAU,GAAG,IAAAC,sBAAa,EAAEP,SAAU,CAAC;EAE7C,IAAK,CAAEQ,iBAAQ,CAACC,KAAK,CAAEP,QAAS,CAAC,EAAG;IACnC,OAAO,IAAI;EACZ;EAEA,MAAMQ,OAAO,GAAI,+BAA+BJ,UAAY,EAAC;EAC7D,MAAMK,UAAU,GAAG,IAAAC,aAAI,EAAET,SAAS,EAAE,uBAAuB,EAAE;IAC5D,sBAAsB,EAAEE;EACzB,CAAE,CAAC;EAEH,OACC,IAAAQ,MAAA,CAAAC,aAAA;IAAKX,SAAS,EAAGQ;EAAY,GAC1BP,KAAK,IACN,IAAAS,MAAA,CAAAC,aAAA;IACCX,SAAS,EAAC,8BAA8B;IACxCY,EAAE,EAAGL,OAAS;IACd,eAAY;EAAM,GAEhBN,KACE,CACL,EACD,IAAAS,MAAA,CAAAC,aAAA;IAAKE,IAAI,EAAC,OAAO;IAAC,mBAAkBZ,KAAK,GAAGM,OAAO,GAAGO;EAAW,GAC9Df,QACE,CACD,CAAC;AAER;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcpB,SAAS","ignoreList":[]}
|
package/build/menu-item/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.MenuItem = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
var _shortcut = _interopRequireDefault(require("../shortcut"));
|
|
12
12
|
var _button = _interopRequireDefault(require("../button"));
|
|
@@ -36,7 +36,7 @@ function UnforwardedMenuItem(props, ref) {
|
|
|
36
36
|
suffix,
|
|
37
37
|
...buttonProps
|
|
38
38
|
} = props;
|
|
39
|
-
className = (0,
|
|
39
|
+
className = (0, _clsx.default)('components-menu-item__button', className);
|
|
40
40
|
if (info) {
|
|
41
41
|
children = (0, _react.createElement)("span", {
|
|
42
42
|
className: "components-menu-item__info-wrapper"
|
|
@@ -48,7 +48,7 @@ function UnforwardedMenuItem(props, ref) {
|
|
|
48
48
|
}
|
|
49
49
|
if (icon && typeof icon !== 'string') {
|
|
50
50
|
icon = (0, _element.cloneElement)(icon, {
|
|
51
|
-
className: (0,
|
|
51
|
+
className: (0, _clsx.default)('components-menu-items__item-icon', {
|
|
52
52
|
'has-icon-right': iconPosition === 'right'
|
|
53
53
|
})
|
|
54
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_shortcut","_button","_icon","UnforwardedMenuItem","props","ref","children","info","className","icon","iconPosition","shortcut","isSelected","role","suffix","buttonProps","clsx","_react","createElement","cloneElement","default","undefined","MenuItem","exports","forwardRef","_default"],"sources":["@wordpress/components/src/menu-item/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from '../shortcut';\nimport Button from '../button';\nimport Icon from '../icon';\nimport type { WordPressComponentProps } from '../context';\nimport type { MenuItemProps } from './types';\n\nfunction UnforwardedMenuItem(\n\tprops: WordPressComponentProps< MenuItemProps, 'button', false >,\n\tref: ForwardedRef< HTMLButtonElement >\n) {\n\tlet {\n\t\tchildren,\n\t\tinfo,\n\t\tclassName,\n\t\ticon,\n\t\ticonPosition = 'right',\n\t\tshortcut,\n\t\tisSelected,\n\t\trole = 'menuitem',\n\t\tsuffix,\n\t\t...buttonProps\n\t} = props;\n\n\tclassName = clsx( 'components-menu-item__button', className );\n\n\tif ( info ) {\n\t\tchildren = (\n\t\t\t<span className=\"components-menu-item__info-wrapper\">\n\t\t\t\t<span className=\"components-menu-item__item\">{ children }</span>\n\t\t\t\t<span className=\"components-menu-item__info\">{ info }</span>\n\t\t\t</span>\n\t\t);\n\t}\n\n\tif ( icon && typeof icon !== 'string' ) {\n\t\ticon = cloneElement( icon, {\n\t\t\tclassName: clsx( 'components-menu-items__item-icon', {\n\t\t\t\t'has-icon-right': iconPosition === 'right',\n\t\t\t} ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\tref={ ref }\n\t\t\t// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n\t\t\taria-checked={\n\t\t\t\trole === 'menuitemcheckbox' || role === 'menuitemradio'\n\t\t\t\t\t? isSelected\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\trole={ role }\n\t\t\ticon={ iconPosition === 'left' ? icon : undefined }\n\t\t\tclassName={ className }\n\t\t\t{ ...buttonProps }\n\t\t>\n\t\t\t<span className=\"components-menu-item__item\">{ children }</span>\n\t\t\t{ ! suffix && (\n\t\t\t\t<Shortcut\n\t\t\t\t\tclassName=\"components-menu-item__shortcut\"\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! suffix && icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t) }\n\t\t\t{ suffix }\n\t\t</Button>\n\t);\n}\n\n/**\n * MenuItem is a component which renders a button intended to be used in combination with the `DropdownMenu` component.\n *\n * ```jsx\n * import { MenuItem } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyMenuItem = () => {\n * \tconst [ isActive, setIsActive ] = useState( true );\n *\n * \treturn (\n * \t\t<MenuItem\n * \t\t\ticon={ isActive ? 'yes' : 'no' }\n * \t\t\tisSelected={ isActive }\n * \t\t\trole=\"menuitemcheckbox\"\n * \t\t\tonClick={ () => setIsActive( ( state ) => ! state ) }\n * \t\t>\n * \t\t\tToggle\n * \t\t</MenuItem>\n * \t);\n * };\n * ```\n */\nexport const MenuItem = forwardRef( UnforwardedMenuItem );\n\nexport default MenuItem;\n"],"mappings":";;;;;;;;AAIA,IAAAA,KAAA,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SACH;IACDR,IAAI,EAAGA,IAAM;IACbJ,IAAI,EAAGC,YAAY,KAAK,MAAM,GAAGD,IAAI,GAAGY,SAAW;IACnDb,SAAS,EAAGA,SAAW;IAAA,GAClBO;EAAW,GAEhB,IAAAE,MAAA,CAAAC,aAAA;IAAMV,SAAS,EAAC;EAA4B,GAAGF,QAAgB,CAAC,EAC9D,CAAEQ,MAAM,IACT,IAAAG,MAAA,CAAAC,aAAA,EAAClB,SAAA,CAAAoB,OAAQ;IACRZ,SAAS,EAAC,gCAAgC;IAC1CG,QAAQ,EAAGA;EAAU,CACrB,CACD,EACC,CAAEG,MAAM,IAAIL,IAAI,IAAIC,YAAY,KAAK,OAAO,IAC7C,IAAAO,MAAA,CAAAC,aAAA,EAAChB,KAAA,CAAAkB,OAAI;IAACX,IAAI,EAAGA;EAAM,CAAE,CACrB,EACCK,MACK,CAAC;AAEX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMQ,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,mBAAU,EAAErB,mBAAoB,CAAC;AAAC,IAAAsB,QAAA,GAAAF,OAAA,CAAAH,OAAA,GAE3CE,QAAQ","ignoreList":[]}
|
|
@@ -34,7 +34,7 @@ const colorsUtils = exports.colorsUtils = {
|
|
|
34
34
|
picker: 'Picker',
|
|
35
35
|
palette: 'Palette'
|
|
36
36
|
},
|
|
37
|
-
segments: [(0, _i18n.__)('
|
|
37
|
+
segments: [(0, _i18n.__)('Color'), (0, _i18n.__)('Gradient')],
|
|
38
38
|
gradients,
|
|
39
39
|
gradientOptions,
|
|
40
40
|
getGradientType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","gradients","linear","radial","gradientOptions","label","__","value","getGradientType","color","includes","colorsUtils","exports","screens","gradientPicker","picker","palette","segments","isGradient"],"sources":["@wordpress/components/src/mobile/color-settings/utils.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nconst gradients = {\n\tlinear: 'linear-gradient',\n\tradial: 'radial-gradient',\n};\n\nconst gradientOptions = [\n\t{ label: __( 'Linear' ), value: gradients.linear },\n\t{ label: __( 'Radial' ), value: gradients.radial },\n];\n\nconst getGradientType = ( color ) => {\n\tif ( color?.includes( gradients.radial ) ) {\n\t\treturn gradients.radial;\n\t} else if ( color?.includes( gradients.linear ) ) {\n\t\treturn gradients.linear;\n\t}\n\treturn false;\n};\n\nexport const colorsUtils = {\n\tscreens: {\n\t\tgradientPicker: 'GradientPicker',\n\t\tpicker: 'Picker',\n\t\tpalette: 'Palette',\n\t},\n\tsegments: [ __( '
|
|
1
|
+
{"version":3,"names":["_i18n","require","gradients","linear","radial","gradientOptions","label","__","value","getGradientType","color","includes","colorsUtils","exports","screens","gradientPicker","picker","palette","segments","isGradient"],"sources":["@wordpress/components/src/mobile/color-settings/utils.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nconst gradients = {\n\tlinear: 'linear-gradient',\n\tradial: 'radial-gradient',\n};\n\nconst gradientOptions = [\n\t{ label: __( 'Linear' ), value: gradients.linear },\n\t{ label: __( 'Radial' ), value: gradients.radial },\n];\n\nconst getGradientType = ( color ) => {\n\tif ( color?.includes( gradients.radial ) ) {\n\t\treturn gradients.radial;\n\t} else if ( color?.includes( gradients.linear ) ) {\n\t\treturn gradients.linear;\n\t}\n\treturn false;\n};\n\nexport const colorsUtils = {\n\tscreens: {\n\t\tgradientPicker: 'GradientPicker',\n\t\tpicker: 'Picker',\n\t\tpalette: 'Palette',\n\t},\n\tsegments: [ __( 'Color' ), __( 'Gradient' ) ],\n\tgradients,\n\tgradientOptions,\n\tgetGradientType,\n\tisGradient: ( color ) => !! getGradientType( color ),\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,SAAS,GAAG;EACjBC,MAAM,EAAE,iBAAiB;EACzBC,MAAM,EAAE;AACT,CAAC;AAED,MAAMC,eAAe,GAAG,CACvB;EAAEC,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS,CAAC;EAAEC,KAAK,EAAEN,SAAS,CAACC;AAAO,CAAC,EAClD;EAAEG,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS,CAAC;EAAEC,KAAK,EAAEN,SAAS,CAACE;AAAO,CAAC,CAClD;AAED,MAAMK,eAAe,GAAKC,KAAK,IAAM;EACpC,IAAKA,KAAK,EAAEC,QAAQ,CAAET,SAAS,CAACE,MAAO,CAAC,EAAG;IAC1C,OAAOF,SAAS,CAACE,MAAM;EACxB,CAAC,MAAM,IAAKM,KAAK,EAAEC,QAAQ,CAAET,SAAS,CAACC,MAAO,CAAC,EAAG;IACjD,OAAOD,SAAS,CAACC,MAAM;EACxB;EACA,OAAO,KAAK;AACb,CAAC;AAEM,MAAMS,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EAC1BE,OAAO,EAAE;IACRC,cAAc,EAAE,gBAAgB;IAChCC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE,CAAE,IAAAX,QAAE,EAAE,OAAQ,CAAC,EAAE,IAAAA,QAAE,EAAE,UAAW,CAAC,CAAE;EAC7CL,SAAS;EACTG,eAAe;EACfI,eAAe;EACfU,UAAU,EAAIT,KAAK,IAAM,CAAC,CAAED,eAAe,CAAEC,KAAM;AACpD,CAAC","ignoreList":[]}
|
|
@@ -60,7 +60,9 @@ function getGradientAngle(gradientValue) {
|
|
|
60
60
|
}
|
|
61
61
|
} else if (angleType === 'angle') {
|
|
62
62
|
return parseFloat(angle);
|
|
63
|
-
} else
|
|
63
|
+
} else {
|
|
64
|
+
return 4 * angleBase;
|
|
65
|
+
}
|
|
64
66
|
}
|
|
65
67
|
function getGradientColorGroup(gradientValue) {
|
|
66
68
|
const colorNeedParenthesis = ['rgb', 'rgba'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeLinearGradient","_interopRequireDefault","_gradientParser","_components","_primitives","_compose","_element","_style","getGradientAngle","gradientValue","angleBase","matchAngle","angle","exec","angleType","includes","parseFloat","getGradientColorGroup","colorNeedParenthesis","excludeSideOrCorner","modifiedGradientValue","replace","concat","gradientParser","parse","map","gradient","colorStops","color","index","type","value","length","fallbackLength","colorLength","join","getGradientBaseColors","colorGroup","getColorLocations","location","Number","Gradient","style","angleCenter","x","y","children","otherProps","resizeObserver","sizes","useResizeObserver","width","height","isGradient","getGradientType","gradients","colorsUtils","useMemo","locations","colors","isLinearGradient","linear","_react","createElement","default","useAngle","View","styles","overflow","radialGradientContent","SVG","Defs","RadialGradient","id","gradientUnits","rx","ry","cy","Platform","OS","group","Stop","offset","stopColor","stopOpacity","key","Rect","fill","_default","exports"],"sources":["@wordpress/components/src/mobile/gradient/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Platform } from 'react-native';\nimport RNLinearGradient from 'react-native-linear-gradient';\nimport gradientParser from 'gradient-parser';\n/**\n * WordPress dependencies\n */\nimport { colorsUtils } from '@wordpress/components';\nimport { RadialGradient, Stop, SVG, Defs, Rect } from '@wordpress/primitives';\nimport { useResizeObserver } from '@wordpress/compose';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport function getGradientAngle( gradientValue ) {\n\tconst angleBase = 45;\n\tconst matchAngle = /\\(((\\d+deg)|(to\\s[^,]+))/;\n\tconst angle = matchAngle.exec( gradientValue )\n\t\t? matchAngle.exec( gradientValue )[ 1 ]\n\t\t: '180deg';\n\n\tconst angleType = angle.includes( 'deg' ) ? 'angle' : 'sideOrCorner';\n\n\tif ( angleType === 'sideOrCorner' ) {\n\t\tswitch ( angle ) {\n\t\t\tcase 'to top':\n\t\t\t\treturn 0;\n\t\t\tcase 'to top right':\n\t\t\tcase 'to right top':\n\t\t\t\treturn angleBase;\n\t\t\tcase 'to right':\n\t\t\t\treturn 2 * angleBase;\n\t\t\tcase 'to bottom right':\n\t\t\tcase 'to right bottom':\n\t\t\t\treturn 3 * angleBase;\n\t\t\tcase 'to bottom':\n\t\t\t\treturn 4 * angleBase;\n\t\t\tcase 'to bottom left':\n\t\t\tcase 'to left bottom':\n\t\t\t\treturn 5 * angleBase;\n\t\t\tcase 'to left':\n\t\t\t\treturn 6 * angleBase;\n\t\t\tcase 'to top left':\n\t\t\tcase 'to left top':\n\t\t\t\treturn 7 * angleBase;\n\t\t}\n\t} else if ( angleType === 'angle' ) {\n\t\treturn parseFloat( angle );\n\t} else return 4 * angleBase;\n}\n\nexport function getGradientColorGroup( gradientValue ) {\n\tconst colorNeedParenthesis = [ 'rgb', 'rgba' ];\n\n\tconst excludeSideOrCorner = /linear-gradient\\(to\\s+([a-z\\s]+,)/;\n\n\t// Parser has some difficulties with angle defined as a side or corner (e.g. `to left`)\n\t// so it's going to be excluded in order to matching color groups.\n\tconst modifiedGradientValue = gradientValue.replace(\n\t\texcludeSideOrCorner,\n\t\t'linear-gradient('\n\t);\n\n\treturn [].concat(\n\t\t...gradientParser.parse( modifiedGradientValue )?.map( ( gradient ) =>\n\t\t\tgradient.colorStops?.map( ( color, index ) => {\n\t\t\t\tconst { type, value, length } = color;\n\t\t\t\tconst fallbackLength = `${\n\t\t\t\t\t100 * ( index / ( gradient.colorStops.length - 1 ) )\n\t\t\t\t}%`;\n\t\t\t\tconst colorLength = length\n\t\t\t\t\t? `${ length.value }${ length.type }`\n\t\t\t\t\t: fallbackLength;\n\n\t\t\t\tif ( colorNeedParenthesis.includes( type ) ) {\n\t\t\t\t\treturn [ `${ type }(${ value.join( ',' ) })`, colorLength ];\n\t\t\t\t} else if ( type === 'literal' ) {\n\t\t\t\t\treturn [ value, colorLength ];\n\t\t\t\t}\n\t\t\t\treturn [ `#${ value }`, colorLength ];\n\t\t\t} )\n\t\t)\n\t);\n}\n\nexport function getGradientBaseColors( colorGroup ) {\n\treturn colorGroup.map( ( color ) => color[ 0 ] );\n}\n\nexport function getColorLocations( colorGroup ) {\n\treturn colorGroup.map(\n\t\t( location ) => Number( location[ 1 ].replace( '%', '' ) ) / 100\n\t);\n}\n\nfunction Gradient( {\n\tgradientValue,\n\tstyle,\n\tangleCenter = { x: 0.5, y: 0.5 },\n\tchildren,\n\t...otherProps\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst { width = 0, height = 0 } = sizes || {};\n\tconst { isGradient, getGradientType, gradients } = colorsUtils;\n\n\tconst colorGroup = useMemo(\n\t\t() => getGradientColorGroup( gradientValue ),\n\t\t[ gradientValue ]\n\t);\n\n\tconst locations = useMemo(\n\t\t() => getColorLocations( colorGroup ),\n\t\t[ colorGroup ]\n\t);\n\n\tconst colors = useMemo(\n\t\t() => getGradientBaseColors( colorGroup ),\n\t\t[ colorGroup ]\n\t);\n\n\tif ( ! gradientValue || ! isGradient( gradientValue ) ) {\n\t\treturn null;\n\t}\n\n\tconst isLinearGradient =\n\t\tgetGradientType( gradientValue ) === gradients.linear;\n\n\tif ( isLinearGradient ) {\n\t\treturn (\n\t\t\t<RNLinearGradient\n\t\t\t\tcolors={ colors }\n\t\t\t\tuseAngle\n\t\t\t\tangle={ getGradientAngle( gradientValue ) }\n\t\t\t\tlocations={ locations }\n\t\t\t\tangleCenter={ angleCenter }\n\t\t\t\tstyle={ style }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</RNLinearGradient>\n\t\t);\n\t}\n\n\treturn (\n\t\t<View style={ [ style, styles.overflow ] }>\n\t\t\t<View style={ styles.radialGradientContent }>{ children }</View>\n\t\t\t{ resizeObserver }\n\t\t\t<SVG>\n\t\t\t\t<Defs>\n\t\t\t\t\t<RadialGradient\n\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\t\t\t\tid=\"radialGradient\"\n\t\t\t\t\t\tgradientUnits=\"userSpaceOnUse\"\n\t\t\t\t\t\trx=\"70%\"\n\t\t\t\t\t\try=\"70%\"\n\t\t\t\t\t\tcy={ Platform.OS === 'android' ? width / 2 : '50%' }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ colorGroup.map( ( group ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Stop\n\t\t\t\t\t\t\t\t\toffset={ group[ 1 ] }\n\t\t\t\t\t\t\t\t\tstopColor={ group[ 0 ] }\n\t\t\t\t\t\t\t\t\tstopOpacity=\"1\"\n\t\t\t\t\t\t\t\t\tkey={ `${ group[ 1 ] }-${ group[ 0 ] }` }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</RadialGradient>\n\t\t\t\t</Defs>\n\t\t\t\t<Rect\n\t\t\t\t\theight={ height }\n\t\t\t\t\twidth={ width }\n\t\t\t\t\tfill=\"url(#radialGradient)\"\n\t\t\t\t/>\n\t\t\t</SVG>\n\t\t</View>\n\t);\n}\n\nexport default Gradient;\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AAIA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAN,sBAAA,CAAAF,OAAA;AAjBA;AACA;AACA;;AAIA;AACA;AACA;;AAMA;AACA;AACA;;AAGO,SAASS,gBAAgBA,CAAEC,aAAa,EAAG;EACjD,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,UAAU,GAAG,0BAA0B;EAC7C,MAAMC,KAAK,GAAGD,UAAU,CAACE,IAAI,CAAEJ,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GyB,cAAM,CAACE;EAAuB,GAAGvB,QAAgB,CAAC,EAC9DE,cAAc,EAChB,IAAAc,MAAA,CAAAC,aAAA,EAAC3D,WAAA,CAAAkE,GAAG,QACH,IAAAR,MAAA,CAAAC,aAAA,EAAC3D,WAAA,CAAAmE,IAAI,QACJ,IAAAT,MAAA,CAAAC,aAAA,EAAC3D,WAAA,CAAAoE;EACA;EAAA;IACAC,EAAE,EAAC,gBAAgB;IACnBC,aAAa,EAAC,gBAAgB;IAC9BC,EAAE,EAAC,KAAK;IACRC,EAAE,EAAC,KAAK;IACRC,EAAE,EAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAG5B,KAAK,GAAG,CAAC,GAAG;EAAO,GAElDd,UAAU,CAACZ,GAAG,CAAIuD,KAAK,IAAM;IAC9B,OACC,IAAAlB,MAAA,CAAAC,aAAA,EAAC3D,WAAA,CAAA6E,IAAI;MACJC,MAAM,EAAGF,KAAK,CAAE,CAAC,CAAI;MACrBG,SAAS,EAAGH,KAAK,CAAE,CAAC,CAAI;MACxBI,WAAW,EAAC,GAAG;MACfC,GAAG,EAAI,GAAGL,KAAK,CAAE,CAAC,CAAI,IAAIA,KAAK,CAAE,CAAC,CAAI;IAAG,CACzC,CAAC;EAEJ,CAAE,CACa,CACX,CAAC,EACP,IAAAlB,MAAA,CAAAC,aAAA,EAAC3D,WAAA,CAAAkF,IAAI;IACJlC,MAAM,EAAGA,MAAQ;IACjBD,KAAK,EAAGA,KAAO;IACfoC,IAAI,EAAC;EAAsB,CAC3B,CACG,CACA,CAAC;AAET;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEcvB,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeLinearGradient","_interopRequireDefault","_gradientParser","_components","_primitives","_compose","_element","_style","getGradientAngle","gradientValue","angleBase","matchAngle","angle","exec","angleType","includes","parseFloat","getGradientColorGroup","colorNeedParenthesis","excludeSideOrCorner","modifiedGradientValue","replace","concat","gradientParser","parse","map","gradient","colorStops","color","index","type","value","length","fallbackLength","colorLength","join","getGradientBaseColors","colorGroup","getColorLocations","location","Number","Gradient","style","angleCenter","x","y","children","otherProps","resizeObserver","sizes","useResizeObserver","width","height","isGradient","getGradientType","gradients","colorsUtils","useMemo","locations","colors","isLinearGradient","linear","_react","createElement","default","useAngle","View","styles","overflow","radialGradientContent","SVG","Defs","RadialGradient","id","gradientUnits","rx","ry","cy","Platform","OS","group","Stop","offset","stopColor","stopOpacity","key","Rect","fill","_default","exports"],"sources":["@wordpress/components/src/mobile/gradient/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Platform } from 'react-native';\nimport RNLinearGradient from 'react-native-linear-gradient';\nimport gradientParser from 'gradient-parser';\n/**\n * WordPress dependencies\n */\nimport { colorsUtils } from '@wordpress/components';\nimport { RadialGradient, Stop, SVG, Defs, Rect } from '@wordpress/primitives';\nimport { useResizeObserver } from '@wordpress/compose';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport function getGradientAngle( gradientValue ) {\n\tconst angleBase = 45;\n\tconst matchAngle = /\\(((\\d+deg)|(to\\s[^,]+))/;\n\tconst angle = matchAngle.exec( gradientValue )\n\t\t? matchAngle.exec( gradientValue )[ 1 ]\n\t\t: '180deg';\n\n\tconst angleType = angle.includes( 'deg' ) ? 'angle' : 'sideOrCorner';\n\n\tif ( angleType === 'sideOrCorner' ) {\n\t\tswitch ( angle ) {\n\t\t\tcase 'to top':\n\t\t\t\treturn 0;\n\t\t\tcase 'to top right':\n\t\t\tcase 'to right top':\n\t\t\t\treturn angleBase;\n\t\t\tcase 'to right':\n\t\t\t\treturn 2 * angleBase;\n\t\t\tcase 'to bottom right':\n\t\t\tcase 'to right bottom':\n\t\t\t\treturn 3 * angleBase;\n\t\t\tcase 'to bottom':\n\t\t\t\treturn 4 * angleBase;\n\t\t\tcase 'to bottom left':\n\t\t\tcase 'to left bottom':\n\t\t\t\treturn 5 * angleBase;\n\t\t\tcase 'to left':\n\t\t\t\treturn 6 * angleBase;\n\t\t\tcase 'to top left':\n\t\t\tcase 'to left top':\n\t\t\t\treturn 7 * angleBase;\n\t\t}\n\t} else if ( angleType === 'angle' ) {\n\t\treturn parseFloat( angle );\n\t} else {\n\t\treturn 4 * angleBase;\n\t}\n}\n\nexport function getGradientColorGroup( gradientValue ) {\n\tconst colorNeedParenthesis = [ 'rgb', 'rgba' ];\n\n\tconst excludeSideOrCorner = /linear-gradient\\(to\\s+([a-z\\s]+,)/;\n\n\t// Parser has some difficulties with angle defined as a side or corner (e.g. `to left`)\n\t// so it's going to be excluded in order to matching color groups.\n\tconst modifiedGradientValue = gradientValue.replace(\n\t\texcludeSideOrCorner,\n\t\t'linear-gradient('\n\t);\n\n\treturn [].concat(\n\t\t...gradientParser.parse( modifiedGradientValue )?.map( ( gradient ) =>\n\t\t\tgradient.colorStops?.map( ( color, index ) => {\n\t\t\t\tconst { type, value, length } = color;\n\t\t\t\tconst fallbackLength = `${\n\t\t\t\t\t100 * ( index / ( gradient.colorStops.length - 1 ) )\n\t\t\t\t}%`;\n\t\t\t\tconst colorLength = length\n\t\t\t\t\t? `${ length.value }${ length.type }`\n\t\t\t\t\t: fallbackLength;\n\n\t\t\t\tif ( colorNeedParenthesis.includes( type ) ) {\n\t\t\t\t\treturn [ `${ type }(${ value.join( ',' ) })`, colorLength ];\n\t\t\t\t} else if ( type === 'literal' ) {\n\t\t\t\t\treturn [ value, colorLength ];\n\t\t\t\t}\n\t\t\t\treturn [ `#${ value }`, colorLength ];\n\t\t\t} )\n\t\t)\n\t);\n}\n\nexport function getGradientBaseColors( colorGroup ) {\n\treturn colorGroup.map( ( color ) => color[ 0 ] );\n}\n\nexport function getColorLocations( colorGroup ) {\n\treturn colorGroup.map(\n\t\t( location ) => Number( location[ 1 ].replace( '%', '' ) ) / 100\n\t);\n}\n\nfunction Gradient( {\n\tgradientValue,\n\tstyle,\n\tangleCenter = { x: 0.5, y: 0.5 },\n\tchildren,\n\t...otherProps\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst { width = 0, height = 0 } = sizes || {};\n\tconst { isGradient, getGradientType, gradients } = colorsUtils;\n\n\tconst colorGroup = useMemo(\n\t\t() => getGradientColorGroup( gradientValue ),\n\t\t[ gradientValue ]\n\t);\n\n\tconst locations = useMemo(\n\t\t() => getColorLocations( colorGroup ),\n\t\t[ colorGroup ]\n\t);\n\n\tconst colors = useMemo(\n\t\t() => getGradientBaseColors( colorGroup ),\n\t\t[ colorGroup ]\n\t);\n\n\tif ( ! gradientValue || ! isGradient( gradientValue ) ) {\n\t\treturn null;\n\t}\n\n\tconst isLinearGradient =\n\t\tgetGradientType( gradientValue ) === gradients.linear;\n\n\tif ( isLinearGradient ) {\n\t\treturn (\n\t\t\t<RNLinearGradient\n\t\t\t\tcolors={ colors }\n\t\t\t\tuseAngle\n\t\t\t\tangle={ getGradientAngle( gradientValue ) }\n\t\t\t\tlocations={ locations }\n\t\t\t\tangleCenter={ angleCenter }\n\t\t\t\tstyle={ style }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</RNLinearGradient>\n\t\t);\n\t}\n\n\treturn (\n\t\t<View style={ [ style, styles.overflow ] }>\n\t\t\t<View style={ styles.radialGradientContent }>{ children }</View>\n\t\t\t{ resizeObserver }\n\t\t\t<SVG>\n\t\t\t\t<Defs>\n\t\t\t\t\t<RadialGradient\n\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\t\t\t\tid=\"radialGradient\"\n\t\t\t\t\t\tgradientUnits=\"userSpaceOnUse\"\n\t\t\t\t\t\trx=\"70%\"\n\t\t\t\t\t\try=\"70%\"\n\t\t\t\t\t\tcy={ Platform.OS === 'android' ? width / 2 : '50%' }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ colorGroup.map( ( group ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Stop\n\t\t\t\t\t\t\t\t\toffset={ group[ 1 ] }\n\t\t\t\t\t\t\t\t\tstopColor={ group[ 0 ] }\n\t\t\t\t\t\t\t\t\tstopOpacity=\"1\"\n\t\t\t\t\t\t\t\t\tkey={ `${ group[ 1 ] }-${ group[ 0 ] }` }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</RadialGradient>\n\t\t\t\t</Defs>\n\t\t\t\t<Rect\n\t\t\t\t\theight={ height }\n\t\t\t\t\twidth={ width }\n\t\t\t\t\tfill=\"url(#radialGradient)\"\n\t\t\t\t/>\n\t\t\t</SVG>\n\t\t</View>\n\t);\n}\n\nexport default Gradient;\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AAIA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAN,sBAAA,CAAAF,OAAA;AAjBA;AACA;AACA;;AAIA;AACA;AACA;;AAMA;AACA;AACA;;AAGO,SAASS,gBAAgBA,CAAEC,aAAa,EAAG;EACjD,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,UAAU,GAAG,0BAA0B;EAC7C,MAAMC,KAAK,GAAGD,UAAU,CAACE,IAAI,CAAEJ,aAAc,CAAC,GAC3CE,UAAU,CAACE,IAAI,CAAEJ,aAAc,CAAC,CAAE,CAAC,CAAE,GACrC,QAAQ;EAEX,MAAMK,SAAS,GAAGF,KAAK,CAACG,QAAQ,CAAE,KAAM,CAAC,GAAG,OAAO,GAAG,cAAc;EAEpE,IAAKD,SAAS,KAAK,cAAc,EAAG;IACnC,QAASF,KAAK;MACb,KA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oE;EACA;EAAA;IACAC,EAAE,EAAC,gBAAgB;IACnBC,aAAa,EAAC,gBAAgB;IAC9BC,EAAE,EAAC,KAAK;IACRC,EAAE,EAAC,KAAK;IACRC,EAAE,EAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAG5B,KAAK,GAAG,CAAC,GAAG;EAAO,GAElDd,UAAU,CAACZ,GAAG,CAAIuD,KAAK,IAAM;IAC9B,OACC,IAAAlB,MAAA,CAAAC,aAAA,EAAC3D,WAAA,CAAA6E,IAAI;MACJC,MAAM,EAAGF,KAAK,CAAE,CAAC,CAAI;MACrBG,SAAS,EAAGH,KAAK,CAAE,CAAC,CAAI;MACxBI,WAAW,EAAC,GAAG;MACfC,GAAG,EAAI,GAAGL,KAAK,CAAE,CAAC,CAAI,IAAIA,KAAK,CAAE,CAAC,CAAI;IAAG,CACzC,CAAC;EAEJ,CAAE,CACa,CACX,CAAC,EACP,IAAAlB,MAAA,CAAAC,aAAA,EAAC3D,WAAA,CAAAkF,IAAI;IACJlC,MAAM,EAAGA,MAAQ;IACjBD,KAAK,EAAGA,KAAO;IACfoC,IAAI,EAAC;EAAsB,CAC3B,CACG,CACA,CAAC;AAET;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEcvB,QAAQ","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanim
|
|
|
11
11
|
var _element = require("@wordpress/element");
|
|
12
12
|
var _useScroll = _interopRequireDefault(require("./use-scroll"));
|
|
13
13
|
var _keyboardAvoidingView = _interopRequireDefault(require("../keyboard-avoiding-view"));
|
|
14
|
+
var _shared = require("./shared");
|
|
14
15
|
/**
|
|
15
16
|
* External dependencies
|
|
16
17
|
*/
|
|
@@ -24,6 +25,7 @@ var _keyboardAvoidingView = _interopRequireDefault(require("../keyboard-avoiding
|
|
|
24
25
|
*/
|
|
25
26
|
|
|
26
27
|
const AnimatedFlatList = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.FlatList);
|
|
28
|
+
const EMPTY_OBJECT = {};
|
|
27
29
|
const KeyboardAwareFlatList = ({
|
|
28
30
|
onScroll,
|
|
29
31
|
...props
|
|
@@ -47,8 +49,6 @@ const KeyboardAwareFlatList = ({
|
|
|
47
49
|
onScroll
|
|
48
50
|
});
|
|
49
51
|
const getFlatListRef = (0, _element.useCallback)(flatListRef => {
|
|
50
|
-
// On Android, we get the ref of the associated scroll
|
|
51
|
-
// view to the FlatList.
|
|
52
52
|
scrollViewRef.current = flatListRef?.getNativeScrollRef();
|
|
53
53
|
}, [scrollViewRef]);
|
|
54
54
|
(0, _element.useImperativeHandle)(ref, () => {
|
|
@@ -59,6 +59,7 @@ const KeyboardAwareFlatList = ({
|
|
|
59
59
|
lastScrollTo
|
|
60
60
|
};
|
|
61
61
|
});
|
|
62
|
+
const optimizationProps = props.data?.length > _shared.OPTIMIZATION_ITEMS_THRESHOLD ? _shared.OPTIMIZATION_PROPS : EMPTY_OBJECT;
|
|
62
63
|
return (0, _react.createElement)(_keyboardAvoidingView.default, {
|
|
63
64
|
style: {
|
|
64
65
|
flex: 1
|
|
@@ -66,7 +67,12 @@ const KeyboardAwareFlatList = ({
|
|
|
66
67
|
}, (0, _react.createElement)(AnimatedFlatList, {
|
|
67
68
|
ref: getFlatListRef,
|
|
68
69
|
onScroll: scrollHandler,
|
|
69
|
-
onContentSizeChange: onContentSizeChange
|
|
70
|
+
onContentSizeChange: onContentSizeChange
|
|
71
|
+
// Disable clipping to fix focus losing.
|
|
72
|
+
// See https://github.com/wordpress-mobile/gutenberg-mobile/pull/741#issuecomment-472746541
|
|
73
|
+
,
|
|
74
|
+
removeClippedSubviews: false,
|
|
75
|
+
...optimizationProps,
|
|
70
76
|
...props
|
|
71
77
|
}));
|
|
72
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireDefault","_element","_useScroll","_keyboardAvoidingView","AnimatedFlatList","Animated","createAnimatedComponent","FlatList","KeyboardAwareFlatList","onScroll","props","ref","extraScrollHeight","scrollEnabled","shouldPreventAutomaticScroll","scrollViewRef","scrollHandler","scrollToSection","scrollToElement","onContentSizeChange","lastScrollTo","useScroll","getFlatListRef","useCallback","flatListRef","current","getNativeScrollRef","useImperativeHandle","_react","createElement","default","style","flex","exports","_default","forwardRef"],"sources":["@wordpress/components/src/mobile/keyboard-aware-flat-list/index.android.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { FlatList } from 'react-native';\nimport Animated from 'react-native-reanimated';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseCallback,\n\tuseImperativeHandle,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useScroll from './use-scroll';\nimport KeyboardAvoidingView from '../keyboard-avoiding-view';\n\nconst AnimatedFlatList = Animated.createAnimatedComponent( FlatList );\n\nexport const KeyboardAwareFlatList = ( { onScroll, ...props }, ref ) => {\n\tconst { extraScrollHeight, scrollEnabled, shouldPreventAutomaticScroll } =\n\t\tprops;\n\n\tconst {\n\t\tscrollViewRef,\n\t\tscrollHandler,\n\t\tscrollToSection,\n\t\tscrollToElement,\n\t\tonContentSizeChange,\n\t\tlastScrollTo,\n\t} = useScroll( {\n\t\tscrollEnabled,\n\t\tshouldPreventAutomaticScroll,\n\t\textraScrollHeight,\n\t\tonScroll,\n\t} );\n\n\tconst getFlatListRef = useCallback(\n\t\t( flatListRef ) => {\n\t\t\
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireDefault","_element","_useScroll","_keyboardAvoidingView","_shared","AnimatedFlatList","Animated","createAnimatedComponent","FlatList","EMPTY_OBJECT","KeyboardAwareFlatList","onScroll","props","ref","extraScrollHeight","scrollEnabled","shouldPreventAutomaticScroll","scrollViewRef","scrollHandler","scrollToSection","scrollToElement","onContentSizeChange","lastScrollTo","useScroll","getFlatListRef","useCallback","flatListRef","current","getNativeScrollRef","useImperativeHandle","optimizationProps","data","length","OPTIMIZATION_ITEMS_THRESHOLD","OPTIMIZATION_PROPS","_react","createElement","default","style","flex","removeClippedSubviews","exports","_default","forwardRef"],"sources":["@wordpress/components/src/mobile/keyboard-aware-flat-list/index.android.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { FlatList } from 'react-native';\nimport Animated from 'react-native-reanimated';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseCallback,\n\tuseImperativeHandle,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useScroll from './use-scroll';\nimport KeyboardAvoidingView from '../keyboard-avoiding-view';\nimport { OPTIMIZATION_ITEMS_THRESHOLD, OPTIMIZATION_PROPS } from './shared';\n\nconst AnimatedFlatList = Animated.createAnimatedComponent( FlatList );\nconst EMPTY_OBJECT = {};\n\nexport const KeyboardAwareFlatList = ( { onScroll, ...props }, ref ) => {\n\tconst { extraScrollHeight, scrollEnabled, shouldPreventAutomaticScroll } =\n\t\tprops;\n\n\tconst {\n\t\tscrollViewRef,\n\t\tscrollHandler,\n\t\tscrollToSection,\n\t\tscrollToElement,\n\t\tonContentSizeChange,\n\t\tlastScrollTo,\n\t} = useScroll( {\n\t\tscrollEnabled,\n\t\tshouldPreventAutomaticScroll,\n\t\textraScrollHeight,\n\t\tonScroll,\n\t} );\n\n\tconst getFlatListRef = useCallback(\n\t\t( flatListRef ) => {\n\t\t\tscrollViewRef.current = flatListRef?.getNativeScrollRef();\n\t\t},\n\t\t[ scrollViewRef ]\n\t);\n\n\tuseImperativeHandle( ref, () => {\n\t\treturn {\n\t\t\tscrollViewRef: scrollViewRef.current,\n\t\t\tscrollToSection,\n\t\t\tscrollToElement,\n\t\t\tlastScrollTo,\n\t\t};\n\t} );\n\n\tconst optimizationProps =\n\t\tprops.data?.length > OPTIMIZATION_ITEMS_THRESHOLD\n\t\t\t? OPTIMIZATION_PROPS\n\t\t\t: EMPTY_OBJECT;\n\n\treturn (\n\t\t<KeyboardAvoidingView style={ { flex: 1 } }>\n\t\t\t<AnimatedFlatList\n\t\t\t\tref={ getFlatListRef }\n\t\t\t\tonScroll={ scrollHandler }\n\t\t\t\tonContentSizeChange={ onContentSizeChange }\n\t\t\t\t// Disable clipping to fix focus losing.\n\t\t\t\t// See https://github.com/wordpress-mobile/gutenberg-mobile/pull/741#issuecomment-472746541\n\t\t\t\tremoveClippedSubviews={ false }\n\t\t\t\t{ ...optimizationProps }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</KeyboardAvoidingView>\n\t);\n};\n\nexport default forwardRef( KeyboardAwareFlatList );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AASA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,qBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AApBA;AACA;AACA;;AAIA;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAMO,gBAAgB,GAAGC,8BAAQ,CAACC,uBAAuB,CAAEC,qBAAS,CAAC;AACrE,MAAMC,YAAY,GAAG,CAAC,CAAC;AAEhB,MAAMC,qBAAqB,GAAGA,CAAE;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAM;EACvE,MAAM;IAAEC,iBAAiB;IAAEC,aAAa;IAAEC;EAA6B,CAAC,GACvEJ,KAAK;EAEN,MAAM;IACLK,aAAa;IACbC,aAAa;IACbC,eAAe;IACfC,eAAe;IACfC,mBAAmB;IACnBC;EACD,CAAC,GAAG,IAAAC,kBAAS,EAAE;IACdR,aAAa;IACbC,4BAA4B;IAC5BF,iBAAiB;IACjBH;EACD,CAAE,CAAC;EAEH,MAAMa,cAAc,GAAG,IAAAC,oBAAW,EAC/BC,WAAW,IAAM;IAClBT,aAAa,CAACU,OAAO,GAAGD,WAAW,EAAEE,kBAAkB,CAAC,CAAC;EAC1D,CAAC,EACD,CAAEX,aAAa,CAChB,CAAC;EAED,IAAAY,4BAAmB,EAAEhB,GAAG,EAAE,MAAM;IAC/B,OAAO;MACNI,aAAa,EAAEA,aAAa,CAACU,OAAO;MACpCR,eAAe;MACfC,eAAe;MACfE;IACD,CAAC;EACF,CAAE,CAAC;EAEH,MAAMQ,iBAAiB,GACtBlB,KAAK,CAACmB,IAAI,EAAEC,MAAM,GAAGC,oCAA4B,GAC9CC,0BAAkB,GAClBzB,YAAY;EAEhB,OACC,IAAA0B,MAAA,CAAAC,aAAA,EAACjC,qBAAA,CAAAkC,OAAoB;IAACC,KAAK,EAAG;MAAEC,IAAI,EAAE;IAAE;EAAG,GAC1C,IAAAJ,MAAA,CAAAC,aAAA,EAAC/B,gBAAgB;IAChBQ,GAAG,EAAGW,cAAgB;IACtBb,QAAQ,EAAGO,aAAe;IAC1BG,mBAAmB,EAAGA;IACtB;IACA;IAAA;IACAmB,qBAAqB,EAAG,KAAO;IAAA,GAC1BV,iBAAiB;IAAA,GACjBlB;EAAK,CACV,CACoB,CAAC;AAEzB,CAAC;AAAC6B,OAAA,CAAA/B,qBAAA,GAAAA,qBAAA;AAAA,IAAAgC,QAAA,GAAAD,OAAA,CAAAJ,OAAA,GAEa,IAAAM,mBAAU,EAAEjC,qBAAsB,CAAC","ignoreList":[]}
|
|
@@ -13,6 +13,8 @@ var _compose = require("@wordpress/compose");
|
|
|
13
13
|
var _useScroll = _interopRequireDefault(require("./use-scroll"));
|
|
14
14
|
var _useTextInputOffset = _interopRequireDefault(require("./use-text-input-offset"));
|
|
15
15
|
var _useTextInputCaretPosition = _interopRequireDefault(require("./use-text-input-caret-position"));
|
|
16
|
+
var _shared = require("./shared");
|
|
17
|
+
var _styles = _interopRequireDefault(require("./styles.scss"));
|
|
16
18
|
/**
|
|
17
19
|
* External dependencies
|
|
18
20
|
*/
|
|
@@ -26,7 +28,8 @@ var _useTextInputCaretPosition = _interopRequireDefault(require("./use-text-inpu
|
|
|
26
28
|
*/
|
|
27
29
|
|
|
28
30
|
const DEFAULT_FONT_SIZE = 16;
|
|
29
|
-
const
|
|
31
|
+
const AnimatedFlatList = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.FlatList);
|
|
32
|
+
const EMPTY_OBJECT = {};
|
|
30
33
|
|
|
31
34
|
/** @typedef {import('@wordpress/element').RefObject} RefObject */
|
|
32
35
|
/**
|
|
@@ -37,7 +40,6 @@ const AnimatedScrollView = _reactNativeReanimated.default.createAnimatedComponen
|
|
|
37
40
|
* @param {number} props.extraScrollHeight Extra scroll height for the content.
|
|
38
41
|
* @param {Function} props.onScroll Function to be called when the list is scrolled.
|
|
39
42
|
* @param {boolean} props.scrollEnabled Whether the list can be scrolled.
|
|
40
|
-
* @param {Object} props.scrollViewStyle Additional style for the ScrollView component.
|
|
41
43
|
* @param {boolean} props.shouldPreventAutomaticScroll Whether to prevent scrolling when there's a Keyboard offset set.
|
|
42
44
|
* @param {Object} props... Other props to pass to the FlatList component.
|
|
43
45
|
* @param {RefObject} ref
|
|
@@ -47,7 +49,6 @@ const KeyboardAwareFlatList = ({
|
|
|
47
49
|
extraScrollHeight,
|
|
48
50
|
onScroll,
|
|
49
51
|
scrollEnabled,
|
|
50
|
-
scrollViewStyle,
|
|
51
52
|
shouldPreventAutomaticScroll,
|
|
52
53
|
...props
|
|
53
54
|
}, ref) => {
|
|
@@ -90,9 +91,9 @@ const KeyboardAwareFlatList = ({
|
|
|
90
91
|
const contentInset = {
|
|
91
92
|
bottom: keyboardOffset
|
|
92
93
|
};
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
},
|
|
94
|
+
const getFlatListRef = (0, _element.useCallback)(flatListRef => {
|
|
95
|
+
scrollViewRef.current = flatListRef?.getNativeScrollRef();
|
|
96
|
+
}, [scrollViewRef]);
|
|
96
97
|
(0, _element.useImperativeHandle)(ref, () => {
|
|
97
98
|
return {
|
|
98
99
|
scrollViewRef: scrollViewRef.current,
|
|
@@ -101,19 +102,20 @@ const KeyboardAwareFlatList = ({
|
|
|
101
102
|
lastScrollTo
|
|
102
103
|
};
|
|
103
104
|
});
|
|
104
|
-
|
|
105
|
+
const optimizationProps = props.data?.length > _shared.OPTIMIZATION_ITEMS_THRESHOLD ? _shared.OPTIMIZATION_PROPS : EMPTY_OBJECT;
|
|
106
|
+
return (0, _react.createElement)(_reactNative.View, {
|
|
107
|
+
style: _styles.default.list__container
|
|
108
|
+
}, (0, _react.createElement)(AnimatedFlatList, {
|
|
109
|
+
ref: getFlatListRef,
|
|
105
110
|
automaticallyAdjustContentInsets: false,
|
|
106
111
|
contentInset: contentInset,
|
|
107
112
|
keyboardShouldPersistTaps: "handled",
|
|
108
113
|
onContentSizeChange: onContentSizeChange,
|
|
109
114
|
onScroll: scrollHandler,
|
|
110
|
-
ref: scrollViewRef,
|
|
111
|
-
scrollEnabled: scrollEnabled,
|
|
112
115
|
scrollEventThrottle: 16,
|
|
113
|
-
style:
|
|
114
|
-
|
|
115
|
-
...props
|
|
116
|
-
scrollEnabled: false
|
|
116
|
+
style: _styles.default.list__content,
|
|
117
|
+
...optimizationProps,
|
|
118
|
+
...props
|
|
117
119
|
}));
|
|
118
120
|
};
|
|
119
121
|
exports.KeyboardAwareFlatList = KeyboardAwareFlatList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireDefault","_element","_compose","_useScroll","_useTextInputOffset","_useTextInputCaretPosition","DEFAULT_FONT_SIZE","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireDefault","_element","_compose","_useScroll","_useTextInputOffset","_useTextInputCaretPosition","_shared","_styles","DEFAULT_FONT_SIZE","AnimatedFlatList","Animated","createAnimatedComponent","FlatList","EMPTY_OBJECT","KeyboardAwareFlatList","extraScrollHeight","onScroll","scrollEnabled","shouldPreventAutomaticScroll","props","ref","scrollViewRef","scrollHandler","keyboardOffset","scrollToSection","scrollToElement","onContentSizeChange","lastScrollTo","useScroll","onSizeChange","getTextInputOffset","useTextInputOffset","onScrollToTextInput","useThrottle","useCallback","caret","caretHeight","textInputOffset","hasTextInputOffset","leading","currentCaretData","useTextInputCaretPosition","useEffect","contentInset","bottom","getFlatListRef","flatListRef","current","getNativeScrollRef","useImperativeHandle","optimizationProps","data","length","OPTIMIZATION_ITEMS_THRESHOLD","OPTIMIZATION_PROPS","_react","createElement","View","style","styles","list__container","automaticallyAdjustContentInsets","keyboardShouldPersistTaps","scrollEventThrottle","list__content","exports","_default","default","forwardRef"],"sources":["@wordpress/components/src/mobile/keyboard-aware-flat-list/index.ios.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { FlatList, View } from 'react-native';\nimport Animated from 'react-native-reanimated';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseCallback,\n\tuseEffect,\n\tforwardRef,\n\tuseImperativeHandle,\n} from '@wordpress/element';\nimport { useThrottle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport useScroll from './use-scroll';\nimport useTextInputOffset from './use-text-input-offset';\nimport useTextInputCaretPosition from './use-text-input-caret-position';\nimport { OPTIMIZATION_ITEMS_THRESHOLD, OPTIMIZATION_PROPS } from './shared';\nimport styles from './styles.scss';\n\nconst DEFAULT_FONT_SIZE = 16;\nconst AnimatedFlatList = Animated.createAnimatedComponent( FlatList );\nconst EMPTY_OBJECT = {};\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n/**\n * React component that provides a FlatList that is aware of the keyboard state and can scroll\n * to the currently focused TextInput.\n *\n * @param {Object} props Component props.\n * @param {number} props.extraScrollHeight Extra scroll height for the content.\n * @param {Function} props.onScroll Function to be called when the list is scrolled.\n * @param {boolean} props.scrollEnabled Whether the list can be scrolled.\n * @param {boolean} props.shouldPreventAutomaticScroll Whether to prevent scrolling when there's a Keyboard offset set.\n * @param {Object} props... Other props to pass to the FlatList component.\n * @param {RefObject} ref\n * @return {Component} KeyboardAwareFlatList component.\n */\nexport const KeyboardAwareFlatList = (\n\t{\n\t\textraScrollHeight,\n\t\tonScroll,\n\t\tscrollEnabled,\n\t\tshouldPreventAutomaticScroll,\n\t\t...props\n\t},\n\tref\n) => {\n\tconst {\n\t\tscrollViewRef,\n\t\tscrollHandler,\n\t\tkeyboardOffset,\n\t\tscrollToSection,\n\t\tscrollToElement,\n\t\tonContentSizeChange,\n\t\tlastScrollTo,\n\t} = useScroll( {\n\t\tscrollEnabled,\n\t\tshouldPreventAutomaticScroll,\n\t\textraScrollHeight,\n\t\tonScroll,\n\t\tonSizeChange,\n\t} );\n\n\tconst [ getTextInputOffset ] = useTextInputOffset(\n\t\tscrollEnabled,\n\t\tscrollViewRef\n\t);\n\n\tconst onScrollToTextInput = useThrottle(\n\t\tuseCallback(\n\t\t\tasync ( caret ) => {\n\t\t\t\tconst { caretHeight = DEFAULT_FONT_SIZE } = caret ?? {};\n\t\t\t\tconst textInputOffset = await getTextInputOffset( caret );\n\t\t\t\tconst hasTextInputOffset = textInputOffset !== null;\n\n\t\t\t\tif ( hasTextInputOffset ) {\n\t\t\t\t\tscrollToSection( textInputOffset, caretHeight );\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ getTextInputOffset, scrollToSection ]\n\t\t),\n\t\t200,\n\t\t{ leading: false }\n\t);\n\n\tconst [ currentCaretData ] = useTextInputCaretPosition( scrollEnabled );\n\n\tconst onSizeChange = useCallback(\n\t\t() => onScrollToTextInput( currentCaretData ),\n\t\t[ currentCaretData, onScrollToTextInput ]\n\t);\n\n\tuseEffect( () => {\n\t\tonScrollToTextInput( currentCaretData );\n\t}, [ currentCaretData, onScrollToTextInput ] );\n\n\t// Adds content insets when the keyboard is opened to have\n\t// extra padding at the bottom.\n\tconst contentInset = { bottom: keyboardOffset };\n\n\tconst getFlatListRef = useCallback(\n\t\t( flatListRef ) => {\n\t\t\tscrollViewRef.current = flatListRef?.getNativeScrollRef();\n\t\t},\n\t\t[ scrollViewRef ]\n\t);\n\n\tuseImperativeHandle( ref, () => {\n\t\treturn {\n\t\t\tscrollViewRef: scrollViewRef.current,\n\t\t\tscrollToSection,\n\t\t\tscrollToElement,\n\t\t\tlastScrollTo,\n\t\t};\n\t} );\n\n\tconst optimizationProps =\n\t\tprops.data?.length > OPTIMIZATION_ITEMS_THRESHOLD\n\t\t\t? OPTIMIZATION_PROPS\n\t\t\t: EMPTY_OBJECT;\n\n\treturn (\n\t\t<View style={ styles.list__container }>\n\t\t\t<AnimatedFlatList\n\t\t\t\tref={ getFlatListRef }\n\t\t\t\tautomaticallyAdjustContentInsets={ false }\n\t\t\t\tcontentInset={ contentInset }\n\t\t\t\tkeyboardShouldPersistTaps=\"handled\"\n\t\t\t\tonContentSizeChange={ onContentSizeChange }\n\t\t\t\tonScroll={ scrollHandler }\n\t\t\t\tscrollEventThrottle={ 16 }\n\t\t\t\tstyle={ styles.list__content }\n\t\t\t\t{ ...optimizationProps }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</View>\n\t);\n};\n\nexport default forwardRef( KeyboardAwareFlatList );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAMA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,mBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,0BAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAP,sBAAA,CAAAF,OAAA;AAxBA;AACA;AACA;;AAIA;AACA;AACA;;AASA;AACA;AACA;;AAOA,MAAMU,iBAAiB,GAAG,EAAE;AAC5B,MAAMC,gBAAgB,GAAGC,8BAAQ,CAACC,uBAAuB,CAAEC,qBAAS,CAAC;AACrE,MAAMC,YAAY,GAAG,CAAC,CAAC;;AAE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 -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OPTIMIZATION_PROPS = exports.OPTIMIZATION_ITEMS_THRESHOLD = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Optimization properties for FlatList.
|
|
9
|
+
* @typedef {Object} OptimizationProps
|
|
10
|
+
* @property {number} maxToRenderPerBatch - Controls the amount of items rendered per batch during scrolling.
|
|
11
|
+
* Increasing this number reduces visual blank areas but may affect responsiveness.
|
|
12
|
+
* Default: 10
|
|
13
|
+
* @property {number} windowSize - Measurement unit representing viewport height.
|
|
14
|
+
* Default: 21 (10 viewports above, 10 below, and 1 in between).
|
|
15
|
+
* Larger values reduce chances of seeing blank spaces while scrolling but increase memory consumption.
|
|
16
|
+
* Smaller values save memory but increase chances of seeing blank areas.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Threshold for applying optimization settings.
|
|
21
|
+
* @type {number}
|
|
22
|
+
*/
|
|
23
|
+
const OPTIMIZATION_ITEMS_THRESHOLD = exports.OPTIMIZATION_ITEMS_THRESHOLD = 30;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optimization properties for FlatList.
|
|
27
|
+
* @type {OptimizationProps}
|
|
28
|
+
*/
|
|
29
|
+
const OPTIMIZATION_PROPS = exports.OPTIMIZATION_PROPS = {
|
|
30
|
+
maxToRenderPerBatch: 15,
|
|
31
|
+
windowSize: 17
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=shared.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OPTIMIZATION_ITEMS_THRESHOLD","exports","OPTIMIZATION_PROPS","maxToRenderPerBatch","windowSize"],"sources":["@wordpress/components/src/mobile/keyboard-aware-flat-list/shared.native.js"],"sourcesContent":["/**\n * Optimization properties for FlatList.\n * @typedef {Object} OptimizationProps\n * @property {number} maxToRenderPerBatch - Controls the amount of items rendered per batch during scrolling.\n * Increasing this number reduces visual blank areas but may affect responsiveness.\n * Default: 10\n * @property {number} windowSize - Measurement unit representing viewport height.\n * Default: 21 (10 viewports above, 10 below, and 1 in between).\n * Larger values reduce chances of seeing blank spaces while scrolling but increase memory consumption.\n * Smaller values save memory but increase chances of seeing blank areas.\n */\n\n/**\n * Threshold for applying optimization settings.\n * @type {number}\n */\nexport const OPTIMIZATION_ITEMS_THRESHOLD = 30;\n\n/**\n * Optimization properties for FlatList.\n * @type {OptimizationProps}\n */\nexport const OPTIMIZATION_PROPS = {\n\tmaxToRenderPerBatch: 15,\n\twindowSize: 17,\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,EAAE;;AAE9C;AACA;AACA;AACA;AACO,MAAME,kBAAkB,GAAAD,OAAA,CAAAC,kBAAA,GAAG;EACjCC,mBAAmB,EAAE,EAAE;EACvBC,UAAU,EAAE;AACb,CAAC","ignoreList":[]}
|