@eightshift/ui-components 7.2.1 → 7.3.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/dist/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-CD5Sho6A.js → gradient-editor-CInqVF8v.js} +6 -6
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-BnjtzMbF.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BpAYSi3F.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-Cy6gB0RL.js → tabs-C2tPOEYr.js} +145 -149
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +13 -13
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-BHUJxpwh.js +0 -600
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-Cm1i5mLj.js +0 -764
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{jsx-svg-DgKbriN1.js → jsx-svg-DT1SBWuP.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,36 +1,489 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-BUU5J41u.js";
|
|
2
|
-
import { r as $
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as $
|
|
6
|
-
import { t as $
|
|
7
|
-
import { t as $
|
|
8
|
-
import {
|
|
9
|
-
import { t as $
|
|
10
|
-
import { t as $
|
|
11
|
-
import {
|
|
12
|
-
import { n as $
|
|
13
|
-
import {
|
|
14
|
-
import { n as $
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { a as $
|
|
18
|
-
import {
|
|
19
|
-
import { n as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-O6VBBDlP.js";
|
|
2
|
+
import { i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
|
|
3
|
+
import { R as $1969ac565cfec8d0$export$de79e2c695e052f3, c as $1e74c67db218ce67$export$f8168d8dd8fd66e6, d as $3e6197669829fe11$export$40bfa8c7b0832715, j as $2add3ce32c6007eb$export$fedb369cb70207f1, k as $2add3ce32c6007eb$export$a11b0059900ceec8, n as $48a7d519b337145d$export$4eaf04e54aa8eed6, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-lyApu3ba.js";
|
|
4
|
+
import { t as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "./useLabels-xOYtkA8o.js";
|
|
5
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-Cm6dj5jY.js";
|
|
6
|
+
import { t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CR-bmorj.js";
|
|
7
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
8
|
+
import { n as $2c9edc598a03d523$export$420e68273165f4ec, t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-BgYY-7ko.js";
|
|
9
|
+
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-B1TkoVOG.js";
|
|
10
|
+
import { a as $62888b2ec35be488$export$4f384c9210e583c3, i as $14554ba6a2007b17$export$2123ff2b87c81ca, n as $cd2fa56213693c5e$export$23f548e970bdf099, r as $757ec6630f26125c$export$e908e06f4b8e3402, t as $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c } from "./useNumberFieldState-xL-ecwNz.js";
|
|
11
|
+
import { r as $240e9101ba2842f5$export$cb6e0bb50bc19463, t as $240e9101ba2842f5$export$7d15b64cf5a3a4c4 } from "./number-MWRvGfyE.js";
|
|
12
|
+
import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-C8pfwn0W.js";
|
|
13
|
+
import { n as $ea3928288112382f$export$a966af930f325cab } from "./VisuallyHidden-KcXlGa5p.js";
|
|
14
|
+
import { a as $1f3c3b1a70cec653$export$ff05c3ac10437e03, i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb } from "./useFormValidation-BcME9D0E.js";
|
|
15
|
+
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-BuMc_O4y.js";
|
|
16
|
+
import { a as $786ce78c8ff38b91$exports, i as $890783418b00a858$export$6e865ea70d7724f, r as $890783418b00a858$export$4cde5df63f53f473, t as ColorSwatch } from "./color-swatch-gU09x9Ga.js";
|
|
17
|
+
import { a as $806e559d0c2c64a0$export$6189c2744041d8f8, c as $d806310b82f07e9d$export$e5fda3247f5d67f9, d as $1dfdc54e7eb53ba0$export$36da96379f79f245, l as $4a5dd96ecb58ab11$export$8d15029008292ae, n as $806e559d0c2c64a0$export$1e7083018727fa60, s as $806e559d0c2c64a0$export$f1fce0420cc6d8ee, t as $806e559d0c2c64a0$export$105594979f116971, u as $4b964a467b2bc7ea$export$56b2c08e277f365 } from "./Slider-DSv6fyZ6.js";
|
|
18
|
+
import { a as $3a442827418ebe87$export$f9c6924e160136d1, n as $41fb335299a4a39e$export$37fb8590cf2c088c, r as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./useTextField-BW3ZwGyz.js";
|
|
20
19
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
21
|
-
import { t as __ } from "./build-module-
|
|
20
|
+
import { t as __ } from "./build-module-K6vi4xE0.js";
|
|
22
21
|
import { dropdownCaretAlt } from "./icons/ui-icons/dropdown-caret-alt.js";
|
|
23
22
|
import { TriggeredPopover } from "./components/popover/popover.js";
|
|
24
23
|
import React, { createContext, forwardRef, useCallback, useContext, useMemo, useRef, useState } from "react";
|
|
25
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
-
//#region node_modules
|
|
27
|
-
var $
|
|
28
|
-
|
|
25
|
+
//#region node_modules/react-aria-components/dist/private/ColorThumb.mjs
|
|
26
|
+
var $ceafedee624ffe11$export$c80c0ea2ca5cb846 = createContext(null);
|
|
27
|
+
var $ceafedee624ffe11$export$a3cc47cee1c1ccc = forwardRef(function ColorThumb(props, ref) {
|
|
28
|
+
let { state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false } = useContext($ceafedee624ffe11$export$c80c0ea2ca5cb846);
|
|
29
|
+
let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f();
|
|
30
|
+
let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456(props);
|
|
31
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
32
|
+
...props,
|
|
33
|
+
defaultClassName: "react-aria-ColorThumb",
|
|
34
|
+
defaultStyle: {
|
|
35
|
+
...thumbProps.style,
|
|
36
|
+
backgroundColor: state.getDisplayColor().toString()
|
|
37
|
+
},
|
|
38
|
+
values: {
|
|
39
|
+
color: state.getDisplayColor(),
|
|
40
|
+
isHovered,
|
|
41
|
+
isDragging: state.isDragging,
|
|
42
|
+
isFocused,
|
|
43
|
+
isFocusVisible,
|
|
44
|
+
isDisabled
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
48
|
+
delete DOMProps.id;
|
|
49
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
50
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(thumbProps, hoverProps, DOMProps),
|
|
51
|
+
...renderProps,
|
|
52
|
+
ref,
|
|
53
|
+
"data-hovered": isHovered || void 0,
|
|
54
|
+
"data-dragging": state.isDragging || void 0,
|
|
55
|
+
"data-focused": isFocused || void 0,
|
|
56
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
57
|
+
"data-disabled": isDisabled || void 0
|
|
58
|
+
}, React.createElement("input", {
|
|
59
|
+
ref: inputXRef,
|
|
60
|
+
...xInputProps,
|
|
61
|
+
...focusProps
|
|
62
|
+
}), yInputProps && React.createElement("input", {
|
|
63
|
+
ref: inputYRef,
|
|
64
|
+
...yInputProps,
|
|
65
|
+
...focusProps
|
|
66
|
+
}), renderProps.children);
|
|
67
|
+
});
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region node_modules/react-aria/dist/private/color/useColorAreaGradient.mjs
|
|
70
|
+
var $ad8cc31e40d60e64$var$hue = (color) => [
|
|
71
|
+
0,
|
|
72
|
+
60,
|
|
73
|
+
120,
|
|
74
|
+
180,
|
|
75
|
+
240,
|
|
76
|
+
300,
|
|
77
|
+
360
|
|
78
|
+
].map((hue) => color.withChannelValue("hue", hue).toString("css")).join(", ");
|
|
79
|
+
var $ad8cc31e40d60e64$var$saturation = (color) => `${color.withChannelValue("saturation", 0)}, transparent`;
|
|
80
|
+
var $ad8cc31e40d60e64$var$hslChannels = {
|
|
81
|
+
hue: $ad8cc31e40d60e64$var$hue,
|
|
82
|
+
saturation: $ad8cc31e40d60e64$var$saturation,
|
|
83
|
+
lightness: () => "black, transparent, white"
|
|
84
|
+
};
|
|
85
|
+
var $ad8cc31e40d60e64$var$hsbChannels = {
|
|
86
|
+
hue: $ad8cc31e40d60e64$var$hue,
|
|
87
|
+
saturation: $ad8cc31e40d60e64$var$saturation,
|
|
88
|
+
brightness: () => "black, transparent"
|
|
89
|
+
};
|
|
90
|
+
function $ad8cc31e40d60e64$export$dd62420467d245ca({ direction, state, zChannel, xChannel, yChannel }) {
|
|
91
|
+
return useMemo(() => {
|
|
92
|
+
let end = direction === "rtl" ? "left" : "right";
|
|
93
|
+
let colorAreaStyles = {};
|
|
94
|
+
let zValue = state.value.getChannelValue(zChannel);
|
|
95
|
+
switch (state.value.getColorSpace()) {
|
|
96
|
+
case "rgb": {
|
|
97
|
+
let rgb = $890783418b00a858$export$6e865ea70d7724f("rgb(0, 0, 0)");
|
|
98
|
+
colorAreaStyles = {
|
|
99
|
+
background: [
|
|
100
|
+
`linear-gradient(to ${end}, ${rgb.withChannelValue(xChannel, 0)}, ${rgb.withChannelValue(xChannel, 255)})`,
|
|
101
|
+
`linear-gradient(to top, ${rgb.withChannelValue(yChannel, 0)}, ${rgb.withChannelValue(yChannel, 255)})`,
|
|
102
|
+
rgb.withChannelValue(zChannel, zValue)
|
|
103
|
+
].join(","),
|
|
104
|
+
backgroundBlendMode: "screen"
|
|
105
|
+
};
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
case "hsl": {
|
|
109
|
+
let channels = state.value.getColorChannels();
|
|
110
|
+
let value = $890783418b00a858$export$6e865ea70d7724f("hsl(0, 100%, 50%)").withChannelValue(zChannel, zValue);
|
|
111
|
+
let bg = channels.filter((c) => c !== zChannel).map((c) => `linear-gradient(to ${c === xChannel ? end : "top"}, ${$ad8cc31e40d60e64$var$hslChannels[c](value)})`).reverse();
|
|
112
|
+
if (zChannel === "hue") bg.push(value.toString("css"));
|
|
113
|
+
colorAreaStyles = { background: bg.join(", ") };
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case "hsb": {
|
|
117
|
+
let channels = state.value.getColorChannels();
|
|
118
|
+
let value = $890783418b00a858$export$6e865ea70d7724f("hsb(0, 100%, 100%)").withChannelValue(zChannel, zValue);
|
|
119
|
+
let bg = channels.filter((c) => c !== zChannel).map((c) => `linear-gradient(to ${c === xChannel ? end : "top"}, ${$ad8cc31e40d60e64$var$hsbChannels[c](value)})`).reverse();
|
|
120
|
+
if (zChannel === "hue") bg.push(value.toString("css"));
|
|
121
|
+
colorAreaStyles = { background: bg.join(", ") };
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
let { x, y } = state.getThumbPosition();
|
|
126
|
+
if (direction === "rtl") x = 1 - x;
|
|
127
|
+
let forcedColorAdjustNoneStyle = { forcedColorAdjust: "none" };
|
|
128
|
+
return {
|
|
129
|
+
colorAreaStyleProps: { style: {
|
|
130
|
+
position: "relative",
|
|
131
|
+
touchAction: "none",
|
|
132
|
+
...forcedColorAdjustNoneStyle,
|
|
133
|
+
...colorAreaStyles
|
|
134
|
+
} },
|
|
135
|
+
thumbStyleProps: { style: {
|
|
136
|
+
position: "absolute",
|
|
137
|
+
left: `${x * 100}%`,
|
|
138
|
+
top: `${y * 100}%`,
|
|
139
|
+
transform: "translate(-50%, -50%)",
|
|
140
|
+
touchAction: "none",
|
|
141
|
+
...forcedColorAdjustNoneStyle
|
|
142
|
+
} }
|
|
143
|
+
};
|
|
144
|
+
}, [
|
|
145
|
+
direction,
|
|
146
|
+
state,
|
|
147
|
+
zChannel,
|
|
148
|
+
xChannel,
|
|
149
|
+
yChannel
|
|
150
|
+
]);
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region node_modules/react-aria/dist/private/color/useColorArea.mjs
|
|
154
|
+
function $parcel$interopDefault(a) {
|
|
155
|
+
return a && a.__esModule ? a.default : a;
|
|
156
|
+
}
|
|
157
|
+
function $12db0b624ec2ac09$export$2f92a7a615a014f6(props, state) {
|
|
158
|
+
let { isDisabled, inputXRef, inputYRef, containerRef, "aria-label": ariaLabel, xName, yName, form } = props;
|
|
159
|
+
let stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault($786ce78c8ff38b91$exports), "@react-aria/color");
|
|
160
|
+
let { addGlobalListener, removeGlobalListener } = $48a7d519b337145d$export$4eaf04e54aa8eed6();
|
|
161
|
+
let { direction, locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
162
|
+
let [focusedInput, setFocusedInput] = useState(null);
|
|
163
|
+
let focusInput = useCallback((inputRef = inputXRef) => {
|
|
164
|
+
if (inputRef.current) $1969ac565cfec8d0$export$de79e2c695e052f3(inputRef.current);
|
|
165
|
+
}, [inputXRef]);
|
|
166
|
+
$3274bf1495747a7b$export$5add1d006293d136(inputXRef, state.defaultValue, state.setValue);
|
|
167
|
+
let [valueChangedViaKeyboard, setValueChangedViaKeyboard] = useState(false);
|
|
168
|
+
let [valueChangedViaInputChangeEvent, setValueChangedViaInputChangeEvent] = useState(false);
|
|
169
|
+
let { xChannel, yChannel, zChannel } = state.channels;
|
|
170
|
+
let xChannelStep = state.xChannelStep;
|
|
171
|
+
let yChannelStep = state.yChannelStep;
|
|
172
|
+
let currentPosition = useRef(null);
|
|
173
|
+
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({ onKeyDown(e) {
|
|
174
|
+
if (!/^(PageUp|PageDown|Home|End)$/.test(e.key)) {
|
|
175
|
+
e.continuePropagation();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
state.setDragging(true);
|
|
180
|
+
setValueChangedViaKeyboard(true);
|
|
181
|
+
let dir;
|
|
182
|
+
switch (e.key) {
|
|
183
|
+
case "PageUp":
|
|
184
|
+
state.incrementY(state.yChannelPageStep);
|
|
185
|
+
dir = "y";
|
|
186
|
+
break;
|
|
187
|
+
case "PageDown":
|
|
188
|
+
state.decrementY(state.yChannelPageStep);
|
|
189
|
+
dir = "y";
|
|
190
|
+
break;
|
|
191
|
+
case "Home":
|
|
192
|
+
direction === "rtl" ? state.incrementX(state.xChannelPageStep) : state.decrementX(state.xChannelPageStep);
|
|
193
|
+
dir = "x";
|
|
194
|
+
break;
|
|
195
|
+
case "End":
|
|
196
|
+
direction === "rtl" ? state.decrementX(state.xChannelPageStep) : state.incrementX(state.xChannelPageStep);
|
|
197
|
+
dir = "x";
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
state.setDragging(false);
|
|
201
|
+
if (dir) {
|
|
202
|
+
focusInput(dir === "x" ? inputXRef : inputYRef);
|
|
203
|
+
setFocusedInput(dir);
|
|
204
|
+
}
|
|
205
|
+
} });
|
|
206
|
+
let moveHandler = {
|
|
207
|
+
onMoveStart() {
|
|
208
|
+
currentPosition.current = null;
|
|
209
|
+
state.setDragging(true);
|
|
210
|
+
},
|
|
211
|
+
onMove({ deltaX, deltaY, pointerType, shiftKey }) {
|
|
212
|
+
let { incrementX, decrementX, incrementY, decrementY, xChannelPageStep, xChannelStep, yChannelPageStep, yChannelStep, getThumbPosition, setColorFromPoint } = state;
|
|
213
|
+
if (currentPosition.current == null) currentPosition.current = getThumbPosition();
|
|
214
|
+
let { width, height } = containerRef.current?.getBoundingClientRect() || {
|
|
215
|
+
width: 0,
|
|
216
|
+
height: 0
|
|
217
|
+
};
|
|
218
|
+
let valueChanged = deltaX !== 0 || deltaY !== 0;
|
|
219
|
+
if (pointerType === "keyboard") {
|
|
220
|
+
let deltaXValue = shiftKey && xChannelPageStep > xChannelStep ? xChannelPageStep : xChannelStep;
|
|
221
|
+
let deltaYValue = shiftKey && yChannelPageStep > yChannelStep ? yChannelPageStep : yChannelStep;
|
|
222
|
+
if (deltaX > 0 && direction === "ltr" || deltaX < 0 && direction === "rtl") incrementX(deltaXValue);
|
|
223
|
+
else if (deltaX < 0 && direction === "ltr" || deltaX > 0 && direction === "rtl") decrementX(deltaXValue);
|
|
224
|
+
else if (deltaY > 0) decrementY(deltaYValue);
|
|
225
|
+
else if (deltaY < 0) incrementY(deltaYValue);
|
|
226
|
+
setValueChangedViaKeyboard(valueChanged);
|
|
227
|
+
focusedInput = valueChanged && Math.abs(deltaY) > Math.abs(deltaX) ? "y" : "x";
|
|
228
|
+
setFocusedInput(focusedInput);
|
|
229
|
+
} else {
|
|
230
|
+
currentPosition.current.x += (direction === "rtl" ? -1 : 1) * deltaX / width;
|
|
231
|
+
currentPosition.current.y += deltaY / height;
|
|
232
|
+
setColorFromPoint(currentPosition.current.x, currentPosition.current.y);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
onMoveEnd() {
|
|
236
|
+
isOnColorArea.current = false;
|
|
237
|
+
state.setDragging(false);
|
|
238
|
+
focusInput(focusedInput === "x" ? inputXRef : inputYRef);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
let { moveProps: movePropsThumb } = $1dfdc54e7eb53ba0$export$36da96379f79f245(moveHandler);
|
|
242
|
+
let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({ onFocusWithinChange: (focusWithin) => {
|
|
243
|
+
if (!focusWithin) {
|
|
244
|
+
setValueChangedViaKeyboard(false);
|
|
245
|
+
setValueChangedViaInputChangeEvent(false);
|
|
246
|
+
}
|
|
247
|
+
} });
|
|
248
|
+
let currentPointer = useRef(void 0);
|
|
249
|
+
let isOnColorArea = useRef(false);
|
|
250
|
+
let { moveProps: movePropsContainer } = $1dfdc54e7eb53ba0$export$36da96379f79f245({
|
|
251
|
+
onMoveStart() {
|
|
252
|
+
if (isOnColorArea.current) moveHandler.onMoveStart();
|
|
253
|
+
},
|
|
254
|
+
onMove(e) {
|
|
255
|
+
if (isOnColorArea.current) moveHandler.onMove(e);
|
|
256
|
+
},
|
|
257
|
+
onMoveEnd() {
|
|
258
|
+
if (isOnColorArea.current) moveHandler.onMoveEnd();
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
let onThumbDown = (id) => {
|
|
262
|
+
if (!state.isDragging) {
|
|
263
|
+
currentPointer.current = id;
|
|
264
|
+
setValueChangedViaKeyboard(false);
|
|
265
|
+
focusInput();
|
|
266
|
+
state.setDragging(true);
|
|
267
|
+
if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onThumbUp, false);
|
|
268
|
+
else {
|
|
269
|
+
addGlobalListener(window, "mouseup", onThumbUp, false);
|
|
270
|
+
addGlobalListener(window, "touchend", onThumbUp, false);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
let onThumbUp = (e) => {
|
|
275
|
+
if ((e.pointerId ?? e.changedTouches?.[0].identifier) === currentPointer.current) {
|
|
276
|
+
setValueChangedViaKeyboard(false);
|
|
277
|
+
focusInput();
|
|
278
|
+
state.setDragging(false);
|
|
279
|
+
currentPointer.current = void 0;
|
|
280
|
+
isOnColorArea.current = false;
|
|
281
|
+
if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onThumbUp, false);
|
|
282
|
+
else {
|
|
283
|
+
removeGlobalListener(window, "mouseup", onThumbUp, false);
|
|
284
|
+
removeGlobalListener(window, "touchend", onThumbUp, false);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
let onColorAreaDown = (colorArea, id, clientX, clientY) => {
|
|
289
|
+
let rect = colorArea.getBoundingClientRect();
|
|
290
|
+
let { width, height } = rect;
|
|
291
|
+
let x = (clientX - rect.x) / width;
|
|
292
|
+
let y = (clientY - rect.y) / height;
|
|
293
|
+
if (direction === "rtl") x = 1 - x;
|
|
294
|
+
if (x >= 0 && x <= 1 && y >= 0 && y <= 1 && !state.isDragging && currentPointer.current === void 0) {
|
|
295
|
+
isOnColorArea.current = true;
|
|
296
|
+
setValueChangedViaKeyboard(false);
|
|
297
|
+
currentPointer.current = id;
|
|
298
|
+
state.setColorFromPoint(x, y);
|
|
299
|
+
focusInput();
|
|
300
|
+
state.setDragging(true);
|
|
301
|
+
if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
302
|
+
else {
|
|
303
|
+
addGlobalListener(window, "mouseup", onColorAreaUp, false);
|
|
304
|
+
addGlobalListener(window, "touchend", onColorAreaUp, false);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
let onColorAreaUp = (e) => {
|
|
309
|
+
let id = e.pointerId ?? e.changedTouches?.[0].identifier;
|
|
310
|
+
if (isOnColorArea.current && id === currentPointer.current) {
|
|
311
|
+
isOnColorArea.current = false;
|
|
312
|
+
setValueChangedViaKeyboard(false);
|
|
313
|
+
currentPointer.current = void 0;
|
|
314
|
+
state.setDragging(false);
|
|
315
|
+
focusInput();
|
|
316
|
+
if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
317
|
+
else {
|
|
318
|
+
removeGlobalListener(window, "mouseup", onColorAreaUp, false);
|
|
319
|
+
removeGlobalListener(window, "touchend", onColorAreaUp, false);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
let colorAreaInteractions = isDisabled ? {} : $bbaa08b3cd72f041$export$9d1611c77c2fe928({ ...typeof PointerEvent !== "undefined" ? { onPointerDown: (e) => {
|
|
324
|
+
if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) return;
|
|
325
|
+
onColorAreaDown(e.currentTarget, e.pointerId, e.clientX, e.clientY);
|
|
326
|
+
} } : {
|
|
327
|
+
onMouseDown: (e) => {
|
|
328
|
+
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
329
|
+
onColorAreaDown(e.currentTarget, void 0, e.clientX, e.clientY);
|
|
330
|
+
},
|
|
331
|
+
onTouchStart: (e) => {
|
|
332
|
+
onColorAreaDown(e.currentTarget, e.changedTouches[0].identifier, e.changedTouches[0].clientX, e.changedTouches[0].clientY);
|
|
333
|
+
}
|
|
334
|
+
} }, movePropsContainer);
|
|
335
|
+
let thumbInteractions = isDisabled ? {} : $bbaa08b3cd72f041$export$9d1611c77c2fe928({ ...typeof PointerEvent !== "undefined" ? { onPointerDown: (e) => {
|
|
336
|
+
if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) return;
|
|
337
|
+
onThumbDown(e.pointerId);
|
|
338
|
+
} } : {
|
|
339
|
+
onMouseDown: (e) => {
|
|
340
|
+
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
341
|
+
onThumbDown(void 0);
|
|
342
|
+
},
|
|
343
|
+
onTouchStart: (e) => {
|
|
344
|
+
onThumbDown(e.changedTouches[0].identifier);
|
|
345
|
+
}
|
|
346
|
+
} }, focusWithinProps, keyboardProps, movePropsThumb);
|
|
347
|
+
let { focusProps: xInputFocusProps } = $1e74c67db218ce67$export$f8168d8dd8fd66e6({ onFocus: () => {
|
|
348
|
+
setFocusedInput("x");
|
|
349
|
+
} });
|
|
350
|
+
let { focusProps: yInputFocusProps } = $1e74c67db218ce67$export$f8168d8dd8fd66e6({ onFocus: () => {
|
|
351
|
+
setFocusedInput("y");
|
|
352
|
+
} });
|
|
353
|
+
const onChange = (e) => {
|
|
354
|
+
const { target } = e;
|
|
355
|
+
setValueChangedViaInputChangeEvent(true);
|
|
356
|
+
if (target === inputXRef.current) state.setXValue(parseFloat(target.value));
|
|
357
|
+
else if (target === inputYRef.current) state.setYValue(parseFloat(target.value));
|
|
358
|
+
};
|
|
359
|
+
let isMobile = $2add3ce32c6007eb$export$fedb369cb70207f1() || $2add3ce32c6007eb$export$a11b0059900ceec8();
|
|
360
|
+
let value = state.getDisplayColor();
|
|
361
|
+
const getAriaValueTextForChannel = useCallback((channel) => {
|
|
362
|
+
return `${valueChangedViaInputChangeEvent || valueChangedViaKeyboard ? stringFormatter.format("colorNameAndValue", {
|
|
363
|
+
name: value.getChannelName(channel, locale),
|
|
364
|
+
value: value.formatChannelValue(channel, locale)
|
|
365
|
+
}) : [
|
|
366
|
+
stringFormatter.format("colorNameAndValue", {
|
|
367
|
+
name: value.getChannelName(channel, locale),
|
|
368
|
+
value: value.formatChannelValue(channel, locale)
|
|
369
|
+
}),
|
|
370
|
+
stringFormatter.format("colorNameAndValue", {
|
|
371
|
+
name: value.getChannelName(channel === yChannel ? xChannel : yChannel, locale),
|
|
372
|
+
value: value.formatChannelValue(channel === yChannel ? xChannel : yChannel, locale)
|
|
373
|
+
}),
|
|
374
|
+
stringFormatter.format("colorNameAndValue", {
|
|
375
|
+
name: value.getChannelName(zChannel, locale),
|
|
376
|
+
value: value.formatChannelValue(zChannel, locale)
|
|
377
|
+
})
|
|
378
|
+
].join(", ")}, ${value.getColorName(locale)}`;
|
|
379
|
+
}, [
|
|
380
|
+
locale,
|
|
381
|
+
value,
|
|
382
|
+
stringFormatter,
|
|
383
|
+
valueChangedViaInputChangeEvent,
|
|
384
|
+
valueChangedViaKeyboard,
|
|
385
|
+
xChannel,
|
|
386
|
+
yChannel,
|
|
387
|
+
zChannel
|
|
388
|
+
]);
|
|
389
|
+
let colorPickerLabel = stringFormatter.format("colorPicker");
|
|
390
|
+
let xInputLabellingProps = $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
391
|
+
...props,
|
|
392
|
+
"aria-label": ariaLabel ? stringFormatter.format("colorInputLabel", {
|
|
393
|
+
label: ariaLabel,
|
|
394
|
+
channelLabel: colorPickerLabel
|
|
395
|
+
}) : colorPickerLabel
|
|
396
|
+
});
|
|
397
|
+
let yInputLabellingProps = $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
398
|
+
...props,
|
|
399
|
+
"aria-label": ariaLabel ? stringFormatter.format("colorInputLabel", {
|
|
400
|
+
label: ariaLabel,
|
|
401
|
+
channelLabel: colorPickerLabel
|
|
402
|
+
}) : colorPickerLabel
|
|
403
|
+
});
|
|
404
|
+
let colorAreaLabellingProps = $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
405
|
+
...props,
|
|
406
|
+
"aria-label": ariaLabel ? `${ariaLabel}, ${colorPickerLabel}` : void 0
|
|
407
|
+
}, isMobile ? colorPickerLabel : void 0);
|
|
408
|
+
let ariaRoleDescription = stringFormatter.format("twoDimensionalSlider");
|
|
409
|
+
let { visuallyHiddenProps } = $ea3928288112382f$export$a966af930f325cab({ style: {
|
|
410
|
+
opacity: "0.0001",
|
|
411
|
+
width: "100%",
|
|
412
|
+
height: "100%",
|
|
413
|
+
pointerEvents: "none"
|
|
414
|
+
} });
|
|
415
|
+
let { colorAreaStyleProps, thumbStyleProps } = $ad8cc31e40d60e64$export$dd62420467d245ca({
|
|
416
|
+
direction,
|
|
417
|
+
state,
|
|
418
|
+
xChannel,
|
|
419
|
+
yChannel,
|
|
420
|
+
zChannel
|
|
421
|
+
});
|
|
422
|
+
return {
|
|
423
|
+
colorAreaProps: {
|
|
424
|
+
...colorAreaLabellingProps,
|
|
425
|
+
...colorAreaInteractions,
|
|
426
|
+
...colorAreaStyleProps,
|
|
427
|
+
role: "group"
|
|
428
|
+
},
|
|
429
|
+
thumbProps: {
|
|
430
|
+
...thumbInteractions,
|
|
431
|
+
...thumbStyleProps,
|
|
432
|
+
role: "presentation"
|
|
433
|
+
},
|
|
434
|
+
xInputProps: {
|
|
435
|
+
...xInputLabellingProps,
|
|
436
|
+
...visuallyHiddenProps,
|
|
437
|
+
...xInputFocusProps,
|
|
438
|
+
type: "range",
|
|
439
|
+
min: state.value.getChannelRange(xChannel).minValue,
|
|
440
|
+
max: state.value.getChannelRange(xChannel).maxValue,
|
|
441
|
+
step: xChannelStep,
|
|
442
|
+
"aria-roledescription": ariaRoleDescription,
|
|
443
|
+
"aria-valuetext": getAriaValueTextForChannel(xChannel),
|
|
444
|
+
"aria-orientation": "horizontal",
|
|
445
|
+
"aria-describedby": props["aria-describedby"],
|
|
446
|
+
"aria-details": props["aria-details"],
|
|
447
|
+
disabled: isDisabled,
|
|
448
|
+
value: state.value.getChannelValue(xChannel),
|
|
449
|
+
name: xName,
|
|
450
|
+
form,
|
|
451
|
+
tabIndex: isMobile || !focusedInput || focusedInput === "x" ? void 0 : -1,
|
|
452
|
+
"aria-hidden": isMobile || !focusedInput || focusedInput === "x" || valueChangedViaKeyboard ? void 0 : "true",
|
|
453
|
+
onChange
|
|
454
|
+
},
|
|
455
|
+
yInputProps: {
|
|
456
|
+
...yInputLabellingProps,
|
|
457
|
+
...visuallyHiddenProps,
|
|
458
|
+
...yInputFocusProps,
|
|
459
|
+
type: "range",
|
|
460
|
+
min: state.value.getChannelRange(yChannel).minValue,
|
|
461
|
+
max: state.value.getChannelRange(yChannel).maxValue,
|
|
462
|
+
step: yChannelStep,
|
|
463
|
+
"aria-roledescription": ariaRoleDescription,
|
|
464
|
+
"aria-valuetext": getAriaValueTextForChannel(yChannel),
|
|
465
|
+
"aria-orientation": "vertical",
|
|
466
|
+
"aria-describedby": props["aria-describedby"],
|
|
467
|
+
"aria-details": props["aria-details"],
|
|
468
|
+
disabled: isDisabled,
|
|
469
|
+
value: state.value.getChannelValue(yChannel),
|
|
470
|
+
name: yName,
|
|
471
|
+
form,
|
|
472
|
+
tabIndex: isMobile || focusedInput === "y" ? void 0 : -1,
|
|
473
|
+
"aria-hidden": isMobile || focusedInput === "y" || valueChangedViaKeyboard ? void 0 : "true",
|
|
474
|
+
onChange
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region node_modules/react-stately/dist/private/color/useColorAreaState.mjs
|
|
480
|
+
var $1f22dbfd2b026cf2$var$DEFAULT_COLOR = $890783418b00a858$export$6e865ea70d7724f("#ffffff");
|
|
481
|
+
function $1f22dbfd2b026cf2$export$6df7f0e2cabc7eef(props) {
|
|
29
482
|
let { value, defaultValue, colorSpace, xChannel, yChannel, onChange, onChangeEnd } = props;
|
|
30
|
-
if (!value && !defaultValue) defaultValue = $
|
|
31
|
-
if (value) value = $
|
|
32
|
-
if (defaultValue) defaultValue = $
|
|
33
|
-
let [colorValue, setColorState] = $
|
|
483
|
+
if (!value && !defaultValue) defaultValue = $1f22dbfd2b026cf2$var$DEFAULT_COLOR;
|
|
484
|
+
if (value) value = $890783418b00a858$export$4cde5df63f53f473(value);
|
|
485
|
+
if (defaultValue) defaultValue = $890783418b00a858$export$4cde5df63f53f473(defaultValue);
|
|
486
|
+
let [colorValue, setColorState] = $3e6197669829fe11$export$40bfa8c7b0832715(value, defaultValue, onChange);
|
|
34
487
|
let [initialValue] = useState(colorValue);
|
|
35
488
|
let color = useMemo(() => colorSpace && colorValue ? colorValue.toFormat(colorSpace) : colorValue, [colorValue, colorSpace]);
|
|
36
489
|
let valueRef = useRef(color);
|
|
@@ -71,22 +524,22 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
|
71
524
|
value: color,
|
|
72
525
|
defaultValue: value !== void 0 ? initialValue : defaultValue,
|
|
73
526
|
setValue(value) {
|
|
74
|
-
setColor($
|
|
527
|
+
setColor($890783418b00a858$export$4cde5df63f53f473(value));
|
|
75
528
|
},
|
|
76
529
|
xValue,
|
|
77
530
|
setXValue,
|
|
78
531
|
yValue,
|
|
79
532
|
setYValue,
|
|
80
533
|
setColorFromPoint(x, y) {
|
|
81
|
-
let newXValue = minValueX + $
|
|
82
|
-
let newYValue = minValueY + (1 - $
|
|
534
|
+
let newXValue = minValueX + $240e9101ba2842f5$export$7d15b64cf5a3a4c4(x, 0, 1) * (maxValueX - minValueX);
|
|
535
|
+
let newYValue = minValueY + (1 - $240e9101ba2842f5$export$7d15b64cf5a3a4c4(y, 0, 1)) * (maxValueY - minValueY);
|
|
83
536
|
let newColor;
|
|
84
537
|
if (newXValue !== xValue) {
|
|
85
|
-
newXValue = $
|
|
538
|
+
newXValue = $240e9101ba2842f5$export$cb6e0bb50bc19463(newXValue, minValueX, maxValueX, stepX);
|
|
86
539
|
newColor = color.withChannelValue(channels.xChannel, newXValue);
|
|
87
540
|
}
|
|
88
541
|
if (newYValue !== yValue) {
|
|
89
|
-
newYValue = $
|
|
542
|
+
newYValue = $240e9101ba2842f5$export$cb6e0bb50bc19463(newYValue, minValueY, maxValueY, stepY);
|
|
90
543
|
newColor = (newColor || color).withChannelValue(channels.yChannel, newYValue);
|
|
91
544
|
}
|
|
92
545
|
if (newColor) setColor(newColor);
|
|
@@ -98,16 +551,16 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
|
98
551
|
};
|
|
99
552
|
},
|
|
100
553
|
incrementX(stepSize = 1) {
|
|
101
|
-
setXValue(xValue + stepSize > maxValueX ? maxValueX : $
|
|
554
|
+
setXValue(xValue + stepSize > maxValueX ? maxValueX : $240e9101ba2842f5$export$cb6e0bb50bc19463(xValue + stepSize, minValueX, maxValueX, stepX));
|
|
102
555
|
},
|
|
103
556
|
incrementY(stepSize = 1) {
|
|
104
|
-
setYValue(yValue + stepSize > maxValueY ? maxValueY : $
|
|
557
|
+
setYValue(yValue + stepSize > maxValueY ? maxValueY : $240e9101ba2842f5$export$cb6e0bb50bc19463(yValue + stepSize, minValueY, maxValueY, stepY));
|
|
105
558
|
},
|
|
106
559
|
decrementX(stepSize = 1) {
|
|
107
|
-
setXValue($
|
|
560
|
+
setXValue($240e9101ba2842f5$export$cb6e0bb50bc19463(xValue - stepSize, minValueX, maxValueX, stepX));
|
|
108
561
|
},
|
|
109
562
|
decrementY(stepSize = 1) {
|
|
110
|
-
setYValue($
|
|
563
|
+
setYValue($240e9101ba2842f5$export$cb6e0bb50bc19463(yValue - stepSize, minValueY, maxValueY, stepY));
|
|
111
564
|
},
|
|
112
565
|
setDragging(isDragging) {
|
|
113
566
|
let wasDragging = isDraggingRef.current;
|
|
@@ -122,639 +575,382 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
|
|
|
122
575
|
};
|
|
123
576
|
}
|
|
124
577
|
//#endregion
|
|
125
|
-
//#region node_modules
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
let
|
|
132
|
-
let
|
|
133
|
-
let
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (props.onChangeEnd) props.onChangeEnd(color.withChannelValue(channel, v));
|
|
578
|
+
//#region node_modules/react-aria-components/dist/private/ColorArea.mjs
|
|
579
|
+
var $e3bcd4910eec2b11$export$ebe63fadcdce34ed = createContext(null);
|
|
580
|
+
var $e3bcd4910eec2b11$export$6b32221de49982e = createContext(null);
|
|
581
|
+
var $e3bcd4910eec2b11$export$b2103f68a961418e = forwardRef(function ColorArea(props, ref) {
|
|
582
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $e3bcd4910eec2b11$export$ebe63fadcdce34ed);
|
|
583
|
+
let inputXRef = useRef(null);
|
|
584
|
+
let inputYRef = useRef(null);
|
|
585
|
+
let state = $1f22dbfd2b026cf2$export$6df7f0e2cabc7eef(props);
|
|
586
|
+
let { colorAreaProps, xInputProps, yInputProps, thumbProps } = $12db0b624ec2ac09$export$2f92a7a615a014f6({
|
|
587
|
+
...props,
|
|
588
|
+
inputXRef,
|
|
589
|
+
inputYRef,
|
|
590
|
+
containerRef: ref
|
|
591
|
+
}, state);
|
|
592
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
593
|
+
...props,
|
|
594
|
+
defaultClassName: "react-aria-ColorArea",
|
|
595
|
+
defaultStyle: colorAreaProps.style,
|
|
596
|
+
values: {
|
|
597
|
+
state,
|
|
598
|
+
isDisabled: props.isDisabled || false
|
|
147
599
|
}
|
|
148
600
|
});
|
|
149
|
-
let
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
default: throw new Error("Unknown color channel: " + channel);
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
getThumbValueLabel() {
|
|
170
|
-
return color.formatChannelValue(channel, locale);
|
|
171
|
-
},
|
|
172
|
-
step,
|
|
173
|
-
pageSize,
|
|
174
|
-
isDragging: sliderState.isThumbDragging(0)
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region node_modules/@react-stately/color/dist/useColor.mjs
|
|
179
|
-
function $aa90ad8b2b1d015f$export$5aadd9c0606af5c2(value) {
|
|
180
|
-
return useMemo(() => {
|
|
181
|
-
if (typeof value === "string") try {
|
|
182
|
-
return $799cddbef784668f$export$6e865ea70d7724f(value);
|
|
183
|
-
} catch {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
return value;
|
|
187
|
-
}, [value]);
|
|
188
|
-
}
|
|
601
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
602
|
+
delete DOMProps.id;
|
|
603
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
604
|
+
ref,
|
|
605
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, colorAreaProps, renderProps),
|
|
606
|
+
slot: props.slot || void 0,
|
|
607
|
+
"data-disabled": props.isDisabled || void 0
|
|
608
|
+
}, React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [[$e3bcd4910eec2b11$export$6b32221de49982e, state], [$ceafedee624ffe11$export$c80c0ea2ca5cb846, {
|
|
609
|
+
state,
|
|
610
|
+
thumbProps,
|
|
611
|
+
inputXRef,
|
|
612
|
+
xInputProps,
|
|
613
|
+
inputYRef,
|
|
614
|
+
yInputProps,
|
|
615
|
+
isDisabled: props.isDisabled
|
|
616
|
+
}]] }, renderProps.children));
|
|
617
|
+
});
|
|
189
618
|
//#endregion
|
|
190
|
-
//#region node_modules
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
619
|
+
//#region node_modules/react-aria/dist/private/color/useColorField.mjs
|
|
620
|
+
function $3945427e9f7dd37b$export$77e32ca575a28fdf(props, state, ref) {
|
|
621
|
+
let { isDisabled, isReadOnly, isRequired, isWheelDisabled, validationBehavior = "aria" } = props;
|
|
622
|
+
let { colorValue, inputValue, increment, decrement, incrementToMax, decrementToMin, commit } = state;
|
|
623
|
+
let inputId = $390e54f620492c70$export$f680877a34711e37();
|
|
624
|
+
let { spinButtonProps } = $757ec6630f26125c$export$e908e06f4b8e3402({
|
|
625
|
+
isDisabled,
|
|
626
|
+
isReadOnly,
|
|
627
|
+
isRequired,
|
|
628
|
+
maxValue: 16777215,
|
|
629
|
+
minValue: 0,
|
|
630
|
+
onIncrement: increment,
|
|
631
|
+
onIncrementToMax: incrementToMax,
|
|
632
|
+
onDecrement: decrement,
|
|
633
|
+
onDecrementToMin: decrementToMin,
|
|
634
|
+
value: colorValue ? colorValue.toHexInt() : void 0,
|
|
635
|
+
textValue: colorValue ? colorValue.toString("hex") : void 0
|
|
205
636
|
});
|
|
206
|
-
let
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
return;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
let parsedValue = useMemo(() => {
|
|
222
|
-
let color;
|
|
223
|
-
try {
|
|
224
|
-
color = $799cddbef784668f$export$6e865ea70d7724f(inputValue.startsWith("#") ? inputValue : `#${inputValue}`);
|
|
225
|
-
} catch {
|
|
226
|
-
color = null;
|
|
227
|
-
}
|
|
228
|
-
return color;
|
|
229
|
-
}, [inputValue]);
|
|
230
|
-
let commit = () => {
|
|
231
|
-
if (!inputValue.length) {
|
|
232
|
-
safelySetColorValue(null);
|
|
233
|
-
if (value === void 0 || colorValue === null) setInputValue("");
|
|
234
|
-
else setInputValue(colorValue.toString("hex"));
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
if (parsedValue == null) {
|
|
238
|
-
setInputValue(colorValue ? colorValue.toString("hex") : "");
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
safelySetColorValue(parsedValue);
|
|
242
|
-
let newColorValue = "";
|
|
243
|
-
if (colorValue) newColorValue = colorValue.toString("hex");
|
|
244
|
-
setInputValue(newColorValue);
|
|
245
|
-
validation.commitValidation();
|
|
246
|
-
};
|
|
247
|
-
let increment = () => {
|
|
248
|
-
let newValue = $b335ada08155d9c0$var$addColorValue(parsedValue, step);
|
|
249
|
-
if (newValue === colorValue) setInputValue(newValue.toString("hex"));
|
|
250
|
-
safelySetColorValue(newValue);
|
|
251
|
-
validation.commitValidation();
|
|
252
|
-
};
|
|
253
|
-
let decrement = () => {
|
|
254
|
-
let newValue = $b335ada08155d9c0$var$addColorValue(parsedValue, -step);
|
|
255
|
-
if (newValue === colorValue) setInputValue(newValue.toString("hex"));
|
|
256
|
-
safelySetColorValue(newValue);
|
|
257
|
-
validation.commitValidation();
|
|
258
|
-
};
|
|
259
|
-
let incrementToMax = () => safelySetColorValue($b335ada08155d9c0$var$MAX_COLOR);
|
|
260
|
-
let decrementToMin = () => safelySetColorValue($b335ada08155d9c0$var$MIN_COLOR);
|
|
261
|
-
let validate = (value) => {
|
|
262
|
-
var _value_match;
|
|
263
|
-
return value === "" || !!((_value_match = value.match(/^#?[0-9a-f]{0,6}$/i)) === null || _value_match === void 0 ? void 0 : _value_match[0]);
|
|
264
|
-
};
|
|
265
|
-
return {
|
|
266
|
-
...validation,
|
|
267
|
-
validate,
|
|
268
|
-
colorValue,
|
|
269
|
-
defaultColorValue: initialDefaultValue !== null && initialDefaultValue !== void 0 ? initialDefaultValue : initialValue,
|
|
270
|
-
setColorValue,
|
|
271
|
-
inputValue,
|
|
272
|
-
setInputValue,
|
|
273
|
-
commit,
|
|
274
|
-
increment,
|
|
275
|
-
incrementToMax,
|
|
276
|
-
decrement,
|
|
277
|
-
decrementToMin
|
|
637
|
+
let [focusWithin, setFocusWithin] = useState(false);
|
|
638
|
+
let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
|
|
639
|
+
isDisabled,
|
|
640
|
+
onFocusWithinChange: setFocusWithin
|
|
641
|
+
});
|
|
642
|
+
$14554ba6a2007b17$export$2123ff2b87c81ca({
|
|
643
|
+
onScroll: useCallback((e) => {
|
|
644
|
+
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
645
|
+
if (e.deltaY > 0) increment();
|
|
646
|
+
else if (e.deltaY < 0) decrement();
|
|
647
|
+
}, [decrement, increment]),
|
|
648
|
+
isDisabled: isWheelDisabled || isDisabled || isReadOnly || !focusWithin
|
|
649
|
+
}, ref);
|
|
650
|
+
let onChange = (value) => {
|
|
651
|
+
if (state.validate(value)) state.setInputValue(value);
|
|
278
652
|
};
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
653
|
+
let { inputProps, ...otherProps } = $62888b2ec35be488$export$4f384c9210e583c3({
|
|
654
|
+
...props,
|
|
655
|
+
id: inputId,
|
|
656
|
+
value: inputValue,
|
|
657
|
+
defaultValue: "!",
|
|
658
|
+
validate: void 0,
|
|
659
|
+
[$fd2148440a13ec26$export$a763b9476acd3eb]: state,
|
|
660
|
+
type: "text",
|
|
661
|
+
autoComplete: "off",
|
|
662
|
+
onChange
|
|
663
|
+
}, state, ref);
|
|
664
|
+
$3274bf1495747a7b$export$5add1d006293d136(ref, state.defaultColorValue, state.setColorValue);
|
|
665
|
+
inputProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(inputProps, spinButtonProps, focusWithinProps, {
|
|
666
|
+
role: "textbox",
|
|
667
|
+
"aria-valuemax": null,
|
|
668
|
+
"aria-valuemin": null,
|
|
669
|
+
"aria-valuenow": null,
|
|
670
|
+
"aria-valuetext": null,
|
|
671
|
+
autoCorrect: "off",
|
|
672
|
+
spellCheck: "false",
|
|
673
|
+
onBlur: commit
|
|
674
|
+
});
|
|
675
|
+
if (validationBehavior === "native") inputProps["aria-required"] = void 0;
|
|
302
676
|
return {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
value: colorValue === null ? NaN : value / multiplier,
|
|
306
|
-
defaultValue: defaultColorValue === null ? NaN : defaultColor.getChannelValue(channel) / multiplier,
|
|
307
|
-
onChange: (v) => {
|
|
308
|
-
if (!Number.isNaN(v)) setColor(color.withChannelValue(channel, v * multiplier));
|
|
309
|
-
else setColor(null);
|
|
310
|
-
},
|
|
311
|
-
minValue: range.minValue / multiplier,
|
|
312
|
-
maxValue: range.maxValue / multiplier,
|
|
313
|
-
step: range.step / multiplier,
|
|
314
|
-
formatOptions
|
|
315
|
-
}),
|
|
316
|
-
colorValue: color,
|
|
317
|
-
defaultColorValue,
|
|
318
|
-
setColorValue: setColor
|
|
677
|
+
inputProps,
|
|
678
|
+
...otherProps
|
|
319
679
|
};
|
|
320
680
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
681
|
+
//#endregion
|
|
682
|
+
//#region node_modules/react-aria/dist/private/color/useColorChannelField.mjs
|
|
683
|
+
function $d362ea20c2c75815$export$e55dd820142d3131(props, state, inputRef) {
|
|
684
|
+
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
685
|
+
return $cd2fa56213693c5e$export$23f548e970bdf099({
|
|
686
|
+
...props,
|
|
687
|
+
value: void 0,
|
|
688
|
+
defaultValue: void 0,
|
|
689
|
+
onChange: void 0,
|
|
690
|
+
validate: void 0,
|
|
691
|
+
"aria-label": props["aria-label"] || (props.label || props["aria-labelledby"] ? void 0 : state.colorValue.getChannelName(props.channel, locale))
|
|
692
|
+
}, state, inputRef);
|
|
331
693
|
}
|
|
332
694
|
//#endregion
|
|
333
|
-
//#region node_modules
|
|
334
|
-
|
|
335
|
-
0,
|
|
336
|
-
60,
|
|
337
|
-
120,
|
|
338
|
-
180,
|
|
339
|
-
240,
|
|
340
|
-
300,
|
|
341
|
-
360
|
|
342
|
-
].map((hue) => color.withChannelValue("hue", hue).toString("css")).join(", ");
|
|
343
|
-
var $40297c24c53588e6$var$saturation = (color) => `${color.withChannelValue("saturation", 0)}, transparent`;
|
|
344
|
-
var $40297c24c53588e6$var$hslChannels = {
|
|
345
|
-
hue: $40297c24c53588e6$var$hue,
|
|
346
|
-
saturation: $40297c24c53588e6$var$saturation,
|
|
347
|
-
lightness: () => "black, transparent, white"
|
|
348
|
-
};
|
|
349
|
-
var $40297c24c53588e6$var$hsbChannels = {
|
|
350
|
-
hue: $40297c24c53588e6$var$hue,
|
|
351
|
-
saturation: $40297c24c53588e6$var$saturation,
|
|
352
|
-
brightness: () => "black, transparent"
|
|
353
|
-
};
|
|
354
|
-
function $40297c24c53588e6$export$dd62420467d245ca({ direction, state, zChannel, xChannel, yChannel }) {
|
|
695
|
+
//#region node_modules/react-stately/dist/private/color/useColor.mjs
|
|
696
|
+
function $7d5d4eb4667f32af$export$5aadd9c0606af5c2(value) {
|
|
355
697
|
return useMemo(() => {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
case "rgb": {
|
|
361
|
-
let rgb = $799cddbef784668f$export$6e865ea70d7724f("rgb(0, 0, 0)");
|
|
362
|
-
colorAreaStyles = {
|
|
363
|
-
background: [
|
|
364
|
-
`linear-gradient(to ${end}, ${rgb.withChannelValue(xChannel, 0)}, ${rgb.withChannelValue(xChannel, 255)})`,
|
|
365
|
-
`linear-gradient(to top, ${rgb.withChannelValue(yChannel, 0)}, ${rgb.withChannelValue(yChannel, 255)})`,
|
|
366
|
-
rgb.withChannelValue(zChannel, zValue)
|
|
367
|
-
].join(","),
|
|
368
|
-
backgroundBlendMode: "screen"
|
|
369
|
-
};
|
|
370
|
-
break;
|
|
371
|
-
}
|
|
372
|
-
case "hsl": {
|
|
373
|
-
let channels = state.value.getColorChannels();
|
|
374
|
-
let value = $799cddbef784668f$export$6e865ea70d7724f("hsl(0, 100%, 50%)").withChannelValue(zChannel, zValue);
|
|
375
|
-
let bg = channels.filter((c) => c !== zChannel).map((c) => `linear-gradient(to ${c === xChannel ? end : "top"}, ${$40297c24c53588e6$var$hslChannels[c](value)})`).reverse();
|
|
376
|
-
if (zChannel === "hue") bg.push(value.toString("css"));
|
|
377
|
-
colorAreaStyles = { background: bg.join(", ") };
|
|
378
|
-
break;
|
|
379
|
-
}
|
|
380
|
-
case "hsb": {
|
|
381
|
-
let channels = state.value.getColorChannels();
|
|
382
|
-
let value = $799cddbef784668f$export$6e865ea70d7724f("hsb(0, 100%, 100%)").withChannelValue(zChannel, zValue);
|
|
383
|
-
let bg = channels.filter((c) => c !== zChannel).map((c) => `linear-gradient(to ${c === xChannel ? end : "top"}, ${$40297c24c53588e6$var$hsbChannels[c](value)})`).reverse();
|
|
384
|
-
if (zChannel === "hue") bg.push(value.toString("css"));
|
|
385
|
-
colorAreaStyles = { background: bg.join(", ") };
|
|
386
|
-
break;
|
|
387
|
-
}
|
|
698
|
+
if (typeof value === "string") try {
|
|
699
|
+
return $890783418b00a858$export$6e865ea70d7724f(value);
|
|
700
|
+
} catch {
|
|
701
|
+
return;
|
|
388
702
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
let forcedColorAdjustNoneStyle = { forcedColorAdjust: "none" };
|
|
392
|
-
return {
|
|
393
|
-
colorAreaStyleProps: { style: {
|
|
394
|
-
position: "relative",
|
|
395
|
-
touchAction: "none",
|
|
396
|
-
...forcedColorAdjustNoneStyle,
|
|
397
|
-
...colorAreaStyles
|
|
398
|
-
} },
|
|
399
|
-
thumbStyleProps: { style: {
|
|
400
|
-
position: "absolute",
|
|
401
|
-
left: `${x * 100}%`,
|
|
402
|
-
top: `${y * 100}%`,
|
|
403
|
-
transform: "translate(-50%, -50%)",
|
|
404
|
-
touchAction: "none",
|
|
405
|
-
...forcedColorAdjustNoneStyle
|
|
406
|
-
} }
|
|
407
|
-
};
|
|
408
|
-
}, [
|
|
409
|
-
direction,
|
|
410
|
-
state,
|
|
411
|
-
zChannel,
|
|
412
|
-
xChannel,
|
|
413
|
-
yChannel
|
|
414
|
-
]);
|
|
703
|
+
return value;
|
|
704
|
+
}, [value]);
|
|
415
705
|
}
|
|
416
706
|
//#endregion
|
|
417
|
-
//#region node_modules
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
let
|
|
424
|
-
let {
|
|
425
|
-
let
|
|
426
|
-
let [
|
|
427
|
-
let
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
let [valueChangedViaInputChangeEvent, setValueChangedViaInputChangeEvent] = useState(false);
|
|
433
|
-
let { xChannel, yChannel, zChannel } = state.channels;
|
|
434
|
-
let xChannelStep = state.xChannelStep;
|
|
435
|
-
let yChannelStep = state.yChannelStep;
|
|
436
|
-
let currentPosition = useRef(null);
|
|
437
|
-
let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd({ onKeyDown(e) {
|
|
438
|
-
if (!/^(PageUp|PageDown|Home|End)$/.test(e.key)) {
|
|
439
|
-
e.continuePropagation();
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
e.preventDefault();
|
|
443
|
-
state.setDragging(true);
|
|
444
|
-
setValueChangedViaKeyboard(true);
|
|
445
|
-
let dir;
|
|
446
|
-
switch (e.key) {
|
|
447
|
-
case "PageUp":
|
|
448
|
-
state.incrementY(state.yChannelPageStep);
|
|
449
|
-
dir = "y";
|
|
450
|
-
break;
|
|
451
|
-
case "PageDown":
|
|
452
|
-
state.decrementY(state.yChannelPageStep);
|
|
453
|
-
dir = "y";
|
|
454
|
-
break;
|
|
455
|
-
case "Home":
|
|
456
|
-
direction === "rtl" ? state.incrementX(state.xChannelPageStep) : state.decrementX(state.xChannelPageStep);
|
|
457
|
-
dir = "x";
|
|
458
|
-
break;
|
|
459
|
-
case "End":
|
|
460
|
-
direction === "rtl" ? state.decrementX(state.xChannelPageStep) : state.incrementX(state.xChannelPageStep);
|
|
461
|
-
dir = "x";
|
|
462
|
-
break;
|
|
463
|
-
}
|
|
464
|
-
state.setDragging(false);
|
|
465
|
-
if (dir) {
|
|
466
|
-
focusInput(dir === "x" ? inputXRef : inputYRef);
|
|
467
|
-
setFocusedInput(dir);
|
|
468
|
-
}
|
|
469
|
-
} });
|
|
470
|
-
let moveHandler = {
|
|
471
|
-
onMoveStart() {
|
|
472
|
-
currentPosition.current = null;
|
|
473
|
-
state.setDragging(true);
|
|
474
|
-
},
|
|
475
|
-
onMove({ deltaX, deltaY, pointerType, shiftKey }) {
|
|
476
|
-
var _containerRef_current;
|
|
477
|
-
let { incrementX, decrementX, incrementY, decrementY, xChannelPageStep, xChannelStep, yChannelPageStep, yChannelStep, getThumbPosition, setColorFromPoint } = state;
|
|
478
|
-
if (currentPosition.current == null) currentPosition.current = getThumbPosition();
|
|
479
|
-
let { width, height } = ((_containerRef_current = containerRef.current) === null || _containerRef_current === void 0 ? void 0 : _containerRef_current.getBoundingClientRect()) || {
|
|
480
|
-
width: 0,
|
|
481
|
-
height: 0
|
|
482
|
-
};
|
|
483
|
-
let valueChanged = deltaX !== 0 || deltaY !== 0;
|
|
484
|
-
if (pointerType === "keyboard") {
|
|
485
|
-
let deltaXValue = shiftKey && xChannelPageStep > xChannelStep ? xChannelPageStep : xChannelStep;
|
|
486
|
-
let deltaYValue = shiftKey && yChannelPageStep > yChannelStep ? yChannelPageStep : yChannelStep;
|
|
487
|
-
if (deltaX > 0 && direction === "ltr" || deltaX < 0 && direction === "rtl") incrementX(deltaXValue);
|
|
488
|
-
else if (deltaX < 0 && direction === "ltr" || deltaX > 0 && direction === "rtl") decrementX(deltaXValue);
|
|
489
|
-
else if (deltaY > 0) decrementY(deltaYValue);
|
|
490
|
-
else if (deltaY < 0) incrementY(deltaYValue);
|
|
491
|
-
setValueChangedViaKeyboard(valueChanged);
|
|
492
|
-
focusedInput = valueChanged && Math.abs(deltaY) > Math.abs(deltaX) ? "y" : "x";
|
|
493
|
-
setFocusedInput(focusedInput);
|
|
494
|
-
} else {
|
|
495
|
-
currentPosition.current.x += (direction === "rtl" ? -1 : 1) * deltaX / width;
|
|
496
|
-
currentPosition.current.y += deltaY / height;
|
|
497
|
-
setColorFromPoint(currentPosition.current.x, currentPosition.current.y);
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
onMoveEnd() {
|
|
501
|
-
isOnColorArea.current = false;
|
|
502
|
-
state.setDragging(false);
|
|
503
|
-
focusInput(focusedInput === "x" ? inputXRef : inputYRef);
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
let { moveProps: movePropsThumb } = $e8a7022cf87cba2a$export$36da96379f79f245(moveHandler);
|
|
507
|
-
let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({ onFocusWithinChange: (focusWithin) => {
|
|
508
|
-
if (!focusWithin) {
|
|
509
|
-
setValueChangedViaKeyboard(false);
|
|
510
|
-
setValueChangedViaInputChangeEvent(false);
|
|
511
|
-
}
|
|
512
|
-
} });
|
|
513
|
-
let currentPointer = useRef(void 0);
|
|
514
|
-
let isOnColorArea = useRef(false);
|
|
515
|
-
let { moveProps: movePropsContainer } = $e8a7022cf87cba2a$export$36da96379f79f245({
|
|
516
|
-
onMoveStart() {
|
|
517
|
-
if (isOnColorArea.current) moveHandler.onMoveStart();
|
|
518
|
-
},
|
|
519
|
-
onMove(e) {
|
|
520
|
-
if (isOnColorArea.current) moveHandler.onMove(e);
|
|
521
|
-
},
|
|
522
|
-
onMoveEnd() {
|
|
523
|
-
if (isOnColorArea.current) moveHandler.onMoveEnd();
|
|
524
|
-
}
|
|
707
|
+
//#region node_modules/react-stately/dist/private/color/useColorFieldState.mjs
|
|
708
|
+
var $83c2160a93ad557c$var$MIN_COLOR = $890783418b00a858$export$6e865ea70d7724f("#000000");
|
|
709
|
+
var $83c2160a93ad557c$var$MAX_COLOR = $890783418b00a858$export$6e865ea70d7724f("#FFFFFF");
|
|
710
|
+
var $83c2160a93ad557c$var$MIN_COLOR_INT = $83c2160a93ad557c$var$MIN_COLOR.toHexInt();
|
|
711
|
+
var $83c2160a93ad557c$var$MAX_COLOR_INT = $83c2160a93ad557c$var$MAX_COLOR.toHexInt();
|
|
712
|
+
function $83c2160a93ad557c$export$d52a01683abdfcd6(props) {
|
|
713
|
+
let { value, defaultValue, onChange } = props;
|
|
714
|
+
let { step } = $83c2160a93ad557c$var$MIN_COLOR.getChannelRange("red");
|
|
715
|
+
let initialDefaultValue = $7d5d4eb4667f32af$export$5aadd9c0606af5c2(defaultValue);
|
|
716
|
+
let [colorValue, setColorValue] = $3e6197669829fe11$export$40bfa8c7b0832715($7d5d4eb4667f32af$export$5aadd9c0606af5c2(value), initialDefaultValue, onChange);
|
|
717
|
+
let [initialValue] = useState(colorValue);
|
|
718
|
+
let [inputValue, setInputValue] = useState(() => (value || defaultValue) && colorValue ? colorValue.toString("hex") : "");
|
|
719
|
+
let validation = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
|
|
720
|
+
...props,
|
|
721
|
+
value: colorValue
|
|
525
722
|
});
|
|
526
|
-
let
|
|
527
|
-
if (!
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
focusInput();
|
|
531
|
-
state.setDragging(true);
|
|
532
|
-
if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onThumbUp, false);
|
|
533
|
-
else {
|
|
534
|
-
addGlobalListener(window, "mouseup", onThumbUp, false);
|
|
535
|
-
addGlobalListener(window, "touchend", onThumbUp, false);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
};
|
|
539
|
-
let onThumbUp = (e) => {
|
|
540
|
-
var _e_changedTouches;
|
|
541
|
-
var _e_pointerId;
|
|
542
|
-
if (((_e_pointerId = e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0].identifier) === currentPointer.current) {
|
|
543
|
-
setValueChangedViaKeyboard(false);
|
|
544
|
-
focusInput();
|
|
545
|
-
state.setDragging(false);
|
|
546
|
-
currentPointer.current = void 0;
|
|
547
|
-
isOnColorArea.current = false;
|
|
548
|
-
if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onThumbUp, false);
|
|
549
|
-
else {
|
|
550
|
-
removeGlobalListener(window, "mouseup", onThumbUp, false);
|
|
551
|
-
removeGlobalListener(window, "touchend", onThumbUp, false);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
let onColorAreaDown = (colorArea, id, clientX, clientY) => {
|
|
556
|
-
let rect = colorArea.getBoundingClientRect();
|
|
557
|
-
let { width, height } = rect;
|
|
558
|
-
let x = (clientX - rect.x) / width;
|
|
559
|
-
let y = (clientY - rect.y) / height;
|
|
560
|
-
if (direction === "rtl") x = 1 - x;
|
|
561
|
-
if (x >= 0 && x <= 1 && y >= 0 && y <= 1 && !state.isDragging && currentPointer.current === void 0) {
|
|
562
|
-
isOnColorArea.current = true;
|
|
563
|
-
setValueChangedViaKeyboard(false);
|
|
564
|
-
currentPointer.current = id;
|
|
565
|
-
state.setColorFromPoint(x, y);
|
|
566
|
-
focusInput();
|
|
567
|
-
state.setDragging(true);
|
|
568
|
-
if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
569
|
-
else {
|
|
570
|
-
addGlobalListener(window, "mouseup", onColorAreaUp, false);
|
|
571
|
-
addGlobalListener(window, "touchend", onColorAreaUp, false);
|
|
572
|
-
}
|
|
723
|
+
let safelySetColorValue = (newColor) => {
|
|
724
|
+
if (!colorValue || !newColor) {
|
|
725
|
+
setColorValue(newColor);
|
|
726
|
+
return;
|
|
573
727
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
var _e_pointerId;
|
|
578
|
-
let id = (_e_pointerId = e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0].identifier;
|
|
579
|
-
if (isOnColorArea.current && id === currentPointer.current) {
|
|
580
|
-
isOnColorArea.current = false;
|
|
581
|
-
setValueChangedViaKeyboard(false);
|
|
582
|
-
currentPointer.current = void 0;
|
|
583
|
-
state.setDragging(false);
|
|
584
|
-
focusInput();
|
|
585
|
-
if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onColorAreaUp, false);
|
|
586
|
-
else {
|
|
587
|
-
removeGlobalListener(window, "mouseup", onColorAreaUp, false);
|
|
588
|
-
removeGlobalListener(window, "touchend", onColorAreaUp, false);
|
|
589
|
-
}
|
|
728
|
+
if (newColor.toHexInt() !== colorValue.toHexInt()) {
|
|
729
|
+
setColorValue(newColor);
|
|
730
|
+
return;
|
|
590
731
|
}
|
|
591
732
|
};
|
|
592
|
-
let
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
733
|
+
let [prevValue, setPrevValue] = useState(colorValue);
|
|
734
|
+
if (prevValue !== colorValue) {
|
|
735
|
+
setInputValue(colorValue ? colorValue.toString("hex") : "");
|
|
736
|
+
setPrevValue(colorValue);
|
|
737
|
+
}
|
|
738
|
+
let parsedValue = useMemo(() => {
|
|
739
|
+
let color;
|
|
740
|
+
try {
|
|
741
|
+
color = $890783418b00a858$export$6e865ea70d7724f(inputValue.startsWith("#") ? inputValue : `#${inputValue}`);
|
|
742
|
+
} catch {
|
|
743
|
+
color = null;
|
|
602
744
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
onTouchStart: (e) => {
|
|
613
|
-
onThumbDown(e.changedTouches[0].identifier);
|
|
745
|
+
return color;
|
|
746
|
+
}, [inputValue]);
|
|
747
|
+
let commit = () => {
|
|
748
|
+
if (!inputValue.length) {
|
|
749
|
+
safelySetColorValue(null);
|
|
750
|
+
if (value === void 0 || colorValue === null) setInputValue("");
|
|
751
|
+
else setInputValue(colorValue.toString("hex"));
|
|
752
|
+
return;
|
|
614
753
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
setValueChangedViaInputChangeEvent(true);
|
|
625
|
-
if (target === inputXRef.current) state.setXValue(parseFloat(target.value));
|
|
626
|
-
else if (target === inputYRef.current) state.setYValue(parseFloat(target.value));
|
|
754
|
+
if (parsedValue == null) {
|
|
755
|
+
setInputValue(colorValue ? colorValue.toString("hex") : "");
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
safelySetColorValue(parsedValue);
|
|
759
|
+
let newColorValue = "";
|
|
760
|
+
if (colorValue) newColorValue = colorValue.toString("hex");
|
|
761
|
+
setInputValue(newColorValue);
|
|
762
|
+
validation.commitValidation();
|
|
627
763
|
};
|
|
628
|
-
let
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
764
|
+
let increment = () => {
|
|
765
|
+
let newValue = $83c2160a93ad557c$var$addColorValue(parsedValue, step);
|
|
766
|
+
if (newValue === colorValue) setInputValue(newValue.toString("hex"));
|
|
767
|
+
safelySetColorValue(newValue);
|
|
768
|
+
validation.commitValidation();
|
|
769
|
+
};
|
|
770
|
+
let decrement = () => {
|
|
771
|
+
let newValue = $83c2160a93ad557c$var$addColorValue(parsedValue, -step);
|
|
772
|
+
if (newValue === colorValue) setInputValue(newValue.toString("hex"));
|
|
773
|
+
safelySetColorValue(newValue);
|
|
774
|
+
validation.commitValidation();
|
|
775
|
+
};
|
|
776
|
+
let incrementToMax = () => safelySetColorValue($83c2160a93ad557c$var$MAX_COLOR);
|
|
777
|
+
let decrementToMin = () => safelySetColorValue($83c2160a93ad557c$var$MIN_COLOR);
|
|
778
|
+
let validate = (value) => value === "" || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];
|
|
779
|
+
return {
|
|
780
|
+
...validation,
|
|
781
|
+
validate,
|
|
782
|
+
colorValue,
|
|
783
|
+
defaultColorValue: initialDefaultValue ?? initialValue,
|
|
784
|
+
setColorValue,
|
|
785
|
+
inputValue,
|
|
786
|
+
setInputValue,
|
|
787
|
+
commit,
|
|
788
|
+
increment,
|
|
789
|
+
incrementToMax,
|
|
790
|
+
decrement,
|
|
791
|
+
decrementToMin
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
function $83c2160a93ad557c$var$addColorValue(color, step) {
|
|
795
|
+
let newColor = color ? color : $83c2160a93ad557c$var$MIN_COLOR;
|
|
796
|
+
let colorInt = newColor.toHexInt();
|
|
797
|
+
let clampInt = Math.min(Math.max(colorInt + step, $83c2160a93ad557c$var$MIN_COLOR_INT), $83c2160a93ad557c$var$MAX_COLOR_INT);
|
|
798
|
+
if (clampInt !== colorInt) newColor = $890783418b00a858$export$6e865ea70d7724f(`#${clampInt.toString(16).padStart(6, "0").toUpperCase()}`);
|
|
799
|
+
return newColor;
|
|
800
|
+
}
|
|
801
|
+
//#endregion
|
|
802
|
+
//#region node_modules/react-stately/dist/private/color/useColorChannelFieldState.mjs
|
|
803
|
+
function $378fa61546b28d38$export$b9fc0d69c9190c4a(props) {
|
|
804
|
+
let { channel, colorSpace, locale } = props;
|
|
805
|
+
let initialValue = $7d5d4eb4667f32af$export$5aadd9c0606af5c2(props.value);
|
|
806
|
+
let initialDefaultValue = $7d5d4eb4667f32af$export$5aadd9c0606af5c2(props.defaultValue);
|
|
807
|
+
let [colorValue, setColor] = $3e6197669829fe11$export$40bfa8c7b0832715(initialValue, initialDefaultValue ?? null, props.onChange);
|
|
808
|
+
let color = $378fa61546b28d38$var$useConvertColor(colorValue, colorSpace);
|
|
809
|
+
let [initialColorValue] = useState(colorValue);
|
|
810
|
+
let defaultColorValue = initialDefaultValue ?? initialColorValue;
|
|
811
|
+
let defaultColor = $378fa61546b28d38$var$useConvertColor(defaultColorValue, colorSpace);
|
|
812
|
+
let value = color.getChannelValue(channel);
|
|
813
|
+
let range = color.getChannelRange(channel);
|
|
814
|
+
let formatOptions = useMemo(() => color.getChannelFormatOptions(channel), [color, channel]);
|
|
815
|
+
let multiplier = formatOptions.style === "percent" && range.maxValue === 100 ? 100 : 1;
|
|
816
|
+
return {
|
|
817
|
+
...$3d0ee518c6f3d04f$export$7f629e9dc1ecf37c({
|
|
818
|
+
locale,
|
|
819
|
+
value: colorValue === null ? NaN : value / multiplier,
|
|
820
|
+
defaultValue: defaultColorValue === null ? NaN : defaultColor.getChannelValue(channel) / multiplier,
|
|
821
|
+
onChange: (v) => {
|
|
822
|
+
if (!Number.isNaN(v)) setColor(color.withChannelValue(channel, v * multiplier));
|
|
823
|
+
else setColor(null);
|
|
824
|
+
},
|
|
825
|
+
minValue: range.minValue / multiplier,
|
|
826
|
+
maxValue: range.maxValue / multiplier,
|
|
827
|
+
step: range.step / multiplier,
|
|
828
|
+
formatOptions
|
|
829
|
+
}),
|
|
830
|
+
colorValue: color,
|
|
831
|
+
defaultColorValue,
|
|
832
|
+
setColorValue: setColor
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function $378fa61546b28d38$var$useConvertColor(colorValue, colorSpace) {
|
|
836
|
+
let black = $7d5d4eb4667f32af$export$5aadd9c0606af5c2("#000");
|
|
837
|
+
return useMemo(() => {
|
|
838
|
+
let nonNullColorValue = colorValue || black;
|
|
839
|
+
return colorSpace && nonNullColorValue ? nonNullColorValue.toFormat(colorSpace) : nonNullColorValue;
|
|
648
840
|
}, [
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
valueChangedViaInputChangeEvent,
|
|
653
|
-
valueChangedViaKeyboard,
|
|
654
|
-
xChannel,
|
|
655
|
-
yChannel,
|
|
656
|
-
zChannel
|
|
841
|
+
black,
|
|
842
|
+
colorValue,
|
|
843
|
+
colorSpace
|
|
657
844
|
]);
|
|
658
|
-
|
|
659
|
-
|
|
845
|
+
}
|
|
846
|
+
//#endregion
|
|
847
|
+
//#region node_modules/react-aria-components/dist/private/ColorField.mjs
|
|
848
|
+
var $baf01eb6a6ce4d91$export$44644b8a16031b5b = createContext(null);
|
|
849
|
+
var $baf01eb6a6ce4d91$export$96b6d32b05a1a8ed = createContext(null);
|
|
850
|
+
var $baf01eb6a6ce4d91$export$b865d4358897bb17 = forwardRef(function ColorField(props, ref) {
|
|
851
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $baf01eb6a6ce4d91$export$44644b8a16031b5b);
|
|
852
|
+
if (props.channel) return React.createElement($baf01eb6a6ce4d91$var$ColorChannelField, {
|
|
660
853
|
...props,
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
channelLabel: colorPickerLabel
|
|
664
|
-
}) : colorPickerLabel
|
|
854
|
+
channel: props.channel,
|
|
855
|
+
forwardedRef: ref
|
|
665
856
|
});
|
|
666
|
-
|
|
857
|
+
else return React.createElement($baf01eb6a6ce4d91$var$HexColorField, {
|
|
667
858
|
...props,
|
|
668
|
-
|
|
669
|
-
label: ariaLabel,
|
|
670
|
-
channelLabel: colorPickerLabel
|
|
671
|
-
}) : colorPickerLabel
|
|
859
|
+
forwardedRef: ref
|
|
672
860
|
});
|
|
673
|
-
|
|
861
|
+
});
|
|
862
|
+
function $baf01eb6a6ce4d91$var$ColorChannelField(props) {
|
|
863
|
+
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
864
|
+
let state = $378fa61546b28d38$export$b9fc0d69c9190c4a({
|
|
674
865
|
...props,
|
|
675
|
-
|
|
676
|
-
}, isMobile ? colorPickerLabel : void 0);
|
|
677
|
-
let ariaRoleDescription = stringFormatter.format("twoDimensionalSlider");
|
|
678
|
-
let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab({ style: {
|
|
679
|
-
opacity: "0.0001",
|
|
680
|
-
width: "100%",
|
|
681
|
-
height: "100%",
|
|
682
|
-
pointerEvents: "none"
|
|
683
|
-
} });
|
|
684
|
-
let { colorAreaStyleProps, thumbStyleProps } = $40297c24c53588e6$export$dd62420467d245ca({
|
|
685
|
-
direction,
|
|
686
|
-
state,
|
|
687
|
-
xChannel,
|
|
688
|
-
yChannel,
|
|
689
|
-
zChannel
|
|
866
|
+
locale
|
|
690
867
|
});
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
868
|
+
let inputRef = useRef(null);
|
|
869
|
+
let [labelRef, label] = $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
870
|
+
let { labelProps, inputProps, descriptionProps, errorMessageProps, ...validation } = $d362ea20c2c75815$export$e55dd820142d3131({
|
|
871
|
+
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
872
|
+
label,
|
|
873
|
+
validationBehavior: props.validationBehavior ?? "native"
|
|
874
|
+
}, state, inputRef);
|
|
875
|
+
return React.createElement(React.Fragment, null, $baf01eb6a6ce4d91$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation), props.name && React.createElement("input", {
|
|
876
|
+
type: "hidden",
|
|
877
|
+
name: props.name,
|
|
878
|
+
form: props.form,
|
|
879
|
+
value: isNaN(state.numberValue) ? "" : state.numberValue
|
|
880
|
+
}));
|
|
881
|
+
}
|
|
882
|
+
function $baf01eb6a6ce4d91$var$HexColorField(props) {
|
|
883
|
+
let state = $83c2160a93ad557c$export$d52a01683abdfcd6({
|
|
884
|
+
...props,
|
|
885
|
+
validationBehavior: props.validationBehavior ?? "native"
|
|
886
|
+
});
|
|
887
|
+
let inputRef = useRef(null);
|
|
888
|
+
let [labelRef, label] = $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
889
|
+
let { labelProps, inputProps, descriptionProps, errorMessageProps, ...validation } = $3945427e9f7dd37b$export$77e32ca575a28fdf({
|
|
890
|
+
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
891
|
+
label,
|
|
892
|
+
validationBehavior: props.validationBehavior ?? "native"
|
|
893
|
+
}, state, inputRef);
|
|
894
|
+
return $baf01eb6a6ce4d91$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation);
|
|
895
|
+
}
|
|
896
|
+
function $baf01eb6a6ce4d91$var$useChildren(props, state, ref, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation) {
|
|
897
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
898
|
+
...props,
|
|
899
|
+
values: {
|
|
900
|
+
state,
|
|
901
|
+
channel: props.channel || "hex",
|
|
902
|
+
isDisabled: props.isDisabled || false,
|
|
903
|
+
isInvalid: validation.isInvalid || false,
|
|
904
|
+
isReadOnly: props.isReadOnly || false,
|
|
905
|
+
isRequired: props.isRequired || false
|
|
906
|
+
},
|
|
907
|
+
defaultClassName: "react-aria-ColorField"
|
|
908
|
+
});
|
|
909
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
910
|
+
delete DOMProps.id;
|
|
911
|
+
return React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
|
|
912
|
+
[$baf01eb6a6ce4d91$export$96b6d32b05a1a8ed, state],
|
|
913
|
+
[$41fb335299a4a39e$export$37fb8590cf2c088c, {
|
|
914
|
+
...inputProps,
|
|
915
|
+
ref: inputRef
|
|
916
|
+
}],
|
|
917
|
+
[$43a3b93638fe5db9$export$75b6ee27786ba447, {
|
|
918
|
+
...labelProps,
|
|
919
|
+
ref: labelRef
|
|
920
|
+
}],
|
|
921
|
+
[$3a442827418ebe87$export$f9c6924e160136d1, {
|
|
922
|
+
role: "presentation",
|
|
923
|
+
isInvalid: validation.isInvalid,
|
|
924
|
+
isDisabled: props.isDisabled || false
|
|
925
|
+
}],
|
|
926
|
+
[$efe09c6d1c304b50$export$9afb8bc826b033ea, { slots: {
|
|
927
|
+
description: descriptionProps,
|
|
928
|
+
errorMessage: errorMessageProps
|
|
929
|
+
} }],
|
|
930
|
+
[$1f3c3b1a70cec653$export$ff05c3ac10437e03, validation]
|
|
931
|
+
] }, React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
932
|
+
...DOMProps,
|
|
933
|
+
...renderProps,
|
|
934
|
+
ref,
|
|
935
|
+
slot: props.slot || void 0,
|
|
936
|
+
"data-channel": props.channel || "hex",
|
|
937
|
+
"data-disabled": props.isDisabled || void 0,
|
|
938
|
+
"data-invalid": validation.isInvalid || void 0,
|
|
939
|
+
"data-readonly": props.isReadOnly || void 0,
|
|
940
|
+
"data-required": props.isRequired || void 0
|
|
941
|
+
}));
|
|
746
942
|
}
|
|
747
943
|
//#endregion
|
|
748
|
-
//#region node_modules
|
|
749
|
-
function $
|
|
944
|
+
//#region node_modules/react-aria/dist/private/color/useColorSlider.mjs
|
|
945
|
+
function $9903d87f588af89b$export$106b7a4e66508f66(props, state) {
|
|
750
946
|
let { trackRef, inputRef, orientation, channel, "aria-label": ariaLabel, name, form } = props;
|
|
751
|
-
let { locale, direction } = $
|
|
947
|
+
let { locale, direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
752
948
|
if (!props.label && !ariaLabel && !props["aria-labelledby"]) ariaLabel = state.value.getChannelName(channel, locale);
|
|
753
|
-
let { groupProps, trackProps, labelProps, outputProps } = $
|
|
949
|
+
let { groupProps, trackProps, labelProps, outputProps } = $4b964a467b2bc7ea$export$56b2c08e277f365({
|
|
754
950
|
...props,
|
|
755
951
|
"aria-label": ariaLabel
|
|
756
952
|
}, state, trackRef);
|
|
757
|
-
let { inputProps, thumbProps } = $
|
|
953
|
+
let { inputProps, thumbProps } = $4a5dd96ecb58ab11$export$8d15029008292ae({
|
|
758
954
|
index: 0,
|
|
759
955
|
orientation,
|
|
760
956
|
isDisabled: props.isDisabled,
|
|
@@ -806,7 +1002,7 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
806
1002
|
let forcedColorAdjustNoneStyle = { forcedColorAdjust: "none" };
|
|
807
1003
|
if (channel === "hue") inputProps["aria-valuetext"] += `, ${value.getHueName(locale)}`;
|
|
808
1004
|
else if (channel !== "alpha") inputProps["aria-valuetext"] += `, ${value.getColorName(locale)}`;
|
|
809
|
-
let { visuallyHiddenProps } = $
|
|
1005
|
+
let { visuallyHiddenProps } = $ea3928288112382f$export$a966af930f325cab({ style: {
|
|
810
1006
|
opacity: "0.0001",
|
|
811
1007
|
width: "100%",
|
|
812
1008
|
height: "100%",
|
|
@@ -814,7 +1010,7 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
814
1010
|
} });
|
|
815
1011
|
return {
|
|
816
1012
|
trackProps: {
|
|
817
|
-
...$
|
|
1013
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(groupProps, trackProps),
|
|
818
1014
|
style: {
|
|
819
1015
|
...trackProps.style,
|
|
820
1016
|
...forcedColorAdjustNoneStyle,
|
|
@@ -840,284 +1036,79 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
840
1036
|
};
|
|
841
1037
|
}
|
|
842
1038
|
//#endregion
|
|
843
|
-
//#region node_modules
|
|
844
|
-
function $
|
|
845
|
-
let {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
value:
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
|
|
863
|
-
isDisabled,
|
|
864
|
-
onFocusWithinChange: setFocusWithin
|
|
865
|
-
});
|
|
866
|
-
$7d0a636d7a4dcefd$export$2123ff2b87c81ca({
|
|
867
|
-
onScroll: useCallback((e) => {
|
|
868
|
-
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
869
|
-
if (e.deltaY > 0) increment();
|
|
870
|
-
else if (e.deltaY < 0) decrement();
|
|
871
|
-
}, [decrement, increment]),
|
|
872
|
-
isDisabled: isWheelDisabled || isDisabled || isReadOnly || !focusWithin
|
|
873
|
-
}, ref);
|
|
874
|
-
let onChange = (value) => {
|
|
875
|
-
if (state.validate(value)) state.setInputValue(value);
|
|
876
|
-
};
|
|
877
|
-
let { inputProps, ...otherProps } = $d841c8010a73d545$export$4f384c9210e583c3({
|
|
878
|
-
...props,
|
|
879
|
-
id: inputId,
|
|
880
|
-
value: inputValue,
|
|
881
|
-
defaultValue: "!",
|
|
882
|
-
validate: void 0,
|
|
883
|
-
[$e5be200c675c3b3a$export$a763b9476acd3eb]: state,
|
|
884
|
-
type: "text",
|
|
885
|
-
autoComplete: "off",
|
|
886
|
-
onChange
|
|
887
|
-
}, state, ref);
|
|
888
|
-
$99facab73266f662$export$5add1d006293d136(ref, state.defaultColorValue, state.setColorValue);
|
|
889
|
-
inputProps = $3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, spinButtonProps, focusWithinProps, {
|
|
890
|
-
role: "textbox",
|
|
891
|
-
"aria-valuemax": null,
|
|
892
|
-
"aria-valuemin": null,
|
|
893
|
-
"aria-valuenow": null,
|
|
894
|
-
"aria-valuetext": null,
|
|
895
|
-
autoCorrect: "off",
|
|
896
|
-
spellCheck: "false",
|
|
897
|
-
onBlur: commit
|
|
898
|
-
});
|
|
899
|
-
if (validationBehavior === "native") inputProps["aria-required"] = void 0;
|
|
900
|
-
return {
|
|
901
|
-
inputProps,
|
|
902
|
-
...otherProps
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
//#endregion
|
|
906
|
-
//#region node_modules/@react-aria/color/dist/useColorChannelField.mjs
|
|
907
|
-
function $5e632d1ff0188f00$export$e55dd820142d3131(props, state, inputRef) {
|
|
908
|
-
let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
909
|
-
return $81397a9303501bda$export$23f548e970bdf099({
|
|
910
|
-
...props,
|
|
911
|
-
value: void 0,
|
|
912
|
-
defaultValue: void 0,
|
|
913
|
-
onChange: void 0,
|
|
914
|
-
validate: void 0,
|
|
915
|
-
"aria-label": props["aria-label"] || (props.label || props["aria-labelledby"] ? void 0 : state.colorValue.getChannelName(props.channel, locale))
|
|
916
|
-
}, state, inputRef);
|
|
917
|
-
}
|
|
918
|
-
//#endregion
|
|
919
|
-
//#region node_modules/react-aria-components/dist/ColorThumb.mjs
|
|
920
|
-
var $e2b71ec1d6016406$export$c80c0ea2ca5cb846 = createContext(null);
|
|
921
|
-
var $e2b71ec1d6016406$export$a3cc47cee1c1ccc = forwardRef(function ColorThumb(props, ref) {
|
|
922
|
-
let { state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false } = useContext($e2b71ec1d6016406$export$c80c0ea2ca5cb846);
|
|
923
|
-
let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
|
|
924
|
-
let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456(props);
|
|
925
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
926
|
-
...props,
|
|
927
|
-
defaultClassName: "react-aria-ColorThumb",
|
|
928
|
-
defaultStyle: {
|
|
929
|
-
...thumbProps.style,
|
|
930
|
-
backgroundColor: state.getDisplayColor().toString()
|
|
1039
|
+
//#region node_modules/react-stately/dist/private/color/useColorSliderState.mjs
|
|
1040
|
+
function $e1eacc05b29dcc25$export$57bc203e1c9c6d44(props) {
|
|
1041
|
+
let { channel, colorSpace, value, defaultValue, onChange, locale, ...otherProps } = props;
|
|
1042
|
+
if (value == null && defaultValue == null) throw new Error("useColorSliderState requires a value or defaultValue");
|
|
1043
|
+
if (value) value = $890783418b00a858$export$4cde5df63f53f473(value);
|
|
1044
|
+
if (defaultValue) defaultValue = $890783418b00a858$export$4cde5df63f53f473(defaultValue);
|
|
1045
|
+
let [colorValue, setColor] = $3e6197669829fe11$export$40bfa8c7b0832715(value, defaultValue, onChange);
|
|
1046
|
+
let color = useMemo(() => colorSpace && colorValue ? colorValue.toFormat(colorSpace) : colorValue, [colorValue, colorSpace]);
|
|
1047
|
+
let [initialValue] = useState(colorValue);
|
|
1048
|
+
let defaultColorValue = defaultValue ?? initialValue;
|
|
1049
|
+
let defaultColor = useMemo(() => colorSpace && defaultColorValue ? defaultColorValue.toFormat(colorSpace) : defaultColorValue, [defaultColorValue, colorSpace]);
|
|
1050
|
+
let sliderState = $d806310b82f07e9d$export$e5fda3247f5d67f9({
|
|
1051
|
+
...color.getChannelRange(channel),
|
|
1052
|
+
...otherProps,
|
|
1053
|
+
numberFormatter: null,
|
|
1054
|
+
value: color.getChannelValue(channel),
|
|
1055
|
+
defaultValue: defaultColor.getChannelValue(channel),
|
|
1056
|
+
onChange(v) {
|
|
1057
|
+
setColor(color.withChannelValue(channel, v));
|
|
931
1058
|
},
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
isHovered,
|
|
935
|
-
isDragging: state.isDragging,
|
|
936
|
-
isFocused,
|
|
937
|
-
isFocusVisible,
|
|
938
|
-
isDisabled
|
|
939
|
-
}
|
|
940
|
-
});
|
|
941
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
|
|
942
|
-
delete DOMProps.id;
|
|
943
|
-
return React.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
|
|
944
|
-
...$3ef42575df84b30b$export$9d1611c77c2fe928(thumbProps, hoverProps, DOMProps),
|
|
945
|
-
...renderProps,
|
|
946
|
-
ref,
|
|
947
|
-
"data-hovered": isHovered || void 0,
|
|
948
|
-
"data-dragging": state.isDragging || void 0,
|
|
949
|
-
"data-focused": isFocused || void 0,
|
|
950
|
-
"data-focus-visible": isFocusVisible || void 0,
|
|
951
|
-
"data-disabled": isDisabled || void 0
|
|
952
|
-
}, React.createElement("input", {
|
|
953
|
-
ref: inputXRef,
|
|
954
|
-
...xInputProps,
|
|
955
|
-
...focusProps
|
|
956
|
-
}), yInputProps && React.createElement("input", {
|
|
957
|
-
ref: inputYRef,
|
|
958
|
-
...yInputProps,
|
|
959
|
-
...focusProps
|
|
960
|
-
}), renderProps.children);
|
|
961
|
-
});
|
|
962
|
-
//#endregion
|
|
963
|
-
//#region node_modules/react-aria-components/dist/ColorArea.mjs
|
|
964
|
-
var $0de070065d44825d$export$6b32221de49982e = createContext(null);
|
|
965
|
-
var $0de070065d44825d$export$b2103f68a961418e = forwardRef(function ColorArea(props, ref) {
|
|
966
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e85f108e88277b8$export$ebe63fadcdce34ed);
|
|
967
|
-
let inputXRef = useRef(null);
|
|
968
|
-
let inputYRef = useRef(null);
|
|
969
|
-
let state = $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props);
|
|
970
|
-
let { colorAreaProps, xInputProps, yInputProps, thumbProps } = $60bd7d6e45dcddfa$export$2f92a7a615a014f6({
|
|
971
|
-
...props,
|
|
972
|
-
inputXRef,
|
|
973
|
-
inputYRef,
|
|
974
|
-
containerRef: ref
|
|
975
|
-
}, state);
|
|
976
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
977
|
-
...props,
|
|
978
|
-
defaultClassName: "react-aria-ColorArea",
|
|
979
|
-
defaultStyle: colorAreaProps.style,
|
|
980
|
-
values: {
|
|
981
|
-
state,
|
|
982
|
-
isDisabled: props.isDisabled || false
|
|
1059
|
+
onChangeEnd(v) {
|
|
1060
|
+
if (props.onChangeEnd) props.onChangeEnd(color.withChannelValue(channel, v));
|
|
983
1061
|
}
|
|
984
1062
|
});
|
|
985
|
-
let
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
"data-disabled": props.isDisabled || void 0
|
|
992
|
-
}, React.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [[$0de070065d44825d$export$6b32221de49982e, state], [$e2b71ec1d6016406$export$c80c0ea2ca5cb846, {
|
|
993
|
-
state,
|
|
994
|
-
thumbProps,
|
|
995
|
-
inputXRef,
|
|
996
|
-
xInputProps,
|
|
997
|
-
inputYRef,
|
|
998
|
-
yInputProps,
|
|
999
|
-
isDisabled: props.isDisabled
|
|
1000
|
-
}]] }, renderProps.children));
|
|
1001
|
-
});
|
|
1002
|
-
//#endregion
|
|
1003
|
-
//#region node_modules/react-aria-components/dist/ColorField.mjs
|
|
1004
|
-
var $3ada01a82feafb94$export$96b6d32b05a1a8ed = createContext(null);
|
|
1005
|
-
var $3ada01a82feafb94$export$b865d4358897bb17 = forwardRef(function ColorField(props, ref) {
|
|
1006
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e85f108e88277b8$export$44644b8a16031b5b);
|
|
1007
|
-
if (props.channel) return React.createElement($3ada01a82feafb94$var$ColorChannelField, {
|
|
1008
|
-
...props,
|
|
1009
|
-
channel: props.channel,
|
|
1010
|
-
forwardedRef: ref
|
|
1011
|
-
});
|
|
1012
|
-
else return React.createElement($3ada01a82feafb94$var$HexColorField, {
|
|
1013
|
-
...props,
|
|
1014
|
-
forwardedRef: ref
|
|
1015
|
-
});
|
|
1016
|
-
});
|
|
1017
|
-
function $3ada01a82feafb94$var$ColorChannelField(props) {
|
|
1018
|
-
let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
1019
|
-
let state = $31a863bb88e75dd6$export$b9fc0d69c9190c4a({
|
|
1020
|
-
...props,
|
|
1021
|
-
locale
|
|
1022
|
-
});
|
|
1023
|
-
let inputRef = useRef(null);
|
|
1024
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
1025
|
-
var _props_validationBehavior;
|
|
1026
|
-
let { labelProps, inputProps, descriptionProps, errorMessageProps, ...validation } = $5e632d1ff0188f00$export$e55dd820142d3131({
|
|
1027
|
-
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
1028
|
-
label,
|
|
1029
|
-
validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : "native"
|
|
1030
|
-
}, state, inputRef);
|
|
1031
|
-
return React.createElement(React.Fragment, null, $3ada01a82feafb94$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation), props.name && React.createElement("input", {
|
|
1032
|
-
type: "hidden",
|
|
1033
|
-
name: props.name,
|
|
1034
|
-
form: props.form,
|
|
1035
|
-
value: isNaN(state.numberValue) ? "" : state.numberValue
|
|
1036
|
-
}));
|
|
1037
|
-
}
|
|
1038
|
-
function $3ada01a82feafb94$var$HexColorField(props) {
|
|
1039
|
-
var _props_validationBehavior;
|
|
1040
|
-
let state = $b335ada08155d9c0$export$d52a01683abdfcd6({
|
|
1041
|
-
...props,
|
|
1042
|
-
validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : "native"
|
|
1043
|
-
});
|
|
1044
|
-
let inputRef = useRef(null);
|
|
1045
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
1046
|
-
var _props_validationBehavior1;
|
|
1047
|
-
let { labelProps, inputProps, descriptionProps, errorMessageProps, ...validation } = $f6896b05b2ecad12$export$77e32ca575a28fdf({
|
|
1048
|
-
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
1049
|
-
label,
|
|
1050
|
-
validationBehavior: (_props_validationBehavior1 = props.validationBehavior) !== null && _props_validationBehavior1 !== void 0 ? _props_validationBehavior1 : "native"
|
|
1051
|
-
}, state, inputRef);
|
|
1052
|
-
return $3ada01a82feafb94$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation);
|
|
1053
|
-
}
|
|
1054
|
-
function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation) {
|
|
1055
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
1056
|
-
...props,
|
|
1057
|
-
values: {
|
|
1058
|
-
state,
|
|
1059
|
-
channel: props.channel || "hex",
|
|
1060
|
-
isDisabled: props.isDisabled || false,
|
|
1061
|
-
isInvalid: validation.isInvalid || false,
|
|
1062
|
-
isReadOnly: props.isReadOnly || false,
|
|
1063
|
-
isRequired: props.isRequired || false
|
|
1063
|
+
let { step, pageSize } = color.getChannelRange(channel);
|
|
1064
|
+
return {
|
|
1065
|
+
...sliderState,
|
|
1066
|
+
value: color,
|
|
1067
|
+
setValue(value) {
|
|
1068
|
+
setColor($890783418b00a858$export$4cde5df63f53f473(value));
|
|
1064
1069
|
},
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
description: descriptionProps,
|
|
1086
|
-
errorMessage: errorMessageProps
|
|
1087
|
-
} }],
|
|
1088
|
-
[$ee014567cb39d3f0$export$ff05c3ac10437e03, validation]
|
|
1089
|
-
] }, React.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
|
|
1090
|
-
...DOMProps,
|
|
1091
|
-
...renderProps,
|
|
1092
|
-
ref,
|
|
1093
|
-
slot: props.slot || void 0,
|
|
1094
|
-
"data-channel": props.channel || "hex",
|
|
1095
|
-
"data-disabled": props.isDisabled || void 0,
|
|
1096
|
-
"data-invalid": validation.isInvalid || void 0,
|
|
1097
|
-
"data-readonly": props.isReadOnly || void 0,
|
|
1098
|
-
"data-required": props.isRequired || void 0
|
|
1099
|
-
}));
|
|
1070
|
+
getDisplayColor() {
|
|
1071
|
+
switch (channel) {
|
|
1072
|
+
case "hue": return $890783418b00a858$export$6e865ea70d7724f(`hsl(${color.getChannelValue("hue")}, 100%, 50%)`);
|
|
1073
|
+
case "lightness":
|
|
1074
|
+
case "brightness":
|
|
1075
|
+
case "saturation":
|
|
1076
|
+
case "red":
|
|
1077
|
+
case "green":
|
|
1078
|
+
case "blue": return color.withChannelValue("alpha", 1);
|
|
1079
|
+
case "alpha": return color;
|
|
1080
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
getThumbValueLabel() {
|
|
1084
|
+
return color.formatChannelValue(channel, locale);
|
|
1085
|
+
},
|
|
1086
|
+
step,
|
|
1087
|
+
pageSize,
|
|
1088
|
+
isDragging: sliderState.isThumbDragging(0)
|
|
1089
|
+
};
|
|
1100
1090
|
}
|
|
1101
1091
|
//#endregion
|
|
1102
|
-
//#region node_modules/react-aria-components/dist/ColorSlider.mjs
|
|
1103
|
-
var $
|
|
1104
|
-
var $
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
let
|
|
1092
|
+
//#region node_modules/react-aria-components/dist/private/ColorSlider.mjs
|
|
1093
|
+
var $016f94378f03b8fe$export$717b2c0a523a0b53 = createContext(null);
|
|
1094
|
+
var $016f94378f03b8fe$export$c7fad7ea00194428 = createContext(null);
|
|
1095
|
+
var $016f94378f03b8fe$export$44fd664bcca5b6fb = forwardRef(function ColorSlider(props, ref) {
|
|
1096
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $016f94378f03b8fe$export$717b2c0a523a0b53);
|
|
1097
|
+
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
1098
|
+
let state = $e1eacc05b29dcc25$export$57bc203e1c9c6d44({
|
|
1108
1099
|
...props,
|
|
1109
1100
|
locale
|
|
1110
1101
|
});
|
|
1111
1102
|
let trackRef = React.useRef(null);
|
|
1112
1103
|
let inputRef = React.useRef(null);
|
|
1113
|
-
let [labelRef, label] = $
|
|
1114
|
-
let { trackProps, thumbProps, inputProps, labelProps, outputProps } = $
|
|
1104
|
+
let [labelRef, label] = $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
1105
|
+
let { trackProps, thumbProps, inputProps, labelProps, outputProps } = $9903d87f588af89b$export$106b7a4e66508f66({
|
|
1115
1106
|
...props,
|
|
1116
1107
|
label,
|
|
1117
1108
|
trackRef,
|
|
1118
1109
|
inputRef
|
|
1119
1110
|
}, state);
|
|
1120
|
-
let renderProps = $
|
|
1111
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
1121
1112
|
...props,
|
|
1122
1113
|
values: {
|
|
1123
1114
|
orientation: state.orientation,
|
|
@@ -1126,29 +1117,29 @@ var $1cca5300a3c2e7f9$export$44fd664bcca5b6fb = forwardRef(function ColorSlider(
|
|
|
1126
1117
|
},
|
|
1127
1118
|
defaultClassName: "react-aria-ColorSlider"
|
|
1128
1119
|
});
|
|
1129
|
-
let DOMProps = $
|
|
1120
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
1130
1121
|
delete DOMProps.id;
|
|
1131
|
-
return React.createElement($
|
|
1132
|
-
[$
|
|
1133
|
-
[$
|
|
1134
|
-
[$
|
|
1122
|
+
return React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
|
|
1123
|
+
[$016f94378f03b8fe$export$c7fad7ea00194428, state],
|
|
1124
|
+
[$806e559d0c2c64a0$export$1e7083018727fa60, state],
|
|
1125
|
+
[$806e559d0c2c64a0$export$f1fce0420cc6d8ee, {
|
|
1135
1126
|
...trackProps,
|
|
1136
1127
|
ref: trackRef
|
|
1137
1128
|
}],
|
|
1138
|
-
[$
|
|
1139
|
-
[$
|
|
1129
|
+
[$806e559d0c2c64a0$export$6189c2744041d8f8, outputProps],
|
|
1130
|
+
[$43a3b93638fe5db9$export$75b6ee27786ba447, {
|
|
1140
1131
|
...labelProps,
|
|
1141
1132
|
ref: labelRef,
|
|
1142
1133
|
children: state.value.getChannelName(props.channel, locale)
|
|
1143
1134
|
}],
|
|
1144
|
-
[$
|
|
1135
|
+
[$ceafedee624ffe11$export$c80c0ea2ca5cb846, {
|
|
1145
1136
|
state,
|
|
1146
1137
|
thumbProps,
|
|
1147
1138
|
inputXRef: inputRef,
|
|
1148
1139
|
xInputProps: inputProps,
|
|
1149
1140
|
isDisabled: props.isDisabled
|
|
1150
1141
|
}]
|
|
1151
|
-
] }, React.createElement($
|
|
1142
|
+
] }, React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
1152
1143
|
...DOMProps,
|
|
1153
1144
|
...renderProps,
|
|
1154
1145
|
ref,
|
|
@@ -1186,8 +1177,8 @@ var $1cca5300a3c2e7f9$export$44fd664bcca5b6fb = forwardRef(function ColorSlider(
|
|
|
1186
1177
|
var SolidColorPicker = (props) => {
|
|
1187
1178
|
const { value: rawValue, onChange, disabled, onChangeEnd, allowTransparency = false, outputFormat, hidden, noAdvancedOptions } = props;
|
|
1188
1179
|
const value = rawValue?.replace("transparent", "rgba(0, 0, 0, 0)");
|
|
1189
|
-
const defaultColor = $
|
|
1190
|
-
const [color, setColor] = useState((value && value?.length > 1 ? $
|
|
1180
|
+
const defaultColor = $890783418b00a858$export$6e865ea70d7724f("#00000000").toFormat(allowTransparency ? "hsla" : "hsl");
|
|
1181
|
+
const [color, setColor] = useState((value && value?.length > 1 ? $890783418b00a858$export$6e865ea70d7724f(value) : defaultColor).toFormat(allowTransparency ? "hsla" : "hsl"));
|
|
1191
1182
|
if (hidden) return null;
|
|
1192
1183
|
let handleChangeEnd;
|
|
1193
1184
|
if (onChangeEnd) handleChangeEnd = (color) => {
|
|
@@ -1202,7 +1193,7 @@ var SolidColorPicker = (props) => {
|
|
|
1202
1193
|
return jsxs("div", {
|
|
1203
1194
|
className: "es:flex es:flex-col es:items-center es:gap-2",
|
|
1204
1195
|
children: [
|
|
1205
|
-
jsx($
|
|
1196
|
+
jsx($e3bcd4910eec2b11$export$b2103f68a961418e, {
|
|
1206
1197
|
value: color,
|
|
1207
1198
|
xChannel: "saturation",
|
|
1208
1199
|
yChannel: "lightness",
|
|
@@ -1210,39 +1201,39 @@ var SolidColorPicker = (props) => {
|
|
|
1210
1201
|
onChange: handleChange,
|
|
1211
1202
|
onChangeEnd: handleChangeEnd,
|
|
1212
1203
|
isDisabled: disabled,
|
|
1213
|
-
children: jsx($
|
|
1204
|
+
children: jsx($ceafedee624ffe11$export$a3cc47cee1c1ccc, { className: "es:size-5 es:rounded-full es:transition es:dragging:scale-110! es:border es:border-white es:shadow-[0_0_0_1px_black] es:disabled:invisible" })
|
|
1214
1205
|
}),
|
|
1215
|
-
jsx($
|
|
1206
|
+
jsx($016f94378f03b8fe$export$44fd664bcca5b6fb, {
|
|
1216
1207
|
channel: "hue",
|
|
1217
1208
|
value: color,
|
|
1218
1209
|
onChange: handleChange,
|
|
1219
1210
|
isDisabled: disabled,
|
|
1220
|
-
children: jsx($
|
|
1211
|
+
children: jsx($806e559d0c2c64a0$export$105594979f116971, {
|
|
1221
1212
|
className: clsx("es:h-7 es:w-48 es:rounded-10 es:border es:border-secondary-300 es:shadow-sm", "es:[&:has(>_[data-focus-visible=\"true\"])]:ring-2 es:[&:has(>_[data-focus-visible=\"true\"])]:ring-accent-500/50", "es:disabled:bg-linear-to-r! es:disabled:from-white es:disabled:to-secondary-100"),
|
|
1222
|
-
children: jsx($
|
|
1213
|
+
children: jsx($ceafedee624ffe11$export$a3cc47cee1c1ccc, { className: "es:top-3.25 es:size-5 es:rounded-full es:border es:border-white es:shadow-[0_0_0_1px_black] es:transition es:dragging:scale-110! es:disabled:invisible" })
|
|
1223
1214
|
})
|
|
1224
1215
|
}),
|
|
1225
|
-
allowTransparency && jsx($
|
|
1216
|
+
allowTransparency && jsx($016f94378f03b8fe$export$44fd664bcca5b6fb, {
|
|
1226
1217
|
channel: "alpha",
|
|
1227
1218
|
value: color,
|
|
1228
1219
|
onChange: handleChange,
|
|
1229
1220
|
isDisabled: disabled,
|
|
1230
|
-
children: jsx($
|
|
1221
|
+
children: jsx($806e559d0c2c64a0$export$105594979f116971, {
|
|
1231
1222
|
className: clsx("es:h-7 es:w-48 es:rounded-10 es:border es:border-secondary-300 es:shadow-sm", "es:[&:has(>_[data-focus-visible=\"true\"])]:ring-2 es:[&:has(>_[data-focus-visible=\"true\"])]:ring-accent-500/50", "es:disabled:bg-linear-to-r! es:disabled:from-white es:disabled:to-secondary-100"),
|
|
1232
1223
|
style: () => {
|
|
1233
1224
|
return { background: `linear-gradient(to right, ${color.clone().withChannelValue("alpha", 0).toString("hsla")}, ${color.clone().withChannelValue("alpha", 1).toString("hsla")}), repeating-conic-gradient(rgb(204, 204, 204) 0%, rgb(204, 204, 204) 25%, white 0%, white 50%) 50% center / 14px 14px` };
|
|
1234
1225
|
},
|
|
1235
|
-
children: jsx($
|
|
1226
|
+
children: jsx($ceafedee624ffe11$export$a3cc47cee1c1ccc, { className: "es:top-3.25 es:size-5 es:rounded-full es:border es:border-white es:shadow-[0_0_0_1px_black] es:transition es:disabled:invisible" })
|
|
1236
1227
|
})
|
|
1237
1228
|
}),
|
|
1238
1229
|
jsxs("div", {
|
|
1239
1230
|
className: "es:flex es:items-center es:justify-center es:gap-0.75",
|
|
1240
|
-
children: [jsx($
|
|
1231
|
+
children: [jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1241
1232
|
value: color,
|
|
1242
1233
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1243
1234
|
"aria-label": __("Hex color value", "eightshift-ui-components"),
|
|
1244
1235
|
isDisabled: disabled,
|
|
1245
|
-
children: jsx($
|
|
1236
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: clsx("es:leading-none", "es:w-20", "es:transition-plus", "es:any-focus:outline-hidden", "es:inset-ring", "es:focus-visible:ring-2 es:focus-visible:ring-accent-500/30", "es:focus-visible:text-accent-950 es:focus-visible:inset-ring-accent-500", "es:focus:placeholder:text-surface-400", "es:h-8", "es:px-3", "es:font-mono es:text-12", "es:bg-white", "es:bg-linear-to-b es:from-secondary-100/0 es:to-secondary-100/50 es:from-25%", "es:hover:from-surface-100/0 es:hover:to-surface-100/50", "es:inset-ring-secondary-400/50 es:hover:inset-ring-surface-300 es:focus:inset-ring-surface-400", "es:inset-shadow-sm es:inset-shadow-secondary-100/50", "es:hover:placeholder:text-surface-400", "es:placeholder:text-secondary-400", "es:shadow-xs es:shadow-black/5", "es:rounded-lg! es:focus:rounded-xl!", "es:border-none!") })
|
|
1246
1237
|
}), jsxs(TriggeredPopover, {
|
|
1247
1238
|
triggerButtonIcon: dropdownCaretAlt,
|
|
1248
1239
|
className: "es:w-52 es:p-3",
|
|
@@ -1256,7 +1247,7 @@ var SolidColorPicker = (props) => {
|
|
|
1256
1247
|
jsxs(BaseControl, {
|
|
1257
1248
|
label: "RGB",
|
|
1258
1249
|
children: [
|
|
1259
|
-
jsx($
|
|
1250
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1260
1251
|
value: color?.toFormat(allowTransparency ? "rgba" : "rgb"),
|
|
1261
1252
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1262
1253
|
channel: "red",
|
|
@@ -1268,10 +1259,10 @@ var SolidColorPicker = (props) => {
|
|
|
1268
1259
|
}),
|
|
1269
1260
|
label: __("Red", "eightshift-ui-components"),
|
|
1270
1261
|
inline: true,
|
|
1271
|
-
children: jsx($
|
|
1262
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1272
1263
|
})
|
|
1273
1264
|
}),
|
|
1274
|
-
jsx($
|
|
1265
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1275
1266
|
value: color?.toFormat(allowTransparency ? "rgba" : "rgb"),
|
|
1276
1267
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1277
1268
|
channel: "green",
|
|
@@ -1283,10 +1274,10 @@ var SolidColorPicker = (props) => {
|
|
|
1283
1274
|
}),
|
|
1284
1275
|
label: __("Green", "eightshift-ui-components"),
|
|
1285
1276
|
inline: true,
|
|
1286
|
-
children: jsx($
|
|
1277
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1287
1278
|
})
|
|
1288
1279
|
}),
|
|
1289
|
-
jsx($
|
|
1280
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1290
1281
|
value: color?.toFormat(allowTransparency ? "rgba" : "rgb"),
|
|
1291
1282
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1292
1283
|
channel: "blue",
|
|
@@ -1298,7 +1289,7 @@ var SolidColorPicker = (props) => {
|
|
|
1298
1289
|
}),
|
|
1299
1290
|
label: __("Blue", "eightshift-ui-components"),
|
|
1300
1291
|
inline: true,
|
|
1301
|
-
children: jsx($
|
|
1292
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1302
1293
|
})
|
|
1303
1294
|
})
|
|
1304
1295
|
]
|
|
@@ -1307,7 +1298,7 @@ var SolidColorPicker = (props) => {
|
|
|
1307
1298
|
label: "HSL",
|
|
1308
1299
|
className: "es:mt-3",
|
|
1309
1300
|
children: [
|
|
1310
|
-
jsx($
|
|
1301
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1311
1302
|
value: color?.toFormat(allowTransparency ? "hsla" : "hsl"),
|
|
1312
1303
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1313
1304
|
channel: "hue",
|
|
@@ -1319,10 +1310,10 @@ var SolidColorPicker = (props) => {
|
|
|
1319
1310
|
}),
|
|
1320
1311
|
label: __("Hue", "eightshift-ui-components"),
|
|
1321
1312
|
inline: true,
|
|
1322
|
-
children: jsx($
|
|
1313
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1323
1314
|
})
|
|
1324
1315
|
}),
|
|
1325
|
-
jsx($
|
|
1316
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1326
1317
|
value: color?.toFormat(allowTransparency ? "hsla" : "hsl"),
|
|
1327
1318
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1328
1319
|
channel: "saturation",
|
|
@@ -1334,10 +1325,10 @@ var SolidColorPicker = (props) => {
|
|
|
1334
1325
|
}),
|
|
1335
1326
|
label: __("Saturation", "eightshift-ui-components"),
|
|
1336
1327
|
inline: true,
|
|
1337
|
-
children: jsx($
|
|
1328
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1338
1329
|
})
|
|
1339
1330
|
}),
|
|
1340
|
-
jsx($
|
|
1331
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1341
1332
|
value: color?.toFormat(allowTransparency ? "hsla" : "hsl"),
|
|
1342
1333
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1343
1334
|
channel: "lightness",
|
|
@@ -1349,7 +1340,7 @@ var SolidColorPicker = (props) => {
|
|
|
1349
1340
|
}),
|
|
1350
1341
|
label: __("Lightness", "eightshift-ui-components"),
|
|
1351
1342
|
inline: true,
|
|
1352
|
-
children: jsx($
|
|
1343
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1353
1344
|
})
|
|
1354
1345
|
})
|
|
1355
1346
|
]
|
|
@@ -1358,7 +1349,7 @@ var SolidColorPicker = (props) => {
|
|
|
1358
1349
|
label: "HSB",
|
|
1359
1350
|
className: "es:mt-3",
|
|
1360
1351
|
children: [
|
|
1361
|
-
jsx($
|
|
1352
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1362
1353
|
value: color?.toFormat(allowTransparency ? "hsba" : "hsb"),
|
|
1363
1354
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1364
1355
|
channel: "hue",
|
|
@@ -1370,10 +1361,10 @@ var SolidColorPicker = (props) => {
|
|
|
1370
1361
|
}),
|
|
1371
1362
|
label: __("Hue", "eightshift-ui-components"),
|
|
1372
1363
|
inline: true,
|
|
1373
|
-
children: jsx($
|
|
1364
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1374
1365
|
})
|
|
1375
1366
|
}),
|
|
1376
|
-
jsx($
|
|
1367
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1377
1368
|
value: color?.toFormat(allowTransparency ? "hsba" : "hsb"),
|
|
1378
1369
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1379
1370
|
channel: "saturation",
|
|
@@ -1385,10 +1376,10 @@ var SolidColorPicker = (props) => {
|
|
|
1385
1376
|
}),
|
|
1386
1377
|
label: __("Saturation", "eightshift-ui-components"),
|
|
1387
1378
|
inline: true,
|
|
1388
|
-
children: jsx($
|
|
1379
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1389
1380
|
})
|
|
1390
1381
|
}),
|
|
1391
|
-
jsx($
|
|
1382
|
+
jsx($baf01eb6a6ce4d91$export$b865d4358897bb17, {
|
|
1392
1383
|
value: color?.toFormat(allowTransparency ? "hsba" : "hsb"),
|
|
1393
1384
|
onChange: (color) => handleChange(color?.toFormat("hsl")),
|
|
1394
1385
|
channel: "brightness",
|
|
@@ -1400,7 +1391,7 @@ var SolidColorPicker = (props) => {
|
|
|
1400
1391
|
}),
|
|
1401
1392
|
label: __("Brightness", "eightshift-ui-components"),
|
|
1402
1393
|
inline: true,
|
|
1403
|
-
children: jsx($
|
|
1394
|
+
children: jsx($41fb335299a4a39e$export$f5b8910cec6cf069, { className: valueInputClassName })
|
|
1404
1395
|
})
|
|
1405
1396
|
})
|
|
1406
1397
|
]
|