@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
|
@@ -4,10 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getDragCursor = getDragCursor;
|
|
7
|
+
exports.useDraft = useDraft;
|
|
7
8
|
exports.useDragCursor = useDragCursor;
|
|
8
9
|
|
|
9
10
|
var _element = require("@wordpress/element");
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* External dependencies
|
|
14
|
+
*/
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* WordPress dependencies
|
|
13
18
|
*/
|
|
@@ -54,7 +59,47 @@ function useDragCursor(isDragging, dragDirection) {
|
|
|
54
59
|
// @ts-expect-error
|
|
55
60
|
document.documentElement.style.cursor = null;
|
|
56
61
|
}
|
|
57
|
-
}, [isDragging]);
|
|
62
|
+
}, [isDragging, dragCursor]);
|
|
58
63
|
return dragCursor;
|
|
59
64
|
}
|
|
65
|
+
|
|
66
|
+
function useDraft(props) {
|
|
67
|
+
const refPreviousValue = (0, _element.useRef)(props.value);
|
|
68
|
+
const [draft, setDraft] = (0, _element.useState)({});
|
|
69
|
+
const value = draft.value !== undefined ? draft.value : props.value; // Determines when to discard the draft value to restore controlled status.
|
|
70
|
+
// To do so, it tracks the previous value and marks the draft value as stale
|
|
71
|
+
// after each render.
|
|
72
|
+
|
|
73
|
+
(0, _element.useLayoutEffect)(() => {
|
|
74
|
+
const {
|
|
75
|
+
current: previousValue
|
|
76
|
+
} = refPreviousValue;
|
|
77
|
+
refPreviousValue.current = props.value;
|
|
78
|
+
if (draft.value !== undefined && !draft.isStale) setDraft({ ...draft,
|
|
79
|
+
isStale: true
|
|
80
|
+
});else if (draft.isStale && props.value !== previousValue) setDraft({});
|
|
81
|
+
}, [props.value, draft]);
|
|
82
|
+
|
|
83
|
+
const onChange = (nextValue, extra) => {
|
|
84
|
+
// Mutates the draft value to avoid an extra effect run.
|
|
85
|
+
setDraft(current => Object.assign(current, {
|
|
86
|
+
value: nextValue,
|
|
87
|
+
isStale: false
|
|
88
|
+
}));
|
|
89
|
+
props.onChange(nextValue, extra);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const onBlur = event => {
|
|
93
|
+
var _props$onBlur;
|
|
94
|
+
|
|
95
|
+
setDraft({});
|
|
96
|
+
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props, event);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
value,
|
|
101
|
+
onBlur,
|
|
102
|
+
onChange
|
|
103
|
+
};
|
|
104
|
+
}
|
|
60
105
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/input-control/utils.ts"],"names":["getDragCursor","dragDirection","dragCursor","useDragCursor","isDragging","document","documentElement","style","cursor"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/input-control/utils.ts"],"names":["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":";;;;;;;;;AAQA;;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,aAAT,CAAwBC,aAAxB,EAAwD;AAC9D,MAAIC,UAAU,GAAG,WAAjB;;AAEA,UAASD,aAAT;AACC,SAAK,GAAL;AACA,SAAK,GAAL;AACCC,MAAAA,UAAU,GAAG,WAAb;AACA;;AAED,SAAK,GAAL;AACA,SAAK,GAAL;AACCA,MAAAA,UAAU,GAAG,WAAb;AACA;AATF;;AAYA,SAAOA,UAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,aAAT,CACNC,UAD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P,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"]}
|
|
@@ -9,16 +9,10 @@ exports.default = MenuItemsChoice;
|
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
12
|
-
var _lodash = require("lodash");
|
|
13
|
-
|
|
14
12
|
var _icons = require("@wordpress/icons");
|
|
15
13
|
|
|
16
14
|
var _menuItem = _interopRequireDefault(require("../menu-item"));
|
|
17
15
|
|
|
18
|
-
/**
|
|
19
|
-
* External dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
16
|
/**
|
|
23
17
|
* WordPress dependencies
|
|
24
18
|
*/
|
|
@@ -26,10 +20,12 @@ var _menuItem = _interopRequireDefault(require("../menu-item"));
|
|
|
26
20
|
/**
|
|
27
21
|
* Internal dependencies
|
|
28
22
|
*/
|
|
23
|
+
const noop = () => {};
|
|
24
|
+
|
|
29
25
|
function MenuItemsChoice(_ref) {
|
|
30
26
|
let {
|
|
31
27
|
choices = [],
|
|
32
|
-
onHover =
|
|
28
|
+
onHover = noop,
|
|
33
29
|
onSelect,
|
|
34
30
|
value
|
|
35
31
|
} = _ref;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/menu-items-choice/index.js"],"names":["MenuItemsChoice","choices","onHover","
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/menu-items-choice/index.js"],"names":["noop","MenuItemsChoice","choices","onHover","onSelect","value","map","item","isSelected","check","info","shortcut","label"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEe,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,4BAAC,iBAAD;AACC,MAAA,GAAG,EAAGE,IAAI,CAACF,KADZ;AAEC,MAAA,IAAI,EAAC,eAFN;AAGC,MAAA,IAAI,EAAGG,UAAU,IAAIC,YAHtB;AAIC,MAAA,IAAI,EAAGF,IAAI,CAACG,IAJb;AAKC,MAAA,UAAU,EAAGF,UALd;AAMC,MAAA,QAAQ,EAAGD,IAAI,CAACI,QANjB;AAOC,MAAA,SAAS,EAAC,8BAPX;AAQC,MAAA,OAAO,EAAG,MAAM;AACf,YAAK,CAAEH,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,CAACK,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","OS","UIManager","setLayoutAnimationEnabledExperimental","BottomSheetContext","isBottomSheetContentScrolling","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","onHandleClosingBottomSheet","onHandleHardwareButtonPress","setIsFullScreen","Provider","BottomSheetProvider","Consumer","BottomSheetConsumer"],"mappings":";;;;;;;AAGA;;AAIA;;AAPA;AACA;AACA;;AAEA;AACA;AACA;AAGA;AACA;AACA,IACCA,sBAASC,EAAT,KAAgB,SAAhB,IACAC,uBAAUC,qCAFX,EAGE;AACDD,yBAAUC,qCAAV,CAAiD,IAAjD;AACA,C,CAED;AACA;;;AACO,MAAMC,kBAAkB,GAAG,4BAAe;AAChD;AACAC,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,CAA3B;;AAkBA,MAAM;
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-context.native.js"],"names":["Platform","OS","UIManager","setLayoutAnimationEnabledExperimental","BottomSheetContext","isBottomSheetContentScrolling","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","onHandleClosingBottomSheet","onHandleHardwareButtonPress","setIsFullScreen","Provider","BottomSheetProvider","Consumer","BottomSheetConsumer"],"mappings":";;;;;;;AAGA;;AAIA;;AAPA;AACA;AACA;;AAEA;AACA;AACA;AAGA;AACA;AACA,IACCA,sBAASC,EAAT,KAAgB,SAAhB,IACAC,uBAAUC,qCAFX,EAGE;AACDD,yBAAUC,qCAAV,CAAiD,IAAjD;AACA,C,CAED;AACA;;;AACO,MAAMC,kBAAkB,GAAG,4BAAe;AAChD;AACAC,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,CAA3B;;AAkBA,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":["isIOS","Platform","OS","BottomSheetCell","Component","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","AccessibilityInfo","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","styles","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","platformStyles","separatorMarginLeft","getValueComponent","styleRTL","I18nManager","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","check","placeholderColor"],"mappings":";;;;;;;;;AAmBA;;;;AAhBA;;AASA;;AAKA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AA5BA;AACA;A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,MAAA,OAAO,EAAG6D,OADX;AAEC,MAAA,iBAAiB,EAAG;AAFrB,OAIC,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGR;AAAd,OACGO,KADH,CAJD,CAlDF,CAJD,EAgEGhE,UAAU,IACX,4BAAC,gBAAD;AACC,MAAA,IAAI,EAAGuE,YADR;AAEC,MAAA,IAAI,EAAG7B,oBAAe1C,UAAf,CAA0BqE;AAFlC,MAjEF,EAsEG7D,SAAS,IAAIoC,iBAAiB,EAtEjC,EAuEG9C,QAvEH,CAtBD,EA+FGQ,IAAI,IACL,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAG,CAAEsD,aAAF,EAAiBhD,gBAAO4D,gBAAxB;AAAd,OACGlE,IADH,CAhGF,EAoGG,CAAEoB,gBAAF,IAAsB,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MApGzB,CADD;AAwGA;;AAjZsC;;eAoZzB,uCAA0BhF,eAA1B,C","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":["isIOS","Platform","OS","BottomSheetCell","Component","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","AccessibilityInfo","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","styles","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","platformStyles","separatorMarginLeft","getValueComponent","styleRTL","I18nManager","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","check","placeholderColor"],"mappings":";;;;;;;;;AAmBA;;;;AAhBA;;AASA;;AAKA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AA5BA;AACA;AACA;;AAYA;AACA;AACA;;AAOA;AACA;AACA;AAKA,MAAMA,KAAK,GAAGC,sBAASC,EAAT,KAAgB,KAA9B;;AACA,MAAMC,eAAN,SAA8BC,kBAA9B,CAAwC;AACvCC,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,yBAAL,CAA+BC,IAA/B,CAAqC,IAArC,CADD;AAGA,SAAKC,SAAL,GAAiB,KAAjB;AACA;;AAEDC,EAAAA,kBAAkB,CAAEC,SAAF,EAAaC,SAAb,EAAyB;AAC1C,QAAK,CAAEA,SAAS,CAACR,cAAZ,IAA8B,KAAKD,KAAL,CAAWC,cAA9C,EAA+D;AAC9D,WAAKS,eAAL,CAAqBC,KAArB;AACA;AACD;;AAEDC,EAAAA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{\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"]}
|
|
@@ -11,14 +11,8 @@ var _element = require("@wordpress/element");
|
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
14
|
-
var _lodash = require("lodash");
|
|
15
|
-
|
|
16
14
|
var _cell = _interopRequireDefault(require("./cell"));
|
|
17
15
|
|
|
18
|
-
/**
|
|
19
|
-
* External dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
16
|
/**
|
|
23
17
|
* Internal dependencies
|
|
24
18
|
*/
|
|
@@ -34,7 +28,7 @@ function BottomSheetCyclePickerCell(props) {
|
|
|
34
28
|
return options[(selectedOptionIndex + 1) % options.length].value;
|
|
35
29
|
};
|
|
36
30
|
|
|
37
|
-
const selectedOptionIndex =
|
|
31
|
+
const selectedOptionIndex = options.findIndex(option => option.value === value);
|
|
38
32
|
const optionsContainsValue = options.length > 0 && selectedOptionIndex !== -1;
|
|
39
33
|
return (0, _element.createElement)(_cell.default, (0, _extends2.default)({
|
|
40
34
|
onPress: () => optionsContainsValue && onChangeValue(nextOptionValue()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cycle-picker-cell.native.js"],"names":["BottomSheetCyclePickerCell","props","value","options","onChangeValue","cellProps","nextOptionValue","selectedOptionIndex","length","optionsContainsValue","name"],"mappings":";;;;;;;;;;;;;AAGA;;
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cycle-picker-cell.native.js"],"names":["BottomSheetCyclePickerCell","props","value","options","onChangeValue","cellProps","nextOptionValue","selectedOptionIndex","length","findIndex","option","optionsContainsValue","name"],"mappings":";;;;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGe,SAASA,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,4BAAC,aAAD;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":["DEFAULT_LAYOUT_ANIMATION","LayoutAnimation","Presets","easeInEaseOut","BottomSheet","Component","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","Platform","OS","componentDidMount","SafeArea","getSafeAreaInsetsForRootView","then","androidModalClosedSubscription","onClose","dimensionsChangeSubscription","Dimensions","addEventListener","keyboardShowListener","Keyboard","addListener","keyboardHideListener","safeAreaEventSubscription","componentWillUnmount","remove","result","safeAreaInsets","bottom","top","setState","width","get","statusBarHeight","StatusBar","currentHeight","maxHeightWithOpenKeyboard","Math","min","nativeEvent","layout","round","isCloseToBottom","layoutMeasurement","contentOffset","contentSize","y","isCloseToTop","value","action","getContentStyle","paddingBottom","styles","scrollableContent","render","title","leftButton","rightButton","header","hideHeader","style","contentStyle","getStylesFromColorScheme","children","withHeaderSeparator","hasNavigation","rest","panResponder","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","View","ScrollView","getHeader","bottomSheetHeader","flex","separator","showDragIndicator","allowDragIndicator","bottomModal","undefined","panHandlers","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","borderColor","marginTop","backgroundFullScreen","testID","dragIndicator","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","getWidth","maxWidth","ThemedBottomSheet","Button","Cell","SubSheet","BottomSheetSubSheet","NavBar","CyclePickerCell","PickerCell","SwitchCell","RangeCell","ColorCell","LinkCell","LinkSuggestionItemCell","RadioCell","NavigationScreen","NavigationContainer"],"mappings":";;;;;;;;;AAuBA;;;;AApBA;;AAYA;;AACA;;AACA;;AAKA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AA7CA;AACA;AACA;;AAiBA;AACA;AACA;;AAKA;AACA;AACA;AAmBA,MAAMA,wBAAwB,GAAGC,6BAAgBC,OAAhB,CAAwBC,aAAzD;;AAEA,MAAMC,WAAN,SAA0BC,kBAA1B,CAAoC;AACnCC,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AACA,SAAKC,sBAAL,GAA8B,KAAKA,sBAAL,CAA4BC,IAA5B,CAAkC,IAAlC,CAA9B;AACA,SAAKC,QAAL,GAAgB,KAAKA,QAAL,CAAcD,IAAd,CAAoB,IAApB,CAAhB;AACA,SAAKE,WAAL,GAAmB,KAAKA,WAAL,CAAiBF,IAAjB,CAAuB,IAAvB,CAAnB;AACA,SAAKG,oBAAL,GAA4B,KAAKA,oBAAL,CAA0BH,IAA1B,CAAgC,IAAhC,CAA5B;AACA,SAAKI,SAAL,GAAiB,KAAKA,SAAL,CAAeJ,IAAf,CAAqB,IAArB,CAAjB;AACA,SAAKK,+BAAL,GAAuC,KAAKA,+BAAL,CAAqCL,IAArC,CACtC,IADsC,CAAvC;AAIA,SAAKM,eAAL,GAAuB,KAAKA,eAAL,CAAqBN,IAArB,CAA2B,IAA3B,CAAvB;AAEA,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\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":["DEFAULT_LAYOUT_ANIMATION","LayoutAnimation","Presets","easeInEaseOut","BottomSheet","Component","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","Platform","OS","componentDidMount","SafeArea","getSafeAreaInsetsForRootView","then","androidModalClosedSubscription","onClose","dimensionsChangeSubscription","Dimensions","addEventListener","keyboardShowListener","Keyboard","addListener","keyboardHideListener","safeAreaEventSubscription","componentWillUnmount","remove","result","safeAreaInsets","bottom","top","setState","width","get","statusBarHeight","StatusBar","currentHeight","maxHeightWithOpenKeyboard","Math","min","nativeEvent","layout","round","isCloseToBottom","layoutMeasurement","contentOffset","contentSize","y","isCloseToTop","value","action","getContentStyle","paddingBottom","styles","scrollableContent","render","title","leftButton","rightButton","header","hideHeader","style","contentStyle","getStylesFromColorScheme","children","withHeaderSeparator","hasNavigation","rest","panResponder","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","View","ScrollView","getHeader","bottomSheetHeader","flex","separator","showDragIndicator","allowDragIndicator","bottomModal","undefined","panHandlers","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","borderColor","marginTop","backgroundFullScreen","testID","dragIndicator","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","getWidth","maxWidth","ThemedBottomSheet","Button","Cell","SubSheet","BottomSheetSubSheet","NavBar","CyclePickerCell","PickerCell","SwitchCell","RangeCell","ColorCell","LinkCell","LinkSuggestionItemCell","RadioCell","NavigationScreen","NavigationContainer"],"mappings":";;;;;;;;;AAuBA;;;;AApBA;;AAYA;;AACA;;AACA;;AAKA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;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C,QAFZ,CAAP;AAIA;;AAED,MAAMC,iBAAiB,GAAG,uCAA0BxK,WAA1B,CAA1B;AAEAwK,iBAAiB,CAACF,QAAlB,GAA6BA,QAA7B;AACAE,iBAAiB,CAACC,MAAlB,GAA2BA,eAA3B;AACAD,iBAAiB,CAACE,IAAlB,GAAyBA,aAAzB;AACAF,iBAAiB,CAACG,QAAlB,GAA6BC,iBAA7B;AACAJ,iBAAiB,CAACK,MAAlB,GAA2BA,eAA3B;AACAL,iBAAiB,CAACM,eAAlB,GAAoCA,wBAApC;AACAN,iBAAiB,CAACO,UAAlB,GAA+BA,mBAA/B;AACAP,iBAAiB,CAACQ,UAAlB,GAA+BA,mBAA/B;AACAR,iBAAiB,CAACS,SAAlB,GAA8BA,kBAA9B;AACAT,iBAAiB,CAACU,SAAlB,GAA8BA,kBAA9B;AACAV,iBAAiB,CAACW,QAAlB,GAA6BA,iBAA7B;AACAX,iBAAiB,CAACY,sBAAlB,GAA2CA,+BAA3C;AACAZ,iBAAiB,CAACa,SAAlB,GAA8BA,kBAA9B;AACAb,iBAAiB,CAACc,gBAAlB,GAAqCA,yBAArC;AACAd,iBAAiB,CAACe,mBAAlB,GAAwCA,4BAAxC;eAEef,iB","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":["KeyboardAvoidingView","Component","constructor","arguments","_onKeyboardChange","bind","_subscriptions","state","bottom","_relativeKeyboardHeight","keyboardFrame","windowWidth","Dimensions","get","width","isFloatingKeyboard","windowHeight","height","keyboardY","screenY","props","keyboardVerticalOffset","final","Math","max","event","setState","duration","easing","endCoordinates","LayoutAnimation","configureNext","update","type","Types","componentDidMount","Platform","OS","Keyboard","addListener","componentWillUnmount","forEach","subscription","remove","render","children","enabled","style","finalStyle","bottomHeight","StyleSheet","compose","paddingBottom","defaultProps"],"mappings":";;;;;;;;;AAeA;;;;AAZA;;AAHA;AACA;AACA;;AAUA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,oBAAN,SAAmCC,kBAAnC,CAA6C;AAC5CC,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AAEA,SAAKC,iBAAL,GAAyB,KAAKA,iBAAL,CAAuBC,IAAvB,CAA6B,IAA7B,CAAzB;AACA,SAAKC,cAAL,GAAsB,EAAtB;AACA,SAAKC,KAAL,GAAa;AACZC,MAAAA,MAAM,EAAE;AADI,KAAb;AAGA;;AAEDC,EAAAA,uBAAuB,CAAEC,aAAF,EAAkB;AACxC,QAAK,CAAEA,aAAP,EAAuB;AACtB,aAAO,CAAP;AACA;;AAED,UAAMC,WAAW,GAAGC,wBAAWC,GAAX,CAAgB,QAAhB,EAA2BC,KAA/C;;AACA,UAAMC,kBAAkB,GAAGL,aAAa,CA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ACD;;AAEDoC,EAAAA,oBAAoB,GAAG;AACtB,SAAKlC,cAAL,CAAoBmC,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":["KeyboardAvoidingView","Component","constructor","arguments","_onKeyboardChange","bind","_subscriptions","state","bottom","_relativeKeyboardHeight","keyboardFrame","windowWidth","Dimensions","get","width","isFloatingKeyboard","windowHeight","height","keyboardY","screenY","props","keyboardVerticalOffset","final","Math","max","event","setState","duration","easing","endCoordinates","LayoutAnimation","configureNext","update","type","Types","componentDidMount","Platform","OS","Keyboard","addListener","componentWillUnmount","forEach","subscription","remove","render","children","enabled","style","finalStyle","bottomHeight","StyleSheet","compose","paddingBottom","defaultProps"],"mappings":";;;;;;;;;AAeA;;;;AAZA;;AAHA;AACA;AACA;;AAUA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,oBAAN,SAAmCC,kBAAnC,CAA6C;AAC5CC,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AAEA,SAAKC,iBAAL,GAAyB,KAAKA,iBAAL,CAAuBC,IAAvB,CAA6B,IAA7B,CAAzB;AACA,SAAKC,cAAL,GAAsB,EAAtB;AACA,SAAKC,KAAL,GAAa;AACZC,MAAAA,MAAM,EAAE;AADI,KAAb;AAGA;;AAEDC,EAAAA,uBAAuB,CAAEC,aAAF,EAAkB;AACxC,QAAK,CAAEA,aAAP,EAAuB;AACtB,aAAO,CAAP;AACA;;AAED,UAAMC,WAAW,GAAGC,wBAAWC,GAAX,CAAgB,QAAhB,EAA2BC,KAA/C;;AACA,UAAMC,kBAAkB,GAAGL,aAAa,CAACI,KAAd,KAAwBH,WAAnD;;AACA,QAAKI,kBAAL,EAA0B;AACzB,aAAO,CAAP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,CAA+BC,YAAF,IAAoB;AAChDA,MAAAA,YAAY,CAACC,MAAb;AACA,KAFD;AAGA;;AAEDC,EAAAA,MAAM,GAAG;AACR,UAAM;AAAEC,MAAAA,QAAF;AAAYC,MAAAA,OAAZ;AAAqBzB,MAAAA,sBAArB;AAA6C0B,MAAAA,KAA7C;AAAoD,SAAG3B;AAAvD,QACL,KAAKA,KADN;AAGA,QAAI4B,UAAU,GAAGD,KAAjB;;AACA,QAAKX,sBAASC,EAAT,KAAgB,KAArB,EAA6B;AAC5B,YAAMY,YAAY,GAAGH,OAAO,GAAG,KAAKvC,KAAL,CAAWC,MAAd,GAAuB,CAAnD;AACAwC,MAAAA,UAAU,GAAGE,wBAAWC,OAAX,CAAoBJ,KAApB,EAA2B;AACvCK,QAAAA,aAAa,EAAEH;AADwB,OAA3B,CAAb;AAGA;;AAED,WACC,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGD;AAAd,OAAgC5B,KAAhC,GACGyB,QADH,CADD;AAKA;;AA5F2C;;AA+F7C7C,oBAAoB,CAACqD,YAArB,GAAoC;AACnCP,EAAAA,OAAO,EAAE,IAD0B;AAEnCzB,EAAAA,sBAAsB,EAAE;AAFW,CAApC;eAKerB,oB","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":["BottomSheetPickerCell","props","options","hideCancelButton","onChangeValue","value","cellProps","picker","onCellPress","presentPicker","onChange","newValue","option","label","instance"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIe,SAASA,qBAAT,CAAgCC,KAAhC,EAAwC;AACtD,QAAM;
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/picker-cell.native.js"],"names":["BottomSheetPickerCell","props","options","hideCancelButton","onChangeValue","value","cellProps","picker","onCellPress","presentPicker","onChange","newValue","option","label","instance"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIe,SAASA,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,GAAG,kBAAMV,OAAN,EAAe;AAAEG,IAAAA;AAAF,GAAf,CAAf;AACA,QAAMQ,KAAK,GAAGD,MAAM,GAAGA,MAAM,CAACC,KAAV,GAAkBR,KAAtC;AAEA,SACC,4BAAC,aAAD;AACC,IAAA,OAAO,EAAGG,WADX;AAEC,IAAA,QAAQ,EAAG,KAFZ;AAGC,IAAA,KAAK,EAAGK;AAHT,KAIMP,SAJN,GAMC,4BAAC,eAAD;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"]}
|