@wordpress/components 23.6.0 → 23.8.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 +43 -4
- package/build/angle-picker-control/angle-circle.js +1 -4
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/angle-picker-control/index.js +10 -22
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +24 -15
- package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build/animate/index.js +27 -19
- package/build/animate/index.js.map +1 -1
- package/build/animate/types.js.map +1 -0
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/color-picker/color-input.js +0 -4
- package/build/color-picker/color-input.js.map +1 -1
- package/build/color-picker/component.js +5 -4
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/hsl-input.js.map +1 -1
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/legacy-adapter.js.map +1 -1
- package/build/color-picker/picker.js.map +1 -1
- package/build/color-picker/rgb-input.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/custom-gradient-picker/constants.js +1 -1
- package/build/custom-gradient-picker/constants.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +9 -5
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +14 -9
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js +34 -54
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build/custom-gradient-picker/index.js +45 -16
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js +10 -4
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build/custom-gradient-picker/types.js +6 -0
- package/build/custom-gradient-picker/types.js.map +1 -0
- package/build/custom-gradient-picker/utils.js +17 -12
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/drop-zone/index.js +8 -8
- package/build/drop-zone/index.js.map +1 -1
- package/build/{color-list-picker → duotone-picker/color-list-picker}/index.js +5 -5
- package/build/duotone-picker/color-list-picker/index.js.map +1 -0
- package/build/duotone-picker/color-list-picker/types.js +6 -0
- package/build/duotone-picker/color-list-picker/types.js.map +1 -0
- package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +39 -2
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/duotone-swatch.js.map +1 -1
- package/build/duotone-picker/index.js.map +1 -1
- package/build/duotone-picker/types.js +6 -0
- package/build/duotone-picker/types.js.map +1 -0
- package/build/duotone-picker/utils.js +13 -11
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/form-token-field/index.js +9 -3
- package/build/form-token-field/index.js.map +1 -1
- package/build/gradient-picker/index.js +61 -9
- package/build/gradient-picker/index.js.map +1 -1
- package/build/gradient-picker/types.js +6 -0
- package/build/gradient-picker/types.js.map +1 -0
- package/build/index.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js +0 -4
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +100 -55
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js +82 -0
- package/build/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js.map +1 -0
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js +85 -0
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +1 -0
- package/build/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js +44 -0
- package/build/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js.map +1 -0
- package/build/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js +53 -0
- package/build/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js.map +1 -0
- package/build/navigator/navigator-provider/component.js +4 -2
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +4 -3
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/palette-edit/index.js +1 -2
- package/build/palette-edit/index.js.map +1 -1
- package/build/private-apis.js.map +1 -1
- package/build/query-controls/author-select.js +2 -1
- package/build/query-controls/author-select.js.map +1 -1
- package/build/query-controls/category-select.js +3 -1
- package/build/query-controls/category-select.js.map +1 -1
- package/build/query-controls/index.js +7 -1
- package/build/query-controls/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.native.js +129 -93
- package/build/sandbox/index.native.js.map +1 -1
- package/build/tab-panel/index.js +1 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +45 -6
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/utils/input/input-control.js +1 -1
- package/build/utils/input/input-control.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +1 -4
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/index.js +12 -21
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +20 -13
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build-module/animate/index.js +25 -17
- package/build-module/animate/index.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/color-picker/color-input.js +0 -4
- package/build-module/color-picker/color-input.js.map +1 -1
- package/build-module/color-picker/component.js +3 -3
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/hsl-input.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/legacy-adapter.js.map +1 -1
- package/build-module/color-picker/picker.js +4 -0
- package/build-module/color-picker/picker.js.map +1 -1
- package/build-module/color-picker/rgb-input.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/custom-gradient-picker/constants.js +1 -1
- package/build-module/custom-gradient-picker/constants.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +9 -4
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +14 -8
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/utils.js +34 -54
- package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +44 -17
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/serializer.js +10 -4
- package/build-module/custom-gradient-picker/serializer.js.map +1 -1
- package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
- package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build-module/custom-gradient-picker/types.js +2 -0
- package/build-module/custom-gradient-picker/utils.js +17 -12
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/drop-zone/index.js +8 -8
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/{color-list-picker → duotone-picker/color-list-picker}/index.js +5 -5
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -0
- package/build-module/duotone-picker/color-list-picker/types.js +2 -0
- package/build-module/duotone-picker/color-list-picker/types.js.map +1 -0
- package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +38 -2
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
- package/build-module/duotone-picker/index.js.map +1 -1
- package/build-module/duotone-picker/types.js +2 -0
- package/build-module/duotone-picker/types.js.map +1 -0
- package/build-module/duotone-picker/utils.js +17 -11
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/form-token-field/index.js +9 -4
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/gradient-picker/index.js +61 -10
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/gradient-picker/types.js +2 -0
- package/build-module/gradient-picker/types.js.map +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +0 -4
- 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 +97 -54
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js +73 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js.map +1 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js +76 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +1 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js +33 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js.map +1 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js +40 -0
- package/build-module/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js.map +1 -0
- package/build-module/navigator/navigator-provider/component.js +4 -2
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +4 -3
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/palette-edit/index.js +1 -2
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/query-controls/author-select.js +2 -1
- package/build-module/query-controls/author-select.js.map +1 -1
- package/build-module/query-controls/category-select.js +3 -1
- package/build-module/query-controls/category-select.js.map +1 -1
- package/build-module/query-controls/index.js +7 -2
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.native.js +121 -87
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/tab-panel/index.js +2 -2
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +45 -6
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/utils/input/input-control.js +1 -1
- package/build-module/utils/input/input-control.js.map +1 -1
- package/build-style/style-rtl.css +41 -29
- package/build-style/style.css +43 -29
- package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
- package/build-types/angle-picker-control/index.d.ts.map +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +6 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
- package/build-types/animate/index.d.ts +27 -22
- package/build-types/animate/index.d.ts.map +1 -1
- package/build-types/animate/stories/index.d.ts +18 -0
- package/build-types/animate/stories/index.d.ts.map +1 -0
- package/build-types/animate/types.d.ts +30 -0
- package/build-types/animate/types.d.ts.map +1 -0
- package/build-types/border-box-control/border-box-control/hook.d.ts +2 -2
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +2 -2
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +2 -2
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +2 -2
- package/build-types/border-control/border-control/hook.d.ts +2 -2
- package/build-types/border-control/border-control-dropdown/hook.d.ts +2 -2
- package/build-types/border-control/border-control-style-picker/hook.d.ts +2 -2
- package/build-types/box-control/styles/box-control-styles.d.ts +5 -5
- package/build-types/button/deprecated.d.ts +2 -2
- package/build-types/card/card/hook.d.ts +2 -2
- package/build-types/card/card-body/hook.d.ts +2 -2
- package/build-types/card/card-divider/hook.d.ts +2 -2
- package/build-types/card/card-footer/hook.d.ts +2 -2
- package/build-types/card/card-header/hook.d.ts +2 -2
- package/build-types/card/card-media/hook.d.ts +2 -2
- package/build-types/color-palette/styles.d.ts +1 -1
- package/build-types/color-picker/color-input.d.ts +1 -11
- package/build-types/color-picker/color-input.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts +8 -9
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts +1 -10
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/hsl-input.d.ts +1 -10
- package/build-types/color-picker/hsl-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts +1 -9
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts +1 -3
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +4 -7
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/rgb-input.d.ts +1 -10
- package/build-types/color-picker/rgb-input.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.d.ts +19 -0
- package/build-types/color-picker/stories/index.d.ts.map +1 -0
- package/build-types/color-picker/styles.d.ts +5 -5
- package/build-types/color-picker/test/index.d.ts +2 -0
- package/build-types/color-picker/test/index.d.ts.map +1 -0
- package/build-types/color-picker/types.d.ts +105 -1
- package/build-types/color-picker/types.d.ts.map +1 -1
- package/build-types/color-picker/use-deprecated-props.d.ts +1 -44
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
- package/build-types/combobox-control/styles.d.ts +1 -1
- package/build-types/custom-gradient-picker/constants.d.ts +8 -8
- package/build-types/custom-gradient-picker/constants.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts +7 -7
- package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +5 -22
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +3 -9
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts +2 -0
- package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts +44 -92
- package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts +27 -6
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/serializer.d.ts +9 -16
- package/build-types/custom-gradient-picker/serializer.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.d.ts +12 -0
- package/build-types/custom-gradient-picker/stories/index.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +3 -2
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/test/serializer.d.ts +2 -0
- package/build-types/custom-gradient-picker/test/serializer.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/types.d.ts +118 -0
- package/build-types/custom-gradient-picker/types.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/utils.d.ts +12 -4
- package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +2 -2
- package/build-types/date-time/date-time/styles.d.ts +1 -1
- package/build-types/date-time/time/styles.d.ts +8 -8
- package/build-types/drop-zone/index.d.ts.map +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -0
- package/build-types/{color-list-picker → duotone-picker/color-list-picker}/types.d.ts +2 -2
- package/build-types/duotone-picker/color-list-picker/types.d.ts.map +1 -0
- package/build-types/duotone-picker/custom-duotone-bar.d.ts +6 -0
- package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -0
- package/build-types/duotone-picker/duotone-picker.d.ts +38 -0
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -0
- package/build-types/duotone-picker/duotone-swatch.d.ts +5 -0
- package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -0
- package/build-types/duotone-picker/index.d.ts +3 -0
- package/build-types/duotone-picker/index.d.ts.map +1 -0
- package/build-types/duotone-picker/stories/duotone-picker.d.ts +12 -0
- package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +1 -0
- package/build-types/duotone-picker/stories/duotone-swatch.d.ts +14 -0
- package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +1 -0
- package/build-types/duotone-picker/types.d.ts +60 -0
- package/build-types/duotone-picker/types.d.ts.map +1 -0
- package/build-types/duotone-picker/utils.d.ts +52 -0
- package/build-types/duotone-picker/utils.d.ts.map +1 -0
- package/build-types/elevation/hook.d.ts +2 -2
- package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
- package/build-types/flex/flex/hook.d.ts +2 -2
- package/build-types/flex/flex-block/hook.d.ts +2 -2
- package/build-types/flex/flex-item/hook.d.ts +2 -2
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -2
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts +1 -1
- package/build-types/form-token-field/types.d.ts +6 -0
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts +49 -11
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.d.ts +14 -0
- package/build-types/gradient-picker/stories/index.d.ts.map +1 -0
- package/build-types/gradient-picker/types.d.ts +87 -0
- package/build-types/gradient-picker/types.d.ts.map +1 -0
- package/build-types/grid/hook.d.ts +2 -2
- package/build-types/h-stack/hook.d.ts +2 -2
- package/build-types/heading/hook.d.ts +2 -2
- package/build-types/index.d.ts +128 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/input-control/styles/input-control-styles.d.ts +2 -2
- package/build-types/item-group/item/hook.d.ts +2 -2
- package/build-types/item-group/item-group/hook.d.ts +2 -2
- package/build-types/navigation/styles/navigation-styles.d.ts +2 -2
- package/build-types/navigator/navigator-back-button/hook.d.ts +2 -2
- package/build-types/navigator/navigator-button/hook.d.ts +2 -2
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/stories/index.d.ts +1 -0
- package/build-types/navigator/stories/index.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +2 -2
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +2 -2
- package/build-types/number-control/stories/index.d.ts +2 -2
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +3 -3
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/stories/e2e/index.d.ts +1 -1
- package/build-types/private-apis.d.ts +2 -3
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/query-controls/author-select.d.ts.map +1 -1
- package/build-types/query-controls/category-select.d.ts.map +1 -1
- package/build-types/query-controls/index.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
- 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 +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.d.ts +2 -2
- package/build-types/scrollable/hook.d.ts +2 -2
- package/build-types/search-control/index.d.ts +1 -1
- package/build-types/search-control/stories/index.d.ts +2 -2
- package/build-types/spacer/hook.d.ts +2 -2
- package/build-types/spinner/index.d.ts +1 -1
- package/build-types/surface/hook.d.ts +2 -2
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +2 -2
- package/build-types/text-control/index.d.ts +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +2 -2
- package/build-types/tools-panel/tools-panel/hook.d.ts +2 -2
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -2
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -2
- package/build-types/tools-panel/types.d.ts +1 -0
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +2 -2
- package/build-types/ui/control-group/hook.d.ts +2 -2
- package/build-types/ui/control-label/hook.d.ts +2 -2
- package/build-types/ui/form-group/form-group.d.ts +2 -2
- package/build-types/ui/form-group/use-form-group.d.ts +2 -2
- package/build-types/unit-control/index.d.ts +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -2
- package/build-types/utils/input/input-control.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +2 -2
- package/package.json +20 -19
- package/src/angle-picker-control/angle-circle.tsx +0 -1
- package/src/angle-picker-control/index.tsx +14 -27
- package/src/angle-picker-control/styles/angle-picker-control-styles.tsx +16 -9
- package/src/animate/index.tsx +75 -0
- package/src/animate/stories/index.tsx +102 -0
- package/src/animate/types.ts +32 -0
- package/src/border-box-control/stories/index.tsx +1 -1
- package/src/box-control/axial-input-controls.tsx +1 -1
- package/src/circular-option-picker/style.scss +10 -0
- package/src/color-indicator/style.scss +1 -0
- package/src/color-picker/README.md +2 -2
- package/src/color-picker/color-input.tsx +1 -12
- package/src/color-picker/component.tsx +9 -18
- package/src/color-picker/hex-input.tsx +2 -7
- package/src/color-picker/hsl-input.tsx +2 -7
- package/src/color-picker/input-with-slider.tsx +1 -9
- package/src/color-picker/legacy-adapter.tsx +1 -2
- package/src/color-picker/picker.tsx +5 -6
- package/src/color-picker/rgb-input.tsx +2 -7
- package/src/color-picker/stories/index.tsx +51 -0
- package/src/color-picker/test/{index.js → index.tsx} +36 -18
- package/src/color-picker/types.ts +128 -1
- package/src/color-picker/use-deprecated-props.ts +2 -53
- package/src/combobox-control/stories/index.tsx +1 -1
- package/src/custom-gradient-picker/{constants.js → constants.ts} +2 -2
- package/src/custom-gradient-picker/gradient-bar/{control-points.js → control-points.tsx} +171 -134
- package/src/custom-gradient-picker/gradient-bar/{index.js → index.tsx} +32 -10
- package/src/custom-gradient-picker/gradient-bar/test/{utils.js → utils.ts} +58 -31
- package/src/custom-gradient-picker/gradient-bar/utils.ts +193 -0
- package/src/custom-gradient-picker/{index.js → index.tsx} +63 -22
- package/src/custom-gradient-picker/serializer.ts +78 -0
- package/src/custom-gradient-picker/stories/index.tsx +45 -0
- package/src/custom-gradient-picker/style.scss +25 -4
- package/src/custom-gradient-picker/test/{serializer.js → serializer.ts} +39 -33
- package/src/custom-gradient-picker/types.ts +119 -0
- package/src/custom-gradient-picker/{utils.js → utils.ts} +37 -22
- package/src/custom-select-control/test/index.js +6 -4
- package/src/drop-zone/index.tsx +12 -8
- package/src/drop-zone/style.scss +1 -1
- package/src/{color-list-picker → duotone-picker/color-list-picker}/index.tsx +7 -6
- package/src/{color-list-picker → duotone-picker/color-list-picker}/types.ts +2 -2
- package/src/duotone-picker/{custom-duotone-bar.js → custom-duotone-bar.tsx} +7 -1
- package/src/duotone-picker/{duotone-picker.js → duotone-picker.tsx} +39 -2
- package/src/duotone-picker/{duotone-swatch.js → duotone-swatch.tsx} +2 -1
- package/src/duotone-picker/stories/{duotone-picker.js → duotone-picker.tsx} +15 -8
- package/src/duotone-picker/stories/{duotone-swatch.js → duotone-swatch.tsx} +9 -3
- package/src/duotone-picker/types.ts +61 -0
- package/src/duotone-picker/{utils.js → utils.ts} +29 -14
- package/src/flex/flex-item/README.md +1 -1
- package/src/form-token-field/README.md +1 -0
- package/src/form-token-field/index.tsx +10 -3
- package/src/form-token-field/style.scss +0 -7
- package/src/form-token-field/test/index.tsx +1 -0
- package/src/form-token-field/types.ts +6 -0
- package/src/gradient-picker/README.md +16 -23
- package/src/gradient-picker/{index.js → index.tsx} +70 -16
- package/src/gradient-picker/stories/{index.js → index.tsx} +19 -8
- package/src/gradient-picker/types.ts +89 -0
- package/src/item-group/test/index.js +5 -3
- package/src/mobile/keyboard-aware-flat-list/index.android.js +0 -4
- package/src/mobile/keyboard-aware-flat-list/index.ios.js +118 -67
- package/src/mobile/keyboard-aware-flat-list/test/use-keyboard-offset.native.js +203 -0
- package/src/mobile/keyboard-aware-flat-list/test/use-scroll-to-text-input.native.js +140 -0
- package/src/mobile/keyboard-aware-flat-list/test/use-text-input-caret-position.native.js +82 -0
- package/src/mobile/keyboard-aware-flat-list/test/use-text-input-offset.native.js +147 -0
- package/src/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js +87 -0
- package/src/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js +105 -0
- package/src/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js +36 -0
- package/src/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js +54 -0
- package/src/navigator/navigator-provider/component.tsx +2 -0
- package/src/navigator/navigator-screen/component.tsx +5 -2
- package/src/navigator/stories/index.tsx +68 -0
- package/src/navigator/test/index.tsx +52 -0
- package/src/navigator/types.ts +2 -1
- package/src/palette-edit/index.tsx +4 -5
- package/src/query-controls/author-select.tsx +1 -0
- package/src/query-controls/category-select.tsx +1 -0
- package/src/query-controls/index.tsx +4 -2
- package/src/resizable-box/resize-tooltip/utils.ts +1 -1
- package/src/sandbox/index.native.js +139 -112
- package/src/slot-fill/test/slot.js +8 -6
- package/src/style.scss +1 -1
- package/src/tab-panel/index.tsx +7 -2
- package/src/tools-panel/test/index.tsx +86 -0
- package/src/tools-panel/tools-panel/hook.ts +44 -4
- package/src/tools-panel/types.ts +1 -0
- package/src/tooltip/test/index.js +251 -301
- package/src/utils/input/input-control.js +1 -0
- package/tsconfig.json +1 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/build/color-list-picker/index.js.map +0 -1
- package/build-module/color-list-picker/index.js.map +0 -1
- package/build-types/color-list-picker/index.d.ts.map +0 -1
- package/build-types/color-list-picker/types.d.ts.map +0 -1
- package/src/animate/index.js +0 -60
- package/src/animate/stories/index.js +0 -53
- package/src/color-picker/stories/index.js +0 -41
- package/src/custom-gradient-picker/gradient-bar/utils.js +0 -189
- package/src/custom-gradient-picker/serializer.js +0 -48
- package/src/custom-gradient-picker/stories/index.js +0 -33
- /package/build/{color-list-picker → animate}/types.js +0 -0
- /package/build-module/{color-list-picker → animate}/types.js +0 -0
- /package/build-module/{color-list-picker → animate}/types.js.map +0 -0
- /package/{build/color-list-picker → build-module/custom-gradient-picker}/types.js.map +0 -0
- /package/build-types/{color-list-picker → duotone-picker/color-list-picker}/index.d.ts +0 -0
- /package/src/custom-gradient-picker/gradient-bar/{constants.js → constants.ts} +0 -0
- /package/src/custom-gradient-picker/styles/{custom-gradient-picker-styles.js → custom-gradient-picker-styles.tsx} +0 -0
- /package/src/{color-list-picker → duotone-picker/color-list-picker}/style.scss +0 -0
- /package/src/duotone-picker/{index.js → index.ts} +0 -0
- /package/src/{index.js → index.ts} +0 -0
- /package/src/{private-apis.js → private-apis.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rgb-input.d.ts","sourceRoot":"","sources":["../../src/color-picker/rgb-input.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"rgb-input.d.ts","sourceRoot":"","sources":["../../src/color-picker/rgb-input.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,QAAQ,qCAAuC,aAAa,gBAwDxE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { ColorPicker } from '../component';
|
|
10
|
+
declare const meta: ComponentMeta<typeof ColorPicker>;
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Default: ComponentStory<import("../../ui/context").WordPressComponent<import("react").ElementType<any>, {
|
|
13
|
+
enableAlpha?: boolean | undefined;
|
|
14
|
+
color?: string | undefined;
|
|
15
|
+
onChange?: ((color: string) => void) | undefined;
|
|
16
|
+
defaultValue?: string | undefined;
|
|
17
|
+
copyFormat?: import("../types").ColorType | undefined;
|
|
18
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "defaultValue" | "onChange" | "color" | "children" | "as" | "enableAlpha" | "copyFormat"> & import("react").RefAttributes<any>, boolean>>;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/color-picker/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CAc5C,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO;;;;;;yTAAsB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const NumberControlWrapper: import("@emotion/styled").StyledComponent<Omit<import("../input-control/types").InputControlProps, "value" | "type" | "
|
|
2
|
+
export declare const NumberControlWrapper: import("@emotion/styled").StyledComponent<Omit<import("../input-control/types").InputControlProps, "value" | "type" | "step" | "max" | "min" | "required" | "isDragEnabled"> & {
|
|
3
3
|
hideHTMLArrows?: boolean | undefined;
|
|
4
4
|
spinControls?: "none" | "custom" | "native" | undefined;
|
|
5
5
|
isDragEnabled?: boolean | undefined;
|
|
@@ -11,7 +11,7 @@ export declare const NumberControlWrapper: import("@emotion/styled").StyledCompo
|
|
|
11
11
|
step?: string | number | undefined;
|
|
12
12
|
type?: import("react").HTMLInputTypeAttribute | undefined;
|
|
13
13
|
value?: string | number | undefined;
|
|
14
|
-
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "type" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "
|
|
14
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "type" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "max" | "min" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "suffix" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "src" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "spinControls" | "isShiftStepEnabled" | "shiftStep"> & import("react").RefAttributes<any> & {
|
|
15
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
16
|
}, {}, {}>;
|
|
17
17
|
export declare const SelectControl: import("@emotion/styled").StyledComponent<(import("../ui/context").WordPressComponentProps<import("../select-control/types").SelectControlProps, "select", false> & import("react").RefAttributes<HTMLSelectElement>) & {
|
|
@@ -48,7 +48,7 @@ export declare const RangeControl: import("@emotion/styled").StyledComponent<Pic
|
|
|
48
48
|
trackColor?: import("csstype").Property.Color | undefined;
|
|
49
49
|
type?: "stepper" | undefined;
|
|
50
50
|
withInputField?: boolean | undefined;
|
|
51
|
-
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "color" | "help" | "icon" | "disabled" | "children" | "label" | "as" | "type" | "onFocus" | "onBlur" | "onMouseLeave" | "onMouseMove" | "
|
|
51
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "color" | "help" | "icon" | "disabled" | "children" | "label" | "as" | "type" | "onFocus" | "onBlur" | "onMouseLeave" | "onMouseMove" | "step" | "showTooltip" | "hideLabelFromVision" | "__nextHasNoMarginBottom" | "isShiftStepEnabled" | "shiftStep" | "marks" | "railColor" | "trackColor" | keyof import("../range-control/types").NumericProps | "renderTooltipContent" | "afterIcon" | "allowReset" | "beforeIcon" | "currentInput" | "initialPosition" | "resetFallbackValue" | "separatorType" | "withInputField"> & import("react").RefAttributes<HTMLInputElement> & {
|
|
52
52
|
theme?: import("@emotion/react").Theme | undefined;
|
|
53
53
|
}, {}, {}>;
|
|
54
54
|
export declare const AuxiliaryColorArtefactWrapper: import("@emotion/styled").StyledComponent<{
|
|
@@ -58,12 +58,12 @@ export declare const AuxiliaryColorArtefactWrapper: import("@emotion/styled").St
|
|
|
58
58
|
export declare const AuxiliaryColorArtefactHStackHeader: import("@emotion/styled").StyledComponent<Omit<import("../flex/types").FlexProps, "gap" | "align"> & {
|
|
59
59
|
alignment?: "initial" | "left" | "right" | (string & {}) | "bottom" | "top" | "-moz-initial" | "inherit" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "edge" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | undefined;
|
|
60
60
|
spacing?: import("csstype").Property.Width<string | number> | undefined;
|
|
61
|
-
} & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "direction" | "wrap" | "expanded" | "justify" | "children" | "as" | "
|
|
61
|
+
} & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "direction" | "wrap" | "expanded" | "justify" | "children" | "as" | "spacing" | keyof import("react").RefAttributes<any> | "isReversed" | "alignment"> & {
|
|
62
62
|
as?: keyof JSX.IntrinsicElements | undefined;
|
|
63
63
|
} & {
|
|
64
64
|
theme?: import("@emotion/react").Theme | undefined;
|
|
65
65
|
}, {}, {}>;
|
|
66
|
-
export declare const ColorInputWrapper: import("@emotion/styled").StyledComponent<import("../flex/types").FlexProps & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("
|
|
66
|
+
export declare const ColorInputWrapper: import("@emotion/styled").StyledComponent<import("../flex/types").FlexProps & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("react").RefAttributes<any> | keyof import("../flex/types").FlexProps> & {
|
|
67
67
|
as?: keyof JSX.IntrinsicElements | undefined;
|
|
68
68
|
} & {
|
|
69
69
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/color-picker/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,114 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type { Colord } from 'colord';
|
|
4
|
+
import type { Colord, HslColor, HsvaColor, HsvColor, RgbaColor, RgbColor } from 'colord';
|
|
5
|
+
import type { HslaColor } from 'react-colorful';
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import type { WordPressComponentProps } from '../ui/context';
|
|
10
|
+
import type { useDeprecatedProps } from './use-deprecated-props';
|
|
5
11
|
export type ColorType = 'rgb' | 'hsl' | 'hex';
|
|
6
12
|
export type ColorCopyButtonProps = {
|
|
7
13
|
color: Colord;
|
|
8
14
|
colorType: ColorType;
|
|
9
15
|
};
|
|
16
|
+
export type LegacyAdapterProps = Parameters<typeof useDeprecatedProps>[0];
|
|
17
|
+
export type ColorPickerProps = WordPressComponentProps<{
|
|
18
|
+
/**
|
|
19
|
+
* When `true` the color picker will display the alpha channel both in
|
|
20
|
+
* the bottom inputs as well as in the color picker itself.
|
|
21
|
+
*
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
enableAlpha?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The current color value to display in the picker.
|
|
27
|
+
* Must be a hex or hex8 string.
|
|
28
|
+
*/
|
|
29
|
+
color?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Fired when the color changes. Always passes a hex or hex8 color string.
|
|
32
|
+
*/
|
|
33
|
+
onChange?: (color: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* An optional default value to use for the color picker.
|
|
36
|
+
*/
|
|
37
|
+
defaultValue?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The format to copy when clicking the displayed color format.
|
|
40
|
+
*/
|
|
41
|
+
copyFormat?: ColorType;
|
|
42
|
+
}, 'div', false>;
|
|
43
|
+
export interface PickerProps {
|
|
44
|
+
color: Colord;
|
|
45
|
+
enableAlpha: boolean;
|
|
46
|
+
onChange: (nextColor: Colord) => void;
|
|
47
|
+
}
|
|
48
|
+
export interface ColorInputProps {
|
|
49
|
+
colorType: 'hsl' | 'hex' | 'rgb';
|
|
50
|
+
color: Colord;
|
|
51
|
+
onChange: (nextColor: Colord) => void;
|
|
52
|
+
enableAlpha: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface InputWithSliderProps {
|
|
55
|
+
min: number;
|
|
56
|
+
max: number;
|
|
57
|
+
value: number;
|
|
58
|
+
label: string;
|
|
59
|
+
abbreviation: string;
|
|
60
|
+
onChange: (value: number) => void;
|
|
61
|
+
}
|
|
62
|
+
export interface HexInputProps {
|
|
63
|
+
color: Colord;
|
|
64
|
+
onChange: (nextColor: Colord) => void;
|
|
65
|
+
enableAlpha: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface HslInputProps {
|
|
68
|
+
color: Colord;
|
|
69
|
+
onChange: (nextColor: Colord) => void;
|
|
70
|
+
enableAlpha: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface RgbInputProps {
|
|
73
|
+
color: Colord;
|
|
74
|
+
onChange: (nextColor: Colord) => void;
|
|
75
|
+
enableAlpha: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated
|
|
79
|
+
*/
|
|
80
|
+
export type LegacyColor = string | {
|
|
81
|
+
hex: string;
|
|
82
|
+
hsl: HslColor | HslaColor;
|
|
83
|
+
hsv: HsvColor | HsvaColor;
|
|
84
|
+
rgb: RgbColor | RgbaColor;
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated
|
|
87
|
+
*/
|
|
88
|
+
oldHue: number;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated
|
|
91
|
+
*/
|
|
92
|
+
source: 'hex';
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated
|
|
96
|
+
*/
|
|
97
|
+
export interface LegacyProps {
|
|
98
|
+
color?: LegacyColor;
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated
|
|
101
|
+
*/
|
|
102
|
+
onChangeComplete: (colors: LegacyColor) => void;
|
|
103
|
+
/**
|
|
104
|
+
* @deprecated
|
|
105
|
+
*/
|
|
106
|
+
oldHue: string;
|
|
107
|
+
className: string;
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated
|
|
110
|
+
*/
|
|
111
|
+
disableAlpha: boolean;
|
|
112
|
+
onChange?: never;
|
|
113
|
+
}
|
|
10
114
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/color-picker/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/color-picker/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAC9C,MAAM,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAE,OAAO,kBAAkB,CAAE,CAAE,CAAC,CAAE,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CACrD;IACC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACvB,EACD,KAAK,EACL,KAAK,CACL,CAAC;AAEF,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACxC,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACxC,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACxC,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACxC,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GACpB,MAAM,GACN;IACA,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC1B,GAAG,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC1B,GAAG,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC;CACb,CAAC;AAEL;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,gBAAgB,EAAE,CAAE,MAAM,EAAE,WAAW,KAAM,IAAI,CAAC;IAClD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC;CACjB"}
|
|
@@ -1,49 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { HslColor, HslaColor, HsvColor, HsvaColor, RgbColor, RgbaColor } from 'colord';
|
|
5
|
-
import type { ComponentProps } from 'react';
|
|
6
1
|
/**
|
|
7
2
|
* Internal dependencies
|
|
8
3
|
*/
|
|
9
|
-
import type
|
|
10
|
-
type ColorPickerProps = ComponentProps<typeof ColorPicker>;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated
|
|
13
|
-
*/
|
|
14
|
-
type LegacyColor = string | {
|
|
15
|
-
hex: string;
|
|
16
|
-
hsl: HslColor | HslaColor;
|
|
17
|
-
hsv: HsvColor | HsvaColor;
|
|
18
|
-
rgb: RgbColor | RgbaColor;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated
|
|
21
|
-
*/
|
|
22
|
-
oldHue: number;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated
|
|
25
|
-
*/
|
|
26
|
-
source: 'hex';
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated
|
|
30
|
-
*/
|
|
31
|
-
export interface LegacyProps {
|
|
32
|
-
color?: LegacyColor;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated
|
|
35
|
-
*/
|
|
36
|
-
onChangeComplete: (colors: LegacyColor) => void;
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated
|
|
39
|
-
*/
|
|
40
|
-
oldHue: string;
|
|
41
|
-
className: string;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated
|
|
44
|
-
*/
|
|
45
|
-
disableAlpha: boolean;
|
|
46
|
-
}
|
|
4
|
+
import type { ColorPickerProps, LegacyProps } from './types';
|
|
47
5
|
export declare function useDeprecatedProps(props: LegacyProps | ColorPickerProps): ColorPickerProps;
|
|
48
|
-
export {};
|
|
49
6
|
//# sourceMappingURL=use-deprecated-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-deprecated-props.d.ts","sourceRoot":"","sources":["../../src/color-picker/use-deprecated-props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-deprecated-props.d.ts","sourceRoot":"","sources":["../../src/color-picker/use-deprecated-props.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAe,WAAW,EAAE,MAAM,SAAS,CAAC;AAyC1E,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,WAAW,GAAG,gBAAgB,GACnC,gBAAgB,CAqBlB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ComboboxControlProps } from './types';
|
|
3
|
-
export declare const InputWrapperFlex: import("@emotion/styled").StyledComponent<import("../flex/types").FlexProps & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("
|
|
3
|
+
export declare const InputWrapperFlex: import("@emotion/styled").StyledComponent<import("../flex/types").FlexProps & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("react").RefAttributes<any> | keyof import("../flex/types").FlexProps> & {
|
|
4
4
|
as?: keyof JSX.IntrinsicElements | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export const DEFAULT_GRADIENT
|
|
2
|
-
export const DEFAULT_LINEAR_GRADIENT_ANGLE
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
export const GRADIENT_OPTIONS: {
|
|
1
|
+
export declare const DEFAULT_GRADIENT = "linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)";
|
|
2
|
+
export declare const DEFAULT_LINEAR_GRADIENT_ANGLE = 180;
|
|
3
|
+
export declare const HORIZONTAL_GRADIENT_ORIENTATION: {
|
|
4
|
+
readonly type: "angular";
|
|
5
|
+
readonly value: "90";
|
|
6
|
+
};
|
|
7
|
+
export declare const GRADIENT_OPTIONS: {
|
|
8
8
|
value: string;
|
|
9
9
|
label: string;
|
|
10
10
|
}[];
|
|
11
|
-
export const DIRECTIONAL_ORIENTATION_ANGLE_MAP: {
|
|
11
|
+
export declare const DIRECTIONAL_ORIENTATION_ANGLE_MAP: {
|
|
12
12
|
top: number;
|
|
13
13
|
'top right': number;
|
|
14
14
|
'right top': number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/custom-gradient-picker/constants.
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/custom-gradient-picker/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,6EAC8C,CAAC;AAE5E,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,eAAO,MAAM,+BAA+B;;;CAGlC,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;GAG5B,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;CAa7C,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export const GRADIENT_MARKERS_WIDTH
|
|
2
|
-
export const INSERT_POINT_WIDTH
|
|
3
|
-
export const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT
|
|
4
|
-
export const MINIMUM_DISTANCE_BETWEEN_POINTS
|
|
5
|
-
export const MINIMUM_SIGNIFICANT_MOVE
|
|
6
|
-
export const KEYBOARD_CONTROL_POINT_VARIATION
|
|
7
|
-
export const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_MARKER: number;
|
|
1
|
+
export declare const GRADIENT_MARKERS_WIDTH = 16;
|
|
2
|
+
export declare const INSERT_POINT_WIDTH = 16;
|
|
3
|
+
export declare const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT = 10;
|
|
4
|
+
export declare const MINIMUM_DISTANCE_BETWEEN_POINTS = 0;
|
|
5
|
+
export declare const MINIMUM_SIGNIFICANT_MOVE = 5;
|
|
6
|
+
export declare const KEYBOARD_CONTROL_POINT_VARIATION = 10;
|
|
7
|
+
export declare const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_MARKER: number;
|
|
8
8
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/constants.
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,2CAA2C,KAAK,CAAC;AAC9D,eAAO,MAAM,+BAA+B,IAAI,CAAC;AACjD,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,eAAO,MAAM,gCAAgC,KACD,CAAC;AAC7C,eAAO,MAAM,4CAA4C,QACL,CAAC"}
|
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
disableAlpha: any;
|
|
5
|
-
gradientPickerDomRef: any;
|
|
6
|
-
ignoreMarkerPosition: any;
|
|
7
|
-
value: any;
|
|
8
|
-
onChange: any;
|
|
9
|
-
onStartControlPointChange: any;
|
|
10
|
-
onStopControlPointChange: any;
|
|
11
|
-
__experimentalIsRenderedInSidebar: any;
|
|
12
|
-
}): any;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ControlPointsProps, InsertPointProps } from '../types';
|
|
3
|
+
declare function ControlPoints({ disableRemove, disableAlpha, gradientPickerDomRef, ignoreMarkerPosition, value: controlPoints, onChange, onStartControlPointChange, onStopControlPointChange, __experimentalIsRenderedInSidebar, }: ControlPointsProps): JSX.Element;
|
|
13
4
|
declare namespace ControlPoints {
|
|
14
|
-
|
|
5
|
+
var InsertPoint: ({ value: controlPoints, onChange, onOpenInserter, onCloseInserter, insertPosition, disableAlpha, __experimentalIsRenderedInSidebar, }: InsertPointProps) => JSX.Element;
|
|
15
6
|
}
|
|
16
|
-
|
|
17
|
-
value: any;
|
|
18
|
-
onChange: any;
|
|
19
|
-
onOpenInserter: any;
|
|
20
|
-
onCloseInserter: any;
|
|
21
|
-
insertPosition: any;
|
|
22
|
-
disableAlpha: any;
|
|
23
|
-
__experimentalIsRenderedInSidebar: any;
|
|
24
|
-
}): JSX.Element;
|
|
7
|
+
export default ControlPoints;
|
|
25
8
|
//# sourceMappingURL=control-points.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-points.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/control-points.
|
|
1
|
+
{"version":3,"file":"control-points.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/control-points.tsx"],"names":[],"mappings":";AAqCA,OAAO,KAAK,EAGX,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,UAAU,CAAC;AAwElB,iBAAS,aAAa,CAAE,EACvB,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,EAAE,aAAa,EACpB,QAAQ,EACR,yBAAyB,EACzB,wBAAwB,EACxB,iCAAiC,GACjC,EAAE,kBAAkB,eAyMpB;kBAnNQ,aAAa;;;AA6RtB,eAAe,aAAa,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: any;
|
|
5
|
-
onChange: any;
|
|
6
|
-
disableInserter?: boolean | undefined;
|
|
7
|
-
disableAlpha?: boolean | undefined;
|
|
8
|
-
__experimentalIsRenderedInSidebar: any;
|
|
9
|
-
}): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CustomGradientBarProps } from '../types';
|
|
3
|
+
export default function CustomGradientBar({ background, hasGradient, value: controlPoints, onChange, disableInserter, disableAlpha, __experimentalIsRenderedInSidebar, }: CustomGradientBarProps): JSX.Element;
|
|
10
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/index.tsx"],"names":[],"mappings":";AAgBA,OAAO,KAAK,EACX,sBAAsB,EAItB,MAAM,UAAU,CAAC;AA2DlB,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAE,EAC1C,UAAU,EACV,WAAW,EACX,KAAK,EAAE,aAAa,EACpB,QAAQ,EACR,eAAuB,EACvB,YAAoB,EACpB,iCAAyC,GACzC,EAAE,sBAAsB,eAoHxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/custom-gradient-picker/gradient-bar/test/utils.ts"],"names":[],"mappings":""}
|
|
@@ -1,138 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
* Control point for the gradient bar.
|
|
3
|
-
*
|
|
4
|
-
* @typedef {Object} ControlPoint
|
|
5
|
-
* @property {string} color Color of the control point.
|
|
6
|
-
* @property {number} position Integer position of the control point as a percentage.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Color as parsed from the gradient by gradient-parser.
|
|
10
|
-
*
|
|
11
|
-
* @typedef {Object} Color
|
|
12
|
-
* @property {string} r Red component.
|
|
13
|
-
* @property {string} g Green component.
|
|
14
|
-
* @property {string} b Green component.
|
|
15
|
-
* @property {string} [a] Optional alpha component.
|
|
16
|
-
*/
|
|
1
|
+
import type { ControlPoint } from '../types';
|
|
17
2
|
/**
|
|
18
3
|
* Clamps a number between 0 and 100.
|
|
19
4
|
*
|
|
20
|
-
* @param
|
|
5
|
+
* @param value Value to clamp.
|
|
21
6
|
*
|
|
22
|
-
* @return
|
|
7
|
+
* @return Value clamped between 0 and 100.
|
|
23
8
|
*/
|
|
24
|
-
export function clampPercent(value: number): number;
|
|
9
|
+
export declare function clampPercent(value: number): number;
|
|
25
10
|
/**
|
|
26
11
|
* Check if a control point is overlapping with another.
|
|
27
12
|
*
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
13
|
+
* @param value Array of control points.
|
|
14
|
+
* @param initialIndex Index of the position to test.
|
|
15
|
+
* @param newPosition New position of the control point.
|
|
16
|
+
* @param minDistance Distance considered to be overlapping.
|
|
32
17
|
*
|
|
33
|
-
* @return
|
|
18
|
+
* @return True if the point is overlapping.
|
|
34
19
|
*/
|
|
35
|
-
export function isOverlapping(value: ControlPoint[], initialIndex: number, newPosition: number, minDistance?: number): boolean;
|
|
20
|
+
export declare function isOverlapping(value: ControlPoint[], initialIndex: number, newPosition: number, minDistance?: number): boolean;
|
|
36
21
|
/**
|
|
37
22
|
* Adds a control point from an array and returns the new array.
|
|
38
23
|
*
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
24
|
+
* @param points Array of control points.
|
|
25
|
+
* @param position Position to insert the new point.
|
|
26
|
+
* @param color Color to update the control point at index.
|
|
42
27
|
*
|
|
43
|
-
* @return
|
|
28
|
+
* @return New array of control points.
|
|
44
29
|
*/
|
|
45
|
-
export function addControlPoint(points: ControlPoint[], position: number, color:
|
|
30
|
+
export declare function addControlPoint(points: ControlPoint[], position: number, color: ControlPoint['color']): ControlPoint[];
|
|
46
31
|
/**
|
|
47
32
|
* Removes a control point from an array and returns the new array.
|
|
48
33
|
*
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
34
|
+
* @param points Array of control points.
|
|
35
|
+
* @param index Index to remove.
|
|
51
36
|
*
|
|
52
|
-
* @return
|
|
37
|
+
* @return New array of control points.
|
|
53
38
|
*/
|
|
54
|
-
export function removeControlPoint(points: ControlPoint[], index: number): ControlPoint[];
|
|
39
|
+
export declare function removeControlPoint(points: ControlPoint[], index: number): ControlPoint[];
|
|
55
40
|
/**
|
|
56
41
|
* Updates a control point from an array and returns the new array.
|
|
57
42
|
*
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
43
|
+
* @param points Array of control points.
|
|
44
|
+
* @param index Index to update.
|
|
45
|
+
* @param newPoint New control point to replace the index.
|
|
61
46
|
*
|
|
62
|
-
* @return
|
|
47
|
+
* @return New array of control points.
|
|
63
48
|
*/
|
|
64
|
-
export function updateControlPoint(points: ControlPoint[], index: number, newPoint: ControlPoint
|
|
49
|
+
export declare function updateControlPoint(points: ControlPoint[], index: number, newPoint: ControlPoint): ControlPoint[];
|
|
65
50
|
/**
|
|
66
51
|
* Updates the position of a control point from an array and returns the new array.
|
|
67
52
|
*
|
|
68
|
-
* @param
|
|
69
|
-
* @param
|
|
70
|
-
* @param
|
|
53
|
+
* @param points Array of control points.
|
|
54
|
+
* @param index Index to update.
|
|
55
|
+
* @param newPosition Position to move the control point at index.
|
|
71
56
|
*
|
|
72
|
-
* @return
|
|
57
|
+
* @return New array of control points.
|
|
73
58
|
*/
|
|
74
|
-
export function updateControlPointPosition(points: ControlPoint[], index: number, newPosition:
|
|
59
|
+
export declare function updateControlPointPosition(points: ControlPoint[], index: number, newPosition: ControlPoint['position']): ControlPoint[];
|
|
75
60
|
/**
|
|
76
61
|
* Updates the position of a control point from an array and returns the new array.
|
|
77
62
|
*
|
|
78
|
-
* @param
|
|
79
|
-
* @param
|
|
80
|
-
* @param
|
|
63
|
+
* @param points Array of control points.
|
|
64
|
+
* @param index Index to update.
|
|
65
|
+
* @param newColor Color to update the control point at index.
|
|
81
66
|
*
|
|
82
|
-
* @return
|
|
67
|
+
* @return New array of control points.
|
|
83
68
|
*/
|
|
84
|
-
export function updateControlPointColor(points: ControlPoint[], index: number, newColor:
|
|
69
|
+
export declare function updateControlPointColor(points: ControlPoint[], index: number, newColor: ControlPoint['color']): ControlPoint[];
|
|
85
70
|
/**
|
|
86
71
|
* Updates the position of a control point from an array and returns the new array.
|
|
87
72
|
*
|
|
88
|
-
* @param
|
|
89
|
-
* @param
|
|
90
|
-
* @param
|
|
73
|
+
* @param points Array of control points.
|
|
74
|
+
* @param position Position of the color stop.
|
|
75
|
+
* @param newColor Color to update the control point at index.
|
|
91
76
|
*
|
|
92
|
-
* @return
|
|
77
|
+
* @return New array of control points.
|
|
93
78
|
*/
|
|
94
|
-
export function updateControlPointColorByPosition(points: ControlPoint[], position:
|
|
79
|
+
export declare function updateControlPointColorByPosition(points: ControlPoint[], position: ControlPoint['position'], newColor: ControlPoint['color']): ControlPoint[];
|
|
95
80
|
/**
|
|
96
81
|
* Gets the horizontal coordinate when dragging a control point with the mouse.
|
|
97
82
|
*
|
|
98
|
-
* @param
|
|
99
|
-
* @param
|
|
83
|
+
* @param mouseXcoordinate Horizontal coordinate of the mouse position.
|
|
84
|
+
* @param containerElement Container for the gradient picker.
|
|
100
85
|
*
|
|
101
|
-
* @return
|
|
102
|
-
*/
|
|
103
|
-
export function getHorizontalRelativeGradientPosition(mouseXCoordinate: number, containerElement: Element): number | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* Control point for the gradient bar.
|
|
106
|
-
*/
|
|
107
|
-
export type ControlPoint = {
|
|
108
|
-
/**
|
|
109
|
-
* Color of the control point.
|
|
110
|
-
*/
|
|
111
|
-
color: string;
|
|
112
|
-
/**
|
|
113
|
-
* Integer position of the control point as a percentage.
|
|
114
|
-
*/
|
|
115
|
-
position: number;
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Color as parsed from the gradient by gradient-parser.
|
|
86
|
+
* @return Whole number percentage from the left.
|
|
119
87
|
*/
|
|
120
|
-
export
|
|
121
|
-
|
|
122
|
-
* Red component.
|
|
123
|
-
*/
|
|
124
|
-
r: string;
|
|
125
|
-
/**
|
|
126
|
-
* Green component.
|
|
127
|
-
*/
|
|
128
|
-
g: string;
|
|
129
|
-
/**
|
|
130
|
-
* Green component.
|
|
131
|
-
*/
|
|
132
|
-
b: string;
|
|
133
|
-
/**
|
|
134
|
-
* Optional alpha component.
|
|
135
|
-
*/
|
|
136
|
-
a?: string | undefined;
|
|
137
|
-
};
|
|
88
|
+
export declare function getHorizontalRelativeGradientPosition(mouseXcoordinate: number, containerElement: HTMLDivElement): number;
|
|
89
|
+
export declare function getHorizontalRelativeGradientPosition(mouseXcoordinate: number, containerElement: null): undefined;
|
|
138
90
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/utils.
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/custom-gradient-picker/gradient-bar/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAE,KAAK,EAAE,MAAM,UAE1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC5B,KAAK,EAAE,YAAY,EAAE,EACrB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,WAAW,GAAE,MAAwC,WAarD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,YAAY,EAAE,EACtB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,YAAY,CAAE,OAAO,CAAE,kBAS9B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAE,MAAM,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,kBAIxE;AACD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,YAAY,EAAE,EACtB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,YAAY,kBAKtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,YAAY,EAAE,EACtB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,YAAY,CAAE,UAAU,CAAE,kBAUvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,YAAY,EAAE,EACtB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,YAAY,CAAE,OAAO,CAAE,kBAOjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAChD,MAAM,EAAE,YAAY,EAAE,EACtB,QAAQ,EAAE,YAAY,CAAE,UAAU,CAAE,EACpC,QAAQ,EAAE,YAAY,CAAE,OAAO,CAAE,kBAIjC;AAED;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CACpD,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,cAAc,GAC9B,MAAM,CAAC;AACV,wBAAgB,qCAAqC,CACpD,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,IAAI,GACpB,SAAS,CAAC"}
|