@eightshift/ui-components 1.0.6 → 1.1.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/README.md +9 -0
- package/dist/{Button-eebLs4cp.js → Button-CbFrFO04.js} +5 -5
- package/dist/{Checkbox-BN0TEda-.js → Checkbox-Cv3pZDHg.js} +12 -16
- package/dist/{ColorSwatch-BrowHhTG.js → ColorSwatch-CNQmCQV8.js} +6 -7
- package/dist/{FieldError-ILxgMZy5.js → FieldError-J1-YPbi6.js} +2 -2
- package/dist/{FocusScope-B9b0VMib.js → FocusScope-Bw-IatMO.js} +79 -153
- package/dist/{GridList-CzpWxJsS.js → GridList-CEzzyr-l.js} +62 -90
- package/dist/{Group-Dkdm2-E7.js → Group-D3Qa6PrV.js} +3 -3
- package/dist/{Input-BJA4rmIo.js → Input-CX_rocyZ.js} +8 -8
- package/dist/{Label-9x5iLJ-Y.js → Label-Bg5O81Wb.js} +1 -1
- package/dist/{ListBox-D3Vr4vvC.js → ListBox-CCWXTj0t.js} +391 -598
- package/dist/{LiveAnnouncer-IsokfWQ5.js → LiveAnnouncer-D8h-3GrG.js} +12 -22
- package/dist/{NumberFormatter-LzoKy975.js → NumberFormatter-U_Gx0UDq.js} +26 -44
- package/dist/{Select-49a62830.esm-CKPmlkza.js → Select-49a62830.esm-BnlXlUnT.js} +92 -166
- package/dist/{SelectionManager-sedvcM-1.js → SelectionManager-XOAt-Ekx.js} +219 -401
- package/dist/{Separator-B6rnDabE.js → Separator-DZeg0KOr.js} +41 -72
- package/dist/{Slider-C5U5N7uM.js → Slider-fULMI0gI.js} +51 -82
- package/dist/{Text-Cyxp9ewv.js → Text-WqetJduR.js} +1 -1
- package/dist/{VisuallyHidden-BPJVSUyp.js → VisuallyHidden-Di1zXprL.js} +8 -11
- package/dist/{ariaHideOutside-ByKBPHmX.js → ariaHideOutside-Zn64-frS.js} +20 -36
- package/dist/assets/style.css +1 -1
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/{button-idVI4jmd.js → button-CD8Q1eok.js} +17 -29
- package/dist/components/animated-visibility/animated-visibility.js +125 -113
- package/dist/components/base-control/base-control.js +3 -9
- package/dist/components/breakpoint-preview/breakpoint-preview.js +51 -108
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +2 -2
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +5 -9
- package/dist/components/color-pickers/gradient-editor.js +15 -29
- package/dist/components/color-pickers/solid-color-picker.js +81 -128
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +4 -11
- package/dist/components/draggable-list/draggable-list-item.js +4 -4
- package/dist/components/draggable-list/draggable-list.js +5 -5
- package/dist/components/expandable/expandable.js +45 -57
- package/dist/components/index.js +3 -3
- package/dist/components/input-field/input-field.js +11 -26
- package/dist/components/layout/hstack.js +2 -12
- package/dist/components/layout/vstack.js +2 -12
- package/dist/components/link-input/link-input.js +36 -53
- package/dist/components/list-box/list-box.js +4 -4
- package/dist/components/matrix-align/matrix-align.js +6 -10
- package/dist/components/menu/menu.js +101 -170
- package/dist/components/notice/notice.js +1 -1
- package/dist/components/number-picker/number-picker.js +15 -15
- package/dist/components/option-select/option-select.js +48 -64
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-placeholder.js +2 -2
- package/dist/components/placeholders/image-placeholder.js +1 -1
- package/dist/components/placeholders/media-placeholder.js +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/radio/radio.js +25 -38
- package/dist/components/repeater/repeater-item.js +6 -17
- package/dist/components/repeater/repeater.js +6 -7
- package/dist/components/responsive/responsive-legacy.js +6 -12
- package/dist/components/responsive/responsive.js +21 -48
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +2 -8
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +2 -2
- package/dist/components/select/multi-select-components.js +2 -2
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +9 -9
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/styles.js +3 -10
- package/dist/components/slider/column-config-slider.js +4 -4
- package/dist/components/slider/slider.js +5 -8
- package/dist/components/slider/utils.js +2 -6
- package/dist/components/spacer/spacer.js +2 -7
- package/dist/components/tabs/tabs.js +29 -50
- package/dist/components/toggle/switch.js +8 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +8 -22
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/{context-BAcFg5GO.js → context-4oSz1ItD.js} +10 -16
- package/dist/{default-i18n-Bk1GxDHz.js → default-i18n-BqwLkgZv.js} +21 -22
- package/dist/{filterDOMProps-DG2RfOUr.js → filterDOMProps-EDDcM64A.js} +1 -3
- package/dist/{focusSafely-B0hyd-S4.js → focusSafely-BS4dllCW.js} +85 -143
- package/dist/icons/generic-color-swatch.js +105 -13
- package/dist/icons/icons.js +31010 -3447
- package/dist/icons/jsx-svg.js +591 -953
- package/dist/{index-BDk0TPWz.js → index-CAPcSs9K.js} +1504 -2087
- package/dist/{index-a301f526.esm-BzTuHLdr.js → index-a301f526.esm-ByOfDxiG.js} +111 -183
- package/dist/index.js +3 -3
- package/dist/{intlStrings-Ctkp0HDc.js → intlStrings-Dxaeitoh.js} +35 -60
- package/dist/{isScrollable-PcyglExV.js → isScrollable-Dh9D9IOd.js} +1 -2
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/{multi-select-components-nORKdJ-2.js → multi-select-components-7vKCF8dG.js} +3 -3
- package/dist/{number-rWqELA8W.js → number-CHmNj-oR.js} +3 -6
- package/dist/{popover-o2Q28Ljn.js → popover-Dk2o4S7K.js} +70 -112
- package/dist/{react-select-async.esm-CLj9uZTq.js → react-select-async.esm-5zW9Dv9E.js} +7 -11
- package/dist/{react-select.esm-3tyTZmrx.js → react-select.esm-Bi6uzjbT.js} +3 -3
- package/dist/{textSelection-BRZdHY-4.js → textSelection-exP_9srp.js} +5 -9
- package/dist/{tooltip-T6H9uF-Z.js → tooltip-BRQ4tvZL.js} +64 -111
- package/dist/{useButton-D-xACzEY.js → useButton-DbjDV_33.js} +19 -22
- package/dist/{useEvent-XlYPKgwX.js → useEvent-zvxfEnmK.js} +2 -3
- package/dist/{useFocusRing-CRx_hYC4.js → useFocusRing-SPRI0-SN.js} +1 -1
- package/dist/{useFocusable-CHfpEdlE.js → useFocusable-CLmhO94g.js} +5 -8
- package/dist/{useFormReset-aHn6-wRk.js → useFormReset-BVWgcyGO.js} +2 -3
- package/dist/{useFormValidationState-CdYmOaXI.js → useFormValidationState-CthG9Fbc.js} +20 -38
- package/dist/{useHasTabbableChild-domoFB7A.js → useHasTabbableChild--gkWUICh.js} +2 -2
- package/dist/{useLabel-DVhXVhtH.js → useLabel-g836T8kL.js} +3 -4
- package/dist/{useLabels-C7E5SkOi.js → useLabels-CfOtyOe2.js} +3 -5
- package/dist/{useListData-BelKu4kx.js → useListData-BpYQj7kK.js} +18 -32
- package/dist/{useListState-BRsq7O1C.js → useListState-DnWZa__1.js} +6 -12
- package/dist/{useLocalizedStringFormatter-WsEL47qR.js → useLocalizedStringFormatter-BQCMno9k.js} +12 -21
- package/dist/{useNumberFieldState-ZH2Qyyxh.js → useNumberFieldState-BegO5X6F.js} +75 -132
- package/dist/{useNumberFormatter-mhdYLxWQ.js → useNumberFormatter-DhOGEsEK.js} +2 -2
- package/dist/{usePress-B42RawCH.js → usePress-CScNeV3V.js} +92 -175
- package/dist/{useToggle-CExfZM8x.js → useToggle-6LnpaJ7-.js} +6 -7
- package/dist/{useToggleState-DghG5ImG.js → useToggleState-Cymkpac8.js} +3 -5
- package/dist/utilities/array-helpers.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/text-helpers.js +20 -20
- package/dist/{utils-DIBzm1e4.js → utils-Dc35LwuT.js} +49 -90
- package/package.json +96 -90
- package/dist/lite-pbIeT7tm.js +0 -8
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { forwardRef, useContext, createContext, useMemo, useRef, useState, useCallback } from "react";
|
|
3
3
|
import { a as $4e85f108e88277b8$export$ebe63fadcdce34ed, b as $4e85f108e88277b8$export$44644b8a16031b5b, c as $4e85f108e88277b8$export$717b2c0a523a0b53 } from "../../RSPContexts-CrNYmadY.js";
|
|
4
|
-
import { c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, j as $64fa3d84918910a7$export$2881499e37b75b9a, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4 } from "../../utils-
|
|
5
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-
|
|
6
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
7
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456, e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, m as $7215afc6de606d6b$export$de79e2c695e052f3, d as $9ab94262bd0047c7$export$420e68273165f4ec, c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, j as $c87311424ea30a05$export$fedb369cb70207f1, u as $c87311424ea30a05$export$a11b0059900ceec8 } from "../../focusSafely-
|
|
8
|
-
import { $ as $799cddbef784668f$export$6e865ea70d7724f, b as $799cddbef784668f$export$4cde5df63f53f473, a as $3493a52097159720$exports } from "../../intlStrings-
|
|
9
|
-
import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "../../number-
|
|
10
|
-
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6 } from "../../textSelection-
|
|
11
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-
|
|
12
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-
|
|
13
|
-
import { a as $46d819fcbaf35654$export$8f71654801c2f7cd } from "../../useFocusable-
|
|
14
|
-
import { e as $28f99e3e86e6ec45$export$e5fda3247f5d67f9, f as $e8a7022cf87cba2a$export$36da96379f79f245, g as $bcca50147b47f54d$export$56b2c08e277f365, h as $47b897dc8cdb026b$export$8d15029008292ae, d as $6f909507e6374d18$export$1e7083018727fa60, i as $6f909507e6374d18$export$f1fce0420cc6d8ee, j as $6f909507e6374d18$export$6189c2744041d8f8, a as $6f909507e6374d18$export$105594979f116971 } from "../../Slider-
|
|
15
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-
|
|
16
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-
|
|
17
|
-
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "../../VisuallyHidden-
|
|
18
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-
|
|
19
|
-
import { $ as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-
|
|
20
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
21
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-
|
|
22
|
-
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, c as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../../useFormValidationState-
|
|
23
|
-
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, b as $d2e8511e6f209edf$export$e908e06f4b8e3402, c as $7d0a636d7a4dcefd$export$2123ff2b87c81ca, d as $d841c8010a73d545$export$4f384c9210e583c3, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberFieldState-
|
|
24
|
-
import { c as clsx } from "../../lite-
|
|
4
|
+
import { c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, j as $64fa3d84918910a7$export$2881499e37b75b9a, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4 } from "../../utils-Dc35LwuT.js";
|
|
5
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
6
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-SPRI0-SN.js";
|
|
7
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456, e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, m as $7215afc6de606d6b$export$de79e2c695e052f3, d as $9ab94262bd0047c7$export$420e68273165f4ec, c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, j as $c87311424ea30a05$export$fedb369cb70207f1, u as $c87311424ea30a05$export$a11b0059900ceec8 } from "../../focusSafely-BS4dllCW.js";
|
|
8
|
+
import { $ as $799cddbef784668f$export$6e865ea70d7724f, b as $799cddbef784668f$export$4cde5df63f53f473, a as $3493a52097159720$exports } from "../../intlStrings-Dxaeitoh.js";
|
|
9
|
+
import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "../../number-CHmNj-oR.js";
|
|
10
|
+
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6 } from "../../textSelection-exP_9srp.js";
|
|
11
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-CfOtyOe2.js";
|
|
12
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-BVWgcyGO.js";
|
|
13
|
+
import { a as $46d819fcbaf35654$export$8f71654801c2f7cd } from "../../useFocusable-CLmhO94g.js";
|
|
14
|
+
import { e as $28f99e3e86e6ec45$export$e5fda3247f5d67f9, f as $e8a7022cf87cba2a$export$36da96379f79f245, g as $bcca50147b47f54d$export$56b2c08e277f365, h as $47b897dc8cdb026b$export$8d15029008292ae, d as $6f909507e6374d18$export$1e7083018727fa60, i as $6f909507e6374d18$export$f1fce0420cc6d8ee, j as $6f909507e6374d18$export$6189c2744041d8f8, a as $6f909507e6374d18$export$105594979f116971 } from "../../Slider-fULMI0gI.js";
|
|
15
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-4oSz1ItD.js";
|
|
16
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-BQCMno9k.js";
|
|
17
|
+
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "../../VisuallyHidden-Di1zXprL.js";
|
|
18
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-J1-YPbi6.js";
|
|
19
|
+
import { $ as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CX_rocyZ.js";
|
|
20
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-Bg5O81Wb.js";
|
|
21
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-WqetJduR.js";
|
|
22
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, c as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../../useFormValidationState-CthG9Fbc.js";
|
|
23
|
+
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, b as $d2e8511e6f209edf$export$e908e06f4b8e3402, c as $7d0a636d7a4dcefd$export$2123ff2b87c81ca, d as $d841c8010a73d545$export$4f384c9210e583c3, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberFieldState-BegO5X6F.js";
|
|
24
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
25
25
|
import { BaseControl } from "../base-control/base-control.js";
|
|
26
|
-
import { _ as __ } from "../../default-i18n-
|
|
27
|
-
import { T as TriggeredPopover } from "../../popover-
|
|
26
|
+
import { _ as __ } from "../../default-i18n-BqwLkgZv.js";
|
|
27
|
+
import { T as TriggeredPopover } from "../../popover-Dk2o4S7K.js";
|
|
28
28
|
import { icons } from "../../icons/icons.js";
|
|
29
29
|
import { Spacer } from "../spacer/spacer.js";
|
|
30
30
|
const $e2b71ec1d6016406$export$c80c0ea2ca5cb846 = /* @__PURE__ */ createContext(null);
|
|
@@ -73,8 +73,7 @@ const $e2b71ec1d6016406$export$a3cc47cee1c1ccc = /* @__PURE__ */ forwardRef($e2b
|
|
|
73
73
|
const $6e14a98a7f67141d$var$DEFAULT_COLOR = $799cddbef784668f$export$6e865ea70d7724f("#ffffff");
|
|
74
74
|
function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
75
75
|
let { value, defaultValue, colorSpace, xChannel, yChannel, onChange, onChangeEnd } = props;
|
|
76
|
-
if (!value && !defaultValue)
|
|
77
|
-
defaultValue = $6e14a98a7f67141d$var$DEFAULT_COLOR;
|
|
76
|
+
if (!value && !defaultValue) defaultValue = $6e14a98a7f67141d$var$DEFAULT_COLOR;
|
|
78
77
|
let [colorValue, setColorState] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(value && $799cddbef784668f$export$4cde5df63f53f473(value), defaultValue && $799cddbef784668f$export$4cde5df63f53f473(defaultValue), onChange);
|
|
79
78
|
let color = useMemo(() => colorSpace && colorValue ? colorValue.toFormat(colorSpace) : colorValue, [
|
|
80
79
|
colorValue,
|
|
@@ -102,14 +101,12 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
|
102
101
|
let xValue = color.getChannelValue(channels.xChannel);
|
|
103
102
|
let yValue = color.getChannelValue(channels.yChannel);
|
|
104
103
|
let setXValue = (v) => {
|
|
105
|
-
if (v === xValue)
|
|
106
|
-
return;
|
|
104
|
+
if (v === xValue) return;
|
|
107
105
|
let newColor = color.withChannelValue(channels.xChannel, v);
|
|
108
106
|
setColor(newColor);
|
|
109
107
|
};
|
|
110
108
|
let setYValue = (v) => {
|
|
111
|
-
if (v === yValue)
|
|
112
|
-
return;
|
|
109
|
+
if (v === yValue) return;
|
|
113
110
|
let newColor = color.withChannelValue(channels.yChannel, v);
|
|
114
111
|
setColor(newColor);
|
|
115
112
|
};
|
|
@@ -139,8 +136,7 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
|
139
136
|
newYValue = $9446cca9a3875146$export$cb6e0bb50bc19463(newYValue, minValueY, maxValueY, stepY);
|
|
140
137
|
newColor = (newColor || color).withChannelValue(channels.yChannel, newYValue);
|
|
141
138
|
}
|
|
142
|
-
if (newColor)
|
|
143
|
-
setColor(newColor);
|
|
139
|
+
if (newColor) setColor(newColor);
|
|
144
140
|
},
|
|
145
141
|
getThumbPosition() {
|
|
146
142
|
let x = (xValue - minValueX) / (maxValueX - minValueX);
|
|
@@ -165,8 +161,7 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
|
165
161
|
setDragging(isDragging2) {
|
|
166
162
|
let wasDragging = isDraggingRef.current;
|
|
167
163
|
isDraggingRef.current = isDragging2;
|
|
168
|
-
if (onChangeEnd && !isDragging2 && wasDragging)
|
|
169
|
-
onChangeEnd(valueRef.current);
|
|
164
|
+
if (onChangeEnd && !isDragging2 && wasDragging) onChangeEnd(valueRef.current);
|
|
170
165
|
setDragging(isDragging2);
|
|
171
166
|
},
|
|
172
167
|
isDragging,
|
|
@@ -177,8 +172,7 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
|
177
172
|
}
|
|
178
173
|
function $25a25ac0d1624665$export$57bc203e1c9c6d44(props) {
|
|
179
174
|
let { channel, colorSpace, value, defaultValue, onChange, locale, ...otherProps } = props;
|
|
180
|
-
if (value == null && defaultValue == null)
|
|
181
|
-
throw new Error("useColorSliderState requires a value or defaultValue");
|
|
175
|
+
if (value == null && defaultValue == null) throw new Error("useColorSliderState requires a value or defaultValue");
|
|
182
176
|
let [colorValue, setColor] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(value && $799cddbef784668f$export$4cde5df63f53f473(value), defaultValue && $799cddbef784668f$export$4cde5df63f53f473(defaultValue), onChange);
|
|
183
177
|
let color = useMemo(() => colorSpace && colorValue ? colorValue.toFormat(colorSpace) : colorValue, [
|
|
184
178
|
colorValue,
|
|
@@ -194,8 +188,7 @@ function $25a25ac0d1624665$export$57bc203e1c9c6d44(props) {
|
|
|
194
188
|
setColor(color.withChannelValue(channel, v));
|
|
195
189
|
},
|
|
196
190
|
onChangeEnd(v) {
|
|
197
|
-
if (props.onChangeEnd)
|
|
198
|
-
props.onChangeEnd(color.withChannelValue(channel, v));
|
|
191
|
+
if (props.onChangeEnd) props.onChangeEnd(color.withChannelValue(channel, v));
|
|
199
192
|
}
|
|
200
193
|
});
|
|
201
194
|
let { step, pageSize } = color.getChannelRange(channel);
|
|
@@ -232,12 +225,11 @@ function $25a25ac0d1624665$export$57bc203e1c9c6d44(props) {
|
|
|
232
225
|
}
|
|
233
226
|
function $aa90ad8b2b1d015f$export$5aadd9c0606af5c2(value) {
|
|
234
227
|
return useMemo(() => {
|
|
235
|
-
if (typeof value === "string")
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
228
|
+
if (typeof value === "string") try {
|
|
229
|
+
return (0, $799cddbef784668f$export$6e865ea70d7724f)(value);
|
|
230
|
+
} catch (err) {
|
|
231
|
+
return void 0;
|
|
232
|
+
}
|
|
241
233
|
return value;
|
|
242
234
|
}, [
|
|
243
235
|
value
|
|
@@ -296,21 +288,18 @@ function $b335ada08155d9c0$export$d52a01683abdfcd6(props) {
|
|
|
296
288
|
}
|
|
297
289
|
safelySetColorValue(parsedValue);
|
|
298
290
|
let newColorValue = "";
|
|
299
|
-
if (colorValue)
|
|
300
|
-
newColorValue = colorValue.toString("hex");
|
|
291
|
+
if (colorValue) newColorValue = colorValue.toString("hex");
|
|
301
292
|
setInputValue(newColorValue);
|
|
302
293
|
};
|
|
303
294
|
let increment = () => {
|
|
304
295
|
let newValue = $b335ada08155d9c0$var$addColorValue(parsedValue, step);
|
|
305
|
-
if (newValue === colorValue)
|
|
306
|
-
setInputValue(newValue.toString("hex"));
|
|
296
|
+
if (newValue === colorValue) setInputValue(newValue.toString("hex"));
|
|
307
297
|
safelySetColorValue(newValue);
|
|
308
298
|
validation.commitValidation();
|
|
309
299
|
};
|
|
310
300
|
let decrement = () => {
|
|
311
301
|
let newValue = $b335ada08155d9c0$var$addColorValue(parsedValue, -step);
|
|
312
|
-
if (newValue === colorValue)
|
|
313
|
-
setInputValue(newValue.toString("hex"));
|
|
302
|
+
if (newValue === colorValue) setInputValue(newValue.toString("hex"));
|
|
314
303
|
safelySetColorValue(newValue);
|
|
315
304
|
validation.commitValidation();
|
|
316
305
|
};
|
|
@@ -418,8 +407,7 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction, state, zChannel,
|
|
|
418
407
|
let channels = state.value.getColorChannels();
|
|
419
408
|
let value = $799cddbef784668f$export$6e865ea70d7724f("hsl(0, 100%, 50%)").withChannelValue(zChannel, zValue);
|
|
420
409
|
let bg = channels.filter((c) => c !== zChannel).map((c) => `linear-gradient(to ${c === xChannel ? end : "top"}, ${$40297c24c53588e6$var$hslChannels[c](value)})`).reverse();
|
|
421
|
-
if (zChannel === "hue")
|
|
422
|
-
bg.push(value.toString("css"));
|
|
410
|
+
if (zChannel === "hue") bg.push(value.toString("css"));
|
|
423
411
|
colorAreaStyles = {
|
|
424
412
|
background: bg.join(", ")
|
|
425
413
|
};
|
|
@@ -429,8 +417,7 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction, state, zChannel,
|
|
|
429
417
|
let channels = state.value.getColorChannels();
|
|
430
418
|
let value = $799cddbef784668f$export$6e865ea70d7724f("hsb(0, 100%, 100%)").withChannelValue(zChannel, zValue);
|
|
431
419
|
let bg = channels.filter((c) => c !== zChannel).map((c) => `linear-gradient(to ${c === xChannel ? end : "top"}, ${$40297c24c53588e6$var$hsbChannels[c](value)})`).reverse();
|
|
432
|
-
if (zChannel === "hue")
|
|
433
|
-
bg.push(value.toString("css"));
|
|
420
|
+
if (zChannel === "hue") bg.push(value.toString("css"));
|
|
434
421
|
colorAreaStyles = {
|
|
435
422
|
background: bg.join(", ")
|
|
436
423
|
};
|
|
@@ -438,8 +425,7 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction, state, zChannel,
|
|
|
438
425
|
}
|
|
439
426
|
}
|
|
440
427
|
let { x, y } = state.getThumbPosition();
|
|
441
|
-
if (direction === "rtl")
|
|
442
|
-
x = 1 - x;
|
|
428
|
+
if (direction === "rtl") x = 1 - x;
|
|
443
429
|
let forcedColorAdjustNoneStyle = {
|
|
444
430
|
forcedColorAdjust: "none"
|
|
445
431
|
};
|
|
@@ -482,8 +468,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
482
468
|
let { direction, locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
483
469
|
let [focusedInput, setFocusedInput] = useState(null);
|
|
484
470
|
let focusInput = useCallback((inputRef = inputXRef) => {
|
|
485
|
-
if (inputRef.current)
|
|
486
|
-
$7215afc6de606d6b$export$de79e2c695e052f3(inputRef.current);
|
|
471
|
+
if (inputRef.current) $7215afc6de606d6b$export$de79e2c695e052f3(inputRef.current);
|
|
487
472
|
}, [
|
|
488
473
|
inputXRef
|
|
489
474
|
]);
|
|
@@ -544,8 +529,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
544
529
|
onMove({ deltaX, deltaY, pointerType, shiftKey }) {
|
|
545
530
|
var _containerRef_current;
|
|
546
531
|
let { incrementX, decrementX, incrementY, decrementY, xChannelPageStep, xChannelStep: xChannelStep2, yChannelPageStep, yChannelStep: yChannelStep2, getThumbPosition, setColorFromPoint } = state;
|
|
547
|
-
if (currentPosition.current == null)
|
|
548
|
-
currentPosition.current = getThumbPosition();
|
|
532
|
+
if (currentPosition.current == null) currentPosition.current = getThumbPosition();
|
|
549
533
|
let { width, height } = ((_containerRef_current = containerRef.current) === null || _containerRef_current === void 0 ? void 0 : _containerRef_current.getBoundingClientRect()) || {
|
|
550
534
|
width: 0,
|
|
551
535
|
height: 0
|
|
@@ -554,14 +538,10 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
554
538
|
if (pointerType === "keyboard") {
|
|
555
539
|
let deltaXValue = shiftKey && xChannelPageStep > xChannelStep2 ? xChannelPageStep : xChannelStep2;
|
|
556
540
|
let deltaYValue = shiftKey && yChannelPageStep > yChannelStep2 ? yChannelPageStep : yChannelStep2;
|
|
557
|
-
if (deltaX > 0 && direction === "ltr" || deltaX < 0 && direction === "rtl")
|
|
558
|
-
|
|
559
|
-
else if (
|
|
560
|
-
|
|
561
|
-
else if (deltaY > 0)
|
|
562
|
-
decrementY(deltaYValue);
|
|
563
|
-
else if (deltaY < 0)
|
|
564
|
-
incrementY(deltaYValue);
|
|
541
|
+
if (deltaX > 0 && direction === "ltr" || deltaX < 0 && direction === "rtl") incrementX(deltaXValue);
|
|
542
|
+
else if (deltaX < 0 && direction === "ltr" || deltaX > 0 && direction === "rtl") decrementX(deltaXValue);
|
|
543
|
+
else if (deltaY > 0) decrementY(deltaYValue);
|
|
544
|
+
else if (deltaY < 0) incrementY(deltaYValue);
|
|
565
545
|
setValueChangedViaKeyboard(valueChanged);
|
|
566
546
|
focusedInput = valueChanged && Math.abs(deltaY) > Math.abs(deltaX) ? "y" : "x";
|
|
567
547
|
setFocusedInput(focusedInput);
|
|
@@ -591,16 +571,13 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
591
571
|
let isOnColorArea = useRef(false);
|
|
592
572
|
let { moveProps: movePropsContainer } = $e8a7022cf87cba2a$export$36da96379f79f245({
|
|
593
573
|
onMoveStart() {
|
|
594
|
-
if (isOnColorArea.current)
|
|
595
|
-
moveHandler.onMoveStart();
|
|
574
|
+
if (isOnColorArea.current) moveHandler.onMoveStart();
|
|
596
575
|
},
|
|
597
576
|
onMove(e) {
|
|
598
|
-
if (isOnColorArea.current)
|
|
599
|
-
moveHandler.onMove(e);
|
|
577
|
+
if (isOnColorArea.current) moveHandler.onMove(e);
|
|
600
578
|
},
|
|
601
579
|
onMoveEnd() {
|
|
602
|
-
if (isOnColorArea.current)
|
|
603
|
-
moveHandler.onMoveEnd();
|
|
580
|
+
if (isOnColorArea.current) moveHandler.onMoveEnd();
|
|
604
581
|
}
|
|
605
582
|
});
|
|
606
583
|
let onThumbDown = (id) => {
|
|
@@ -609,8 +586,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
609
586
|
setValueChangedViaKeyboard(false);
|
|
610
587
|
focusInput();
|
|
611
588
|
state.setDragging(true);
|
|
612
|
-
if (typeof PointerEvent !== "undefined")
|
|
613
|
-
addGlobalListener(window, "pointerup", onThumbUp, false);
|
|
589
|
+
if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onThumbUp, false);
|
|
614
590
|
else {
|
|
615
591
|
addGlobalListener(window, "mouseup", onThumbUp, false);
|
|
616
592
|
addGlobalListener(window, "touchend", onThumbUp, false);
|
|
@@ -627,8 +603,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
627
603
|
state.setDragging(false);
|
|
628
604
|
currentPointer.current = void 0;
|
|
629
605
|
isOnColorArea.current = false;
|
|
630
|
-
if (typeof PointerEvent !== "undefined")
|
|
631
|
-
removeGlobalListener(window, "pointerup", onThumbUp, false);
|
|
606
|
+
if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onThumbUp, false);
|
|
632
607
|
else {
|
|
633
608
|
removeGlobalListener(window, "mouseup", onThumbUp, false);
|
|
634
609
|
removeGlobalListener(window, "touchend", onThumbUp, false);
|
|
@@ -640,8 +615,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
640
615
|
let { width, height } = rect;
|
|
641
616
|
let x = (clientX - rect.x) / width;
|
|
642
617
|
let y = (clientY - rect.y) / height;
|
|
643
|
-
if (direction === "rtl")
|
|
644
|
-
x = 1 - x;
|
|
618
|
+
if (direction === "rtl") x = 1 - x;
|
|
645
619
|
if (x >= 0 && x <= 1 && y >= 0 && y <= 1 && !state.isDragging && currentPointer.current === void 0) {
|
|
646
620
|
isOnColorArea.current = true;
|
|
647
621
|
setValueChangedViaKeyboard(false);
|
|
@@ -649,8 +623,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
649
623
|
state.setColorFromPoint(x, y);
|
|
650
624
|
focusInput();
|
|
651
625
|
state.setDragging(true);
|
|
652
|
-
if (typeof PointerEvent !== "undefined")
|
|
653
|
-
addGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
626
|
+
if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
654
627
|
else {
|
|
655
628
|
addGlobalListener(window, "mouseup", onColorAreaUp, false);
|
|
656
629
|
addGlobalListener(window, "touchend", onColorAreaUp, false);
|
|
@@ -667,8 +640,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
667
640
|
currentPointer.current = void 0;
|
|
668
641
|
state.setDragging(false);
|
|
669
642
|
focusInput();
|
|
670
|
-
if (typeof PointerEvent !== "undefined")
|
|
671
|
-
removeGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
643
|
+
if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
672
644
|
else {
|
|
673
645
|
removeGlobalListener(window, "mouseup", onColorAreaUp, false);
|
|
674
646
|
removeGlobalListener(window, "touchend", onColorAreaUp, false);
|
|
@@ -678,14 +650,12 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
678
650
|
let colorAreaInteractions = isDisabled ? {} : $3ef42575df84b30b$export$9d1611c77c2fe928({
|
|
679
651
|
...typeof PointerEvent !== "undefined" ? {
|
|
680
652
|
onPointerDown: (e) => {
|
|
681
|
-
if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey))
|
|
682
|
-
return;
|
|
653
|
+
if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) return;
|
|
683
654
|
onColorAreaDown(e.currentTarget, e.pointerId, e.clientX, e.clientY);
|
|
684
655
|
}
|
|
685
656
|
} : {
|
|
686
657
|
onMouseDown: (e) => {
|
|
687
|
-
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)
|
|
688
|
-
return;
|
|
658
|
+
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
689
659
|
onColorAreaDown(e.currentTarget, void 0, e.clientX, e.clientY);
|
|
690
660
|
},
|
|
691
661
|
onTouchStart: (e) => {
|
|
@@ -696,14 +666,12 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
696
666
|
let thumbInteractions = isDisabled ? {} : $3ef42575df84b30b$export$9d1611c77c2fe928({
|
|
697
667
|
...typeof PointerEvent !== "undefined" ? {
|
|
698
668
|
onPointerDown: (e) => {
|
|
699
|
-
if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey))
|
|
700
|
-
return;
|
|
669
|
+
if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) return;
|
|
701
670
|
onThumbDown(e.pointerId);
|
|
702
671
|
}
|
|
703
672
|
} : {
|
|
704
673
|
onMouseDown: (e) => {
|
|
705
|
-
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)
|
|
706
|
-
return;
|
|
674
|
+
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
707
675
|
onThumbDown(void 0);
|
|
708
676
|
},
|
|
709
677
|
onTouchStart: (e) => {
|
|
@@ -724,10 +692,8 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
724
692
|
const onChange = (e) => {
|
|
725
693
|
const { target } = e;
|
|
726
694
|
setValueChangedViaInputChangeEvent(true);
|
|
727
|
-
if (target === inputXRef.current)
|
|
728
|
-
|
|
729
|
-
else if (target === inputYRef.current)
|
|
730
|
-
state.setYValue(parseFloat(target.value));
|
|
695
|
+
if (target === inputXRef.current) state.setXValue(parseFloat(target.value));
|
|
696
|
+
else if (target === inputYRef.current) state.setYValue(parseFloat(target.value));
|
|
731
697
|
};
|
|
732
698
|
let isMobile = $c87311424ea30a05$export$fedb369cb70207f1() || $c87311424ea30a05$export$a11b0059900ceec8();
|
|
733
699
|
let value = state.getDisplayColor();
|
|
@@ -862,8 +828,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
862
828
|
function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
863
829
|
let { trackRef, inputRef, orientation, channel, "aria-label": ariaLabel, name } = props;
|
|
864
830
|
let { locale, direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
865
|
-
if (!props.label && !ariaLabel && !props["aria-labelledby"])
|
|
866
|
-
ariaLabel = state.value.getChannelName(channel, locale);
|
|
831
|
+
if (!props.label && !ariaLabel && !props["aria-labelledby"]) ariaLabel = state.value.getChannelName(channel, locale);
|
|
867
832
|
let { groupProps, trackProps, labelProps, outputProps } = $bcca50147b47f54d$export$56b2c08e277f365({
|
|
868
833
|
...props,
|
|
869
834
|
"aria-label": ariaLabel
|
|
@@ -879,12 +844,9 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
879
844
|
let value = state.getDisplayColor();
|
|
880
845
|
let generateBackground = () => {
|
|
881
846
|
let to;
|
|
882
|
-
if (orientation === "vertical")
|
|
883
|
-
|
|
884
|
-
else
|
|
885
|
-
to = "right";
|
|
886
|
-
else
|
|
887
|
-
to = "left";
|
|
847
|
+
if (orientation === "vertical") to = "top";
|
|
848
|
+
else if (direction === "ltr") to = "right";
|
|
849
|
+
else to = "left";
|
|
888
850
|
switch (channel) {
|
|
889
851
|
case "hue": {
|
|
890
852
|
let stops = [
|
|
@@ -923,10 +885,8 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
923
885
|
let forcedColorAdjustNoneStyle = {
|
|
924
886
|
forcedColorAdjust: "none"
|
|
925
887
|
};
|
|
926
|
-
if (channel === "hue")
|
|
927
|
-
|
|
928
|
-
else if (channel !== "alpha")
|
|
929
|
-
inputProps["aria-valuetext"] += `, ${value.getColorName(locale)}`;
|
|
888
|
+
if (channel === "hue") inputProps["aria-valuetext"] += `, ${value.getHueName(locale)}`;
|
|
889
|
+
else if (channel !== "alpha") inputProps["aria-valuetext"] += `, ${value.getColorName(locale)}`;
|
|
930
890
|
let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab({
|
|
931
891
|
style: {
|
|
932
892
|
opacity: "0.0001",
|
|
@@ -985,12 +945,9 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
|
|
|
985
945
|
onFocusWithinChange: setFocusWithin
|
|
986
946
|
});
|
|
987
947
|
let onWheel = useCallback((e) => {
|
|
988
|
-
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX))
|
|
989
|
-
|
|
990
|
-
if (e.deltaY
|
|
991
|
-
increment();
|
|
992
|
-
else if (e.deltaY < 0)
|
|
993
|
-
decrement();
|
|
948
|
+
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
949
|
+
if (e.deltaY > 0) increment();
|
|
950
|
+
else if (e.deltaY < 0) decrement();
|
|
994
951
|
}, [
|
|
995
952
|
decrement,
|
|
996
953
|
increment
|
|
@@ -1001,8 +958,7 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
|
|
|
1001
958
|
isDisabled: scrollingDisabled
|
|
1002
959
|
}, ref);
|
|
1003
960
|
let onChange = (value) => {
|
|
1004
|
-
if (state.validate(value))
|
|
1005
|
-
state.setInputValue(value);
|
|
961
|
+
if (state.validate(value)) state.setInputValue(value);
|
|
1006
962
|
};
|
|
1007
963
|
let { inputProps, ...otherProps } = $d841c8010a73d545$export$4f384c9210e583c3({
|
|
1008
964
|
...props,
|
|
@@ -1025,8 +981,7 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
|
|
|
1025
981
|
spellCheck: "false",
|
|
1026
982
|
onBlur: commit
|
|
1027
983
|
});
|
|
1028
|
-
if (validationBehavior === "native")
|
|
1029
|
-
inputProps["aria-required"] = void 0;
|
|
984
|
+
if (validationBehavior === "native") inputProps["aria-required"] = void 0;
|
|
1030
985
|
return {
|
|
1031
986
|
inputProps,
|
|
1032
987
|
...otherProps
|
|
@@ -1099,17 +1054,15 @@ const $0de070065d44825d$export$b2103f68a961418e = /* @__PURE__ */ forwardRef($0d
|
|
|
1099
1054
|
const $3ada01a82feafb94$export$96b6d32b05a1a8ed = /* @__PURE__ */ createContext(null);
|
|
1100
1055
|
function $3ada01a82feafb94$var$ColorField(props, ref) {
|
|
1101
1056
|
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e85f108e88277b8$export$44644b8a16031b5b);
|
|
1102
|
-
if (props.channel)
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
forwardedRef: ref
|
|
1112
|
-
});
|
|
1057
|
+
if (props.channel) return /* @__PURE__ */ React__default.createElement($3ada01a82feafb94$var$ColorChannelField, {
|
|
1058
|
+
...props,
|
|
1059
|
+
channel: props.channel,
|
|
1060
|
+
forwardedRef: ref
|
|
1061
|
+
});
|
|
1062
|
+
else return /* @__PURE__ */ React__default.createElement($3ada01a82feafb94$var$HexColorField, {
|
|
1063
|
+
...props,
|
|
1064
|
+
forwardedRef: ref
|
|
1065
|
+
});
|
|
1113
1066
|
}
|
|
1114
1067
|
const $3ada01a82feafb94$export$b865d4358897bb17 = /* @__PURE__ */ forwardRef($3ada01a82feafb94$var$ColorField);
|
|
1115
1068
|
function $3ada01a82feafb94$var$ColorChannelField(props) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { s as sprintf, _ as __ } from "../../default-i18n-
|
|
2
|
+
import { s as sprintf, _ as __ } from "../../default-i18n-BqwLkgZv.js";
|
|
3
3
|
import { Expandable } from "../expandable/expandable.js";
|
|
4
4
|
import { icons } from "../../icons/icons.js";
|
|
5
5
|
import { Switch } from "../toggle/switch.js";
|
|
6
|
-
import { T as TriggeredPopover } from "../../popover-
|
|
7
|
-
import { a as ButtonGroup } from "../../button-
|
|
6
|
+
import { T as TriggeredPopover } from "../../popover-Dk2o4S7K.js";
|
|
7
|
+
import { a as ButtonGroup } from "../../button-CD8Q1eok.js";
|
|
8
8
|
import { ToggleButton } from "../toggle-button/toggle-button.js";
|
|
9
9
|
import { Spacer } from "../spacer/spacer.js";
|
|
10
|
-
import { c as clsx } from "../../lite-
|
|
10
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
11
11
|
/**
|
|
12
12
|
* A component that provides a nice way to toggle a component on and off, and display its content in an expandable panel.
|
|
13
13
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { c as clsx } from "../../lite-
|
|
3
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
4
|
import { Switch } from "../toggle/switch.js";
|
|
5
5
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
6
|
-
import { B as Button } from "../../button-
|
|
6
|
+
import { B as Button } from "../../button-CD8Q1eok.js";
|
|
7
7
|
import { icons } from "../../icons/icons.js";
|
|
8
8
|
import { HStack } from "../layout/hstack.js";
|
|
9
9
|
import { BaseControl } from "../base-control/base-control.js";
|
|
@@ -75,10 +75,7 @@ const ContainerPanel = (props) => {
|
|
|
75
75
|
icon: open ? icons.caretDownFill : icons.caretDown,
|
|
76
76
|
type: "ghost",
|
|
77
77
|
size: "small",
|
|
78
|
-
className: clsx(
|
|
79
|
-
"[&>svg]:es-uic-size-5 [&>svg]:es-uic-transition-transform",
|
|
80
|
-
open && "[&>svg]:-es-uic-scale-y-100"
|
|
81
|
-
),
|
|
78
|
+
className: clsx("[&>svg]:es-uic-size-5 [&>svg]:es-uic-transition-transform", open && "[&>svg]:-es-uic-scale-y-100"),
|
|
82
79
|
disabled: typeof use !== "undefined" && !use
|
|
83
80
|
}
|
|
84
81
|
)
|
|
@@ -96,11 +93,7 @@ const ContainerPanel = (props) => {
|
|
|
96
93
|
!closable && !onUseChange && "es-uic-px-4",
|
|
97
94
|
className
|
|
98
95
|
),
|
|
99
|
-
labelContainerClassName: clsx(
|
|
100
|
-
(closable || onUseChange) && "es-uic-pl-4 es-uic-pr-3 es-uic-min-h-12",
|
|
101
|
-
!(closable || onUseChange) && "es-uic-mt-3",
|
|
102
|
-
"!es-uic-pb-0"
|
|
103
|
-
),
|
|
96
|
+
labelContainerClassName: clsx((closable || onUseChange) && "es-uic-pl-4 es-uic-pr-3 es-uic-min-h-12", !(closable || onUseChange) && "es-uic-mt-3", "!es-uic-pb-0"),
|
|
104
97
|
controlContainerClassName: "es-uic-px-4",
|
|
105
98
|
labelClassName: "!es-uic-text-gray-500",
|
|
106
99
|
children: [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { a as $72e60046c03fbe42$export$e96fc9a8407faa6b } from "../../GridList-
|
|
3
|
-
import { B as Button } from "../../button-
|
|
2
|
+
import { a as $72e60046c03fbe42$export$e96fc9a8407faa6b } from "../../GridList-CEzzyr-l.js";
|
|
3
|
+
import { B as Button } from "../../button-CD8Q1eok.js";
|
|
4
4
|
import { icons } from "../../icons/icons.js";
|
|
5
|
-
import { c as clsx } from "../../lite-
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
5
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
6
|
+
import { _ as __ } from "../../default-i18n-BqwLkgZv.js";
|
|
7
7
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
8
8
|
/**
|
|
9
9
|
* A DraggableList item.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $72e60046c03fbe42$export$a7bfbda1311ca015 } from "../../GridList-
|
|
3
|
-
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6, a as $d8f176866e6dc039$export$62ed72bc21f6b8a6 } from "../../ListBox-
|
|
2
|
+
import { $ as $72e60046c03fbe42$export$a7bfbda1311ca015 } from "../../GridList-CEzzyr-l.js";
|
|
3
|
+
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6, a as $d8f176866e6dc039$export$62ed72bc21f6b8a6 } from "../../ListBox-CCWXTj0t.js";
|
|
4
4
|
import { useId, useEffect } from "react";
|
|
5
|
-
import { c as clsx } from "../../lite-
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
5
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
6
|
+
import { _ as __ } from "../../default-i18n-BqwLkgZv.js";
|
|
7
7
|
import { BaseControl } from "../base-control/base-control.js";
|
|
8
|
-
import { $ as $0d86e9c8f07f9a7b$export$762f73dccccd255d } from "../../useListData-
|
|
8
|
+
import { $ as $0d86e9c8f07f9a7b$export$762f73dccccd255d } from "../../useListData-BpYQj7kK.js";
|
|
9
9
|
/**
|
|
10
10
|
* A component that allows re-ordering a list of items.
|
|
11
11
|
*
|