@wordpress/components 19.11.0 → 19.14.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 +110 -0
- package/CONTRIBUTING.md +94 -12
- package/README.md +1 -1
- package/build/alignment-matrix-control/index.js +8 -5
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/alignment-matrix-control/utils.js +1 -7
- 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/autocomplete/autocompleter-ui.js +3 -1
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js +8 -2
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/autocomplete/index.js +14 -10
- package/build/autocomplete/index.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +2 -1
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control/hook.js +2 -2
- package/build/border-box-control/border-box-control/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js +4 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/hook.js +13 -4
- package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/hook.js +6 -2
- package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build/border-box-control/styles.js +21 -11
- package/build/border-box-control/styles.js.map +1 -1
- package/build/border-box-control/utils.js.map +1 -1
- package/build/border-control/border-control/component.js +40 -4
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +2 -2
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/box-control/all-input-control.js +6 -10
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/index.js +3 -7
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-controls.js +6 -10
- package/build/box-control/input-controls.js.map +1 -1
- package/build/box-control/unit-control.js +4 -4
- package/build/box-control/unit-control.js.map +1 -1
- package/build/box-control/utils.js +3 -3
- package/build/box-control/utils.js.map +1 -1
- package/build/button/index.native.js +1 -3
- package/build/button/index.native.js.map +1 -1
- package/build/checkbox-control/index.js.map +1 -1
- package/build/color-indicator/index.js +27 -10
- package/build/color-indicator/index.js.map +1 -1
- package/build/color-indicator/types.js +6 -0
- package/build/color-indicator/types.js.map +1 -0
- package/build/color-palette/index.js +11 -3
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +4 -1
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/color-copy-button.js +87 -0
- package/build/color-picker/color-copy-button.js.map +1 -0
- package/build/color-picker/component.js +10 -23
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js +18 -1
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/input-with-slider.js +1 -2
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/styles.js +37 -19
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +4 -2
- package/build/combobox-control/index.js.map +1 -1
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/custom-gradient-bar/constants.js +1 -3
- package/build/custom-gradient-bar/constants.js.map +1 -1
- package/build/custom-gradient-bar/control-points.js +15 -8
- package/build/custom-gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-bar/index.js +5 -5
- package/build/custom-gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-bar/utils.js +5 -7
- package/build/custom-gradient-bar/utils.js.map +1 -1
- package/build/custom-gradient-picker/index.js +8 -8
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/index.native.js +8 -9
- package/build/custom-gradient-picker/index.native.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js +4 -7
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/utils.js +1 -1
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/custom-select-control/index.js.map +1 -1
- package/build/date-time/{date.js → date/index.js} +57 -16
- package/build/date-time/date/index.js.map +1 -0
- package/build/date-time/date/styles.js +70 -0
- package/build/date-time/date/styles.js.map +1 -0
- package/build/date-time/{utils.js → date/utils.js} +0 -0
- package/build/date-time/date/utils.js.map +1 -0
- package/build/date-time/date-time/index.js +177 -0
- package/build/date-time/date-time/index.js.map +1 -0
- package/build/date-time/date-time/styles.js +32 -0
- package/build/date-time/date-time/styles.js.map +1 -0
- package/build/date-time/index.js +2 -109
- package/build/date-time/index.js.map +1 -1
- package/build/date-time/time/index.js +322 -0
- package/build/date-time/time/index.js.map +1 -0
- package/build/date-time/time/styles.js +139 -0
- package/build/date-time/time/styles.js.map +1 -0
- package/build/date-time/{timezone.js → time/timezone.js} +4 -2
- package/build/date-time/time/timezone.js.map +1 -0
- package/build/dimension-control/index.js +1 -3
- package/build/dimension-control/index.js.map +1 -1
- package/build/divider/styles.js +5 -5
- package/build/divider/styles.js.map +1 -1
- package/build/draggable/index.js.map +1 -1
- package/build/draggable/index.native.js +16 -6
- package/build/draggable/index.native.js.map +1 -1
- package/build/drop-zone/provider.js.map +1 -1
- package/build/dropdown/index.js +6 -3
- package/build/dropdown/index.js.map +1 -1
- package/build/dropdown-menu/index.js +13 -2
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +13 -2
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +42 -29
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/elevation/hook.js +13 -13
- package/build/elevation/hook.js.map +1 -1
- package/build/external-link/index.js +20 -8
- package/build/external-link/index.js.map +1 -1
- package/build/external-link/styles/external-link-styles.js +3 -3
- package/build/external-link/styles/external-link-styles.js.map +1 -1
- package/build/external-link/types.js +6 -0
- package/build/external-link/types.js.map +1 -0
- package/build/flex/flex/hook.js +9 -5
- package/build/flex/flex/hook.js.map +1 -1
- package/build/focal-point-picker/controls.js +3 -7
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js +4 -4
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/media.js +4 -8
- package/build/focal-point-picker/media.js.map +1 -1
- package/build/font-size-picker/index.js +1 -1
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-toggle/index.js +34 -9
- package/build/form-toggle/index.js.map +1 -1
- package/build/form-toggle/types.js +6 -0
- package/build/form-toggle/types.js.map +1 -0
- package/build/form-token-field/index.js +328 -359
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +26 -20
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/form-token-field/token-input.js +39 -53
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/form-token-field/token.js +3 -3
- package/build/form-token-field/token.js.map +1 -1
- package/build/form-token-field/types.js +6 -0
- package/build/form-token-field/types.js.map +1 -0
- package/build/gradient-picker/index.js.map +1 -1
- package/build/h-stack/utils.js +3 -3
- package/build/h-stack/utils.js.map +1 -1
- package/build/heading/component.js +0 -1
- package/build/heading/component.js.map +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/heading/types.js +6 -0
- package/build/heading/types.js.map +1 -0
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/higher-order/with-focus-return/index.js.map +1 -1
- package/build/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build/icon/index.js.map +1 -1
- package/build/input-control/index.js +14 -9
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-field.js +11 -36
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/reducer/reducer.js +36 -24
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/reducer/state.js +0 -1
- package/build/input-control/reducer/state.js.map +1 -1
- package/build/input-control/utils.js +46 -1
- package/build/input-control/utils.js.map +1 -1
- package/build/menu-items-choice/index.js +3 -7
- package/build/menu-items-choice/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +1 -7
- package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/color-settings/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/index.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/html-text-input/index.native.js.map +1 -1
- package/build/mobile/inserter-button/index.native.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +4 -4
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +3 -5
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/modal/index.js +1 -1
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +4 -2
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigation/context.js +12 -16
- package/build/navigation/context.js.map +1 -1
- package/build/navigation/group/index.js +4 -7
- 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 +3 -3
- package/build/navigation/item/base.js.map +1 -1
- package/build/navigation/item/index.js +3 -3
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/item/use-navigation-tree-item.js +2 -1
- package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +1 -7
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/search-no-results-found.js +1 -7
- package/build/navigation/menu/search-no-results-found.js.map +1 -1
- package/build/navigation/use-navigation-tree-nodes.js +18 -10
- package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
- package/build/navigation/utils.js +4 -2
- package/build/navigation/utils.js.map +1 -1
- package/build/navigator/navigator-back-button/hook.js.map +1 -1
- package/build/navigator/navigator-button/hook.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +1 -1
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +1 -1
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/notice/index.js +5 -5
- package/build/notice/index.js.map +1 -1
- package/build/notice/list.js +4 -2
- package/build/notice/list.js.map +1 -1
- package/build/panel/body.js +3 -3
- package/build/panel/body.js.map +1 -1
- package/build/placeholder/index.js +26 -12
- package/build/placeholder/index.js.map +1 -1
- package/build/popover/index.js +40 -33
- package/build/popover/index.js.map +1 -1
- package/build/radio-control/index.js +43 -7
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-control/types.js +6 -0
- package/build/radio-control/types.js.map +1 -0
- package/build/range-control/index.js +11 -9
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/input-range.js +6 -10
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/utils.js +10 -12
- package/build/range-control/utils.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js +3 -3
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +4 -7
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/responsive-wrapper/index.js.map +1 -1
- package/build/search-control/index.js +4 -6
- package/build/search-control/index.js.map +1 -1
- package/build/select-control/index.js +8 -4
- package/build/select-control/index.js.map +1 -1
- package/build/slot-fill/fill.js +1 -7
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/slot.js +14 -3
- package/build/slot-fill/slot.js.map +1 -1
- package/build/snackbar/index.js +7 -7
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +3 -1
- package/build/snackbar/list.js.map +1 -1
- package/build/spacer/component.js +5 -5
- package/build/spacer/component.js.map +1 -1
- package/build/spacer/hook.js +11 -3
- package/build/spacer/hook.js.map +1 -1
- package/build/spinner/index.js +26 -13
- package/build/spinner/index.js.map +1 -1
- package/build/spinner/styles.js +10 -10
- package/build/spinner/styles.js.map +1 -1
- package/build/surface/component.js +7 -7
- package/build/surface/component.js.map +1 -1
- package/build/surface/hook.js +8 -11
- package/build/surface/hook.js.map +1 -1
- package/build/surface/index.js.map +1 -1
- package/build/surface/styles.js +8 -48
- package/build/surface/styles.js.map +1 -1
- package/build/tab-panel/index.js +3 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/text/hook.js +4 -4
- package/build/text/hook.js.map +1 -1
- package/build/text/utils.js.map +1 -1
- package/build/textarea-control/index.js +40 -6
- package/build/textarea-control/index.js.map +1 -1
- package/build/textarea-control/styles/textarea-control-styles.js +3 -3
- package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build/textarea-control/types.js +6 -0
- package/build/textarea-control/types.js.map +1 -0
- package/build/toggle-control/index.js +1 -3
- package/build/toggle-control/index.js.map +1 -1
- package/build/toggle-control/index.native.js +1 -7
- package/build/toggle-control/index.native.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
- package/build/toolbar/index.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build/tooltip/index.js +2 -1
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build/tree-select/index.js +57 -4
- package/build/tree-select/index.js.map +1 -1
- package/build/tree-select/types.js +6 -0
- package/build/tree-select/types.js.map +1 -0
- package/build/truncate/component.js +7 -8
- package/build/truncate/component.js.map +1 -1
- package/build/truncate/hook.js +3 -10
- package/build/truncate/hook.js.map +1 -1
- package/build/truncate/index.js.map +1 -1
- package/build/truncate/styles.js +1 -1
- package/build/truncate/styles.js.map +1 -1
- package/build/truncate/utils.js +3 -16
- package/build/truncate/utils.js.map +1 -1
- package/build/ui/form-group/form-group-content.js.map +1 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/utils/hooks/index.js +0 -8
- package/build/utils/hooks/index.js.map +1 -1
- package/build/utils/math.js +17 -7
- package/build/utils/math.js.map +1 -1
- package/build/utils/unit-values.js.map +1 -1
- package/build/utils/values.js.map +1 -1
- package/build/v-stack/component.js +9 -9
- package/build/v-stack/component.js.map +1 -1
- package/build/v-stack/hook.js +0 -5
- package/build/v-stack/hook.js.map +1 -1
- package/build/v-stack/index.js.map +1 -1
- package/build/z-stack/component.js +22 -3
- package/build/z-stack/component.js.map +1 -1
- package/build/z-stack/types.js +6 -0
- package/build/z-stack/types.js.map +1 -0
- package/build-module/alignment-matrix-control/index.js +7 -3
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +1 -6
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/angle-picker-control/index.js +1 -1
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +3 -1
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +8 -2
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/index.js +15 -11
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +2 -1
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control/hook.js +2 -2
- package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js +4 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/hook.js +11 -4
- package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-visualizer/hook.js +4 -2
- package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build-module/border-box-control/styles.js +13 -8
- package/build-module/border-box-control/styles.js.map +1 -1
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/border-control/border-control/component.js +38 -3
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js +2 -2
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/box-control/all-input-control.js +3 -5
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/index.js +2 -5
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-controls.js +3 -5
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/box-control/unit-control.js +3 -1
- package/build-module/box-control/unit-control.js.map +1 -1
- package/build-module/box-control/utils.js +4 -4
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button/index.native.js +1 -2
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/color-indicator/index.js +29 -8
- package/build-module/color-indicator/index.js.map +1 -1
- package/build-module/color-indicator/types.js +2 -0
- package/build-module/color-indicator/types.js.map +1 -0
- package/build-module/color-palette/index.js +9 -6
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +4 -1
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/color-copy-button.js +73 -0
- package/build-module/color-picker/color-copy-button.js.map +1 -0
- package/build-module/color-picker/component.js +11 -21
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js +18 -1
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +1 -2
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/styles.js +30 -16
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +5 -2
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/custom-gradient-bar/constants.js +0 -1
- package/build-module/custom-gradient-bar/constants.js.map +1 -1
- package/build-module/custom-gradient-bar/control-points.js +16 -9
- package/build-module/custom-gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-bar/index.js +6 -6
- package/build-module/custom-gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-bar/utils.js +6 -8
- package/build-module/custom-gradient-bar/utils.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +8 -7
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.native.js +8 -8
- package/build-module/custom-gradient-picker/index.native.js.map +1 -1
- package/build-module/custom-gradient-picker/serializer.js +4 -6
- package/build-module/custom-gradient-picker/serializer.js.map +1 -1
- package/build-module/custom-gradient-picker/utils.js +1 -1
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/date-time/{date.js → date/index.js} +51 -16
- package/build-module/date-time/date/index.js.map +1 -0
- package/build-module/date-time/date/styles.js +61 -0
- package/build-module/date-time/date/styles.js.map +1 -0
- package/build-module/date-time/{utils.js → date/utils.js} +0 -0
- package/build-module/date-time/date/utils.js.map +1 -0
- package/build-module/date-time/date-time/index.js +147 -0
- package/build-module/date-time/date-time/index.js.map +1 -0
- package/build-module/date-time/date-time/styles.js +22 -0
- package/build-module/date-time/date-time/styles.js.map +1 -0
- package/build-module/date-time/index.js +1 -105
- package/build-module/date-time/index.js.map +1 -1
- package/build-module/date-time/time/index.js +302 -0
- package/build-module/date-time/time/index.js.map +1 -0
- package/build-module/date-time/time/styles.js +118 -0
- package/build-module/date-time/time/styles.js.map +1 -0
- package/build-module/date-time/{timezone.js → time/timezone.js} +3 -2
- package/build-module/date-time/time/timezone.js.map +1 -0
- package/build-module/dimension-control/index.js +1 -2
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/divider/styles.js +5 -5
- package/build-module/divider/styles.js.map +1 -1
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/draggable/index.native.js +16 -6
- package/build-module/draggable/index.native.js.map +1 -1
- package/build-module/drop-zone/provider.js.map +1 -1
- package/build-module/dropdown/index.js +6 -3
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/dropdown-menu/index.js +12 -1
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +12 -1
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +42 -29
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/elevation/hook.js +12 -12
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/external-link/index.js +22 -7
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/external-link/styles/external-link-styles.js +3 -3
- package/build-module/external-link/styles/external-link-styles.js.map +1 -1
- package/build-module/external-link/types.js +2 -0
- package/build-module/external-link/types.js.map +1 -0
- package/build-module/flex/flex/hook.js +7 -5
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +3 -5
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +1 -1
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/media.js +3 -5
- package/build-module/focal-point-picker/media.js.map +1 -1
- package/build-module/font-size-picker/index.js +1 -1
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/form-toggle/index.js +31 -7
- package/build-module/form-toggle/index.js.map +1 -1
- package/build-module/form-toggle/types.js +2 -0
- package/build-module/form-toggle/types.js.map +1 -0
- package/build-module/form-token-field/index.js +329 -361
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +32 -23
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/form-token-field/token-input.js +43 -58
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/form-token-field/token.js +3 -1
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/form-token-field/types.js +2 -0
- package/build-module/form-token-field/types.js.map +1 -0
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/h-stack/utils.js +3 -3
- package/build-module/h-stack/utils.js.map +1 -1
- package/build-module/heading/component.js +0 -1
- package/build-module/heading/component.js.map +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/heading/types.js +2 -0
- package/build-module/heading/types.js.map +1 -0
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/higher-order/with-focus-return/index.js.map +1 -1
- package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build-module/icon/index.js.map +1 -1
- package/build-module/input-control/index.js +10 -5
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-field.js +3 -26
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js +38 -26
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/reducer/state.js +0 -1
- package/build-module/input-control/reducer/state.js.map +1 -1
- package/build-module/input-control/utils.js +49 -3
- package/build-module/input-control/utils.js.map +1 -1
- package/build-module/menu-items-choice/index.js +3 -5
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +1 -6
- package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/inserter-button/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +4 -3
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +3 -4
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/modal/index.js +1 -1
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigable-container/container.js +5 -2
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigation/context.js +3 -5
- package/build-module/navigation/context.js.map +1 -1
- package/build-module/navigation/group/index.js +3 -6
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/index.js +3 -1
- 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 +3 -1
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/item/use-navigation-tree-item.js +2 -1
- package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +1 -6
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/search-no-results-found.js +1 -6
- package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
- package/build-module/navigation/use-navigation-tree-nodes.js +18 -9
- package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
- package/build-module/navigation/utils.js +2 -2
- package/build-module/navigation/utils.js.map +1 -1
- package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +1 -1
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +1 -1
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/notice/index.js +2 -1
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/list.js +4 -1
- package/build-module/notice/list.js.map +1 -1
- package/build-module/panel/body.js +3 -1
- package/build-module/panel/body.js.map +1 -1
- package/build-module/placeholder/index.js +24 -11
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/popover/index.js +40 -33
- package/build-module/popover/index.js.map +1 -1
- package/build-module/radio-control/index.js +40 -7
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-control/types.js +2 -0
- package/build-module/radio-control/types.js.map +1 -0
- package/build-module/range-control/index.js +4 -2
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/input-range.js +2 -5
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/utils.js +4 -5
- package/build-module/range-control/utils.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +2 -1
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +3 -5
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/responsive-wrapper/index.js.map +1 -1
- package/build-module/search-control/index.js +6 -7
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/select-control/index.js +6 -2
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/slot-fill/fill.js +1 -6
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/slot.js +12 -2
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/snackbar/index.js +3 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +4 -1
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spacer/component.js +3 -4
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spacer/hook.js +10 -2
- package/build-module/spacer/hook.js.map +1 -1
- package/build-module/spinner/index.js +22 -13
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/spinner/styles.js +10 -10
- package/build-module/spinner/styles.js.map +1 -1
- package/build-module/surface/component.js +7 -7
- package/build-module/surface/component.js.map +1 -1
- package/build-module/surface/hook.js +8 -11
- package/build-module/surface/hook.js.map +1 -1
- package/build-module/surface/index.js.map +1 -1
- package/build-module/surface/styles.js +8 -48
- package/build-module/surface/styles.js.map +1 -1
- package/build-module/tab-panel/index.js +3 -1
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/text/hook.js +4 -4
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text/utils.js.map +1 -1
- package/build-module/textarea-control/index.js +36 -5
- package/build-module/textarea-control/index.js.map +1 -1
- package/build-module/textarea-control/styles/textarea-control-styles.js +3 -3
- package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build-module/textarea-control/types.js +2 -0
- package/build-module/textarea-control/types.js.map +1 -0
- package/build-module/toggle-control/index.js +1 -2
- package/build-module/toggle-control/index.js.map +1 -1
- package/build-module/toggle-control/index.native.js +1 -6
- package/build-module/toggle-control/index.native.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
- package/build-module/toolbar/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build-module/tooltip/index.js +2 -1
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build-module/tree-select/index.js +53 -3
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/tree-select/types.js +2 -0
- package/build-module/tree-select/types.js.map +1 -0
- package/build-module/truncate/component.js +7 -8
- package/build-module/truncate/component.js.map +1 -1
- package/build-module/truncate/hook.js +3 -10
- package/build-module/truncate/hook.js.map +1 -1
- package/build-module/truncate/index.js.map +1 -1
- package/build-module/truncate/styles.js +1 -1
- package/build-module/truncate/styles.js.map +1 -1
- package/build-module/truncate/utils.js +3 -16
- package/build-module/truncate/utils.js.map +1 -1
- package/build-module/ui/form-group/form-group-content.js.map +1 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/utils/hooks/index.js +0 -1
- package/build-module/utils/hooks/index.js.map +1 -1
- package/build-module/utils/math.js +15 -6
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/unit-values.js.map +1 -1
- package/build-module/utils/values.js.map +1 -1
- package/build-module/v-stack/component.js +9 -9
- package/build-module/v-stack/component.js.map +1 -1
- package/build-module/v-stack/hook.js +0 -5
- package/build-module/v-stack/hook.js.map +1 -1
- package/build-module/v-stack/index.js.map +1 -1
- package/build-module/z-stack/component.js +21 -2
- package/build-module/z-stack/component.js.map +1 -1
- package/build-module/z-stack/types.js +2 -0
- package/build-module/z-stack/types.js.map +1 -0
- package/build-style/style-rtl.css +61 -191
- package/build-style/style.css +61 -195
- package/build-types/base-control/stories/index.d.ts.map +1 -1
- package/build-types/base-field/hook.d.ts +0 -1
- package/build-types/base-field/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +0 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +0 -1
- 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/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +1 -1
- 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 +0 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
- package/build-types/border-box-control/styles.d.ts +3 -2
- package/build-types/border-box-control/styles.d.ts.map +1 -1
- package/build-types/border-box-control/utils.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +36 -2
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +0 -1
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +0 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-style-picker/hook.d.ts +0 -1
- package/build-types/border-control/border-control-style-picker/hook.d.ts.map +1 -1
- package/build-types/border-control/stories/index.d.ts +33 -0
- package/build-types/border-control/stories/index.d.ts.map +1 -0
- 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 +0 -1
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +0 -1
- package/build-types/card/card-body/hook.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +0 -1
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +0 -1
- package/build-types/card/card-footer/hook.d.ts.map +1 -1
- package/build-types/card/card-header/hook.d.ts +0 -1
- package/build-types/card/card-header/hook.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +0 -1
- package/build-types/card/card-media/hook.d.ts.map +1 -1
- package/build-types/card/types.d.ts +1 -1
- package/build-types/card/types.d.ts.map +1 -1
- package/build-types/checkbox-control/index.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.d.ts.map +1 -1
- package/build-types/checkbox-control/test/index.d.ts +2 -0
- package/build-types/checkbox-control/test/index.d.ts.map +1 -0
- package/build-types/color-indicator/index.d.ts +16 -5
- package/build-types/color-indicator/index.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.d.ts +12 -0
- package/build-types/color-indicator/stories/index.d.ts.map +1 -0
- package/build-types/color-indicator/test/index.d.ts +2 -0
- package/build-types/color-indicator/test/index.d.ts.map +1 -0
- package/build-types/color-indicator/types.d.ts +12 -0
- package/build-types/color-indicator/types.d.ts.map +1 -0
- package/build-types/color-palette/index.d.ts +1 -0
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/styles.d.ts +4 -2
- package/build-types/color-palette/styles.d.ts.map +1 -1
- package/build-types/{date-time → color-palette}/test/utils.d.ts +0 -0
- package/build-types/color-palette/test/utils.d.ts.map +1 -0
- package/build-types/color-picker/color-copy-button.d.ts +4 -0
- package/build-types/color-picker/color-copy-button.d.ts.map +1 -0
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +25 -8
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/color-picker/types.d.ts +8 -0
- package/build-types/color-picker/types.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/date-time/{date.d.ts → date/index.d.ts} +4 -3
- package/build-types/date-time/date/index.d.ts.map +1 -0
- package/build-types/date-time/date/styles.d.ts +23 -0
- package/build-types/date-time/date/styles.d.ts.map +1 -0
- package/build-types/date-time/date/test/index.d.ts +2 -0
- package/build-types/date-time/date/test/index.d.ts.map +1 -0
- package/build-types/date-time/date/test/utils.d.ts +2 -0
- package/build-types/date-time/date/test/utils.d.ts.map +1 -0
- package/build-types/date-time/{utils.d.ts → date/utils.d.ts} +0 -0
- package/build-types/date-time/date/utils.d.ts.map +1 -0
- package/build-types/date-time/date-time/index.d.ts +33 -0
- package/build-types/date-time/date-time/index.d.ts.map +1 -0
- package/build-types/date-time/date-time/styles.d.ts +6 -0
- package/build-types/date-time/date-time/styles.d.ts.map +1 -0
- package/build-types/date-time/index.d.ts +2 -28
- package/build-types/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/stories/{index.d.ts → date-time.d.ts} +2 -2
- package/build-types/date-time/stories/date-time.d.ts.map +1 -0
- package/build-types/date-time/stories/date.d.ts.map +1 -1
- package/build-types/date-time/{time.d.ts → time/index.d.ts} +2 -2
- package/build-types/date-time/time/index.d.ts.map +1 -0
- package/build-types/date-time/time/styles.d.ts +111 -0
- package/build-types/date-time/time/styles.d.ts.map +1 -0
- package/build-types/date-time/time/test/index.d.ts +2 -0
- package/build-types/date-time/time/test/index.d.ts.map +1 -0
- package/build-types/date-time/{timezone.d.ts → time/timezone.d.ts} +0 -0
- package/build-types/date-time/time/timezone.d.ts.map +1 -0
- package/build-types/date-time/types.d.ts +20 -15
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts.map +1 -1
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +0 -1
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts +17 -0
- package/build-types/external-link/index.d.ts.map +1 -0
- package/build-types/external-link/stories/index.d.ts +12 -0
- package/build-types/external-link/stories/index.d.ts.map +1 -0
- package/build-types/external-link/styles/external-link-styles.d.ts +10 -0
- package/build-types/external-link/styles/external-link-styles.d.ts.map +1 -0
- package/build-types/external-link/types.d.ts +15 -0
- package/build-types/external-link/types.d.ts.map +1 -0
- package/build-types/flex/flex/hook.d.ts +0 -1
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +0 -1
- package/build-types/flex/flex-block/hook.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +0 -1
- package/build-types/flex/flex-item/hook.d.ts.map +1 -1
- package/build-types/form-toggle/index.d.ts +29 -0
- package/build-types/form-toggle/index.d.ts.map +1 -0
- package/build-types/form-toggle/stories/index.d.ts +12 -0
- package/build-types/form-toggle/stories/index.d.ts.map +1 -0
- package/build-types/form-toggle/test/index.d.ts +2 -0
- package/build-types/form-toggle/test/index.d.ts.map +1 -0
- package/build-types/form-toggle/types.d.ts +22 -0
- package/build-types/form-toggle/types.d.ts.map +1 -0
- package/build-types/form-token-field/index.d.ts +15 -0
- package/build-types/form-token-field/index.d.ts.map +1 -0
- package/build-types/form-token-field/stories/index.d.ts +13 -0
- package/build-types/form-token-field/stories/index.d.ts.map +1 -0
- package/build-types/form-token-field/suggestions-list.d.ts +10 -0
- package/build-types/form-token-field/suggestions-list.d.ts.map +1 -0
- package/build-types/form-token-field/test/lib/fixtures.d.ts +26 -0
- package/build-types/form-token-field/test/lib/fixtures.d.ts.map +1 -0
- package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts +21 -0
- package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts.map +1 -0
- package/build-types/form-token-field/token-input.d.ts +12 -0
- package/build-types/form-token-field/token-input.d.ts.map +1 -0
- package/build-types/form-token-field/token.d.ts +4 -0
- package/build-types/form-token-field/token.d.ts.map +1 -0
- package/build-types/form-token-field/types.d.ts +176 -0
- package/build-types/form-token-field/types.d.ts.map +1 -0
- package/build-types/grid/hook.d.ts +0 -1
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +0 -1
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/heading/component.d.ts +1 -2
- package/build-types/heading/component.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +1 -29
- package/build-types/heading/hook.d.ts.map +1 -1
- package/build-types/heading/stories/index.d.ts.map +1 -1
- package/build-types/heading/test/index.d.ts +2 -0
- package/build-types/heading/test/index.d.ts.map +1 -0
- package/build-types/heading/types.d.ts +16 -0
- package/build-types/heading/types.d.ts.map +1 -0
- package/build-types/higher-order/with-focus-outside/index.d.ts +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-field.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts +5 -3
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/reducer/state.d.ts +2 -2
- package/build-types/input-control/reducer/state.d.ts.map +1 -1
- package/build-types/input-control/stories/index.d.ts +5 -5
- package/build-types/input-control/stories/index.d.ts.map +1 -1
- package/build-types/input-control/utils.d.ts +17 -0
- package/build-types/input-control/utils.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +0 -1
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +0 -1
- package/build-types/item-group/item-group/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +0 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +0 -1
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
- package/build-types/popover/index.d.ts +1 -0
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts +31 -0
- package/build-types/radio-control/index.d.ts.map +1 -0
- package/build-types/radio-control/stories/index.d.ts +12 -0
- package/build-types/radio-control/stories/index.d.ts.map +1 -0
- package/build-types/radio-control/types.d.ts +29 -0
- package/build-types/radio-control/types.d.ts.map +1 -0
- package/build-types/range-control/index.d.ts +5 -5
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts +4 -4
- package/build-types/range-control/input-range.d.ts.map +1 -1
- package/build-types/range-control/utils.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +0 -1
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.d.ts +3 -3
- package/build-types/select-control/stories/index.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +1 -1
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/spacer/component.d.ts +2 -3
- package/build-types/spacer/component.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +0 -1
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/spacer/stories/index.d.ts +12 -0
- package/build-types/spacer/stories/index.d.ts.map +1 -0
- package/build-types/spinner/index.d.ts +16 -15
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/stories/index.d.ts +13 -0
- package/build-types/spinner/stories/index.d.ts.map +1 -0
- package/build-types/spinner/styles.d.ts +4 -3
- package/build-types/spinner/styles.d.ts.map +1 -1
- package/build-types/surface/component.d.ts +3 -2
- package/build-types/surface/component.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +4 -5
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/surface/index.d.ts +2 -2
- package/build-types/surface/index.d.ts.map +1 -1
- package/build-types/surface/stories/index.d.ts +12 -0
- package/build-types/surface/stories/index.d.ts.map +1 -0
- package/build-types/surface/styles.d.ts +10 -21
- package/build-types/surface/styles.d.ts.map +1 -1
- package/build-types/surface/test/index.d.ts +2 -0
- package/build-types/surface/test/index.d.ts.map +1 -0
- package/build-types/surface/types.d.ts +1 -1
- package/build-types/surface/types.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +0 -1
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text/types.d.ts +1 -1
- package/build-types/text/types.d.ts.map +1 -1
- package/build-types/text/utils.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +1 -1
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-control/stories/index.d.ts.map +1 -1
- package/build-types/textarea-control/index.d.ts +29 -0
- package/build-types/textarea-control/index.d.ts.map +1 -0
- package/build-types/textarea-control/stories/index.d.ts +12 -0
- package/build-types/textarea-control/stories/index.d.ts.map +1 -0
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts +6 -0
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -0
- package/build-types/textarea-control/types.d.ts +26 -0
- package/build-types/textarea-control/types.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +0 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +0 -1
- 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 +0 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts +53 -0
- package/build-types/tree-select/index.d.ts.map +1 -0
- package/build-types/tree-select/stories/index.d.ts +12 -0
- package/build-types/tree-select/stories/index.d.ts.map +1 -0
- package/build-types/tree-select/types.d.ts +30 -0
- package/build-types/tree-select/types.d.ts.map +1 -0
- package/build-types/truncate/component.d.ts +3 -3
- package/build-types/truncate/component.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +5 -3
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/truncate/index.d.ts +2 -2
- package/build-types/truncate/index.d.ts.map +1 -1
- package/build-types/truncate/stories/index.d.ts +13 -0
- package/build-types/truncate/stories/index.d.ts.map +1 -0
- package/build-types/truncate/styles.d.ts +1 -1
- package/build-types/truncate/styles.d.ts.map +1 -1
- package/build-types/truncate/test/index.d.ts +2 -0
- package/build-types/truncate/test/index.d.ts.map +1 -0
- package/build-types/truncate/types.d.ts +22 -11
- package/build-types/truncate/types.d.ts.map +1 -1
- package/build-types/truncate/utils.d.ts +17 -28
- package/build-types/truncate/utils.d.ts.map +1 -1
- package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
- package/build-types/ui/control-group/hook.d.ts +0 -1
- package/build-types/ui/control-group/hook.d.ts.map +1 -1
- package/build-types/ui/control-label/hook.d.ts +0 -1
- package/build-types/ui/control-label/hook.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +2 -4
- package/build-types/ui/form-group/use-form-group.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/stories/index.d.ts.map +1 -1
- package/build-types/utils/hooks/index.d.ts +0 -1
- package/build-types/utils/math.d.ts +10 -0
- package/build-types/utils/math.d.ts.map +1 -1
- package/build-types/utils/unit-values.d.ts.map +1 -1
- package/build-types/utils/values.d.ts.map +1 -1
- package/build-types/v-stack/component.d.ts +5 -4
- package/build-types/v-stack/component.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +5 -4
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/build-types/v-stack/index.d.ts +2 -2
- package/build-types/v-stack/index.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.d.ts +9 -0
- package/build-types/v-stack/stories/index.d.ts.map +1 -0
- package/build-types/v-stack/test/index.d.ts +2 -0
- package/build-types/v-stack/test/index.d.ts.map +1 -0
- package/build-types/v-stack/types.d.ts +21 -1
- package/build-types/v-stack/types.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts +18 -28
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/build-types/z-stack/stories/index.d.ts +6 -0
- package/build-types/z-stack/stories/index.d.ts.map +1 -0
- package/build-types/z-stack/types.d.ts +33 -0
- package/build-types/z-stack/types.d.ts.map +1 -0
- package/package.json +19 -18
- package/src/alignment-matrix-control/index.js +6 -3
- package/src/alignment-matrix-control/utils.js +1 -6
- package/src/angle-picker-control/index.js +1 -1
- package/src/autocomplete/autocompleter-ui.js +3 -0
- package/src/autocomplete/autocompleter-ui.native.js +6 -0
- package/src/autocomplete/index.js +16 -8
- package/src/base-control/stories/index.tsx +2 -3
- package/src/border-box-control/border-box-control/component.tsx +1 -0
- package/src/border-box-control/border-box-control/hook.ts +2 -2
- package/src/border-box-control/border-box-control-linked-button/component.tsx +2 -5
- package/src/border-box-control/border-box-control-split-controls/component.tsx +3 -0
- package/src/border-box-control/border-box-control-split-controls/hook.ts +18 -4
- package/src/border-box-control/border-box-control-visualizer/hook.ts +5 -2
- package/src/border-box-control/styles.ts +6 -2
- package/src/border-box-control/utils.ts +5 -2
- package/src/border-control/border-control/component.tsx +41 -4
- package/src/border-control/border-control/hook.ts +10 -5
- package/src/border-control/stories/index.tsx +150 -0
- package/src/box-control/all-input-control.js +2 -4
- package/src/box-control/axial-input-controls.js +4 -6
- package/src/box-control/index.js +2 -5
- package/src/box-control/input-controls.js +33 -36
- package/src/box-control/test/index.js +120 -109
- package/src/box-control/unit-control.js +2 -1
- package/src/box-control/utils.js +4 -4
- package/src/button/index.native.js +1 -2
- package/src/card/stories/index.js +10 -5
- package/src/card/types.ts +1 -1
- package/src/checkbox-control/index.tsx +2 -3
- package/src/checkbox-control/stories/index.tsx +2 -3
- package/src/checkbox-control/test/__snapshots__/index.tsx.snap +42 -0
- package/src/checkbox-control/test/index.tsx +110 -0
- package/src/color-indicator/README.md +7 -9
- package/src/color-indicator/index.tsx +47 -0
- package/src/color-indicator/stories/index.tsx +37 -0
- package/src/color-indicator/test/__snapshots__/index.tsx.snap +11 -0
- package/src/color-indicator/test/{index.js → index.tsx} +4 -4
- package/src/color-indicator/types.ts +12 -0
- package/src/color-palette/index.js +16 -5
- package/src/color-palette/index.native.js +3 -0
- package/src/color-palette/stories/index.js +25 -1
- package/src/color-palette/test/utils.ts +24 -0
- package/src/color-picker/color-copy-button.tsx +76 -0
- package/src/color-picker/component.tsx +18 -37
- package/src/color-picker/hex-input.tsx +16 -0
- package/src/color-picker/index.native.js +7 -4
- package/src/color-picker/input-with-slider.tsx +2 -2
- package/src/color-picker/styles.ts +25 -2
- package/src/color-picker/types.ts +9 -0
- package/src/combobox-control/index.js +4 -2
- package/src/confirm-dialog/component.tsx +7 -8
- package/src/custom-gradient-bar/constants.js +2 -2
- package/src/custom-gradient-bar/control-points.js +20 -16
- package/src/custom-gradient-bar/index.js +11 -11
- package/src/custom-gradient-bar/test/utils.js +79 -0
- package/src/custom-gradient-bar/utils.js +6 -18
- package/src/custom-gradient-picker/index.js +4 -11
- package/src/custom-gradient-picker/index.native.js +3 -11
- package/src/custom-gradient-picker/serializer.js +5 -11
- package/src/custom-gradient-picker/style.scss +1 -3
- package/src/custom-gradient-picker/utils.js +5 -4
- package/src/custom-select-control/index.js +2 -1
- package/src/custom-select-control/stories/index.js +1 -2
- package/src/date-time/README.md +23 -0
- package/src/date-time/{datepicker.scss → date/datepicker.scss} +0 -0
- package/src/date-time/{date.tsx → date/index.tsx} +42 -17
- package/src/date-time/date/style.scss +85 -0
- package/src/date-time/date/styles.ts +55 -0
- package/src/date-time/{test/date.tsx → date/test/index.tsx} +2 -2
- package/src/date-time/{test → date/test}/utils.ts +0 -0
- package/src/date-time/{utils.ts → date/utils.ts} +0 -0
- package/src/date-time/date-time/index.tsx +217 -0
- package/src/date-time/date-time/styles.ts +8 -0
- package/src/date-time/index.ts +9 -0
- package/src/date-time/stories/{index.tsx → date-time.tsx} +5 -7
- package/src/date-time/stories/date.tsx +2 -3
- package/src/date-time/style.scss +1 -262
- package/src/date-time/time/index.tsx +356 -0
- package/src/date-time/time/styles.ts +119 -0
- package/src/date-time/{test/time.tsx → time/test/index.tsx} +97 -50
- package/src/date-time/{timezone.tsx → time/timezone.tsx} +5 -2
- package/src/date-time/types.ts +23 -18
- package/src/dimension-control/README.md +5 -2
- package/src/dimension-control/index.js +1 -2
- package/src/dimension-control/test/index.test.js +7 -7
- package/src/divider/styles.ts +2 -3
- package/src/draggable/index.js +3 -3
- package/src/draggable/index.native.js +26 -7
- package/src/draggable/test/index.native.js +130 -0
- package/src/drop-zone/provider.js +1 -2
- package/src/dropdown/index.js +7 -3
- package/src/dropdown-menu/index.js +11 -1
- package/src/dropdown-menu/index.native.js +11 -1
- package/src/duotone-picker/duotone-picker.js +58 -37
- package/src/duotone-picker/style.scss +19 -0
- package/src/elevation/hook.js +8 -8
- package/src/external-link/README.md +18 -0
- package/src/external-link/{index.js → index.tsx} +26 -6
- package/src/external-link/stories/index.tsx +36 -0
- package/src/external-link/styles/{external-link-styles.js → external-link-styles.ts} +0 -0
- package/src/external-link/types.ts +15 -0
- package/src/flex/flex/README.md +5 -10
- package/src/flex/flex/hook.js +4 -1
- package/src/flex/flex-item/README.md +1 -1
- package/src/focal-point-picker/controls.js +1 -5
- package/src/focal-point-picker/index.js +2 -8
- package/src/focal-point-picker/index.native.js +1 -1
- package/src/focal-point-picker/media.js +2 -5
- package/src/font-size-picker/index.js +3 -1
- package/src/form-toggle/README.md +10 -11
- package/src/form-toggle/index.tsx +71 -0
- package/src/form-toggle/stories/index.tsx +52 -0
- package/src/form-toggle/test/__snapshots__/index.tsx.snap +54 -0
- package/src/form-toggle/test/index.tsx +102 -0
- package/src/form-toggle/types.ts +22 -0
- package/src/form-token-field/index.tsx +694 -0
- package/src/form-token-field/stories/index.tsx +103 -0
- package/src/form-token-field/style.scss +2 -1
- package/src/form-token-field/{suggestions-list.js → suggestions-list.tsx} +45 -29
- package/src/form-token-field/test/index.js +70 -40
- package/src/form-token-field/test/lib/token-field-wrapper.tsx +71 -0
- package/src/form-token-field/token-input.tsx +76 -0
- package/src/form-token-field/{token.js → token.tsx} +4 -2
- package/src/form-token-field/types.ts +178 -0
- package/src/gradient-picker/index.js +4 -3
- package/src/h-stack/utils.js +3 -3
- package/src/heading/README.md +4 -3
- package/src/heading/component.tsx +2 -2
- package/src/heading/hook.ts +6 -46
- package/src/heading/stories/index.tsx +5 -1
- package/src/heading/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/heading/test/index.tsx +68 -0
- package/src/heading/types.ts +29 -0
- package/src/higher-order/navigate-regions/index.js +7 -5
- package/src/higher-order/with-filters/test/index.js +43 -36
- package/src/higher-order/with-focus-return/index.js +14 -13
- package/src/higher-order/with-spoken-messages/index.js +8 -7
- package/src/higher-order/with-spoken-messages/test/index.js +1 -1
- package/src/icon/index.tsx +2 -2
- package/src/input-control/index.tsx +10 -3
- package/src/input-control/input-field.tsx +12 -31
- package/src/input-control/reducer/reducer.ts +63 -47
- package/src/input-control/reducer/state.ts +2 -3
- package/src/input-control/test/index.js +106 -31
- package/src/input-control/utils.ts +56 -2
- package/src/item-group/stories/index.js +2 -1
- package/src/menu-item/test/index.js +2 -1
- package/src/menu-items-choice/index.js +2 -5
- package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +2 -4
- package/src/mobile/bottom-sheet/cell.native.js +2 -3
- package/src/mobile/bottom-sheet/cycle-picker-cell.native.js +3 -5
- package/src/mobile/bottom-sheet/index.native.js +14 -17
- package/src/mobile/bottom-sheet/keyboard-avoiding-view.native.js +2 -7
- package/src/mobile/bottom-sheet/picker-cell.native.js +2 -7
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +4 -6
- package/src/mobile/color-settings/index.native.js +2 -4
- package/src/mobile/global-styles-context/index.native.js +8 -7
- package/src/mobile/gradient/index.native.js +12 -9
- package/src/mobile/gradient/test/index.native.js +1 -3
- package/src/mobile/html-text-input/index.native.js +2 -3
- package/src/mobile/inserter-button/index.native.js +2 -6
- package/src/mobile/link-picker/index.native.js +2 -3
- package/src/mobile/link-settings/image-link-destinations-screen.native.js +6 -2
- package/src/mobile/media-edit/index.native.js +2 -3
- package/src/mobile/segmented-control/index.native.js +9 -9
- package/src/mobile/utils/test/index.native.js +3 -12
- package/src/modal/index.js +1 -1
- package/src/navigable-container/container.js +3 -2
- package/src/navigable-container/test/menu.js +1 -2
- package/src/navigable-container/test/tabbable.js +1 -2
- package/src/navigation/context.js +2 -5
- package/src/navigation/group/index.js +8 -3
- package/src/navigation/index.js +2 -1
- package/src/navigation/item/base.js +3 -2
- package/src/navigation/item/index.js +2 -1
- package/src/navigation/item/use-navigation-tree-item.js +2 -0
- package/src/navigation/menu/menu-title-search.js +3 -6
- package/src/navigation/menu/search-no-results-found.js +3 -6
- package/src/navigation/stories/controlled-state.js +1 -1
- package/src/navigation/stories/more-examples.js +2 -3
- package/src/navigation/test/index.js +252 -52
- package/src/navigation/use-navigation-tree-nodes.js +11 -10
- package/src/navigation/utils.js +2 -2
- package/src/navigator/navigator-back-button/hook.ts +14 -12
- package/src/navigator/navigator-button/hook.ts +14 -13
- package/src/navigator/navigator-provider/component.tsx +2 -6
- package/src/navigator/navigator-screen/component.tsx +3 -3
- package/src/notice/index.js +2 -1
- package/src/notice/list.js +3 -1
- package/src/number-control/stories/index.js +24 -24
- package/src/panel/body.js +2 -1
- package/src/placeholder/README.md +7 -6
- package/src/placeholder/index.js +27 -10
- package/src/placeholder/style.scss +23 -0
- package/src/popover/index.js +42 -27
- package/src/query-controls/README.md +1 -1
- package/src/radio-control/README.md +17 -23
- package/src/radio-control/index.tsx +107 -0
- package/src/radio-control/stories/index.tsx +72 -0
- package/src/radio-control/types.ts +32 -0
- package/src/range-control/index.js +4 -2
- package/src/range-control/input-range.js +2 -5
- package/src/range-control/utils.js +3 -4
- package/src/resizable-box/resize-tooltip/index.tsx +2 -1
- package/src/resizable-box/resize-tooltip/utils.ts +1 -5
- package/src/responsive-wrapper/index.js +2 -4
- package/src/sandbox/test/index.js +4 -6
- package/src/search-control/index.js +6 -7
- package/src/select-control/README.md +11 -0
- package/src/select-control/index.tsx +9 -2
- package/src/select-control/stories/index.tsx +3 -4
- package/src/select-control/types.ts +1 -1
- package/src/slot-fill/README.md +1 -1
- package/src/slot-fill/fill.js +1 -5
- package/src/slot-fill/slot.js +12 -2
- package/src/slot-fill/test/slot.js +2 -3
- package/src/snackbar/index.js +1 -1
- package/src/snackbar/list.js +2 -1
- package/src/spacer/component.tsx +3 -4
- package/src/spacer/hook.ts +13 -13
- package/src/spacer/stories/index.tsx +70 -0
- package/src/spinner/{index.js → index.tsx} +23 -9
- package/src/spinner/stories/index.tsx +32 -0
- package/src/spinner/{styles.js → styles.ts} +0 -0
- package/src/style.scss +1 -0
- package/src/surface/README.md +15 -15
- package/src/surface/{component.js → component.tsx} +13 -7
- package/src/surface/{hook.js → hook.ts} +13 -12
- package/src/surface/{index.js → index.ts} +0 -0
- package/src/surface/stories/index.tsx +40 -0
- package/src/surface/{styles.js → styles.ts} +15 -44
- package/src/surface/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/surface/test/{index.js → index.tsx} +2 -1
- package/src/surface/types.ts +1 -1
- package/src/tab-panel/index.js +3 -1
- package/src/text/hook.js +4 -1
- package/src/text/types.ts +1 -1
- package/src/text/utils.js +2 -3
- package/src/text-control/stories/index.tsx +4 -6
- package/src/textarea-control/README.md +14 -20
- package/src/textarea-control/index.tsx +86 -0
- package/src/textarea-control/stories/index.tsx +58 -0
- package/src/textarea-control/styles/{textarea-control-styles.js → textarea-control-styles.ts} +0 -0
- package/src/textarea-control/types.ts +30 -0
- package/src/toggle-control/index.js +1 -2
- package/src/toggle-control/index.native.js +2 -6
- package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +2 -4
- package/src/toolbar/index.js +1 -2
- package/src/tools-panel/tools-panel/hook.ts +2 -4
- package/src/tools-panel/tools-panel-header/hook.ts +2 -5
- package/src/tooltip/index.js +1 -0
- package/src/tree-grid/roving-tab-index-item.js +2 -4
- package/src/tree-grid/test/index.js +2 -3
- package/src/tree-select/README.md +2 -2
- package/src/tree-select/index.tsx +99 -0
- package/src/tree-select/stories/index.tsx +80 -0
- package/src/tree-select/types.ts +35 -0
- package/src/truncate/README.md +16 -12
- package/src/truncate/{component.js → component.tsx} +13 -9
- package/src/truncate/{hook.js → hook.ts} +8 -10
- package/src/truncate/{index.js → index.ts} +0 -0
- package/src/truncate/stories/index.tsx +49 -0
- package/src/truncate/{styles.js → styles.ts} +0 -0
- package/src/truncate/test/{index.js → index.tsx} +4 -4
- package/src/truncate/types.ts +28 -10
- package/src/truncate/{utils.js → utils.ts} +19 -19
- package/src/ui/context/wordpress-component.ts +4 -5
- package/src/ui/form-group/form-group-content.js +4 -4
- package/src/unit-control/index.tsx +7 -9
- package/src/unit-control/stories/index.tsx +8 -12
- package/src/unit-control/test/index.tsx +4 -7
- package/src/utils/hooks/index.js +0 -1
- package/src/utils/hooks/stories/use-cx.js +8 -7
- package/src/utils/hooks/test/use-controlled-state.js +2 -1
- package/src/utils/math.js +14 -5
- package/src/utils/test/math.js +22 -1
- package/src/utils/unit-values.ts +2 -1
- package/src/utils/values.js +2 -3
- package/src/v-stack/README.md +6 -18
- package/src/v-stack/{component.js → component.tsx} +15 -10
- package/src/v-stack/{hook.js → hook.ts} +5 -6
- package/src/v-stack/{index.js → index.ts} +0 -0
- package/src/v-stack/stories/index.tsx +41 -0
- package/src/v-stack/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/v-stack/test/{index.js → index.tsx} +0 -0
- package/src/v-stack/types.ts +21 -1
- package/src/z-stack/README.md +14 -3
- package/src/z-stack/component.tsx +24 -29
- package/src/z-stack/stories/index.tsx +76 -0
- package/src/z-stack/types.ts +33 -0
- package/tsconfig.json +7 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/color-picker/color-display.js +0 -184
- package/build/color-picker/color-display.js.map +0 -1
- package/build/date-time/date.js.map +0 -1
- package/build/date-time/time.js +0 -289
- package/build/date-time/time.js.map +0 -1
- package/build/date-time/timezone.js.map +0 -1
- package/build/date-time/utils.js.map +0 -1
- package/build/utils/hooks/use-combined-ref.js +0 -32
- package/build/utils/hooks/use-combined-ref.js.map +0 -1
- package/build-module/color-picker/color-display.js +0 -170
- package/build-module/color-picker/color-display.js.map +0 -1
- package/build-module/date-time/date.js.map +0 -1
- package/build-module/date-time/time.js +0 -271
- package/build-module/date-time/time.js.map +0 -1
- package/build-module/date-time/timezone.js.map +0 -1
- package/build-module/date-time/utils.js.map +0 -1
- package/build-module/utils/hooks/use-combined-ref.js +0 -28
- package/build-module/utils/hooks/use-combined-ref.js.map +0 -1
- package/build-types/color-picker/color-display.d.ts +0 -14
- package/build-types/color-picker/color-display.d.ts.map +0 -1
- package/build-types/date-time/date.d.ts.map +0 -1
- package/build-types/date-time/stories/index.d.ts.map +0 -1
- package/build-types/date-time/test/date.d.ts +0 -2
- package/build-types/date-time/test/date.d.ts.map +0 -1
- package/build-types/date-time/test/time.d.ts +0 -2
- package/build-types/date-time/test/time.d.ts.map +0 -1
- package/build-types/date-time/test/utils.d.ts.map +0 -1
- package/build-types/date-time/time.d.ts.map +0 -1
- package/build-types/date-time/timezone.d.ts.map +0 -1
- package/build-types/date-time/utils.d.ts.map +0 -1
- package/build-types/utils/hooks/use-combined-ref.d.ts +0 -8
- package/build-types/utils/hooks/use-combined-ref.d.ts.map +0 -1
- package/src/border-control/stories/index.js +0 -119
- package/src/color-indicator/index.js +0 -16
- package/src/color-indicator/stories/index.js +0 -22
- package/src/color-indicator/test/__snapshots__/index.js.snap +0 -13
- package/src/color-picker/color-display.tsx +0 -169
- package/src/date-time/index.tsx +0 -196
- package/src/date-time/time.tsx +0 -321
- package/src/external-link/stories/index.js +0 -23
- package/src/form-toggle/index.js +0 -37
- package/src/form-toggle/stories/index.js +0 -28
- package/src/form-toggle/test/index.js +0 -75
- package/src/form-token-field/index.js +0 -725
- package/src/form-token-field/stories/index.js +0 -102
- package/src/form-token-field/test/lib/token-field-wrapper.js +0 -56
- package/src/form-token-field/token-input.js +0 -81
- package/src/heading/test/index.js +0 -67
- package/src/radio-control/index.js +0 -69
- package/src/radio-control/stories/index.js +0 -41
- package/src/spacer/stories/index.js +0 -59
- package/src/spinner/stories/index.js +0 -43
- package/src/surface/stories/index.js +0 -46
- package/src/textarea-control/index.js +0 -45
- package/src/textarea-control/stories/index.js +0 -48
- package/src/tree-select/index.js +0 -48
- package/src/tree-select/stories/index.js +0 -80
- package/src/truncate/stories/index.js +0 -38
- package/src/utils/hooks/use-combined-ref.ts +0 -28
- package/src/z-stack/stories/index.js +0 -70
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* WordPress dependencies
|
|
3
7
|
*/
|
|
4
|
-
import { useEffect } from '@wordpress/element';
|
|
8
|
+
import { useEffect, useLayoutEffect, useRef, useState } from '@wordpress/element';
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
|
|
5
13
|
/**
|
|
6
14
|
* Gets a CSS cursor value based on a drag direction.
|
|
7
15
|
*
|
|
8
16
|
* @param dragDirection The drag direction.
|
|
9
17
|
* @return The CSS cursor value.
|
|
10
18
|
*/
|
|
11
|
-
|
|
12
19
|
export function getDragCursor(dragDirection) {
|
|
13
20
|
let dragCursor = 'ns-resize';
|
|
14
21
|
|
|
@@ -44,7 +51,46 @@ export function useDragCursor(isDragging, dragDirection) {
|
|
|
44
51
|
// @ts-expect-error
|
|
45
52
|
document.documentElement.style.cursor = null;
|
|
46
53
|
}
|
|
47
|
-
}, [isDragging]);
|
|
54
|
+
}, [isDragging, dragCursor]);
|
|
48
55
|
return dragCursor;
|
|
49
56
|
}
|
|
57
|
+
export function useDraft(props) {
|
|
58
|
+
const refPreviousValue = useRef(props.value);
|
|
59
|
+
const [draft, setDraft] = useState({});
|
|
60
|
+
const value = draft.value !== undefined ? draft.value : props.value; // Determines when to discard the draft value to restore controlled status.
|
|
61
|
+
// To do so, it tracks the previous value and marks the draft value as stale
|
|
62
|
+
// after each render.
|
|
63
|
+
|
|
64
|
+
useLayoutEffect(() => {
|
|
65
|
+
const {
|
|
66
|
+
current: previousValue
|
|
67
|
+
} = refPreviousValue;
|
|
68
|
+
refPreviousValue.current = props.value;
|
|
69
|
+
if (draft.value !== undefined && !draft.isStale) setDraft({ ...draft,
|
|
70
|
+
isStale: true
|
|
71
|
+
});else if (draft.isStale && props.value !== previousValue) setDraft({});
|
|
72
|
+
}, [props.value, draft]);
|
|
73
|
+
|
|
74
|
+
const onChange = (nextValue, extra) => {
|
|
75
|
+
// Mutates the draft value to avoid an extra effect run.
|
|
76
|
+
setDraft(current => Object.assign(current, {
|
|
77
|
+
value: nextValue,
|
|
78
|
+
isStale: false
|
|
79
|
+
}));
|
|
80
|
+
props.onChange(nextValue, extra);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const onBlur = event => {
|
|
84
|
+
var _props$onBlur;
|
|
85
|
+
|
|
86
|
+
setDraft({});
|
|
87
|
+
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props, event);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
value,
|
|
92
|
+
onBlur,
|
|
93
|
+
onChange
|
|
94
|
+
};
|
|
95
|
+
}
|
|
50
96
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/input-control/utils.ts"],"names":["useEffect","getDragCursor","dragDirection","dragCursor","useDragCursor","isDragging","document","documentElement","style","cursor"],"mappings":"AAAA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/input-control/utils.ts"],"names":["useEffect","useLayoutEffect","useRef","useState","getDragCursor","dragDirection","dragCursor","useDragCursor","isDragging","document","documentElement","style","cursor","useDraft","props","refPreviousValue","value","draft","setDraft","undefined","current","previousValue","isStale","onChange","nextValue","extra","Object","assign","onBlur","event"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,SADD,EAECC,eAFD,EAGCC,MAHD,EAICC,QAJD,QAKO,oBALP;AAOA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAT,CAAwBC,aAAxB,EAAwD;AAC9D,MAAIC,UAAU,GAAG,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AQ,CAAE,EAAE,GAAGD,KAAL;AAAYK,MAAAA,OAAO,EAAE;AAArB,KAAF,CAAR,CADD,KAEK,IAAKL,KAAK,CAACK,OAAN,IAAiBR,KAAK,CAACE,KAAN,KAAgBK,aAAtC,EACJH,QAAQ,CAAE,EAAF,CAAR;AACD,GAPc,EAOZ,CAAEJ,KAAK,CAACE,KAAR,EAAeC,KAAf,CAPY,CAAf;;AASA,QAAMM,QAA6B,GAAG,CAAEC,SAAF,EAAaC,KAAb,KAAwB;AAC7D;AACAP,IAAAA,QAAQ,CAAIE,OAAF,IACTM,MAAM,CAACC,MAAP,CAAeP,OAAf,EAAwB;AAAEJ,MAAAA,KAAK,EAAEQ,SAAT;AAAoBF,MAAAA,OAAO,EAAE;AAA7B,KAAxB,CADO,CAAR;AAGAR,IAAAA,KAAK,CAACS,QAAN,CAAgBC,SAAhB,EAA2BC,KAA3B;AACA,GAND;;AAOA,QAAMG,MAAyB,GAAKC,KAAF,IAAa;AAAA;;AAC9CX,IAAAA,QAAQ,CAAE,EAAF,CAAR;AACA,qBAAAJ,KAAK,CAACc,MAAN,qEAAAd,KAAK,EAAWe,KAAX,CAAL;AACA,GAHD;;AAKA,SAAO;AAAEb,IAAAA,KAAF;AAASY,IAAAA,MAAT;AAAiBL,IAAAA;AAAjB,GAAP;AACA","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\telse if ( draft.isStale && props.value !== previousValue )\n\t\t\tsetDraft( {} );\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"]}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* External dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { noop } from 'lodash';
|
|
7
3
|
/**
|
|
8
4
|
* WordPress dependencies
|
|
9
5
|
*/
|
|
10
|
-
|
|
11
6
|
import { check } from '@wordpress/icons';
|
|
12
7
|
/**
|
|
13
8
|
* Internal dependencies
|
|
14
9
|
*/
|
|
15
10
|
|
|
16
11
|
import MenuItem from '../menu-item';
|
|
12
|
+
|
|
13
|
+
const noop = () => {};
|
|
14
|
+
|
|
17
15
|
export default function MenuItemsChoice(_ref) {
|
|
18
16
|
let {
|
|
19
17
|
choices = [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/menu-items-choice/index.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/menu-items-choice/index.js"],"names":["check","MenuItem","noop","MenuItemsChoice","choices","onHover","onSelect","value","map","item","isSelected","info","shortcut","label"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,kBAAtB;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,cAArB;;AAEA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,eAAe,SAASC,eAAT,OAKX;AAAA,MALqC;AACxCC,IAAAA,OAAO,GAAG,EAD8B;AAExCC,IAAAA,OAAO,GAAGH,IAF8B;AAGxCI,IAAAA,QAHwC;AAIxCC,IAAAA;AAJwC,GAKrC;AACH,SAAOH,OAAO,CAACI,GAAR,CAAeC,IAAF,IAAY;AAC/B,UAAMC,UAAU,GAAGH,KAAK,KAAKE,IAAI,CAACF,KAAlC;AACA,WACC,cAAC,QAAD;AACC,MAAA,GAAG,EAAGE,IAAI,CAACF,KADZ;AAEC,MAAA,IAAI,EAAC,eAFN;AAGC,MAAA,IAAI,EAAGG,UAAU,IAAIV,KAHtB;AAIC,MAAA,IAAI,EAAGS,IAAI,CAACE,IAJb;AAKC,MAAA,UAAU,EAAGD,UALd;AAMC,MAAA,QAAQ,EAAGD,IAAI,CAACG,QANjB;AAOC,MAAA,SAAS,EAAC,8BAPX;AAQC,MAAA,OAAO,EAAG,MAAM;AACf,YAAK,CAAEF,UAAP,EAAoB;AACnBJ,UAAAA,QAAQ,CAAEG,IAAI,CAACF,KAAP,CAAR;AACA;AACD,OAZF;AAaC,MAAA,YAAY,EAAG,MAAMF,OAAO,CAAEI,IAAI,CAACF,KAAP,CAb7B;AAcC,MAAA,YAAY,EAAG,MAAMF,OAAO,CAAE,IAAF,CAd7B;AAeC,oBAAaI,IAAI,CAAE,YAAF;AAflB,OAiBGA,IAAI,CAACI,KAjBR,CADD;AAqBA,GAvBM,CAAP;AAwBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport MenuItem from '../menu-item';\n\nconst noop = () => {};\n\nexport default function MenuItemsChoice( {\n\tchoices = [],\n\tonHover = noop,\n\tonSelect,\n\tvalue,\n} ) {\n\treturn choices.map( ( item ) => {\n\t\tconst isSelected = value === item.value;\n\t\treturn (\n\t\t\t<MenuItem\n\t\t\t\tkey={ item.value }\n\t\t\t\trole=\"menuitemradio\"\n\t\t\t\ticon={ isSelected && check }\n\t\t\t\tinfo={ item.info }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tshortcut={ item.shortcut }\n\t\t\t\tclassName=\"components-menu-items-choice\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isSelected ) {\n\t\t\t\t\t\tonSelect( item.value );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonMouseEnter={ () => onHover( item.value ) }\n\t\t\t\tonMouseLeave={ () => onHover( null ) }\n\t\t\t\taria-label={ item[ 'aria-label' ] }\n\t\t\t>\n\t\t\t\t{ item.label }\n\t\t\t</MenuItem>\n\t\t);\n\t} );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-context.native.js"],"names":["Platform","UIManager","createContext","OS","setLayoutAnimationEnabledExperimental","BottomSheetContext","isBottomSheetContentScrolling","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","onHandleClosingBottomSheet","onHandleHardwareButtonPress","setIsFullScreen","Provider","BottomSheetProvider","Consumer","BottomSheetConsumer"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,cAApC;AACA;AACA;AACA;;AACA,SAASC,aAAT,QAA8B,oBAA9B,C,CAEA;AACA;;AACA,IACCF,QAAQ,CAACG,EAAT,KAAgB,SAAhB,IACAF,SAAS,CAACG,qCAFX,EAGE;AACDH,EAAAA,SAAS,CAACG,qCAAV,CAAiD,IAAjD;AACA,C,CAED;AACA;;;AACA,OAAO,MAAMC,kBAAkB,GAAGH,aAAa,CAAE;AAChD;AACAI,EAAAA,6BAA6B,EAAE,KAFiB;AAGhD;AACAC,EAAAA,6BAA6B,EAAE,MAAM,CAAE,CAJS;AAKhD;AACA;AACA;AACAC,EAAAA,gCAAgC,EAAE,MAAM,CAAE,CARM;AAShD;AACAC,EAAAA,0BAA0B,EAAE,MAAM,CAAE,CAVY;AAWhD;AACA;AACAC,EAAAA,2BAA2B,EAAE,MAAM,CAAE,CAbW;AAchD;AACAC,EAAAA,eAAe,EAAE,MAAM,CAAE;AAfuB,CAAF,CAAxC;AAkBP,OAAO,MAAM;
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-context.native.js"],"names":["Platform","UIManager","createContext","OS","setLayoutAnimationEnabledExperimental","BottomSheetContext","isBottomSheetContentScrolling","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","onHandleClosingBottomSheet","onHandleHardwareButtonPress","setIsFullScreen","Provider","BottomSheetProvider","Consumer","BottomSheetConsumer"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,cAApC;AACA;AACA;AACA;;AACA,SAASC,aAAT,QAA8B,oBAA9B,C,CAEA;AACA;;AACA,IACCF,QAAQ,CAACG,EAAT,KAAgB,SAAhB,IACAF,SAAS,CAACG,qCAFX,EAGE;AACDH,EAAAA,SAAS,CAACG,qCAAV,CAAiD,IAAjD;AACA,C,CAED;AACA;;;AACA,OAAO,MAAMC,kBAAkB,GAAGH,aAAa,CAAE;AAChD;AACAI,EAAAA,6BAA6B,EAAE,KAFiB;AAGhD;AACAC,EAAAA,6BAA6B,EAAE,MAAM,CAAE,CAJS;AAKhD;AACA;AACA;AACAC,EAAAA,gCAAgC,EAAE,MAAM,CAAE,CARM;AAShD;AACAC,EAAAA,0BAA0B,EAAE,MAAM,CAAE,CAVY;AAWhD;AACA;AACAC,EAAAA,2BAA2B,EAAE,MAAM,CAAE,CAbW;AAchD;AACAC,EAAAA,eAAe,EAAE,MAAM,CAAE;AAfuB,CAAF,CAAxC;AAkBP,OAAO,MAAM;AAAEC,EAAAA,QAAQ,EAAEC,mBAAZ;AAAiCC,EAAAA,QAAQ,EAAEC;AAA3C,IACZV,kBADM","sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, UIManager } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n// It's needed to set the following flags via UIManager\n// to have `LayoutAnimation` working on Android\nif (\n\tPlatform.OS === 'android' &&\n\tUIManager.setLayoutAnimationEnabledExperimental\n) {\n\tUIManager.setLayoutAnimationEnabledExperimental( true );\n}\n\n// Context in BottomSheet is necessary for controlling the\n// transition flow between subsheets and replacing a content inside them\nexport const BottomSheetContext = createContext( {\n\t// Specifies whether content is currently scrolling.\n\tisBottomSheetContentScrolling: false,\n\t// Function called to enable scroll within bottom sheet.\n\tshouldEnableBottomSheetScroll: () => {},\n\t// Function called to enable/disable bottom sheet max height.\n\t// E.g. used to extend bottom sheet on full screen in ColorPicker,\n\t// which is helpful on small devices with set the largest font/display size.\n\tshouldEnableBottomSheetMaxHeight: () => {},\n\t// Callback that is called on closing bottom sheet.\n\tonHandleClosingBottomSheet: () => {},\n\t// Android only: Function called to control android hardware back button functionality\n\t// Return true if the bottom-sheet default close action shouldn't be called.\n\tonHandleHardwareButtonPress: () => {},\n\t// Toggle full-screen styles and dimensions\n\tsetIsFullScreen: () => {},\n} );\n\nexport const { Provider: BottomSheetProvider, Consumer: BottomSheetConsumer } =\n\tBottomSheetContext;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cell.native.js"],"names":["TouchableOpacity","Text","View","TextInput","I18nManager","AccessibilityInfo","Platform","isEmpty","get","Icon","check","Component","__","_x","sprintf","withPreferredColorScheme","styles","platformStyles","TouchableRipple","isIOS","OS","BottomSheetCell","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","addEventListener","then","setState","componentWillUnmount","remove","typeToKeyboardType","type","step","keyboardType","Math","abs","render","accessible","accessibilityLabel","accessibilityHint","accessibilityRole","disabled","activeOpacity","onPress","onLongPress","label","subLabel","value","valuePlaceholder","icon","leftAlign","iconStyle","labelStyle","valueStyle","cellContainerStyle","cellRowContainerStyle","onChangeValue","onSubmit","children","editable","isSelected","separatorType","style","getStylesFromColorScheme","customActionButton","borderless","help","valueProps","showValue","undefined","isValueEditable","cellLabelStyle","cellLabel","cellTextDark","cellLabelCenteredStyle","cellLabelCentered","cellLabelLeftAlignNoIconStyle","cellLabelLeftAlignNoIcon","defaultMissingIconAndValue","defaultLabelStyle","defaultSubLabelStyleText","cellSubLabelText","cellSubLabelTextDark","drawSeparator","separatorStyle","drawTopSeparator","cellContainerStyles","cellContainer","rowContainerStyles","cellRowContainer","isInteractive","onCellPress","startEditing","finishEditing","defaultSeparatorStyle","separator","separatorDark","cellSeparatorStyle","cellSeparator","cellSeparatorDark","leftMarginStyle","separatorMarginLeft","getValueComponent","styleRTL","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","placeholderColor"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,gBADD,EAECC,IAFD,EAGCC,IAHD,EAICC,SAJD,EAKCC,WALD,EAMCC,iBAND,EAOCC,QAPD,QAQO,cARP;AASA,SAASC,OAAT,EAAkBC,GAAlB,QAA6B,QAA7B;AAEA;AACA;AACA;;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,EAAT,EAAaC,EAAb,EAAiBC,OAAjB,QAAgC,iBAAhC;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,eAAnB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,eAAP,MAA4B,UAA5B;AAEA,MAAMC,KAAK,GAAGb,QAAQ,CAACc,EAAT,KAAgB,KAA9B;;AACA,MAAMC,eAAN,SAA8BV,SAA9B,CAAwC;AACvCW,EAAAA,WAAW,CAAEC,KAAF,EAAU;AACpB,UAAO,GAAGC,SAAV;AACA,SAAKC,KAAL,GAAa;AACZC,MAAAA,cAAc,EAAEH,KAAK,CAACI,SAAN,IAAmB,KADvB;AAEZC,MAAAA,qBAAqB,EAAE;AAFX,KAAb;AAKA,SAAKC,yBAAL,GAAiC,KAAKA,yBAAL,CAA+BC,IAA/B,CAChC,IADgC,CAAjC;AAIA,SAAKC,SAAL,GAAiB,KAAjB;AACA;;AAE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C,MAAA,IAAI,EAAGhE,KADR;AAEC,MAAA,IAAI,EAAGO,cAAc,CAACyD,UAAf,CAA0BkE;AAFlC,MAjEF,EAsEG1D,SAAS,IAAIkC,iBAAiB,EAtEjC,EAuEG5C,QAvEH,CAtBD,EA+FGQ,IAAI,IACL,cAAC,IAAD;AAAM,MAAA,KAAK,EAAG,CAAEmD,aAAF,EAAiBnH,MAAM,CAAC8H,gBAAxB;AAAd,OACG9D,IADH,CAhGF,EAoGG,CAAEmB,gBAAF,IAAsB,cAAC,IAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MApGzB,CADD;AAwGA;;AAjZsC;;AAoZxC,eAAenF,wBAAwB,CAAEM,eAAF,CAAvC","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tTouchableOpacity,\n\tText,\n\tView,\n\tTextInput,\n\tI18nManager,\n\tAccessibilityInfo,\n\tPlatform,\n} from 'react-native';\nimport { isEmpty, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\nimport { check } from '@wordpress/icons';\nimport { Component } from '@wordpress/element';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport platformStyles from './cellStyles.scss';\nimport TouchableRipple from './ripple';\n\nconst isIOS = Platform.OS === 'ios';\nclass BottomSheetCell extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tisEditingValue: props.autoFocus || false,\n\t\t\tisScreenReaderEnabled: false,\n\t\t};\n\n\t\tthis.handleScreenReaderToggled = this.handleScreenReaderToggled.bind(\n\t\t\tthis\n\t\t);\n\n\t\tthis.isCurrent = false;\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState ) {\n\t\tif ( ! prevState.isEditingValue && this.state.isEditingValue ) {\n\t\t\tthis._valueTextInput.focus();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.isCurrent = true;\n\t\tthis.a11yInfoChangeSubscription = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\tthis.handleScreenReaderToggled\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( isScreenReaderEnabled ) => {\n\t\t\t\tif ( this.isCurrent ) {\n\t\t\t\t\tthis.setState( { isScreenReaderEnabled } );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.isCurrent = false;\n\t\tthis.a11yInfoChangeSubscription.remove();\n\t}\n\n\thandleScreenReaderToggled( isScreenReaderEnabled ) {\n\t\tthis.setState( { isScreenReaderEnabled } );\n\t}\n\n\ttypeToKeyboardType( type, step ) {\n\t\tlet keyboardType = `default`;\n\t\tif ( type === `number` ) {\n\t\t\tif ( step && Math.abs( step ) < 1 ) {\n\t\t\t\tkeyboardType = `decimal-pad`;\n\t\t\t} else {\n\t\t\t\tkeyboardType = `number-pad`;\n\t\t\t}\n\t\t}\n\t\treturn keyboardType;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\taccessible,\n\t\t\taccessibilityLabel,\n\t\t\taccessibilityHint,\n\t\t\taccessibilityRole,\n\t\t\tdisabled = false,\n\t\t\tactiveOpacity,\n\t\t\tonPress,\n\t\t\tonLongPress,\n\t\t\tlabel,\n\t\t\tsubLabel,\n\t\t\tvalue,\n\t\t\tvaluePlaceholder = '',\n\t\t\ticon,\n\t\t\tleftAlign,\n\t\t\ticonStyle = {},\n\t\t\tlabelStyle = {},\n\t\t\tvalueStyle = {},\n\t\t\tcellContainerStyle = {},\n\t\t\tcellRowContainerStyle = {},\n\t\t\tonChangeValue,\n\t\t\tonSubmit,\n\t\t\tchildren,\n\t\t\teditable = true,\n\t\t\tisSelected = false,\n\t\t\tseparatorType,\n\t\t\tstyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tcustomActionButton,\n\t\t\ttype,\n\t\t\tstep,\n\t\t\tborderless,\n\t\t\thelp,\n\t\t\t...valueProps\n\t\t} = this.props;\n\n\t\tconst showValue = value !== undefined;\n\t\tconst isValueEditable = editable && onChangeValue !== undefined;\n\t\tconst cellLabelStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabel,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelCenteredStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelCentered,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelLeftAlignNoIconStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelLeftAlignNoIcon,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst defaultMissingIconAndValue = leftAlign\n\t\t\t? cellLabelLeftAlignNoIconStyle\n\t\t\t: cellLabelCenteredStyle;\n\t\tconst defaultLabelStyle =\n\t\t\tshowValue || customActionButton || icon\n\t\t\t\t? cellLabelStyle\n\t\t\t\t: defaultMissingIconAndValue;\n\n\t\tconst defaultSubLabelStyleText = getStylesFromColorScheme(\n\t\t\tstyles.cellSubLabelText,\n\t\t\tstyles.cellSubLabelTextDark\n\t\t);\n\n\t\tconst drawSeparator =\n\t\t\t( separatorType && separatorType !== 'none' ) ||\n\t\t\tseparatorStyle === undefined;\n\t\tconst drawTopSeparator =\n\t\t\tdrawSeparator && separatorType === 'topFullWidth';\n\n\t\tconst cellContainerStyles = [\n\t\t\tstyles.cellContainer,\n\t\t\tcellContainerStyle,\n\t\t];\n\t\tconst rowContainerStyles = [\n\t\t\tstyles.cellRowContainer,\n\t\t\tcellRowContainerStyle,\n\t\t];\n\n\t\tconst isInteractive =\n\t\t\tisValueEditable ||\n\t\t\tonPress !== undefined ||\n\t\t\tonLongPress !== undefined;\n\n\t\tconst onCellPress = () => {\n\t\t\tif ( isValueEditable ) {\n\t\t\t\tstartEditing();\n\t\t\t} else if ( onPress !== undefined ) {\n\t\t\t\tonPress();\n\t\t\t}\n\t\t};\n\n\t\tconst finishEditing = () => {\n\t\t\tthis.setState( { isEditingValue: false } );\n\t\t};\n\n\t\tconst startEditing = () => {\n\t\t\tif ( this.state.isEditingValue === false ) {\n\t\t\t\tthis.setState( { isEditingValue: true } );\n\t\t\t}\n\t\t};\n\n\t\tconst separatorStyle = () => {\n\t\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\t\tconst defaultSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.separator,\n\t\t\t\tstyles.separatorDark\n\t\t\t);\n\t\t\tconst cellSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellSeparator,\n\t\t\t\tstyles.cellSeparatorDark\n\t\t\t);\n\t\t\tconst leftMarginStyle = {\n\t\t\t\t...cellSeparatorStyle,\n\t\t\t\t...platformStyles.separatorMarginLeft,\n\t\t\t};\n\t\t\tswitch ( separatorType ) {\n\t\t\t\tcase 'leftMargin':\n\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\tcase 'fullWidth':\n\t\t\t\tcase 'topFullWidth':\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t\tcase 'none':\n\t\t\t\t\treturn undefined;\n\t\t\t\tcase undefined:\n\t\t\t\t\tif ( showValue && icon ) {\n\t\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\t\t}\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t}\n\t\t};\n\n\t\tconst getValueComponent = () => {\n\t\t\tconst styleRTL = I18nManager.isRTL && styles.cellValueRTL;\n\t\t\tconst cellValueStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellValue,\n\t\t\t\tstyles.cellTextDark\n\t\t\t);\n\t\t\tconst finalStyle = {\n\t\t\t\t...cellValueStyle,\n\t\t\t\t...valueStyle,\n\t\t\t\t...styleRTL,\n\t\t\t};\n\n\t\t\t// To be able to show the `middle` ellipsizeMode on editable cells\n\t\t\t// we show the TextInput just when the user wants to edit the value,\n\t\t\t// and the Text component to display it.\n\t\t\t// We also show the TextInput to display placeholder.\n\t\t\tconst shouldShowPlaceholder = isValueEditable && value === '';\n\t\t\treturn this.state.isEditingValue || shouldShowPlaceholder ? (\n\t\t\t\t<TextInput\n\t\t\t\t\tref={ ( c ) => ( this._valueTextInput = c ) }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tstyle={ finalStyle }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tplaceholder={ valuePlaceholder }\n\t\t\t\t\tplaceholderTextColor={ '#87a6bc' }\n\t\t\t\t\tonChangeText={ onChangeValue }\n\t\t\t\t\teditable={ isValueEditable }\n\t\t\t\t\tpointerEvents={\n\t\t\t\t\t\tthis.state.isEditingValue ? 'auto' : 'none'\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ startEditing }\n\t\t\t\t\tonBlur={ finishEditing }\n\t\t\t\t\tonSubmitEditing={ onSubmit }\n\t\t\t\t\tkeyboardType={ this.typeToKeyboardType( type, step ) }\n\t\t\t\t\t{ ...valueProps }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={ { ...cellValueStyle, ...valueStyle } }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode={ 'middle' }\n\t\t\t\t>\n\t\t\t\t\t{ value }\n\t\t\t\t</Text>\n\t\t\t);\n\t\t};\n\n\t\tconst getAccessibilityLabel = () => {\n\t\t\tif ( accessible === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( accessibilityLabel || ! showValue ) {\n\t\t\t\treturn accessibilityLabel || label;\n\t\t\t}\n\n\t\t\tif ( isEmpty( value ) ) {\n\t\t\t\treturn isEmpty( help )\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %s: The cell's title */\n\t\t\t\t\t\t\t_x( '%s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t\t sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %1: Cell title, %2: cell help. */\n\t\t\t\t\t\t\t_x( '%1$s, %2$s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\thelp\n\t\t\t\t\t );\n\t\t\t}\n\t\t\treturn isEmpty( help )\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title and value.%1: Cell title, %2: cell value. */\n\t\t\t\t\t\t_x( '%1$s, %2$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue\n\t\t\t\t ) // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title, value and help text.%1: Cell title, %2: cell value, , %3: cell help. */\n\t\t\t\t\t\t_x( '%1$s, %2$s, %3$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\thelp\n\t\t\t\t );\n\t\t};\n\n\t\tconst iconStyleBase = getStylesFromColorScheme(\n\t\t\tstyles.icon,\n\t\t\tstyles.iconDark\n\t\t);\n\t\tconst resetButtonStyle = getStylesFromColorScheme(\n\t\t\tstyles.resetButton,\n\t\t\tstyles.resetButtonDark\n\t\t);\n\t\tconst cellHelpStyle = [\n\t\t\tstyles.cellHelpLabel,\n\t\t\tisIOS && styles.cellHelpLabelIOS,\n\t\t];\n\t\tconst containerPointerEvents =\n\t\t\tthis.state.isScreenReaderEnabled && accessible ? 'none' : 'auto';\n\t\tconst { title, handler } = customActionButton || {};\n\n\t\tconst opacity =\n\t\t\tactiveOpacity !== undefined\n\t\t\t\t? activeOpacity\n\t\t\t\t: get( platformStyles, 'activeOpacity.opacity' );\n\n\t\treturn (\n\t\t\t<TouchableRipple\n\t\t\t\taccessible={\n\t\t\t\t\taccessible !== undefined\n\t\t\t\t\t\t? accessible\n\t\t\t\t\t\t: ! this.state.isEditingValue\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabel() }\n\t\t\t\taccessibilityRole={ accessibilityRole || 'button' }\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisValueEditable\n\t\t\t\t\t\t? /* translators: accessibility text */\n\t\t\t\t\t\t __( 'Double tap to edit this value' )\n\t\t\t\t\t\t: accessibilityHint\n\t\t\t\t}\n\t\t\t\tdisabled={ disabled || ! isInteractive }\n\t\t\t\tactiveOpacity={ opacity }\n\t\t\t\tonPress={ onCellPress }\n\t\t\t\tonLongPress={ onLongPress }\n\t\t\t\tstyle={ [ styles.clipToBounds, style ] }\n\t\t\t\tborderless={ borderless }\n\t\t\t>\n\t\t\t\t{ drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t\t<View\n\t\t\t\t\tstyle={ cellContainerStyles }\n\t\t\t\t\tpointerEvents={ containerPointerEvents }\n\t\t\t\t>\n\t\t\t\t\t<View style={ rowContainerStyles }>\n\t\t\t\t\t\t<View style={ styles.cellRowContainer }>\n\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowContainer,\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowIcon,\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\tfill={\n\t\t\t\t\t\t\t\t\t\t\ticonStyle.color ||\n\t\t\t\t\t\t\t\t\t\t\ticonStyleBase.color\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\tisPressed={ false }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tplatformStyles.labelIconSeparator\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ subLabel && label && (\n\t\t\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\t\tdefaultLabelStyle,\n\t\t\t\t\t\t\t\t\t\t\tlabelStyle,\n\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t<Text style={ defaultSubLabelStyleText }>\n\t\t\t\t\t\t\t\t\t\t{ subLabel }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! subLabel && label && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tstyle={ [ defaultLabelStyle, labelStyle ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{ customActionButton && (\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tonPress={ handler }\n\t\t\t\t\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text style={ resetButtonStyle }>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tfill={ platformStyles.isSelected.color }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showValue && getValueComponent() }\n\t\t\t\t\t{ children }\n\t\t\t\t</View>\n\t\t\t\t{ help && (\n\t\t\t\t\t<Text style={ [ cellHelpStyle, styles.placeholderColor ] }>\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t{ ! drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t</TouchableRipple>\n\t\t);\n\t}\n}\n\nexport default withPreferredColorScheme( BottomSheetCell );\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cell.native.js"],"names":["TouchableOpacity","Text","View","TextInput","I18nManager","AccessibilityInfo","Platform","isEmpty","get","Icon","check","Component","__","_x","sprintf","withPreferredColorScheme","styles","platformStyles","TouchableRipple","isIOS","OS","BottomSheetCell","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","addEventListener","then","setState","componentWillUnmount","remove","typeToKeyboardType","type","step","keyboardType","Math","abs","render","accessible","accessibilityLabel","accessibilityHint","accessibilityRole","disabled","activeOpacity","onPress","onLongPress","label","subLabel","value","valuePlaceholder","icon","leftAlign","iconStyle","labelStyle","valueStyle","cellContainerStyle","cellRowContainerStyle","onChangeValue","onSubmit","children","editable","isSelected","separatorType","style","getStylesFromColorScheme","customActionButton","borderless","help","valueProps","showValue","undefined","isValueEditable","cellLabelStyle","cellLabel","cellTextDark","cellLabelCenteredStyle","cellLabelCentered","cellLabelLeftAlignNoIconStyle","cellLabelLeftAlignNoIcon","defaultMissingIconAndValue","defaultLabelStyle","defaultSubLabelStyleText","cellSubLabelText","cellSubLabelTextDark","drawSeparator","separatorStyle","drawTopSeparator","cellContainerStyles","cellContainer","rowContainerStyles","cellRowContainer","isInteractive","onCellPress","startEditing","finishEditing","defaultSeparatorStyle","separator","separatorDark","cellSeparatorStyle","cellSeparator","cellSeparatorDark","leftMarginStyle","separatorMarginLeft","getValueComponent","styleRTL","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","placeholderColor"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,gBADD,EAECC,IAFD,EAGCC,IAHD,EAICC,SAJD,EAKCC,WALD,EAMCC,iBAND,EAOCC,QAPD,QAQO,cARP;AASA,SAASC,OAAT,EAAkBC,GAAlB,QAA6B,QAA7B;AAEA;AACA;AACA;;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,EAAT,EAAaC,EAAb,EAAiBC,OAAjB,QAAgC,iBAAhC;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,eAAnB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,eAAP,MAA4B,UAA5B;AAEA,MAAMC,KAAK,GAAGb,QAAQ,CAACc,EAAT,KAAgB,KAA9B;;AACA,MAAMC,eAAN,SAA8BV,SAA9B,CAAwC;AACvCW,EAAAA,WAAW,CAAEC,KAAF,EAAU;AACpB,UAAO,GAAGC,SAAV;AACA,SAAKC,KAAL,GAAa;AACZC,MAAAA,cAAc,EAAEH,KAAK,CAACI,SAAN,IAAmB,KADvB;AAEZC,MAAAA,qBAAqB,EAAE;AAFX,KAAb;AAKA,SAAKC,yBAAL,GACC,KAAKA,y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AAK,EAAGR;AAAd,OACGO,KADH,CAJD,CAlDF,CAJD,EAgEG7D,UAAU,IACX,cAAC,IAAD;AACC,MAAA,IAAI,EAAGhE,KADR;AAEC,MAAA,IAAI,EAAGO,cAAc,CAACyD,UAAf,CAA0BkE;AAFlC,MAjEF,EAsEG1D,SAAS,IAAIkC,iBAAiB,EAtEjC,EAuEG5C,QAvEH,CAtBD,EA+FGQ,IAAI,IACL,cAAC,IAAD;AAAM,MAAA,KAAK,EAAG,CAAEmD,aAAF,EAAiBnH,MAAM,CAAC8H,gBAAxB;AAAd,OACG9D,IADH,CAhGF,EAoGG,CAAEmB,gBAAF,IAAsB,cAAC,IAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MApGzB,CADD;AAwGA;;AAhZsC;;AAmZxC,eAAenF,wBAAwB,CAAEM,eAAF,CAAvC","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tTouchableOpacity,\n\tText,\n\tView,\n\tTextInput,\n\tI18nManager,\n\tAccessibilityInfo,\n\tPlatform,\n} from 'react-native';\nimport { isEmpty, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\nimport { check } from '@wordpress/icons';\nimport { Component } from '@wordpress/element';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport platformStyles from './cellStyles.scss';\nimport TouchableRipple from './ripple';\n\nconst isIOS = Platform.OS === 'ios';\nclass BottomSheetCell extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tisEditingValue: props.autoFocus || false,\n\t\t\tisScreenReaderEnabled: false,\n\t\t};\n\n\t\tthis.handleScreenReaderToggled =\n\t\t\tthis.handleScreenReaderToggled.bind( this );\n\n\t\tthis.isCurrent = false;\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState ) {\n\t\tif ( ! prevState.isEditingValue && this.state.isEditingValue ) {\n\t\t\tthis._valueTextInput.focus();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.isCurrent = true;\n\t\tthis.a11yInfoChangeSubscription = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\tthis.handleScreenReaderToggled\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( isScreenReaderEnabled ) => {\n\t\t\t\tif ( this.isCurrent ) {\n\t\t\t\t\tthis.setState( { isScreenReaderEnabled } );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.isCurrent = false;\n\t\tthis.a11yInfoChangeSubscription.remove();\n\t}\n\n\thandleScreenReaderToggled( isScreenReaderEnabled ) {\n\t\tthis.setState( { isScreenReaderEnabled } );\n\t}\n\n\ttypeToKeyboardType( type, step ) {\n\t\tlet keyboardType = `default`;\n\t\tif ( type === `number` ) {\n\t\t\tif ( step && Math.abs( step ) < 1 ) {\n\t\t\t\tkeyboardType = `decimal-pad`;\n\t\t\t} else {\n\t\t\t\tkeyboardType = `number-pad`;\n\t\t\t}\n\t\t}\n\t\treturn keyboardType;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\taccessible,\n\t\t\taccessibilityLabel,\n\t\t\taccessibilityHint,\n\t\t\taccessibilityRole,\n\t\t\tdisabled = false,\n\t\t\tactiveOpacity,\n\t\t\tonPress,\n\t\t\tonLongPress,\n\t\t\tlabel,\n\t\t\tsubLabel,\n\t\t\tvalue,\n\t\t\tvaluePlaceholder = '',\n\t\t\ticon,\n\t\t\tleftAlign,\n\t\t\ticonStyle = {},\n\t\t\tlabelStyle = {},\n\t\t\tvalueStyle = {},\n\t\t\tcellContainerStyle = {},\n\t\t\tcellRowContainerStyle = {},\n\t\t\tonChangeValue,\n\t\t\tonSubmit,\n\t\t\tchildren,\n\t\t\teditable = true,\n\t\t\tisSelected = false,\n\t\t\tseparatorType,\n\t\t\tstyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tcustomActionButton,\n\t\t\ttype,\n\t\t\tstep,\n\t\t\tborderless,\n\t\t\thelp,\n\t\t\t...valueProps\n\t\t} = this.props;\n\n\t\tconst showValue = value !== undefined;\n\t\tconst isValueEditable = editable && onChangeValue !== undefined;\n\t\tconst cellLabelStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabel,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelCenteredStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelCentered,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelLeftAlignNoIconStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelLeftAlignNoIcon,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst defaultMissingIconAndValue = leftAlign\n\t\t\t? cellLabelLeftAlignNoIconStyle\n\t\t\t: cellLabelCenteredStyle;\n\t\tconst defaultLabelStyle =\n\t\t\tshowValue || customActionButton || icon\n\t\t\t\t? cellLabelStyle\n\t\t\t\t: defaultMissingIconAndValue;\n\n\t\tconst defaultSubLabelStyleText = getStylesFromColorScheme(\n\t\t\tstyles.cellSubLabelText,\n\t\t\tstyles.cellSubLabelTextDark\n\t\t);\n\n\t\tconst drawSeparator =\n\t\t\t( separatorType && separatorType !== 'none' ) ||\n\t\t\tseparatorStyle === undefined;\n\t\tconst drawTopSeparator =\n\t\t\tdrawSeparator && separatorType === 'topFullWidth';\n\n\t\tconst cellContainerStyles = [\n\t\t\tstyles.cellContainer,\n\t\t\tcellContainerStyle,\n\t\t];\n\t\tconst rowContainerStyles = [\n\t\t\tstyles.cellRowContainer,\n\t\t\tcellRowContainerStyle,\n\t\t];\n\n\t\tconst isInteractive =\n\t\t\tisValueEditable ||\n\t\t\tonPress !== undefined ||\n\t\t\tonLongPress !== undefined;\n\n\t\tconst onCellPress = () => {\n\t\t\tif ( isValueEditable ) {\n\t\t\t\tstartEditing();\n\t\t\t} else if ( onPress !== undefined ) {\n\t\t\t\tonPress();\n\t\t\t}\n\t\t};\n\n\t\tconst finishEditing = () => {\n\t\t\tthis.setState( { isEditingValue: false } );\n\t\t};\n\n\t\tconst startEditing = () => {\n\t\t\tif ( this.state.isEditingValue === false ) {\n\t\t\t\tthis.setState( { isEditingValue: true } );\n\t\t\t}\n\t\t};\n\n\t\tconst separatorStyle = () => {\n\t\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\t\tconst defaultSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.separator,\n\t\t\t\tstyles.separatorDark\n\t\t\t);\n\t\t\tconst cellSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellSeparator,\n\t\t\t\tstyles.cellSeparatorDark\n\t\t\t);\n\t\t\tconst leftMarginStyle = {\n\t\t\t\t...cellSeparatorStyle,\n\t\t\t\t...platformStyles.separatorMarginLeft,\n\t\t\t};\n\t\t\tswitch ( separatorType ) {\n\t\t\t\tcase 'leftMargin':\n\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\tcase 'fullWidth':\n\t\t\t\tcase 'topFullWidth':\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t\tcase 'none':\n\t\t\t\t\treturn undefined;\n\t\t\t\tcase undefined:\n\t\t\t\t\tif ( showValue && icon ) {\n\t\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\t\t}\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t}\n\t\t};\n\n\t\tconst getValueComponent = () => {\n\t\t\tconst styleRTL = I18nManager.isRTL && styles.cellValueRTL;\n\t\t\tconst cellValueStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellValue,\n\t\t\t\tstyles.cellTextDark\n\t\t\t);\n\t\t\tconst finalStyle = {\n\t\t\t\t...cellValueStyle,\n\t\t\t\t...valueStyle,\n\t\t\t\t...styleRTL,\n\t\t\t};\n\n\t\t\t// To be able to show the `middle` ellipsizeMode on editable cells\n\t\t\t// we show the TextInput just when the user wants to edit the value,\n\t\t\t// and the Text component to display it.\n\t\t\t// We also show the TextInput to display placeholder.\n\t\t\tconst shouldShowPlaceholder = isValueEditable && value === '';\n\t\t\treturn this.state.isEditingValue || shouldShowPlaceholder ? (\n\t\t\t\t<TextInput\n\t\t\t\t\tref={ ( c ) => ( this._valueTextInput = c ) }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tstyle={ finalStyle }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tplaceholder={ valuePlaceholder }\n\t\t\t\t\tplaceholderTextColor={ '#87a6bc' }\n\t\t\t\t\tonChangeText={ onChangeValue }\n\t\t\t\t\teditable={ isValueEditable }\n\t\t\t\t\tpointerEvents={\n\t\t\t\t\t\tthis.state.isEditingValue ? 'auto' : 'none'\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ startEditing }\n\t\t\t\t\tonBlur={ finishEditing }\n\t\t\t\t\tonSubmitEditing={ onSubmit }\n\t\t\t\t\tkeyboardType={ this.typeToKeyboardType( type, step ) }\n\t\t\t\t\t{ ...valueProps }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={ { ...cellValueStyle, ...valueStyle } }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode={ 'middle' }\n\t\t\t\t>\n\t\t\t\t\t{ value }\n\t\t\t\t</Text>\n\t\t\t);\n\t\t};\n\n\t\tconst getAccessibilityLabel = () => {\n\t\t\tif ( accessible === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( accessibilityLabel || ! showValue ) {\n\t\t\t\treturn accessibilityLabel || label;\n\t\t\t}\n\n\t\t\tif ( isEmpty( value ) ) {\n\t\t\t\treturn isEmpty( help )\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %s: The cell's title */\n\t\t\t\t\t\t\t_x( '%s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t\t sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %1: Cell title, %2: cell help. */\n\t\t\t\t\t\t\t_x( '%1$s, %2$s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\thelp\n\t\t\t\t\t );\n\t\t\t}\n\t\t\treturn isEmpty( help )\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title and value.%1: Cell title, %2: cell value. */\n\t\t\t\t\t\t_x( '%1$s, %2$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue\n\t\t\t\t ) // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title, value and help text.%1: Cell title, %2: cell value, , %3: cell help. */\n\t\t\t\t\t\t_x( '%1$s, %2$s, %3$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\thelp\n\t\t\t\t );\n\t\t};\n\n\t\tconst iconStyleBase = getStylesFromColorScheme(\n\t\t\tstyles.icon,\n\t\t\tstyles.iconDark\n\t\t);\n\t\tconst resetButtonStyle = getStylesFromColorScheme(\n\t\t\tstyles.resetButton,\n\t\t\tstyles.resetButtonDark\n\t\t);\n\t\tconst cellHelpStyle = [\n\t\t\tstyles.cellHelpLabel,\n\t\t\tisIOS && styles.cellHelpLabelIOS,\n\t\t];\n\t\tconst containerPointerEvents =\n\t\t\tthis.state.isScreenReaderEnabled && accessible ? 'none' : 'auto';\n\t\tconst { title, handler } = customActionButton || {};\n\n\t\tconst opacity =\n\t\t\tactiveOpacity !== undefined\n\t\t\t\t? activeOpacity\n\t\t\t\t: get( platformStyles, 'activeOpacity.opacity' );\n\n\t\treturn (\n\t\t\t<TouchableRipple\n\t\t\t\taccessible={\n\t\t\t\t\taccessible !== undefined\n\t\t\t\t\t\t? accessible\n\t\t\t\t\t\t: ! this.state.isEditingValue\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabel() }\n\t\t\t\taccessibilityRole={ accessibilityRole || 'button' }\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisValueEditable\n\t\t\t\t\t\t? /* translators: accessibility text */\n\t\t\t\t\t\t __( 'Double tap to edit this value' )\n\t\t\t\t\t\t: accessibilityHint\n\t\t\t\t}\n\t\t\t\tdisabled={ disabled || ! isInteractive }\n\t\t\t\tactiveOpacity={ opacity }\n\t\t\t\tonPress={ onCellPress }\n\t\t\t\tonLongPress={ onLongPress }\n\t\t\t\tstyle={ [ styles.clipToBounds, style ] }\n\t\t\t\tborderless={ borderless }\n\t\t\t>\n\t\t\t\t{ drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t\t<View\n\t\t\t\t\tstyle={ cellContainerStyles }\n\t\t\t\t\tpointerEvents={ containerPointerEvents }\n\t\t\t\t>\n\t\t\t\t\t<View style={ rowContainerStyles }>\n\t\t\t\t\t\t<View style={ styles.cellRowContainer }>\n\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowContainer,\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowIcon,\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\tfill={\n\t\t\t\t\t\t\t\t\t\t\ticonStyle.color ||\n\t\t\t\t\t\t\t\t\t\t\ticonStyleBase.color\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\tisPressed={ false }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tplatformStyles.labelIconSeparator\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ subLabel && label && (\n\t\t\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\t\tdefaultLabelStyle,\n\t\t\t\t\t\t\t\t\t\t\tlabelStyle,\n\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t<Text style={ defaultSubLabelStyleText }>\n\t\t\t\t\t\t\t\t\t\t{ subLabel }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! subLabel && label && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tstyle={ [ defaultLabelStyle, labelStyle ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{ customActionButton && (\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tonPress={ handler }\n\t\t\t\t\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text style={ resetButtonStyle }>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tfill={ platformStyles.isSelected.color }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showValue && getValueComponent() }\n\t\t\t\t\t{ children }\n\t\t\t\t</View>\n\t\t\t\t{ help && (\n\t\t\t\t\t<Text style={ [ cellHelpStyle, styles.placeholderColor ] }>\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t{ ! drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t</TouchableRipple>\n\t\t);\n\t}\n}\n\nexport default withPreferredColorScheme( BottomSheetCell );\n"]}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { createElement } from "@wordpress/element";
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* External dependencies
|
|
6
|
-
*/
|
|
7
|
-
import { findIndex } from 'lodash';
|
|
8
4
|
/**
|
|
9
5
|
* Internal dependencies
|
|
10
6
|
*/
|
|
11
|
-
|
|
12
7
|
import Cell from './cell';
|
|
13
8
|
export default function BottomSheetCyclePickerCell(props) {
|
|
14
9
|
const {
|
|
@@ -22,7 +17,7 @@ export default function BottomSheetCyclePickerCell(props) {
|
|
|
22
17
|
return options[(selectedOptionIndex + 1) % options.length].value;
|
|
23
18
|
};
|
|
24
19
|
|
|
25
|
-
const selectedOptionIndex = findIndex(
|
|
20
|
+
const selectedOptionIndex = options.findIndex(option => option.value === value);
|
|
26
21
|
const optionsContainsValue = options.length > 0 && selectedOptionIndex !== -1;
|
|
27
22
|
return createElement(Cell, _extends({
|
|
28
23
|
onPress: () => optionsContainsValue && onChangeValue(nextOptionValue()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cycle-picker-cell.native.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cycle-picker-cell.native.js"],"names":["Cell","BottomSheetCyclePickerCell","props","value","options","onChangeValue","cellProps","nextOptionValue","selectedOptionIndex","length","findIndex","option","optionsContainsValue","name"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,IAAP,MAAiB,QAAjB;AAEA,eAAe,SAASC,0BAAT,CAAqCC,KAArC,EAA6C;AAC3D,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA,aAAlB;AAAiC,OAAGC;AAApC,MAAkDJ,KAAxD;;AAEA,QAAMK,eAAe,GAAG,MAAM;AAC7B,WAAOH,OAAO,CAAE,CAAEI,mBAAmB,GAAG,CAAxB,IAA8BJ,OAAO,CAACK,MAAxC,CAAP,CAAwDN,KAA/D;AACA,GAFD;;AAIA,QAAMK,mBAAmB,GAAGJ,OAAO,CAACM,SAAR,CACzBC,MAAF,IAAcA,MAAM,CAACR,KAAP,KAAiBA,KADJ,CAA5B;AAGA,QAAMS,oBAAoB,GACzBR,OAAO,CAACK,MAAR,GAAiB,CAAjB,IAAsBD,mBAAmB,KAAK,CAAC,CADhD;AAGA,SACC,cAAC,IAAD;AACC,IAAA,OAAO,EAAG,MACTI,oBAAoB,IAAIP,aAAa,CAAEE,eAAe,EAAjB,CAFvC;AAIC,IAAA,QAAQ,EAAG,KAJZ;AAKC,IAAA,KAAK,EACJK,oBAAoB,IAAIR,OAAO,CAAEI,mBAAF,CAAP,CAA+BK;AANzD,KAQMP,SARN,EADD;AAYA","sourcesContent":["/**\n * Internal dependencies\n */\nimport Cell from './cell';\n\nexport default function BottomSheetCyclePickerCell( props ) {\n\tconst { value, options, onChangeValue, ...cellProps } = props;\n\n\tconst nextOptionValue = () => {\n\t\treturn options[ ( selectedOptionIndex + 1 ) % options.length ].value;\n\t};\n\n\tconst selectedOptionIndex = options.findIndex(\n\t\t( option ) => option.value === value\n\t);\n\tconst optionsContainsValue =\n\t\toptions.length > 0 && selectedOptionIndex !== -1;\n\n\treturn (\n\t\t<Cell\n\t\t\tonPress={ () =>\n\t\t\t\toptionsContainsValue && onChangeValue( nextOptionValue() )\n\t\t\t}\n\t\t\teditable={ false }\n\t\t\tvalue={\n\t\t\t\toptionsContainsValue && options[ selectedOptionIndex ].name\n\t\t\t}\n\t\t\t{ ...cellProps }\n\t\t/>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/index.native.js"],"names":["Dimensions","Keyboard","LayoutAnimation","PanResponder","Platform","ScrollView","StatusBar","Text","TouchableHighlight","View","Modal","SafeArea","omit","subscribeAndroidModalClosed","Component","withPreferredColorScheme","styles","Button","Cell","CyclePickerCell","PickerCell","SwitchCell","RangeCell","ColorCell","LinkCell","LinkSuggestionItemCell","RadioCell","NavigationScreen","NavigationContainer","KeyboardAvoidingView","BottomSheetSubSheet","NavBar","BottomSheetProvider","DEFAULT_LAYOUT_ANIMATION","Presets","easeInEaseOut","BottomSheet","constructor","arguments","onSafeAreaInsetsUpdate","bind","onScroll","isScrolling","onShouldEnableScroll","onDismiss","onShouldSetBottomSheetMaxHeight","setIsFullScreen","onDimensionsChange","onHeaderLayout","onCloseBottomSheet","onHandleClosingBottomSheet","onHardwareButtonPress","onHandleHardwareButtonPress","keyboardShow","keyboardHide","headerHeight","keyboardHeight","lastLayoutAnimation","lastLayoutAnimationFinished","state","safeAreaBottomInset","safeAreaTopInset","bounces","maxHeight","scrollEnabled","handleClosingBottomSheet","handleHardwareButtonPress","isMaxHeightSet","isFullScreen","props","e","isVisible","height","endCoordinates","performKeyboardLayoutAnimation","onSetMaxHeight","onKeyboardShow","onKeyboardHide","event","duration","easing","animationConfig","type","Types","layoutAnimation","update","create","property","Properties","opacity","delete","configureNext","performRegularLayoutAnimation","useLastLayoutAnimation","OS","componentDidMount","getSafeAreaInsetsForRootView","then","androidModalClosedSubscription","onClose","dimensionsChangeSubscription","addEventListener","keyboardShowListener","addListener","keyboardHideListener","safeAreaEventSubscription","componentWillUnmount","remove","result","safeAreaInsets","bottom","top","setState","width","get","statusBarHeight","currentHeight","maxHeightWithOpenKeyboard","Math","min","nativeEvent","layout","round","isCloseToBottom","layoutMeasurement","contentOffset","contentSize","y","isCloseToTop","value","action","getContentStyle","paddingBottom","scrollableContent","render","title","leftButton","rightButton","header","hideHeader","style","contentStyle","getStylesFromColorScheme","children","withHeaderSeparator","hasNavigation","rest","panResponder","onMoveShouldSetPanResponder","evt","gestureState","dy","backgroundStyle","background","backgroundDark","bottomSheetHeaderTitleStyle","bottomSheetHeaderTitle","bottomSheetHeaderTitleDark","listStyle","flexGrow","flexShrink","setMinHeightToMaxHeight","minHeight","listProps","disableScrollViewPanResponder","onScrollBeginDrag","onScrollEndDrag","scrollEventThrottle","contentContainerStyle","content","emptyHeader","automaticallyAdjustContentInsets","WrapperView","getHeader","bottomSheetHeader","flex","separator","showDragIndicator","allowDragIndicator","bottomModal","undefined","panHandlers","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","borderColor","marginTop","backgroundFullScreen","testID","dragIndicator","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","getWidth","maxWidth","ThemedBottomSheet","SubSheet"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,UADD,EAECC,QAFD,EAGCC,eAHD,EAICC,YAJD,EAKCC,QALD,EAMCC,UAND,EAOCC,SAPD,EAQCC,IARD,EASCC,kBATD,EAUCC,IAVD,QAWO,cAXP;AAYA,OAAOC,KAAP,MAAkB,oBAAlB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,SAASC,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,SAASC,2BAAT,QAA4C,gCAA5C;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,wBAAT,QAA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K,SAAlB,GAA8BA,SAA9B;AACA4K,iBAAiB,CAAC3K,SAAlB,GAA8BA,SAA9B;AACA2K,iBAAiB,CAAC1K,QAAlB,GAA6BA,QAA7B;AACA0K,iBAAiB,CAACzK,sBAAlB,GAA2CA,sBAA3C;AACAyK,iBAAiB,CAACxK,SAAlB,GAA8BA,SAA9B;AACAwK,iBAAiB,CAACvK,gBAAlB,GAAqCA,gBAArC;AACAuK,iBAAiB,CAACtK,mBAAlB,GAAwCA,mBAAxC;AAEA,eAAesK,iBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tKeyboard,\n\tLayoutAnimation,\n\tPanResponder,\n\tPlatform,\n\tScrollView,\n\tStatusBar,\n\tText,\n\tTouchableHighlight,\n\tView,\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport SafeArea from 'react-native-safe-area';\nimport { omit } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { subscribeAndroidModalClosed } from '@wordpress/react-native-bridge';\nimport { Component } from '@wordpress/element';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport Button from './button';\nimport Cell from './cell';\nimport CyclePickerCell from './cycle-picker-cell';\nimport PickerCell from './picker-cell';\nimport SwitchCell from './switch-cell';\nimport RangeCell from './range-cell';\nimport ColorCell from './color-cell';\nimport LinkCell from './link-cell';\nimport LinkSuggestionItemCell from './link-suggestion-item-cell';\nimport RadioCell from './radio-cell';\nimport NavigationScreen from './bottom-sheet-navigation/navigation-screen';\nimport NavigationContainer from './bottom-sheet-navigation/navigation-container';\nimport KeyboardAvoidingView from './keyboard-avoiding-view';\nimport BottomSheetSubSheet from './sub-sheet';\nimport NavBar from './nav-bar';\nimport { BottomSheetProvider } from './bottom-sheet-context';\n\nconst DEFAULT_LAYOUT_ANIMATION = LayoutAnimation.Presets.easeInEaseOut;\n\nclass BottomSheet extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onScroll = this.onScroll.bind( this );\n\t\tthis.isScrolling = this.isScrolling.bind( this );\n\t\tthis.onShouldEnableScroll = this.onShouldEnableScroll.bind( this );\n\t\tthis.onDismiss = this.onDismiss.bind( this );\n\t\tthis.onShouldSetBottomSheetMaxHeight = this.onShouldSetBottomSheetMaxHeight.bind(\n\t\t\tthis\n\t\t);\n\n\t\tthis.setIsFullScreen = this.setIsFullScreen.bind( this );\n\n\t\tthis.onDimensionsChange = this.onDimensionsChange.bind( this );\n\t\tthis.onHeaderLayout = this.onHeaderLayout.bind( this );\n\t\tthis.onCloseBottomSheet = this.onCloseBottomSheet.bind( this );\n\t\tthis.onHandleClosingBottomSheet = this.onHandleClosingBottomSheet.bind(\n\t\t\tthis\n\t\t);\n\t\tthis.onHardwareButtonPress = this.onHardwareButtonPress.bind( this );\n\t\tthis.onHandleHardwareButtonPress = this.onHandleHardwareButtonPress.bind(\n\t\t\tthis\n\t\t);\n\t\tthis.keyboardShow = this.keyboardShow.bind( this );\n\t\tthis.keyboardHide = this.keyboardHide.bind( this );\n\n\t\tthis.headerHeight = 0;\n\t\tthis.keyboardHeight = 0;\n\t\tthis.lastLayoutAnimation = null;\n\t\tthis.lastLayoutAnimationFinished = false;\n\n\t\tthis.state = {\n\t\t\tsafeAreaBottomInset: 0,\n\t\t\tsafeAreaTopInset: 0,\n\t\t\tbounces: false,\n\t\t\tmaxHeight: 0,\n\t\t\tscrollEnabled: true,\n\t\t\tisScrolling: false,\n\t\t\thandleClosingBottomSheet: null,\n\t\t\thandleHardwareButtonPress: null,\n\t\t\tisMaxHeightSet: true,\n\t\t\tisFullScreen: this.props.isFullScreen || false,\n\t\t};\n\t}\n\n\tkeyboardShow( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { height } = e.endCoordinates;\n\t\tthis.keyboardHeight = height;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardShow?.();\n\t}\n\n\tkeyboardHide( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyboardHeight = 0;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardHide?.();\n\t}\n\n\tperformKeyboardLayoutAnimation( event ) {\n\t\tconst { duration, easing } = event;\n\n\t\tif ( duration && easing ) {\n\t\t\t// This layout animation is the same as the React Native's KeyboardAvoidingView component.\n\t\t\t// Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128.\n\t\t\tconst animationConfig = {\n\t\t\t\t// We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m.\n\t\t\t\tduration: duration > 10 ? duration : 10,\n\t\t\t\ttype: LayoutAnimation.Types[ easing ] || 'keyboard',\n\t\t\t};\n\t\t\tconst layoutAnimation = {\n\t\t\t\tduration: animationConfig.duration,\n\t\t\t\tupdate: animationConfig,\n\t\t\t\tcreate: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t\tdelete: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t};\n\t\t\tthis.lastLayoutAnimationFinished = false;\n\t\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t\t} );\n\t\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t\t} else {\n\t\t\t// TODO: Reinstate animations, possibly replacing `LayoutAnimation` with\n\t\t\t// more nuanced `Animated` usage or replacing our custom `BottomSheet`\n\t\t\t// with `@gorhom/bottom-sheet`. This animation was disabled to avoid a\n\t\t\t// preexisting bug: https://github.com/WordPress/gutenberg/issues/30562\n\t\t\t// this.performRegularLayoutAnimation( {\n\t\t\t// \tuseLastLayoutAnimation: false,\n\t\t\t// } );.\n\t\t}\n\t}\n\n\tperformRegularLayoutAnimation( { useLastLayoutAnimation } ) {\n\t\t// On Android, we should prevent triggering multiple layout animations at the same time because it can produce visual glitches.\n\t\tif (\n\t\t\tPlatform.OS === 'android' &&\n\t\t\tthis.lastLayoutAnimation &&\n\t\t\t! this.lastLayoutAnimationFinished\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst layoutAnimation = useLastLayoutAnimation\n\t\t\t? this.lastLayoutAnimation || DEFAULT_LAYOUT_ANIMATION\n\t\t\t: DEFAULT_LAYOUT_ANIMATION;\n\n\t\tthis.lastLayoutAnimationFinished = false;\n\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t} );\n\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t}\n\n\tcomponentDidMount() {\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\n\t\tif ( Platform.OS === 'android' ) {\n\t\t\tthis.androidModalClosedSubscription = subscribeAndroidModalClosed(\n\t\t\t\t() => {\n\t\t\t\t\tthis.props.onClose();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis.dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tthis.onDimensionsChange\n\t\t);\n\n\t\t// 'Will' keyboard events are not available on Android.\n\t\t// Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener.\n\t\tthis.keyboardShowListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',\n\t\t\tthis.keyboardShow\n\t\t);\n\t\tthis.keyboardHideListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide',\n\t\t\tthis.keyboardHide\n\t\t);\n\n\t\tthis.safeAreaEventSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.dimensionsChangeSubscription.remove();\n\t\tthis.keyboardShowListener.remove();\n\t\tthis.keyboardHideListener.remove();\n\t\tif ( this.androidModalClosedSubscription ) {\n\t\t\tthis.androidModalClosedSubscription.remove();\n\t\t}\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.safeAreaEventSubscription.remove();\n\t\tthis.safeAreaEventSubscription = null;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaBottomInset, safeAreaTopInset } = this.state;\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { safeAreaInsets } = result;\n\t\tif (\n\t\t\tsafeAreaBottomInset !== safeAreaInsets.bottom ||\n\t\t\tsafeAreaTopInset !== safeAreaInsets.top\n\t\t) {\n\t\t\tthis.setState( {\n\t\t\t\tsafeAreaBottomInset: safeAreaInsets.bottom,\n\t\t\t\tsafeAreaTopInset: safeAreaInsets.top,\n\t\t\t} );\n\t\t}\n\t}\n\n\tonSetMaxHeight() {\n\t\tconst { height, width } = Dimensions.get( 'window' );\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\tconst statusBarHeight =\n\t\t\tPlatform.OS === 'android' ? StatusBar.currentHeight : 0;\n\n\t\t// `maxHeight` when modal is opened along with a keyboard.\n\t\tconst maxHeightWithOpenKeyboard =\n\t\t\t0.95 *\n\t\t\t( Dimensions.get( 'window' ).height -\n\t\t\t\tthis.keyboardHeight -\n\t\t\t\tstatusBarHeight -\n\t\t\t\tthis.headerHeight );\n\n\t\t// In landscape orientation, set `maxHeight` to ~96% of the height.\n\t\tif ( width > height ) {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\t0.96 * height - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t\t// In portrait orientation, set `maxHeight` to ~59% of the height.\n\t\t} else {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\theight * 0.59 - safeAreaBottomInset - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t}\n\t}\n\n\tonDimensionsChange() {\n\t\tthis.onSetMaxHeight();\n\t\tthis.setState( { bounces: false } );\n\t}\n\n\tonHeaderLayout( { nativeEvent } ) {\n\t\tconst { height } = nativeEvent.layout;\n\t\t// The layout animation should only be triggered if the header\n\t\t// height has changed after being mounted.\n\t\tif (\n\t\t\tthis.headerHeight !== 0 &&\n\t\t\tMath.round( height ) !== Math.round( this.headerHeight )\n\t\t) {\n\t\t\tthis.performRegularLayoutAnimation( {\n\t\t\t\tuseLastLayoutAnimation: true,\n\t\t\t} );\n\t\t}\n\t\tthis.headerHeight = height;\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tisCloseToBottom( { layoutMeasurement, contentOffset, contentSize } ) {\n\t\treturn (\n\t\t\tlayoutMeasurement.height + contentOffset.y >=\n\t\t\tcontentSize.height - contentOffset.y\n\t\t);\n\t}\n\n\tisCloseToTop( { contentOffset } ) {\n\t\treturn contentOffset.y < 10;\n\t}\n\n\tonScroll( { nativeEvent } ) {\n\t\tif ( this.isCloseToTop( nativeEvent ) ) {\n\t\t\tthis.setState( { bounces: false } );\n\t\t} else {\n\t\t\tthis.setState( { bounces: true } );\n\t\t}\n\t}\n\n\tonDismiss() {\n\t\tconst { onDismiss } = this.props;\n\n\t\tif ( onDismiss ) {\n\t\t\tonDismiss();\n\t\t}\n\n\t\tthis.onCloseBottomSheet();\n\t}\n\n\tonShouldEnableScroll( value ) {\n\t\tthis.setState( { scrollEnabled: value } );\n\t}\n\n\tonShouldSetBottomSheetMaxHeight( value ) {\n\t\tthis.setState( { isMaxHeightSet: value } );\n\t}\n\n\tisScrolling( value ) {\n\t\tthis.setState( { isScrolling: value } );\n\t}\n\n\tonHandleClosingBottomSheet( action ) {\n\t\tthis.setState( { handleClosingBottomSheet: action } );\n\t}\n\n\tonHandleHardwareButtonPress( action ) {\n\t\tthis.setState( { handleHardwareButtonPress: action } );\n\t}\n\n\tonCloseBottomSheet() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleClosingBottomSheet } = this.state;\n\t\tif ( handleClosingBottomSheet ) {\n\t\t\thandleClosingBottomSheet();\n\t\t\tthis.onHandleClosingBottomSheet( null );\n\t\t}\n\t\tif ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t\tthis.onShouldSetBottomSheetMaxHeight( true );\n\t}\n\n\tsetIsFullScreen( isFullScreen ) {\n\t\tif ( isFullScreen !== this.state.isFullScreen ) {\n\t\t\tif ( isFullScreen ) {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: false } );\n\t\t\t} else {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: true } );\n\t\t\t}\n\t\t}\n\t}\n\n\tonHardwareButtonPress() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleHardwareButtonPress } = this.state;\n\t\tif ( handleHardwareButtonPress && handleHardwareButtonPress() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( onClose ) {\n\t\t\treturn onClose();\n\t\t}\n\t}\n\n\tgetContentStyle() {\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\treturn {\n\t\t\tpaddingBottom:\n\t\t\t\t( safeAreaBottomInset || 0 ) +\n\t\t\t\tstyles.scrollableContent.paddingBottom,\n\t\t};\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\ttitle = '',\n\t\t\tisVisible,\n\t\t\tleftButton,\n\t\t\trightButton,\n\t\t\theader,\n\t\t\thideHeader,\n\t\t\tstyle = {},\n\t\t\tcontentStyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tchildren,\n\t\t\twithHeaderSeparator = false,\n\t\t\thasNavigation,\n\t\t\t...rest\n\t\t} = this.props;\n\t\tconst {\n\t\t\tmaxHeight,\n\t\t\tbounces,\n\t\t\tsafeAreaBottomInset,\n\t\t\tsafeAreaTopInset,\n\t\t\tisScrolling,\n\t\t\tscrollEnabled,\n\t\t\tisMaxHeightSet,\n\t\t\tisFullScreen,\n\t\t} = this.state;\n\n\t\tconst panResponder = PanResponder.create( {\n\t\t\tonMoveShouldSetPanResponder: ( evt, gestureState ) => {\n\t\t\t\t// 'swiping-to-close' option is temporarily and partially disabled\n\t\t\t\t// on Android ( swipe / drag is still available in the top most area - near drag indicator).\n\t\t\t\tif ( Platform.OS === 'ios' ) {\n\t\t\t\t\t// Activates swipe down over child Touchables if the swipe is long enough.\n\t\t\t\t\t// With this we can adjust sensibility on the swipe vs tap gestures.\n\t\t\t\t\tif ( gestureState.dy > 3 && ! bounces ) {\n\t\t\t\t\t\tgestureState.dy = 0;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t} );\n\n\t\tconst backgroundStyle = getStylesFromColorScheme(\n\t\t\tstyles.background,\n\t\t\tstyles.backgroundDark\n\t\t);\n\n\t\tconst bottomSheetHeaderTitleStyle = getStylesFromColorScheme(\n\t\t\tstyles.bottomSheetHeaderTitle,\n\t\t\tstyles.bottomSheetHeaderTitleDark\n\t\t);\n\n\t\tlet listStyle = {};\n\t\tif ( isFullScreen ) {\n\t\t\tlistStyle = { flexGrow: 1, flexShrink: 1 };\n\t\t} else if ( isMaxHeightSet ) {\n\t\t\tlistStyle = { maxHeight };\n\n\t\t\t// Allow setting a \"static\" height of the bottom sheet\n\t\t\t// by setting the min height to the max height.\n\t\t\tif ( this.props.setMinHeightToMaxHeight ) {\n\t\t\t\tlistStyle.minHeight = maxHeight;\n\t\t\t}\n\t\t}\n\n\t\tconst listProps = {\n\t\t\tdisableScrollViewPanResponder: true,\n\t\t\tbounces,\n\t\t\tonScroll: this.onScroll,\n\t\t\tonScrollBeginDrag: this.onScrollBeginDrag,\n\t\t\tonScrollEndDrag: this.onScrollEndDrag,\n\t\t\tscrollEventThrottle: 16,\n\t\t\tcontentContainerStyle: [\n\t\t\t\tstyles.content,\n\t\t\t\thideHeader && styles.emptyHeader,\n\t\t\t\tcontentStyle,\n\t\t\t\tisFullScreen && { flexGrow: 1 },\n\t\t\t],\n\t\t\tstyle: listStyle,\n\t\t\tsafeAreaBottomInset,\n\t\t\tscrollEnabled,\n\t\t\tautomaticallyAdjustContentInsets: false,\n\t\t};\n\n\t\tconst WrapperView = hasNavigation ? View : ScrollView;\n\n\t\tconst getHeader = () => (\n\t\t\t<>\n\t\t\t\t{ header || (\n\t\t\t\t\t<View style={ styles.bottomSheetHeader }>\n\t\t\t\t\t\t<View style={ styles.flex }>{ leftButton }</View>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={ bottomSheetHeaderTitleStyle }\n\t\t\t\t\t\t\tmaxFontSizeMultiplier={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View style={ styles.flex }>{ rightButton }</View>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t\t{ withHeaderSeparator && <View style={ styles.separator } /> }\n\t\t\t</>\n\t\t);\n\n\t\tconst showDragIndicator = () => {\n\t\t\t// If iOS or not fullscreen show the drag indicator.\n\t\t\tif ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Otherwise check the allowDragIndicator.\n\t\t\treturn this.props.allowDragIndicator;\n\t\t};\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tisVisible={ isVisible }\n\t\t\t\tstyle={ styles.bottomModal }\n\t\t\t\tanimationInTiming={ 400 }\n\t\t\t\tanimationOutTiming={ 300 }\n\t\t\t\tbackdropTransitionInTiming={ 50 }\n\t\t\t\tbackdropTransitionOutTiming={ 50 }\n\t\t\t\tbackdropOpacity={ 0.2 }\n\t\t\t\tonBackdropPress={ this.onCloseBottomSheet }\n\t\t\t\tonBackButtonPress={ this.onHardwareButtonPress }\n\t\t\t\tonSwipeComplete={ this.onCloseBottomSheet }\n\t\t\t\tonDismiss={ Platform.OS === 'ios' ? this.onDismiss : undefined }\n\t\t\t\tonModalHide={\n\t\t\t\t\tPlatform.OS === 'android' ? this.onDismiss : undefined\n\t\t\t\t}\n\t\t\t\tswipeDirection=\"down\"\n\t\t\t\tonMoveShouldSetResponder={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponder\n\t\t\t\t}\n\t\t\t\tonMoveShouldSetResponderCapture={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponderCapture\n\t\t\t\t}\n\t\t\t\tonAccessibilityEscape={ this.onCloseBottomSheet }\n\t\t\t\t// We need to prevent overwriting the onDismiss prop,\n\t\t\t\t// for this reason it is excluded from the rest object.\n\t\t\t\t{ ...omit( rest, 'onDismiss' ) }\n\t\t\t>\n\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\tbehavior={ Platform.OS === 'ios' && 'padding' }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...backgroundStyle,\n\t\t\t\t\t\tborderColor: 'rgba(0, 0, 0, 0.1)',\n\t\t\t\t\t\tmarginTop:\n\t\t\t\t\t\t\tPlatform.OS === 'ios' && isFullScreen\n\t\t\t\t\t\t\t\t? safeAreaTopInset\n\t\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tflex: isFullScreen ? 1 : undefined,\n\t\t\t\t\t\t...( Platform.OS === 'android' && isFullScreen\n\t\t\t\t\t\t\t? styles.backgroundFullScreen\n\t\t\t\t\t\t\t: {} ),\n\t\t\t\t\t\t...style,\n\t\t\t\t\t} }\n\t\t\t\t\tkeyboardVerticalOffset={ -safeAreaBottomInset }\n\t\t\t\t>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ styles.header }\n\t\t\t\t\t\tonLayout={ this.onHeaderLayout }\n\t\t\t\t\t\ttestID={ `${ rest.testID || 'bottom-sheet' }-header` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showDragIndicator() && (\n\t\t\t\t\t\t\t<View style={ styles.dragIndicator } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! hideHeader && getHeader() }\n\t\t\t\t\t</View>\n\t\t\t\t\t<WrapperView\n\t\t\t\t\t\t{ ...( hasNavigation\n\t\t\t\t\t\t\t? { style: listProps.style }\n\t\t\t\t\t\t\t: listProps ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BottomSheetProvider\n\t\t\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetScroll: this\n\t\t\t\t\t\t\t\t\t.onShouldEnableScroll,\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetMaxHeight: this\n\t\t\t\t\t\t\t\t\t.onShouldSetBottomSheetMaxHeight,\n\t\t\t\t\t\t\t\tisBottomSheetContentScrolling: isScrolling,\n\t\t\t\t\t\t\t\tonHandleClosingBottomSheet: this\n\t\t\t\t\t\t\t\t\t.onHandleClosingBottomSheet,\n\t\t\t\t\t\t\t\tonHandleHardwareButtonPress: this\n\t\t\t\t\t\t\t\t\t.onHandleHardwareButtonPress,\n\t\t\t\t\t\t\t\tlistProps,\n\t\t\t\t\t\t\t\tsetIsFullScreen: this.setIsFullScreen,\n\t\t\t\t\t\t\t\tsafeAreaBottomInset,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hasNavigation ? (\n\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<TouchableHighlight accessible={ false }>\n\t\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t\t</TouchableHighlight>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BottomSheetProvider>\n\t\t\t\t\t\t{ ! hasNavigation && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\tsafeAreaBottomInset ||\n\t\t\t\t\t\t\t\t\t\tstyles.scrollableContent.paddingBottom,\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</WrapperView>\n\t\t\t\t</KeyboardAvoidingView>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nfunction getWidth() {\n\treturn Math.min(\n\t\tDimensions.get( 'window' ).width,\n\t\tstyles.background.maxWidth\n\t);\n}\n\nconst ThemedBottomSheet = withPreferredColorScheme( BottomSheet );\n\nThemedBottomSheet.getWidth = getWidth;\nThemedBottomSheet.Button = Button;\nThemedBottomSheet.Cell = Cell;\nThemedBottomSheet.SubSheet = BottomSheetSubSheet;\nThemedBottomSheet.NavBar = NavBar;\nThemedBottomSheet.CyclePickerCell = CyclePickerCell;\nThemedBottomSheet.PickerCell = PickerCell;\nThemedBottomSheet.SwitchCell = SwitchCell;\nThemedBottomSheet.RangeCell = RangeCell;\nThemedBottomSheet.ColorCell = ColorCell;\nThemedBottomSheet.LinkCell = LinkCell;\nThemedBottomSheet.LinkSuggestionItemCell = LinkSuggestionItemCell;\nThemedBottomSheet.RadioCell = RadioCell;\nThemedBottomSheet.NavigationScreen = NavigationScreen;\nThemedBottomSheet.NavigationContainer = NavigationContainer;\n\nexport default ThemedBottomSheet;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/index.native.js"],"names":["Dimensions","Keyboard","LayoutAnimation","PanResponder","Platform","ScrollView","StatusBar","Text","TouchableHighlight","View","Modal","SafeArea","omit","subscribeAndroidModalClosed","Component","withPreferredColorScheme","styles","Button","Cell","CyclePickerCell","PickerCell","SwitchCell","RangeCell","ColorCell","LinkCell","LinkSuggestionItemCell","RadioCell","NavigationScreen","NavigationContainer","KeyboardAvoidingView","BottomSheetSubSheet","NavBar","BottomSheetProvider","DEFAULT_LAYOUT_ANIMATION","Presets","easeInEaseOut","BottomSheet","constructor","arguments","onSafeAreaInsetsUpdate","bind","onScroll","isScrolling","onShouldEnableScroll","onDismiss","onShouldSetBottomSheetMaxHeight","setIsFullScreen","onDimensionsChange","onHeaderLayout","onCloseBottomSheet","onHandleClosingBottomSheet","onHardwareButtonPress","onHandleHardwareButtonPress","keyboardShow","keyboardHide","headerHeight","keyboardHeight","lastLayoutAnimation","lastLayoutAnimationFinished","state","safeAreaBottomInset","safeAreaTopInset","bounces","maxHeight","scrollEnabled","handleClosingBottomSheet","handleHardwareButtonPress","isMaxHeightSet","isFullScreen","props","e","isVisible","height","endCoordinates","performKeyboardLayoutAnimation","onSetMaxHeight","onKeyboardShow","onKeyboardHide","event","duration","easing","animationConfig","type","Types","layoutAnimation","update","create","property","Properties","opacity","delete","configureNext","performRegularLayoutAnimation","useLastLayoutAnimation","OS","componentDidMount","getSafeAreaInsetsForRootView","then","androidModalClosedSubscription","onClose","dimensionsChangeSubscription","addEventListener","keyboardShowListener","addListener","keyboardHideListener","safeAreaEventSubscription","componentWillUnmount","remove","result","safeAreaInsets","bottom","top","setState","width","get","statusBarHeight","currentHeight","maxHeightWithOpenKeyboard","Math","min","nativeEvent","layout","round","isCloseToBottom","layoutMeasurement","contentOffset","contentSize","y","isCloseToTop","value","action","getContentStyle","paddingBottom","scrollableContent","render","title","leftButton","rightButton","header","hideHeader","style","contentStyle","getStylesFromColorScheme","children","withHeaderSeparator","hasNavigation","rest","panResponder","onMoveShouldSetPanResponder","evt","gestureState","dy","backgroundStyle","background","backgroundDark","bottomSheetHeaderTitleStyle","bottomSheetHeaderTitle","bottomSheetHeaderTitleDark","listStyle","flexGrow","flexShrink","setMinHeightToMaxHeight","minHeight","listProps","disableScrollViewPanResponder","onScrollBeginDrag","onScrollEndDrag","scrollEventThrottle","contentContainerStyle","content","emptyHeader","automaticallyAdjustContentInsets","WrapperView","getHeader","bottomSheetHeader","flex","separator","showDragIndicator","allowDragIndicator","bottomModal","undefined","panHandlers","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","borderColor","marginTop","backgroundFullScreen","testID","dragIndicator","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","getWidth","maxWidth","ThemedBottomSheet","SubSheet"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,UADD,EAECC,QAFD,EAGCC,eAHD,EAICC,YAJD,EAKCC,QALD,EAMCC,UAND,EAOCC,SAPD,EAQCC,IARD,EASCC,kBATD,EAUCC,IAVD,QAWO,cAXP;AAYA,OAAOC,KAAP,MAAkB,oBAAlB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,SAASC,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,SAASC,2BAAT,QAA4C,gCAA5C;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,eAAnB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,gBAAP,MAA6B,6CAA7B;AACA,OAAOC,mBAAP,MAAgC,gDAAhC;AACA,OAAOC,oBAAP,MAAiC,0BAAjC;AACA,OAAOC,mBAAP,MAAgC,aAAhC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,iBAAP,CAAyBD;AAHnB;AADT,MA9BF,CA3BD,CA7BD,CADD;AAmGA;;AAziBkC;;AA4iBpC,SAAS4D,QAAT,GAAoB;AACnB,SAAO1E,IAAI,CAACC,GAAL,CACNvH,UAAU,CAACkH,GAAX,CAAgB,QAAhB,EAA2BD,KADrB,EAENjG,MAAM,CAACyI,UAAP,CAAkBwC,QAFZ,CAAP;AAIA;;AAED,MAAMC,iBAAiB,GAAGnL,wBAAwB,CAAEqB,WAAF,CAAlD;AAEA8J,iBAAiB,CAACF,QAAlB,GAA6BA,QAA7B;AACAE,iBAAiB,CAACjL,MAAlB,GAA2BA,MAA3B;AACAiL,iBAAiB,CAAChL,IAAlB,GAAyBA,IAAzB;AACAgL,iBAAiB,CAACC,QAAlB,GAA6BrK,mBAA7B;AACAoK,iBAAiB,CAACnK,MAAlB,GAA2BA,MAA3B;AACAmK,iBAAiB,CAAC/K,eAAlB,GAAoCA,eAApC;AACA+K,iBAAiB,CAAC9K,UAAlB,GAA+BA,UAA/B;AACA8K,iBAAiB,CAAC7K,UAAlB,GAA+BA,UAA/B;AACA6K,iBAAiB,CAAC5K,SAAlB,GAA8BA,SAA9B;AACA4K,iBAAiB,CAAC3K,SAAlB,GAA8BA,SAA9B;AACA2K,iBAAiB,CAAC1K,QAAlB,GAA6BA,QAA7B;AACA0K,iBAAiB,CAACzK,sBAAlB,GAA2CA,sBAA3C;AACAyK,iBAAiB,CAACxK,SAAlB,GAA8BA,SAA9B;AACAwK,iBAAiB,CAACvK,gBAAlB,GAAqCA,gBAArC;AACAuK,iBAAiB,CAACtK,mBAAlB,GAAwCA,mBAAxC;AAEA,eAAesK,iBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tKeyboard,\n\tLayoutAnimation,\n\tPanResponder,\n\tPlatform,\n\tScrollView,\n\tStatusBar,\n\tText,\n\tTouchableHighlight,\n\tView,\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport SafeArea from 'react-native-safe-area';\nimport { omit } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { subscribeAndroidModalClosed } from '@wordpress/react-native-bridge';\nimport { Component } from '@wordpress/element';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport Button from './button';\nimport Cell from './cell';\nimport CyclePickerCell from './cycle-picker-cell';\nimport PickerCell from './picker-cell';\nimport SwitchCell from './switch-cell';\nimport RangeCell from './range-cell';\nimport ColorCell from './color-cell';\nimport LinkCell from './link-cell';\nimport LinkSuggestionItemCell from './link-suggestion-item-cell';\nimport RadioCell from './radio-cell';\nimport NavigationScreen from './bottom-sheet-navigation/navigation-screen';\nimport NavigationContainer from './bottom-sheet-navigation/navigation-container';\nimport KeyboardAvoidingView from './keyboard-avoiding-view';\nimport BottomSheetSubSheet from './sub-sheet';\nimport NavBar from './nav-bar';\nimport { BottomSheetProvider } from './bottom-sheet-context';\n\nconst DEFAULT_LAYOUT_ANIMATION = LayoutAnimation.Presets.easeInEaseOut;\n\nclass BottomSheet extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onScroll = this.onScroll.bind( this );\n\t\tthis.isScrolling = this.isScrolling.bind( this );\n\t\tthis.onShouldEnableScroll = this.onShouldEnableScroll.bind( this );\n\t\tthis.onDismiss = this.onDismiss.bind( this );\n\t\tthis.onShouldSetBottomSheetMaxHeight =\n\t\t\tthis.onShouldSetBottomSheetMaxHeight.bind( this );\n\n\t\tthis.setIsFullScreen = this.setIsFullScreen.bind( this );\n\n\t\tthis.onDimensionsChange = this.onDimensionsChange.bind( this );\n\t\tthis.onHeaderLayout = this.onHeaderLayout.bind( this );\n\t\tthis.onCloseBottomSheet = this.onCloseBottomSheet.bind( this );\n\t\tthis.onHandleClosingBottomSheet =\n\t\t\tthis.onHandleClosingBottomSheet.bind( this );\n\t\tthis.onHardwareButtonPress = this.onHardwareButtonPress.bind( this );\n\t\tthis.onHandleHardwareButtonPress =\n\t\t\tthis.onHandleHardwareButtonPress.bind( this );\n\t\tthis.keyboardShow = this.keyboardShow.bind( this );\n\t\tthis.keyboardHide = this.keyboardHide.bind( this );\n\n\t\tthis.headerHeight = 0;\n\t\tthis.keyboardHeight = 0;\n\t\tthis.lastLayoutAnimation = null;\n\t\tthis.lastLayoutAnimationFinished = false;\n\n\t\tthis.state = {\n\t\t\tsafeAreaBottomInset: 0,\n\t\t\tsafeAreaTopInset: 0,\n\t\t\tbounces: false,\n\t\t\tmaxHeight: 0,\n\t\t\tscrollEnabled: true,\n\t\t\tisScrolling: false,\n\t\t\thandleClosingBottomSheet: null,\n\t\t\thandleHardwareButtonPress: null,\n\t\t\tisMaxHeightSet: true,\n\t\t\tisFullScreen: this.props.isFullScreen || false,\n\t\t};\n\t}\n\n\tkeyboardShow( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { height } = e.endCoordinates;\n\t\tthis.keyboardHeight = height;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardShow?.();\n\t}\n\n\tkeyboardHide( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyboardHeight = 0;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardHide?.();\n\t}\n\n\tperformKeyboardLayoutAnimation( event ) {\n\t\tconst { duration, easing } = event;\n\n\t\tif ( duration && easing ) {\n\t\t\t// This layout animation is the same as the React Native's KeyboardAvoidingView component.\n\t\t\t// Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128.\n\t\t\tconst animationConfig = {\n\t\t\t\t// We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m.\n\t\t\t\tduration: duration > 10 ? duration : 10,\n\t\t\t\ttype: LayoutAnimation.Types[ easing ] || 'keyboard',\n\t\t\t};\n\t\t\tconst layoutAnimation = {\n\t\t\t\tduration: animationConfig.duration,\n\t\t\t\tupdate: animationConfig,\n\t\t\t\tcreate: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t\tdelete: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t};\n\t\t\tthis.lastLayoutAnimationFinished = false;\n\t\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t\t} );\n\t\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t\t} else {\n\t\t\t// TODO: Reinstate animations, possibly replacing `LayoutAnimation` with\n\t\t\t// more nuanced `Animated` usage or replacing our custom `BottomSheet`\n\t\t\t// with `@gorhom/bottom-sheet`. This animation was disabled to avoid a\n\t\t\t// preexisting bug: https://github.com/WordPress/gutenberg/issues/30562\n\t\t\t// this.performRegularLayoutAnimation( {\n\t\t\t// \tuseLastLayoutAnimation: false,\n\t\t\t// } );.\n\t\t}\n\t}\n\n\tperformRegularLayoutAnimation( { useLastLayoutAnimation } ) {\n\t\t// On Android, we should prevent triggering multiple layout animations at the same time because it can produce visual glitches.\n\t\tif (\n\t\t\tPlatform.OS === 'android' &&\n\t\t\tthis.lastLayoutAnimation &&\n\t\t\t! this.lastLayoutAnimationFinished\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst layoutAnimation = useLastLayoutAnimation\n\t\t\t? this.lastLayoutAnimation || DEFAULT_LAYOUT_ANIMATION\n\t\t\t: DEFAULT_LAYOUT_ANIMATION;\n\n\t\tthis.lastLayoutAnimationFinished = false;\n\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t} );\n\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t}\n\n\tcomponentDidMount() {\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\n\t\tif ( Platform.OS === 'android' ) {\n\t\t\tthis.androidModalClosedSubscription = subscribeAndroidModalClosed(\n\t\t\t\t() => {\n\t\t\t\t\tthis.props.onClose();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis.dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tthis.onDimensionsChange\n\t\t);\n\n\t\t// 'Will' keyboard events are not available on Android.\n\t\t// Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener.\n\t\tthis.keyboardShowListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',\n\t\t\tthis.keyboardShow\n\t\t);\n\t\tthis.keyboardHideListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide',\n\t\t\tthis.keyboardHide\n\t\t);\n\n\t\tthis.safeAreaEventSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.dimensionsChangeSubscription.remove();\n\t\tthis.keyboardShowListener.remove();\n\t\tthis.keyboardHideListener.remove();\n\t\tif ( this.androidModalClosedSubscription ) {\n\t\t\tthis.androidModalClosedSubscription.remove();\n\t\t}\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.safeAreaEventSubscription.remove();\n\t\tthis.safeAreaEventSubscription = null;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaBottomInset, safeAreaTopInset } = this.state;\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { safeAreaInsets } = result;\n\t\tif (\n\t\t\tsafeAreaBottomInset !== safeAreaInsets.bottom ||\n\t\t\tsafeAreaTopInset !== safeAreaInsets.top\n\t\t) {\n\t\t\tthis.setState( {\n\t\t\t\tsafeAreaBottomInset: safeAreaInsets.bottom,\n\t\t\t\tsafeAreaTopInset: safeAreaInsets.top,\n\t\t\t} );\n\t\t}\n\t}\n\n\tonSetMaxHeight() {\n\t\tconst { height, width } = Dimensions.get( 'window' );\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\tconst statusBarHeight =\n\t\t\tPlatform.OS === 'android' ? StatusBar.currentHeight : 0;\n\n\t\t// `maxHeight` when modal is opened along with a keyboard.\n\t\tconst maxHeightWithOpenKeyboard =\n\t\t\t0.95 *\n\t\t\t( Dimensions.get( 'window' ).height -\n\t\t\t\tthis.keyboardHeight -\n\t\t\t\tstatusBarHeight -\n\t\t\t\tthis.headerHeight );\n\n\t\t// In landscape orientation, set `maxHeight` to ~96% of the height.\n\t\tif ( width > height ) {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\t0.96 * height - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t\t// In portrait orientation, set `maxHeight` to ~59% of the height.\n\t\t} else {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\theight * 0.59 - safeAreaBottomInset - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t}\n\t}\n\n\tonDimensionsChange() {\n\t\tthis.onSetMaxHeight();\n\t\tthis.setState( { bounces: false } );\n\t}\n\n\tonHeaderLayout( { nativeEvent } ) {\n\t\tconst { height } = nativeEvent.layout;\n\t\t// The layout animation should only be triggered if the header\n\t\t// height has changed after being mounted.\n\t\tif (\n\t\t\tthis.headerHeight !== 0 &&\n\t\t\tMath.round( height ) !== Math.round( this.headerHeight )\n\t\t) {\n\t\t\tthis.performRegularLayoutAnimation( {\n\t\t\t\tuseLastLayoutAnimation: true,\n\t\t\t} );\n\t\t}\n\t\tthis.headerHeight = height;\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tisCloseToBottom( { layoutMeasurement, contentOffset, contentSize } ) {\n\t\treturn (\n\t\t\tlayoutMeasurement.height + contentOffset.y >=\n\t\t\tcontentSize.height - contentOffset.y\n\t\t);\n\t}\n\n\tisCloseToTop( { contentOffset } ) {\n\t\treturn contentOffset.y < 10;\n\t}\n\n\tonScroll( { nativeEvent } ) {\n\t\tif ( this.isCloseToTop( nativeEvent ) ) {\n\t\t\tthis.setState( { bounces: false } );\n\t\t} else {\n\t\t\tthis.setState( { bounces: true } );\n\t\t}\n\t}\n\n\tonDismiss() {\n\t\tconst { onDismiss } = this.props;\n\n\t\tif ( onDismiss ) {\n\t\t\tonDismiss();\n\t\t}\n\n\t\tthis.onCloseBottomSheet();\n\t}\n\n\tonShouldEnableScroll( value ) {\n\t\tthis.setState( { scrollEnabled: value } );\n\t}\n\n\tonShouldSetBottomSheetMaxHeight( value ) {\n\t\tthis.setState( { isMaxHeightSet: value } );\n\t}\n\n\tisScrolling( value ) {\n\t\tthis.setState( { isScrolling: value } );\n\t}\n\n\tonHandleClosingBottomSheet( action ) {\n\t\tthis.setState( { handleClosingBottomSheet: action } );\n\t}\n\n\tonHandleHardwareButtonPress( action ) {\n\t\tthis.setState( { handleHardwareButtonPress: action } );\n\t}\n\n\tonCloseBottomSheet() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleClosingBottomSheet } = this.state;\n\t\tif ( handleClosingBottomSheet ) {\n\t\t\thandleClosingBottomSheet();\n\t\t\tthis.onHandleClosingBottomSheet( null );\n\t\t}\n\t\tif ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t\tthis.onShouldSetBottomSheetMaxHeight( true );\n\t}\n\n\tsetIsFullScreen( isFullScreen ) {\n\t\tif ( isFullScreen !== this.state.isFullScreen ) {\n\t\t\tif ( isFullScreen ) {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: false } );\n\t\t\t} else {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: true } );\n\t\t\t}\n\t\t}\n\t}\n\n\tonHardwareButtonPress() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleHardwareButtonPress } = this.state;\n\t\tif ( handleHardwareButtonPress && handleHardwareButtonPress() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( onClose ) {\n\t\t\treturn onClose();\n\t\t}\n\t}\n\n\tgetContentStyle() {\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\treturn {\n\t\t\tpaddingBottom:\n\t\t\t\t( safeAreaBottomInset || 0 ) +\n\t\t\t\tstyles.scrollableContent.paddingBottom,\n\t\t};\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\ttitle = '',\n\t\t\tisVisible,\n\t\t\tleftButton,\n\t\t\trightButton,\n\t\t\theader,\n\t\t\thideHeader,\n\t\t\tstyle = {},\n\t\t\tcontentStyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tchildren,\n\t\t\twithHeaderSeparator = false,\n\t\t\thasNavigation,\n\t\t\t...rest\n\t\t} = this.props;\n\t\tconst {\n\t\t\tmaxHeight,\n\t\t\tbounces,\n\t\t\tsafeAreaBottomInset,\n\t\t\tsafeAreaTopInset,\n\t\t\tisScrolling,\n\t\t\tscrollEnabled,\n\t\t\tisMaxHeightSet,\n\t\t\tisFullScreen,\n\t\t} = this.state;\n\n\t\tconst panResponder = PanResponder.create( {\n\t\t\tonMoveShouldSetPanResponder: ( evt, gestureState ) => {\n\t\t\t\t// 'swiping-to-close' option is temporarily and partially disabled\n\t\t\t\t// on Android ( swipe / drag is still available in the top most area - near drag indicator).\n\t\t\t\tif ( Platform.OS === 'ios' ) {\n\t\t\t\t\t// Activates swipe down over child Touchables if the swipe is long enough.\n\t\t\t\t\t// With this we can adjust sensibility on the swipe vs tap gestures.\n\t\t\t\t\tif ( gestureState.dy > 3 && ! bounces ) {\n\t\t\t\t\t\tgestureState.dy = 0;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t} );\n\n\t\tconst backgroundStyle = getStylesFromColorScheme(\n\t\t\tstyles.background,\n\t\t\tstyles.backgroundDark\n\t\t);\n\n\t\tconst bottomSheetHeaderTitleStyle = getStylesFromColorScheme(\n\t\t\tstyles.bottomSheetHeaderTitle,\n\t\t\tstyles.bottomSheetHeaderTitleDark\n\t\t);\n\n\t\tlet listStyle = {};\n\t\tif ( isFullScreen ) {\n\t\t\tlistStyle = { flexGrow: 1, flexShrink: 1 };\n\t\t} else if ( isMaxHeightSet ) {\n\t\t\tlistStyle = { maxHeight };\n\n\t\t\t// Allow setting a \"static\" height of the bottom sheet\n\t\t\t// by setting the min height to the max height.\n\t\t\tif ( this.props.setMinHeightToMaxHeight ) {\n\t\t\t\tlistStyle.minHeight = maxHeight;\n\t\t\t}\n\t\t}\n\n\t\tconst listProps = {\n\t\t\tdisableScrollViewPanResponder: true,\n\t\t\tbounces,\n\t\t\tonScroll: this.onScroll,\n\t\t\tonScrollBeginDrag: this.onScrollBeginDrag,\n\t\t\tonScrollEndDrag: this.onScrollEndDrag,\n\t\t\tscrollEventThrottle: 16,\n\t\t\tcontentContainerStyle: [\n\t\t\t\tstyles.content,\n\t\t\t\thideHeader && styles.emptyHeader,\n\t\t\t\tcontentStyle,\n\t\t\t\tisFullScreen && { flexGrow: 1 },\n\t\t\t],\n\t\t\tstyle: listStyle,\n\t\t\tsafeAreaBottomInset,\n\t\t\tscrollEnabled,\n\t\t\tautomaticallyAdjustContentInsets: false,\n\t\t};\n\n\t\tconst WrapperView = hasNavigation ? View : ScrollView;\n\n\t\tconst getHeader = () => (\n\t\t\t<>\n\t\t\t\t{ header || (\n\t\t\t\t\t<View style={ styles.bottomSheetHeader }>\n\t\t\t\t\t\t<View style={ styles.flex }>{ leftButton }</View>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={ bottomSheetHeaderTitleStyle }\n\t\t\t\t\t\t\tmaxFontSizeMultiplier={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View style={ styles.flex }>{ rightButton }</View>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t\t{ withHeaderSeparator && <View style={ styles.separator } /> }\n\t\t\t</>\n\t\t);\n\n\t\tconst showDragIndicator = () => {\n\t\t\t// If iOS or not fullscreen show the drag indicator.\n\t\t\tif ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Otherwise check the allowDragIndicator.\n\t\t\treturn this.props.allowDragIndicator;\n\t\t};\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tisVisible={ isVisible }\n\t\t\t\tstyle={ styles.bottomModal }\n\t\t\t\tanimationInTiming={ 400 }\n\t\t\t\tanimationOutTiming={ 300 }\n\t\t\t\tbackdropTransitionInTiming={ 50 }\n\t\t\t\tbackdropTransitionOutTiming={ 50 }\n\t\t\t\tbackdropOpacity={ 0.2 }\n\t\t\t\tonBackdropPress={ this.onCloseBottomSheet }\n\t\t\t\tonBackButtonPress={ this.onHardwareButtonPress }\n\t\t\t\tonSwipeComplete={ this.onCloseBottomSheet }\n\t\t\t\tonDismiss={ Platform.OS === 'ios' ? this.onDismiss : undefined }\n\t\t\t\tonModalHide={\n\t\t\t\t\tPlatform.OS === 'android' ? this.onDismiss : undefined\n\t\t\t\t}\n\t\t\t\tswipeDirection=\"down\"\n\t\t\t\tonMoveShouldSetResponder={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponder\n\t\t\t\t}\n\t\t\t\tonMoveShouldSetResponderCapture={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponderCapture\n\t\t\t\t}\n\t\t\t\tonAccessibilityEscape={ this.onCloseBottomSheet }\n\t\t\t\t// We need to prevent overwriting the onDismiss prop,\n\t\t\t\t// for this reason it is excluded from the rest object.\n\t\t\t\t{ ...omit( rest, 'onDismiss' ) }\n\t\t\t>\n\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\tbehavior={ Platform.OS === 'ios' && 'padding' }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...backgroundStyle,\n\t\t\t\t\t\tborderColor: 'rgba(0, 0, 0, 0.1)',\n\t\t\t\t\t\tmarginTop:\n\t\t\t\t\t\t\tPlatform.OS === 'ios' && isFullScreen\n\t\t\t\t\t\t\t\t? safeAreaTopInset\n\t\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tflex: isFullScreen ? 1 : undefined,\n\t\t\t\t\t\t...( Platform.OS === 'android' && isFullScreen\n\t\t\t\t\t\t\t? styles.backgroundFullScreen\n\t\t\t\t\t\t\t: {} ),\n\t\t\t\t\t\t...style,\n\t\t\t\t\t} }\n\t\t\t\t\tkeyboardVerticalOffset={ -safeAreaBottomInset }\n\t\t\t\t>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ styles.header }\n\t\t\t\t\t\tonLayout={ this.onHeaderLayout }\n\t\t\t\t\t\ttestID={ `${ rest.testID || 'bottom-sheet' }-header` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showDragIndicator() && (\n\t\t\t\t\t\t\t<View style={ styles.dragIndicator } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! hideHeader && getHeader() }\n\t\t\t\t\t</View>\n\t\t\t\t\t<WrapperView\n\t\t\t\t\t\t{ ...( hasNavigation\n\t\t\t\t\t\t\t? { style: listProps.style }\n\t\t\t\t\t\t\t: listProps ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BottomSheetProvider\n\t\t\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetScroll:\n\t\t\t\t\t\t\t\t\tthis.onShouldEnableScroll,\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetMaxHeight:\n\t\t\t\t\t\t\t\t\tthis.onShouldSetBottomSheetMaxHeight,\n\t\t\t\t\t\t\t\tisBottomSheetContentScrolling: isScrolling,\n\t\t\t\t\t\t\t\tonHandleClosingBottomSheet:\n\t\t\t\t\t\t\t\t\tthis.onHandleClosingBottomSheet,\n\t\t\t\t\t\t\t\tonHandleHardwareButtonPress:\n\t\t\t\t\t\t\t\t\tthis.onHandleHardwareButtonPress,\n\t\t\t\t\t\t\t\tlistProps,\n\t\t\t\t\t\t\t\tsetIsFullScreen: this.setIsFullScreen,\n\t\t\t\t\t\t\t\tsafeAreaBottomInset,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hasNavigation ? (\n\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<TouchableHighlight accessible={ false }>\n\t\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t\t</TouchableHighlight>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BottomSheetProvider>\n\t\t\t\t\t\t{ ! hasNavigation && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\tsafeAreaBottomInset ||\n\t\t\t\t\t\t\t\t\t\tstyles.scrollableContent.paddingBottom,\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</WrapperView>\n\t\t\t\t</KeyboardAvoidingView>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nfunction getWidth() {\n\treturn Math.min(\n\t\tDimensions.get( 'window' ).width,\n\t\tstyles.background.maxWidth\n\t);\n}\n\nconst ThemedBottomSheet = withPreferredColorScheme( BottomSheet );\n\nThemedBottomSheet.getWidth = getWidth;\nThemedBottomSheet.Button = Button;\nThemedBottomSheet.Cell = Cell;\nThemedBottomSheet.SubSheet = BottomSheetSubSheet;\nThemedBottomSheet.NavBar = NavBar;\nThemedBottomSheet.CyclePickerCell = CyclePickerCell;\nThemedBottomSheet.PickerCell = PickerCell;\nThemedBottomSheet.SwitchCell = SwitchCell;\nThemedBottomSheet.RangeCell = RangeCell;\nThemedBottomSheet.ColorCell = ColorCell;\nThemedBottomSheet.LinkCell = LinkCell;\nThemedBottomSheet.LinkSuggestionItemCell = LinkSuggestionItemCell;\nThemedBottomSheet.RadioCell = RadioCell;\nThemedBottomSheet.NavigationScreen = NavigationScreen;\nThemedBottomSheet.NavigationContainer = NavigationContainer;\n\nexport default ThemedBottomSheet;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/keyboard-avoiding-view.native.js"],"names":["Keyboard","LayoutAnimation","Platform","StyleSheet","View","Dimensions","Component","KeyboardAvoidingView","constructor","arguments","_onKeyboardChange","bind","_subscriptions","state","bottom","_relativeKeyboardHeight","keyboardFrame","windowWidth","get","width","isFloatingKeyboard","windowHeight","height","keyboardY","screenY","props","keyboardVerticalOffset","final","Math","max","event","setState","duration","easing","endCoordinates","configureNext","update","type","Types","componentDidMount","OS","addListener","componentWillUnmount","forEach","subscription","remove","render","children","enabled","style","finalStyle","bottomHeight","compose","paddingBottom","defaultProps"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,QADD,EAECC,eAFD,EAGCC,QAHD,EAICC,UAJD,EAKCC,IALD,EAMCC,UAND,QAOO,cAPP;AASA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,oBAAN,SAAmCD,SAAnC,CAA6C;AAC5CE,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AAEA,SAAKC,iBA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;AAE9BI,QAAAA,MAAM,EAAE;AACPJ,UAAAA,QADO;AAEPK,UAAAA,IAAI,EAAEpC,eAAe,CAACqC,KAAhB,CAAuBL,MAAvB,KAAmC;AAFlC;AAFsB,OAA/B;AAOA;;AACD,SAAKF,QAAL,CAAe;AAAEjB,MAAAA,MAAM,EAAEQ;AAAV,KAAf;AACA;;AAEDiB,EAAAA,iBAAiB,GAAG;AACnB,QAAKrC,QAAQ,CAACsC,EAAT,KAAgB,KAArB,EAA6B;AAC5B,WAAK5B,cAAL,GAAsB,CACrBZ,QAAQ,CAACyC,WAAT,CACC,yBADD,EAEC,KAAK/B,iBAFN,CADqB,CAAtB;AAMA;AACD;;AAEDgC,EAAAA,oBAAoB,GAAG;AACtB,SAAK9B,cAAL,CAAoB+B,OAApB,CAA+BC,YAAF,IAAoB;AAChDA,MAAAA,YAAY,CAACC,MAAb;AACA,KAFD;AAGA;;AAEDC,EAAAA,MAAM,GAAG;AACR,UAAM;
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/keyboard-avoiding-view.native.js"],"names":["Keyboard","LayoutAnimation","Platform","StyleSheet","View","Dimensions","Component","KeyboardAvoidingView","constructor","arguments","_onKeyboardChange","bind","_subscriptions","state","bottom","_relativeKeyboardHeight","keyboardFrame","windowWidth","get","width","isFloatingKeyboard","windowHeight","height","keyboardY","screenY","props","keyboardVerticalOffset","final","Math","max","event","setState","duration","easing","endCoordinates","configureNext","update","type","Types","componentDidMount","OS","addListener","componentWillUnmount","forEach","subscription","remove","render","children","enabled","style","finalStyle","bottomHeight","compose","paddingBottom","defaultProps"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,QADD,EAECC,eAFD,EAGCC,QAHD,EAICC,UAJD,EAKCC,IALD,EAMCC,UAND,QAOO,cAPP;AASA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,oBAAN,SAAmCD,SAAnC,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AArB,GAAoC;AACnCN,EAAAA,OAAO,EAAE,IAD0B;AAEnCtB,EAAAA,sBAAsB,EAAE;AAFW,CAApC;AAKA,eAAenB,oBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tKeyboard,\n\tLayoutAnimation,\n\tPlatform,\n\tStyleSheet,\n\tView,\n\tDimensions,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\n/**\n * This is a simplified version of Facebook's KeyboardAvoidingView.\n * It's meant to work specifically with BottomSheets.\n * This fixes an issue in the bottom padding calculation, when the\n * BottomSheet was presented on Landscape, with the keyboard already present,\n * and a TextField on Autofocus (situation present on Links UI)\n */\nclass KeyboardAvoidingView extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis._onKeyboardChange = this._onKeyboardChange.bind( this );\n\t\tthis._subscriptions = [];\n\t\tthis.state = {\n\t\t\tbottom: 0,\n\t\t};\n\t}\n\n\t_relativeKeyboardHeight( keyboardFrame ) {\n\t\tif ( ! keyboardFrame ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst windowWidth = Dimensions.get( 'window' ).width;\n\t\tconst isFloatingKeyboard = keyboardFrame.width !== windowWidth;\n\t\tif ( isFloatingKeyboard ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst windowHeight = Dimensions.get( 'window' ).height;\n\t\tconst keyboardY =\n\t\t\tkeyboardFrame.screenY - this.props.keyboardVerticalOffset;\n\n\t\tconst final = Math.max( windowHeight - keyboardY, 0 );\n\t\treturn final;\n\t}\n\n\t/**\n\t * @param {Object} event Keyboard event.\n\t */\n\t_onKeyboardChange( event ) {\n\t\tif ( event === null ) {\n\t\t\tthis.setState( { bottom: 0 } );\n\t\t\treturn;\n\t\t}\n\n\t\tconst { duration, easing, endCoordinates } = event;\n\t\tconst height = this._relativeKeyboardHeight( endCoordinates );\n\n\t\tif ( this.state.bottom === height ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( duration && easing ) {\n\t\t\tLayoutAnimation.configureNext( {\n\t\t\t\tduration,\n\t\t\t\tupdate: {\n\t\t\t\t\tduration,\n\t\t\t\t\ttype: LayoutAnimation.Types[ easing ] || 'keyboard',\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t\tthis.setState( { bottom: height } );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( Platform.OS === 'ios' ) {\n\t\t\tthis._subscriptions = [\n\t\t\t\tKeyboard.addListener(\n\t\t\t\t\t'keyboardWillChangeFrame',\n\t\t\t\t\tthis._onKeyboardChange\n\t\t\t\t),\n\t\t\t];\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis._subscriptions.forEach( ( subscription ) => {\n\t\t\tsubscription.remove();\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { children, enabled, keyboardVerticalOffset, style, ...props } =\n\t\t\tthis.props;\n\n\t\tlet finalStyle = style;\n\t\tif ( Platform.OS === 'ios' ) {\n\t\t\tconst bottomHeight = enabled ? this.state.bottom : 0;\n\t\t\tfinalStyle = StyleSheet.compose( style, {\n\t\t\t\tpaddingBottom: bottomHeight,\n\t\t\t} );\n\t\t}\n\n\t\treturn (\n\t\t\t<View style={ finalStyle } { ...props }>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nKeyboardAvoidingView.defaultProps = {\n\tenabled: true,\n\tkeyboardVerticalOffset: 0,\n};\n\nexport default KeyboardAvoidingView;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/picker-cell.native.js"],"names":["find","Cell","Picker","BottomSheetPickerCell","props","options","hideCancelButton","onChangeValue","value","cellProps","picker","onCellPress","presentPicker","onChange","newValue","option","label","instance"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AAEA,eAAe,SAASC,qBAAT,CAAgCC,KAAhC,EAAwC;AACtD,QAAM;
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/picker-cell.native.js"],"names":["find","Cell","Picker","BottomSheetPickerCell","props","options","hideCancelButton","onChangeValue","value","cellProps","picker","onCellPress","presentPicker","onChange","newValue","option","label","instance"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AAEA,eAAe,SAASC,qBAAT,CAAgCC,KAAhC,EAAwC;AACtD,QAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,gBAAX;AAA6BC,IAAAA,aAA7B;AAA4CC,IAAAA,KAA5C;AAAmD,OAAGC;AAAtD,MACLL,KADD;AAGA,MAAIM,MAAJ;;AAEA,QAAMC,WAAW,GAAG,MAAM;AACzBD,IAAAA,MAAM,CAACE,aAAP;AACA,GAFD;;AAIA,QAAMC,QAAQ,GAAKC,QAAF,IAAgB;AAChCP,IAAAA,aAAa,CAAEO,QAAF,CAAb;AACA,GAFD;;AAIA,QAAMC,MAAM,GAAGf,IAAI,CAAEK,OAAF,EAAW;AAAEG,IAAAA;AAAF,GAAX,CAAnB;AACA,QAAMQ,KAAK,GAAGD,MAAM,GAAGA,MAAM,CAACC,KAAV,GAAkBR,KAAtC;AAEA,SACC,cAAC,IAAD;AACC,IAAA,OAAO,EAAGG,WADX;AAEC,IAAA,QAAQ,EAAG,KAFZ;AAGC,IAAA,KAAK,EAAGK;AAHT,KAIMP,SAJN,GAMC,cAAC,MAAD;AACC,IAAA,SAAS,MADV;AAEC,IAAA,gBAAgB,EAAGH,gBAFpB;AAGC,IAAA,GAAG,EAAKW,QAAF,IAAkBP,MAAM,GAAGO,QAHlC;AAIC,IAAA,OAAO,EAAGZ,OAJX;AAKC,IAAA,QAAQ,EAAGQ;AALZ,IAND,CADD;AAgBA","sourcesContent":["/**\n * External dependencies\n */\nimport { find } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport Cell from './cell';\nimport Picker from '../picker';\n\nexport default function BottomSheetPickerCell( props ) {\n\tconst { options, hideCancelButton, onChangeValue, value, ...cellProps } =\n\t\tprops;\n\n\tlet picker;\n\n\tconst onCellPress = () => {\n\t\tpicker.presentPicker();\n\t};\n\n\tconst onChange = ( newValue ) => {\n\t\tonChangeValue( newValue );\n\t};\n\n\tconst option = find( options, { value } );\n\tconst label = option ? option.label : value;\n\n\treturn (\n\t\t<Cell\n\t\t\tonPress={ onCellPress }\n\t\t\teditable={ false }\n\t\t\tvalue={ label }\n\t\t\t{ ...cellProps }\n\t\t>\n\t\t\t<Picker\n\t\t\t\tleftAlign\n\t\t\t\thideCancelButton={ hideCancelButton }\n\t\t\t\tref={ ( instance ) => ( picker = instance ) }\n\t\t\t\toptions={ options }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t</Cell>\n\t);\n}\n"]}
|