@wordpress/components 19.13.0 → 19.16.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 +139 -12
- 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 +4 -2
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js +9 -3
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js +5 -1
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/autocomplete/index.js +9 -3
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/styles/base-control-styles.js +8 -8
- package/build/base-control/styles/base-control-styles.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-split-controls/component.js +2 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-control/border-control/component.js +78 -29
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +4 -7
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +13 -7
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/hook.js +0 -4
- package/build/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build/border-control/styles.js +33 -56
- package/build/border-control/styles.js.map +1 -1
- package/build/box-control/axial-input-controls.js +1 -1
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/index.js +1 -1
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/utils.js +5 -11
- package/build/box-control/utils.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 +16 -3
- package/build/color-palette/index.js.map +1 -1
- package/build/color-picker/component.js +6 -9
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js +7 -5
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/index.native.js +35 -34
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/input-with-slider.js +7 -5
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/styles.js +42 -43
- package/build/color-picker/styles.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js +22 -31
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/combobox-control/index.js +19 -13
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/styles.js +39 -0
- package/build/combobox-control/styles.js.map +1 -0
- 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-select-control/index.js +26 -8
- package/build/custom-select-control/index.js.map +1 -1
- package/build/date-time/date/index.js +3 -1
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date-time/index.js +3 -1
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/divider/component.js +0 -1
- package/build/divider/component.js.map +1 -1
- package/build/divider/index.js.map +1 -1
- package/build/divider/styles.js +5 -5
- package/build/divider/styles.js.map +1 -1
- package/build/dropdown/dropdown-content-wrapper.js +60 -0
- package/build/dropdown/dropdown-content-wrapper.js.map +1 -0
- package/build/dropdown/styles.js +42 -0
- package/build/dropdown/styles.js.map +1 -0
- package/build/dropdown/types.js +6 -0
- package/build/dropdown/types.js.map +1 -0
- package/build/dropdown-menu/index.js +5 -5
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +5 -5
- 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/component.js +15 -15
- package/build/elevation/component.js.map +1 -1
- package/build/elevation/hook.js +15 -27
- package/build/elevation/hook.js.map +1 -1
- package/build/elevation/index.js.map +1 -1
- package/build/elevation/styles.js +1 -1
- package/build/elevation/styles.js.map +1 -1
- package/build/external-link/index.js +1 -3
- package/build/external-link/index.js.map +1 -1
- package/build/flex/flex/component.js +11 -17
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex-block/component.js +9 -3
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-item/component.js +9 -3
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/focal-point-picker/grid.js +2 -7
- package/build/focal-point-picker/grid.js.map +1 -1
- package/build/focal-point-picker/index.native.js +12 -12
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +11 -12
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/form-toggle/index.js +28 -5
- 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 +22 -7
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/styles.js +40 -0
- package/build/form-token-field/styles.js.map +1 -0
- package/build/form-token-field/suggestions-list.js +2 -7
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/grid/component.js +7 -8
- package/build/grid/component.js.map +1 -1
- package/build/grid/hook.js +1 -5
- package/build/grid/hook.js.map +1 -1
- package/build/grid/index.js.map +1 -1
- package/build/grid/utils.js +4 -7
- package/build/grid/utils.js.map +1 -1
- package/build/h-stack/component.js +5 -9
- package/build/h-stack/component.js.map +1 -1
- package/build/h-stack/hook.js +8 -10
- package/build/h-stack/hook.js.map +1 -1
- package/build/h-stack/index.js.map +1 -1
- package/build/h-stack/utils.js +8 -19
- 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/icon/index.js.map +1 -1
- package/build/index.js +24 -0
- package/build/index.js.map +1 -1
- package/build/input-control/index.js +7 -0
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +23 -1
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-prefix-wrapper.js +54 -0
- package/build/input-control/input-prefix-wrapper.js.map +1 -0
- package/build/input-control/input-suffix-wrapper.js +54 -0
- package/build/input-control/input-suffix-wrapper.js.map +1 -0
- package/build/input-control/styles/input-control-styles.js +61 -42
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/menu-item/index.js +1 -3
- package/build/menu-item/index.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/focal-point-settings-panel/index.native.js +1 -1
- package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build/mobile/image/index.native.js +9 -4
- package/build/mobile/image/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/media-edit/index.native.js +1 -7
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +2 -4
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/modal/index.js +17 -3
- package/build/modal/index.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 +4 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/base.js +6 -3
- package/build/navigation/item/base.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/popover/index.js +17 -14
- package/build/popover/index.js.map +1 -1
- package/build/radio-control/index.js +1 -3
- package/build/radio-control/index.js.map +1 -1
- package/build/range-control/index.js +57 -43
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/input-range.js +5 -7
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/mark.js +5 -7
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/rail.js +10 -16
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +62 -62
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/range-control/tooltip.js +5 -7
- package/build/range-control/tooltip.js.map +1 -1
- package/build/range-control/types.js +6 -0
- package/build/range-control/types.js.map +1 -0
- package/build/range-control/utils.js +21 -32
- package/build/range-control/utils.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +2 -7
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.native.js +13 -2
- package/build/sandbox/index.native.js.map +1 -1
- package/build/scroll-lock/index.js +35 -6
- package/build/scroll-lock/index.js.map +1 -1
- package/build/scrollable/component.js +7 -8
- package/build/scrollable/component.js.map +1 -1
- package/build/scrollable/hook.js +0 -8
- package/build/scrollable/hook.js.map +1 -1
- package/build/scrollable/index.js.map +1 -1
- package/build/scrollable/styles.js +7 -7
- package/build/scrollable/styles.js.map +1 -1
- package/build/select-control/index.js +1 -3
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +31 -11
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/shortcut/index.js +6 -21
- package/build/shortcut/index.js.map +1 -1
- package/build/shortcut/types.js +6 -0
- package/build/shortcut/types.js.map +1 -0
- package/build/slot-fill/index.native.js +6 -8
- package/build/slot-fill/index.native.js.map +1 -1
- package/build/slot-fill/provider.js +4 -8
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +4 -8
- package/build/slot-fill/slot.js.map +1 -1
- package/build/spacer/component.js +8 -6
- package/build/spacer/component.js.map +1 -1
- package/build/spacer/hook.js +2 -2
- package/build/spacer/hook.js.map +1 -1
- package/build/spacer/index.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/text-highlight/index.js +22 -5
- package/build/text-highlight/index.js.map +1 -1
- package/build/text-highlight/types.js +6 -0
- package/build/text-highlight/types.js.map +1 -0
- package/build/tip/index.js +5 -11
- package/build/tip/index.js.map +1 -1
- package/build/tip/types.js +6 -0
- package/build/tip/types.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/component.js +4 -1
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +20 -4
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +7 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toolbar-group/index.js +3 -3
- package/build/toolbar-group/index.js.map +1 -1
- package/build/tooltip/index.js +51 -14
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-select/index.js +4 -4
- package/build/tree-select/index.js.map +1 -1
- 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/context/use-context-system.js +7 -2
- package/build/ui/context/use-context-system.js.map +1 -1
- package/build/ui/utils/get-valid-children.js.map +1 -1
- package/build/ui/utils/space.js +7 -1
- package/build/ui/utils/space.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +10 -26
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/utils/math.js +17 -7
- package/build/utils/math.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/visually-hidden/component.js +12 -13
- package/build/visually-hidden/component.js.map +1 -1
- package/build/visually-hidden/index.js.map +1 -1
- package/build/visually-hidden/styles.js +3 -1
- package/build/visually-hidden/styles.js.map +1 -1
- package/build/visually-hidden/types.js +6 -0
- package/build/visually-hidden/types.js.map +1 -0
- 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 +2 -2
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +4 -2
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +9 -3
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +3 -2
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/autocomplete/index.js +7 -4
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/styles/base-control-styles.js +8 -8
- package/build-module/base-control/styles/base-control-styles.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-split-controls/component.js +2 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-control/border-control/component.js +75 -28
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js +4 -7
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +12 -7
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/hook.js +0 -4
- package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build-module/border-control/styles.js +33 -49
- package/build-module/border-control/styles.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +1 -1
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/index.js +1 -1
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/utils.js +5 -10
- package/build-module/box-control/utils.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 +12 -2
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-picker/component.js +7 -8
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js +6 -4
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/index.native.js +36 -35
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +7 -5
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/styles.js +29 -39
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js +22 -31
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/combobox-control/index.js +19 -13
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/styles.js +27 -0
- package/build-module/combobox-control/styles.js.map +1 -0
- 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-select-control/index.js +26 -10
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/date-time/date/index.js +3 -1
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date-time/index.js +3 -1
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/divider/component.js +0 -1
- package/build-module/divider/component.js.map +1 -1
- package/build-module/divider/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/dropdown/dropdown-content-wrapper.js +47 -0
- package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -0
- package/build-module/dropdown/styles.js +31 -0
- package/build-module/dropdown/styles.js.map +1 -0
- package/build-module/dropdown/types.js +2 -0
- package/build-module/dropdown/types.js.map +1 -0
- package/build-module/dropdown-menu/index.js +5 -4
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +5 -4
- 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/component.js +15 -15
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/elevation/hook.js +14 -26
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/elevation/index.js.map +1 -1
- package/build-module/elevation/styles.js +1 -1
- package/build-module/elevation/styles.js.map +1 -1
- package/build-module/external-link/index.js +1 -2
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/flex/flex/component.js +11 -17
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex-block/component.js +9 -3
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-item/component.js +9 -3
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/focal-point-picker/grid.js +2 -6
- package/build-module/focal-point-picker/grid.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +9 -9
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +11 -12
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/form-toggle/index.js +30 -6
- 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 +20 -6
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/styles.js +28 -0
- package/build-module/form-token-field/styles.js.map +1 -0
- package/build-module/form-token-field/suggestions-list.js +2 -7
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/grid/component.js +7 -8
- package/build-module/grid/component.js.map +1 -1
- package/build-module/grid/hook.js +1 -5
- package/build-module/grid/hook.js.map +1 -1
- package/build-module/grid/index.js.map +1 -1
- package/build-module/grid/utils.js +3 -8
- package/build-module/grid/utils.js.map +1 -1
- package/build-module/h-stack/component.js +3 -7
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/h-stack/hook.js +10 -12
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/h-stack/index.js.map +1 -1
- package/build-module/h-stack/utils.js +8 -20
- 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/icon/index.js.map +1 -1
- package/build-module/index.js +3 -0
- package/build-module/index.js.map +1 -1
- package/build-module/input-control/index.js +6 -0
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +24 -3
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-prefix-wrapper.js +41 -0
- package/build-module/input-control/input-prefix-wrapper.js.map +1 -0
- package/build-module/input-control/input-suffix-wrapper.js +41 -0
- package/build-module/input-control/input-suffix-wrapper.js.map +1 -0
- package/build-module/input-control/styles/input-control-styles.js +57 -41
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/menu-item/index.js +1 -2
- package/build-module/menu-item/index.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/focal-point-settings-panel/index.native.js +2 -2
- package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +10 -6
- package/build-module/mobile/image/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/media-edit/index.native.js +1 -6
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +2 -3
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/modal/index.js +19 -5
- package/build-module/modal/index.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 +4 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/base.js +5 -2
- package/build-module/navigation/item/base.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/popover/index.js +17 -14
- package/build-module/popover/index.js.map +1 -1
- package/build-module/radio-control/index.js +1 -2
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/range-control/index.js +55 -41
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/input-range.js +5 -6
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/mark.js +5 -6
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js +10 -15
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +62 -64
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/range-control/tooltip.js +5 -6
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/range-control/types.js +2 -0
- package/build-module/range-control/types.js.map +1 -0
- package/build-module/range-control/utils.js +22 -33
- package/build-module/range-control/utils.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +2 -6
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.native.js +13 -3
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/scroll-lock/index.js +32 -6
- package/build-module/scroll-lock/index.js.map +1 -1
- package/build-module/scrollable/component.js +7 -8
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/scrollable/hook.js +0 -8
- package/build-module/scrollable/hook.js.map +1 -1
- package/build-module/scrollable/index.js.map +1 -1
- package/build-module/scrollable/styles.js +7 -7
- package/build-module/scrollable/styles.js.map +1 -1
- package/build-module/select-control/index.js +1 -2
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +31 -11
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/shortcut/index.js +6 -20
- package/build-module/shortcut/index.js.map +1 -1
- package/build-module/shortcut/types.js +2 -0
- package/build-module/shortcut/types.js.map +1 -0
- package/build-module/slot-fill/index.native.js +6 -7
- package/build-module/slot-fill/index.native.js.map +1 -1
- package/build-module/slot-fill/provider.js +4 -7
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +4 -7
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/spacer/component.js +6 -5
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spacer/hook.js +2 -2
- package/build-module/spacer/hook.js.map +1 -1
- package/build-module/spacer/index.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/text-highlight/index.js +23 -6
- package/build-module/text-highlight/index.js.map +1 -1
- package/build-module/text-highlight/types.js +2 -0
- package/build-module/text-highlight/types.js.map +1 -0
- package/build-module/tip/index.js +6 -10
- package/build-module/tip/index.js.map +1 -1
- package/build-module/tip/types.js +2 -0
- package/build-module/tip/types.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/component.js +4 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +15 -3
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +6 -7
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toolbar-group/index.js +3 -2
- package/build-module/toolbar-group/index.js.map +1 -1
- package/build-module/tooltip/index.js +53 -16
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-select/index.js +5 -5
- package/build-module/tree-select/index.js.map +1 -1
- 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/context/use-context-system.js +7 -2
- package/build-module/ui/context/use-context-system.js.map +1 -1
- package/build-module/ui/utils/get-valid-children.js.map +1 -1
- package/build-module/ui/utils/space.js +7 -1
- package/build-module/ui/utils/space.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +10 -27
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/utils/math.js +15 -6
- package/build-module/utils/math.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/visually-hidden/component.js +12 -13
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/visually-hidden/index.js.map +1 -1
- package/build-module/visually-hidden/styles.js +3 -1
- package/build-module/visually-hidden/styles.js.map +1 -1
- package/build-module/visually-hidden/types.js +2 -0
- package/build-module/visually-hidden/types.js.map +1 -0
- package/build-style/style-rtl.css +41 -45
- package/build-style/style.css +41 -43
- package/build-types/base-control/styles/base-control-styles.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-split-controls/component.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 +2 -2
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +0 -1
- package/build-types/border-control/border-control-dropdown/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/border-control/styles.d.ts +1 -4
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +1 -1
- 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/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/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +47 -31
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/types.d.ts +6 -0
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/divider/component.d.ts +2 -3
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/index.d.ts +1 -1
- package/build-types/divider/index.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +6 -2
- package/build-types/divider/styles.d.ts.map +1 -1
- package/build-types/divider/test/index.d.ts +2 -0
- package/build-types/divider/test/index.d.ts.map +1 -0
- package/build-types/divider/types.d.ts +18 -10
- package/build-types/divider/types.d.ts.map +1 -1
- package/build-types/dropdown/dropdown-content-wrapper.d.ts +23 -0
- package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -0
- package/build-types/dropdown/styles.d.ts +7 -0
- package/build-types/dropdown/styles.d.ts.map +1 -0
- package/build-types/dropdown/types.d.ts +9 -0
- package/build-types/dropdown/types.d.ts.map +1 -0
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/elevation/component.d.ts +11 -10
- package/build-types/elevation/component.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +6 -7
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/elevation/index.d.ts +2 -2
- package/build-types/elevation/index.d.ts.map +1 -1
- package/build-types/elevation/stories/index.d.ts +22 -0
- package/build-types/elevation/stories/index.d.ts.map +1 -0
- package/build-types/elevation/styles.d.ts +1 -1
- package/build-types/elevation/styles.d.ts.map +1 -1
- package/build-types/elevation/test/index.d.ts +2 -0
- package/build-types/elevation/test/index.d.ts.map +1 -0
- package/build-types/elevation/types.d.ts +12 -19
- package/build-types/elevation/types.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/flex/flex/component.d.ts +11 -17
- package/build-types/flex/flex/component.d.ts.map +1 -1
- package/build-types/flex/flex-block/component.d.ts +9 -3
- package/build-types/flex/flex-block/component.d.ts.map +1 -1
- package/build-types/flex/flex-item/component.d.ts +9 -3
- package/build-types/flex/flex-item/component.d.ts.map +1 -1
- package/build-types/flex/types.d.ts +4 -1
- package/build-types/flex/types.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.map +1 -1
- package/build-types/form-token-field/styles.d.ts +14 -0
- package/build-types/form-token-field/styles.d.ts.map +1 -0
- package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
- package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts +3 -0
- package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +7 -0
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/grid/component.d.ts +3 -3
- package/build-types/grid/component.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +5 -2
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/grid/index.d.ts +2 -2
- package/build-types/grid/index.d.ts.map +1 -1
- package/build-types/grid/stories/index.d.ts +9 -0
- package/build-types/grid/stories/index.d.ts.map +1 -0
- package/build-types/grid/test/grid.d.ts +2 -0
- package/build-types/grid/test/grid.d.ts.map +1 -0
- package/build-types/grid/types.d.ts +16 -15
- package/build-types/grid/types.d.ts.map +1 -1
- package/build-types/grid/utils.d.ts +50 -69
- package/build-types/grid/utils.d.ts.map +1 -1
- package/build-types/h-stack/component.d.ts +3 -2
- package/build-types/h-stack/component.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +5 -3
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/h-stack/index.d.ts +2 -2
- package/build-types/h-stack/index.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.d.ts +9 -0
- package/build-types/h-stack/stories/index.d.ts.map +1 -0
- package/build-types/h-stack/test/index.d.ts +2 -0
- package/build-types/h-stack/test/index.d.ts.map +1 -0
- package/build-types/h-stack/utils.d.ts +8 -4
- package/build-types/h-stack/utils.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 -28
- 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/icon/index.d.ts +1 -1
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-prefix-wrapper.d.ts +19 -0
- package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -0
- package/build-types/input-control/input-suffix-wrapper.d.ts +19 -0
- package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -0
- package/build-types/input-control/stories/index.d.ts +10 -0
- package/build-types/input-control/stories/index.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +21 -0
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +45 -3
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +54 -29
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts +7 -10
- package/build-types/range-control/input-range.d.ts.map +1 -1
- package/build-types/range-control/mark.d.ts +4 -7
- package/build-types/range-control/mark.d.ts.map +1 -1
- package/build-types/range-control/rail.d.ts +4 -9
- package/build-types/range-control/rail.d.ts.map +1 -1
- package/build-types/range-control/stories/index.d.ts +48 -0
- package/build-types/range-control/stories/index.d.ts.map +1 -0
- package/build-types/range-control/styles/range-control-styles.d.ts +32 -40
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/test/index.d.ts +2 -0
- package/build-types/range-control/test/index.d.ts.map +1 -0
- package/build-types/range-control/tooltip.d.ts +4 -11
- package/build-types/range-control/tooltip.d.ts.map +1 -1
- package/build-types/range-control/types.d.ts +304 -0
- package/build-types/range-control/types.d.ts.map +1 -0
- package/build-types/range-control/utils.d.ts +15 -33
- package/build-types/range-control/utils.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/scroll-lock/index.d.ts +32 -3
- package/build-types/scroll-lock/index.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.d.ts +9 -0
- package/build-types/scroll-lock/stories/index.d.ts.map +1 -0
- package/build-types/scroll-lock/test/index.d.ts +2 -0
- package/build-types/scroll-lock/test/index.d.ts.map +1 -0
- package/build-types/scrollable/component.d.ts +3 -3
- package/build-types/scrollable/component.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +5 -2
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/scrollable/index.d.ts +2 -2
- package/build-types/scrollable/index.d.ts.map +1 -1
- package/build-types/scrollable/stories/index.d.ts +9 -0
- package/build-types/scrollable/stories/index.d.ts.map +1 -0
- package/build-types/scrollable/styles.d.ts +7 -7
- package/build-types/scrollable/styles.d.ts.map +1 -1
- package/build-types/scrollable/test/index.d.ts +2 -0
- package/build-types/scrollable/test/index.d.ts.map +1 -0
- package/build-types/scrollable/types.d.ts +9 -6
- package/build-types/scrollable/types.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +1 -1
- package/build-types/select-control/styles/select-control-styles.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/shortcut/index.d.ts +5 -24
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/shortcut/test/index.d.ts +2 -0
- package/build-types/shortcut/test/index.d.ts.map +1 -0
- package/build-types/shortcut/types.d.ts +14 -0
- package/build-types/shortcut/types.d.ts.map +1 -0
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/spacer/component.d.ts +6 -5
- package/build-types/spacer/component.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +2 -2
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/spacer/index.d.ts +1 -1
- package/build-types/spacer/index.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/spacer/test/index.d.ts +2 -0
- package/build-types/spacer/test/index.d.ts.map +1 -0
- package/build-types/spacer/types.d.ts +41 -29
- package/build-types/spacer/types.d.ts.map +1 -1
- 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/text/types.d.ts +1 -1
- package/build-types/text/types.d.ts.map +1 -1
- package/build-types/text-highlight/index.d.ts +23 -0
- package/build-types/text-highlight/index.d.ts.map +1 -0
- package/build-types/text-highlight/stories/index.d.ts +12 -0
- package/build-types/text-highlight/stories/index.d.ts.map +1 -0
- package/build-types/text-highlight/test/index.d.ts +2 -0
- package/build-types/text-highlight/test/index.d.ts.map +1 -0
- package/build-types/text-highlight/types.d.ts +17 -0
- package/build-types/text-highlight/types.d.ts.map +1 -0
- package/build-types/tip/index.d.ts +5 -14
- package/build-types/tip/index.d.ts.map +1 -1
- package/build-types/tip/stories/index.d.ts +12 -0
- package/build-types/tip/stories/index.d.ts.map +1 -0
- package/build-types/tip/types.d.ts +11 -0
- package/build-types/tip/types.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/types.d.ts +6 -0
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/types.d.ts +1 -0
- package/build-types/tree-select/types.d.ts.map +1 -1
- 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 -2
- 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/use-context-system.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group.d.ts +1 -1
- package/build-types/ui/form-group/types.d.ts +1 -1
- package/build-types/ui/form-group/types.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +5 -5
- package/build-types/ui/utils/get-valid-children.d.ts +2 -2
- package/build-types/ui/utils/get-valid-children.d.ts.map +1 -1
- package/build-types/ui/utils/space.d.ts +7 -1
- package/build-types/ui/utils/space.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +2 -2
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +0 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +1 -1
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/math.d.ts +10 -0
- package/build-types/utils/math.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 -3
- 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/visually-hidden/component.d.ts +8 -10
- package/build-types/visually-hidden/component.d.ts.map +1 -1
- package/build-types/visually-hidden/index.d.ts +1 -1
- package/build-types/visually-hidden/index.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.d.ts +14 -0
- package/build-types/visually-hidden/stories/index.d.ts.map +1 -0
- package/build-types/visually-hidden/styles.d.ts +5 -2
- package/build-types/visually-hidden/styles.d.ts.map +1 -1
- package/build-types/visually-hidden/test/index.d.ts +2 -0
- package/build-types/visually-hidden/test/index.d.ts.map +1 -0
- package/build-types/visually-hidden/types.d.ts +11 -0
- package/build-types/visually-hidden/types.d.ts.map +1 -0
- package/package.json +18 -17
- package/src/alignment-matrix-control/utils.js +1 -6
- package/src/angle-picker-control/index.js +1 -2
- package/src/autocomplete/autocompleter-ui.js +4 -1
- package/src/autocomplete/autocompleter-ui.native.js +8 -2
- package/src/autocomplete/get-default-use-items.js +3 -2
- package/src/autocomplete/index.js +7 -10
- package/src/base-control/styles/base-control-styles.ts +5 -0
- package/src/border-box-control/border-box-control/component.tsx +1 -0
- package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -0
- package/src/border-control/border-control/component.tsx +82 -36
- package/src/border-control/border-control/hook.ts +5 -10
- package/src/border-control/border-control-dropdown/component.tsx +50 -45
- package/src/border-control/border-control-dropdown/hook.ts +0 -5
- package/src/border-control/stories/index.tsx +153 -0
- package/src/border-control/styles.ts +23 -69
- package/src/border-control/test/index.js +19 -8
- package/src/box-control/axial-input-controls.js +1 -1
- package/src/box-control/index.js +1 -1
- package/src/box-control/utils.js +9 -16
- package/src/button/README.md +1 -1
- package/src/card/test/__snapshots__/index.js.snap +8 -8
- 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 +24 -9
- package/src/color-palette/style.scss +5 -0
- package/src/color-palette/test/utils.ts +19 -1
- package/src/color-picker/component.tsx +12 -11
- package/src/color-picker/hex-input.tsx +5 -3
- package/src/color-picker/index.native.js +20 -27
- package/src/color-picker/input-with-slider.tsx +6 -3
- package/src/color-picker/styles.ts +20 -17
- package/src/color-picker/use-deprecated-props.ts +24 -43
- package/src/combobox-control/index.js +20 -13
- package/src/combobox-control/stories/index.js +3 -2
- package/src/combobox-control/style.scss +1 -1
- package/src/combobox-control/styles.ts +27 -0
- package/src/confirm-dialog/README.md +1 -1
- 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-select-control/index.js +44 -26
- package/src/custom-select-control/stories/index.js +7 -2
- package/src/custom-select-control/style.scss +4 -29
- package/src/date-time/README.md +7 -0
- package/src/date-time/date/index.tsx +2 -0
- package/src/date-time/date-time/index.tsx +2 -0
- package/src/date-time/types.ts +7 -0
- package/src/dimension-control/README.md +5 -2
- package/src/dimension-control/test/index.test.js +7 -7
- package/src/divider/README.md +12 -5
- package/src/divider/component.tsx +2 -3
- package/src/divider/index.ts +1 -1
- package/src/divider/stories/index.tsx +4 -4
- package/src/divider/styles.ts +7 -7
- package/src/divider/test/__snapshots__/{index.js.snap → index.tsx.snap} +7 -7
- package/src/divider/test/index.tsx +40 -0
- package/src/divider/types.ts +21 -15
- package/src/draggable/README.md +1 -1
- package/src/dropdown/dropdown-content-wrapper.tsx +59 -0
- package/src/dropdown/stories/index.js +60 -69
- package/src/dropdown/styles.ts +38 -0
- package/src/dropdown/types.ts +8 -0
- package/src/dropdown-menu/index.js +3 -4
- package/src/dropdown-menu/index.native.js +3 -5
- package/src/duotone-picker/duotone-picker.js +58 -37
- package/src/duotone-picker/style.scss +19 -0
- package/src/elevation/README.md +16 -14
- package/src/elevation/component.tsx +48 -0
- package/src/elevation/{hook.js → hook.ts} +29 -26
- package/src/elevation/{index.js → index.ts} +0 -0
- package/src/elevation/stories/index.tsx +85 -0
- package/src/elevation/{styles.js → styles.ts} +0 -0
- package/src/elevation/test/__snapshots__/{index.js.snap → index.tsx.snap} +19 -13
- package/src/elevation/test/index.tsx +64 -0
- package/src/elevation/types.ts +12 -19
- package/src/external-link/index.tsx +10 -4
- package/src/flex/flex/README.md +3 -12
- package/src/flex/flex/component.js +11 -17
- package/src/flex/flex-block/README.md +0 -4
- package/src/flex/flex-block/component.js +9 -3
- package/src/flex/flex-item/README.md +1 -5
- package/src/flex/flex-item/component.js +9 -3
- package/src/flex/stories/index.js +1 -1
- package/src/flex/types.ts +4 -1
- package/src/focal-point-picker/grid.js +2 -5
- package/src/focal-point-picker/index.native.js +9 -9
- package/src/focal-point-picker/tooltip/index.native.js +10 -11
- 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 +45 -24
- package/src/form-token-field/style.scss +2 -7
- package/src/form-token-field/styles.ts +32 -0
- package/src/form-token-field/suggestions-list.tsx +2 -4
- package/src/form-token-field/test/index.js +7 -10
- package/src/form-token-field/test/lib/token-field-wrapper.tsx +2 -2
- package/src/form-token-field/types.ts +7 -0
- package/src/grid/README.md +33 -19
- package/src/grid/{component.js → component.tsx} +13 -9
- package/src/grid/{hook.js → hook.ts} +5 -5
- package/src/grid/{index.js → index.ts} +0 -0
- package/src/grid/stories/index.tsx +72 -0
- package/src/grid/test/{grid.js → grid.tsx} +4 -4
- package/src/grid/types.ts +16 -17
- package/src/grid/{utils.js → utils.ts} +9 -7
- package/src/guide/style.scss +1 -0
- package/src/h-stack/{component.js → component.tsx} +8 -8
- package/src/h-stack/{hook.js → hook.tsx} +21 -16
- package/src/h-stack/{index.js → index.ts} +0 -0
- package/src/h-stack/stories/index.tsx +92 -0
- package/src/h-stack/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/h-stack/test/{index.js → index.tsx} +0 -0
- package/src/h-stack/{utils.js → utils.ts} +16 -16
- package/src/heading/README.md +4 -3
- package/src/heading/component.tsx +2 -2
- package/src/heading/hook.ts +1 -42
- 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/README.md +4 -1
- package/src/icon/index.tsx +1 -1
- package/src/index.js +3 -0
- package/src/input-control/index.tsx +6 -0
- package/src/input-control/input-base.tsx +28 -12
- package/src/input-control/input-prefix-wrapper.tsx +48 -0
- package/src/input-control/input-suffix-wrapper.tsx +48 -0
- package/src/input-control/stories/index.tsx +15 -2
- package/src/input-control/styles/input-control-styles.tsx +25 -11
- package/src/input-control/test/index.js +106 -31
- package/src/input-control/types.ts +52 -3
- package/src/menu-item/index.js +1 -2
- package/src/mobile/bottom-sheet/keyboard-avoiding-view.native.js +2 -7
- package/src/mobile/focal-point-settings-panel/index.native.js +2 -2
- package/src/mobile/image/index.native.js +12 -6
- package/src/mobile/link-picker/index.native.js +2 -3
- package/src/mobile/media-edit/index.native.js +2 -7
- package/src/mobile/segmented-control/index.native.js +6 -5
- package/src/modal/index.js +21 -2
- package/src/modal/stories/index.js +17 -1
- package/src/modal/style.scss +14 -19
- package/src/navigation/group/index.js +8 -3
- package/src/navigation/index.js +3 -0
- package/src/navigation/item/base.js +5 -3
- 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/use-navigation-tree-nodes.js +11 -10
- package/src/navigation/utils.js +2 -2
- package/src/number-control/stories/index.js +24 -24
- package/src/popover/README.md +2 -2
- package/src/popover/index.js +20 -13
- package/src/popover/stories/index.js +2 -0
- package/src/popover/style.scss +1 -1
- package/src/radio-control/index.tsx +1 -2
- package/src/range-control/README.md +108 -80
- package/src/range-control/{index.js → index.tsx} +79 -49
- package/src/range-control/{input-range.js → input-range.tsx} +11 -7
- package/src/range-control/{mark.js → mark.tsx} +15 -9
- package/src/range-control/{rail.js → rail.tsx} +40 -23
- package/src/range-control/stories/index.tsx +244 -0
- package/src/range-control/styles/{range-control-styles.js → range-control-styles.ts} +28 -24
- package/src/range-control/test/index.tsx +341 -0
- package/src/range-control/{tooltip.js → tooltip.tsx} +19 -14
- package/src/range-control/types.ts +328 -0
- package/src/range-control/utils.ts +135 -0
- package/src/resizable-box/resize-tooltip/utils.ts +2 -3
- package/src/sandbox/index.native.js +14 -1
- package/src/scroll-lock/README.md +1 -1
- package/src/scroll-lock/{index.js → index.tsx} +34 -7
- package/src/scroll-lock/stories/index.tsx +96 -0
- package/src/scroll-lock/test/index.tsx +26 -0
- package/src/scrollable/README.md +14 -8
- package/src/scrollable/{component.js → component.tsx} +13 -10
- package/src/scrollable/{hook.js → hook.ts} +5 -7
- package/src/scrollable/{index.js → index.ts} +0 -0
- package/src/scrollable/stories/{index.js → index.tsx} +29 -34
- package/src/scrollable/{styles.js → styles.ts} +0 -0
- package/src/scrollable/test/__snapshots__/{index.js.snap → index.tsx.snap} +1 -0
- package/src/scrollable/test/index.tsx +34 -0
- package/src/scrollable/types.ts +10 -5
- package/src/select-control/index.tsx +1 -2
- package/src/select-control/styles/select-control-styles.ts +33 -9
- package/src/select-control/test/select-control.tsx +22 -15
- package/src/select-control/types.ts +1 -0
- package/src/shortcut/index.tsx +32 -0
- package/src/shortcut/test/__snapshots__/index.tsx.snap +15 -0
- package/src/shortcut/test/index.tsx +41 -0
- package/src/shortcut/types.ts +10 -0
- package/src/slot-fill/index.native.js +2 -7
- package/src/slot-fill/provider.js +3 -7
- package/src/slot-fill/slot.js +21 -24
- package/src/slot-fill/test/slot.js +2 -3
- package/src/spacer/README.md +43 -37
- package/src/spacer/component.tsx +8 -7
- package/src/spacer/hook.ts +4 -2
- package/src/spacer/index.ts +1 -1
- package/src/spacer/stories/index.tsx +70 -0
- package/src/spacer/test/__snapshots__/{index.js.snap → index.tsx.snap} +1 -0
- package/src/spacer/test/index.tsx +149 -0
- package/src/spacer/types.ts +41 -29
- 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/tab-panel/README.md +1 -1
- package/src/text/types.ts +1 -1
- package/src/text-highlight/README.md +6 -6
- package/src/text-highlight/index.tsx +49 -0
- package/src/text-highlight/stories/index.tsx +33 -0
- package/src/text-highlight/test/index.tsx +93 -0
- package/src/text-highlight/types.ts +16 -0
- package/src/tip/index.tsx +22 -0
- package/src/tip/stories/index.tsx +33 -0
- package/src/tip/types.ts +11 -0
- package/src/toggle-group-control/stories/index.js +19 -3
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +4 -4
- package/src/toggle-group-control/toggle-group-control/component.tsx +3 -3
- package/src/toggle-group-control/toggle-group-control/styles.ts +22 -2
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +0 -4
- package/src/toggle-group-control/types.ts +6 -0
- package/src/toolbar-group/index.js +1 -2
- package/src/tools-panel/tools-panel/README.md +94 -21
- package/src/tooltip/index.js +56 -10
- package/src/tooltip/stories/index.js +28 -13
- package/src/tooltip/style.scss +1 -1
- package/src/tree-select/index.tsx +7 -6
- package/src/tree-select/types.ts +4 -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/test/context-system-provider.js +101 -1
- package/src/ui/context/use-context-system.js +7 -2
- package/src/ui/form-group/types.ts +1 -1
- package/src/ui/utils/get-valid-children.ts +4 -2
- package/src/ui/utils/space.ts +7 -1
- package/src/unit-control/styles/unit-control-styles.ts +15 -13
- package/src/unit-control/test/__snapshots__/index.tsx.snap +4 -4
- package/src/unit-control/types.ts +1 -1
- package/src/utils/math.js +14 -5
- package/src/utils/test/math.js +22 -1
- 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/visually-hidden/{component.js → component.tsx} +23 -15
- package/src/visually-hidden/{index.js → index.ts} +0 -0
- package/src/visually-hidden/stories/index.tsx +66 -0
- package/src/visually-hidden/{styles.js → styles.ts} +6 -2
- package/src/visually-hidden/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/visually-hidden/test/index.tsx +17 -0
- package/src/visually-hidden/types.ts +11 -0
- package/tsconfig.json +2 -0
- package/tsconfig.tsbuildinfo +1 -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/divider/test/index.js +0 -41
- package/src/elevation/component.js +0 -43
- package/src/elevation/stories/index.js +0 -148
- package/src/elevation/test/index.js +0 -51
- package/src/form-toggle/index.js +0 -38
- package/src/form-toggle/stories/index.js +0 -28
- package/src/form-toggle/test/index.js +0 -74
- package/src/grid/stories/index.js +0 -49
- package/src/h-stack/stories/index.js +0 -22
- package/src/heading/test/index.js +0 -67
- package/src/range-control/stories/index.js +0 -180
- package/src/range-control/test/index.js +0 -320
- package/src/range-control/utils.js +0 -134
- package/src/scroll-lock/stories/index.js +0 -71
- package/src/scroll-lock/test/index.js +0 -53
- package/src/scrollable/test/index.js +0 -31
- package/src/shortcut/index.js +0 -41
- package/src/shortcut/test/index.js +0 -37
- package/src/spacer/stories/index.js +0 -59
- package/src/spacer/test/index.js +0 -146
- package/src/spinner/stories/index.js +0 -43
- package/src/text-highlight/index.js +0 -28
- package/src/text-highlight/stories/index.js +0 -28
- package/src/text-highlight/test/index.js +0 -120
- package/src/tip/index.js +0 -24
- package/src/tip/stories/index.js +0 -26
- package/src/truncate/stories/index.js +0 -38
- package/src/visually-hidden/stories/index.js +0 -42
- package/src/visually-hidden/test/index.js +0 -19
|
@@ -21,6 +21,10 @@ var _i18n = require("@wordpress/i18n");
|
|
|
21
21
|
|
|
22
22
|
var _ = require("../");
|
|
23
23
|
|
|
24
|
+
var _selectControlStyles = require("../select-control/styles/select-control-styles");
|
|
25
|
+
|
|
26
|
+
var _inputBase = _interopRequireDefault(require("../input-control/input-base"));
|
|
27
|
+
|
|
24
28
|
/**
|
|
25
29
|
* External dependencies
|
|
26
30
|
*/
|
|
@@ -76,12 +80,18 @@ function CustomSelectControl(_ref3) {
|
|
|
76
80
|
let {
|
|
77
81
|
/** Start opting into the larger default height that will become the default size in a future version. */
|
|
78
82
|
__next36pxDefaultSize = false,
|
|
83
|
+
|
|
84
|
+
/** Start opting into the unconstrained width that will become the default in a future version. */
|
|
85
|
+
__nextUnconstrainedWidth = false,
|
|
79
86
|
className,
|
|
80
87
|
hideLabelFromVision,
|
|
81
88
|
label,
|
|
82
89
|
describedBy,
|
|
83
90
|
options: items,
|
|
84
91
|
onChange: onSelectedItemChange,
|
|
92
|
+
|
|
93
|
+
/** @type {import('../select-control/types').SelectControlProps.size} */
|
|
94
|
+
size = 'default',
|
|
85
95
|
value: _selectedItem
|
|
86
96
|
} = _ref3;
|
|
87
97
|
const {
|
|
@@ -102,6 +112,7 @@ function CustomSelectControl(_ref3) {
|
|
|
102
112
|
} : undefined),
|
|
103
113
|
stateReducer
|
|
104
114
|
});
|
|
115
|
+
const [isFocused, setIsFocused] = (0, _element.useState)(false);
|
|
105
116
|
|
|
106
117
|
function getDescribedBy() {
|
|
107
118
|
if (describedBy) {
|
|
@@ -139,22 +150,29 @@ function CustomSelectControl(_ref3) {
|
|
|
139
150
|
/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */
|
|
140
151
|
(0, _element.createElement)("label", getLabelProps({
|
|
141
152
|
className: 'components-custom-select-control__label'
|
|
142
|
-
}), label), (0, _element.createElement)(
|
|
153
|
+
}), label), (0, _element.createElement)(_inputBase.default, {
|
|
154
|
+
isFocused: isOpen || isFocused,
|
|
155
|
+
__unstableInputWidth: __nextUnconstrainedWidth ? undefined : 'auto',
|
|
156
|
+
labelPosition: __nextUnconstrainedWidth ? undefined : 'top'
|
|
157
|
+
}, (0, _element.createElement)(_selectControlStyles.Select, (0, _extends2.default)({
|
|
158
|
+
as: "button",
|
|
159
|
+
onFocus: () => setIsFocused(true),
|
|
160
|
+
onBlur: () => setIsFocused(false),
|
|
161
|
+
selectSize: size,
|
|
162
|
+
__next36pxDefaultSize: __next36pxDefaultSize
|
|
163
|
+
}, getToggleButtonProps({
|
|
143
164
|
// This is needed because some speech recognition software don't support `aria-labelledby`.
|
|
144
165
|
'aria-label': label,
|
|
145
166
|
'aria-labelledby': undefined,
|
|
146
167
|
className: (0, _classnames.default)('components-custom-select-control__button', {
|
|
147
|
-
'is-next-
|
|
168
|
+
'is-next-unconstrained-width': __nextUnconstrainedWidth
|
|
148
169
|
}),
|
|
149
|
-
isSmall: !__next36pxDefaultSize,
|
|
150
170
|
describedBy: getDescribedBy()
|
|
151
|
-
}), itemToString(selectedItem), (0, _element.createElement)(_icons.Icon, {
|
|
171
|
+
})), itemToString(selectedItem), (0, _element.createElement)(_icons.Icon, {
|
|
152
172
|
icon: _icons.chevronDown,
|
|
153
|
-
className:
|
|
154
|
-
'is-next-36px-default-size': __next36pxDefaultSize
|
|
155
|
-
}),
|
|
173
|
+
className: "components-custom-select-control__button-icon",
|
|
156
174
|
size: 18
|
|
157
|
-
})), (0, _element.createElement)("ul", (0, _extends2.default)({}, menuProps, {
|
|
175
|
+
}))), (0, _element.createElement)("ul", (0, _extends2.default)({}, menuProps, {
|
|
158
176
|
onKeyDown: onKeyDownHandler
|
|
159
177
|
}), isOpen && items.map((item, index) => // eslint-disable-next-line react/jsx-key
|
|
160
178
|
(0, _element.createElement)("li", getItemProps({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/custom-select-control/index.js"],"names":["itemToString","item","name","stateReducer","selectedItem","type","changes","props","items","useSelect","stateChangeTypes","ToggleButtonKeyDownArrowDown","Math","min","indexOf","length","ToggleButtonKeyDownArrowUp","max","CustomSelectControl","__next36pxDefaultSize","className","hideLabelFromVision","label","describedBy","options","onChange","onSelectedItemChange","value","_selectedItem","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","undefined","getDescribedBy","menuProps","onKeyDownHandler","e","stopPropagation","onKeyDown","startsWith","isSmall","chevronDown","map","index","key","__experimentalHint","style","check"],"mappings":";;;;;;;;;AAWA;;;;AARA;;AACA;;AAKA;;AACA;;AAMA;;AAhBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;AAGA,MAAMA,YAAY,GAAKC,IAAF,IAAYA,IAAZ,aAAYA,IAAZ,uBAAYA,IAAI,CAAEC,IAAvC,C,CACA;AACA;AACA;AACA;;;AACA,MAAMC,YAAY,GAAG,iBAGhB;AAAA,MAFJ;AAAEC,IAAAA;AAAF,GAEI;AAAA,MADJ;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,OAAR;AAAiBC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF;AAAxB,GACI;;AACJ,UAASH,IAAT;AACC,SAAKI,qBAAUC,gBAAV,CAA2BC,4BAAhC;AACC;AACA;AACA,aAAO;AACNP,QAAAA,YAAY,EACXI,KAAK,CACJJ,YAAY,GACTQ,IAAI,CAACC,GAAL,CACAL,KAAK,C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CAbf,EAcC,4BAAC,WAAD;AACC,IAAA,IAAI,EAAGyC,kBADR;AAEC,IAAA,SAAS,EAAG,yBACX,+CADW,EAEX;AACC,mCAA6B1B;AAD9B,KAFW,CAFb;AAQC,IAAA,IAAI,EAAG;AARR,IAdD,CApBD,EA8CC,6DAASmB,SAAT;AAAqB,IAAA,SAAS,EAAGC;AAAjC,MACGN,MAAM,IACPzB,KAAK,CAACsC,GAAN,CAAW,CAAE7C,IAAF,EAAQ8C,KAAR,KACV;AACA,oCACMf,YAAY,CAAE;AAClB/B,IAAAA,IADkB;AAElB8C,IAAAA,KAFkB;AAGlBC,IAAAA,GAAG,EAAE/C,IAAI,CAAC+C,GAHQ;AAIlB5B,IAAAA,SAAS,EAAE,yBACVnB,IAAI,CAACmB,SADK,EAEV,wCAFU,EAGV;AACC,wBACC2B,KAAK,KAAKb,gBAFZ;AAGC,kBAAY,CAAC,CAAEjC,IAAI,CAACgD,kBAHrB;AAIC,mCACC9B;AALF,KAHU,CAJO;AAelB+B,IAAAA,KAAK,EAAEjD,IAAI,CAACiD;AAfM,GAAF,CADlB,EAmBGjD,IAAI,CAACC,IAnBR,EAoBGD,IAAI,CAACgD,kBAAL,IACD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGhD,IAAI,CAACgD,kBADR,CArBF,EAyBGhD,IAAI,KAAKG,YAAT,IACD,4BAAC,WAAD;AACC,IAAA,IAAI,EAAG+C,YADR;AAEC,IAAA,SAAS,EAAC;AAFX,IA1BF,CAFD,CAFF,CA9CD,CADD;AAuFA","sourcesContent":["/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check, chevronDown } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Button, VisuallyHidden } from '../';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\nexport default function CustomSelectControl( {\n\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t__next36pxDefaultSize = false,\n\tclassName,\n\thideLabelFromVision,\n\tlabel,\n\tdescribedBy,\n\toptions: items,\n\tonChange: onSelectedItemChange,\n\tvalue: _selectedItem,\n} ) {\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<label\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</label>\n\t\t\t) }\n\t\t\t<Button\n\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t'components-custom-select-control__button',\n\t\t\t\t\t\t{ 'is-next-36px-default-size': __next36pxDefaultSize }\n\t\t\t\t\t),\n\t\t\t\t\tisSmall: ! __next36pxDefaultSize,\n\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t<Icon\n\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-custom-select-control__button-icon',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-next-36px-default-size': __next36pxDefaultSize,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tsize={ 18 }\n\t\t\t\t/>\n\t\t\t</Button>\n\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t{ isOpen &&\n\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t'has-hint': !! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t'is-next-36px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t__next36pxDefaultSize,\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\tstyle: item.style,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ item === selectedItem && (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/custom-select-control/index.js"],"names":["itemToString","item","name","stateReducer","selectedItem","type","changes","props","items","useSelect","stateChangeTypes","ToggleButtonKeyDownArrowDown","Math","min","indexOf","length","ToggleButtonKeyDownArrowUp","max","CustomSelectControl","__next36pxDefaultSize","__nextUnconstrainedWidth","className","hideLabelFromVision","label","describedBy","options","onChange","onSelectedItemChange","size","value","_selectedItem","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","undefined","isFocused","setIsFocused","getDescribedBy","menuProps","onKeyDownHandler","e","stopPropagation","onKeyDown","startsWith","chevronDown","map","index","key","__experimentalHint","style","check"],"mappings":";;;;;;;;;AAWA;;;;AARA;;AACA;;AAKA;;AACA;;AAMA;;AACA;;AACA;;AAlBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;AAKA,MAAMA,YAAY,GAAKC,IAAF,IAAYA,IAAZ,aAAYA,IAAZ,uBAAYA,IAAI,CAAEC,IAAvC,C,CACA;AACA;AACA;AACA;;;AACA,MAAMC,YAAY,GAAG,iBAGhB;AAAA,MAFJ;AAAEC,IAAAA;AAAF,GAEI;AAAA,MADJ;AA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;AACC,wBACC6B,KAAK,KAAKd,gBAFZ;AAGC,kBAAY,CAAC,CAAEnC,IAAI,CAACmD,kBAHrB;AAIC,mCACCjC;AALF,KAHU,CAJO;AAelBkC,IAAAA,KAAK,EAAEpD,IAAI,CAACoD;AAfM,GAAF,CADlB,EAmBGpD,IAAI,CAACC,IAnBR,EAoBGD,IAAI,CAACmD,kBAAL,IACD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGnD,IAAI,CAACmD,kBADR,CArBF,EAyBGnD,IAAI,KAAKG,YAAT,IACD,4BAAC,WAAD;AACC,IAAA,IAAI,EAAGkD,YADR;AAEC,IAAA,SAAS,EAAC;AAFX,IA1BF,CAFD,CAFF,CAxDD,CADD;AAiGA","sourcesContent":["/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check, chevronDown } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../';\nimport { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';\nimport InputBase from '../input-control/input-base';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\nexport default function CustomSelectControl( {\n\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t__next36pxDefaultSize = false,\n\t/** Start opting into the unconstrained width that will become the default in a future version. */\n\t__nextUnconstrainedWidth = false,\n\tclassName,\n\thideLabelFromVision,\n\tlabel,\n\tdescribedBy,\n\toptions: items,\n\tonChange: onSelectedItemChange,\n\t/** @type {import('../select-control/types').SelectControlProps.size} */\n\tsize = 'default',\n\tvalue: _selectedItem,\n} ) {\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<label\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</label>\n\t\t\t) }\n\t\t\t<InputBase\n\t\t\t\tisFocused={ isOpen || isFocused }\n\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t__nextUnconstrainedWidth ? undefined : 'auto'\n\t\t\t\t}\n\t\t\t\tlabelPosition={ __nextUnconstrainedWidth ? undefined : 'top' }\n\t\t\t>\n\t\t\t\t<SelectControlSelect\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t'components-custom-select-control__button',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-next-unconstrained-width':\n\t\t\t\t\t\t\t\t\t__nextUnconstrainedWidth,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\tclassName=\"components-custom-select-control__button-icon\"\n\t\t\t\t\t\tsize={ 18 }\n\t\t\t\t\t/>\n\t\t\t\t</SelectControlSelect>\n\t\t\t</InputBase>\n\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t{ isOpen &&\n\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t'has-hint': !! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t'is-next-36px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t__next36pxDefaultSize,\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\tstyle: item.style,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ item === selectedItem && (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -117,7 +117,8 @@ function DatePicker(_ref2) {
|
|
|
117
117
|
onChange,
|
|
118
118
|
events,
|
|
119
119
|
isInvalidDate,
|
|
120
|
-
onMonthPreviewed
|
|
120
|
+
onMonthPreviewed,
|
|
121
|
+
startOfWeek = 0
|
|
121
122
|
} = _ref2;
|
|
122
123
|
const nodeRef = (0, _element.useRef)(null);
|
|
123
124
|
|
|
@@ -207,6 +208,7 @@ function DatePicker(_ref2) {
|
|
|
207
208
|
isOutsideRange: date => {
|
|
208
209
|
return !!isInvalidDate && isInvalidDate(date.toDate());
|
|
209
210
|
},
|
|
211
|
+
firstDayOfWeek: startOfWeek,
|
|
210
212
|
onPrevMonthClick: onMonthPreviewedHandler,
|
|
211
213
|
onNextMonthClick: onMonthPreviewedHandler,
|
|
212
214
|
renderDayContents: day => (0, _element.createElement)(DatePickerDay, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/date-time/date/index.tsx"],"names":["TIMEZONELESS_FORMAT","ARIAL_LABEL_TIME_FORMAT","noop","DatePickerDay","day","events","ref","current","parentNode","Element","dayAriaLabel","format","length","setAttribute","dayWithEventsDescription","DatePicker","currentDate","onChange","isInvalidDate","onMonthPreviewed","nodeRef","onMonthPreviewedHandler","newMonthDate","toISOString","keepFocusInside","ownerDocument","activeElement","contains","focusRegion","querySelector","HTMLElement","focus","onChangeMoment","newDate","momentDate","momentTime","hours","minutes","seconds","set","getEventsPerDay","filter","eventDay","isSame","date","toDate","month","ariaLabel","props","arrowLeft","arrowRight"],"mappings":";;;;;;;;;;AAeA;;;;AAZA;;AAIA;;AAGA;;AAMA;;AACA;;AAKA;;AAEA;;AAxBA;AACA;AACA;AAGA;AACA;AAEA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;AAKA,MAAMA,mBAAmB,GAAG,qBAA5B;AACA,MAAMC,uBAAuB,GAAG,UAAhC;;AACA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,aAAT,OAAmE;AAAA,MAA3C;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,MAAM,GAAG;AAAhB,GAA2C;AAClE,QAAMC,GAAG,GAAG,qBAA0B,IAA1B,CAAZ;AAEA;AACD;AACA;AACA;AACA;AACA;;AACC,0BAAW,MAAM;AAAA;;AAChB;AACA,QAAK,EAAI,CAAAA,GAAG,SAAH,IAAAA,GAAG,WAAH,4BAAAA,GAAG,CAAEC,OAAL,8DAAcC,UAAd,aAAoCC,OAAxC,CAAL,EAAyD;AACxD;AACA;;AAED,UAAM;AAAED,MAAAA;AAAF,QAAiBF,GAAG,CAACC,OAA3B;AACA,UAAMG,YAAY,GAAG,qBAAQN,GAAR,EAAcO,MAAd,CAAsBV,uBAAtB,CAArB;;AAEA,QAAK,CAAEI,MAAM,CAACO,MAAd,EAAuB;AACtB;AACAJ,MAAAA,UAAU,CAACK,YAAX,CAAyB,YAAzB,EAAuCH,YAAvC;AACA;AACA;;AAED,UAAMI,wBAAwB,GAAG,oBAChC;AACA,kBACC,4BADD,EAEC,8BAFD,EAGCT,MAAM,CAACO,MAHR,CAFgC,EAOhCF,YAPgC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GC,gBADR;AAEC,QAAA,OAAO,EAAC,UAFT;AAGC,sBAAaF;AAHd,SAIMC,KAJN,EADqB;AAAA,KApCvB;AA4CC,IAAA,mBAAmB,EAAG;AAAA,UAAE;AAAED,QAAAA,SAAF;AAAa,WAAGC;AAAhB,OAAF;AAAA,aACrB,4BAAC,qBAAD;AACC,QAAA,IAAI,EAAGE,iBADR;AAEC,QAAA,OAAO,EAAC,UAFT;AAGC,sBAAaH;AAHd,SAIMC,KAJN,EADqB;AAAA,KA5CvB;AAoDC,IAAA,aAAa,EAAG9C;AApDjB,IADD,CADD;AA0DA;;eAEca,U","sourcesContent":["/**\n * External dependencies\n */\nimport moment from 'moment';\nimport type { Moment } from 'moment';\n// Needed to initialise the default datepicker styles.\n// See: https://github.com/airbnb/react-dates#initialize\nimport 'react-dates/initialize';\n// `react-dates` doesn't tree-shake correctly, so we import from the individual\n// component here.\nimport DayPickerSingleDateController from 'react-dates/lib/components/DayPickerSingleDateController';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { isRTL, _n, sprintf } from '@wordpress/i18n';\nimport { arrowLeft, arrowRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getMomentDate } from './utils';\nimport type { DatePickerDayProps, DatePickerProps } from '../types';\nimport { Day, NavPrevButton, NavNextButton } from './styles';\n\nconst TIMEZONELESS_FORMAT = 'YYYY-MM-DDTHH:mm:ss';\nconst ARIAL_LABEL_TIME_FORMAT = 'dddd, LL';\nconst noop = () => {};\n\nfunction DatePickerDay( { day, events = [] }: DatePickerDayProps ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\n\t/*\n\t * a11y hack to make the `There is/are n events` string\n\t * available speaking for readers,\n\t * re-defining the aria-label attribute.\n\t * This attribute is handled by the react-dates component.\n\t */\n\tuseEffect( () => {\n\t\t// Bail when no parent node.\n\t\tif ( ! ( ref?.current?.parentNode instanceof Element ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { parentNode } = ref.current;\n\t\tconst dayAriaLabel = moment( day ).format( ARIAL_LABEL_TIME_FORMAT );\n\n\t\tif ( ! events.length ) {\n\t\t\t// Set aria-label without event description.\n\t\t\tparentNode.setAttribute( 'aria-label', dayAriaLabel );\n\t\t\treturn;\n\t\t}\n\n\t\tconst dayWithEventsDescription = sprintf(\n\t\t\t// translators: 1: Calendar day format, 2: Calendar event number.\n\t\t\t_n(\n\t\t\t\t'%1$s. There is %2$d event.',\n\t\t\t\t'%1$s. There are %2$d events.',\n\t\t\t\tevents.length\n\t\t\t),\n\t\t\tdayAriaLabel,\n\t\t\tevents.length\n\t\t);\n\n\t\tparentNode.setAttribute( 'aria-label', dayWithEventsDescription );\n\t}, [ day, events.length ] );\n\n\treturn (\n\t\t<Day\n\t\t\tref={ ref }\n\t\t\tclassName=\"components-datetime__date__day\" // Unused, for backwards compatibility.\n\t\t\thasEvents={ !! events?.length }\n\t\t\talignment=\"center\"\n\t\t>\n\t\t\t{ day.format( 'D' ) }\n\t\t</Day>\n\t);\n}\n\n/**\n * DatePicker is a React component that renders a calendar for date selection.\n *\n * ```jsx\n * import { DatePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDatePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DatePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * />\n * );\n * };\n * ```\n */\nexport function DatePicker( {\n\tcurrentDate,\n\tonChange,\n\tevents,\n\tisInvalidDate,\n\tonMonthPreviewed,\n}: DatePickerProps ) {\n\tconst nodeRef = useRef< HTMLDivElement >( null );\n\n\tconst onMonthPreviewedHandler = ( newMonthDate: Moment ) => {\n\t\tonMonthPreviewed?.( newMonthDate.toISOString() );\n\t\tkeepFocusInside();\n\t};\n\n\t/*\n\t * Todo: We should remove this function ASAP.\n\t * It is kept because focus is lost when we click on the previous and next month buttons.\n\t * This focus loss closes the date picker popover.\n\t * Ideally we should add an upstream commit on react-dates to fix this issue.\n\t */\n\tconst keepFocusInside = () => {\n\t\tif ( ! nodeRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = nodeRef.current;\n\t\tconst { activeElement } = ownerDocument;\n\n\t\t// If focus was lost.\n\t\tif (\n\t\t\t! activeElement ||\n\t\t\t! nodeRef.current.contains( ownerDocument.activeElement )\n\t\t) {\n\t\t\t// Retrieve the focus region div.\n\t\t\tconst focusRegion = nodeRef.current.querySelector(\n\t\t\t\t'.DayPicker_focusRegion'\n\t\t\t);\n\t\t\tif ( ! ( focusRegion instanceof HTMLElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Keep the focus on focus region.\n\t\t\tfocusRegion.focus();\n\t\t}\n\t};\n\n\tconst onChangeMoment = ( newDate: Moment | null ) => {\n\t\tif ( ! newDate ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If currentDate is null, use now as momentTime to designate hours, minutes, seconds.\n\t\tconst momentDate = currentDate ? moment( currentDate ) : moment();\n\t\tconst momentTime = {\n\t\t\thours: momentDate.hours(),\n\t\t\tminutes: momentDate.minutes(),\n\t\t\tseconds: 0,\n\t\t};\n\n\t\tonChange?.( newDate.set( momentTime ).format( TIMEZONELESS_FORMAT ) );\n\n\t\t// Keep focus on the date picker.\n\t\tkeepFocusInside();\n\t};\n\n\tconst getEventsPerDay = ( day: Moment ) => {\n\t\tif ( ! events?.length ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn events.filter( ( eventDay ) =>\n\t\t\tday.isSame( eventDay.date, 'day' )\n\t\t);\n\t};\n\n\tconst momentDate = getMomentDate( currentDate );\n\n\treturn (\n\t\t<div className=\"components-datetime__date\" ref={ nodeRef }>\n\t\t\t<DayPickerSingleDateController\n\t\t\t\tdate={ momentDate }\n\t\t\t\tinitialVisibleMonth={ null }\n\t\t\t\tdaySize={ 30 }\n\t\t\t\thorizontalMonthPadding={ 0 }\n\t\t\t\tfocused\n\t\t\t\thideKeyboardShortcutsPanel\n\t\t\t\t// This is a hack to force the calendar to update on month or year change\n\t\t\t\t// https://github.com/airbnb/react-dates/issues/240#issuecomment-361776665\n\t\t\t\tkey={ `datepicker-controller-${\n\t\t\t\t\tmomentDate ? momentDate.format( 'MM-YYYY' ) : 'null'\n\t\t\t\t}` }\n\t\t\t\tnoBorder\n\t\t\t\tnumberOfMonths={ 1 }\n\t\t\t\tonDateChange={ onChangeMoment }\n\t\t\t\ttransitionDuration={ 0 }\n\t\t\t\tweekDayFormat=\"ddd\"\n\t\t\t\tdayAriaLabelFormat={ ARIAL_LABEL_TIME_FORMAT }\n\t\t\t\tisRTL={ isRTL() }\n\t\t\t\tisOutsideRange={ ( date ) => {\n\t\t\t\t\treturn !! isInvalidDate && isInvalidDate( date.toDate() );\n\t\t\t\t} }\n\t\t\t\tonPrevMonthClick={ onMonthPreviewedHandler }\n\t\t\t\tonNextMonthClick={ onMonthPreviewedHandler }\n\t\t\t\trenderDayContents={ ( day ) => (\n\t\t\t\t\t<DatePickerDay\n\t\t\t\t\t\tday={ day }\n\t\t\t\t\t\tevents={ getEventsPerDay( day ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\trenderMonthElement={ ( { month } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<strong>{ month.format( 'MMMM' ) }</strong>{ ' ' }\n\t\t\t\t\t\t{ month.format( 'YYYY' ) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\trenderNavPrevButton={ ( { ariaLabel, ...props } ) => (\n\t\t\t\t\t<NavPrevButton\n\t\t\t\t\t\ticon={ arrowLeft }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\trenderNavNextButton={ ( { ariaLabel, ...props } ) => (\n\t\t\t\t\t<NavNextButton\n\t\t\t\t\t\ticon={ arrowRight }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\tonFocusChange={ noop }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default DatePicker;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/date-time/date/index.tsx"],"names":["TIMEZONELESS_FORMAT","ARIAL_LABEL_TIME_FORMAT","noop","DatePickerDay","day","events","ref","current","parentNode","Element","dayAriaLabel","format","length","setAttribute","dayWithEventsDescription","DatePicker","currentDate","onChange","isInvalidDate","onMonthPreviewed","startOfWeek","nodeRef","onMonthPreviewedHandler","newMonthDate","toISOString","keepFocusInside","ownerDocument","activeElement","contains","focusRegion","querySelector","HTMLElement","focus","onChangeMoment","newDate","momentDate","momentTime","hours","minutes","seconds","set","getEventsPerDay","filter","eventDay","isSame","date","toDate","month","ariaLabel","props","arrowLeft","arrowRight"],"mappings":";;;;;;;;;;AAeA;;;;AAZA;;AAIA;;AAGA;;AAMA;;AACA;;AAKA;;AAEA;;AAxBA;AACA;AACA;AAGA;AACA;AAEA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;AAKA,MAAMA,mBAAmB,GAAG,qBAA5B;AACA,MAAMC,uBAAuB,GAAG,UAAhC;;AACA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,aAAT,OAAmE;AAAA,MAA3C;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,MAAM,GAAG;AAAhB,GAA2C;AAClE,QAAMC,GAAG,GAAG,qBAA0B,IAA1B,CAAZ;AAEA;AACD;AACA;AACA;AACA;AACA;;AACC,0BAAW,MAAM;AAAA;;AAChB;AACA,QAAK,EAAI,CAAAA,GAAG,SAAH,IAAAA,GAAG,WAAH,4BAAAA,GAAG,CAAEC,OAAL,8DAAcC,UAAd,aAAoCC,OAAxC,CAAL,EAAyD;AACxD;AACA;;AAED,UAAM;AAAED,MAAAA;AAAF,QAAiBF,GAA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M,EAAGqC,eAAe,CAAErC,GAAF;AAFzB,MA1BF;AA+BC,IAAA,kBAAkB,EAAG;AAAA,UAAE;AAAE2C,QAAAA;AAAF,OAAF;AAAA,aACpB,qDACC,4CAAUA,KAAK,CAACpC,MAAN,CAAc,MAAd,CAAV,CADD,EAC8C,GAD9C,EAEGoC,KAAK,CAACpC,MAAN,CAAc,MAAd,CAFH,CADoB;AAAA,KA/BtB;AAqCC,IAAA,mBAAmB,EAAG;AAAA,UAAE;AAAEqC,QAAAA,SAAF;AAAa,WAAGC;AAAhB,OAAF;AAAA,aACrB,4BAAC,qBAAD;AACC,QAAA,IAAI,EAAGC,gBADR;AAEC,QAAA,OAAO,EAAC,UAFT;AAGC,sBAAaF;AAHd,SAIMC,KAJN,EADqB;AAAA,KArCvB;AA6CC,IAAA,mBAAmB,EAAG;AAAA,UAAE;AAAED,QAAAA,SAAF;AAAa,WAAGC;AAAhB,OAAF;AAAA,aACrB,4BAAC,qBAAD;AACC,QAAA,IAAI,EAAGE,iBADR;AAEC,QAAA,OAAO,EAAC,UAFT;AAGC,sBAAaH;AAHd,SAIMC,KAJN,EADqB;AAAA,KA7CvB;AAqDC,IAAA,aAAa,EAAG/C;AArDjB,IADD,CADD;AA2DA;;eAEca,U","sourcesContent":["/**\n * External dependencies\n */\nimport moment from 'moment';\nimport type { Moment } from 'moment';\n// Needed to initialise the default datepicker styles.\n// See: https://github.com/airbnb/react-dates#initialize\nimport 'react-dates/initialize';\n// `react-dates` doesn't tree-shake correctly, so we import from the individual\n// component here.\nimport DayPickerSingleDateController from 'react-dates/lib/components/DayPickerSingleDateController';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { isRTL, _n, sprintf } from '@wordpress/i18n';\nimport { arrowLeft, arrowRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getMomentDate } from './utils';\nimport type { DatePickerDayProps, DatePickerProps } from '../types';\nimport { Day, NavPrevButton, NavNextButton } from './styles';\n\nconst TIMEZONELESS_FORMAT = 'YYYY-MM-DDTHH:mm:ss';\nconst ARIAL_LABEL_TIME_FORMAT = 'dddd, LL';\nconst noop = () => {};\n\nfunction DatePickerDay( { day, events = [] }: DatePickerDayProps ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\n\t/*\n\t * a11y hack to make the `There is/are n events` string\n\t * available speaking for readers,\n\t * re-defining the aria-label attribute.\n\t * This attribute is handled by the react-dates component.\n\t */\n\tuseEffect( () => {\n\t\t// Bail when no parent node.\n\t\tif ( ! ( ref?.current?.parentNode instanceof Element ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { parentNode } = ref.current;\n\t\tconst dayAriaLabel = moment( day ).format( ARIAL_LABEL_TIME_FORMAT );\n\n\t\tif ( ! events.length ) {\n\t\t\t// Set aria-label without event description.\n\t\t\tparentNode.setAttribute( 'aria-label', dayAriaLabel );\n\t\t\treturn;\n\t\t}\n\n\t\tconst dayWithEventsDescription = sprintf(\n\t\t\t// translators: 1: Calendar day format, 2: Calendar event number.\n\t\t\t_n(\n\t\t\t\t'%1$s. There is %2$d event.',\n\t\t\t\t'%1$s. There are %2$d events.',\n\t\t\t\tevents.length\n\t\t\t),\n\t\t\tdayAriaLabel,\n\t\t\tevents.length\n\t\t);\n\n\t\tparentNode.setAttribute( 'aria-label', dayWithEventsDescription );\n\t}, [ day, events.length ] );\n\n\treturn (\n\t\t<Day\n\t\t\tref={ ref }\n\t\t\tclassName=\"components-datetime__date__day\" // Unused, for backwards compatibility.\n\t\t\thasEvents={ !! events?.length }\n\t\t\talignment=\"center\"\n\t\t>\n\t\t\t{ day.format( 'D' ) }\n\t\t</Day>\n\t);\n}\n\n/**\n * DatePicker is a React component that renders a calendar for date selection.\n *\n * ```jsx\n * import { DatePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDatePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DatePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * />\n * );\n * };\n * ```\n */\nexport function DatePicker( {\n\tcurrentDate,\n\tonChange,\n\tevents,\n\tisInvalidDate,\n\tonMonthPreviewed,\n\tstartOfWeek = 0,\n}: DatePickerProps ) {\n\tconst nodeRef = useRef< HTMLDivElement >( null );\n\n\tconst onMonthPreviewedHandler = ( newMonthDate: Moment ) => {\n\t\tonMonthPreviewed?.( newMonthDate.toISOString() );\n\t\tkeepFocusInside();\n\t};\n\n\t/*\n\t * Todo: We should remove this function ASAP.\n\t * It is kept because focus is lost when we click on the previous and next month buttons.\n\t * This focus loss closes the date picker popover.\n\t * Ideally we should add an upstream commit on react-dates to fix this issue.\n\t */\n\tconst keepFocusInside = () => {\n\t\tif ( ! nodeRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = nodeRef.current;\n\t\tconst { activeElement } = ownerDocument;\n\n\t\t// If focus was lost.\n\t\tif (\n\t\t\t! activeElement ||\n\t\t\t! nodeRef.current.contains( ownerDocument.activeElement )\n\t\t) {\n\t\t\t// Retrieve the focus region div.\n\t\t\tconst focusRegion = nodeRef.current.querySelector(\n\t\t\t\t'.DayPicker_focusRegion'\n\t\t\t);\n\t\t\tif ( ! ( focusRegion instanceof HTMLElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Keep the focus on focus region.\n\t\t\tfocusRegion.focus();\n\t\t}\n\t};\n\n\tconst onChangeMoment = ( newDate: Moment | null ) => {\n\t\tif ( ! newDate ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If currentDate is null, use now as momentTime to designate hours, minutes, seconds.\n\t\tconst momentDate = currentDate ? moment( currentDate ) : moment();\n\t\tconst momentTime = {\n\t\t\thours: momentDate.hours(),\n\t\t\tminutes: momentDate.minutes(),\n\t\t\tseconds: 0,\n\t\t};\n\n\t\tonChange?.( newDate.set( momentTime ).format( TIMEZONELESS_FORMAT ) );\n\n\t\t// Keep focus on the date picker.\n\t\tkeepFocusInside();\n\t};\n\n\tconst getEventsPerDay = ( day: Moment ) => {\n\t\tif ( ! events?.length ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn events.filter( ( eventDay ) =>\n\t\t\tday.isSame( eventDay.date, 'day' )\n\t\t);\n\t};\n\n\tconst momentDate = getMomentDate( currentDate );\n\n\treturn (\n\t\t<div className=\"components-datetime__date\" ref={ nodeRef }>\n\t\t\t<DayPickerSingleDateController\n\t\t\t\tdate={ momentDate }\n\t\t\t\tinitialVisibleMonth={ null }\n\t\t\t\tdaySize={ 30 }\n\t\t\t\thorizontalMonthPadding={ 0 }\n\t\t\t\tfocused\n\t\t\t\thideKeyboardShortcutsPanel\n\t\t\t\t// This is a hack to force the calendar to update on month or year change\n\t\t\t\t// https://github.com/airbnb/react-dates/issues/240#issuecomment-361776665\n\t\t\t\tkey={ `datepicker-controller-${\n\t\t\t\t\tmomentDate ? momentDate.format( 'MM-YYYY' ) : 'null'\n\t\t\t\t}` }\n\t\t\t\tnoBorder\n\t\t\t\tnumberOfMonths={ 1 }\n\t\t\t\tonDateChange={ onChangeMoment }\n\t\t\t\ttransitionDuration={ 0 }\n\t\t\t\tweekDayFormat=\"ddd\"\n\t\t\t\tdayAriaLabelFormat={ ARIAL_LABEL_TIME_FORMAT }\n\t\t\t\tisRTL={ isRTL() }\n\t\t\t\tisOutsideRange={ ( date ) => {\n\t\t\t\t\treturn !! isInvalidDate && isInvalidDate( date.toDate() );\n\t\t\t\t} }\n\t\t\t\tfirstDayOfWeek={ startOfWeek }\n\t\t\t\tonPrevMonthClick={ onMonthPreviewedHandler }\n\t\t\t\tonNextMonthClick={ onMonthPreviewedHandler }\n\t\t\t\trenderDayContents={ ( day ) => (\n\t\t\t\t\t<DatePickerDay\n\t\t\t\t\t\tday={ day }\n\t\t\t\t\t\tevents={ getEventsPerDay( day ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\trenderMonthElement={ ( { month } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<strong>{ month.format( 'MMMM' ) }</strong>{ ' ' }\n\t\t\t\t\t\t{ month.format( 'YYYY' ) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\trenderNavPrevButton={ ( { ariaLabel, ...props } ) => (\n\t\t\t\t\t<NavPrevButton\n\t\t\t\t\t\ticon={ arrowLeft }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\trenderNavNextButton={ ( { ariaLabel, ...props } ) => (\n\t\t\t\t\t<NavNextButton\n\t\t\t\t\t\ticon={ arrowRight }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\tonFocusChange={ noop }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default DatePicker;\n"]}
|
|
@@ -61,6 +61,7 @@ function UnforwardedDateTimePicker(_ref, ref) {
|
|
|
61
61
|
onMonthPreviewed = noop,
|
|
62
62
|
onChange,
|
|
63
63
|
events,
|
|
64
|
+
startOfWeek,
|
|
64
65
|
__nextRemoveHelpButton = false,
|
|
65
66
|
__nextRemoveResetButton = false
|
|
66
67
|
} = _ref;
|
|
@@ -101,7 +102,8 @@ function UnforwardedDateTimePicker(_ref, ref) {
|
|
|
101
102
|
onChange: onChange,
|
|
102
103
|
isInvalidDate: isInvalidDate,
|
|
103
104
|
events: events,
|
|
104
|
-
onMonthPreviewed: onMonthPreviewed
|
|
105
|
+
onMonthPreviewed: onMonthPreviewed,
|
|
106
|
+
startOfWeek: startOfWeek
|
|
105
107
|
})), calendarHelpIsVisible && (0, _element.createElement)(_styles.CalendarHelp, {
|
|
106
108
|
className: "components-datetime__calendar-help" // Unused, for backwards compatibility.
|
|
107
109
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/date-time/date-time/index.tsx"],"names":["noop","UnforwardedDateTimePicker","ref","currentDate","is12Hour","isInvalidDate","onMonthPreviewed","onChange","events","__nextRemoveHelpButton","__nextRemoveResetButton","since","version","hint","calendarHelpIsVisible","setCalendarHelpIsVisible","onClickDescriptionToggle","DateTimePicker"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAtBA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;AAYA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,yBAAT,OAWCC,GAXD,EAYE;AAAA,MAXD;AACCC,IAAAA,WADD;AAECC,IAAAA,QAFD;AAGCC,IAAAA,aAHD;AAICC,IAAAA,gBAAgB,GAAGN,IAJpB;AAKCO,IAAAA,QALD;AAMCC,IAAAA,MAND;AAOCC,IAAAA,sBAAsB,GAAG,KAP1B;AAQCC,IAAAA,uBAAuB,GAAG;AAR3B,GAWC;;AACD,MAAK,CAAED,sBAAP,EAAgC;AAC/B,6BAAY,6CAAZ,EAA2D;AAC1DE,MAAAA,KAAK,EAAE,MADmD;AAE1DC,MAAAA,OAAO,EAAE,MAFiD;AAEzC;AACjBC,MAAAA,IAAI,EAAE;AAHoD,KAA3D;AAKA;;AACD,MAAK,CAAEH,uBAAP,EAAiC;AAChC,6BAAY,8CAAZ,EAA4D;AAC3DC,MAAAA,KAAK,EAAE,MADoD;AAE3DC,MAAAA,OAAO,EAAE,MAFkD;AAE1C;AACjBC,MAAAA,IAAI,EAAE;AAHqD,KAA5D;AAKA;;AAED,QAAM,CAAEC,qBAAF,EAAyBC,wBAAzB,IACL,uBAAU,KAAV,CADD;;AAGA,WAASC,wBAAT,GAAoC;AACnCD,IAAAA,wBAAwB,CAAE,CAAED,qBAAJ,CAAxB;AACA;;AAED,SACC;AAAK,IAAA,GAAG,EAAGZ,GAAX;AAAiB,IAAA,SAAS,EAAC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C,CARH,CA7CD,CAfD,CAlBF,EA6FG,CAAE,CAAEJ,uBAAF,IAA6B,CAAED,sBAAjC,KACD,4BAAC,cAAD;AACC,IAAA,SAAS,EAAC,8BADX,CAC0C;;AAD1C,KAGG,CAAEC,uBAAF,IACD,CAAEI,qBADD,IAEDX,WAFC,IAGA,4BAAC,eAAD;AACC,IAAA,SAAS,EAAC,wCADX,CACoD;AADpD;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,OAAO,EAAG,MAAMI,QAAN,aAAMA,QAAN,uBAAMA,QAAQ,CAAI,IAAJ;AAHzB,KAKG,cAAI,OAAJ,CALH,CANH,EAcC,4BAAC,cAAD,OAdD,EAeG,CAAEE,sBAAF,IACD,4BAAC,eAAD;AACC,IAAA,SAAS,EAAC,uCADX,CACmD;AADnD;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,OAAO,EAAGO;AAHX,KAKGF,qBAAqB,GACpB,cAAI,OAAJ,CADoB,GAEpB,cAAI,eAAJ,CAPJ,CAhBF,CA9FF,CADD;AA6HA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMG,cAAc,GAAG,yBAAYhB,yBAAZ,CAAvB;;eAEQgB,c","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState, forwardRef } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport type { DateTimePickerProps } from '../types';\nimport { CalendarHelp } from './styles';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { Spacer } from '../../spacer';\n\nexport { DatePicker, TimePicker };\n\nconst noop = () => {};\n\nfunction UnforwardedDateTimePicker(\n\t{\n\t\tcurrentDate,\n\t\tis12Hour,\n\t\tisInvalidDate,\n\t\tonMonthPreviewed = noop,\n\t\tonChange,\n\t\tevents,\n\t\t__nextRemoveHelpButton = false,\n\t\t__nextRemoveResetButton = false,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\tif ( ! __nextRemoveHelpButton ) {\n\t\tdeprecated( 'Help button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\tif ( ! __nextRemoveResetButton ) {\n\t\tdeprecated( 'Reset button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tconst [ calendarHelpIsVisible, setCalendarHelpIsVisible ] =\n\t\tuseState( false );\n\n\tfunction onClickDescriptionToggle() {\n\t\tsetCalendarHelpIsVisible( ! calendarHelpIsVisible );\n\t}\n\n\treturn (\n\t\t<div ref={ ref } className=\"components-datetime\">\n\t\t\t{ ! calendarHelpIsVisible && (\n\t\t\t\t<>\n\t\t\t\t\t<TimePicker\n\t\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\t/>\n\t\t\t\t\t<DatePicker\n\t\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\t\tevents={ events }\n\t\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ calendarHelpIsVisible && (\n\t\t\t\t<CalendarHelp\n\t\t\t\t\tclassName=\"components-datetime__calendar-help\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<Heading level={ 4 }>{ __( 'Click to Select' ) }</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Click the right or left arrows to select other months in the past or the future.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>{ __( 'Click the desired day to select it.' ) }</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t{ __( 'Navigating with a keyboard' ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr\n\t\t\t\t\t\t\t\taria-label={ _x( 'Enter', 'keyboard button' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t↵\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{ __( 'Select the date in focus.' ) }</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Left and Right Arrows' ) }>\n\t\t\t\t\t\t\t\t←/→\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (left) or forward (right) by one day.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Up and Down Arrows' ) }>\n\t\t\t\t\t\t\t\t↑/↓\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (up) or forward (down) by one week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Page Up and Page Down' ) }>\n\t\t\t\t\t\t\t\t{ __( 'PgUp/PgDn' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (PgUp) or forward (PgDn) by one month.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Home and End' ) }>\n\t\t\t\t\t\t\t\t{ /* Translators: Home/End reffer to the 'Home' and 'End' buttons on the keyboard.*/ }\n\t\t\t\t\t\t\t\t{ __( 'Home/End' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Go to the first (Home) or last (End) day of a week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</CalendarHelp>\n\t\t\t) }\n\t\t\t{ ( ! __nextRemoveResetButton || ! __nextRemoveHelpButton ) && (\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__buttons\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ ! __nextRemoveResetButton &&\n\t\t\t\t\t\t! calendarHelpIsVisible &&\n\t\t\t\t\t\tcurrentDate && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__date-reset-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\tonClick={ () => onChange?.( null ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t{ ! __nextRemoveHelpButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-datetime__date-help-toggle\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ onClickDescriptionToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ calendarHelpIsVisible\n\t\t\t\t\t\t\t\t? __( 'Close' )\n\t\t\t\t\t\t\t\t: __( 'Calendar Help' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DateTimePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef( UnforwardedDateTimePicker );\n\nexport default DateTimePicker;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/date-time/date-time/index.tsx"],"names":["noop","UnforwardedDateTimePicker","ref","currentDate","is12Hour","isInvalidDate","onMonthPreviewed","onChange","events","startOfWeek","__nextRemoveHelpButton","__nextRemoveResetButton","since","version","hint","calendarHelpIsVisible","setCalendarHelpIsVisible","onClickDescriptionToggle","DateTimePicker"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAtBA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;AAYA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,yBAAT,OAYCC,GAZD,EAaE;AAAA,MAZD;AACCC,IAAAA,WADD;AAECC,IAAAA,QAFD;AAGCC,IAAAA,aAHD;AAICC,IAAAA,gBAAgB,GAAGN,IAJpB;AAKCO,IAAAA,QALD;AAMCC,IAAAA,MAND;AAOCC,IAAAA,WAPD;AAQCC,IAAAA,sBAAsB,GAAG,KAR1B;AASCC,IAAAA,uBAAuB,GAAG;AAT3B,GAYC;;AACD,MAAK,CAAED,sBAAP,EAAgC;AAC/B,6BAAY,6CAAZ,EAA2D;AAC1DE,MAAAA,KAAK,EAAE,MADmD;AAE1DC,MAAAA,OAAO,EAAE,MAFiD;AAEzC;AACjBC,MAAAA,IAAI,EAAE;AAHoD,KAA3D;AAKA;;AACD,MAAK,CAAEH,uBAAP,EAAiC;AAChC,6BAAY,8CAAZ,EAA4D;AAC3DC,MAAAA,KAAK,EAAE,MADoD;AAE3DC,MAAAA,OAAO,EAAE,MAFkD;AAE1C;AACjBC,MAAAA,IAAI,EAAE;AAHqD,KAA5D;AAKA;;AAED,QAAM,CAAEC,qBAAF,EAAyBC,wBAAzB,IACL,uBAAU,KAAV,CADD;;AAGA,WAASC,wBAAT,GAAoC;AACnCD,IAAAA,wBAAwB,CAAE,CAAED,qBAAJ,CAAxB;AACA;;AAED,SACC;AAAK,IAAA,GAAG,EAAGb,GAAX;AAAiB,IAAA,SAAS,EAAC;AAA3B,KACG,CAAEa,qBAAF,IACD,qDACC,4BAAC,aAAD;AACC,IAAA,WAAW,EAA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CAAEJ,uBAAF,IAA6B,CAAED,sBAAjC,KACD,4BAAC,cAAD;AACC,IAAA,SAAS,EAAC,8BADX,CAC0C;;AAD1C,KAGG,CAAEC,uBAAF,IACD,CAAEI,qBADD,IAEDZ,WAFC,IAGA,4BAAC,eAAD;AACC,IAAA,SAAS,EAAC,wCADX,CACoD;AADpD;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,OAAO,EAAG,MAAMI,QAAN,aAAMA,QAAN,uBAAMA,QAAQ,CAAI,IAAJ;AAHzB,KAKG,cAAI,OAAJ,CALH,CANH,EAcC,4BAAC,cAAD,OAdD,EAeG,CAAEG,sBAAF,IACD,4BAAC,eAAD;AACC,IAAA,SAAS,EAAC,uCADX,CACmD;AADnD;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,OAAO,EAAGO;AAHX,KAKGF,qBAAqB,GACpB,cAAI,OAAJ,CADoB,GAEpB,cAAI,eAAJ,CAPJ,CAhBF,CA/FF,CADD;AA8HA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMG,cAAc,GAAG,yBAAYjB,yBAAZ,CAAvB;;eAEQiB,c","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState, forwardRef } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport type { DateTimePickerProps } from '../types';\nimport { CalendarHelp } from './styles';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { Spacer } from '../../spacer';\n\nexport { DatePicker, TimePicker };\n\nconst noop = () => {};\n\nfunction UnforwardedDateTimePicker(\n\t{\n\t\tcurrentDate,\n\t\tis12Hour,\n\t\tisInvalidDate,\n\t\tonMonthPreviewed = noop,\n\t\tonChange,\n\t\tevents,\n\t\tstartOfWeek,\n\t\t__nextRemoveHelpButton = false,\n\t\t__nextRemoveResetButton = false,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\tif ( ! __nextRemoveHelpButton ) {\n\t\tdeprecated( 'Help button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\tif ( ! __nextRemoveResetButton ) {\n\t\tdeprecated( 'Reset button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tconst [ calendarHelpIsVisible, setCalendarHelpIsVisible ] =\n\t\tuseState( false );\n\n\tfunction onClickDescriptionToggle() {\n\t\tsetCalendarHelpIsVisible( ! calendarHelpIsVisible );\n\t}\n\n\treturn (\n\t\t<div ref={ ref } className=\"components-datetime\">\n\t\t\t{ ! calendarHelpIsVisible && (\n\t\t\t\t<>\n\t\t\t\t\t<TimePicker\n\t\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\t/>\n\t\t\t\t\t<DatePicker\n\t\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\t\tevents={ events }\n\t\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\t\tstartOfWeek={ startOfWeek }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ calendarHelpIsVisible && (\n\t\t\t\t<CalendarHelp\n\t\t\t\t\tclassName=\"components-datetime__calendar-help\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<Heading level={ 4 }>{ __( 'Click to Select' ) }</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Click the right or left arrows to select other months in the past or the future.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>{ __( 'Click the desired day to select it.' ) }</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t{ __( 'Navigating with a keyboard' ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr\n\t\t\t\t\t\t\t\taria-label={ _x( 'Enter', 'keyboard button' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t↵\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{ __( 'Select the date in focus.' ) }</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Left and Right Arrows' ) }>\n\t\t\t\t\t\t\t\t←/→\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (left) or forward (right) by one day.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Up and Down Arrows' ) }>\n\t\t\t\t\t\t\t\t↑/↓\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (up) or forward (down) by one week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Page Up and Page Down' ) }>\n\t\t\t\t\t\t\t\t{ __( 'PgUp/PgDn' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Move backward (PgUp) or forward (PgDn) by one month.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Home and End' ) }>\n\t\t\t\t\t\t\t\t{ /* Translators: Home/End reffer to the 'Home' and 'End' buttons on the keyboard.*/ }\n\t\t\t\t\t\t\t\t{ __( 'Home/End' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Go to the first (Home) or last (End) day of a week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</CalendarHelp>\n\t\t\t) }\n\t\t\t{ ( ! __nextRemoveResetButton || ! __nextRemoveHelpButton ) && (\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__buttons\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ ! __nextRemoveResetButton &&\n\t\t\t\t\t\t! calendarHelpIsVisible &&\n\t\t\t\t\t\tcurrentDate && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__date-reset-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\tonClick={ () => onChange?.( null ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t{ ! __nextRemoveHelpButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-datetime__date-help-toggle\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ onClickDescriptionToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ calendarHelpIsVisible\n\t\t\t\t\t\t\t\t? __( 'Close' )\n\t\t\t\t\t\t\t\t: __( 'Calendar Help' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DateTimePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef( UnforwardedDateTimePicker );\n\nexport default DateTimePicker;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/divider/component.tsx"],"names":["UnconnectedDivider","props","forwardedRef","contextProps","DividerView","Divider"],"mappings":";;;;;;;;;;;;;AAIA;;AAMA;;AAKA;;AAfA;AACA;AACA;AACA;;AAIA;AACA;AACA;AASA,SAASA,kBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,YAAY,GAAG,+BAAkBF,KAAlB,EAAyB,SAAzB,CAArB;AAEA,SACC,4BAAC,iBAAD;AACC,IAAA,EAAE,EAAGG;AADN,KAEMD,YAFN;AAGC,IAAA,GAAG,EAAGD;AAHP,KADD;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/divider/component.tsx"],"names":["UnconnectedDivider","props","forwardedRef","contextProps","DividerView","Divider"],"mappings":";;;;;;;;;;;;;AAIA;;AAMA;;AAKA;;AAfA;AACA;AACA;AACA;;AAIA;AACA;AACA;AASA,SAASA,kBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,YAAY,GAAG,+BAAkBF,KAAlB,EAAyB,SAAzB,CAArB;AAEA,SACC,4BAAC,iBAAD;AACC,IAAA,EAAE,EAAGG;AADN,KAEMD,YAFN;AAGC,IAAA,GAAG,EAAGD;AAHP,KADD;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMG,OAAO,GAAG,6BAAgBL,kBAAhB,EAAoC,SAApC,CAAhB;;eAEQK,O","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { Separator } from 'reakit';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport { DividerView } from './styles';\nimport type { DividerProps } from './types';\n\nfunction UnconnectedDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst contextProps = useContextSystem( props, 'Divider' );\n\n\treturn (\n\t\t<Separator\n\t\t\tas={ DividerView }\n\t\t\t{ ...contextProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * `Divider` is a layout component that separates groups of related content.\n *\n * ```js\n * import {\n * \t\t__experimentalDivider as Divider,\n * \t\t__experimentalText as Text,\n * \t\t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack spacing={4}>\n * \t\t\t<Text>Some text here</Text>\n * \t\t\t<Divider />\n * \t\t\t<Text>Some more text here</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nexport const Divider = contextConnect( UnconnectedDivider, 'Divider' );\n\nexport default Divider;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/divider/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as Divider } from './component';\nexport type {
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/divider/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as Divider } from './component';\nexport type { DividerProps } from './types';\n"]}
|
package/build/divider/styles.js
CHANGED
|
@@ -40,7 +40,7 @@ const renderMargin = _ref2 => {
|
|
|
40
40
|
return /*#__PURE__*/(0, _react.css)((0, _utils.rtl)({
|
|
41
41
|
[MARGIN_DIRECTIONS[orientation].start]: (0, _space.space)(marginStart !== null && marginStart !== void 0 ? marginStart : margin),
|
|
42
42
|
[MARGIN_DIRECTIONS[orientation].end]: (0, _space.space)(marginEnd !== null && marginEnd !== void 0 ? marginEnd : margin)
|
|
43
|
-
})(), process.env.NODE_ENV === "production" ? "" : ";label:renderMargin;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
43
|
+
})(), process.env.NODE_ENV === "production" ? "" : ";label:renderMargin;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZGl2aWRlci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0NDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZGl2aWRlci9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdWkvdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBEaXZpZGVyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgTUFSR0lOX0RJUkVDVElPTlM6IFJlY29yZDxcblx0Tm9uTnVsbGFibGU8IERpdmlkZXJQcm9wc1sgJ29yaWVudGF0aW9uJyBdID4sXG5cdFJlY29yZDwgJ3N0YXJ0JyB8ICdlbmQnLCBzdHJpbmcgPlxuPiA9IHtcblx0dmVydGljYWw6IHtcblx0XHRzdGFydDogJ21hcmdpbkxlZnQnLFxuXHRcdGVuZDogJ21hcmdpblJpZ2h0Jyxcblx0fSxcblx0aG9yaXpvbnRhbDoge1xuXHRcdHN0YXJ0OiAnbWFyZ2luVG9wJyxcblx0XHRlbmQ6ICdtYXJnaW5Cb3R0b20nLFxuXHR9LFxufTtcblxuLy8gUmVuZGVycyB0aGUgY29yc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yID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRbIG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2JvcmRlclJpZ2h0JyA6ICdib3JkZXJCb3R0b20nIF06XG5cdFx0XHQnMXB4IHNvbGlkIGN1cnJlbnRDb2xvcicsXG5cdH0gKTtcbn07XG5cbmNvbnN0IHJlbmRlclNpemUgPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn06IERpdmlkZXJQcm9wcyApID0+XG5cdGNzcygge1xuXHRcdGhlaWdodDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAnYXV0bycgOiAwLFxuXHRcdHdpZHRoOiBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/IDAgOiAnYXV0bycsXG5cdH0gKTtcblxuZXhwb3J0IGNvbnN0IERpdmlkZXJWaWV3ID0gc3R5bGVkLmhyPCBEaXZpZGVyUHJvcHMgPmBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cblx0JHsgcmVuZGVyRGlzcGxheSB9XG5cdCR7IHJlbmRlckJvcmRlciB9XG5cdCR7IHJlbmRlclNpemUgfVxuXHQkeyByZW5kZXJNYXJnaW4gfVxuYDtcbiJdfQ== */");
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -49,7 +49,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
49
49
|
} : {
|
|
50
50
|
name: "9r0jm7-renderDisplay",
|
|
51
51
|
styles: "display:inline;label:renderDisplay;",
|
|
52
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
52
|
+
map: "/*# sourceMappingURL=data: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naG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRbIG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2JvcmRlclJpZ2h0JyA6ICdib3JkZXJCb3R0b20nIF06XG5cdFx0XHQnMXB4IHNvbGlkIGN1cnJlbnRDb2xvcicsXG5cdH0gKTtcbn07XG5cbmNvbnN0IHJlbmRlclNpemUgPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn06IERpdmlkZXJQcm9wcyApID0+XG5cdGNzcygge1xuXHRcdGhlaWdodDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAnYXV0bycgOiAwLFxuXHRcdHdpZHRoOiBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/IDAgOiAnYXV0bycsXG5cdH0gKTtcblxuZXhwb3J0IGNvbnN0IERpdmlkZXJWaWV3ID0gc3R5bGVkLmhyPCBEaXZpZGVyUHJvcHMgPmBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cblx0JHsgcmVuZGVyRGlzcGxheSB9XG5cdCR7IHJlbmRlckJvcmRlciB9XG5cdCR7IHJlbmRlclNpemUgfVxuXHQkeyByZW5kZXJNYXJnaW4gfVxuYDtcbiJdfQ== */",
|
|
53
53
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
54
54
|
};
|
|
55
55
|
|
|
@@ -66,7 +66,7 @@ const renderBorder = _ref4 => {
|
|
|
66
66
|
} = _ref4;
|
|
67
67
|
return /*#__PURE__*/(0, _react.css)({
|
|
68
68
|
[orientation === 'vertical' ? 'borderRight' : 'borderBottom']: '1px solid currentColor'
|
|
69
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:renderBorder;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
69
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:renderBorder;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZGl2aWRlci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMERRIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZGl2aWRlci9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdWkvdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBEaXZpZGVyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgTUFSR0lOX0RJUkVDVElPTlM6IFJlY29yZDxcblx0Tm9uTnVsbGFibGU8IERpdmlkZXJQcm9wc1sgJ29yaWVudGF0aW9uJyBdID4sXG5cdFJlY29yZDwgJ3N0YXJ0JyB8ICdlbmQnLCBzdHJpbmcgPlxuPiA9IHtcblx0dmVydGljYWw6IHtcblx0XHRzdGFydDogJ21hcmdpbkxlZnQnLFxuXHRcdGVuZDogJ21hcmdpblJpZ2h0Jyxcblx0fSxcblx0aG9yaXpvbnRhbDoge1xuXHRcdHN0YXJ0OiAnbWFyZ2luVG9wJyxcblx0XHRlbmQ6ICdtYXJnaW5Cb3R0b20nLFxuXHR9LFxufTtcblxuLy8gUmV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gcmVuZGVyQm9yZGVyID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRbIG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2JvcmRlclJpZ2h0JyA6ICdib3JkZXJCb3R0b20nIF06XG5cdFx0XHQnMXB4IHNvbGlkIGN1cnJlbnRDb2xvcicsXG5cdH0gKTtcbn07XG5cbmNvbnN0IHJlbmRlclNpemUgPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn06IERpdmlkZXJQcm9wcyApID0+XG5cdGNzcygge1xuXHRcdGhlaWdodDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAnYXV0bycgOiAwLFxuXHRcdHdpZHRoOiBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/IDAgOiAnYXV0bycsXG5cdH0gKTtcblxuZXhwb3J0IGNvbnN0IERpdmlkZXJWaWV3ID0gc3R5bGVkLmhyPCBEaXZpZGVyUHJvcHMgPmBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cblx0JHsgcmVuZGVyRGlzcGxheSB9XG5cdCR7IHJlbmRlckJvcmRlciB9XG5cdCR7IHJlbmRlclNpemUgfVxuXHQkeyByZW5kZXJNYXJnaW4gfVxuYDtcbiJdfQ== */");
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
const renderSize = _ref5 => {
|
|
@@ -76,7 +76,7 @@ const renderSize = _ref5 => {
|
|
|
76
76
|
return /*#__PURE__*/(0, _react.css)({
|
|
77
77
|
height: orientation === 'vertical' ? 'auto' : 0,
|
|
78
78
|
width: orientation === 'vertical' ? 0 : 'auto'
|
|
79
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:renderSize;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
79
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:renderSize;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZGl2aWRlci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUVDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZGl2aWRlci9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdWkvdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBEaXZpZGVyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgTUFSR0lOX0RJUkVDVElPTlM6IFJlY29yZDxcblx0Tm9uTnVsbGFibGU8IERpdmlkZXJQcm9wc1sgJ29yaWVudGF0aW9uJyBdID4sXG5cdFJlY29yZDwgJ3N0YXJ0JyB8ICdlbmQnLCBzdHJpbmcgPlxuPiA9IHtcblx0dmVydGljYWw6IHtcblx0XHRzdGFydDogJ21hcmdpbkxlZnQnLFxuXHRcdGVuZDogJ21hcmdpblJpZ2h0Jyxcblx0fSxcblx0aG9yaXpvbnRhbDoge1xuXHRcdHN0YXJ0OiAnbWFyZ2luVG9wJyxcblx0X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dpbmxpbmUnIH0gKVxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuY29uc3QgcmVuZGVyQm9yZGVyID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRbIG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2JvcmRlclJpZ2h0JyA6ICdib3JkZXJCb3R0b20nIF06XG5cdFx0XHQnMXB4IHNvbGlkIGN1cnJlbnRDb2xvcicsXG5cdH0gKTtcbn07XG5cbmNvbnN0IHJlbmRlclNpemUgPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn06IERpdmlkZXJQcm9wcyApID0+XG5cdGNzcygge1xuXHRcdGhlaWdodDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAnYXV0bycgOiAwLFxuXHRcdHdpZHRoOiBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/IDAgOiAnYXV0bycsXG5cdH0gKTtcblxuZXhwb3J0IGNvbnN0IERpdmlkZXJWaWV3ID0gc3R5bGVkLmhyPCBEaXZpZGVyUHJvcHMgPmBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cblx0JHsgcmVuZGVyRGlzcGxheSB9XG5cdCR7IHJlbmRlckJvcmRlciB9XG5cdCR7IHJlbmRlclNpemUgfVxuXHQkeyByZW5kZXJNYXJnaW4gfVxuYDtcbiJdfQ== */");
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
const DividerView = (0, _base.default)("hr", process.env.NODE_ENV === "production" ? {
|
|
@@ -84,6 +84,6 @@ const DividerView = (0, _base.default)("hr", process.env.NODE_ENV === "productio
|
|
|
84
84
|
} : {
|
|
85
85
|
target: "e19on6iw0",
|
|
86
86
|
label: "DividerView"
|
|
87
|
-
})("border:0;margin:0;", renderDisplay, " ", renderBorder, " ", renderSize, " ", renderMargin, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
87
|
+
})("border:0;margin:0;", renderDisplay, " ", renderBorder, " ", renderSize, " ", renderMargin, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZGl2aWRlci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0VvRCIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2RpdmlkZXIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3VpL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRGl2aWRlclByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IE1BUkdJTl9ESVJFQ1RJT05TOiBSZWNvcmQ8XG5cdE5vbk51bGxhYmxlPCBEaXZpZGVyUHJvcHNbICdvcmllbnRhdGlvbicgXSA+LFxuXHRSZWNvcmQ8ICdzdGFydCcgfCAnZW5kJywgc3RyaW5nID5cbj4gPSB7XG5cdHZlcnRpY2FsOiB7XG5cdFx0c3RhcnQ6ICdtYXJnaW5MZWZ0Jyxcblx0X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b3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCdcblx0XHQ/IGNzcyggeyBkaXNwbGF5OiAnaW5saW5lJyB9IClcblx0XHQ6IHVuZGVmaW5lZDtcbn07XG5cbmNvbnN0IHJlbmRlckJvcmRlciA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0WyBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/ICdib3JkZXJSaWdodCcgOiAnYm9yZGVyQm90dG9tJyBdOlxuXHRcdFx0JzFweCBzb2xpZCBjdXJyZW50Q29sb3InLFxuXHR9ICk7XG59O1xuXG5jb25zdCByZW5kZXJTaXplID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PlxuXHRjc3MoIHtcblx0XHRoZWlnaHQ6IG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2F1dG8nIDogMCxcblx0XHR3aWR0aDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAwIDogJ2F1dG8nLFxuXHR9ICk7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyVmlldyA9IHN0eWxlZC5ocjwgRGl2aWRlclByb3BzID5gXG5cdGJvcmRlcjogMDtcblx0bWFyZ2luOiAwO1xuXG5cdCR7IHJlbmRlckRpc3BsYXkgfVxuXHQkeyByZW5kZXJCb3JkZXIgfVxuXHQkeyByZW5kZXJTaXplIH1cblx0JHsgcmVuZGVyTWFyZ2luIH1cbmA7XG4iXX0= */"));
|
|
88
88
|
exports.DividerView = DividerView;
|
|
89
89
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/divider/styles.ts"],"names":["MARGIN_DIRECTIONS","vertical","start","end","horizontal","renderMargin","orientation","margin","marginStart","marginEnd","renderDisplay","undefined","renderBorder","renderSize","height","width","DividerView"],"mappings":";;;;;;;;;;;AAIA;;AAKA;;AACA;;;;AAGA,MAAMA,iBAGL,GAAG;AACHC,EAAAA,QAAQ,EAAE;AACTC,IAAAA,KAAK,EAAE,YADE;AAETC,IAAAA,GAAG,EAAE;AAFI,GADP;AAKHC,EAAAA,UAAU,EAAE;AACXF,IAAAA,KAAK,EAAE,WADI;AAEXC,IAAAA,GAAG,EAAE;AAFM;AALT,CAHJ,C,CAcA;AACA;AACA;;AACA,MAAME,YAAY,GAAG;AAAA,MAAE;AACtB,wBAAoBC,WAAW,GAAG,YADZ;AAEtBC,IAAAA,MAFsB;AAGtBC,IAAAA,WAHsB;AAItBC,IAAAA;AAJsB,GAAF;AAAA,sBAMpB,gBACC,gBAAK;AACJ,KAAET,iBAAiB,CAAEM,WAAF,CAAjB,CAAiCJ,KAAnC,GAA4C,kBAC3CM,WAD2C,aAC3CA,WAD2C,cAC3CA,WAD2C,GAC5BD,MAD4B,CADxC;AAIJ,KAAEP,iBAAiB,CAAEM,WAAF,CAAjB,CAAiCH,GAAnC,GAA0C,kBACzCM,SADyC,aACzCA,SADyC,cACzCA,SADyC,GAC5BF,MAD4B;AAJtC,GAAL,GADD,
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/divider/styles.ts"],"names":["MARGIN_DIRECTIONS","vertical","start","end","horizontal","renderMargin","orientation","margin","marginStart","marginEnd","renderDisplay","undefined","renderBorder","renderSize","height","width","DividerView"],"mappings":";;;;;;;;;;;AAIA;;AAKA;;AACA;;;;AAGA,MAAMA,iBAGL,GAAG;AACHC,EAAAA,QAAQ,EAAE;AACTC,IAAAA,KAAK,EAAE,YADE;AAETC,IAAAA,GAAG,EAAE;AAFI,GADP;AAKHC,EAAAA,UAAU,EAAE;AACXF,IAAAA,KAAK,EAAE,WADI;AAEXC,IAAAA,GAAG,EAAE;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OpBR,YAPoB,67FAAjB","sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { space } from '../ui/utils/space';\nimport { rtl } from '../utils';\nimport type { DividerProps } from './types';\n\nconst MARGIN_DIRECTIONS: Record<\n\tNonNullable< DividerProps[ 'orientation' ] >,\n\tRecord< 'start' | 'end', string >\n> = {\n\tvertical: {\n\t\tstart: 'marginLeft',\n\t\tend: 'marginRight',\n\t},\n\thorizontal: {\n\t\tstart: 'marginTop',\n\t\tend: 'marginBottom',\n\t},\n};\n\n// Renders the correct margins given the Divider's `orientation` and the writing direction.\n// When both the generic `margin` and the specific `marginStart|marginEnd` props are defined,\n// the latter will take priority.\nconst renderMargin = ( {\n\t'aria-orientation': orientation = 'horizontal',\n\tmargin,\n\tmarginStart,\n\tmarginEnd,\n}: DividerProps ) =>\n\tcss(\n\t\trtl( {\n\t\t\t[ MARGIN_DIRECTIONS[ orientation ].start ]: space(\n\t\t\t\tmarginStart ?? margin\n\t\t\t),\n\t\t\t[ MARGIN_DIRECTIONS[ orientation ].end ]: space(\n\t\t\t\tmarginEnd ?? margin\n\t\t\t),\n\t\t} )()\n\t);\n\nconst renderDisplay = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) => {\n\treturn orientation === 'vertical'\n\t\t? css( { display: 'inline' } )\n\t\t: undefined;\n};\n\nconst renderBorder = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) => {\n\treturn css( {\n\t\t[ orientation === 'vertical' ? 'borderRight' : 'borderBottom' ]:\n\t\t\t'1px solid currentColor',\n\t} );\n};\n\nconst renderSize = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) =>\n\tcss( {\n\t\theight: orientation === 'vertical' ? 'auto' : 0,\n\t\twidth: orientation === 'vertical' ? 0 : 'auto',\n\t} );\n\nexport const DividerView = styled.hr< DividerProps >`\n\tborder: 0;\n\tmargin: 0;\n\n\t${ renderDisplay }\n\t${ renderBorder }\n\t${ renderSize }\n\t${ renderMargin }\n`;\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.DropdownContentWrapper = void 0;
|
|
9
|
+
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _context = require("../ui/context");
|
|
15
|
+
|
|
16
|
+
var _styles = require("./styles");
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* External dependencies
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Internal dependencies
|
|
24
|
+
*/
|
|
25
|
+
function UnconnectedDropdownContentWrapper(props, forwardedRef) {
|
|
26
|
+
const {
|
|
27
|
+
paddingSize = 'small',
|
|
28
|
+
...derivedProps
|
|
29
|
+
} = (0, _context.useContextSystem)(props, 'DropdownContentWrapper');
|
|
30
|
+
return (0, _element.createElement)(_styles.DropdownContentWrapperDiv, (0, _extends2.default)({}, derivedProps, {
|
|
31
|
+
paddingSize: paddingSize,
|
|
32
|
+
ref: forwardedRef
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A convenience wrapper for the `renderContent` when you want to apply
|
|
37
|
+
* different padding. (Default is `paddingSize="small"`).
|
|
38
|
+
*
|
|
39
|
+
* ```jsx
|
|
40
|
+
* import {
|
|
41
|
+
* Dropdown,
|
|
42
|
+
* __experimentalDropdownContentWrapper as DropdownContentWrapper,
|
|
43
|
+
* } from '@wordpress/components';
|
|
44
|
+
*
|
|
45
|
+
* <Dropdown
|
|
46
|
+
* renderContent={ () => (
|
|
47
|
+
* <DropdownContentWrapper paddingSize="medium">
|
|
48
|
+
* My dropdown content
|
|
49
|
+
* </DropdownContentWrapper>
|
|
50
|
+
* ) }
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
const DropdownContentWrapper = (0, _context.contextConnect)(UnconnectedDropdownContentWrapper, 'DropdownContentWrapper');
|
|
57
|
+
exports.DropdownContentWrapper = DropdownContentWrapper;
|
|
58
|
+
var _default = DropdownContentWrapper;
|
|
59
|
+
exports.default = _default;
|
|
60
|
+
//# sourceMappingURL=dropdown-content-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/dropdown/dropdown-content-wrapper.tsx"],"names":["UnconnectedDropdownContentWrapper","props","forwardedRef","paddingSize","derivedProps","DropdownContentWrapper"],"mappings":";;;;;;;;;;;;;AAQA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;AASA,SAASA,iCAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AAAEC,IAAAA,WAAW,GAAG,OAAhB;AAAyB,OAAGC;AAA5B,MAA6C,+BAClDH,KADkD,EAElD,wBAFkD,CAAnD;AAKA,SACC,4BAAC,iCAAD,6BACMG,YADN;AAEC,IAAA,WAAW,EAAGD,WAFf;AAGC,IAAA,GAAG,EAAGD;AAHP,KADD;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMG,sBAAsB,GAAG,6BACrCL,iCADqC,EAErC,wBAFqC,CAA/B;;eAKQK,sB","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tWordPressComponentProps,\n\tcontextConnect,\n\tuseContextSystem,\n} from '../ui/context';\nimport { DropdownContentWrapperDiv } from './styles';\nimport type { DropdownContentWrapperProps } from './types';\n\nfunction UnconnectedDropdownContentWrapper(\n\tprops: WordPressComponentProps< DropdownContentWrapperProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { paddingSize = 'small', ...derivedProps } = useContextSystem(\n\t\tprops,\n\t\t'DropdownContentWrapper'\n\t);\n\n\treturn (\n\t\t<DropdownContentWrapperDiv\n\t\t\t{ ...derivedProps }\n\t\t\tpaddingSize={ paddingSize }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * A convenience wrapper for the `renderContent` when you want to apply\n * different padding. (Default is `paddingSize=\"small\"`).\n *\n * ```jsx\n * import {\n * Dropdown,\n * __experimentalDropdownContentWrapper as DropdownContentWrapper,\n * } from '@wordpress/components';\n *\n * <Dropdown\n * renderContent={ () => (\n * <DropdownContentWrapper paddingSize=\"medium\">\n * My dropdown content\n * </DropdownContentWrapper>\n * ) }\n * />\n * ```\n */\nexport const DropdownContentWrapper = contextConnect(\n\tUnconnectedDropdownContentWrapper,\n\t'DropdownContentWrapper'\n);\n\nexport default DropdownContentWrapper;\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.DropdownContentWrapperDiv = void 0;
|
|
9
|
+
|
|
10
|
+
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
11
|
+
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
var _space = require("../ui/utils/space");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* External dependencies
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Internal dependencies
|
|
22
|
+
*/
|
|
23
|
+
const padding = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
paddingSize = 'small'
|
|
26
|
+
} = _ref;
|
|
27
|
+
if (paddingSize === 'none') return;
|
|
28
|
+
const paddingValues = {
|
|
29
|
+
small: (0, _space.space)(2),
|
|
30
|
+
medium: (0, _space.space)(4)
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/(0, _react.css)("padding:", paddingValues[paddingSize] || paddingValues.small, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:padding;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZHJvcGRvd24vc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9CVyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2Ryb3Bkb3duL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91aS91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IERyb3Bkb3duQ29udGVudFdyYXBwZXJQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBwYWRkaW5nID0gKCB7IHBhZGRpbmdTaXplID0gJ3NtYWxsJyB9OiBEcm9wZG93bkNvbnRlbnRXcmFwcGVyUHJvcHMgKSA9PiB7XG5cdGlmICggcGFkZGluZ1NpemUgPT09ICdub25lJyApIHJldHVybjtcblxuXHRjb25zdCBwYWRkaW5nVmFsdWVzID0ge1xuXHRcdHNtYWxsOiBzcGFjZSggMiApLFxuXHRcdG1lZGl1bTogc3BhY2UoIDQgKSxcblx0fTtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdWYWx1ZXNbIHBhZGRpbmdTaXplIF0gfHwgcGFkZGluZ1ZhbHVlcy5zbWFsbCB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IERyb3Bkb3duQ29udGVudFdyYXBwZXJEaXYgPSBzdHlsZWQuZGl2PCBEcm9wZG93bkNvbnRlbnRXcmFwcGVyUHJvcHMgPmBcblx0Ly8gTmVnYXRpdmUgbWFyZ2luIHRvIHJlc2V0IChvZmZzZXQpIHRoZSBkZWZhdWx0IHBhZGRpbmcgb24gLmNvbXBvbmVudHMtcG9wb3Zlcl9fY29udGVudFxuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIC0yICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggLTIgKSB9O1xuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAtMiApIH07XG5cdH1cblx0JjpsYXN0LW9mLXR5cGUge1xuXHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAtMiApIH07XG5cdH1cblxuXHQkeyBwYWRkaW5nIH07XG5gO1xuIl19 */");
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const DropdownContentWrapperDiv = (0, _base.default)("div", process.env.NODE_ENV === "production" ? {
|
|
36
|
+
target: "eovvns30"
|
|
37
|
+
} : {
|
|
38
|
+
target: "eovvns30",
|
|
39
|
+
label: "DropdownContentWrapperDiv"
|
|
40
|
+
})("margin-left:", (0, _space.space)(-2), ";margin-right:", (0, _space.space)(-2), ";&:first-of-type{margin-top:", (0, _space.space)(-2), ";}&:last-of-type{margin-bottom:", (0, _space.space)(-2), ";}", padding, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data: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jwgRHJvcGRvd25Db250ZW50V3JhcHBlclByb3BzID5gXG5cdC8vIE5lZ2F0aXZlIG1hcmdpbiB0byByZXNldCAob2Zmc2V0KSB0aGUgZGVmYXVsdCBwYWRkaW5nIG9uIC5jb21wb25lbnRzLXBvcG92ZXJfX2NvbnRlbnRcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAtMiApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgc3BhY2UoIC0yICkgfTtcblx0JjpmaXJzdC1vZi10eXBlIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggLTIgKSB9O1xuXHR9XG5cdCY6bGFzdC1vZi10eXBlIHtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggLTIgKSB9O1xuXHR9XG5cblx0JHsgcGFkZGluZyB9O1xuYDtcbiJdfQ== */"));
|
|
41
|
+
exports.DropdownContentWrapperDiv = DropdownContentWrapperDiv;
|
|
42
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/dropdown/styles.ts"],"names":["padding","paddingSize","paddingValues","small","medium","css","DropdownContentWrapperDiv"],"mappings":";;;;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAIA;AACA;AACA;AAIA,MAAMA,OAAO,GAAG,QAA8D;AAAA,MAA5D;AAAEC,IAAAA,WAAW,GAAG;AAAhB,GAA4D;AAC7E,MAAKA,WAAW,KAAK,MAArB,EAA8B;AAE9B,QAAMC,aAAa,GAAG;AACrBC,IAAAA,KAAK,EAAE,kBAAO,CAAP,CADc;AAErBC,IAAAA,MAAM,EAAE,kBAAO,CAAP;AAFa,GAAtB;AAKA,0BAAOC,UAAP,cACaH,aAAa,CAAED,WAAF,CAAb,IAAgCC,aAAa,CAACC,KAD3D;AAGA,CAXD;;AAaO,MAAMG,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA,mBAErB,kBAAO,CAAC,CAAR,CAFqB,oBAGpB,kBAAO,CAAC,CAAR,CAHoB,kCAKrB,kBAAO,CAAC,CAAR,CALqB,qCAQlB,kBAAO,CAAC,CAAR,CARkB,QAWlCN,OAXkC,6mDAA/B","sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { space } from '../ui/utils/space';\nimport type { DropdownContentWrapperProps } from './types';\n\nconst padding = ( { paddingSize = 'small' }: DropdownContentWrapperProps ) => {\n\tif ( paddingSize === 'none' ) return;\n\n\tconst paddingValues = {\n\t\tsmall: space( 2 ),\n\t\tmedium: space( 4 ),\n\t};\n\n\treturn css`\n\t\tpadding: ${ paddingValues[ paddingSize ] || paddingValues.small };\n\t`;\n};\n\nexport const DropdownContentWrapperDiv = styled.div< DropdownContentWrapperProps >`\n\t// Negative margin to reset (offset) the default padding on .components-popover__content\n\tmargin-left: ${ space( -2 ) };\n\tmargin-right: ${ space( -2 ) };\n\t&:first-of-type {\n\t\tmargin-top: ${ space( -2 ) };\n\t}\n\t&:last-of-type {\n\t\tmargin-bottom: ${ space( -2 ) };\n\t}\n\n\t${ padding };\n`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|