@wordpress/components 19.8.4 → 19.11.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 +60 -0
- package/CONTRIBUTING.md +80 -7
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +11 -11
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +22 -7
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/hook.js +3 -2
- package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js +21 -8
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/hook.js +3 -2
- package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build/border-box-control/styles.js +11 -15
- package/build/border-box-control/styles.js.map +1 -1
- package/build/border-control/border-control/component.js +5 -3
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +6 -3
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +6 -2
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/hook.js +5 -5
- package/build/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build/border-control/styles.js +58 -29
- package/build/border-control/styles.js.map +1 -1
- package/build/box-control/index.js +0 -21
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/utils.js +1 -8
- package/build/box-control/utils.js.map +1 -1
- package/build/button/index.js +3 -5
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js +16 -2
- package/build/button/index.native.js.map +1 -1
- package/build/button-group/index.js +24 -7
- package/build/button-group/index.js.map +1 -1
- package/build/{flyout → button-group}/types.js +0 -0
- package/build/button-group/types.js.map +1 -0
- package/build/checkbox-control/index.js +34 -7
- package/build/checkbox-control/index.js.map +1 -1
- package/build/checkbox-control/types.js +6 -0
- package/build/checkbox-control/types.js.map +1 -0
- package/build/circular-option-picker/index.js +1 -2
- package/build/circular-option-picker/index.js.map +1 -1
- package/build/color-palette/index.js +5 -12
- package/build/color-palette/index.js.map +1 -1
- package/build/date-time/date.js +43 -19
- package/build/date-time/date.js.map +1 -1
- package/build/date-time/index.js +28 -3
- package/build/date-time/index.js.map +1 -1
- package/build/date-time/time.js +42 -40
- package/build/date-time/time.js.map +1 -1
- package/build/date-time/timezone.js +4 -3
- package/build/date-time/timezone.js.map +1 -1
- package/build/date-time/types.js +6 -0
- package/build/date-time/types.js.map +1 -0
- package/build/date-time/utils.js +6 -4
- package/build/date-time/utils.js.map +1 -1
- package/build/disabled/index.js +4 -76
- package/build/disabled/index.js.map +1 -1
- package/build/draggable/index.native.js +223 -0
- package/build/draggable/index.native.js.map +1 -0
- package/build/dropdown/index.js +7 -5
- package/build/dropdown/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js +3 -3
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/heading/hook.js +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/index.js +0 -8
- package/build/index.js.map +1 -1
- package/build/index.native.js +16 -0
- package/build/index.native.js.map +1 -1
- package/build/input-control/index.js +27 -4
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +42 -30
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +1 -1
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +4 -2
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/html-text-input/index.native.js +19 -8
- package/build/mobile/html-text-input/index.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js +28 -5
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +47 -24
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +12 -12
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/notice/index.native.js +44 -40
- package/build/notice/index.native.js.map +1 -1
- package/build/notice/list.native.js +27 -45
- package/build/notice/list.native.js.map +1 -1
- package/build/palette-edit/index.js +38 -7
- package/build/palette-edit/index.js.map +1 -1
- package/build/popover/index.js +223 -323
- package/build/popover/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +5 -8
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.js +2 -2
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +1 -1
- package/build/sandbox/index.native.js.map +1 -1
- package/build/select-control/index.js +31 -4
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +17 -14
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/surface/styles.js +8 -8
- package/build/surface/styles.js.map +1 -1
- package/build/text/hook.js +5 -5
- package/build/text/hook.js.map +1 -1
- package/build/text/styles/text-mixins.native.js +1 -1
- package/build/text/styles/text-mixins.native.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build/text-control/index.js +35 -28
- package/build/text-control/index.js.map +1 -1
- package/build/text-control/types.js +6 -0
- package/build/text-control/types.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/component.js +1 -3
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js +6 -4
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +52 -36
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tooltip/index.js +2 -2
- package/build/tooltip/index.js.map +1 -1
- package/build/ui/spinner/component.js +1 -1
- package/build/ui/spinner/component.js.map +1 -1
- package/build/unit-control/index.js +3 -3
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +11 -20
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/colors-values.js +9 -24
- package/build/utils/colors-values.js.map +1 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +11 -11
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +22 -7
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/hook.js +3 -2
- package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js +21 -8
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-visualizer/hook.js +3 -2
- package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build-module/border-box-control/styles.js +9 -15
- package/build-module/border-box-control/styles.js.map +1 -1
- package/build-module/border-control/border-control/component.js +5 -3
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js +6 -3
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +6 -2
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/hook.js +5 -5
- package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build-module/border-control/styles.js +56 -29
- package/build-module/border-control/styles.js.map +1 -1
- package/build-module/box-control/index.js +1 -20
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/utils.js +0 -6
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button/index.js +3 -4
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js +16 -3
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/button-group/index.js +27 -7
- package/build-module/button-group/index.js.map +1 -1
- package/build-module/{flyout → button-group}/types.js +0 -0
- package/build-module/{flyout → button-group}/types.js.map +0 -0
- package/build-module/checkbox-control/index.js +31 -7
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/checkbox-control/types.js +2 -0
- package/{build/flyout → build-module/checkbox-control}/types.js.map +0 -0
- package/build-module/circular-option-picker/index.js +1 -2
- package/build-module/circular-option-picker/index.js.map +1 -1
- package/build-module/color-palette/index.js +5 -11
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/date-time/date.js +44 -19
- package/build-module/date-time/date.js.map +1 -1
- package/build-module/date-time/index.js +28 -4
- package/build-module/date-time/index.js.map +1 -1
- package/build-module/date-time/time.js +43 -41
- package/build-module/date-time/time.js.map +1 -1
- package/build-module/date-time/timezone.js +4 -3
- package/build-module/date-time/timezone.js.map +1 -1
- package/build-module/date-time/types.js +2 -0
- package/build-module/date-time/types.js.map +1 -0
- package/build-module/date-time/utils.js +6 -4
- package/build-module/date-time/utils.js.map +1 -1
- package/build-module/disabled/index.js +5 -76
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/draggable/index.native.js +206 -0
- package/build-module/draggable/index.native.js.map +1 -0
- package/build-module/dropdown/index.js +7 -5
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +3 -3
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/heading/hook.js +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/index.js +0 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +2 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/index.js +24 -3
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +42 -30
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js +20 -9
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +21 -5
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +42 -25
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +13 -13
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/notice/index.native.js +45 -41
- package/build-module/notice/index.native.js.map +1 -1
- package/build-module/notice/list.native.js +28 -46
- package/build-module/notice/list.native.js.map +1 -1
- package/build-module/palette-edit/index.js +37 -7
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/popover/index.js +225 -325
- package/build-module/popover/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +4 -5
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.js +2 -2
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -1
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/select-control/index.js +29 -3
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +17 -14
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/surface/styles.js +8 -8
- package/build-module/surface/styles.js.map +1 -1
- package/build-module/text/hook.js +5 -5
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text/styles/text-mixins.native.js +2 -2
- package/build-module/text/styles/text-mixins.native.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-module/text-control/index.js +35 -27
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/text-control/types.js +2 -0
- package/build-module/text-control/types.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +1 -5
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +51 -36
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tooltip/index.js +2 -2
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/ui/spinner/component.js +1 -1
- package/build-module/ui/spinner/component.js.map +1 -1
- package/build-module/unit-control/index.js +3 -3
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +11 -20
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/colors-values.js +19 -23
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-style/style-rtl.css +55 -170
- package/build-style/style.css +51 -170
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +3 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +3 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
- package/build-types/border-box-control/styles.d.ts +2 -2
- package/build-types/border-box-control/styles.d.ts.map +1 -1
- package/build-types/border-box-control/types.d.ts +40 -13
- package/build-types/border-box-control/types.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +2 -1
- 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 +1 -0
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts +2 -1
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/border-control/types.d.ts +18 -6
- package/build-types/border-control/types.d.ts.map +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts +25 -0
- package/build-types/button-group/index.d.ts.map +1 -0
- package/build-types/button-group/stories/index.d.ts +12 -0
- package/build-types/button-group/stories/index.d.ts.map +1 -0
- package/build-types/button-group/types.d.ts +11 -0
- package/build-types/button-group/types.d.ts.map +1 -0
- package/build-types/checkbox-control/index.d.ts +26 -0
- package/build-types/checkbox-control/index.d.ts.map +1 -0
- package/build-types/checkbox-control/stories/index.d.ts +13 -0
- package/build-types/checkbox-control/stories/index.d.ts.map +1 -0
- package/build-types/checkbox-control/types.d.ts +35 -0
- package/build-types/checkbox-control/types.d.ts.map +1 -0
- package/build-types/circular-option-picker/index.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +3 -3
- package/build-types/date-time/date.d.ts +24 -0
- package/build-types/date-time/date.d.ts.map +1 -0
- package/build-types/date-time/index.d.ts +35 -0
- package/build-types/date-time/index.d.ts.map +1 -0
- package/build-types/date-time/stories/date.d.ts +14 -0
- package/build-types/date-time/stories/date.d.ts.map +1 -0
- package/build-types/date-time/stories/index.d.ts +14 -0
- package/build-types/date-time/stories/index.d.ts.map +1 -0
- package/build-types/date-time/stories/time.d.ts +12 -0
- package/build-types/date-time/stories/time.d.ts.map +1 -0
- package/build-types/date-time/stories/utils.d.ts +3 -0
- package/build-types/date-time/stories/utils.d.ts.map +1 -0
- package/build-types/date-time/test/date.d.ts +2 -0
- package/build-types/date-time/test/date.d.ts.map +1 -0
- package/build-types/date-time/test/time.d.ts +2 -0
- package/build-types/date-time/test/time.d.ts.map +1 -0
- package/build-types/date-time/test/utils.d.ts +2 -0
- package/build-types/date-time/test/utils.d.ts.map +1 -0
- package/build-types/date-time/time.d.ts +25 -0
- package/build-types/date-time/time.d.ts.map +1 -0
- package/build-types/date-time/timezone.d.ts +8 -0
- package/build-types/date-time/timezone.d.ts.map +1 -0
- package/build-types/date-time/types.d.ts +91 -0
- package/build-types/date-time/types.d.ts.map +1 -0
- package/build-types/date-time/utils.d.ts +15 -0
- package/build-types/date-time/utils.d.ts.map +1 -0
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +23 -3
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/stories/index.d.ts +5 -5
- package/build-types/input-control/stories/index.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +1 -0
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +79 -3
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
- package/build-types/popover/index.d.ts +5 -8
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +30 -26
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.d.ts +23 -0
- package/build-types/select-control/stories/index.d.ts.map +1 -0
- package/build-types/select-control/styles/select-control-styles.d.ts +3 -4
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/select-control/test/select-control.d.ts +2 -0
- package/build-types/select-control/test/select-control.d.ts.map +1 -0
- package/build-types/select-control/types.d.ts +52 -1
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +0 -1
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/tooltip/index.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.map +1 -1
- package/build-types/unit-control/test/index.d.ts +2 -0
- package/build-types/unit-control/test/index.d.ts.map +1 -0
- package/build-types/unit-control/test/utils.d.ts +2 -0
- package/build-types/unit-control/test/utils.d.ts.map +1 -0
- package/build-types/unit-control/types.d.ts +1 -1
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/unit-control/utils.d.ts +3 -3
- package/build-types/unit-control/utils.d.ts.map +1 -1
- package/build-types/utils/colors-values.d.ts +6 -146
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.js +5 -3
- package/src/autocomplete/style.scss +1 -1
- package/src/border-box-control/border-box-control/README.md +10 -14
- package/src/border-box-control/border-box-control/component.tsx +21 -4
- package/src/border-box-control/border-box-control-linked-button/hook.ts +10 -6
- package/src/border-box-control/border-box-control-split-controls/component.tsx +24 -7
- package/src/border-box-control/border-box-control-visualizer/hook.ts +11 -6
- package/src/border-box-control/stories/index.js +1 -0
- package/src/border-box-control/styles.ts +15 -8
- package/src/border-box-control/types.ts +40 -14
- package/src/border-control/border-control/README.md +0 -7
- package/src/border-control/border-control/component.tsx +4 -2
- package/src/border-control/border-control/hook.ts +5 -2
- package/src/border-control/border-control-dropdown/component.tsx +18 -11
- package/src/border-control/border-control-dropdown/hook.ts +7 -5
- package/src/border-control/stories/index.js +1 -0
- package/src/border-control/styles.ts +82 -22
- package/src/border-control/types.ts +18 -6
- package/src/box-control/README.md +0 -74
- package/src/box-control/index.js +0 -15
- package/src/box-control/stories/index.js +0 -29
- package/src/box-control/utils.js +0 -7
- package/src/button/index.js +2 -4
- package/src/button/index.native.js +33 -18
- package/src/button/test/index.js +16 -1
- package/src/button-group/index.tsx +47 -0
- package/src/button-group/stories/index.tsx +41 -0
- package/src/button-group/types.ts +11 -0
- package/src/checkbox-control/README.md +10 -8
- package/src/checkbox-control/{index.js → index.tsx} +49 -14
- package/src/checkbox-control/stories/{index.js → index.tsx} +49 -27
- package/src/checkbox-control/types.ts +36 -0
- package/src/circular-option-picker/index.js +1 -2
- package/src/circular-option-picker/style.scss +1 -0
- package/src/color-palette/README.md +0 -1
- package/src/color-palette/index.js +6 -13
- package/src/color-palette/style.scss +3 -18
- package/src/color-palette/test/__snapshots__/index.js.snap +2 -3
- package/src/confirm-dialog/stories/index.js +87 -99
- package/src/date-time/README.md +13 -10
- package/src/date-time/{date.js → date.tsx} +49 -20
- package/src/date-time/{index.js → index.tsx} +31 -5
- package/src/date-time/stories/date.tsx +73 -0
- package/src/date-time/stories/index.tsx +75 -0
- package/src/date-time/stories/time.tsx +51 -0
- package/src/date-time/stories/utils.ts +9 -0
- package/src/date-time/test/date.tsx +127 -0
- package/src/date-time/test/{time.js → time.tsx} +34 -19
- package/src/date-time/test/{utils.js → utils.ts} +1 -1
- package/src/date-time/{time.js → time.tsx} +57 -46
- package/src/date-time/{timezone.js → timezone.tsx} +4 -3
- package/src/date-time/types.ts +106 -0
- package/src/date-time/utils.ts +20 -0
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
- package/src/disabled/index.js +5 -90
- package/src/draggable/index.native.js +215 -0
- package/src/draggable/style.native.scss +3 -0
- package/src/dropdown/index.js +9 -4
- package/src/dropdown/style.scss +1 -1
- package/src/focal-point-picker/index.native.js +3 -3
- package/src/form-file-upload/test/index.js +20 -13
- package/src/heading/hook.ts +1 -1
- package/src/heading/test/__snapshots__/index.js.snap +3 -3
- package/src/index.js +0 -1
- package/src/index.native.js +1 -0
- package/src/input-control/README.md +3 -3
- package/src/input-control/index.tsx +23 -3
- package/src/input-control/stories/index.tsx +63 -0
- package/src/input-control/styles/input-control-styles.tsx +20 -7
- package/src/input-control/types.ts +79 -2
- package/src/item-group/stories/index.js +22 -18
- package/src/menu-item/style.scss +10 -0
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +9 -2
- package/src/mobile/bottom-sheet/index.native.js +1 -1
- package/src/mobile/bottom-sheet-select-control/index.native.js +8 -2
- package/src/mobile/html-text-input/index.native.js +45 -29
- package/src/mobile/html-text-input/style.android.scss +2 -15
- package/src/mobile/html-text-input/style.ios.scss +2 -15
- package/src/mobile/html-text-input/{style-common.native.scss → style.scss} +16 -0
- package/src/mobile/keyboard-aware-flat-list/index.android.js +15 -5
- package/src/mobile/keyboard-aware-flat-list/index.ios.js +75 -46
- package/src/mobile/link-settings/test/link-settings-navigation.native.js +9 -1
- package/src/navigation/styles/navigation-styles.js +5 -5
- package/src/navigator/stories/index.js +16 -10
- package/src/notice/index.native.js +44 -54
- package/src/notice/list.native.js +27 -51
- package/src/notice/style.native.scss +1 -0
- package/src/palette-edit/index.js +37 -9
- package/src/palette-edit/style.scss +0 -7
- package/src/palette-edit/test/index.js +63 -0
- package/src/panel/README.md +1 -1
- package/src/placeholder/test/index.js +7 -0
- package/src/popover/README.md +7 -9
- package/src/popover/index.js +242 -417
- package/src/popover/style.scss +20 -190
- package/src/popover/test/__snapshots__/index.js.snap +6 -18
- package/src/query-controls/README.md +2 -2
- package/src/resizable-box/resize-tooltip/utils.ts +4 -5
- package/src/sandbox/index.js +2 -2
- package/src/sandbox/index.native.js +1 -1
- package/src/select-control/README.md +2 -2
- package/src/select-control/index.tsx +30 -29
- package/src/select-control/stories/index.tsx +90 -0
- package/src/select-control/styles/select-control-styles.ts +16 -12
- package/src/select-control/test/{select-control.js → select-control.tsx} +2 -2
- package/src/select-control/types.ts +66 -1
- package/src/surface/styles.js +1 -1
- package/src/tab-panel/style.scss +1 -1
- package/src/text/hook.js +1 -1
- package/src/text/styles/text-mixins.native.js +2 -2
- package/src/text/styles.js +1 -1
- package/src/text/test/__snapshots__/{index.js.snap → index.tsx.snap} +16 -0
- package/src/text/test/{index.js → index.tsx} +12 -6
- package/src/text-control/index.tsx +84 -0
- package/src/text-control/stories/index.tsx +66 -0
- package/src/text-control/types.ts +29 -0
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +4 -10
- package/src/toggle-group-control/toggle-group-control/component.tsx +7 -3
- package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -5
- package/src/toolbar-group/style.scss +20 -0
- package/src/tools-panel/test/__snapshots__/index.js.snap +2 -2
- package/src/tools-panel/test/index.js +71 -18
- package/src/tools-panel/tools-panel-header/component.tsx +75 -33
- package/src/tools-panel/types.ts +0 -1
- package/src/tooltip/index.js +8 -2
- package/src/tooltip/style.scss +2 -4
- package/src/tooltip/test/index.js +6 -0
- package/src/tooltip/test/index.native.js +1 -1
- package/src/ui/spinner/component.js +1 -1
- package/src/ui/spinner/test/__snapshots__/index.js.snap +3 -3
- package/src/unit-control/index.tsx +2 -5
- package/src/unit-control/styles/unit-control-styles.ts +3 -13
- package/src/unit-control/test/__snapshots__/index.tsx.snap +33 -0
- package/src/unit-control/test/{index.js → index.tsx} +295 -166
- package/src/unit-control/test/{utils.js → utils.ts} +38 -19
- package/src/unit-control/types.ts +4 -1
- package/src/unit-control/utils.ts +5 -3
- package/src/utils/colors-values.js +18 -22
- package/tsconfig.json +14 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/build/box-control/visualizer.js +0 -165
- package/build/box-control/visualizer.js.map +0 -1
- package/build/flyout/context.js +0 -23
- package/build/flyout/context.js.map +0 -1
- package/build/flyout/flyout/component.js +0 -106
- package/build/flyout/flyout/component.js.map +0 -1
- package/build/flyout/flyout/hook.js +0 -53
- package/build/flyout/flyout/hook.js.map +0 -1
- package/build/flyout/flyout/index.js +0 -24
- package/build/flyout/flyout/index.js.map +0 -1
- package/build/flyout/flyout-content/component.js +0 -65
- package/build/flyout/flyout-content/component.js.map +0 -1
- package/build/flyout/flyout-content/index.js +0 -16
- package/build/flyout/flyout-content/index.js.map +0 -1
- package/build/flyout/index.js +0 -16
- package/build/flyout/index.js.map +0 -1
- package/build/flyout/styles.js +0 -46
- package/build/flyout/styles.js.map +0 -1
- package/build/flyout/utils.js +0 -36
- package/build/flyout/utils.js.map +0 -1
- package/build/mobile/html-text-input/container.android.js +0 -41
- package/build/mobile/html-text-input/container.android.js.map +0 -1
- package/build/mobile/html-text-input/container.ios.js +0 -60
- package/build/mobile/html-text-input/container.ios.js.map +0 -1
- package/build/popover/utils.js +0 -322
- package/build/popover/utils.js.map +0 -1
- package/build-module/box-control/visualizer.js +0 -154
- package/build-module/box-control/visualizer.js.map +0 -1
- package/build-module/flyout/context.js +0 -11
- package/build-module/flyout/context.js.map +0 -1
- package/build-module/flyout/flyout/component.js +0 -89
- package/build-module/flyout/flyout/component.js.map +0 -1
- package/build-module/flyout/flyout/hook.js +0 -44
- package/build-module/flyout/flyout/hook.js.map +0 -1
- package/build-module/flyout/flyout/index.js +0 -3
- package/build-module/flyout/flyout/index.js.map +0 -1
- package/build-module/flyout/flyout-content/component.js +0 -51
- package/build-module/flyout/flyout-content/component.js.map +0 -1
- package/build-module/flyout/flyout-content/index.js +0 -2
- package/build-module/flyout/flyout-content/index.js.map +0 -1
- package/build-module/flyout/index.js +0 -2
- package/build-module/flyout/index.js.map +0 -1
- package/build-module/flyout/styles.js +0 -27
- package/build-module/flyout/styles.js.map +0 -1
- package/build-module/flyout/utils.js +0 -25
- package/build-module/flyout/utils.js.map +0 -1
- package/build-module/mobile/html-text-input/container.android.js +0 -29
- package/build-module/mobile/html-text-input/container.android.js.map +0 -1
- package/build-module/mobile/html-text-input/container.ios.js +0 -48
- package/build-module/mobile/html-text-input/container.ios.js.map +0 -1
- package/build-module/popover/utils.js +0 -308
- package/build-module/popover/utils.js.map +0 -1
- package/build-types/flyout/context.d.ts +0 -6
- package/build-types/flyout/context.d.ts.map +0 -1
- package/build-types/flyout/flyout/component.d.ts +0 -21
- package/build-types/flyout/flyout/component.d.ts.map +0 -1
- package/build-types/flyout/flyout/hook.d.ts +0 -270
- package/build-types/flyout/flyout/hook.d.ts.map +0 -1
- package/build-types/flyout/flyout/index.d.ts +0 -3
- package/build-types/flyout/flyout/index.d.ts.map +0 -1
- package/build-types/flyout/flyout-content/component.d.ts +0 -3
- package/build-types/flyout/flyout-content/component.d.ts.map +0 -1
- package/build-types/flyout/flyout-content/index.d.ts +0 -2
- package/build-types/flyout/flyout-content/index.d.ts.map +0 -1
- package/build-types/flyout/index.d.ts +0 -2
- package/build-types/flyout/index.d.ts.map +0 -1
- package/build-types/flyout/styles.d.ts +0 -22
- package/build-types/flyout/styles.d.ts.map +0 -1
- package/build-types/flyout/types.d.ts +0 -80
- package/build-types/flyout/types.d.ts.map +0 -1
- package/build-types/flyout/utils.d.ts +0 -8
- package/build-types/flyout/utils.d.ts.map +0 -1
- package/build-types/popover/utils.d.ts +0 -70
- package/build-types/popover/utils.d.ts.map +0 -1
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts +0 -19
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +0 -1
- package/src/box-control/visualizer.js +0 -116
- package/src/button-group/index.js +0 -17
- package/src/button-group/stories/index.js +0 -21
- package/src/date-time/stories/date.js +0 -17
- package/src/date-time/stories/index.js +0 -72
- package/src/date-time/stories/time.js +0 -32
- package/src/date-time/test/date.js +0 -97
- package/src/date-time/utils.js +0 -18
- package/src/flyout/context.js +0 -10
- package/src/flyout/flyout/README.md +0 -98
- package/src/flyout/flyout/component.js +0 -111
- package/src/flyout/flyout/hook.js +0 -45
- package/src/flyout/flyout/index.js +0 -2
- package/src/flyout/flyout-content/component.js +0 -53
- package/src/flyout/flyout-content/index.js +0 -1
- package/src/flyout/index.js +0 -1
- package/src/flyout/stories/index.js +0 -24
- package/src/flyout/styles.ts +0 -41
- package/src/flyout/test/__snapshots__/index.js.snap +0 -186
- package/src/flyout/test/index.js +0 -103
- package/src/flyout/types.ts +0 -84
- package/src/flyout/utils.js +0 -23
- package/src/input-control/stories/index.js +0 -71
- package/src/mobile/html-text-input/container.android.js +0 -23
- package/src/mobile/html-text-input/container.ios.js +0 -50
- package/src/popover/test/utils.js +0 -304
- package/src/popover/utils.js +0 -396
- package/src/select-control/stories/index.js +0 -104
- package/src/text-control/index.js +0 -72
- package/src/text-control/stories/index.js +0 -46
|
@@ -1,165 +0,0 @@
|
|
|
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 = BoxControlVisualizer;
|
|
9
|
-
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _boxControlVisualizerStyles = require("./styles/box-control-visualizer-styles");
|
|
15
|
-
|
|
16
|
-
var _utils = require("./utils");
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* WordPress dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Internal dependencies
|
|
24
|
-
*/
|
|
25
|
-
function BoxControlVisualizer(_ref) {
|
|
26
|
-
let {
|
|
27
|
-
children,
|
|
28
|
-
showValues = _utils.DEFAULT_VISUALIZER_VALUES,
|
|
29
|
-
values: valuesProp = _utils.DEFAULT_VALUES,
|
|
30
|
-
...props
|
|
31
|
-
} = _ref;
|
|
32
|
-
const isPositionAbsolute = !children;
|
|
33
|
-
return (0, _element.createElement)(_boxControlVisualizerStyles.Container, (0, _extends2.default)({}, props, {
|
|
34
|
-
isPositionAbsolute: isPositionAbsolute,
|
|
35
|
-
"aria-hidden": "true"
|
|
36
|
-
}), (0, _element.createElement)(Sides, {
|
|
37
|
-
showValues: showValues,
|
|
38
|
-
values: valuesProp
|
|
39
|
-
}), children);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function Sides(_ref2) {
|
|
43
|
-
let {
|
|
44
|
-
showValues = _utils.DEFAULT_VISUALIZER_VALUES,
|
|
45
|
-
values
|
|
46
|
-
} = _ref2;
|
|
47
|
-
const {
|
|
48
|
-
top,
|
|
49
|
-
right,
|
|
50
|
-
bottom,
|
|
51
|
-
left
|
|
52
|
-
} = values;
|
|
53
|
-
return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(Top, {
|
|
54
|
-
isVisible: showValues.top,
|
|
55
|
-
value: top
|
|
56
|
-
}), (0, _element.createElement)(Right, {
|
|
57
|
-
isVisible: showValues.right,
|
|
58
|
-
value: right
|
|
59
|
-
}), (0, _element.createElement)(Bottom, {
|
|
60
|
-
isVisible: showValues.bottom,
|
|
61
|
-
value: bottom
|
|
62
|
-
}), (0, _element.createElement)(Left, {
|
|
63
|
-
isVisible: showValues.left,
|
|
64
|
-
value: left
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function Top(_ref3) {
|
|
69
|
-
let {
|
|
70
|
-
isVisible = false,
|
|
71
|
-
value
|
|
72
|
-
} = _ref3;
|
|
73
|
-
const height = value;
|
|
74
|
-
const animationProps = useSideAnimation(height);
|
|
75
|
-
const isActive = animationProps.isActive || isVisible;
|
|
76
|
-
return (0, _element.createElement)(_boxControlVisualizerStyles.TopView, {
|
|
77
|
-
isActive: isActive,
|
|
78
|
-
style: {
|
|
79
|
-
height
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function Right(_ref4) {
|
|
85
|
-
let {
|
|
86
|
-
isVisible = false,
|
|
87
|
-
value
|
|
88
|
-
} = _ref4;
|
|
89
|
-
const width = value;
|
|
90
|
-
const animationProps = useSideAnimation(width);
|
|
91
|
-
const isActive = animationProps.isActive || isVisible;
|
|
92
|
-
return (0, _element.createElement)(_boxControlVisualizerStyles.RightView, {
|
|
93
|
-
isActive: isActive,
|
|
94
|
-
style: {
|
|
95
|
-
width
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function Bottom(_ref5) {
|
|
101
|
-
let {
|
|
102
|
-
isVisible = false,
|
|
103
|
-
value
|
|
104
|
-
} = _ref5;
|
|
105
|
-
const height = value;
|
|
106
|
-
const animationProps = useSideAnimation(height);
|
|
107
|
-
const isActive = animationProps.isActive || isVisible;
|
|
108
|
-
return (0, _element.createElement)(_boxControlVisualizerStyles.BottomView, {
|
|
109
|
-
isActive: isActive,
|
|
110
|
-
style: {
|
|
111
|
-
height
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function Left(_ref6) {
|
|
117
|
-
let {
|
|
118
|
-
isVisible = false,
|
|
119
|
-
value
|
|
120
|
-
} = _ref6;
|
|
121
|
-
const width = value;
|
|
122
|
-
const animationProps = useSideAnimation(width);
|
|
123
|
-
const isActive = animationProps.isActive || isVisible;
|
|
124
|
-
return (0, _element.createElement)(_boxControlVisualizerStyles.LeftView, {
|
|
125
|
-
isActive: isActive,
|
|
126
|
-
style: {
|
|
127
|
-
width
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Custom hook that renders the "flash" animation whenever the value changes.
|
|
133
|
-
*
|
|
134
|
-
* @param {string} value Value of (box) side.
|
|
135
|
-
*/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
function useSideAnimation(value) {
|
|
139
|
-
const [isActive, setIsActive] = (0, _element.useState)(false);
|
|
140
|
-
const valueRef = (0, _element.useRef)(value);
|
|
141
|
-
const timeoutRef = (0, _element.useRef)();
|
|
142
|
-
|
|
143
|
-
const clearTimer = () => {
|
|
144
|
-
if (timeoutRef.current) {
|
|
145
|
-
window.clearTimeout(timeoutRef.current);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
(0, _element.useEffect)(() => {
|
|
150
|
-
if (value !== valueRef.current) {
|
|
151
|
-
setIsActive(true);
|
|
152
|
-
valueRef.current = value;
|
|
153
|
-
clearTimer();
|
|
154
|
-
timeoutRef.current = setTimeout(() => {
|
|
155
|
-
setIsActive(false);
|
|
156
|
-
}, 400);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return () => clearTimer();
|
|
160
|
-
}, [value]);
|
|
161
|
-
return {
|
|
162
|
-
isActive
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=visualizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/box-control/visualizer.js"],"names":["BoxControlVisualizer","children","showValues","DEFAULT_VISUALIZER_VALUES","values","valuesProp","DEFAULT_VALUES","props","isPositionAbsolute","Sides","top","right","bottom","left","Top","isVisible","value","height","animationProps","useSideAnimation","isActive","Right","width","Bottom","Left","setIsActive","valueRef","timeoutRef","clearTimer","current","window","clearTimeout","setTimeout"],"mappings":";;;;;;;;;AAGA;;;;AAKA;;AAOA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;AAUe,SAASA,oBAAT,OAKX;AAAA,MAL0C;AAC7CC,IAAAA,QAD6C;AAE7CC,IAAAA,UAAU,GAAGC,gCAFgC;AAG7CC,IAAAA,MAAM,EAAEC,UAAU,GAAGC,qBAHwB;AAI7C,OAAGC;AAJ0C,GAK1C;AACH,QAAMC,kBAAkB,GAAG,CAAEP,QAA7B;AACA,SACC,4BAAC,qCAAD,6BACMM,KADN;AAEC,IAAA,kBAAkB,EAAGC,kBAFtB;AAGC,mBAAY;AAHb,MAKC,4BAAC,KAAD;AAAO,IAAA,UAAU,EAAGN,UAApB;AAAiC,IAAA,MAAM,EAAGG;AAA1C,IALD,EAMGJ,QANH,CADD;AAUA;;AAED,SAASQ,KAAT,QAAqE;AAAA,MAArD;AAAEP,IAAAA,UAAU,GAAGC,gCAAf;AAA0CC,IAAAA;AAA1C,GAAqD;AACpE,QAAM;AAAEM,IAAAA,GAAF;AAAOC,IAAAA,KAAP;AAAcC,IAAAA,MAAd;AAAsBC,IAAAA;AAAtB,MAA+BT,MAArC;AAEA,SACC,qDACC,4BAAC,GAAD;AAAK,IAAA,SAAS,EAAGF,UAAU,CAACQ,GAA5B;AAAkC,IAAA,KAAK,EAAGA;AAA1C,IADD,EAEC,4BAAC,KAAD;AAAO,IAAA,SAAS,EAAGR,UAAU,CAACS,KAA9B;AAAsC,IAAA,KAAK,EAAGA;AAA9C,IAFD,EAGC,4BAAC,MAAD;AAAQ,IAAA,SAAS,EAAGT,UAAU,CAACU,MAA/B;AAAwC,IAAA,KAAK,EAAGA;AAAhD,IAHD,EAIC,4BAAC,IAAD;AAAM,IAAA,SAAS,EAAGV,UAAU,CAACW,IAA7B;AAAoC,IAAA,KAAK,EAAGA;AAA5C,IAJD,CADD;AAQA;;AAED,SAASC,GAAT,QAA6C;AAAA,MAA/B;AAAEC,IAAAA,SAAS,GAAG,KAAd;AAAqBC,IAAAA;AAArB,GAA+B;AAC5C,QAAMC,MAAM,GAAGD,KAAf;AACA,QAAME,cAAc,GAAGC,gBAAgB,CAAEF,MAAF,CAAvC;AACA,QAAMG,QAAQ,GAAGF,cAAc,CAACE,QAAf,IAA2BL,SAA5C;AAEA,SAAO,4BAAC,mCAAD;AAAS,IAAA,QAAQ,EAAGK,QAApB;AAA+B,IAAA,KAAK,EAAG;AAAEH,MAAAA;AAAF;AAAvC,IAAP;AACA;;AAED,SAASI,KAAT,QAA+C;AAAA,MAA/B;AAAEN,IAAAA,SAAS,GAAG,KAAd;AAAqBC,IAAAA;AAArB,GAA+B;AAC9C,QAAMM,KAAK,GAAGN,KAAd;AACA,QAAME,cAAc,GAAGC,gBAAgB,CAAEG,KAAF,CAAvC;AACA,QAAMF,QAAQ,GAAGF,cAAc,CAACE,QAAf,IAA2BL,SAA5C;AAEA,SAAO,4BAAC,qCAAD;AAAW,IAAA,QAAQ,EAAGK,QAAtB;AAAiC,IAAA,KAAK,EAAG;AAAEE,MAAAA;AAAF;AAAzC,IAAP;AACA;;AAED,SAASC,MAAT,QAAgD;AAAA,MAA/B;AAAER,IAAAA,SAAS,GAAG,KAAd;AAAqBC,IAAAA;AAArB,GAA+B;AAC/C,QAAMC,MAAM,GAAGD,KAAf;AACA,QAAME,cAAc,GAAGC,gBAAgB,CAAEF,MAAF,CAAvC;AACA,QAAMG,QAAQ,GAAGF,cAAc,CAACE,QAAf,IAA2BL,SAA5C;AAEA,SAAO,4BAAC,sCAAD;AAAY,IAAA,QAAQ,EAAGK,QAAvB;AAAkC,IAAA,KAAK,EAAG;AAAEH,MAAAA;AAAF;AAA1C,IAAP;AACA;;AAED,SAASO,IAAT,QAA8C;AAAA,MAA/B;AAAET,IAAAA,SAAS,GAAG,KAAd;AAAqBC,IAAAA;AAArB,GAA+B;AAC7C,QAAMM,KAAK,GAAGN,KAAd;AACA,QAAME,cAAc,GAAGC,gBAAgB,CAAEG,KAAF,CAAvC;AACA,QAAMF,QAAQ,GAAGF,cAAc,CAACE,QAAf,IAA2BL,SAA5C;AAEA,SAAO,4BAAC,oCAAD;AAAU,IAAA,QAAQ,EAAGK,QAArB;AAAgC,IAAA,KAAK,EAAG;AAAEE,MAAAA;AAAF;AAAxC,IAAP;AACA;AAED;AACA;AACA;AACA;AACA;;;AACA,SAASH,gBAAT,CAA2BH,KAA3B,EAAmC;AAClC,QAAM,CAAEI,QAAF,EAAYK,WAAZ,IAA4B,uBAAU,KAAV,CAAlC;AACA,QAAMC,QAAQ,GAAG,qBAAQV,KAAR,CAAjB;AACA,QAAMW,UAAU,GAAG,sBAAnB;;AAEA,QAAMC,UAAU,GAAG,MAAM;AACxB,QAAKD,UAAU,CAACE,OAAhB,EAA0B;AACzBC,MAAAA,MAAM,CAACC,YAAP,CAAqBJ,UAAU,CAACE,OAAhC;AACA;AACD,GAJD;;AAMA,0BAAW,MAAM;AAChB,QAAKb,KAAK,KAAKU,QAAQ,CAACG,OAAxB,EAAkC;AACjCJ,MAAAA,WAAW,CAAE,IAAF,CAAX;AACAC,MAAAA,QAAQ,CAACG,OAAT,GAAmBb,KAAnB;AAEAY,MAAAA,UAAU;AAEVD,MAAAA,UAAU,CAACE,OAAX,GAAqBG,UAAU,CAAE,MAAM;AACtCP,QAAAA,WAAW,CAAE,KAAF,CAAX;AACA,OAF8B,EAE5B,GAF4B,CAA/B;AAGA;;AAED,WAAO,MAAMG,UAAU,EAAvB;AACA,GAbD,EAaG,CAAEZ,KAAF,CAbH;AAeA,SAAO;AACNI,IAAAA;AADM,GAAP;AAGA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef, useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tContainer,\n\tTopView,\n\tRightView,\n\tBottomView,\n\tLeftView,\n} from './styles/box-control-visualizer-styles';\nimport { DEFAULT_VALUES, DEFAULT_VISUALIZER_VALUES } from './utils';\n\nexport default function BoxControlVisualizer( {\n\tchildren,\n\tshowValues = DEFAULT_VISUALIZER_VALUES,\n\tvalues: valuesProp = DEFAULT_VALUES,\n\t...props\n} ) {\n\tconst isPositionAbsolute = ! children;\n\treturn (\n\t\t<Container\n\t\t\t{ ...props }\n\t\t\tisPositionAbsolute={ isPositionAbsolute }\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<Sides showValues={ showValues } values={ valuesProp } />\n\t\t\t{ children }\n\t\t</Container>\n\t);\n}\n\nfunction Sides( { showValues = DEFAULT_VISUALIZER_VALUES, values } ) {\n\tconst { top, right, bottom, left } = values;\n\n\treturn (\n\t\t<>\n\t\t\t<Top isVisible={ showValues.top } value={ top } />\n\t\t\t<Right isVisible={ showValues.right } value={ right } />\n\t\t\t<Bottom isVisible={ showValues.bottom } value={ bottom } />\n\t\t\t<Left isVisible={ showValues.left } value={ left } />\n\t\t</>\n\t);\n}\n\nfunction Top( { isVisible = false, value } ) {\n\tconst height = value;\n\tconst animationProps = useSideAnimation( height );\n\tconst isActive = animationProps.isActive || isVisible;\n\n\treturn <TopView isActive={ isActive } style={ { height } } />;\n}\n\nfunction Right( { isVisible = false, value } ) {\n\tconst width = value;\n\tconst animationProps = useSideAnimation( width );\n\tconst isActive = animationProps.isActive || isVisible;\n\n\treturn <RightView isActive={ isActive } style={ { width } } />;\n}\n\nfunction Bottom( { isVisible = false, value } ) {\n\tconst height = value;\n\tconst animationProps = useSideAnimation( height );\n\tconst isActive = animationProps.isActive || isVisible;\n\n\treturn <BottomView isActive={ isActive } style={ { height } } />;\n}\n\nfunction Left( { isVisible = false, value } ) {\n\tconst width = value;\n\tconst animationProps = useSideAnimation( width );\n\tconst isActive = animationProps.isActive || isVisible;\n\n\treturn <LeftView isActive={ isActive } style={ { width } } />;\n}\n\n/**\n * Custom hook that renders the \"flash\" animation whenever the value changes.\n *\n * @param {string} value Value of (box) side.\n */\nfunction useSideAnimation( value ) {\n\tconst [ isActive, setIsActive ] = useState( false );\n\tconst valueRef = useRef( value );\n\tconst timeoutRef = useRef();\n\n\tconst clearTimer = () => {\n\t\tif ( timeoutRef.current ) {\n\t\t\twindow.clearTimeout( timeoutRef.current );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tif ( value !== valueRef.current ) {\n\t\t\tsetIsActive( true );\n\t\t\tvalueRef.current = value;\n\n\t\t\tclearTimer();\n\n\t\t\ttimeoutRef.current = setTimeout( () => {\n\t\t\t\tsetIsActive( false );\n\t\t\t}, 400 );\n\t\t}\n\n\t\treturn () => clearTimer();\n\t}, [ value ] );\n\n\treturn {\n\t\tisActive,\n\t};\n}\n"]}
|
package/build/flyout/context.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useFlyoutContext = exports.FlyoutContext = void 0;
|
|
7
|
-
|
|
8
|
-
var _element = require("@wordpress/element");
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* WordPress dependencies
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @type {import('react').Context<import('./types').Context>}
|
|
16
|
-
*/
|
|
17
|
-
const FlyoutContext = (0, _element.createContext)({});
|
|
18
|
-
exports.FlyoutContext = FlyoutContext;
|
|
19
|
-
|
|
20
|
-
const useFlyoutContext = () => (0, _element.useContext)(FlyoutContext);
|
|
21
|
-
|
|
22
|
-
exports.useFlyoutContext = useFlyoutContext;
|
|
23
|
-
//# sourceMappingURL=context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/context.js"],"names":["FlyoutContext","useFlyoutContext"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACO,MAAMA,aAAa,GAAG,4BAAe,EAAf,CAAtB;;;AACA,MAAMC,gBAAgB,GAAG,MAAM,yBAAYD,aAAZ,CAA/B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * @type {import('react').Context<import('./types').Context>}\n */\nexport const FlyoutContext = createContext( {} );\nexport const useFlyoutContext = () => useContext( FlyoutContext );\n"]}
|
|
@@ -1,106 +0,0 @@
|
|
|
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 = void 0;
|
|
9
|
-
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _reakit = require("reakit");
|
|
15
|
-
|
|
16
|
-
var _context = require("../../ui/context");
|
|
17
|
-
|
|
18
|
-
var _context2 = require("../context");
|
|
19
|
-
|
|
20
|
-
var _utils = require("../utils");
|
|
21
|
-
|
|
22
|
-
var _flyoutContent = _interopRequireDefault(require("../flyout-content"));
|
|
23
|
-
|
|
24
|
-
var _hooks = require("../../utils/hooks");
|
|
25
|
-
|
|
26
|
-
var _hook = require("./hook");
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* External dependencies
|
|
30
|
-
*/
|
|
31
|
-
// eslint-disable-next-line no-restricted-imports
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* WordPress dependencies
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Internal dependencies
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div', false>} props
|
|
44
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
45
|
-
*/
|
|
46
|
-
function Flyout(props, forwardedRef) {
|
|
47
|
-
const {
|
|
48
|
-
children,
|
|
49
|
-
elevation,
|
|
50
|
-
label,
|
|
51
|
-
maxWidth,
|
|
52
|
-
onVisibleChange,
|
|
53
|
-
trigger,
|
|
54
|
-
flyoutState,
|
|
55
|
-
...otherProps
|
|
56
|
-
} = (0, _hook.useFlyout)(props);
|
|
57
|
-
const resizeListener = (0, _utils.useFlyoutResizeUpdater)({
|
|
58
|
-
onResize: flyoutState.unstable_update
|
|
59
|
-
});
|
|
60
|
-
const uniqueId = `flyout-${flyoutState.baseId}`;
|
|
61
|
-
const labelId = label || uniqueId;
|
|
62
|
-
const contextProps = (0, _element.useMemo)(() => ({
|
|
63
|
-
label: labelId,
|
|
64
|
-
flyoutState
|
|
65
|
-
}), [labelId, flyoutState]);
|
|
66
|
-
const triggerContent = (0, _element.useCallback)(triggerProps => {
|
|
67
|
-
return (0, _element.cloneElement)(trigger, triggerProps);
|
|
68
|
-
}, [trigger]);
|
|
69
|
-
(0, _hooks.useUpdateEffect)(() => {
|
|
70
|
-
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(flyoutState.visible);
|
|
71
|
-
}, [flyoutState.visible]);
|
|
72
|
-
return (0, _element.createElement)(_context2.FlyoutContext.Provider, {
|
|
73
|
-
value: contextProps
|
|
74
|
-
}, trigger && (0, _element.createElement)(_reakit.PopoverDisclosure, (0, _extends2.default)({}, flyoutState, {
|
|
75
|
-
ref: trigger.ref
|
|
76
|
-
}, trigger.props), triggerContent), (0, _element.createElement)(_reakit.Portal, null, (0, _element.createElement)(_flyoutContent.default, (0, _extends2.default)({
|
|
77
|
-
ref: forwardedRef
|
|
78
|
-
}, otherProps, {
|
|
79
|
-
elevation: elevation,
|
|
80
|
-
maxWidth: maxWidth
|
|
81
|
-
}), resizeListener, children)));
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* `Flyout` is a component to render a floating content modal.
|
|
85
|
-
* It is similar in purpose to a tooltip, but renders content of any sort,
|
|
86
|
-
* not only simple text.
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```jsx
|
|
90
|
-
* import { Button, __experimentalFlyout as Flyout, __experimentalText as } from '@wordpress/components';
|
|
91
|
-
*
|
|
92
|
-
* function Example() {
|
|
93
|
-
* return (
|
|
94
|
-
* <Flyout trigger={ <Button>Show/Hide content</Button> }>
|
|
95
|
-
* <Text>Code is Poetry</Text>
|
|
96
|
-
* </Flyout>
|
|
97
|
-
* );
|
|
98
|
-
* }
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const ConnectedFlyout = (0, _context.contextConnect)(Flyout, 'Flyout');
|
|
104
|
-
var _default = ConnectedFlyout;
|
|
105
|
-
exports.default = _default;
|
|
106
|
-
//# sourceMappingURL=component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/flyout/component.js"],"names":["Flyout","props","forwardedRef","children","elevation","label","maxWidth","onVisibleChange","trigger","flyoutState","otherProps","resizeListener","onResize","unstable_update","uniqueId","baseId","labelId","contextProps","triggerContent","triggerProps","visible","ref","ConnectedFlyout"],"mappings":";;;;;;;;;AASA;;;;AALA;;AAUA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA,SAASA,MAAT,CAAiBC,KAAjB,EAAwBC,YAAxB,EAAuC;AACtC,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,KAHK;AAILC,IAAAA,QAJK;AAKLC,IAAAA,eALK;AAMLC,IAAAA,OANK;AAOLC,IAAAA,WAPK;AAQL,OAAGC;AARE,MASF,qBAAWT,KAAX,CATJ;AAWA,QAAMU,cAAc,GAAG,mCAAwB;AAC9CC,IAAAA,QAAQ,EAAEH,WAAW,CAACI;AADwB,GAAxB,CAAvB;AAIA,QAAMC,QAAQ,GAAI,UAAUL,WAAW,CAACM,MAAQ,EAAhD;AACA,QAAMC,OAAO,GAAGX,KAAK,IAAIS,QAAzB;AAEA,QAAMG,YAAY,GAAG,sBACpB,OAAQ;AACPZ,IAAAA,KAAK,EAAEW,OADA;AAEPP,IAAAA;AAFO,GAAR,CADoB,EAKpB,CAAEO,OAAF,EAAWP,WAAX,CALoB,CAArB;AAQA,QAAMS,cAAc,GAAG,0BACpBC,YAAF,IAAoB;AACnB,WAAO,2BAAcX,OAAd,EAAuBW,YAAvB,CAAP;AACA,GAHqB,EAItB,CAAEX,OAAF,CAJsB,CAAvB;AAOA,8BAAiB,MAAM;AACtBD,IAAAA,eAAe,SAAf,IAAAA,eAAe,WAAf,YAAAA,eAAe,CAAIE,WAAW,CAACW,OAAhB,CAAf;AACA,GAFD,EAEG,CAAEX,WAAW,CAACW,OAAd,CAFH;AAIA,SACC,4BAAC,uBAAD,CAAe,QAAf;AAAwB,IAAA,KAAK,EAAGH;AAAhC,KACGT,OAAO,IACR,4BAAC,yBAAD,6BACMC,WADN;AAEC,IAAA,GAAG,EAAGD,OAAO,CAACa;AAFf,KAGMb,OAAO,CAACP,KAHd,GAKGiB,cALH,CAFF,EAUC,4BAAC,cAAD,QACC,4BAAC,sBAAD;AACC,IAAA,GAAG,EAAGhB;AADP,KAEMQ,UAFN;AAGC,IAAA,SAAS,EAAGN,SAHb;AAIC,IAAA,QAAQ,EAAGE;AAJZ,MAMGK,cANH,EAOGR,QAPH,CADD,CAVD,CADD;AAwBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMmB,eAAe,GAAG,6BAAgBtB,MAAhB,EAAwB,QAAxB,CAAxB;eAEesB,e","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { PopoverDisclosure, Portal } from 'reakit';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo, cloneElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect } from '../../ui/context';\nimport { FlyoutContext } from '../context';\nimport { useFlyoutResizeUpdater } from '../utils';\nimport FlyoutContent from '../flyout-content';\nimport { useUpdateEffect } from '../../utils/hooks';\nimport { useFlyout } from './hook';\n\n/**\n *\n * @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div', false>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef\n */\nfunction Flyout( props, forwardedRef ) {\n\tconst {\n\t\tchildren,\n\t\televation,\n\t\tlabel,\n\t\tmaxWidth,\n\t\tonVisibleChange,\n\t\ttrigger,\n\t\tflyoutState,\n\t\t...otherProps\n\t} = useFlyout( props );\n\n\tconst resizeListener = useFlyoutResizeUpdater( {\n\t\tonResize: flyoutState.unstable_update,\n\t} );\n\n\tconst uniqueId = `flyout-${ flyoutState.baseId }`;\n\tconst labelId = label || uniqueId;\n\n\tconst contextProps = useMemo(\n\t\t() => ( {\n\t\t\tlabel: labelId,\n\t\t\tflyoutState,\n\t\t} ),\n\t\t[ labelId, flyoutState ]\n\t);\n\n\tconst triggerContent = useCallback(\n\t\t( triggerProps ) => {\n\t\t\treturn cloneElement( trigger, triggerProps );\n\t\t},\n\t\t[ trigger ]\n\t);\n\n\tuseUpdateEffect( () => {\n\t\tonVisibleChange?.( flyoutState.visible );\n\t}, [ flyoutState.visible ] );\n\n\treturn (\n\t\t<FlyoutContext.Provider value={ contextProps }>\n\t\t\t{ trigger && (\n\t\t\t\t<PopoverDisclosure\n\t\t\t\t\t{ ...flyoutState }\n\t\t\t\t\tref={ trigger.ref }\n\t\t\t\t\t{ ...trigger.props }\n\t\t\t\t>\n\t\t\t\t\t{ triggerContent }\n\t\t\t\t</PopoverDisclosure>\n\t\t\t) }\n\t\t\t<Portal>\n\t\t\t\t<FlyoutContent\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\televation={ elevation }\n\t\t\t\t\tmaxWidth={ maxWidth }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t{ children }\n\t\t\t\t</FlyoutContent>\n\t\t\t</Portal>\n\t\t</FlyoutContext.Provider>\n\t);\n}\n\n/**\n * `Flyout` is a component to render a floating content modal.\n * It is similar in purpose to a tooltip, but renders content of any sort,\n * not only simple text.\n *\n * @example\n * ```jsx\n * import { Button, __experimentalFlyout as Flyout, __experimentalText as } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<Flyout trigger={ <Button>Show/Hide content</Button> }>\n *\t\t\t<Text>Code is Poetry</Text>\n * \t\t</Flyout>\n * \t);\n * }\n * ```\n */\nconst ConnectedFlyout = contextConnect( Flyout, 'Flyout' );\n\nexport default ConnectedFlyout;\n"]}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useFlyout = useFlyout;
|
|
7
|
-
|
|
8
|
-
var _reakit = require("reakit");
|
|
9
|
-
|
|
10
|
-
var _context = require("../../ui/context");
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* External dependencies
|
|
14
|
-
*/
|
|
15
|
-
// eslint-disable-next-line no-restricted-imports
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div', false>} props
|
|
23
|
-
*/
|
|
24
|
-
function useFlyout(props) {
|
|
25
|
-
const {
|
|
26
|
-
animated = true,
|
|
27
|
-
animationDuration = 160,
|
|
28
|
-
baseId,
|
|
29
|
-
elevation = 5,
|
|
30
|
-
id,
|
|
31
|
-
maxWidth = 360,
|
|
32
|
-
placement,
|
|
33
|
-
state,
|
|
34
|
-
visible,
|
|
35
|
-
...otherProps
|
|
36
|
-
} = (0, _context.useContextSystem)(props, 'Flyout');
|
|
37
|
-
|
|
38
|
-
const _flyoutState = (0, _reakit.usePopoverState)({
|
|
39
|
-
animated: animated ? animationDuration : undefined,
|
|
40
|
-
baseId: baseId || id,
|
|
41
|
-
placement,
|
|
42
|
-
visible,
|
|
43
|
-
...otherProps
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const flyoutState = state || _flyoutState;
|
|
47
|
-
return { ...otherProps,
|
|
48
|
-
elevation,
|
|
49
|
-
maxWidth,
|
|
50
|
-
flyoutState
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=hook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/flyout/hook.js"],"names":["useFlyout","props","animated","animationDuration","baseId","elevation","id","maxWidth","placement","state","visible","otherProps","_flyoutState","undefined","flyoutState"],"mappings":";;;;;;;AAIA;;AAKA;;AATA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACO,SAASA,SAAT,CAAoBC,KAApB,EAA4B;AAClC,QAAM;AACLC,IAAAA,QAAQ,GAAG,IADN;AAELC,IAAAA,iBAAiB,GAAG,GAFf;AAGLC,IAAAA,MAHK;AAILC,IAAAA,SAAS,GAAG,CAJP;AAKLC,IAAAA,EALK;AAMLC,IAAAA,QAAQ,GAAG,GANN;AAOLC,IAAAA,SAPK;AAQLC,IAAAA,KARK;AASLC,IAAAA,OATK;AAUL,OAAGC;AAVE,MAWF,+BAAkBV,KAAlB,EAAyB,QAAzB,CAXJ;;AAaA,QAAMW,YAAY,GAAG,6BAAiB;AACrCV,IAAAA,QAAQ,EAAEA,QAAQ,GAAGC,iBAAH,GAAuBU,SADJ;AAErCT,IAAAA,MAAM,EAAEA,MAAM,IAAIE,EAFmB;AAGrCE,IAAAA,SAHqC;AAIrCE,IAAAA,OAJqC;AAKrC,OAAGC;AALkC,GAAjB,CAArB;;AAQA,QAAMG,WAAW,GAAGL,KAAK,IAAIG,YAA7B;AAEA,SAAO,EACN,GAAGD,UADG;AAENN,IAAAA,SAFM;AAGNE,IAAAA,QAHM;AAINO,IAAAA;AAJM,GAAP;AAMA","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { usePopoverState } from 'reakit';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../../ui/context';\n\n/**\n * @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div', false>} props\n */\nexport function useFlyout( props ) {\n\tconst {\n\t\tanimated = true,\n\t\tanimationDuration = 160,\n\t\tbaseId,\n\t\televation = 5,\n\t\tid,\n\t\tmaxWidth = 360,\n\t\tplacement,\n\t\tstate,\n\t\tvisible,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Flyout' );\n\n\tconst _flyoutState = usePopoverState( {\n\t\tanimated: animated ? animationDuration : undefined,\n\t\tbaseId: baseId || id,\n\t\tplacement,\n\t\tvisible,\n\t\t...otherProps,\n\t} );\n\n\tconst flyoutState = state || _flyoutState;\n\n\treturn {\n\t\t...otherProps,\n\t\televation,\n\t\tmaxWidth,\n\t\tflyoutState,\n\t};\n}\n"]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () {
|
|
11
|
-
return _component.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "useFlyout", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return _hook.useFlyout;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var _component = _interopRequireDefault(require("./component"));
|
|
22
|
-
|
|
23
|
-
var _hook = require("./hook");
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/flyout/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default } from './component';\nexport { useFlyout } from './hook';\n"]}
|
|
@@ -1,65 +0,0 @@
|
|
|
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 = void 0;
|
|
9
|
-
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _context = require("../context");
|
|
15
|
-
|
|
16
|
-
var _styles = require("../styles");
|
|
17
|
-
|
|
18
|
-
var _context2 = require("../../ui/context");
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Internal dependencies
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').ContentProps, 'div', false>} props
|
|
27
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef forwardedRef
|
|
28
|
-
*/
|
|
29
|
-
function FlyoutContent(props, forwardedRef) {
|
|
30
|
-
const {
|
|
31
|
-
children,
|
|
32
|
-
elevation,
|
|
33
|
-
maxWidth,
|
|
34
|
-
style = {},
|
|
35
|
-
...otherProps
|
|
36
|
-
} = (0, _context2.useContextSystem)(props, 'FlyoutContent');
|
|
37
|
-
const {
|
|
38
|
-
label,
|
|
39
|
-
flyoutState
|
|
40
|
-
} = (0, _context.useFlyoutContext)();
|
|
41
|
-
|
|
42
|
-
if (!flyoutState) {
|
|
43
|
-
throw new Error('`FlyoutContent` must only be used inside a `Flyout`.');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const showContent = flyoutState.visible || flyoutState.animating;
|
|
47
|
-
return (0, _element.createElement)(_styles.FlyoutContentView, (0, _extends2.default)({
|
|
48
|
-
"aria-label": label // maxWidth is applied via inline styles in order to avoid the `React does
|
|
49
|
-
// not recognize the maxWidth prop on a DOM element` error that comes from
|
|
50
|
-
// passing `maxWidth` as a prop to `FlyoutContentView`
|
|
51
|
-
,
|
|
52
|
-
style: {
|
|
53
|
-
maxWidth,
|
|
54
|
-
...style
|
|
55
|
-
}
|
|
56
|
-
}, otherProps, flyoutState), showContent && (0, _element.createElement)(_styles.CardView, {
|
|
57
|
-
elevation: elevation,
|
|
58
|
-
ref: forwardedRef
|
|
59
|
-
}, children));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const ConnectedFlyoutContent = (0, _context2.contextConnect)(FlyoutContent, 'FlyoutContent');
|
|
63
|
-
var _default = ConnectedFlyoutContent;
|
|
64
|
-
exports.default = _default;
|
|
65
|
-
//# sourceMappingURL=component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/flyout-content/component.js"],"names":["FlyoutContent","props","forwardedRef","children","elevation","maxWidth","style","otherProps","label","flyoutState","Error","showContent","visible","animating","ConnectedFlyoutContent"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAT,CAAwBC,KAAxB,EAA+BC,YAA/B,EAA8C;AAC7C,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,QAHK;AAILC,IAAAA,KAAK,GAAG,EAJH;AAKL,OAAGC;AALE,MAMF,gCAAkBN,KAAlB,EAAyB,eAAzB,CANJ;AAQA,QAAM;AAAEO,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAyB,gCAA/B;;AAEA,MAAK,CAAEA,WAAP,EAAqB;AACpB,UAAM,IAAIC,KAAJ,CACL,sDADK,CAAN;AAGA;;AAED,QAAMC,WAAW,GAAGF,WAAW,CAACG,OAAZ,IAAuBH,WAAW,CAACI,SAAvD;AAEA,SACC,4BAAC,yBAAD;AACC,kBAAaL,KADd,CAEC;AACA;AACA;AAJD;AAKC,IAAA,KAAK,EAAG;AAAEH,MAAAA,QAAF;AAAY,SAAGC;AAAf;AALT,KAMMC,UANN,EAOME,WAPN,GASGE,WAAW,IACZ,4BAAC,gBAAD;AAAU,IAAA,SAAS,EAAGP,SAAtB;AAAkC,IAAA,GAAG,EAAGF;AAAxC,KACGC,QADH,CAVF,CADD;AAiBA;;AAED,MAAMW,sBAAsB,GAAG,8BAAgBd,aAAhB,EAA+B,eAA/B,CAA/B;eAEec,sB","sourcesContent":["/**\n * Internal dependencies\n */\nimport { useFlyoutContext } from '../context';\nimport { FlyoutContentView, CardView } from '../styles';\nimport { contextConnect, useContextSystem } from '../../ui/context';\n\n/**\n *\n * @param {import('../../ui/context').WordPressComponentProps<import('../types').ContentProps, 'div', false>} props\n * @param {import('react').ForwardedRef<any>} forwardedRef forwardedRef\n */\nfunction FlyoutContent( props, forwardedRef ) {\n\tconst {\n\t\tchildren,\n\t\televation,\n\t\tmaxWidth,\n\t\tstyle = {},\n\t\t...otherProps\n\t} = useContextSystem( props, 'FlyoutContent' );\n\n\tconst { label, flyoutState } = useFlyoutContext();\n\n\tif ( ! flyoutState ) {\n\t\tthrow new Error(\n\t\t\t'`FlyoutContent` must only be used inside a `Flyout`.'\n\t\t);\n\t}\n\n\tconst showContent = flyoutState.visible || flyoutState.animating;\n\n\treturn (\n\t\t<FlyoutContentView\n\t\t\taria-label={ label }\n\t\t\t// maxWidth is applied via inline styles in order to avoid the `React does\n\t\t\t// not recognize the maxWidth prop on a DOM element` error that comes from\n\t\t\t// passing `maxWidth` as a prop to `FlyoutContentView`\n\t\t\tstyle={ { maxWidth, ...style } }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...flyoutState }\n\t\t>\n\t\t\t{ showContent && (\n\t\t\t\t<CardView elevation={ elevation } ref={ forwardedRef }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CardView>\n\t\t\t) }\n\t\t</FlyoutContentView>\n\t);\n}\n\nconst ConnectedFlyoutContent = contextConnect( FlyoutContent, 'FlyoutContent' );\n\nexport default ConnectedFlyoutContent;\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () {
|
|
11
|
-
return _component.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
var _component = _interopRequireDefault(require("./component"));
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/flyout-content/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './component';\n"]}
|
package/build/flyout/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "Flyout", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () {
|
|
11
|
-
return _flyout.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
var _flyout = _interopRequireDefault(require("./flyout"));
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as Flyout } from './flyout';\n"]}
|
package/build/flyout/styles.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.FlyoutContentView = exports.CardView = void 0;
|
|
9
|
-
|
|
10
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
11
|
-
|
|
12
|
-
var _reakit = require("reakit");
|
|
13
|
-
|
|
14
|
-
var _card = require("../card");
|
|
15
|
-
|
|
16
|
-
var ZIndex = _interopRequireWildcard(require("../utils/z-index"));
|
|
17
|
-
|
|
18
|
-
var _configValues = _interopRequireDefault(require("../utils/config-values"));
|
|
19
|
-
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* External dependencies
|
|
26
|
-
*/
|
|
27
|
-
// eslint-disable-next-line no-restricted-imports
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Internal dependencies
|
|
31
|
-
*/
|
|
32
|
-
const FlyoutContentView = ( /*#__PURE__*/0, _base.default)(_reakit.Popover, process.env.NODE_ENV === "production" ? {
|
|
33
|
-
target: "e1vtu5161"
|
|
34
|
-
} : {
|
|
35
|
-
target: "e1vtu5161",
|
|
36
|
-
label: "FlyoutContentView"
|
|
37
|
-
})("z-index:", ZIndex.Flyout, ";box-sizing:border-box;opacity:0;outline:none;position:relative;transform-origin:center center;transition:opacity ", _configValues.default.transitionDurationFastest, " linear;width:100%;&[data-enter]{opacity:1;}&::before,&::after{display:none;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQjJCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQsIHsgU3R5bGVkQ29tcG9uZW50IH0gZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1yZXN0cmljdGVkLWltcG9ydHNcbmltcG9ydCB7IFBvcG92ZXIgYXMgUmVha2l0UG9wb3ZlciB9IGZyb20gJ3JlYWtpdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENhcmQsIENhcmRCb2R5IH0gZnJvbSAnLi4vY2FyZCc7XG5pbXBvcnQgKiBhcyBaSW5kZXggZnJvbSAnLi4vdXRpbHMvei1pbmRleCc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgRmx5b3V0Q29udGVudFZpZXc6IFN0eWxlZENvbXBvbmVudDxcblx0UmVhY3QuQ29tcG9uZW50UHJvcHNXaXRob3V0UmVmPCB0eXBlb2YgUmVha2l0UG9wb3ZlciA+XG4+ID0gc3R5bGVkKCBSZWFraXRQb3BvdmVyIClgXG5cdHotaW5kZXg6ICR7IFpJbmRleC5GbHlvdXQgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0b3BhY2l0eTogMDtcblx0b3V0bGluZTogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR0cmFuc2Zvcm0tb3JpZ2luOiBjZW50ZXIgY2VudGVyO1xuXHR0cmFuc2l0aW9uOiBvcGFjaXR5ICR7IENPTkZJRy50cmFuc2l0aW9uRHVyYXRpb25GYXN0ZXN0IH0gbGluZWFyO1xuXHR3aWR0aDogMTAwJTtcblxuXHQmW2RhdGEtZW50ZXJdIHtcblx0XHRvcGFjaXR5OiAxO1xuXHR9XG5cblx0Jjo6YmVmb3JlLFxuXHQmOjphZnRlciB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IENhcmRWaWV3ID0gc3R5bGVkKCBDYXJkIClgXG5cdCR7IENhcmRCb2R5LnNlbGVjdG9yIH0ge1xuXHRcdG1heC1oZWlnaHQ6IDgwdmg7XG5cdH1cbmA7XG4iXX0= */"));
|
|
38
|
-
exports.FlyoutContentView = FlyoutContentView;
|
|
39
|
-
const CardView = ( /*#__PURE__*/0, _base.default)(_card.Card, process.env.NODE_ENV === "production" ? {
|
|
40
|
-
target: "e1vtu5160"
|
|
41
|
-
} : {
|
|
42
|
-
target: "e1vtu5160",
|
|
43
|
-
label: "CardView"
|
|
44
|
-
})(_card.CardBody.selector, "{max-height:80vh;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQ3NDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQsIHsgU3R5bGVkQ29tcG9uZW50IH0gZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1yZXN0cmljdGVkLWltcG9ydHNcbmltcG9ydCB7IFBvcG92ZXIgYXMgUmVha2l0UG9wb3ZlciB9IGZyb20gJ3JlYWtpdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENhcmQsIENhcmRCb2R5IH0gZnJvbSAnLi4vY2FyZCc7XG5pbXBvcnQgKiBhcyBaSW5kZXggZnJvbSAnLi4vdXRpbHMvei1pbmRleCc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgRmx5b3V0Q29udGVudFZpZXc6IFN0eWxlZENvbXBvbmVudDxcblx0UmVhY3QuQ29tcG9uZW50UHJvcHNXaXRob3V0UmVmPCB0eXBlb2YgUmVha2l0UG9wb3ZlciA+XG4+ID0gc3R5bGVkKCBSZWFraXRQb3BvdmVyIClgXG5cdHotaW5kZXg6ICR7IFpJbmRleC5GbHlvdXQgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0b3BhY2l0eTogMDtcblx0b3V0bGluZTogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR0cmFuc2Zvcm0tb3JpZ2luOiBjZW50ZXIgY2VudGVyO1xuXHR0cmFuc2l0aW9uOiBvcGFjaXR5ICR7IENPTkZJRy50cmFuc2l0aW9uRHVyYXRpb25GYXN0ZXN0IH0gbGluZWFyO1xuXHR3aWR0aDogMTAwJTtcblxuXHQmW2RhdGEtZW50ZXJdIHtcblx0XHRvcGFjaXR5OiAxO1xuXHR9XG5cblx0Jjo6YmVmb3JlLFxuXHQmOjphZnRlciB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IENhcmRWaWV3ID0gc3R5bGVkKCBDYXJkIClgXG5cdCR7IENhcmRCb2R5LnNlbGVjdG9yIH0ge1xuXHRcdG1heC1oZWlnaHQ6IDgwdmg7XG5cdH1cbmA7XG4iXX0= */"));
|
|
45
|
-
exports.CardView = CardView;
|
|
46
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/styles.ts"],"names":["FlyoutContentView","ReakitPopover","ZIndex","Flyout","CONFIG","transitionDurationFastest","CardView","Card","CardBody","selector"],"mappings":";;;;;;;;;;;AAKA;;AAKA;;AACA;;AACA;;;;;;AAZA;AACA;AACA;AAEA;;AAGA;AACA;AACA;AAKO,MAAMA,iBAEZ,GAAG,iCAAQC,eAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,aACYC,MAAM,CAACC,MADnB,wHAOuBC,sBAAOC,yBAP9B,yqDAFM;;AAsBA,MAAMC,QAAQ,GAAG,iCAAQC,UAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,CACjBC,eAASC,QADQ,8mDAAd","sourcesContent":["/**\n * External dependencies\n */\nimport styled, { StyledComponent } from '@emotion/styled';\n// eslint-disable-next-line no-restricted-imports\nimport { Popover as ReakitPopover } from 'reakit';\n\n/**\n * Internal dependencies\n */\nimport { Card, CardBody } from '../card';\nimport * as ZIndex from '../utils/z-index';\nimport CONFIG from '../utils/config-values';\n\nexport const FlyoutContentView: StyledComponent<\n\tReact.ComponentPropsWithoutRef< typeof ReakitPopover >\n> = styled( ReakitPopover )`\n\tz-index: ${ ZIndex.Flyout };\n\tbox-sizing: border-box;\n\topacity: 0;\n\toutline: none;\n\tposition: relative;\n\ttransform-origin: center center;\n\ttransition: opacity ${ CONFIG.transitionDurationFastest } linear;\n\twidth: 100%;\n\n\t&[data-enter] {\n\t\topacity: 1;\n\t}\n\n\t&::before,\n\t&::after {\n\t\tdisplay: none;\n\t}\n`;\n\nexport const CardView = styled( Card )`\n\t${ CardBody.selector } {\n\t\tmax-height: 80vh;\n\t}\n`;\n"]}
|
package/build/flyout/utils.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.useFlyoutResizeUpdater = useFlyoutResizeUpdater;
|
|
9
|
-
|
|
10
|
-
var _reactResizeAware = _interopRequireDefault(require("react-resize-aware"));
|
|
11
|
-
|
|
12
|
-
var _compose = require("@wordpress/compose");
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* External dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* WordPress dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param { { onResize?: () => any } } onResize
|
|
25
|
-
*/
|
|
26
|
-
function useFlyoutResizeUpdater(_ref) {
|
|
27
|
-
let {
|
|
28
|
-
onResize
|
|
29
|
-
} = _ref;
|
|
30
|
-
const [resizeListener, sizes] = (0, _reactResizeAware.default)();
|
|
31
|
-
(0, _compose.useIsomorphicLayoutEffect)(() => {
|
|
32
|
-
onResize === null || onResize === void 0 ? void 0 : onResize();
|
|
33
|
-
}, [sizes.width, sizes.height]);
|
|
34
|
-
return resizeListener;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/flyout/utils.js"],"names":["useFlyoutResizeUpdater","onResize","resizeListener","sizes","width","height"],"mappings":";;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACO,SAASA,sBAAT,OAAgD;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACtD,QAAM,CAAEC,cAAF,EAAkBC,KAAlB,IAA4B,gCAAlC;AAEA,0CAA2B,MAAM;AAChCF,IAAAA,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ;AACR,GAFD,EAEG,CAAEE,KAAK,CAACC,KAAR,EAAeD,KAAK,CAACE,MAArB,CAFH;AAIA,SAAOH,cAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport useResizeAware from 'react-resize-aware';\n\n/**\n * WordPress dependencies\n */\nimport { useIsomorphicLayoutEffect } from '@wordpress/compose';\n\n/**\n *\n * @param { { onResize?: () => any } } onResize\n */\nexport function useFlyoutResizeUpdater( { onResize } ) {\n\tconst [ resizeListener, sizes ] = useResizeAware();\n\n\tuseIsomorphicLayoutEffect( () => {\n\t\tonResize?.();\n\t}, [ sizes.width, sizes.height ] );\n\n\treturn resizeListener;\n}\n"]}
|