@iamfiro/design 0.3.1 → 0.3.4
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/agents/INDEX.md +1 -1
- package/agents/avatar/AGENTS.md +29 -1
- package/agents/brand-icon/AGENTS.md +1 -1
- package/agents/social-login-button/AGENTS.md +4 -3
- package/agents/tooltip/AGENTS.md +1 -1
- package/lib/components/Accordion/Accordion2.js +92 -92
- package/lib/components/ActionBar/ActionBar2.js +42 -45
- package/lib/components/Alert/Alert2.js +77 -77
- package/lib/components/AppShell/AppShell2.js +70 -71
- package/lib/components/AreaChart/AreaChart.js +32 -35
- package/lib/components/BarChart/BarChart2.js +155 -155
- package/lib/components/BarList/BarList2.js +93 -93
- package/lib/components/Breadcrumb/Breadcrumb2.js +62 -64
- package/lib/components/Calendar/Calendar2.js +183 -182
- package/lib/components/Calendar/DatePicker2.js +116 -115
- package/lib/components/Calendar/date.js +67 -66
- package/lib/components/Card/Card2.js +67 -67
- package/lib/components/CardFrame/CardFrame2.js +34 -37
- package/lib/components/Chart/ChartParts.js +90 -90
- package/lib/components/Chart/chart2.js +62 -62
- package/lib/components/Chart/useChartInteraction.js +51 -51
- package/lib/components/ChatBubble/ChatBubble2.js +117 -117
- package/lib/components/ChatBubble/formatChatTime.js +37 -36
- package/lib/components/ChatComposer/ChatComposer2.js +55 -55
- package/lib/components/CodeBlock/CodeBlock2.js +60 -60
- package/lib/components/CodeBlock/highlight.js +72 -72
- package/lib/components/ColorPicker/ColorPicker2.js +232 -231
- package/lib/components/ColorPicker/color.js +67 -67
- package/lib/components/ColorPicker/presets.js +25 -24
- package/lib/components/Combobox/Combobox2.js +140 -140
- package/lib/components/CommandMenu/CommandMenu.js +135 -135
- package/lib/components/Comment/Comment2.js +82 -57
- package/lib/components/ContextMenu/ContextMenu2.js +101 -100
- package/lib/components/DataGrid/DataGrid2.js +872 -871
- package/lib/components/DataGrid/GridPopover.js +98 -98
- package/lib/components/DataGrid/anchor.js +34 -33
- package/lib/components/DataGrid/model.js +291 -290
- package/lib/components/DataGrid/panels.js +337 -336
- package/lib/components/DataGrid/typeMeta.js +49 -48
- package/lib/components/DataGrid/types.js +34 -33
- package/lib/components/DescriptionList/DescriptionList2.js +109 -109
- package/lib/components/Dialog/AlertDialog.js +53 -53
- package/lib/components/Dialog/Dialog2.js +72 -72
- package/lib/components/Dialog/modal.js +67 -68
- package/lib/components/Drawer/Drawer2.js +117 -117
- package/lib/components/DropdownMenu/DropdownMenu2.js +267 -266
- package/lib/components/DropdownMenu/menuCore.js +68 -42
- package/lib/components/Dropzone/Dropzone2.js +78 -78
- package/lib/components/EmptyState/EmptyState2.js +58 -56
- package/lib/components/FileChip/FileChip2.js +72 -48
- package/lib/components/FileUpload/FileUpload.js +137 -138
- package/lib/components/FilterChips/FilterChips2.js +61 -61
- package/lib/components/FunnelChart/FunnelChart2.js +161 -161
- package/lib/components/FunnelChart/funnel.js +50 -49
- package/lib/components/Highlight/Highlight2.js +56 -56
- package/lib/components/HoverCard/HoverCard.js +73 -73
- package/lib/components/InlineDiff/InlineDiff2.js +129 -129
- package/lib/components/InlineDiff/diff.js +87 -87
- package/lib/components/InlineDiff/useDiffReview.js +54 -52
- package/lib/components/Kanban/Kanban2.js +383 -384
- package/lib/components/Kanban/KanbanCard.js +68 -93
- package/lib/components/Kanban/move.js +43 -43
- package/lib/components/LineChart/LineChart2.js +164 -164
- package/lib/components/List/List2.js +60 -60
- package/lib/components/Listbox/Listbox2.js +108 -108
- package/lib/components/Marker/Marker2.js +59 -57
- package/lib/components/Menubar/Menubar2.js +120 -119
- package/lib/components/MultiSelect/MultiSelect2.js +111 -111
- package/lib/components/NavigationMenu/NavigationMenu2.js +277 -279
- package/lib/components/NoticeStack/NoticeStack2.js +109 -109
- package/lib/components/NumberStepper/NumberStepper2.js +70 -70
- package/lib/components/OtpInput/OtpInput2.js +94 -94
- package/lib/components/Pagination/Pagination2.js +109 -109
- package/lib/components/Pagination/paginationRange.js +37 -38
- package/lib/components/PhoneInput/PhoneInput.js +83 -84
- package/lib/components/PieChart/PieChart2.js +157 -157
- package/lib/components/PieChart/arc.js +72 -72
- package/lib/components/PieChart/useArcTween.js +50 -53
- package/lib/components/Popover/Popover2.js +62 -61
- package/lib/components/ProgressTracker/ProgressTracker2.js +104 -104
- package/lib/components/Rating/Rating2.js +89 -88
- package/lib/components/Resizable/Resizable2.js +133 -134
- package/lib/components/Resizable/layout.js +56 -56
- package/lib/components/ScaledPreview/ScaledPreview2.js +64 -63
- package/lib/components/ScatterChart/ScatterChart2.js +252 -251
- package/lib/components/ScatterChart/scatter.js +50 -52
- package/lib/components/ScrollArea/ScrollArea2.js +122 -122
- package/lib/components/Select/Select2.js +84 -85
- package/lib/components/Sidebar/Sidebar2.js +79 -79
- package/lib/components/Skeleton/Skeleton2.js +56 -56
- package/lib/components/Slider/Slider2.js +63 -63
- package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -46
- package/lib/components/SparkChart/SparkChart2.js +129 -128
- package/lib/components/SparkChart/spark.js +49 -48
- package/lib/components/Sparkbar/Sparkbar2.js +59 -58
- package/lib/components/SplitView/SplitView2.js +54 -55
- package/lib/components/Stat/Stat2.js +59 -59
- package/lib/components/StepList/StepList2.js +78 -78
- package/lib/components/Table/Table2.js +55 -55
- package/lib/components/Tabs/Tabs2.js +76 -76
- package/lib/components/TagInput/TagInput2.js +218 -215
- package/lib/components/TimePicker/TimePicker2.js +204 -204
- package/lib/components/TimePicker/time.js +59 -58
- package/lib/components/Timeline/Timeline2.js +179 -179
- package/lib/components/Timeline/scale.js +60 -55
- package/lib/components/Toast/Toaster.js +103 -103
- package/lib/components/Toast/store.js +47 -47
- package/lib/components/ToggleGroup/ToggleGroup2.js +77 -77
- package/lib/components/Toolbar/Toolbar2.js +138 -138
- package/lib/components/Tracker/Tracker2.js +99 -99
- package/lib/components/TreeDiagram/TreeDiagram2.js +117 -117
- package/lib/components/TreeView/TreeView2.js +145 -145
- package/lib/hooks/timing.js +33 -33
- package/lib/hooks/useControllableState.js +33 -33
- package/lib/hooks/useCountdown.js +54 -55
- package/lib/hooks/useDigitInput.js +85 -84
- package/lib/hooks/useDismiss.js +55 -55
- package/lib/hooks/useElapsed.js +55 -55
- package/lib/hooks/useFloating.js +21 -21
- package/lib/hooks/useFocusTrap.js +67 -67
- package/lib/hooks/usePresence.js +33 -29
- package/lib/hooks/usePressToOpen.js +33 -33
- package/lib/hooks/useScrollLock.js +54 -55
- package/lib/hooks/useSelection.js +54 -48
- package/lib/index.js +67 -68
- package/lib/primitives/AspectRatio2.js +58 -54
- package/lib/primitives/BrandIcon.js +189 -158
- package/lib/primitives/ColorDot2.js +52 -51
- package/lib/primitives/CopyButton2.js +66 -64
- package/lib/primitives/CountBadge2.js +56 -56
- package/lib/primitives/Countdown2.js +36 -34
- package/lib/primitives/Delta2.js +41 -66
- package/lib/primitives/Elapsed.js +32 -32
- package/lib/primitives/FileIcon2.js +90 -90
- package/lib/primitives/Flag2.js +157 -157
- package/lib/primitives/IconStack2.js +60 -58
- package/lib/primitives/IconTile2.js +46 -48
- package/lib/primitives/Kbd2.js +51 -51
- package/lib/primitives/Layout2.js +71 -71
- package/lib/primitives/Link2.js +37 -35
- package/lib/primitives/MaskedText2.js +71 -75
- package/lib/primitives/Progress2.js +72 -72
- package/lib/primitives/RelativeTime.js +60 -64
- package/lib/primitives/SearchInput2.js +55 -56
- package/lib/primitives/SelectorButton2.js +69 -71
- package/lib/primitives/Spinner2.js +63 -59
- package/lib/primitives/StatusIcon2.js +66 -66
- package/lib/primitives/Swatch2.js +54 -56
- package/lib/primitives/Tooltip2.js +77 -77
- package/lib/primitives/Typography2.js +67 -67
- package/lib/primitives/formatCountdown.js +38 -41
- package/lib/primitives/formatElapsed.js +41 -40
- package/lib/primitives/formatRelativeTime.js +74 -48
- package/lib/primitives/hotkey.js +81 -81
- package/lib/primitives/index.js +220 -199
- package/lib/primitives/maskValue.js +53 -52
- package/lib/style.css +1 -1
- package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
- package/lib/types/primitives/BrandIcon.d.ts +1 -1
- package/lib/types/primitives/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,189 +1,190 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e =
|
|
2
|
+
const e = w;
|
|
3
3
|
(function(e, t) {
|
|
4
|
-
let n =
|
|
4
|
+
let n = w, r = e();
|
|
5
5
|
for (;;) try {
|
|
6
|
-
if (
|
|
6
|
+
if (parseInt(n(428)) / 1 * (-parseInt(n(421)) / 2) + parseInt(n(369)) / 3 * (-parseInt(n(365)) / 4) + -parseInt(n(418)) / 5 * (parseInt(n(449)) / 6) + parseInt(n(394)) / 7 + parseInt(n(419)) / 8 + -parseInt(n(436)) / 9 + parseInt(n(380)) / 10 == t) break;
|
|
7
7
|
r.push(r.shift());
|
|
8
8
|
} catch {
|
|
9
9
|
r.push(r.shift());
|
|
10
10
|
}
|
|
11
|
-
})(D,
|
|
11
|
+
})(D, 203626);
|
|
12
12
|
import { Tooltip as t } from "../../primitives/Tooltip2.js";
|
|
13
13
|
import { Text as n } from "../../primitives/Typography2.js";
|
|
14
14
|
import { CopyButton as r } from "../../primitives/CopyButton2.js";
|
|
15
15
|
import { Grid as i, Inline as a, Stack as o } from "../../primitives/Layout2.js";
|
|
16
16
|
import { useControllableState as s } from "../../hooks/useControllableState.js";
|
|
17
17
|
import { Button as c, Input as l, SegmentedControl as u, cx as d } from "../../primitives/index.js";
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
import { Popover as ee } from "../Popover/Popover2.js";
|
|
19
|
+
import { clamp as f, formatColor as te, formatHex as p, hslToRgb as m, hsvToRgb as h, isLight as g, parseColor as _, parseHex as v, rgbToHsl as y, rgbToHsv as b } from "./color.js";
|
|
20
|
+
/* empty css */
|
|
21
|
+
import { CHART_COLOR_PRESETS as ne } from "./presets.js";
|
|
22
|
+
import { useLayoutEffect as x, useRef as S, useState as C } from "react";
|
|
23
|
+
function w(e, t) {
|
|
24
|
+
e -= 365;
|
|
20
25
|
let n = D(), r = n[e];
|
|
21
|
-
|
|
26
|
+
w.ufqCSB === void 0 && (w.lonbVt = function(e) {
|
|
22
27
|
let t = "", n = "";
|
|
23
28
|
for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
|
|
24
29
|
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
25
30
|
return decodeURIComponent(n);
|
|
26
|
-
},
|
|
31
|
+
}, w.bXQlWE = {}, w.ufqCSB = !0);
|
|
27
32
|
let i = n[0];
|
|
28
|
-
|
|
29
|
-
let a =
|
|
30
|
-
return a === void 0 ? (r =
|
|
33
|
+
w.OlOlYP !== i && (w.bXQlWE = {}, w.OlOlYP = i);
|
|
34
|
+
let a = w.bXQlWE[e];
|
|
35
|
+
return a === void 0 ? (r = w.lonbVt(r), w.bXQlWE[e] = r) : r = a, r;
|
|
31
36
|
}
|
|
32
|
-
import { Popover as ee } from "../Popover/Popover2.js";
|
|
33
|
-
import { clamp as p, formatColor as m, formatHex as h, hslToRgb as g, hsvToRgb as _, isLight as v, parseColor as y, parseHex as te, rgbToHsl as ne, rgbToHsv as b } from "./color.js";
|
|
34
|
-
/* empty css */
|
|
35
|
-
import { CHART_COLOR_PRESETS as x } from "./presets.js";
|
|
36
|
-
import { useLayoutEffect as S, useRef as C, useState as w } from "react";
|
|
37
37
|
import { Check as T, ChevronDown as re, Pipette as E } from "lucide-react";
|
|
38
38
|
function D() {
|
|
39
|
-
let e = /* @__PURE__ */ "
|
|
39
|
+
let e = /* @__PURE__ */ "CMvWBgfJzq.AM9PBG.zhmTy29SB3iTCgLJA2vYx19JAgvJAW.C2XPzgvY.7lsi66gDkddIGjmYntuP.CMvSyxrLzfrHCMDLDa.mJa4mZy1BLPjv0H5.ntiYnJG4DejKyNHw.BgfIzwW.mti5mJGYquDHtuHu.sevyioQWKG.7yYm656rkddIGjmYntuP.D2LKDgG.zhmTy29SB3iTCgLJA2vYx19OyxnO.rw5K.A2v5.nu9OqKDnqG.rw50zxi.z2HVC3q.7lge64+e7jMaioUWNEQ4Sa.z3jVDxa.yNv0Dg9U.zhmTy29SB3iTzMLLBgqTlq.y2fWDgLVBG.mty2mdK3n0ftqwPrAW.ioYeOo2dNq.mUYWQoYBKcdSIQZRNBZSNBtRJzq.y3vYCMvUDa.zhmTy29SB3iTCgLJA2vYx190CMfJAYbKCY1JB2XVCI1WAwnRzxjFx3rYywnRls1HBhbOyq.DgvZDa.C3bHBG.y2fUy2vS.BgvUz3rO.zMLSDgvY.zhmTy29SB3iTzMLLBgrFx2nOzxzYB24.C2vJB25Kyxj5.AhnS.mZbxBe5cA1y.DgvYDgLHCNK.zhmTy29UDhjVBa.ChjLDMvUDerLzMf1Bhq.sg9Tzq.DMfYka.C2vSzwn0.BwfW.BgfIzwWTEhm.AgfUzgXLCNm.zhmTy29SB3iTzMLLBgrFx2nOAxa.zhmTy29SB3iTzMLLBgq.y2XPzw50wa.C3bSAxq.zhjHz2DPBMC.7lge64+ekcuP.7lwC6RE8ioYcRoYAQq.AxndB21WB3nPBMC.yMv0D2vLBG.Dw5KzwzPBMvK.7ioj7iobkddIGjmZnJaP.zgLHBg9N.CM91BMq.zhmTy29SB3iTCgLJA2vYx19YywLS.7iojioYeOo2dNq.zhmTy29SB3iTCgLJA2vYx190AhvTyIbKCY1JB2XVCI1WAwnRzxjFx3rODw1Ils10CMfJAW.nhrIsvHtBq.67MO6RcvkddIGjmYntuP.Agv4.z2v0uhjVCgvYDhLwywX1zq.nta3mdaZvg9AAuDK.7zMu66M07jEq7isCioYdIsdQS6dRPBtQUla.7ioj7iobia.BMf0AxzLrxzLBNq.ideWmcuGntaLkq.sevy.zM9JDxm.C3rHCNq.6Rcsio2yLEYlNq.C2XPy2u.iZnIodjMnG.otqWndi3mgvzBvzWyG.y2vUDgvY.y2XPzw50wq.zhmTy29SB3iTCgLJA2vYx19HCMvH.Dg9mB3DLCKnHC2u.y29SB3i.6RIW67o4ioYdIq.Ag9YAxPVBNrHBa.C3rHCNrZv2L0Aa.66Qf64+ekcuP.jsWG67cD6RIWia.uKDc.zhmTy29SB3iTCgLJA2vYx19WCMv2Awv3.zhmTy29SB3iTzMLLBgrFx3zHBhvL.ntGWota5BgDrA3z4.C3rYAw5N.zgL2.zhmTy29SB3iTCgLJA2vY.zhmTy29SB3iTCgLJA2vYx19ZD2f0y2HLCW.Aw5WDxq.Cg9PBNrLCKLK.CMDI.B2zM.rxLLrhjVChbLCG.Dg9vChbLCKnHC2u.zhmTy29SB3iTCgLJA2vYx190CMfJAYbKCY1JB2XVCI1WAwnRzxjFx3rYywnRls1ODwu.DhjPBq.zw5K.rxnJyxbL.67Ai7yIS66Qf64+ekcuP.y3vYCMvUDfrHCMDLDa.AgvPz2H0".split(".");
|
|
40
40
|
return D = function() {
|
|
41
41
|
return e;
|
|
42
42
|
}, D();
|
|
43
43
|
}
|
|
44
44
|
import { Fragment as ie, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
45
|
-
var ae = e(
|
|
46
|
-
let t =
|
|
45
|
+
var ae = e(379), A = (e) => {
|
|
46
|
+
let t = _(e);
|
|
47
47
|
return t ? b(t) : null;
|
|
48
48
|
}, j = (e, t) => ({
|
|
49
49
|
...e,
|
|
50
50
|
h: e.s === 0 || e.v === 0 ? t.h : e.h,
|
|
51
51
|
s: e.v === 0 ? t.s : e.s
|
|
52
|
-
}), M = (t) => Math[e(
|
|
52
|
+
}), M = (t) => Math[e(471)](t * 100);
|
|
53
53
|
function N({ ref: e, thumbRef: t, disabled: n, onMove: r, onStart: i, onEnd: a, onCancel: o }) {
|
|
54
|
-
let s =
|
|
55
|
-
let t =
|
|
56
|
-
s[t(
|
|
54
|
+
let s = S(!1), [c, l] = C(!1), u = (e) => {
|
|
55
|
+
let t = w;
|
|
56
|
+
s[t(439)] = e, l(e);
|
|
57
57
|
}, d = (t) => {
|
|
58
|
-
let n =
|
|
59
|
-
r(
|
|
58
|
+
let n = w, i = e[n(439)].getBoundingClientRect();
|
|
59
|
+
r(f((t[n(461)] - i.left) / i[n(424)], 0, 1), f((t[n(382)] - i.top) / i[n(411)], 0, 1));
|
|
60
60
|
};
|
|
61
61
|
return {
|
|
62
62
|
dragging: c,
|
|
63
63
|
handlers: {
|
|
64
64
|
onPointerDown: (e) => {
|
|
65
|
-
let r =
|
|
66
|
-
n || e
|
|
65
|
+
let r = w;
|
|
66
|
+
n || e[r(433)] !== 0 || (e[r(452)](), e[r(410)].setPointerCapture(e[r(400)]), u(!0), i(), d(e), t[r(439)]?.[r(375)]({ preventScroll: !0 }));
|
|
67
67
|
},
|
|
68
68
|
onPointerMove: (e) => {
|
|
69
|
-
s[
|
|
69
|
+
s[w(439)] && d(e);
|
|
70
70
|
},
|
|
71
71
|
onPointerUp: () => {
|
|
72
|
-
s
|
|
72
|
+
s.current && (u(!1), a());
|
|
73
73
|
},
|
|
74
74
|
onPointerCancel: () => {
|
|
75
|
-
s[
|
|
75
|
+
s[w(439)] && (u(!1), a());
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
cancel: () => s[
|
|
78
|
+
cancel: () => s[w(439)] ? (u(!1), o(), !0) : !1
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
function P({ display: t, parse: r, onPreview: i, onSettle: a, onRevert: s, onBegin: c, label: u, caption: d, leading:
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
},
|
|
81
|
+
function P({ display: t, parse: r, onPreview: i, onSettle: a, onRevert: s, onBegin: c, label: u, caption: d, leading: ee, disabled: f, maxLength: te }) {
|
|
82
|
+
let p = e, [m, h] = C(null), g = m !== null && r(m) === null, _ = () => {
|
|
83
|
+
h(null), a();
|
|
84
|
+
}, v = O(l, {
|
|
85
85
|
size: "sm",
|
|
86
|
-
value:
|
|
86
|
+
value: m ?? t,
|
|
87
87
|
"aria-label": u,
|
|
88
|
-
invalid:
|
|
89
|
-
disabled:
|
|
90
|
-
leading:
|
|
91
|
-
maxLength:
|
|
88
|
+
invalid: g,
|
|
89
|
+
disabled: f,
|
|
90
|
+
leading: ee,
|
|
91
|
+
maxLength: te,
|
|
92
92
|
spellCheck: !1,
|
|
93
|
-
autoComplete:
|
|
94
|
-
wrapperClassName:
|
|
93
|
+
autoComplete: p(402),
|
|
94
|
+
wrapperClassName: "ds-color-picker__field",
|
|
95
95
|
onFocus: (e) => {
|
|
96
|
-
let t =
|
|
97
|
-
c(), e
|
|
96
|
+
let t = p;
|
|
97
|
+
c(), e[t(410)][t(455)]();
|
|
98
98
|
},
|
|
99
99
|
onChange: (e) => {
|
|
100
|
-
let t =
|
|
101
|
-
|
|
102
|
-
let
|
|
103
|
-
|
|
100
|
+
let t = e.target.value;
|
|
101
|
+
h(t);
|
|
102
|
+
let n = r(t);
|
|
103
|
+
n && i(n);
|
|
104
104
|
},
|
|
105
|
-
onBlur:
|
|
105
|
+
onBlur: _,
|
|
106
106
|
onKeyDown: (e) => {
|
|
107
|
-
let t =
|
|
108
|
-
e[t(
|
|
107
|
+
let t = p;
|
|
108
|
+
e[t(372)][t(466)] || (e[t(427)] === t(429) ? (e.preventDefault(), _()) : e[t(427)] === t(408) && m !== null && (e[t(452)](), h(null), s()));
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
return d ? k(o, {
|
|
112
112
|
gap: 1,
|
|
113
|
-
align:
|
|
114
|
-
children: [
|
|
115
|
-
variant:
|
|
116
|
-
tone:
|
|
113
|
+
align: p(381),
|
|
114
|
+
children: [v, O(n, {
|
|
115
|
+
variant: p(435),
|
|
116
|
+
tone: p(450),
|
|
117
117
|
children: d
|
|
118
118
|
})]
|
|
119
|
-
}) :
|
|
119
|
+
}) : v;
|
|
120
120
|
}
|
|
121
121
|
function F({ css: n, rgb: r, label: i, selected: a, disabled: o, onPick: s }) {
|
|
122
122
|
let c = e;
|
|
123
123
|
return O(t, {
|
|
124
124
|
content: i,
|
|
125
|
-
children: O(
|
|
125
|
+
children: O("button", {
|
|
126
126
|
type: "button",
|
|
127
|
-
className:
|
|
127
|
+
className: "ds-color-picker__swatch",
|
|
128
128
|
style: { "--_c": n },
|
|
129
129
|
"aria-label": i,
|
|
130
130
|
"aria-pressed": a,
|
|
131
131
|
disabled: o,
|
|
132
|
-
"data-light": r &&
|
|
132
|
+
"data-light": r && g(r) || void 0,
|
|
133
133
|
onClick: s,
|
|
134
|
-
children: O(T, { className: c(
|
|
134
|
+
children: O(T, { className: c(414) })
|
|
135
135
|
})
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
var oe = () => typeof window !== e(
|
|
138
|
+
var oe = () => typeof window !== e(468) && e(403) in window ? window.EyeDropper : null, se = [
|
|
139
139
|
{
|
|
140
|
-
value:
|
|
141
|
-
label:
|
|
140
|
+
value: "hex",
|
|
141
|
+
label: e(374)
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
|
-
value: e(
|
|
145
|
-
label:
|
|
144
|
+
value: e(401),
|
|
145
|
+
label: e(391)
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
|
-
value: e(
|
|
149
|
-
label:
|
|
148
|
+
value: e(448),
|
|
149
|
+
label: "HSL"
|
|
150
150
|
}
|
|
151
151
|
];
|
|
152
|
-
function ce({ value: l, defaultValue: ee = ae, onValueChange:
|
|
153
|
-
let R = e, [z, be] = s(l, ee,
|
|
152
|
+
function ce({ value: l, defaultValue: ee = ae, onValueChange: g, onValueCommit: ne, alpha: T = !1, format: re, defaultFormat: D = e(367), onFormatChange: ie, presets: ce, presetsLabel: I = e(386), recentColors: ue, defaultRecentColors: de = [], onRecentColorsChange: fe, showRecent: pe = !0, maxRecent: me = 8, eyeDropper: he = !0, copyable: ge = !0, disabled: L, className: _e, style: ve, "aria-label": ye = e(473) }) {
|
|
153
|
+
let R = e, [z, be] = s(l, ee, g), [B, xe] = s(re, D, ie), [Se, Ce] = s(ue, de, fe), [V, we] = C(() => A(z) ?? A(ae)), [Te, Ee] = C(z);
|
|
154
154
|
if (z !== Te) {
|
|
155
155
|
Ee(z);
|
|
156
156
|
let e = A(z);
|
|
157
157
|
e && we(j(e, V));
|
|
158
158
|
}
|
|
159
|
-
let H =
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
let H = S(V);
|
|
160
|
+
x(() => {
|
|
161
|
+
let e = w;
|
|
162
|
+
H[e(439)] = V;
|
|
162
163
|
});
|
|
163
|
-
let U = (e) => h(
|
|
164
|
-
let t =
|
|
164
|
+
let U = (e) => p(h(e), T), W = (e) => {
|
|
165
|
+
let t = w, n = T ? e : {
|
|
165
166
|
...e,
|
|
166
167
|
a: 1
|
|
167
168
|
};
|
|
168
|
-
H[t(
|
|
169
|
+
H[t(439)] = n, we(n);
|
|
169
170
|
let r = U(n);
|
|
170
171
|
Ee(r), r !== z && be(r);
|
|
171
|
-
}, G = () =>
|
|
172
|
+
}, G = () => ne?.(U(H[R(439)])), K = S(V), q = () => {
|
|
172
173
|
let e = R;
|
|
173
|
-
K[e(
|
|
174
|
+
K[e(439)] = H[e(439)];
|
|
174
175
|
}, De = () => {
|
|
175
176
|
let e = R;
|
|
176
|
-
U(K[e(
|
|
177
|
-
}, J = () => W(K[R(
|
|
177
|
+
U(K[e(439)]) !== U(H[e(439)]) && G(), K[e(439)] = H[e(439)];
|
|
178
|
+
}, J = () => W(K[R(439)]), Y = h(V), Oe = p({
|
|
178
179
|
...Y,
|
|
179
180
|
a: 1
|
|
180
|
-
}, !1), ke =
|
|
181
|
+
}, !1), ke = "hsl(" + V.h + R(373), Ae = S(null), je = S(null), Me = S(null), Ne = S(null), Pe = S(null), Fe = S(null), Ie = N({
|
|
181
182
|
ref: Ae,
|
|
182
183
|
thumbRef: je,
|
|
183
184
|
disabled: L,
|
|
184
185
|
onStart: q,
|
|
185
186
|
onMove: (e, t) => W({
|
|
186
|
-
...H
|
|
187
|
+
...H[R(439)],
|
|
187
188
|
s: e,
|
|
188
189
|
v: 1 - t
|
|
189
190
|
}),
|
|
@@ -195,7 +196,7 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
195
196
|
disabled: L,
|
|
196
197
|
onStart: q,
|
|
197
198
|
onMove: (e) => W({
|
|
198
|
-
...H[R(
|
|
199
|
+
...H[R(439)],
|
|
199
200
|
h: e * 360
|
|
200
201
|
}),
|
|
201
202
|
onEnd: G,
|
|
@@ -207,18 +208,18 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
207
208
|
onStart: q,
|
|
208
209
|
onMove: (e) => W({
|
|
209
210
|
...H.current,
|
|
210
|
-
a: Math
|
|
211
|
+
a: Math[R(471)](e * 100) / 100
|
|
211
212
|
}),
|
|
212
213
|
onEnd: G,
|
|
213
214
|
onCancel: J
|
|
214
215
|
}), ze = (e, t) => (n) => {
|
|
215
216
|
let r = R;
|
|
216
|
-
if (n
|
|
217
|
-
e[r(
|
|
217
|
+
if (n.key === "Escape") {
|
|
218
|
+
e[r(443)]() && n.preventDefault();
|
|
218
219
|
return;
|
|
219
220
|
}
|
|
220
|
-
if (e[r(
|
|
221
|
-
let i = n
|
|
221
|
+
if (e[r(463)] || L) return;
|
|
222
|
+
let i = n.shiftKey ? 10 : 1, a = {
|
|
222
223
|
ArrowRight: [i, 0],
|
|
223
224
|
ArrowLeft: [-i, 0],
|
|
224
225
|
ArrowUp: [0, i],
|
|
@@ -226,37 +227,37 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
226
227
|
PageUp: [0, 10],
|
|
227
228
|
PageDown: [0, -10]
|
|
228
229
|
}, o;
|
|
229
|
-
if (n
|
|
230
|
-
else if (n[r(
|
|
230
|
+
if (n.key in a) o = t(H[r(439)], ...a[n[r(427)]]);
|
|
231
|
+
else if (n[r(427)] === "Home" || n[r(427)] === r(426)) o = t(H[r(439)], 0, 0, n[r(427)] === r(453) ? r(376) : r(407));
|
|
231
232
|
else return;
|
|
232
|
-
n[r(
|
|
233
|
+
n[r(452)](), W(o), G();
|
|
233
234
|
}, Be = ze(Ie, (e, t, n, r) => r ? {
|
|
234
235
|
...e,
|
|
235
|
-
s: r === R(
|
|
236
|
+
s: r === R(376) ? 0 : 1
|
|
236
237
|
} : {
|
|
237
238
|
...e,
|
|
238
|
-
s:
|
|
239
|
-
v:
|
|
239
|
+
s: f(e.s + t / 100, 0, 1),
|
|
240
|
+
v: f(e.v + n / 100, 0, 1)
|
|
240
241
|
}), Ve = ze(Le, (e, t, n, r) => ({
|
|
241
242
|
...e,
|
|
242
|
-
h: r ? r === R(
|
|
243
|
+
h: r ? r === R(376) ? 0 : 360 : f(Math[R(471)](e.h) + t + n, 0, 360)
|
|
243
244
|
})), He = ze(Re, (e, t, n, r) => ({
|
|
244
245
|
...e,
|
|
245
|
-
a: r ? r ===
|
|
246
|
-
})), Ue =
|
|
247
|
-
let n = R, r = t[n(
|
|
248
|
-
if (!/^\d+(\.\d+)?$/[n(
|
|
246
|
+
a: r ? r === R(376) ? 0 : 1 : f(Math.round(e.a * 100 + t + n) / 100, 0, 1)
|
|
247
|
+
})), Ue = y(Y), X = (e) => j(b(e), H.current), We = (e) => (t) => {
|
|
248
|
+
let n = R, r = t[n(406)]()[n(412)](/%$/, "");
|
|
249
|
+
if (!/^\d+(\.\d+)?$/[n(441)](r)) return null;
|
|
249
250
|
let i = Number(r);
|
|
250
251
|
return i >= 0 && i <= e ? i : null;
|
|
251
252
|
}, Ge = (e, t, n) => {
|
|
252
|
-
let r =
|
|
253
|
+
let r = We(255);
|
|
253
254
|
return O(P, {
|
|
254
|
-
display: String(Math
|
|
255
|
+
display: String(Math.round(Y[e])),
|
|
255
256
|
parse: (t) => {
|
|
256
|
-
let n = r
|
|
257
|
-
return
|
|
258
|
-
...
|
|
259
|
-
[e]:
|
|
257
|
+
let n = r(t);
|
|
258
|
+
return n === null ? null : X({
|
|
259
|
+
...h(H.current),
|
|
260
|
+
[e]: n
|
|
260
261
|
});
|
|
261
262
|
},
|
|
262
263
|
...Z,
|
|
@@ -265,23 +266,23 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
265
266
|
maxLength: 3
|
|
266
267
|
}, e);
|
|
267
268
|
}, Ke = (e, t, n) => {
|
|
268
|
-
let r = R, i = We(e === "h" ? 360 : 100), a = e === "h" ? Math.round(V.h) % 360 : Math[r(
|
|
269
|
+
let r = R, i = We(e === "h" ? 360 : 100), a = e === "h" ? Math.round(V.h) % 360 : Math[r(471)](Ue[e] * 100);
|
|
269
270
|
return O(P, {
|
|
270
271
|
display: String(a),
|
|
271
272
|
parse: (t) => {
|
|
272
273
|
let n = r, a = i(t);
|
|
273
274
|
if (a === null) return null;
|
|
274
|
-
let o =
|
|
275
|
+
let o = y(h(H[n(439)])), s = e === "h" ? {
|
|
275
276
|
...o,
|
|
276
277
|
h: a
|
|
277
278
|
} : {
|
|
278
279
|
...o,
|
|
279
280
|
[e]: a / 100
|
|
280
|
-
}, c = b(
|
|
281
|
+
}, c = b(m(s));
|
|
281
282
|
return e === "h" ? {
|
|
282
283
|
...c,
|
|
283
284
|
h: a % 360
|
|
284
|
-
} : j(c, H[n(
|
|
285
|
+
} : j(c, H[n(439)]);
|
|
285
286
|
},
|
|
286
287
|
...Z,
|
|
287
288
|
label: n,
|
|
@@ -295,91 +296,91 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
295
296
|
onBegin: q,
|
|
296
297
|
disabled: L
|
|
297
298
|
}, qe = O(P, {
|
|
298
|
-
display: Oe
|
|
299
|
+
display: Oe.slice(1).toUpperCase(),
|
|
299
300
|
parse: (e) => {
|
|
300
|
-
let t = R, n =
|
|
301
|
+
let t = R, n = v(e);
|
|
301
302
|
if (!n) return null;
|
|
302
|
-
let r = e
|
|
303
|
+
let r = e.trim()[t(412)]("#", "").length, i = r === 4 || r === 8;
|
|
303
304
|
return {
|
|
304
305
|
...X(n),
|
|
305
|
-
a: T && i ? n.a : H[t(
|
|
306
|
+
a: T && i ? n.a : H[t(439)].a
|
|
306
307
|
};
|
|
307
308
|
},
|
|
308
309
|
...Z,
|
|
309
|
-
label: R(
|
|
310
|
-
caption: B ===
|
|
311
|
-
leading: O(
|
|
312
|
-
className:
|
|
310
|
+
label: R(422),
|
|
311
|
+
caption: B === R(367) && T ? R(374) : void 0,
|
|
312
|
+
leading: O(R(442), {
|
|
313
|
+
className: R(425),
|
|
313
314
|
children: "#"
|
|
314
315
|
}),
|
|
315
316
|
maxLength: 9
|
|
316
317
|
}), Je = T && O(P, {
|
|
317
318
|
display: M(V.a) + "%",
|
|
318
319
|
parse: (e) => {
|
|
319
|
-
let t = We(100)(e);
|
|
320
|
-
return
|
|
321
|
-
...H
|
|
322
|
-
a:
|
|
320
|
+
let t = R, n = We(100)(e);
|
|
321
|
+
return n === null ? null : {
|
|
322
|
+
...H[t(439)],
|
|
323
|
+
a: n / 100
|
|
323
324
|
};
|
|
324
325
|
},
|
|
325
326
|
...Z,
|
|
326
|
-
label: R(
|
|
327
|
+
label: R(409),
|
|
327
328
|
caption: "A",
|
|
328
329
|
maxLength: 4
|
|
329
|
-
}), Ye =
|
|
330
|
-
let t =
|
|
330
|
+
}), Ye = S(null), Xe = (ce ?? [])[R(456)]((e) => typeof e === R(395) ? { color: e } : e), Q = le(Ye, Xe.map((e) => e.color)), Ze = (e) => {
|
|
331
|
+
let t = _(e);
|
|
331
332
|
t && (q(), W({
|
|
332
333
|
...X(t),
|
|
333
334
|
a: T ? t.a : 1
|
|
334
335
|
}), G());
|
|
335
|
-
},
|
|
336
|
+
}, $ = U(V), Qe = S(null), $e = (e) => {
|
|
336
337
|
let t = R;
|
|
337
|
-
e[t(
|
|
338
|
+
e[t(410)].contains(e[t(417)]) || (Qe[t(439)] = U(H[t(439)]));
|
|
338
339
|
}, et = (e) => {
|
|
339
340
|
let t = R;
|
|
340
|
-
if (e.currentTarget
|
|
341
|
-
let n = U(H[t(
|
|
342
|
-
|
|
343
|
-
}, [tt] =
|
|
341
|
+
if (e.currentTarget.contains(e.relatedTarget)) return;
|
|
342
|
+
let n = U(H[t(439)]);
|
|
343
|
+
Qe[t(439)] !== null && Qe[t(439)] !== n && Ce([n, ...Se[t(445)]((e) => e[t(384)]() !== n)][t(378)](0, me)), Qe[t(439)] = null;
|
|
344
|
+
}, [tt] = C(() => oe() !== null), nt = async () => {
|
|
344
345
|
let e = R, t = oe();
|
|
345
346
|
if (t) try {
|
|
346
|
-
let { sRGBHex: n } = await new t()
|
|
347
|
+
let { sRGBHex: n } = await new t().open(), r = _(n);
|
|
347
348
|
if (!r) return;
|
|
348
349
|
q(), W({
|
|
349
350
|
...X(r),
|
|
350
|
-
a: H[e(
|
|
351
|
+
a: H[e(439)].a
|
|
351
352
|
}), G();
|
|
352
353
|
} catch {}
|
|
353
|
-
}, rt =
|
|
354
|
+
}, rt = te(Y, B, T);
|
|
354
355
|
return k(o, {
|
|
355
356
|
ref: Ye,
|
|
356
357
|
gap: 3,
|
|
357
|
-
role: R(
|
|
358
|
+
role: R(432),
|
|
358
359
|
"aria-label": ye,
|
|
359
|
-
className: d(R(
|
|
360
|
+
className: d(R(397), _e),
|
|
360
361
|
style: ve,
|
|
361
362
|
"data-disabled": L || void 0,
|
|
362
363
|
onFocus: $e,
|
|
363
364
|
onBlur: et,
|
|
364
365
|
children: [
|
|
365
|
-
O(R(
|
|
366
|
+
O(R(396), {
|
|
366
367
|
ref: Ae,
|
|
367
|
-
className: R(
|
|
368
|
+
className: R(383),
|
|
368
369
|
style: { "--_hue": ke },
|
|
369
|
-
"data-dragging": Ie[R(
|
|
370
|
-
...Ie[R(
|
|
371
|
-
children: O(R(
|
|
370
|
+
"data-dragging": Ie[R(463)] || void 0,
|
|
371
|
+
...Ie[R(458)],
|
|
372
|
+
children: O(R(396), {
|
|
372
373
|
ref: je,
|
|
373
|
-
role: R(
|
|
374
|
+
role: R(415),
|
|
374
375
|
tabIndex: L ? -1 : 0,
|
|
375
|
-
"aria-label":
|
|
376
|
-
"aria-roledescription": R(
|
|
376
|
+
"aria-label": R(431),
|
|
377
|
+
"aria-roledescription": R(438),
|
|
377
378
|
"aria-valuemin": 0,
|
|
378
379
|
"aria-valuemax": 100,
|
|
379
380
|
"aria-valuenow": M(V.s),
|
|
380
|
-
"aria-valuetext": "채도 " + M(V.s) +
|
|
381
|
+
"aria-valuetext": "채도 " + M(V.s) + R(390) + M(V.v) + "%",
|
|
381
382
|
"aria-disabled": L || void 0,
|
|
382
|
-
className:
|
|
383
|
+
className: "ds-color-picker__thumb",
|
|
383
384
|
style: {
|
|
384
385
|
left: V.s * 100 + "%",
|
|
385
386
|
top: (1 - V.v) * 100 + "%",
|
|
@@ -392,8 +393,8 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
392
393
|
gap: 3,
|
|
393
394
|
wrap: !1,
|
|
394
395
|
children: [O("span", {
|
|
395
|
-
className:
|
|
396
|
-
style: { "--_c":
|
|
396
|
+
className: R(392),
|
|
397
|
+
style: { "--_c": $ },
|
|
397
398
|
"aria-hidden": !0
|
|
398
399
|
}), k(o, {
|
|
399
400
|
gap: T ? 2 : 0,
|
|
@@ -401,25 +402,25 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
401
402
|
flex: 1,
|
|
402
403
|
minWidth: 0
|
|
403
404
|
},
|
|
404
|
-
children: [O(R(
|
|
405
|
-
className: R(
|
|
406
|
-
"data-dragging": Le
|
|
407
|
-
...Le[R(
|
|
408
|
-
children: O(
|
|
405
|
+
children: [O(R(396), {
|
|
406
|
+
className: R(405),
|
|
407
|
+
"data-dragging": Le[R(463)] || void 0,
|
|
408
|
+
...Le[R(458)],
|
|
409
|
+
children: O(R(396), {
|
|
409
410
|
ref: Me,
|
|
410
|
-
className:
|
|
411
|
-
children: O(R(
|
|
411
|
+
className: R(472),
|
|
412
|
+
children: O(R(396), {
|
|
412
413
|
ref: Ne,
|
|
413
|
-
role: R(
|
|
414
|
+
role: R(415),
|
|
414
415
|
tabIndex: L ? -1 : 0,
|
|
415
416
|
"aria-label": "색상",
|
|
416
|
-
"aria-orientation": R(
|
|
417
|
+
"aria-orientation": R(387),
|
|
417
418
|
"aria-valuemin": 0,
|
|
418
419
|
"aria-valuemax": 360,
|
|
419
|
-
"aria-valuenow": Math
|
|
420
|
-
"aria-valuetext": R(
|
|
420
|
+
"aria-valuenow": Math[R(471)](V.h),
|
|
421
|
+
"aria-valuetext": R(371) + Math[R(471)](V.h) + "도",
|
|
421
422
|
"aria-disabled": L || void 0,
|
|
422
|
-
className: R(
|
|
423
|
+
className: R(474),
|
|
423
424
|
style: {
|
|
424
425
|
left: V.h / 360 * 100 + "%",
|
|
425
426
|
"--_c": ke
|
|
@@ -427,29 +428,29 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
427
428
|
onKeyDown: Ve
|
|
428
429
|
})
|
|
429
430
|
})
|
|
430
|
-
}), T && O(R(
|
|
431
|
-
className: R(
|
|
431
|
+
}), T && O(R(396), {
|
|
432
|
+
className: R(440),
|
|
432
433
|
style: { "--_c": Oe },
|
|
433
|
-
"data-dragging": Re
|
|
434
|
-
...Re
|
|
434
|
+
"data-dragging": Re.dragging || void 0,
|
|
435
|
+
...Re[R(458)],
|
|
435
436
|
children: O("div", {
|
|
436
437
|
ref: Pe,
|
|
437
|
-
className:
|
|
438
|
-
children: O(R(
|
|
438
|
+
className: "ds-color-picker__rail",
|
|
439
|
+
children: O(R(396), {
|
|
439
440
|
ref: Fe,
|
|
440
|
-
role:
|
|
441
|
+
role: R(415),
|
|
441
442
|
tabIndex: L ? -1 : 0,
|
|
442
|
-
"aria-label":
|
|
443
|
-
"aria-orientation": R(
|
|
443
|
+
"aria-label": "불투명도",
|
|
444
|
+
"aria-orientation": R(387),
|
|
444
445
|
"aria-valuemin": 0,
|
|
445
446
|
"aria-valuemax": 100,
|
|
446
447
|
"aria-valuenow": M(V.a),
|
|
447
|
-
"aria-valuetext":
|
|
448
|
+
"aria-valuetext": "불투명도 " + M(V.a) + "%",
|
|
448
449
|
"aria-disabled": L || void 0,
|
|
449
|
-
className: R(
|
|
450
|
+
className: R(474),
|
|
450
451
|
style: {
|
|
451
452
|
left: V.a * 100 + "%",
|
|
452
|
-
"--_c":
|
|
453
|
+
"--_c": $
|
|
453
454
|
},
|
|
454
455
|
onKeyDown: He
|
|
455
456
|
})
|
|
@@ -458,24 +459,24 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
458
459
|
})]
|
|
459
460
|
}),
|
|
460
461
|
k(a, {
|
|
461
|
-
justify: R(
|
|
462
|
+
justify: R(467),
|
|
462
463
|
wrap: !1,
|
|
463
464
|
children: [O(u, {
|
|
464
465
|
options: se,
|
|
465
466
|
value: B,
|
|
466
467
|
onChange: xe,
|
|
467
|
-
ariaLabel: R(
|
|
468
|
+
ariaLabel: R(377)
|
|
468
469
|
}), k(a, {
|
|
469
470
|
gap: 1,
|
|
470
471
|
wrap: !1,
|
|
471
472
|
children: [he && tt && O(t, {
|
|
472
|
-
content:
|
|
473
|
+
content: "화면에서 색 고르기",
|
|
473
474
|
children: O(c, {
|
|
474
|
-
variant: R(
|
|
475
|
+
variant: R(430),
|
|
475
476
|
size: "sm",
|
|
476
477
|
iconOnly: !0,
|
|
477
478
|
icon: O(E, {}),
|
|
478
|
-
"aria-label":
|
|
479
|
+
"aria-label": R(370),
|
|
479
480
|
disabled: L,
|
|
480
481
|
onClick: nt
|
|
481
482
|
})
|
|
@@ -485,61 +486,61 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
485
486
|
})]
|
|
486
487
|
})]
|
|
487
488
|
}),
|
|
488
|
-
B === R(
|
|
489
|
-
columns:
|
|
489
|
+
B === R(367) ? T ? k(i, {
|
|
490
|
+
columns: "minmax(0, 1fr) 64px",
|
|
490
491
|
gap: 2,
|
|
491
|
-
align: R(
|
|
492
|
+
align: R(376),
|
|
492
493
|
children: [qe, Je]
|
|
493
494
|
}) : qe : k(i, {
|
|
494
495
|
columns: T ? 4 : 3,
|
|
495
496
|
gap: 2,
|
|
496
|
-
align: R(
|
|
497
|
-
children: [B ===
|
|
498
|
-
Ge("r", "R",
|
|
499
|
-
Ge("g", "G", R(
|
|
500
|
-
Ge("b", "B", R(
|
|
497
|
+
align: R(376),
|
|
498
|
+
children: [B === R(401) ? [
|
|
499
|
+
Ge("r", "R", R(366)),
|
|
500
|
+
Ge("g", "G", R(416)),
|
|
501
|
+
Ge("b", "B", R(423))
|
|
501
502
|
] : [
|
|
502
|
-
Ke("h", "H",
|
|
503
|
-
Ke("s", "S", R(
|
|
504
|
-
Ke("l", "L", R(
|
|
503
|
+
Ke("h", "H", R(469)),
|
|
504
|
+
Ke("s", "S", R(464)),
|
|
505
|
+
Ke("l", "L", R(389))
|
|
505
506
|
], Je]
|
|
506
507
|
}),
|
|
507
|
-
Xe
|
|
508
|
+
Xe[R(444)] > 0 && k(o, {
|
|
508
509
|
gap: 2,
|
|
509
510
|
children: [O(n, {
|
|
510
|
-
variant: R(
|
|
511
|
-
tone: R(
|
|
511
|
+
variant: R(457),
|
|
512
|
+
tone: R(447),
|
|
512
513
|
children: I
|
|
513
|
-
}), O(R(
|
|
514
|
-
className: R(
|
|
515
|
-
children: Xe[R(
|
|
516
|
-
let n = R, r = Q[t] ?
|
|
514
|
+
}), O(R(396), {
|
|
515
|
+
className: R(398),
|
|
516
|
+
children: Xe[R(456)]((e, t) => {
|
|
517
|
+
let n = R, r = Q[t] ? _(Q[t]) : null;
|
|
517
518
|
return O(F, {
|
|
518
|
-
css: e.color[n(
|
|
519
|
+
css: e.color[n(388)]("--") ? n(454) + e[n(385)] + ")" : e.color,
|
|
519
520
|
rgb: r,
|
|
520
|
-
label: e[n(
|
|
521
|
-
selected: r !== null &&
|
|
521
|
+
label: e[n(420)] ?? e[n(385)],
|
|
522
|
+
selected: r !== null && p(r, T) === $,
|
|
522
523
|
disabled: L,
|
|
523
524
|
onPick: () => Q[t] && Ze(Q[t])
|
|
524
|
-
}, e[n(
|
|
525
|
+
}, e[n(385)]);
|
|
525
526
|
})
|
|
526
527
|
})]
|
|
527
528
|
}),
|
|
528
|
-
pe && Se[R(
|
|
529
|
+
pe && Se[R(444)] > 0 && k(o, {
|
|
529
530
|
gap: 2,
|
|
530
531
|
children: [O(n, {
|
|
531
|
-
variant:
|
|
532
|
-
tone: R(
|
|
533
|
-
children: R(
|
|
534
|
-
}), O(R(
|
|
535
|
-
className: R(
|
|
536
|
-
children: Se[R(
|
|
537
|
-
let t = R, n =
|
|
532
|
+
variant: R(457),
|
|
533
|
+
tone: R(447),
|
|
534
|
+
children: R(465)
|
|
535
|
+
}), O(R(396), {
|
|
536
|
+
className: R(398),
|
|
537
|
+
children: Se[R(456)]((e) => {
|
|
538
|
+
let t = R, n = _(e);
|
|
538
539
|
return O(F, {
|
|
539
540
|
css: e,
|
|
540
541
|
rgb: n,
|
|
541
|
-
label: e[t(
|
|
542
|
-
selected: n !== null &&
|
|
542
|
+
label: e[t(404)](),
|
|
543
|
+
selected: n !== null && p(n, T) === $,
|
|
543
544
|
disabled: L,
|
|
544
545
|
onPick: () => Ze(e)
|
|
545
546
|
}, e);
|
|
@@ -550,42 +551,42 @@ function ce({ value: l, defaultValue: ee = ae, onValueChange: v, onValueCommit:
|
|
|
550
551
|
});
|
|
551
552
|
}
|
|
552
553
|
function le(t, n) {
|
|
553
|
-
let r = e, i = n
|
|
554
|
-
return
|
|
555
|
-
let e = r, n = t[e(
|
|
556
|
-
o((
|
|
554
|
+
let r = e, i = n[r(413)]("|"), [a, o] = C(() => n[r(456)]((e) => e[r(388)]("--") ? "" : e));
|
|
555
|
+
return x(() => {
|
|
556
|
+
let e = r, n = t[e(439)] ?? document.documentElement, a = getComputedStyle(n), s = i ? i[e(462)]("|")[e(456)]((t) => t.startsWith("--") ? a[e(368)](t)[e(406)]() : t) : [];
|
|
557
|
+
o((e) => e.join("|") === s.join("|") ? e : s);
|
|
557
558
|
}, [t, i]), a;
|
|
558
559
|
}
|
|
559
|
-
function I({ value: t, defaultValue: n = ae, onValueChange: r, format: i, defaultFormat: a = "hex", onFormatChange: o, recentColors: c, defaultRecentColors: l = [], onRecentColorsChange: u, open: f, defaultOpen: p = !1, onOpenChange:
|
|
560
|
-
let E = e, [D, A] = s(t, n, r), [j, M] = s(i, a, o), [N, P] = s(c, l, u), [F, oe] = s(f, p,
|
|
560
|
+
function I({ value: t, defaultValue: n = ae, onValueChange: r, format: i, defaultFormat: a = "hex", onFormatChange: o, recentColors: c, defaultRecentColors: l = [], onRecentColorsChange: u, open: f, defaultOpen: p = !1, onOpenChange: m, size: h = "md", invalid: g, popoverWidth: v = 264, name: y, id: b, className: ne, disabled: x, alpha: S, "aria-label": C = "색", "aria-labelledby": w, ...T }) {
|
|
561
|
+
let E = e, [D, A] = s(t, n, r), [j, M] = s(i, a, o), [N, P] = s(c, l, u), [F, oe] = s(f, p, m), se = _(D), le = se ? te(se, j, S) : D, I = j === E(367) ? le[E(404)]() : le;
|
|
561
562
|
return k(ie, { children: [O(ee, {
|
|
562
563
|
open: F,
|
|
563
564
|
onOpenChange: (e) => !x && oe(e),
|
|
564
565
|
width: v,
|
|
565
|
-
"aria-label": C + E(
|
|
566
|
-
trigger: k(E(
|
|
567
|
-
id:
|
|
568
|
-
type: E(
|
|
569
|
-
"aria-haspopup": E(
|
|
566
|
+
"aria-label": C + E(437),
|
|
567
|
+
trigger: k(E(433), {
|
|
568
|
+
id: b,
|
|
569
|
+
type: E(433),
|
|
570
|
+
"aria-haspopup": E(470),
|
|
570
571
|
"aria-expanded": F,
|
|
571
572
|
"aria-label": w ? void 0 : C + ": " + I,
|
|
572
573
|
"aria-labelledby": w,
|
|
573
|
-
"aria-invalid":
|
|
574
|
+
"aria-invalid": g || void 0,
|
|
574
575
|
disabled: x,
|
|
575
|
-
className: d(E(
|
|
576
|
+
className: d(E(451), E(460), h !== "md" && E(434) + h, ne),
|
|
576
577
|
"data-open": F || void 0,
|
|
577
|
-
"data-invalid":
|
|
578
|
+
"data-invalid": g || void 0,
|
|
578
579
|
"data-disabled": x || void 0,
|
|
579
580
|
children: [
|
|
580
|
-
O(
|
|
581
|
-
className:
|
|
581
|
+
O(E(442), {
|
|
582
|
+
className: E(459),
|
|
582
583
|
style: { "--_c": D }
|
|
583
584
|
}),
|
|
584
|
-
O(E(
|
|
585
|
-
className: E(
|
|
585
|
+
O(E(442), {
|
|
586
|
+
className: E(393),
|
|
586
587
|
children: I
|
|
587
588
|
}),
|
|
588
|
-
O(re, { className:
|
|
589
|
+
O(re, { className: E(446) })
|
|
589
590
|
]
|
|
590
591
|
}),
|
|
591
592
|
children: O(ce, {
|
|
@@ -598,12 +599,12 @@ function I({ value: t, defaultValue: n = ae, onValueChange: r, format: i, defaul
|
|
|
598
599
|
recentColors: N,
|
|
599
600
|
onRecentColorsChange: P,
|
|
600
601
|
disabled: x,
|
|
601
|
-
"aria-label": C + E(
|
|
602
|
+
"aria-label": C + E(437)
|
|
602
603
|
})
|
|
603
|
-
}),
|
|
604
|
-
type:
|
|
605
|
-
name:
|
|
604
|
+
}), y && O(E(399), {
|
|
605
|
+
type: "hidden",
|
|
606
|
+
name: y,
|
|
606
607
|
value: D
|
|
607
608
|
})] });
|
|
608
609
|
}
|
|
609
|
-
export {
|
|
610
|
+
export { ne as CHART_COLOR_PRESETS, I as ColorField, ce as ColorPicker };
|