@ufoui/core 0.0.1
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/LICENSE +150 -0
- package/README.md +37 -0
- package/TRADEMARK.md +10 -0
- package/components/article/article.d.ts +25 -0
- package/components/aside/aside.d.ts +27 -0
- package/components/avatar/avatar.d.ts +35 -0
- package/components/badge/badge.d.ts +57 -0
- package/components/base/boxBase/boxBase.d.ts +126 -0
- package/components/base/buttonBase/buttonBase.d.ts +126 -0
- package/components/base/checkboxBase/checkboxBase.d.ts +124 -0
- package/components/base/dialogBase/dialog.d.ts +35 -0
- package/components/base/fieldBase/fieldBase.d.ts +50 -0
- package/components/base/inlineBase/inlineBase.d.ts +62 -0
- package/components/button/button.d.ts +24 -0
- package/components/card/card.d.ts +15 -0
- package/components/checkbox/checkbox.d.ts +31 -0
- package/components/chip/chip.d.ts +7 -0
- package/components/content/content.d.ts +28 -0
- package/components/dateInput/dateInput.d.ts +2 -0
- package/components/dateTimeInput/dateTimeInput.d.ts +2 -0
- package/components/dialog/dialogActions.d.ts +15 -0
- package/components/dialog/dialogContent.d.ts +9 -0
- package/components/dialog/dialogTitle.d.ts +16 -0
- package/components/div/div.d.ts +29 -0
- package/components/divider/divider.d.ts +70 -0
- package/components/divider/divider.guards.d.ts +15 -0
- package/components/emailInput/emailInput.d.ts +2 -0
- package/components/fab/fab.d.ts +29 -0
- package/components/fieldset/fieldset.d.ts +45 -0
- package/components/flex/flex.d.ts +36 -0
- package/components/footer/footer.d.ts +27 -0
- package/components/grid/grid.d.ts +38 -0
- package/components/header/header.d.ts +27 -0
- package/components/iconButton/iconButton.d.ts +27 -0
- package/components/listItem/listItem.d.ts +179 -0
- package/components/listItem/listItem.guards.d.ts +15 -0
- package/components/main/main.d.ts +27 -0
- package/components/menu/menu.d.ts +177 -0
- package/components/menu/menu.guards.d.ts +15 -0
- package/components/menuItem/menuItem.d.ts +179 -0
- package/components/menuItem/menuItem.guards.d.ts +15 -0
- package/components/nav/nav.d.ts +27 -0
- package/components/numberInput/numberInput.d.ts +2 -0
- package/components/option/option.d.ts +6 -0
- package/components/option/option.guards.d.ts +16 -0
- package/components/radio/radio.d.ts +31 -0
- package/components/radiogroup/radioGroup.d.ts +47 -0
- package/components/section/section.d.ts +27 -0
- package/components/select/select.d.ts +32 -0
- package/components/spinner/spinner.d.ts +7 -0
- package/components/switch/switch.d.ts +102 -0
- package/components/telInput/telInput.d.ts +2 -0
- package/components/textField/textField.d.ts +9 -0
- package/components/themeProvider/themeProvider.d.ts +54 -0
- package/components/timeInput/timeInput.d.ts +2 -0
- package/components/toggleButton/toggleButton.d.ts +6 -0
- package/components/tooltip/tooltip.d.ts +8 -0
- package/components/urlInput/urlInput.d.ts +2 -0
- package/context/fieldsetContext.d.ts +22 -0
- package/context/radioGroupContext.d.ts +28 -0
- package/context/themeContext.d.ts +61 -0
- package/hooks/useAnimate.d.ts +55 -0
- package/hooks/useClickOutside.d.ts +36 -0
- package/hooks/useEscapeHandler.d.ts +1 -0
- package/hooks/useFocusState.d.ts +16 -0
- package/hooks/useFocusVisible.d.ts +20 -0
- package/hooks/useTheme.d.ts +12 -0
- package/index.css +1 -0
- package/index.d.ts +53 -0
- package/index.mjs +3300 -0
- package/internal/inlineTooltip/inlineTooltip.d.ts +11 -0
- package/internal/inlineTooltip/inlineTooltip2.d.ts +10 -0
- package/internal/inlineTooltip/inlineTooltipManager.d.ts +12 -0
- package/package.json +38 -0
- package/types/index.d.ts +2 -0
- package/types/motion.d.ts +17 -0
- package/types/theme.d.ts +246 -0
- package/utils/calculateFloatingPosition.d.ts +68 -0
- package/utils/color.d.ts +415 -0
- package/utils/generateMaterialColors.d.ts +31 -0
- package/utils/generateSchemes.d.ts +32 -0
- package/utils/inputhMethod.d.ts +17 -0
- package/utils/utils.d.ts +202 -0
package/index.mjs
ADDED
|
@@ -0,0 +1,3300 @@
|
|
|
1
|
+
import { jsx as r, jsxs as L, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import lt, { forwardRef as A, isValidElement as vt, createContext as Ht, useSyncExternalStore as Nn, useState as ee, useRef as ce, useCallback as xt, useEffect as be, useContext as Lt, useLayoutEffect as ln, cloneElement as Ot, useMemo as an } from "react";
|
|
3
|
+
import { createPortal as qt } from "react-dom";
|
|
4
|
+
import { argbFromHex as bt, themeFromSourceColor as Bn, hexFromArgb as ye, TonalPalette as Ln } from "@material/material-color-utilities";
|
|
5
|
+
const un = (e) => ({
|
|
6
|
+
topLeft: "uui-top-left",
|
|
7
|
+
topCenter: "uui-top-center",
|
|
8
|
+
topRight: "uui-top-right",
|
|
9
|
+
topRightOut: "uui-top-right-out",
|
|
10
|
+
topLeftOut: "uui-top-left-out",
|
|
11
|
+
centerLeft: "uui-center-left",
|
|
12
|
+
center: "uui-center",
|
|
13
|
+
centerRight: "uui-center-right",
|
|
14
|
+
bottomLeft: "uui-bottom-left",
|
|
15
|
+
bottomCenter: "uui-bottom-center",
|
|
16
|
+
bottomRight: "uui-bottom-right",
|
|
17
|
+
auto: "uui-top-right"
|
|
18
|
+
})[e], je = (e) => {
|
|
19
|
+
switch (e) {
|
|
20
|
+
case "square":
|
|
21
|
+
return "uui-square";
|
|
22
|
+
case "smooth":
|
|
23
|
+
return "uui-smooth";
|
|
24
|
+
case "rounded":
|
|
25
|
+
return "uui-rounded";
|
|
26
|
+
case "round":
|
|
27
|
+
return "uui-round";
|
|
28
|
+
default:
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
}, Ct = (e) => ({
|
|
32
|
+
extraSmall: "uui-extra-small",
|
|
33
|
+
small: "uui-small",
|
|
34
|
+
medium: "uui-medium",
|
|
35
|
+
large: "uui-large",
|
|
36
|
+
extraLarge: "uui-extra-large"
|
|
37
|
+
})[e], tt = (e) => {
|
|
38
|
+
const t = cn(0, 5, e);
|
|
39
|
+
return t === void 0 ? "" : `uui-border-${t}`;
|
|
40
|
+
}, at = (e) => {
|
|
41
|
+
switch (e) {
|
|
42
|
+
case 0:
|
|
43
|
+
return "uui-elevation-0";
|
|
44
|
+
case 1:
|
|
45
|
+
return "uui-elevation-1";
|
|
46
|
+
case 2:
|
|
47
|
+
return "uui-elevation-2";
|
|
48
|
+
case 3:
|
|
49
|
+
return "uui-elevation-3";
|
|
50
|
+
case 4:
|
|
51
|
+
return "uui-elevation-4";
|
|
52
|
+
case 5:
|
|
53
|
+
return "uui-elevation-5";
|
|
54
|
+
default:
|
|
55
|
+
return "";
|
|
56
|
+
}
|
|
57
|
+
}, ft = (e) => {
|
|
58
|
+
switch (e) {
|
|
59
|
+
case "compact":
|
|
60
|
+
return "uui-compact";
|
|
61
|
+
case "dense":
|
|
62
|
+
return "uui-dense";
|
|
63
|
+
default:
|
|
64
|
+
return "";
|
|
65
|
+
}
|
|
66
|
+
}, $e = (e) => ({
|
|
67
|
+
displayLarge: "uui-font-display-large",
|
|
68
|
+
displayMedium: "uui-font-display-medium",
|
|
69
|
+
displaySmall: "uui-font-display-small",
|
|
70
|
+
headlineLarge: "uui-font-headline-large",
|
|
71
|
+
headlineMedium: "uui-font-headline-medium",
|
|
72
|
+
headlineSmall: "uui-font-headline-small",
|
|
73
|
+
titleLarge: "uui-font-title-large",
|
|
74
|
+
titleMedium: "uui-font-title-medium",
|
|
75
|
+
titleSmall: "uui-font-title-small",
|
|
76
|
+
labelLarge: "uui-font-label-large",
|
|
77
|
+
labelMedium: "uui-font-label-medium",
|
|
78
|
+
labelSmall: "uui-font-label-small",
|
|
79
|
+
bodyLarge: "uui-font-body-large",
|
|
80
|
+
bodyMedium: "uui-font-body-medium",
|
|
81
|
+
bodySmall: "uui-font-body-small",
|
|
82
|
+
caption: "uui-font-caption",
|
|
83
|
+
overline: "uui-font-overline"
|
|
84
|
+
})[e];
|
|
85
|
+
function mt(...e) {
|
|
86
|
+
return (t) => {
|
|
87
|
+
e.forEach((n) => {
|
|
88
|
+
if (typeof n == "function")
|
|
89
|
+
n(t);
|
|
90
|
+
else if (n) {
|
|
91
|
+
const i = n;
|
|
92
|
+
i.current = t;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
const wt = (e, t, n) => {
|
|
98
|
+
const i = n ?? e, s = i.querySelector(".ripple-container");
|
|
99
|
+
s && s.remove();
|
|
100
|
+
const o = e.getBoundingClientRect(), u = i.getBoundingClientRect(), l = t.clientX - o.left, m = t.clientY - o.top, p = l >= 0 && l <= o.width && m >= 0 && m <= o.height, c = p ? l : o.width / 2, a = p ? m : o.height / 2, f = Math.sqrt(o.width * o.width + o.height * o.height), b = f / 2, g = document.createElement("div");
|
|
101
|
+
g.className = "ripple-container", g.style.position = "absolute", g.style.pointerEvents = "none", g.style.overflow = "hidden", g.style.width = `${o.width}px`, g.style.height = `${o.height}px`, g.style.left = `${o.left - u.left}px`, g.style.top = `${o.top - u.top}px`, requestAnimationFrame(() => {
|
|
102
|
+
g.style.borderRadius = getComputedStyle(e).borderRadius;
|
|
103
|
+
});
|
|
104
|
+
const x = document.createElement("span");
|
|
105
|
+
x.className = "ripple", x.style.position = "absolute", x.style.width = `${f}px`, x.style.height = `${f}px`, x.style.left = `${c - b}px`, x.style.top = `${a - b}px`, g.appendChild(x), i.appendChild(g), x.addEventListener("animationend", () => {
|
|
106
|
+
g.remove();
|
|
107
|
+
});
|
|
108
|
+
}, St = (e) => (
|
|
109
|
+
// eslint-disable-next-line sonarjs/pseudo-random
|
|
110
|
+
`${e}_${Math.floor((1 + Math.random()) * 65536).toString(16).substring(1)}`
|
|
111
|
+
);
|
|
112
|
+
function It(e) {
|
|
113
|
+
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
114
|
+
}
|
|
115
|
+
function cn(e, t, n, i) {
|
|
116
|
+
const s = Number(n);
|
|
117
|
+
return Number.isFinite(s) ? Math.min(t, Math.max(e, Math.round(s))) : i;
|
|
118
|
+
}
|
|
119
|
+
function In({ variant: e = "circular", inline: t, className: n }) {
|
|
120
|
+
const i = ["uui-spinner", `uui-spinner-${e}`, t && "uui-spinner-inline", n].filter(Boolean).join(" ");
|
|
121
|
+
return e === "circular" ? /* @__PURE__ */ r("svg", { "aria-hidden": "true", className: i, viewBox: "22 22 44 44", children: /* @__PURE__ */ r("circle", { className: "uui-spinner-circle", cx: "44", cy: "44", fill: "none", r: "19.8", strokeWidth: "4.6" }) }) : e === "bars2" ? /* @__PURE__ */ L("svg", { className: "uui-bars-spinner", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
122
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", width: "4", x: "22" }),
|
|
123
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-135 33.9 16.9)", width: "4", x: "33.9", y: "16.9" }),
|
|
124
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-90 36 26)", width: "4", x: "36", y: "26" }),
|
|
125
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-45 31.1 33.9)", width: "4", x: "31.1", y: "33.9" }),
|
|
126
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", width: "4", x: "22", y: "36" }),
|
|
127
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-135 8.4 42.4)", width: "4", x: "8.4", y: "42.4" }),
|
|
128
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-90 0 26)", width: "4", y: "26" }),
|
|
129
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-45 5.6 8.4)", width: "4", x: "5.6", y: "8.4" })
|
|
130
|
+
] }) : e === "orbit" ? /* @__PURE__ */ L("svg", { className: "uui-orbit-spinner", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
131
|
+
/* @__PURE__ */ r("circle", { cx: "24", cy: "4", r: "4" }),
|
|
132
|
+
/* @__PURE__ */ r("circle", { cx: "38.1421", cy: "9.8579", r: "4" }),
|
|
133
|
+
/* @__PURE__ */ r("circle", { cx: "44", cy: "24", r: "4" }),
|
|
134
|
+
/* @__PURE__ */ r("circle", { cx: "38.1421", cy: "38.1421", r: "4" }),
|
|
135
|
+
/* @__PURE__ */ r("circle", { cx: "24", cy: "44", r: "4" }),
|
|
136
|
+
/* @__PURE__ */ r("circle", { cx: "9.8579", cy: "38.1421", r: "4" }),
|
|
137
|
+
/* @__PURE__ */ r("circle", { cx: "4", cy: "24", r: "4" }),
|
|
138
|
+
/* @__PURE__ */ r("circle", { cx: "9.8579", cy: "9.8579", r: "4" })
|
|
139
|
+
] }) : e === "arc" ? /* @__PURE__ */ L("svg", { className: "uui-ring-spinner", viewBox: "0 0 56 56", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
140
|
+
/* @__PURE__ */ r("circle", { cx: "28", cy: "28", fill: "none", opacity: "0.25", r: "22", stroke: "currentColor", strokeWidth: "8" }),
|
|
141
|
+
/* @__PURE__ */ r(
|
|
142
|
+
"circle",
|
|
143
|
+
{
|
|
144
|
+
cx: "28",
|
|
145
|
+
cy: "28",
|
|
146
|
+
fill: "none",
|
|
147
|
+
r: "22",
|
|
148
|
+
stroke: "currentColor",
|
|
149
|
+
strokeDasharray: "69 69",
|
|
150
|
+
strokeDashoffset: "0",
|
|
151
|
+
strokeLinecap: "butt",
|
|
152
|
+
strokeWidth: "8"
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
] }) : e === "stepBar" ? /* @__PURE__ */ L("svg", { className: "uui-bars-steps", viewBox: "0 0 48 48", children: [
|
|
156
|
+
/* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "6", y: "20" }),
|
|
157
|
+
/* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "20", y: "20" }),
|
|
158
|
+
/* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "34", y: "20" })
|
|
159
|
+
] }) : /* @__PURE__ */ L("svg", { className: "uui-dots2-spinner", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
160
|
+
/* @__PURE__ */ r("circle", { cx: "10", cy: "24", r: "4" }),
|
|
161
|
+
/* @__PURE__ */ r("circle", { cx: "24", cy: "24", r: "4" }),
|
|
162
|
+
/* @__PURE__ */ r("circle", { cx: "38", cy: "24", r: "4" })
|
|
163
|
+
] });
|
|
164
|
+
}
|
|
165
|
+
const dn = [
|
|
166
|
+
"primary",
|
|
167
|
+
"secondary",
|
|
168
|
+
"tertiary",
|
|
169
|
+
"warning",
|
|
170
|
+
"info",
|
|
171
|
+
"success",
|
|
172
|
+
"error"
|
|
173
|
+
], En = [
|
|
174
|
+
...dn,
|
|
175
|
+
"primaryContainer",
|
|
176
|
+
"primaryFixed",
|
|
177
|
+
"primaryFixedDim",
|
|
178
|
+
"secondaryContainer",
|
|
179
|
+
"secondaryFixed",
|
|
180
|
+
"secondaryFixedDim",
|
|
181
|
+
"tertiaryContainer",
|
|
182
|
+
"tertiaryFixed",
|
|
183
|
+
"tertiaryFixedDim",
|
|
184
|
+
"warningContainer",
|
|
185
|
+
"warningFixed",
|
|
186
|
+
"warningFixedDim",
|
|
187
|
+
"infoContainer",
|
|
188
|
+
"infoFixed",
|
|
189
|
+
"infoFixedDim",
|
|
190
|
+
"successContainer",
|
|
191
|
+
"successFixed",
|
|
192
|
+
"successFixedDim",
|
|
193
|
+
"errorContainer",
|
|
194
|
+
"errorFixed",
|
|
195
|
+
"errorFixedDim",
|
|
196
|
+
"black",
|
|
197
|
+
"white"
|
|
198
|
+
], fn = [
|
|
199
|
+
...En,
|
|
200
|
+
"outline",
|
|
201
|
+
"outlineVariant",
|
|
202
|
+
"surface",
|
|
203
|
+
"surfaceVariant",
|
|
204
|
+
"background",
|
|
205
|
+
"inverseSurface",
|
|
206
|
+
"inversePrimary",
|
|
207
|
+
"surfaceContainerHighest",
|
|
208
|
+
"surfaceContainerHigh",
|
|
209
|
+
"surfaceContainer",
|
|
210
|
+
"surfaceContainerLow",
|
|
211
|
+
"surfaceContainerLowest",
|
|
212
|
+
"surfaceBright",
|
|
213
|
+
"surfaceDim"
|
|
214
|
+
], mn = [
|
|
215
|
+
...fn,
|
|
216
|
+
"onPrimary",
|
|
217
|
+
"onPrimaryContainer",
|
|
218
|
+
"onPrimaryFixed",
|
|
219
|
+
"onPrimaryFixedVariant",
|
|
220
|
+
"onSecondary",
|
|
221
|
+
"onSecondaryContainer",
|
|
222
|
+
"onSecondaryFixed",
|
|
223
|
+
"onSecondaryFixedVariant",
|
|
224
|
+
"onTertiary",
|
|
225
|
+
"onTertiaryContainer",
|
|
226
|
+
"onTertiaryFixed",
|
|
227
|
+
"onTertiaryFixedVariant",
|
|
228
|
+
"onWarning",
|
|
229
|
+
"onWarningContainer",
|
|
230
|
+
"onWarningFixed",
|
|
231
|
+
"onWarningFixedVariant",
|
|
232
|
+
"onInfo",
|
|
233
|
+
"onInfoContainer",
|
|
234
|
+
"onInfoFixed",
|
|
235
|
+
"onInfoFixedVariant",
|
|
236
|
+
"onSuccess",
|
|
237
|
+
"onSuccessContainer",
|
|
238
|
+
"onSuccessFixed",
|
|
239
|
+
"onSuccessFixedVariant",
|
|
240
|
+
"onError",
|
|
241
|
+
"onErrorContainer",
|
|
242
|
+
"onErrorFixed",
|
|
243
|
+
"onErrorFixedVariant",
|
|
244
|
+
"onSurface",
|
|
245
|
+
"onSurfaceVariant",
|
|
246
|
+
"onBackground",
|
|
247
|
+
"inverseOnSurface",
|
|
248
|
+
"inversePrimary",
|
|
249
|
+
"shadow",
|
|
250
|
+
"surfaceTint",
|
|
251
|
+
"scrim"
|
|
252
|
+
], Mt = {
|
|
253
|
+
fade: "uui-motion-fade",
|
|
254
|
+
fadeBlur: "uui-motion-fade-blur",
|
|
255
|
+
scale: "uui-motion-scale",
|
|
256
|
+
scaleBlur: "uui-motion-scale-blur",
|
|
257
|
+
popup: "uui-motion-popup",
|
|
258
|
+
slideUp: "uui-motion-slide-up",
|
|
259
|
+
slideDown: "uui-motion-slide-down",
|
|
260
|
+
slideLeft: "uui-motion-slide-left",
|
|
261
|
+
slideRight: "uui-motion-slide-right",
|
|
262
|
+
slideUpBlur: "uui-motion-slide-up-blur",
|
|
263
|
+
slideDownBlur: "uui-motion-slide-down-blur",
|
|
264
|
+
slideLeftBlur: "uui-motion-slide-left-blur",
|
|
265
|
+
slideRightBlur: "uui-motion-slide-right-blur",
|
|
266
|
+
rotate: "uui-motion-rotate",
|
|
267
|
+
rotateUpRight: "uui-motion-rotate-up-right",
|
|
268
|
+
rotateUpLeft: "uui-motion-rotate-up-left",
|
|
269
|
+
rollLeft: "uui-motion-roll-left",
|
|
270
|
+
rollRight: "uui-motion-roll-right",
|
|
271
|
+
flipX: "uui-motion-flip-x",
|
|
272
|
+
flipY: "uui-motion-flip-y",
|
|
273
|
+
bounce: "uui-motion-bounce",
|
|
274
|
+
squish: "uui-motion-squish",
|
|
275
|
+
rubber: "uui-motion-rubber",
|
|
276
|
+
popElastic: "uui-motion-pop-elastic",
|
|
277
|
+
jelly: "uui-motion-jelly"
|
|
278
|
+
};
|
|
279
|
+
function Tn(e) {
|
|
280
|
+
return e ? Mt[e] ?? "" : "";
|
|
281
|
+
}
|
|
282
|
+
function Hr() {
|
|
283
|
+
return Object.keys(Mt);
|
|
284
|
+
}
|
|
285
|
+
function Mn(e) {
|
|
286
|
+
return e === "expressive" ? "uui-motion-expressive" : "";
|
|
287
|
+
}
|
|
288
|
+
const Vn = (e) => {
|
|
289
|
+
const t = dn.includes(e) ? e : "primary";
|
|
290
|
+
return {
|
|
291
|
+
textColor: `uui-text-${t}`,
|
|
292
|
+
borderColor: `uui-border-${t}`,
|
|
293
|
+
bgColor: `uui-bg-${t}`,
|
|
294
|
+
textOnColor: `uui-text-on-${t}`,
|
|
295
|
+
borderOnColor: `uui-border-on-${t}`,
|
|
296
|
+
bgOnColor: `uui-bg-on-${t}`,
|
|
297
|
+
textContainer: `uui-text-${t}-container`,
|
|
298
|
+
borderContainer: `uui-border-${t}-container`,
|
|
299
|
+
bgContainer: `uui-bg-${t}-container`,
|
|
300
|
+
textOnContainer: `uui-text-on-${t}-container`,
|
|
301
|
+
borderOnContainer: `uui-border-on-${t}-container`,
|
|
302
|
+
bgOnContainer: `uui-bg-on-${t}-container`,
|
|
303
|
+
textFixed: `uui-text-${t}-fixed`,
|
|
304
|
+
borderFixed: `uui-border-${t}-fixed`,
|
|
305
|
+
bgFixed: `uui-bg-${t}-fixed`,
|
|
306
|
+
textOnFixed: `uui-text-on-${t}-fixed`,
|
|
307
|
+
borderOnFixed: `uui-border-on-${t}-fixed`,
|
|
308
|
+
bgOnFixed: `uui-bg-on-${t}-fixed`,
|
|
309
|
+
textFixedDim: `uui-text-${t}-fixed-dim`,
|
|
310
|
+
borderFixedDim: `uui-border-${t}-fixed-dim`,
|
|
311
|
+
bgFixedDim: `uui-bg-${t}-fixed-dim`,
|
|
312
|
+
textOnFixedVariant: `uui-text-on-${t}-fixed-variant`,
|
|
313
|
+
borderOnFixedVariant: `uui-border-on-${t}-fixed-variant`,
|
|
314
|
+
bgOnFixedVariant: `uui-bg-on-${t}-fixed-variant`
|
|
315
|
+
};
|
|
316
|
+
}, Et = {
|
|
317
|
+
// SURFACE
|
|
318
|
+
surface: "onSurface",
|
|
319
|
+
surfaceVariant: "onSurfaceVariant",
|
|
320
|
+
surfaceContainerLowest: "onSurface",
|
|
321
|
+
surfaceContainerLow: "onSurface",
|
|
322
|
+
surfaceContainer: "onSurface",
|
|
323
|
+
surfaceContainerHigh: "onSurface",
|
|
324
|
+
surfaceContainerHighest: "onSurface",
|
|
325
|
+
surfaceDim: "onSurface",
|
|
326
|
+
surfaceBright: "onSurface",
|
|
327
|
+
background: "onBackground",
|
|
328
|
+
inverseSurface: "inverseOnSurface",
|
|
329
|
+
// SEMANTIC
|
|
330
|
+
primary: "onPrimary",
|
|
331
|
+
secondary: "onSecondary",
|
|
332
|
+
tertiary: "onTertiary",
|
|
333
|
+
warning: "onWarning",
|
|
334
|
+
info: "onInfo",
|
|
335
|
+
success: "onSuccess",
|
|
336
|
+
error: "onError",
|
|
337
|
+
// EXTENDED
|
|
338
|
+
primaryContainer: "onPrimaryContainer",
|
|
339
|
+
primaryFixed: "onPrimaryFixed",
|
|
340
|
+
primaryFixedDim: "onPrimaryFixedVariant",
|
|
341
|
+
secondaryContainer: "onSecondaryContainer",
|
|
342
|
+
secondaryFixed: "onSecondaryFixed",
|
|
343
|
+
secondaryFixedDim: "onSecondaryFixedVariant",
|
|
344
|
+
tertiaryContainer: "onTertiaryContainer",
|
|
345
|
+
tertiaryFixed: "onTertiaryFixed",
|
|
346
|
+
tertiaryFixedDim: "onTertiaryFixedVariant",
|
|
347
|
+
warningContainer: "onWarningContainer",
|
|
348
|
+
warningFixed: "onWarningFixed",
|
|
349
|
+
warningFixedDim: "onWarningFixedVariant",
|
|
350
|
+
infoContainer: "onInfoContainer",
|
|
351
|
+
infoFixed: "onInfoFixed",
|
|
352
|
+
infoFixedDim: "onInfoFixedVariant",
|
|
353
|
+
successContainer: "onSuccessContainer",
|
|
354
|
+
successFixed: "onSuccessFixed",
|
|
355
|
+
successFixedDim: "onSuccessFixedVariant",
|
|
356
|
+
errorContainer: "onErrorContainer",
|
|
357
|
+
errorFixed: "onErrorFixed",
|
|
358
|
+
errorFixedDim: "onErrorFixedVariant",
|
|
359
|
+
// NEUTRAL / TECHNICAL (for TS completeness)
|
|
360
|
+
outline: "surface",
|
|
361
|
+
outlineVariant: "inverseSurface",
|
|
362
|
+
inversePrimary: "onPrimaryContainer",
|
|
363
|
+
black: "white",
|
|
364
|
+
white: "black",
|
|
365
|
+
onSurface: "surface",
|
|
366
|
+
onSurfaceVariant: "surfaceVariant",
|
|
367
|
+
onBackground: "background",
|
|
368
|
+
inverseOnSurface: "inverseSurface",
|
|
369
|
+
onPrimary: "primary",
|
|
370
|
+
onSecondary: "secondary",
|
|
371
|
+
onTertiary: "tertiary",
|
|
372
|
+
onWarning: "warning",
|
|
373
|
+
onInfo: "info",
|
|
374
|
+
onSuccess: "success",
|
|
375
|
+
onError: "error",
|
|
376
|
+
onPrimaryContainer: "primaryContainer",
|
|
377
|
+
onSecondaryContainer: "secondaryContainer",
|
|
378
|
+
onTertiaryContainer: "tertiaryContainer",
|
|
379
|
+
onWarningContainer: "warningContainer",
|
|
380
|
+
onInfoContainer: "infoContainer",
|
|
381
|
+
onSuccessContainer: "successContainer",
|
|
382
|
+
onErrorContainer: "errorContainer"
|
|
383
|
+
}, Vt = (e) => {
|
|
384
|
+
const t = fn.includes(e) ? e : "primary", n = It(t), i = It(Et[t]);
|
|
385
|
+
return {
|
|
386
|
+
textColor: `uui-text-${n}`,
|
|
387
|
+
textOnColor: `uui-text-${i}`,
|
|
388
|
+
borderColor: `uui-border-${n}`,
|
|
389
|
+
borderOnColor: `uui-border-${i}`,
|
|
390
|
+
bgColor: `uui-bg-${n}`,
|
|
391
|
+
bgOnColor: `uui-bg-${i}`
|
|
392
|
+
};
|
|
393
|
+
}, qr = (e) => {
|
|
394
|
+
const t = mn.includes(e) ? e : "primary", n = It(t);
|
|
395
|
+
return {
|
|
396
|
+
textColor: `uui-text-${n}`,
|
|
397
|
+
borderColor: `uui-border-${n}`,
|
|
398
|
+
bgColor: `uui-bg-${n}`
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
function Zt(e) {
|
|
402
|
+
return Vt(e).borderColor;
|
|
403
|
+
}
|
|
404
|
+
const Zr = (e) => {
|
|
405
|
+
const t = e.toLowerCase(), n = `--uui-color-${t}`, i = `--uui-color-on-${t}`;
|
|
406
|
+
return {
|
|
407
|
+
color: `var(${n})`,
|
|
408
|
+
onColor: `var(${i})`,
|
|
409
|
+
container: `var(${n}-container)`,
|
|
410
|
+
onContainer: `var(${i}-container)`,
|
|
411
|
+
fixed: `var(${n}-fixed)`,
|
|
412
|
+
fixedDim: `var(${n}-fixed-dim)`,
|
|
413
|
+
onFixed: `var(${i}-fixed)`,
|
|
414
|
+
onFixedVariant: `var(${i}-fixed-variant)`
|
|
415
|
+
};
|
|
416
|
+
}, pn = (e) => {
|
|
417
|
+
const t = e.toLowerCase(), n = `--uui-color-${t}`, i = `--uui-color-on-${t}`;
|
|
418
|
+
return {
|
|
419
|
+
color: `var(${n})`,
|
|
420
|
+
onColor: `var(${i})`
|
|
421
|
+
};
|
|
422
|
+
}, Dn = (e) => [parseInt(e.slice(1, 3), 16), parseInt(e.slice(3, 5), 16), parseInt(e.slice(5, 7), 16)], _r = (e) => [
|
|
423
|
+
parseInt(e.slice(1, 3), 16),
|
|
424
|
+
parseInt(e.slice(3, 5), 16),
|
|
425
|
+
parseInt(e.slice(5, 7), 16)
|
|
426
|
+
].join(",");
|
|
427
|
+
function Kr(e, t) {
|
|
428
|
+
const i = {
|
|
429
|
+
0: "0",
|
|
430
|
+
1: "0.05",
|
|
431
|
+
2: "0.08",
|
|
432
|
+
3: "0.11",
|
|
433
|
+
4: "0.12",
|
|
434
|
+
5: "0.14"
|
|
435
|
+
}[e] ?? 0, [s, o, u] = Dn(t);
|
|
436
|
+
return `rgba(${String(s)}, ${String(o)}, ${String(u)}, ${i})`;
|
|
437
|
+
}
|
|
438
|
+
const Gr = () => {
|
|
439
|
+
const e = [
|
|
440
|
+
"surface",
|
|
441
|
+
"onSurface",
|
|
442
|
+
"surfaceDim",
|
|
443
|
+
"surfaceBright",
|
|
444
|
+
"surfaceContainerLowest",
|
|
445
|
+
"surfaceContainerLow",
|
|
446
|
+
"surfaceContainer",
|
|
447
|
+
"surfaceContainerHigh",
|
|
448
|
+
"surfaceContainerHighest",
|
|
449
|
+
"onSurfaceVariant",
|
|
450
|
+
"inverseSurface",
|
|
451
|
+
"inverseOnSurface",
|
|
452
|
+
"outline",
|
|
453
|
+
"outlineVariant",
|
|
454
|
+
"inversePrimary",
|
|
455
|
+
"scrim",
|
|
456
|
+
"shadow",
|
|
457
|
+
"white",
|
|
458
|
+
"black",
|
|
459
|
+
"background",
|
|
460
|
+
"onBackground",
|
|
461
|
+
"surfaceTint"
|
|
462
|
+
], t = {};
|
|
463
|
+
for (const n of e) {
|
|
464
|
+
const i = n.charAt(0).toUpperCase() + n.slice(1);
|
|
465
|
+
t[`text${i}`] = `uui-text-${n}`, t[`border${i}`] = `uui-border-${n}`, t[`outline${i}`] = `uui-outline-${n}`, t[`bg${i}`] = `uui-bg-${n}`;
|
|
466
|
+
}
|
|
467
|
+
return t;
|
|
468
|
+
}, Xr = (e) => {
|
|
469
|
+
const t = It(e), n = [
|
|
470
|
+
["currentColor", `uui-current-${t}`],
|
|
471
|
+
["currentOnColor", `uui-current-on-${t}`],
|
|
472
|
+
["currentContainer", `uui-current-${t}-container`],
|
|
473
|
+
["currentOnContainer", `uui-current-on-${t}-container`],
|
|
474
|
+
["currentFixed", `uui-current-${t}-fixed`],
|
|
475
|
+
["currentOnFixed", `uui-current-on-${t}-fixed`],
|
|
476
|
+
["currentFixedDim", `uui-current-${t}-fixed-dim`],
|
|
477
|
+
["currentOnFixedVariant", `uui-current-on-${t}-fixed-variant`],
|
|
478
|
+
["currentOnSurface", "uui-current-on-surface"],
|
|
479
|
+
["currentSurface", "uui-current-surface"],
|
|
480
|
+
["currentSurfaceDim", "uui-current-surface-dim"],
|
|
481
|
+
["currentSurfaceBright", "uui-current-surface-bright"],
|
|
482
|
+
["currentSurfaceContainerLowest", "uui-current-surface-container-lowest"],
|
|
483
|
+
["currentSurfaceContainerLow", "uui-current-surface-container-low"],
|
|
484
|
+
["currentSurfaceContainer", "uui-current-surface-container"],
|
|
485
|
+
["currentSurfaceContainerHigh", "uui-current-surface-container-high"],
|
|
486
|
+
["currentSurfaceContainerHighest", "uui-current-surface-container-highest"],
|
|
487
|
+
["currentOnSurfaceVariant", "uui-current-on-surface-variant"],
|
|
488
|
+
["currentInverseSurface", "uui-current-inverse-surface"],
|
|
489
|
+
["currentInverseOnSurface", "uui-current-inverse-on-surface"],
|
|
490
|
+
["currentOutline", "uui-current-outline"],
|
|
491
|
+
["currentOutlineVariant", "uui-current-outline-variant"],
|
|
492
|
+
["currentInversePrimary", "uui-current-inverse-primary"],
|
|
493
|
+
["currentScrim", "uui-current-scrim"],
|
|
494
|
+
["currentShadow", "uui-current-shadow"],
|
|
495
|
+
["currentWhite", "uui-current-white"],
|
|
496
|
+
["currentBlack", "uui-current-black"]
|
|
497
|
+
];
|
|
498
|
+
return Object.fromEntries(n);
|
|
499
|
+
};
|
|
500
|
+
function jn(e) {
|
|
501
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
502
|
+
}
|
|
503
|
+
function T(e) {
|
|
504
|
+
const t = { ...e || {} };
|
|
505
|
+
function n(c, a) {
|
|
506
|
+
t[c] = a;
|
|
507
|
+
}
|
|
508
|
+
const i = (c) => `var(--uui-color-${c.replace(/[A-Z]/g, (a) => "-" + a.toLowerCase())})`, s = (c) => Object.assign(
|
|
509
|
+
(a) => {
|
|
510
|
+
a && c(i(a));
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
on(a) {
|
|
514
|
+
if (a) {
|
|
515
|
+
const f = Et[a];
|
|
516
|
+
f !== void 0 && c(i(f));
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
container(a) {
|
|
520
|
+
a && c(i(`${a}Container`));
|
|
521
|
+
},
|
|
522
|
+
onContainer(a) {
|
|
523
|
+
a && c(i(`on${jn(a)}Container`));
|
|
524
|
+
},
|
|
525
|
+
fixed(a) {
|
|
526
|
+
a && c(i(`${a}Fixed`));
|
|
527
|
+
},
|
|
528
|
+
fixedDim(a) {
|
|
529
|
+
a && c(i(`${a}FixedDim`));
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
), o = s((c) => {
|
|
533
|
+
n("backgroundColor", c);
|
|
534
|
+
}), u = s((c) => {
|
|
535
|
+
n("color", c);
|
|
536
|
+
}), l = s((c) => {
|
|
537
|
+
n("borderColor", c);
|
|
538
|
+
}), m = s((c) => {
|
|
539
|
+
n("outlineColor", c);
|
|
540
|
+
}), p = s((c) => {
|
|
541
|
+
n("--uui-current-color", c);
|
|
542
|
+
});
|
|
543
|
+
return {
|
|
544
|
+
bg: o,
|
|
545
|
+
text: u,
|
|
546
|
+
border: l,
|
|
547
|
+
outline: m,
|
|
548
|
+
current: p,
|
|
549
|
+
set: n,
|
|
550
|
+
get() {
|
|
551
|
+
return t;
|
|
552
|
+
},
|
|
553
|
+
merge(c) {
|
|
554
|
+
c && Object.assign(t, c);
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
function ct(e) {
|
|
559
|
+
return e ?? "outlineVariant";
|
|
560
|
+
}
|
|
561
|
+
const Rn = A(
|
|
562
|
+
({ font: e, size: t = "small", ...n }, i) => /* @__PURE__ */ r(yt, { font: e ?? {
|
|
563
|
+
extraSmall: "labelLarge",
|
|
564
|
+
small: "labelLarge",
|
|
565
|
+
medium: "titleMedium",
|
|
566
|
+
large: "headlineSmall",
|
|
567
|
+
extraLarge: "headlineLarge"
|
|
568
|
+
}[t], ref: i, size: t, ...n, elementClass: "uui-button" })
|
|
569
|
+
);
|
|
570
|
+
Rn.displayName = "Button";
|
|
571
|
+
const An = A(
|
|
572
|
+
({
|
|
573
|
+
font: e,
|
|
574
|
+
size: t = "small",
|
|
575
|
+
shape: n = "smooth",
|
|
576
|
+
selectedShape: i = "smooth",
|
|
577
|
+
borderColor: s = "outlineVariant",
|
|
578
|
+
...o
|
|
579
|
+
}, u) => /* @__PURE__ */ r(
|
|
580
|
+
yt,
|
|
581
|
+
{
|
|
582
|
+
borderColor: s,
|
|
583
|
+
font: e ?? {
|
|
584
|
+
extraSmall: "labelLarge",
|
|
585
|
+
small: "labelLarge",
|
|
586
|
+
medium: "titleMedium",
|
|
587
|
+
large: "headlineSmall",
|
|
588
|
+
extraLarge: "headlineLarge"
|
|
589
|
+
}[t],
|
|
590
|
+
ref: u,
|
|
591
|
+
selectedShape: i,
|
|
592
|
+
...o,
|
|
593
|
+
elementClass: "uui-chip",
|
|
594
|
+
shape: n,
|
|
595
|
+
size: t
|
|
596
|
+
}
|
|
597
|
+
)
|
|
598
|
+
);
|
|
599
|
+
An.displayName = "Chip";
|
|
600
|
+
const On = (e) => {
|
|
601
|
+
const {
|
|
602
|
+
children: t,
|
|
603
|
+
className: n,
|
|
604
|
+
border: i,
|
|
605
|
+
borderColor: s,
|
|
606
|
+
color: o = "error",
|
|
607
|
+
align: u = "topRight",
|
|
608
|
+
shape: l = "round",
|
|
609
|
+
size: m = "medium",
|
|
610
|
+
elevation: p,
|
|
611
|
+
ariaLabel: c,
|
|
612
|
+
value: a,
|
|
613
|
+
font: f,
|
|
614
|
+
offset: b,
|
|
615
|
+
...g
|
|
616
|
+
} = e, x = "uui-badge", $ = f ?? (m === "extraLarge" || m === "large" ? "labelMedium" : "labelSmall"), C = [
|
|
617
|
+
"uui-badge-control",
|
|
618
|
+
n,
|
|
619
|
+
je(l),
|
|
620
|
+
Ct(m),
|
|
621
|
+
$e($)
|
|
622
|
+
], h = ["uui-badge-slot", un(u)].filter(Boolean).join(" "), w = T();
|
|
623
|
+
w.bg(o), w.text.on(o), b !== void 0 && w.set("--uui-badge-offset", `${b}px`), p !== void 0 && C.push(at(p)), i !== void 0 && (C.push(tt(i)), w.border(ct(s)));
|
|
624
|
+
const F = C.filter(Boolean).join(" "), k = /* @__PURE__ */ r("span", { "aria-label": c, className: F, style: w.get(), children: m !== "small" && m !== "extraSmall" && a });
|
|
625
|
+
return t ? /* @__PURE__ */ L("span", { className: x, ...g, children: [
|
|
626
|
+
t,
|
|
627
|
+
/* @__PURE__ */ r("span", { className: h, children: k })
|
|
628
|
+
] }) : k;
|
|
629
|
+
};
|
|
630
|
+
On.displayName = "Badge";
|
|
631
|
+
const zr = (e) => ({
|
|
632
|
+
topLeft: "uui-top-left",
|
|
633
|
+
topCenter: "uui-top-center",
|
|
634
|
+
topRight: "uui-top-right",
|
|
635
|
+
topRightOut: "uui-top-right-out",
|
|
636
|
+
topLeftOut: "uui-top-left-out",
|
|
637
|
+
centerLeft: "uui-center-left",
|
|
638
|
+
center: "uui-center",
|
|
639
|
+
centerRight: "uui-center-right",
|
|
640
|
+
bottomLeft: "uui-bottom-left",
|
|
641
|
+
bottomCenter: "uui-bottom-center",
|
|
642
|
+
bottomRight: "uui-bottom-right",
|
|
643
|
+
auto: "uui-top-right"
|
|
644
|
+
})[e], Pn = (e) => {
|
|
645
|
+
switch (e) {
|
|
646
|
+
case "square":
|
|
647
|
+
return "uui-square";
|
|
648
|
+
case "smooth":
|
|
649
|
+
return "uui-smooth";
|
|
650
|
+
case "rounded":
|
|
651
|
+
return "uui-rounded";
|
|
652
|
+
case "round":
|
|
653
|
+
return "uui-round";
|
|
654
|
+
default:
|
|
655
|
+
return "";
|
|
656
|
+
}
|
|
657
|
+
}, Yr = (e) => {
|
|
658
|
+
switch (e) {
|
|
659
|
+
case "large":
|
|
660
|
+
return "uui-font-body-large";
|
|
661
|
+
case "medium":
|
|
662
|
+
return "uui-font-body-medium";
|
|
663
|
+
default:
|
|
664
|
+
return "uui-font-body-small";
|
|
665
|
+
}
|
|
666
|
+
}, Jr = (e) => ({
|
|
667
|
+
extraSmall: "uui-extra-small",
|
|
668
|
+
small: "uui-small",
|
|
669
|
+
medium: "uui-medium",
|
|
670
|
+
large: "uui-large",
|
|
671
|
+
extraLarge: "uui-extra-large"
|
|
672
|
+
})[e], Un = (e) => {
|
|
673
|
+
const t = Hn(0, 5, e);
|
|
674
|
+
return t === void 0 ? "" : `uui-border-${t}`;
|
|
675
|
+
}, Qr = (e) => +e > 0 || +e < 5 ? `uui-outline-${String(e)}` : "uui-outline-0", Wn = (e) => {
|
|
676
|
+
switch (e) {
|
|
677
|
+
case 0:
|
|
678
|
+
return "uui-elevation-0";
|
|
679
|
+
case 1:
|
|
680
|
+
return "uui-elevation-1";
|
|
681
|
+
case 2:
|
|
682
|
+
return "uui-elevation-2";
|
|
683
|
+
case 3:
|
|
684
|
+
return "uui-elevation-3";
|
|
685
|
+
case 4:
|
|
686
|
+
return "uui-elevation-4";
|
|
687
|
+
case 5:
|
|
688
|
+
return "uui-elevation-5";
|
|
689
|
+
default:
|
|
690
|
+
return "";
|
|
691
|
+
}
|
|
692
|
+
}, ei = (e) => {
|
|
693
|
+
switch (e) {
|
|
694
|
+
case "compact":
|
|
695
|
+
return "uui-compact";
|
|
696
|
+
case "dense":
|
|
697
|
+
return "uui-dense";
|
|
698
|
+
default:
|
|
699
|
+
return "";
|
|
700
|
+
}
|
|
701
|
+
}, Tt = (e) => ({
|
|
702
|
+
displayLarge: "uui-font-display-large",
|
|
703
|
+
displayMedium: "uui-font-display-medium",
|
|
704
|
+
displaySmall: "uui-font-display-small",
|
|
705
|
+
headlineLarge: "uui-font-headline-large",
|
|
706
|
+
headlineMedium: "uui-font-headline-medium",
|
|
707
|
+
headlineSmall: "uui-font-headline-small",
|
|
708
|
+
titleLarge: "uui-font-title-large",
|
|
709
|
+
titleMedium: "uui-font-title-medium",
|
|
710
|
+
titleSmall: "uui-font-title-small",
|
|
711
|
+
labelLarge: "uui-font-label-large",
|
|
712
|
+
labelMedium: "uui-font-label-medium",
|
|
713
|
+
labelSmall: "uui-font-label-small",
|
|
714
|
+
bodyLarge: "uui-font-body-large",
|
|
715
|
+
bodyMedium: "uui-font-body-medium",
|
|
716
|
+
bodySmall: "uui-font-body-small",
|
|
717
|
+
caption: "uui-font-caption",
|
|
718
|
+
overline: "uui-font-overline"
|
|
719
|
+
})[e];
|
|
720
|
+
function ti(...e) {
|
|
721
|
+
return (t) => {
|
|
722
|
+
e.forEach((n) => {
|
|
723
|
+
if (typeof n == "function")
|
|
724
|
+
n(t);
|
|
725
|
+
else if (n) {
|
|
726
|
+
const i = n;
|
|
727
|
+
i.current = t;
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
const ni = (e, t, n) => {
|
|
733
|
+
const i = n ?? e, s = i.querySelector(".ripple-container");
|
|
734
|
+
s && s.remove();
|
|
735
|
+
const o = e.getBoundingClientRect(), u = i.getBoundingClientRect(), l = t.clientX - o.left, m = t.clientY - o.top, p = l >= 0 && l <= o.width && m >= 0 && m <= o.height, c = p ? l : o.width / 2, a = p ? m : o.height / 2, f = Math.sqrt(o.width * o.width + o.height * o.height), b = f / 2, g = document.createElement("div");
|
|
736
|
+
g.className = "ripple-container", g.style.position = "absolute", g.style.pointerEvents = "none", g.style.overflow = "hidden", g.style.width = `${o.width}px`, g.style.height = `${o.height}px`, g.style.left = `${o.left - u.left}px`, g.style.top = `${o.top - u.top}px`, requestAnimationFrame(() => {
|
|
737
|
+
g.style.borderRadius = getComputedStyle(e).borderRadius;
|
|
738
|
+
});
|
|
739
|
+
const x = document.createElement("span");
|
|
740
|
+
x.className = "ripple", x.style.position = "absolute", x.style.width = `${f}px`, x.style.height = `${f}px`, x.style.left = `${c - b}px`, x.style.top = `${a - b}px`, g.appendChild(x), i.appendChild(g), x.addEventListener("animationend", () => {
|
|
741
|
+
g.remove();
|
|
742
|
+
});
|
|
743
|
+
}, ri = (e) => (
|
|
744
|
+
// eslint-disable-next-line sonarjs/pseudo-random
|
|
745
|
+
`${e}_${Math.floor((1 + Math.random()) * 65536).toString(16).substring(1)}`
|
|
746
|
+
);
|
|
747
|
+
function nn(e) {
|
|
748
|
+
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
749
|
+
}
|
|
750
|
+
function ii(e) {
|
|
751
|
+
if (!vt(e))
|
|
752
|
+
return;
|
|
753
|
+
const t = e.type;
|
|
754
|
+
if (typeof t == "function" && "displayName" in t)
|
|
755
|
+
return t.displayName;
|
|
756
|
+
const n = t;
|
|
757
|
+
if (n && typeof n == "object" && "type" in n) {
|
|
758
|
+
const i = n.type;
|
|
759
|
+
if (typeof i == "function" && "displayName" in i)
|
|
760
|
+
return i.displayName;
|
|
761
|
+
}
|
|
762
|
+
if (n && typeof n == "object" && "render" in n) {
|
|
763
|
+
const i = n.render;
|
|
764
|
+
if (typeof i == "function" && "displayName" in i)
|
|
765
|
+
return i.displayName;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
function oi(e) {
|
|
769
|
+
e && (e.classList.remove("uui-focus-visible"), e.focus(), e.classList.add("uui-focus-visible"), e.addEventListener(
|
|
770
|
+
"blur",
|
|
771
|
+
() => {
|
|
772
|
+
e.classList.remove("uui-focus-visible");
|
|
773
|
+
},
|
|
774
|
+
{ once: !0 }
|
|
775
|
+
));
|
|
776
|
+
}
|
|
777
|
+
function Hn(e, t, n, i) {
|
|
778
|
+
const s = Number(n);
|
|
779
|
+
return Number.isFinite(s) ? Math.min(t, Math.max(e, Math.round(s))) : i;
|
|
780
|
+
}
|
|
781
|
+
const qn = A(
|
|
782
|
+
({
|
|
783
|
+
children: e,
|
|
784
|
+
className: t = "",
|
|
785
|
+
color: n = "error",
|
|
786
|
+
position: i = "topRight",
|
|
787
|
+
shape: s = "round",
|
|
788
|
+
size: o = "medium",
|
|
789
|
+
outlined: u,
|
|
790
|
+
raised: l,
|
|
791
|
+
filled: m = !0,
|
|
792
|
+
value: p,
|
|
793
|
+
...c
|
|
794
|
+
}, a) => {
|
|
795
|
+
const { bgColor: f, textOnColor: b, textColor: g } = Vn(n);
|
|
796
|
+
return Zt(n), /* @__PURE__ */ r("span", { className: ["uui-card-wrapper"].join(" "), ref: a, ...c, children: e });
|
|
797
|
+
}
|
|
798
|
+
);
|
|
799
|
+
qn.displayName = "Card";
|
|
800
|
+
const gn = Ht(null), Dt = Ht(null);
|
|
801
|
+
let rn = !1, Wt = "pointer";
|
|
802
|
+
function Zn() {
|
|
803
|
+
rn || typeof window > "u" || (rn = !0, window.addEventListener(
|
|
804
|
+
"keydown",
|
|
805
|
+
() => {
|
|
806
|
+
Wt = "keyboard";
|
|
807
|
+
},
|
|
808
|
+
!0
|
|
809
|
+
), window.addEventListener(
|
|
810
|
+
"pointerdown",
|
|
811
|
+
() => {
|
|
812
|
+
Wt = "pointer";
|
|
813
|
+
},
|
|
814
|
+
!0
|
|
815
|
+
));
|
|
816
|
+
}
|
|
817
|
+
function _n() {
|
|
818
|
+
return Wt;
|
|
819
|
+
}
|
|
820
|
+
function jt() {
|
|
821
|
+
return Zn(), Nn(
|
|
822
|
+
() => () => {
|
|
823
|
+
},
|
|
824
|
+
() => _n() === "keyboard",
|
|
825
|
+
() => !1
|
|
826
|
+
);
|
|
827
|
+
}
|
|
828
|
+
function Kn(e = {}) {
|
|
829
|
+
const { action: t = "idle" } = e, [n, i] = ee("idle"), [s, o] = ee(!1), { t1: u = 0, t2: l, oneShot: m = !1 } = e, p = l ?? Math.round(u * 0.67), c = ce(null), a = () => c.current !== null ? (clearTimeout(c.current), c.current = null, !0) : !1, f = xt(
|
|
830
|
+
(h) => {
|
|
831
|
+
function w(k, V) {
|
|
832
|
+
c.current = window.setTimeout(() => {
|
|
833
|
+
i(k);
|
|
834
|
+
}, V);
|
|
835
|
+
}
|
|
836
|
+
if (a() && o(!0), m) {
|
|
837
|
+
u ? (w("open", u), i("opening")) : i((k) => k === "opening" ? "open" : "opening");
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
if (u) {
|
|
841
|
+
const k = (
|
|
842
|
+
// eslint-disable-next-line sonarjs/no-nested-conditional,no-nested-ternary
|
|
843
|
+
h === "closed" ? !0 : h === "open" ? !1 : n === "open" || n === "opening"
|
|
844
|
+
), V = k ? "closing" : "opening", O = k ? "closed" : "open";
|
|
845
|
+
i(V), w(O, O === "open" ? u : p);
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
i((k) => {
|
|
849
|
+
switch (k) {
|
|
850
|
+
case "idle":
|
|
851
|
+
case "closed":
|
|
852
|
+
return "opening";
|
|
853
|
+
case "opening":
|
|
854
|
+
return "open";
|
|
855
|
+
case "open":
|
|
856
|
+
return "closing";
|
|
857
|
+
case "closing":
|
|
858
|
+
return "closed";
|
|
859
|
+
default:
|
|
860
|
+
return k;
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
},
|
|
864
|
+
[m, n, u, p]
|
|
865
|
+
);
|
|
866
|
+
be(() => {
|
|
867
|
+
s && o(!1);
|
|
868
|
+
}, [s]), be(() => {
|
|
869
|
+
t !== "idle" && f(t === "open" ? "open" : "closed");
|
|
870
|
+
}, []);
|
|
871
|
+
const b = n === "closing", g = n === "opening";
|
|
872
|
+
return {
|
|
873
|
+
opening: g,
|
|
874
|
+
closing: b,
|
|
875
|
+
animating: (g || b) && !s,
|
|
876
|
+
idle: n === "idle",
|
|
877
|
+
animationVars: {
|
|
878
|
+
"--uui-duration": `${g ? u : p}ms`,
|
|
879
|
+
"--uui-reverse": b ? "reverse" : "normal"
|
|
880
|
+
},
|
|
881
|
+
animate: f
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
const _t = A((e, t) => {
|
|
885
|
+
const {
|
|
886
|
+
elementClass: n,
|
|
887
|
+
density: i,
|
|
888
|
+
icon: s,
|
|
889
|
+
disabled: o,
|
|
890
|
+
elevation: u,
|
|
891
|
+
checked: l,
|
|
892
|
+
children: m,
|
|
893
|
+
color: p,
|
|
894
|
+
uncheckedColor: c,
|
|
895
|
+
defaultChecked: a,
|
|
896
|
+
indeterminate: f,
|
|
897
|
+
hoverEffects: b = ["overlay"],
|
|
898
|
+
touchEffects: g = ["ripple"],
|
|
899
|
+
focusEffects: x = ["ring"],
|
|
900
|
+
selectedEffects: $ = [],
|
|
901
|
+
pressedEffects: C = ["overlay"],
|
|
902
|
+
id: h,
|
|
903
|
+
name: w,
|
|
904
|
+
label: F,
|
|
905
|
+
font: k,
|
|
906
|
+
border: V,
|
|
907
|
+
borderColor: O,
|
|
908
|
+
uncheckedBorder: q,
|
|
909
|
+
uncheckedBorderColor: M,
|
|
910
|
+
onChange: E,
|
|
911
|
+
onClick: v,
|
|
912
|
+
type: y,
|
|
913
|
+
required: S,
|
|
914
|
+
shape: I = "smooth",
|
|
915
|
+
title: Z,
|
|
916
|
+
filled: U,
|
|
917
|
+
value: X,
|
|
918
|
+
size: we = "small",
|
|
919
|
+
uncheckedIcon: he,
|
|
920
|
+
indeterminateIcon: K,
|
|
921
|
+
description: Me,
|
|
922
|
+
descriptionColor: De,
|
|
923
|
+
descriptionFont: D,
|
|
924
|
+
className: P,
|
|
925
|
+
error: Q,
|
|
926
|
+
animation: fe,
|
|
927
|
+
duration: de = 150,
|
|
928
|
+
motionStyle: j = "regular",
|
|
929
|
+
focusColor: Ve,
|
|
930
|
+
labelColor: Fe,
|
|
931
|
+
textColor: z,
|
|
932
|
+
readOnly: te,
|
|
933
|
+
tooltipAlign: W = "auto",
|
|
934
|
+
textPlacement: ie = "end",
|
|
935
|
+
"aria-label": We,
|
|
936
|
+
...oe
|
|
937
|
+
} = e, { animationVars: ne, animate: xe, animating: He } = Kn({ t1: de, oneShot: !0 }), _ = Lt(gn), me = y === "radio" ? w ?? (_ == null ? void 0 : _.name) : w, Ee = Lt(Dt), Re = o ?? (Ee == null ? void 0 : Ee.disabled), se = jt(), [Se, Ce] = ee(!1), Ne = ce(null), ke = ce(null), pe = ce(null), qe = ce(St("check")), ge = h ?? qe.current, Be = l !== void 0, [Le, Ze] = ee(a ?? !1);
|
|
938
|
+
let le;
|
|
939
|
+
Be ? le = !!l : (_ == null ? void 0 : _.value) !== void 0 ? le = _.value === X : le = Le;
|
|
940
|
+
const N = f ? "indeterminate" : le ? "checked" : "unchecked", [Y, Te] = ee(N), G = We ?? (F ? void 0 : Z), Je = Q ? "error" : !le && !f && c ? c : p, _e = Z ? /* @__PURE__ */ r("div", { id: `${ge}-tip`, children: Z }) : null, H = (Ue) => {
|
|
941
|
+
if (te) {
|
|
942
|
+
Ue.preventDefault();
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
const rt = Ue.currentTarget;
|
|
946
|
+
Be || (y === "radio" && (_ != null && _.setValue) && _.setValue(rt.value), Ze(rt.checked)), E == null || E(Ue);
|
|
947
|
+
}, ae = (Ue) => {
|
|
948
|
+
if (te) {
|
|
949
|
+
Ue.preventDefault();
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
g.includes("ripple") && pe.current && ke.current && wt(pe.current, Ue, ke.current), v == null || v(Ue);
|
|
953
|
+
}, Ae = (Ue) => {
|
|
954
|
+
var rt;
|
|
955
|
+
Ce(!0), (rt = e.onFocus) == null || rt.call(e, Ue);
|
|
956
|
+
}, Oe = (Ue) => {
|
|
957
|
+
var rt;
|
|
958
|
+
Ce(!1), (rt = e.onBlur) == null || rt.call(e, Ue);
|
|
959
|
+
};
|
|
960
|
+
be(() => {
|
|
961
|
+
N !== Y && fe && xe();
|
|
962
|
+
}, [N, Y, fe, xe]), be(() => {
|
|
963
|
+
He || Te(N);
|
|
964
|
+
}, [He, N]);
|
|
965
|
+
const Pe = T(), J = [
|
|
966
|
+
n,
|
|
967
|
+
"uui-cb",
|
|
968
|
+
ft(i),
|
|
969
|
+
P,
|
|
970
|
+
Re && "uui-disabled",
|
|
971
|
+
...m ? [] : [Ct(we)]
|
|
972
|
+
].filter(Boolean).join(" "), ze = [
|
|
973
|
+
"uui-cb-control",
|
|
974
|
+
le && "uui-checked",
|
|
975
|
+
f && "uui-indeterminate",
|
|
976
|
+
U && "uui-filled",
|
|
977
|
+
...b.includes("overlay") && !te ? ["uui-hover-overlay"] : [],
|
|
978
|
+
...x.includes("overlay") && se && Se ? ["uui-focus-overlay"] : [],
|
|
979
|
+
...$.includes("overlay") ? ["uui-selected-overlay"] : [],
|
|
980
|
+
...C.includes("overlay") && !te ? ["uui-pressed-overlay"] : [],
|
|
981
|
+
...m ? [je(I)] : ["uui-round"]
|
|
982
|
+
].filter(Boolean).join(" "), Ie = T();
|
|
983
|
+
Ve && se && Se && Ie.set("--uui-focus-color", pn(Ve).color);
|
|
984
|
+
const re = [
|
|
985
|
+
"uui-input",
|
|
986
|
+
x.includes("ring") && se && Se && "uui-focus-visible uui-focus-ring"
|
|
987
|
+
].filter(Boolean).join(" "), Qe = ["uui-state"].filter(Boolean).join(" "), Ge = T();
|
|
988
|
+
Ge.bg(Je);
|
|
989
|
+
const ot = [
|
|
990
|
+
"uui-cb-glyph",
|
|
991
|
+
at(u),
|
|
992
|
+
je(I),
|
|
993
|
+
tt(le ? V : q)
|
|
994
|
+
].filter(Boolean).join(" "), nt = T(), pt = Tn(fe), Ke = ["uui-icon", He && pt, Mn(j)].filter(Boolean).join(" "), ue = T();
|
|
995
|
+
ue.merge(ne), le || f || c ? (nt.border(Q ? "error" : O), U ? (!le && !he && !f || nt.bg(Je), ue.text.on(Je)) : ue.text(Je)) : (U && he ? (ue.text(Q ? "onError" : "surface"), nt.bg(Q ? "error" : "onSurfaceVariant")) : he && ue.text(Q ? "error" : "onSurfaceVariant"), nt.border(Q ? "error" : M));
|
|
996
|
+
let Ye;
|
|
997
|
+
if (m) {
|
|
998
|
+
const Ue = ["uui-cb-content uui-overflow-hidden", je(I), tt(V)].filter(Boolean).join(" ");
|
|
999
|
+
Ye = /* @__PURE__ */ r("div", { className: Ue, children: m });
|
|
1000
|
+
} else {
|
|
1001
|
+
const Ue = (
|
|
1002
|
+
// eslint-disable-next-line sonarjs/no-nested-conditional,no-nested-ternary
|
|
1003
|
+
Y === "indeterminate" ? K : Y === "checked" ? s : he
|
|
1004
|
+
);
|
|
1005
|
+
Ye = /* @__PURE__ */ r("div", { className: ot, style: nt.get(), children: /* @__PURE__ */ r("div", { className: Ke, style: ue.get(), children: Ue }) });
|
|
1006
|
+
}
|
|
1007
|
+
const gt = T();
|
|
1008
|
+
gt.text((Q ? "error" : void 0) ?? Fe ?? z ?? "onSurface");
|
|
1009
|
+
const $t = [$e(k ?? "bodyMedium"), "uui-cb-label"].join(" "), Ft = F && /* @__PURE__ */ L("label", { className: $t, htmlFor: ge, style: gt.get(), children: [
|
|
1010
|
+
F,
|
|
1011
|
+
S && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
|
|
1012
|
+
] }), st = T();
|
|
1013
|
+
Q ? st.text("error") : De ? st.text(De) : st.text.on("surfaceVariant");
|
|
1014
|
+
const Rt = [
|
|
1015
|
+
$e(D ?? "bodySmall"),
|
|
1016
|
+
Q && "uui-error uui-support-text",
|
|
1017
|
+
Me && !Q && "uui-description uui-support-text"
|
|
1018
|
+
].filter(Boolean).join(" "), Nt = (Me ?? Q) && /* @__PURE__ */ r("div", { className: Rt, style: st.get(), children: Q ?? Me }), At = (Ft ?? Nt) && /* @__PURE__ */ L(et, { children: [
|
|
1019
|
+
Ft,
|
|
1020
|
+
Nt
|
|
1021
|
+
] }), dt = T();
|
|
1022
|
+
return ie === "end" ? (gt.set("gridColumn", 2), st.set("gridColumn", 2), dt.set("gridColumn", 1)) : ie === "start" ? (gt.set("gridColumn", 1), st.set("gridColumn", 1), dt.set("gridColumn", 2), dt.set("gridRow", 1)) : (Pe.set("gridTemplateColumns", "1fr"), Pe.set("justifyItems", "start")), ie === "top" && (dt.set("order", 1), st.set("order", 2)), /* @__PURE__ */ L("div", { className: J, style: Pe.get(), children: [
|
|
1023
|
+
/* @__PURE__ */ r("div", { className: "uui-cb-control-wrapper", style: dt.get(), children: /* @__PURE__ */ L("div", { className: ze, ref: ke, style: Ie.get(), children: [
|
|
1024
|
+
/* @__PURE__ */ r(
|
|
1025
|
+
"input",
|
|
1026
|
+
{
|
|
1027
|
+
"aria-label": G,
|
|
1028
|
+
"aria-readonly": te === !0 ? !0 : void 0,
|
|
1029
|
+
checked: !!le,
|
|
1030
|
+
className: re,
|
|
1031
|
+
disabled: Re,
|
|
1032
|
+
id: ge,
|
|
1033
|
+
name: me,
|
|
1034
|
+
onBlur: Oe,
|
|
1035
|
+
onChange: H,
|
|
1036
|
+
onClick: ae,
|
|
1037
|
+
onFocus: Ae,
|
|
1038
|
+
readOnly: te,
|
|
1039
|
+
ref: mt(Ne, t),
|
|
1040
|
+
type: y,
|
|
1041
|
+
value: X,
|
|
1042
|
+
...oe
|
|
1043
|
+
}
|
|
1044
|
+
),
|
|
1045
|
+
/* @__PURE__ */ r("div", { className: Qe, ref: pe, style: Ge.get() }),
|
|
1046
|
+
Ye
|
|
1047
|
+
] }) }),
|
|
1048
|
+
At,
|
|
1049
|
+
_e && /* @__PURE__ */ r(kt, { align: W, tooltip: _e, triggerRef: Ne })
|
|
1050
|
+
] });
|
|
1051
|
+
});
|
|
1052
|
+
_t.displayName = "CheckBoxBase";
|
|
1053
|
+
const Gn = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "3 3 18 18", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r("path", { d: "M10 16.4L6 12.4L7.4 11L10 13.6L16.6 7L18 8.4L10 16.4Z", fill: "currentColor" }) }), Xn = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "3 3 18 18", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r("path", { d: "M6 13V11H18V13H6Z", fill: "currentColor" }) }), zn = A(
|
|
1054
|
+
({
|
|
1055
|
+
shape: e = "smooth",
|
|
1056
|
+
border: t,
|
|
1057
|
+
uncheckedBorder: n,
|
|
1058
|
+
color: i,
|
|
1059
|
+
borderColor: s,
|
|
1060
|
+
animation: o,
|
|
1061
|
+
uncheckedBorderColor: u,
|
|
1062
|
+
uncheckedIcon: l,
|
|
1063
|
+
indeterminateIcon: m,
|
|
1064
|
+
indeterminate: p,
|
|
1065
|
+
icon: c,
|
|
1066
|
+
size: a = "small",
|
|
1067
|
+
filled: f = !0,
|
|
1068
|
+
...b
|
|
1069
|
+
}, g) => {
|
|
1070
|
+
const x = i ?? "primary", $ = !c && t === void 0 ? void 0 : t;
|
|
1071
|
+
let C;
|
|
1072
|
+
return p ? C = t : C = !l && n === void 0 ? t ?? 2 : n, /* @__PURE__ */ r(
|
|
1073
|
+
_t,
|
|
1074
|
+
{
|
|
1075
|
+
animation: o ?? "scale",
|
|
1076
|
+
border: $,
|
|
1077
|
+
borderColor: s ?? x,
|
|
1078
|
+
color: x,
|
|
1079
|
+
elementClass: "uui-checkbox",
|
|
1080
|
+
filled: f,
|
|
1081
|
+
icon: c ?? Gn,
|
|
1082
|
+
indeterminate: p,
|
|
1083
|
+
indeterminateIcon: m ?? Xn,
|
|
1084
|
+
ref: g,
|
|
1085
|
+
shape: e,
|
|
1086
|
+
size: a,
|
|
1087
|
+
type: "checkbox",
|
|
1088
|
+
uncheckedBorder: C,
|
|
1089
|
+
uncheckedBorderColor: u ?? s ?? "onSurfaceVariant",
|
|
1090
|
+
uncheckedIcon: l,
|
|
1091
|
+
...b
|
|
1092
|
+
}
|
|
1093
|
+
);
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
zn.displayName = "Checkbox";
|
|
1097
|
+
function Yn(e) {
|
|
1098
|
+
const t = jt(), [n, i] = ee(!1);
|
|
1099
|
+
return be(() => {
|
|
1100
|
+
const s = e.current;
|
|
1101
|
+
if (!s)
|
|
1102
|
+
return;
|
|
1103
|
+
const o = () => {
|
|
1104
|
+
i(!0);
|
|
1105
|
+
}, u = () => {
|
|
1106
|
+
i(!1);
|
|
1107
|
+
};
|
|
1108
|
+
return s.addEventListener("focus", o, !0), s.addEventListener("blur", u, !0), () => {
|
|
1109
|
+
s.removeEventListener("focus", o, !0), s.removeEventListener("blur", u, !0);
|
|
1110
|
+
};
|
|
1111
|
+
}, [e]), {
|
|
1112
|
+
isFocused: n,
|
|
1113
|
+
focusVisible: t
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
const ut = A((e, t) => {
|
|
1117
|
+
const {
|
|
1118
|
+
elementClass: n,
|
|
1119
|
+
color: i,
|
|
1120
|
+
density: s,
|
|
1121
|
+
label: o,
|
|
1122
|
+
labelColor: u,
|
|
1123
|
+
labelFont: l,
|
|
1124
|
+
id: m,
|
|
1125
|
+
outlined: p,
|
|
1126
|
+
filled: c,
|
|
1127
|
+
classic: a,
|
|
1128
|
+
disabled: f,
|
|
1129
|
+
font: b,
|
|
1130
|
+
placeholderFont: g,
|
|
1131
|
+
placeholderColor: x,
|
|
1132
|
+
border: $,
|
|
1133
|
+
borderColor: C,
|
|
1134
|
+
shape: h,
|
|
1135
|
+
required: w,
|
|
1136
|
+
title: F,
|
|
1137
|
+
description: k,
|
|
1138
|
+
descriptionColor: V,
|
|
1139
|
+
descriptionFont: O,
|
|
1140
|
+
name: q,
|
|
1141
|
+
error: M,
|
|
1142
|
+
className: E,
|
|
1143
|
+
placeholder: v,
|
|
1144
|
+
type: y = "text",
|
|
1145
|
+
icon: S,
|
|
1146
|
+
leading: I,
|
|
1147
|
+
trailing: Z,
|
|
1148
|
+
endIcon: U,
|
|
1149
|
+
variant: X,
|
|
1150
|
+
value: we,
|
|
1151
|
+
textColor: he,
|
|
1152
|
+
defaultValue: K,
|
|
1153
|
+
...Me
|
|
1154
|
+
} = e, [De, D] = ee(K ?? ""), P = we !== void 0, fe = (P ? we : De).length === 0, de = ce(null), j = ce(null), Ve = m ?? St("input"), [Fe, z] = ee(0), te = I ?? S, W = X ?? (c && "filled") ?? (p && "outlined") ?? (a && "classic") ?? "filled", { isFocused: ie } = Yn(de), We = (H) => {
|
|
1155
|
+
var ae;
|
|
1156
|
+
P || D(H.target.value), (ae = e.onChange) == null || ae.call(e, H);
|
|
1157
|
+
}, oe = (H) => {
|
|
1158
|
+
var ae;
|
|
1159
|
+
H.preventDefault(), (ae = de.current) == null || ae.focus();
|
|
1160
|
+
};
|
|
1161
|
+
be(() => {
|
|
1162
|
+
const H = de.current;
|
|
1163
|
+
H && H.value && D(H.value);
|
|
1164
|
+
}, []), ln(() => {
|
|
1165
|
+
const H = j.current, ae = de.current;
|
|
1166
|
+
if (!H || !ae)
|
|
1167
|
+
return;
|
|
1168
|
+
const Ae = H.getBoundingClientRect().left - ae.getBoundingClientRect().left + 16;
|
|
1169
|
+
z((Oe) => Oe === Ae ? Oe : Ae);
|
|
1170
|
+
}, [te]);
|
|
1171
|
+
const ne = [
|
|
1172
|
+
n,
|
|
1173
|
+
E,
|
|
1174
|
+
"uui-field uui-field-wrapper",
|
|
1175
|
+
`uui-${W}`,
|
|
1176
|
+
ft(s)
|
|
1177
|
+
], xe = te && /* @__PURE__ */ r("div", { className: "uui-leading", children: lt.Children.map(
|
|
1178
|
+
te,
|
|
1179
|
+
(H) => H ? /* @__PURE__ */ r(
|
|
1180
|
+
"span",
|
|
1181
|
+
{
|
|
1182
|
+
className: "uui-slot",
|
|
1183
|
+
onClick: (ae) => {
|
|
1184
|
+
ae.stopPropagation();
|
|
1185
|
+
},
|
|
1186
|
+
children: H
|
|
1187
|
+
}
|
|
1188
|
+
) : null
|
|
1189
|
+
) }), He = Z ?? U, _ = He && /* @__PURE__ */ r("div", { className: "uui-trailing", children: lt.Children.map(
|
|
1190
|
+
He,
|
|
1191
|
+
(H) => H ? /* @__PURE__ */ r(
|
|
1192
|
+
"span",
|
|
1193
|
+
{
|
|
1194
|
+
className: "uui-slot",
|
|
1195
|
+
onClick: (ae) => {
|
|
1196
|
+
ae.stopPropagation();
|
|
1197
|
+
},
|
|
1198
|
+
children: H
|
|
1199
|
+
}
|
|
1200
|
+
) : null
|
|
1201
|
+
) }), me = o && /* @__PURE__ */ L(et, { children: [
|
|
1202
|
+
o,
|
|
1203
|
+
w && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
|
|
1204
|
+
] }), Ee = $ ?? (W !== "filled" ? 1 : void 0), Re = [
|
|
1205
|
+
"uui-field-control",
|
|
1206
|
+
$e(b ?? "bodyLarge"),
|
|
1207
|
+
je(h ?? "rounded"),
|
|
1208
|
+
W !== "outlined" && tt(Ee),
|
|
1209
|
+
M && "uui-error",
|
|
1210
|
+
ie && "uui-active",
|
|
1211
|
+
f && "uui-disabled",
|
|
1212
|
+
xe && "uui-has-leading",
|
|
1213
|
+
_ && "uui-has-trailing"
|
|
1214
|
+
];
|
|
1215
|
+
let se, Se, Ce, Ne;
|
|
1216
|
+
const ke = T(), pe = ["uui-fb-label"];
|
|
1217
|
+
if (me)
|
|
1218
|
+
if (W !== "classic")
|
|
1219
|
+
ie || !fe ? (ke.text((M ? "error" : void 0) ?? i ?? "primary"), pe.push($e(l ?? "bodySmall")), Re.push("uui-fb-label-up")) : (ke.text((M ? "error" : void 0) ?? "onSurfaceVariant"), pe.push($e(b ?? "bodyLarge"))), pe.push("uui-field-float-label"), W === "outlined" ? (Ce = /* @__PURE__ */ r("legend", { className: $e(l ?? "bodySmall"), children: me }), se = /* @__PURE__ */ r("span", { className: pe.join(" "), children: me })) : (Se = /* @__PURE__ */ r("span", { className: $e(l ?? "bodySmall"), children: " " }), se = /* @__PURE__ */ r("span", { className: pe.join(" "), children: me }));
|
|
1220
|
+
else {
|
|
1221
|
+
ke.text((M ? "error" : void 0) ?? "onSurface"), pe.push($e(l ?? "bodyMedium"));
|
|
1222
|
+
const H = pe.filter(Boolean).join(" ");
|
|
1223
|
+
Ne = /* @__PURE__ */ r("label", { className: H, htmlFor: Ve, style: ke.get(), children: me });
|
|
1224
|
+
}
|
|
1225
|
+
let qe;
|
|
1226
|
+
if (W === "outlined") {
|
|
1227
|
+
const H = ["uui-field-fieldset", je(h ?? "rounded")].filter(Boolean).join(" "), ae = T(), Ae = cn(0, 4, $, 1);
|
|
1228
|
+
ae.set("borderWidth", `${Ae}px`), ae.border(C ?? "onSurfaceVariant"), qe = /* @__PURE__ */ r("fieldset", { className: H, style: ae.get(), children: Ce });
|
|
1229
|
+
}
|
|
1230
|
+
const ge = T();
|
|
1231
|
+
ge.set("--uui-label-up-x", `${Fe}px`), W === "classic" && ge.border(C ?? "outline"), W === "filled" && ge.border(C ?? "onSurfaceVariant");
|
|
1232
|
+
const Be = ["uui-field-state"].filter(Boolean).join(" "), Le = T(), Ze = T();
|
|
1233
|
+
M ? Ze.text("error") : V ? Ze.text(V) : Ze.text.on("surfaceVariant");
|
|
1234
|
+
const le = [
|
|
1235
|
+
$e(O ?? "bodySmall"),
|
|
1236
|
+
M && "uui-error uui-support-text",
|
|
1237
|
+
k && !M && "uui-description uui-support-text"
|
|
1238
|
+
].filter(Boolean).join(" "), N = (k ?? M) && /* @__PURE__ */ r("div", { className: le, style: Ze.get(), children: M ?? k }), Y = "uui-field-input", Te = T();
|
|
1239
|
+
Te.text("onSurface"), !ie && se && fe && Te.set("opacity", 0);
|
|
1240
|
+
const G = ["uui-field-input-wrapper"].filter(Boolean).join(" "), Je = ne.filter(Boolean).join(" "), _e = Re.filter(Boolean).join(" ");
|
|
1241
|
+
return /* @__PURE__ */ L("div", { className: Je, title: F, children: [
|
|
1242
|
+
Ne,
|
|
1243
|
+
/* @__PURE__ */ L("div", { className: _e, onPointerDown: oe, ref: j, style: ge.get(), children: [
|
|
1244
|
+
xe,
|
|
1245
|
+
/* @__PURE__ */ L("div", { className: G, children: [
|
|
1246
|
+
Se,
|
|
1247
|
+
se,
|
|
1248
|
+
/* @__PURE__ */ r(
|
|
1249
|
+
"input",
|
|
1250
|
+
{
|
|
1251
|
+
...Me,
|
|
1252
|
+
...P ? { value: we } : { defaultValue: K },
|
|
1253
|
+
"aria-invalid": !!M,
|
|
1254
|
+
autoComplete: "email",
|
|
1255
|
+
className: Y,
|
|
1256
|
+
disabled: f,
|
|
1257
|
+
id: Ve,
|
|
1258
|
+
name: q,
|
|
1259
|
+
onChange: We,
|
|
1260
|
+
placeholder: v,
|
|
1261
|
+
ref: mt(t, de),
|
|
1262
|
+
style: Te.get(),
|
|
1263
|
+
type: y
|
|
1264
|
+
}
|
|
1265
|
+
)
|
|
1266
|
+
] }),
|
|
1267
|
+
_,
|
|
1268
|
+
W === "filled" && /* @__PURE__ */ r("div", { className: Be, style: Le.get() }),
|
|
1269
|
+
qe
|
|
1270
|
+
] }),
|
|
1271
|
+
N
|
|
1272
|
+
] });
|
|
1273
|
+
});
|
|
1274
|
+
ut.displayName = "FieldBase";
|
|
1275
|
+
const si = A((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, type: "date", className: "UIDateInput" })), li = A((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, type: "datetime-local", className: "UIDateTimeInput" })), ai = A((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, type: "email", className: "UIFormEmailInput" })), Jn = A(
|
|
1276
|
+
({ elevation: e = 3, font: t, size: n = "medium", shape: i = "rounded", label: s, ...o }, u) => /* @__PURE__ */ r(
|
|
1277
|
+
yt,
|
|
1278
|
+
{
|
|
1279
|
+
ref: u,
|
|
1280
|
+
...o,
|
|
1281
|
+
elementClass: s ? "uui-fab uui-fab-extended" : "uui-fab",
|
|
1282
|
+
elevation: e,
|
|
1283
|
+
font: t ?? {
|
|
1284
|
+
extraSmall: "labelLarge",
|
|
1285
|
+
small: "titleMedium",
|
|
1286
|
+
medium: "titleMedium",
|
|
1287
|
+
large: "headlineSmall",
|
|
1288
|
+
extraLarge: "headlineLarge"
|
|
1289
|
+
}[n],
|
|
1290
|
+
label: s,
|
|
1291
|
+
shape: i,
|
|
1292
|
+
size: n
|
|
1293
|
+
}
|
|
1294
|
+
)
|
|
1295
|
+
);
|
|
1296
|
+
Jn.displayName = "Fab";
|
|
1297
|
+
const Qn = A(
|
|
1298
|
+
({
|
|
1299
|
+
"aria-label": e,
|
|
1300
|
+
endIcon: t,
|
|
1301
|
+
trailing: n,
|
|
1302
|
+
loading: i,
|
|
1303
|
+
size: s = "small",
|
|
1304
|
+
shape: o = "round",
|
|
1305
|
+
label: u,
|
|
1306
|
+
title: l,
|
|
1307
|
+
children: m,
|
|
1308
|
+
...p
|
|
1309
|
+
}, c) => /* @__PURE__ */ r(
|
|
1310
|
+
yt,
|
|
1311
|
+
{
|
|
1312
|
+
ref: c,
|
|
1313
|
+
...p,
|
|
1314
|
+
"aria-label": e ?? u,
|
|
1315
|
+
elementClass: "uui-icon-button",
|
|
1316
|
+
loading: i,
|
|
1317
|
+
shape: o,
|
|
1318
|
+
size: s,
|
|
1319
|
+
title: l,
|
|
1320
|
+
children: !i && m
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1323
|
+
);
|
|
1324
|
+
Qn.displayName = "IconButton";
|
|
1325
|
+
const er = A(
|
|
1326
|
+
({ selected: e = !1, shape: t = "rounded", size: n = "medium", ...i }, s) => /* @__PURE__ */ r(
|
|
1327
|
+
yt,
|
|
1328
|
+
{
|
|
1329
|
+
ref: s,
|
|
1330
|
+
...i,
|
|
1331
|
+
"aria-pressed": e,
|
|
1332
|
+
elementClass: `uui-toggle-button${e ? " uui-selected" : ""}`,
|
|
1333
|
+
filled: e,
|
|
1334
|
+
shape: t,
|
|
1335
|
+
size: n
|
|
1336
|
+
}
|
|
1337
|
+
)
|
|
1338
|
+
);
|
|
1339
|
+
er.displayName = "ToggleButton";
|
|
1340
|
+
const Kt = Symbol.for("uui.menuitem");
|
|
1341
|
+
function Pt(e) {
|
|
1342
|
+
return vt(e) && typeof e.type != "string" && !!e.type[Kt];
|
|
1343
|
+
}
|
|
1344
|
+
const hn = Symbol.for("uui.divider");
|
|
1345
|
+
function Ut(e) {
|
|
1346
|
+
return vt(e) && typeof e.type != "string" && !!e.type[hn];
|
|
1347
|
+
}
|
|
1348
|
+
const Cn = Symbol.for("uui.menu");
|
|
1349
|
+
function ht(e) {
|
|
1350
|
+
return vt(e) && typeof e.type != "string" && !!e.type[Cn];
|
|
1351
|
+
}
|
|
1352
|
+
function yn(e, t, n = {}) {
|
|
1353
|
+
const { placement: i = "topCenter", offset: s = 8, mode: o = "tooltip" } = n, u = 12, l = {
|
|
1354
|
+
tooltip: ["topCenter", "bottomCenter", "centerRight", "centerLeft"],
|
|
1355
|
+
dropdown: ["bottomCenter", "topCenter", "centerRight", "centerLeft"],
|
|
1356
|
+
menu: ["bottomLeft", "bottomRight", "topLeft", "topRight", "centerRight", "centerLeft"],
|
|
1357
|
+
submenu: ["topRightOut", "topLeftOut", "centerRight", "centerLeft", "bottomCenter", "topCenter"]
|
|
1358
|
+
}, m = i === "auto" ? l[o] : [i, ...l[o]], p = e.current, c = t.current;
|
|
1359
|
+
if (!p || !c)
|
|
1360
|
+
return null;
|
|
1361
|
+
const a = p.getBoundingClientRect(), f = c.getBoundingClientRect(), b = window.innerWidth, g = window.innerHeight, x = (C) => {
|
|
1362
|
+
let h = 0, w = 0;
|
|
1363
|
+
switch (C) {
|
|
1364
|
+
case "topCenter":
|
|
1365
|
+
h = a.left + (a.width - f.width) / 2, w = a.top - f.height - s;
|
|
1366
|
+
break;
|
|
1367
|
+
case "topLeft":
|
|
1368
|
+
h = a.left, w = a.top - f.height - s;
|
|
1369
|
+
break;
|
|
1370
|
+
case "topRight":
|
|
1371
|
+
h = a.right - f.width, w = a.top - f.height - s;
|
|
1372
|
+
break;
|
|
1373
|
+
case "bottomCenter":
|
|
1374
|
+
h = a.left + (a.width - f.width) / 2, w = a.bottom + s;
|
|
1375
|
+
break;
|
|
1376
|
+
case "bottomLeft":
|
|
1377
|
+
h = a.left, w = a.bottom + s;
|
|
1378
|
+
break;
|
|
1379
|
+
case "bottomRight":
|
|
1380
|
+
h = a.right - f.width, w = a.bottom + s;
|
|
1381
|
+
break;
|
|
1382
|
+
case "centerLeft":
|
|
1383
|
+
h = a.left - f.width - s, w = a.top + (a.height - f.height) / 2;
|
|
1384
|
+
break;
|
|
1385
|
+
case "centerRight":
|
|
1386
|
+
h = a.right + s, w = a.top + (a.height - f.height) / 2;
|
|
1387
|
+
break;
|
|
1388
|
+
case "center":
|
|
1389
|
+
h = a.left + (a.width - f.width) / 2, w = a.top + (a.height - f.height) / 2;
|
|
1390
|
+
break;
|
|
1391
|
+
case "topRightOut":
|
|
1392
|
+
h = a.right + s, w = a.top;
|
|
1393
|
+
break;
|
|
1394
|
+
case "topLeftOut":
|
|
1395
|
+
h = a.left - f.width - s, w = a.top;
|
|
1396
|
+
break;
|
|
1397
|
+
}
|
|
1398
|
+
return { x: h, y: w, placement: C };
|
|
1399
|
+
};
|
|
1400
|
+
for (const C of m) {
|
|
1401
|
+
const h = x(C), w = h.x >= 0 && h.x + f.width <= b, F = h.y >= 0 && h.y + f.height <= g;
|
|
1402
|
+
let k = !1;
|
|
1403
|
+
if (C === "centerLeft" || C === "centerRight" ? k = w : C === "topCenter" || C === "bottomCenter" || C === "center" ? k = F : k = w && F, k)
|
|
1404
|
+
return h.x = Math.max(u, Math.min(h.x, b - f.width - u)), h.y = Math.max(u, Math.min(h.y, g - f.height - u)), h;
|
|
1405
|
+
}
|
|
1406
|
+
const $ = x(i);
|
|
1407
|
+
return $.x = Math.max(u, Math.min($.x, b - f.width - u)), $.y = Math.max(u, Math.min($.y, g - f.height - u)), $;
|
|
1408
|
+
}
|
|
1409
|
+
function tr(e, t, n, i) {
|
|
1410
|
+
be(() => {
|
|
1411
|
+
if (!e)
|
|
1412
|
+
return;
|
|
1413
|
+
const s = (o) => {
|
|
1414
|
+
var p, c;
|
|
1415
|
+
const u = o.target;
|
|
1416
|
+
if (Array.isArray(t)) {
|
|
1417
|
+
const a = t.some((b) => {
|
|
1418
|
+
var g;
|
|
1419
|
+
return (g = b.current) == null ? void 0 : g.contains(u);
|
|
1420
|
+
}), f = ((p = i == null ? void 0 : i.current) == null ? void 0 : p.contains(u)) ?? !1;
|
|
1421
|
+
!a && !f && n();
|
|
1422
|
+
return;
|
|
1423
|
+
}
|
|
1424
|
+
const l = !!u.closest(t), m = ((c = i == null ? void 0 : i.current) == null ? void 0 : c.contains(u)) ?? !1;
|
|
1425
|
+
!l && !m && n();
|
|
1426
|
+
};
|
|
1427
|
+
return document.addEventListener("mousedown", s), () => {
|
|
1428
|
+
document.removeEventListener("mousedown", s);
|
|
1429
|
+
};
|
|
1430
|
+
}, [e, t, n, i]);
|
|
1431
|
+
}
|
|
1432
|
+
const nr = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, Gt = A(
|
|
1433
|
+
({
|
|
1434
|
+
anchorRef: e,
|
|
1435
|
+
open: t = !1,
|
|
1436
|
+
horizontal: n = !1,
|
|
1437
|
+
placement: i = "auto",
|
|
1438
|
+
floatingMode: s,
|
|
1439
|
+
offset: o = 4,
|
|
1440
|
+
color: u,
|
|
1441
|
+
elevation: l,
|
|
1442
|
+
dockedElevation: m,
|
|
1443
|
+
shape: p,
|
|
1444
|
+
border: c,
|
|
1445
|
+
borderColor: a,
|
|
1446
|
+
className: f,
|
|
1447
|
+
children: b,
|
|
1448
|
+
style: g,
|
|
1449
|
+
id: x,
|
|
1450
|
+
onClose: $,
|
|
1451
|
+
variant: C = "classic",
|
|
1452
|
+
animation: h = "scale",
|
|
1453
|
+
duration: w,
|
|
1454
|
+
motionStyle: F = "regular",
|
|
1455
|
+
fixedLeading: k,
|
|
1456
|
+
density: V,
|
|
1457
|
+
__level: O,
|
|
1458
|
+
__groupId: q,
|
|
1459
|
+
__closeRootMenu: M,
|
|
1460
|
+
__navigateHorizontal: E,
|
|
1461
|
+
__horizontalDepth: v,
|
|
1462
|
+
docked: y,
|
|
1463
|
+
textColor: S,
|
|
1464
|
+
descriptionColor: I,
|
|
1465
|
+
labelColor: Z,
|
|
1466
|
+
shortcutColor: U,
|
|
1467
|
+
uncheckedIcon: X,
|
|
1468
|
+
checkedIcon: we,
|
|
1469
|
+
radioUncheckedIcon: he,
|
|
1470
|
+
radioCheckedIcon: K,
|
|
1471
|
+
selectedColor: Me,
|
|
1472
|
+
itemTouchEffects: De,
|
|
1473
|
+
itemSelectedEffects: D,
|
|
1474
|
+
itemFocusEffects: P,
|
|
1475
|
+
closeOnChange: Q = !1,
|
|
1476
|
+
openOnHover: fe = !0,
|
|
1477
|
+
labelFont: de,
|
|
1478
|
+
font: j,
|
|
1479
|
+
descriptionFont: Ve,
|
|
1480
|
+
shortcutFont: Fe,
|
|
1481
|
+
...z
|
|
1482
|
+
}, te) => {
|
|
1483
|
+
const W = ce("closed"), [ie, We] = ee(-1), [oe, ne] = ee(-1), [xe, He] = ee(!1), _ = jt(), me = O ?? 0, Ee = ce(x ?? St("menu")).current, Re = q ?? Ee, se = ce(null), Se = ce(null), [Ce, Ne] = ee(null), ke = ie === -1, [pe, qe] = ee(!1), [ge, Be] = ee(!1), [Le, Ze] = ee("normal"), [le, N] = ee(!1), [Y, Te] = ee(-1), G = u ?? (C === "modern" ? "surfaceContainerLow" : "surfaceContainer"), Je = (y ? m : void 0) ?? l ?? (C === "modern" ? 3 : 2), [_e, H] = ee(!1), ae = h !== "none" ? w ?? 220 : 0, Ae = y ? 0 : ae, Oe = ce(null), Pe = ce(null), J = ie !== -1;
|
|
1484
|
+
function ze(d) {
|
|
1485
|
+
return Pt(d) || Ut(d);
|
|
1486
|
+
}
|
|
1487
|
+
const Ie = lt.Children.toArray(b).filter(ze), re = Ie.reduce((d, B, R) => (Pt(B) && (B.props.disabled || d.push(R)), d), []);
|
|
1488
|
+
function Qe() {
|
|
1489
|
+
J && (H(!0), We(-1));
|
|
1490
|
+
}
|
|
1491
|
+
function Ge() {
|
|
1492
|
+
$ == null || $(), !$ && J && (Qe(), ne(-1)), me === 0 && (e != null && e.current) && e.current.focus();
|
|
1493
|
+
}
|
|
1494
|
+
function ot() {
|
|
1495
|
+
M ? M() : Ge();
|
|
1496
|
+
}
|
|
1497
|
+
function nt(d) {
|
|
1498
|
+
return !se.current || d === -1 ? null : se.current.querySelector(`[data-menu-index="${String(d)}"]`);
|
|
1499
|
+
}
|
|
1500
|
+
function pt(d) {
|
|
1501
|
+
const R = lt.Children.toArray(Ie[d].props.children).find((it) => ht(it));
|
|
1502
|
+
return vt(R) ? lt.Children.toArray(R.props.children).filter((it) => Ut(it) || ze(it)) : void 0;
|
|
1503
|
+
}
|
|
1504
|
+
function Ke(d) {
|
|
1505
|
+
if (d === -1 || re.indexOf(d) === -1)
|
|
1506
|
+
return;
|
|
1507
|
+
if (J) {
|
|
1508
|
+
Te(d), Qe();
|
|
1509
|
+
return;
|
|
1510
|
+
}
|
|
1511
|
+
const R = pt(d);
|
|
1512
|
+
if (!R || R.length === 0)
|
|
1513
|
+
return;
|
|
1514
|
+
const ve = nt(d);
|
|
1515
|
+
ve && (Se.current = ve, H(!0), We(d), setTimeout(() => {
|
|
1516
|
+
H(!1);
|
|
1517
|
+
}, ae));
|
|
1518
|
+
}
|
|
1519
|
+
function ue(d) {
|
|
1520
|
+
return d < 0 ? !1 : lt.Children.toArray(Ie[d].props.children).some((R) => ht(R));
|
|
1521
|
+
}
|
|
1522
|
+
function Ye(d) {
|
|
1523
|
+
if (oe === -1)
|
|
1524
|
+
return;
|
|
1525
|
+
const B = re.indexOf(oe);
|
|
1526
|
+
if (B === -1)
|
|
1527
|
+
return;
|
|
1528
|
+
let R;
|
|
1529
|
+
d ? R = re[B + 1 < re.length ? B + 1 : 0] : R = B > 0 ? re[B - 1] : re[re.length - 1], R !== oe && (ne(R), ue(R) ? Ke(R) : Qe());
|
|
1530
|
+
}
|
|
1531
|
+
be(() => {
|
|
1532
|
+
J || setTimeout(() => {
|
|
1533
|
+
N(!0);
|
|
1534
|
+
}, ae * 0.67);
|
|
1535
|
+
}, [ae, J]), be(() => {
|
|
1536
|
+
var d;
|
|
1537
|
+
!J && le && (N(!1), We(-1), Y !== -1 ? (Te(-1), Ke(Y)) : (d = se.current) == null || d.focus(), H(!1));
|
|
1538
|
+
}, [le, Y, J]), be(() => {
|
|
1539
|
+
t ? (W.current = "opening", H(!0), Ze("normal"), qe(!0), We(-1), Be(!1), ne(-1)) : (W.current = "closing", H(!0), Be(!1), Ze("reverse"));
|
|
1540
|
+
}, [t]), be(() => {
|
|
1541
|
+
if (!t || !pe || !se.current)
|
|
1542
|
+
return;
|
|
1543
|
+
const d = () => {
|
|
1544
|
+
const B = s ?? (n ? "dropdown" : "menu");
|
|
1545
|
+
if (e != null && e.current) {
|
|
1546
|
+
const R = yn(e, se, {
|
|
1547
|
+
placement: i,
|
|
1548
|
+
mode: B,
|
|
1549
|
+
offset: o
|
|
1550
|
+
});
|
|
1551
|
+
R && Ne({ x: R.x, y: R.y });
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
return y ? Ne({ x: 0, y: 0 }) : (window.addEventListener("resize", d), d()), Be(!0), () => {
|
|
1555
|
+
y || window.removeEventListener("resize", d);
|
|
1556
|
+
};
|
|
1557
|
+
}, [e, y, s, n, o, t, i, pe]), be(() => {
|
|
1558
|
+
t && pe && Ce && setTimeout(() => {
|
|
1559
|
+
var d;
|
|
1560
|
+
W.current === "opening" && (H(!1), W.current = "opened", y || (d = se.current) == null || d.focus(), ne(_ ? re[0] ?? -1 : -1));
|
|
1561
|
+
}, Ae);
|
|
1562
|
+
}, [t, Ce, pe]), be(() => {
|
|
1563
|
+
Le === "reverse" && W.current === "closing" && (Be(!0), ne(-1), setTimeout(() => {
|
|
1564
|
+
W.current === "closing" && (W.current = "closed", qe(!1), Ne(null), H(!1));
|
|
1565
|
+
}, ae * 0.67));
|
|
1566
|
+
}, [ae, Le]), be(() => {
|
|
1567
|
+
if (oe < 0 || !xe || W.current !== "opened")
|
|
1568
|
+
return;
|
|
1569
|
+
const d = nt(oe);
|
|
1570
|
+
d && (d.focus({ preventScroll: !0 }), d.scrollIntoView({
|
|
1571
|
+
block: "nearest",
|
|
1572
|
+
inline: "nearest"
|
|
1573
|
+
}), setTimeout(() => {
|
|
1574
|
+
var B;
|
|
1575
|
+
(B = se.current) == null || B.focus({ preventScroll: !0 });
|
|
1576
|
+
}, 0));
|
|
1577
|
+
}, [oe, xe]), be(() => {
|
|
1578
|
+
xe && _ && oe === -1 && W.current === "opened" && re.length > 0 && ne(re[0]);
|
|
1579
|
+
}, [oe, _, xe]);
|
|
1580
|
+
function gt(d) {
|
|
1581
|
+
He(!0);
|
|
1582
|
+
}
|
|
1583
|
+
tr(
|
|
1584
|
+
t && me === 0,
|
|
1585
|
+
`[data-menu-group="${Re}"]`,
|
|
1586
|
+
() => {
|
|
1587
|
+
ot();
|
|
1588
|
+
},
|
|
1589
|
+
e
|
|
1590
|
+
);
|
|
1591
|
+
function $t(d) {
|
|
1592
|
+
var R, ve, it, tn;
|
|
1593
|
+
const B = d;
|
|
1594
|
+
B !== -1 && (Ie[B].props.disabled || (ne(B), ue(B) ? J && B === ie ? Qe() : Ke(B) : Ie[B].props.type === "radio" || Ie[B].props.type === "checkbox" || Ie[B].props.type === "option" ? ((ve = (R = Ie[B].props).onChange) == null || ve.call(R), Q && ot()) : ((tn = (it = Ie[B].props).onClick) == null || tn.call(it), ot())));
|
|
1595
|
+
}
|
|
1596
|
+
function Ft(d, B) {
|
|
1597
|
+
if (_e) {
|
|
1598
|
+
d == null || d.preventDefault();
|
|
1599
|
+
return;
|
|
1600
|
+
}
|
|
1601
|
+
$t(B);
|
|
1602
|
+
}
|
|
1603
|
+
function st(d, B) {
|
|
1604
|
+
if (!(!fe || _ && xe)) {
|
|
1605
|
+
if (Pe.current && (clearTimeout(Pe.current), Pe.current = null), Oe.current && (clearTimeout(Oe.current), Oe.current = null), !ue(B)) {
|
|
1606
|
+
J && (Pe.current = window.setTimeout(() => {
|
|
1607
|
+
Qe();
|
|
1608
|
+
}, 150));
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1611
|
+
J && ie === B || (Oe.current = window.setTimeout(() => {
|
|
1612
|
+
ne(B), Ke(B);
|
|
1613
|
+
}, 150));
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
function Rt() {
|
|
1617
|
+
Pe.current && (clearTimeout(Pe.current), Pe.current = null), Oe.current && (clearTimeout(Oe.current), Oe.current = null);
|
|
1618
|
+
}
|
|
1619
|
+
const Nt = Ie.some(
|
|
1620
|
+
(d) => d.props.icon !== void 0 || d.props.leading !== void 0 || d.props.type === "radio" || d.props.type === "checkbox"
|
|
1621
|
+
), At = Ie.map((d, B) => {
|
|
1622
|
+
if (Pt(d)) {
|
|
1623
|
+
const R = {
|
|
1624
|
+
"data-menu-index": B,
|
|
1625
|
+
__interactionsDisabled: _e,
|
|
1626
|
+
__index: B,
|
|
1627
|
+
disabled: d.props.disabled,
|
|
1628
|
+
active: B === oe && xe,
|
|
1629
|
+
focusVisible: _ && xe,
|
|
1630
|
+
horizontal: n,
|
|
1631
|
+
expanded: J && ie === B,
|
|
1632
|
+
fixedLeading: d.props.fixedLeading ?? (k && Nt),
|
|
1633
|
+
variant: d.props.variant ?? C,
|
|
1634
|
+
shape: d.props.shape ?? p,
|
|
1635
|
+
color: d.props.color ?? u,
|
|
1636
|
+
density: d.props.density ?? V,
|
|
1637
|
+
shortcutColor: d.props.shortcutColor ?? U,
|
|
1638
|
+
textColor: d.props.textColor ?? S,
|
|
1639
|
+
labelColor: d.props.labelColor ?? Z,
|
|
1640
|
+
descriptionColor: d.props.descriptionColor ?? I,
|
|
1641
|
+
checkedIcon: d.props.checkedIcon ?? (d.props.type === "checkbox" ? we : K),
|
|
1642
|
+
uncheckedIcon: d.props.uncheckedIcon ?? (d.props.type === "checkbox" ? X : he),
|
|
1643
|
+
selectedColor: d.props.selectedColor ?? Me,
|
|
1644
|
+
touchEffects: d.props.touchEffects ?? De,
|
|
1645
|
+
selectedEffects: d.props.selectedEffects ?? D,
|
|
1646
|
+
focusEffects: d.props.focusEffects ?? P,
|
|
1647
|
+
labelFont: d.props.labelFont ?? de,
|
|
1648
|
+
font: d.props.font ?? j,
|
|
1649
|
+
descriptionFont: d.props.descriptionFont ?? Ve,
|
|
1650
|
+
shortcutFont: d.props.shortcutFont ?? Fe,
|
|
1651
|
+
onClick: (ve) => {
|
|
1652
|
+
Ft(ve, B);
|
|
1653
|
+
},
|
|
1654
|
+
onMouseEnter: (ve) => {
|
|
1655
|
+
st(ve, B);
|
|
1656
|
+
},
|
|
1657
|
+
onMouseLeave: (ve) => {
|
|
1658
|
+
Rt();
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
return Ot(d, {
|
|
1662
|
+
...d.props,
|
|
1663
|
+
...R
|
|
1664
|
+
});
|
|
1665
|
+
} else if (Ut(d)) {
|
|
1666
|
+
const R = Et[G] === "onSurface" ? "outlineVariant" : Et[G], ve = {
|
|
1667
|
+
borderColor: d.props.borderColor ?? d.props.color ?? R,
|
|
1668
|
+
vertical: n,
|
|
1669
|
+
insetSize: d.props.insetSize ?? 8,
|
|
1670
|
+
spacing: d.props.spacing ?? (C === "modern" ? 5 : 8),
|
|
1671
|
+
inset: d.props.inset ?? (C === "modern" ? "middle" : void 0)
|
|
1672
|
+
};
|
|
1673
|
+
return Ot(d, { ...d.props, ...ve });
|
|
1674
|
+
}
|
|
1675
|
+
return Ot(d, {
|
|
1676
|
+
...d.props
|
|
1677
|
+
});
|
|
1678
|
+
});
|
|
1679
|
+
function dt(d) {
|
|
1680
|
+
d.target.closest("[data-menu-index]") || J && Qe();
|
|
1681
|
+
}
|
|
1682
|
+
const Ue = (d) => {
|
|
1683
|
+
if (!t || _e)
|
|
1684
|
+
return;
|
|
1685
|
+
let B = d.key;
|
|
1686
|
+
if (n) {
|
|
1687
|
+
const it = {
|
|
1688
|
+
ArrowDown: "ArrowRight",
|
|
1689
|
+
ArrowUp: "ArrowLeft",
|
|
1690
|
+
ArrowRight: "ArrowDown",
|
|
1691
|
+
ArrowLeft: "ArrowUp"
|
|
1692
|
+
};
|
|
1693
|
+
B = it[B] ? it[B] : B;
|
|
1694
|
+
}
|
|
1695
|
+
if (re.length === 0 && B !== "Tab")
|
|
1696
|
+
return;
|
|
1697
|
+
const R = re.indexOf(oe);
|
|
1698
|
+
let ve;
|
|
1699
|
+
switch (B) {
|
|
1700
|
+
case "ArrowUp":
|
|
1701
|
+
d.preventDefault(), oe === -1 || R === -1 ? ve = re[re.length - 1] : ve = R > 0 ? re[R - 1] : re[re.length - 1], ne(ve), n && ue(ve) && Ke(ve);
|
|
1702
|
+
break;
|
|
1703
|
+
case "ArrowDown":
|
|
1704
|
+
d.preventDefault(), oe === -1 || R === -1 ? ve = re[0] : ve = re[R + 1 < re.length ? R + 1 : 0], ne(ve), n && ue(ve) && Ke(ve);
|
|
1705
|
+
break;
|
|
1706
|
+
case "Home":
|
|
1707
|
+
ne(re[0]);
|
|
1708
|
+
break;
|
|
1709
|
+
case "End":
|
|
1710
|
+
ne(re[re.length - 1]);
|
|
1711
|
+
break;
|
|
1712
|
+
case "Enter":
|
|
1713
|
+
case " ":
|
|
1714
|
+
d.stopPropagation(), d.preventDefault(), R >= 0 && $t(re[R]);
|
|
1715
|
+
break;
|
|
1716
|
+
case "ArrowRight":
|
|
1717
|
+
d.preventDefault(), R >= 0 && ue(re[R]) ? Ke(re[R]) : E && E(!0);
|
|
1718
|
+
break;
|
|
1719
|
+
case "ArrowLeft":
|
|
1720
|
+
d.preventDefault(), E && v === 1 ? E(!1) : Ge();
|
|
1721
|
+
break;
|
|
1722
|
+
case "Escape":
|
|
1723
|
+
d.preventDefault(), Ge();
|
|
1724
|
+
break;
|
|
1725
|
+
case "Tab":
|
|
1726
|
+
y || (d.stopPropagation(), d.preventDefault()), ot();
|
|
1727
|
+
break;
|
|
1728
|
+
}
|
|
1729
|
+
};
|
|
1730
|
+
if (!t && !pe || !e && !y)
|
|
1731
|
+
return null;
|
|
1732
|
+
const rt = {
|
|
1733
|
+
"--uui-reverse": Le,
|
|
1734
|
+
"--uui-duration": Le === "reverse" ? String(Ae * 0.67) + "ms" : String(Ae) + "ms"
|
|
1735
|
+
}, Yt = nr(h), Sn = Yt === "none" ? "" : Mt[Yt], kn = F === "expressive" ? "uui-motion-expressive" : "", Bt = T({ ...g, ...rt });
|
|
1736
|
+
Bt.bg(G), Bt.text.on(G), c && +c > 0 && Bt.border(ct(a));
|
|
1737
|
+
const $n = [
|
|
1738
|
+
"uui-menu",
|
|
1739
|
+
`uui-menu-level-${String(me)}`,
|
|
1740
|
+
n && "uui-menu-horizontal",
|
|
1741
|
+
ke && "uui-menu-active",
|
|
1742
|
+
C === "modern" ? "uui-menu-modern" : "uui-menu-classic",
|
|
1743
|
+
ge && Sn,
|
|
1744
|
+
kn,
|
|
1745
|
+
ft(V),
|
|
1746
|
+
je(p ?? (C === "modern" ? "rounded" : "smooth")),
|
|
1747
|
+
at(Je),
|
|
1748
|
+
c !== void 0 ? tt(c) : null,
|
|
1749
|
+
f
|
|
1750
|
+
].filter(Boolean).join(" "), Jt = /* @__PURE__ */ r(
|
|
1751
|
+
"div",
|
|
1752
|
+
{
|
|
1753
|
+
"aria-orientation": n ? "horizontal" : "vertical",
|
|
1754
|
+
className: $n,
|
|
1755
|
+
"data-menu-group": Re,
|
|
1756
|
+
id: x,
|
|
1757
|
+
onBlur: () => {
|
|
1758
|
+
He(!1);
|
|
1759
|
+
},
|
|
1760
|
+
onClick: dt,
|
|
1761
|
+
onFocus: gt,
|
|
1762
|
+
onKeyDown: Ue,
|
|
1763
|
+
ref: mt(te, se),
|
|
1764
|
+
role: "menu",
|
|
1765
|
+
style: {
|
|
1766
|
+
position: y ? "relative" : "fixed",
|
|
1767
|
+
left: (Ce == null ? void 0 : Ce.x) ?? 0,
|
|
1768
|
+
top: (Ce == null ? void 0 : Ce.y) ?? 0,
|
|
1769
|
+
zIndex: 9999,
|
|
1770
|
+
visibility: Ce ? "visible" : "hidden",
|
|
1771
|
+
...Bt.get()
|
|
1772
|
+
},
|
|
1773
|
+
tabIndex: 0,
|
|
1774
|
+
...z,
|
|
1775
|
+
children: /* @__PURE__ */ r("div", { className: "uui-menu-scroll", children: At })
|
|
1776
|
+
}
|
|
1777
|
+
), Fn = document.getElementById("menu-root") ?? document.body;
|
|
1778
|
+
let Qt = null;
|
|
1779
|
+
if (ie !== -1) {
|
|
1780
|
+
const d = pt(ie);
|
|
1781
|
+
d && d.length > 0 && (Qt = d);
|
|
1782
|
+
}
|
|
1783
|
+
const en = qt(
|
|
1784
|
+
/* @__PURE__ */ L(et, { children: [
|
|
1785
|
+
!y && Jt,
|
|
1786
|
+
Se.current && ie !== -1 && /* @__PURE__ */ r(
|
|
1787
|
+
Gt,
|
|
1788
|
+
{
|
|
1789
|
+
__closeRootMenu: M ?? ot,
|
|
1790
|
+
__groupId: Re,
|
|
1791
|
+
__horizontalDepth: n ? 1 : v && v + 1,
|
|
1792
|
+
__level: me + 1,
|
|
1793
|
+
__navigateHorizontal: n ? Ye : E,
|
|
1794
|
+
anchorRef: Se,
|
|
1795
|
+
animation: h,
|
|
1796
|
+
"aria-orientation": "vertical",
|
|
1797
|
+
border: c,
|
|
1798
|
+
borderColor: a,
|
|
1799
|
+
checkedIcon: we,
|
|
1800
|
+
closeOnChange: Q,
|
|
1801
|
+
color: G,
|
|
1802
|
+
density: V,
|
|
1803
|
+
descriptionColor: I,
|
|
1804
|
+
descriptionFont: Ve,
|
|
1805
|
+
duration: w,
|
|
1806
|
+
elevation: l,
|
|
1807
|
+
fixedLeading: k,
|
|
1808
|
+
floatingMode: n ? "menu" : "submenu",
|
|
1809
|
+
font: j,
|
|
1810
|
+
itemFocusEffects: P,
|
|
1811
|
+
itemSelectedEffects: D,
|
|
1812
|
+
itemTouchEffects: De,
|
|
1813
|
+
labelColor: Z,
|
|
1814
|
+
labelFont: de,
|
|
1815
|
+
motionStyle: F,
|
|
1816
|
+
offset: 0,
|
|
1817
|
+
onClose: Qe,
|
|
1818
|
+
open: t && J,
|
|
1819
|
+
openOnHover: fe,
|
|
1820
|
+
placement: "auto",
|
|
1821
|
+
radioCheckedIcon: K,
|
|
1822
|
+
radioUncheckedIcon: he,
|
|
1823
|
+
role: "menu",
|
|
1824
|
+
selectedColor: Me,
|
|
1825
|
+
shape: p,
|
|
1826
|
+
shortcutColor: U,
|
|
1827
|
+
shortcutFont: Fe,
|
|
1828
|
+
textColor: S,
|
|
1829
|
+
uncheckedIcon: X,
|
|
1830
|
+
variant: C,
|
|
1831
|
+
children: Qt
|
|
1832
|
+
}
|
|
1833
|
+
)
|
|
1834
|
+
] }),
|
|
1835
|
+
Fn
|
|
1836
|
+
);
|
|
1837
|
+
return y && me === 0 ? /* @__PURE__ */ L(et, { children: [
|
|
1838
|
+
Jt,
|
|
1839
|
+
en
|
|
1840
|
+
] }) : en;
|
|
1841
|
+
}
|
|
1842
|
+
);
|
|
1843
|
+
Gt[Cn] = !0;
|
|
1844
|
+
Gt.displayName = "Menu";
|
|
1845
|
+
const Xt = (e) => {
|
|
1846
|
+
const {
|
|
1847
|
+
children: t,
|
|
1848
|
+
className: n,
|
|
1849
|
+
border: i,
|
|
1850
|
+
borderColor: s,
|
|
1851
|
+
color: o = "error",
|
|
1852
|
+
align: u = "topRight",
|
|
1853
|
+
shape: l = "round",
|
|
1854
|
+
size: m = "medium",
|
|
1855
|
+
elevation: p,
|
|
1856
|
+
ariaLabel: c,
|
|
1857
|
+
value: a,
|
|
1858
|
+
font: f,
|
|
1859
|
+
offset: b,
|
|
1860
|
+
...g
|
|
1861
|
+
} = e, x = "uui-badge", $ = f ?? (m === "extraLarge" || m === "large" ? "labelMedium" : "labelSmall"), C = [
|
|
1862
|
+
"uui-badge-control",
|
|
1863
|
+
n,
|
|
1864
|
+
je(l),
|
|
1865
|
+
Ct(m),
|
|
1866
|
+
$e($)
|
|
1867
|
+
], h = ["uui-badge-slot", un(u)].filter(Boolean).join(" "), w = T();
|
|
1868
|
+
w.bg(o), w.text.on(o), b !== void 0 && w.set("--uui-badge-offset", `${b}px`), p !== void 0 && C.push(at(p)), i !== void 0 && (C.push(tt(i)), w.border(ct(s)));
|
|
1869
|
+
const F = C.filter(Boolean).join(" "), k = /* @__PURE__ */ r("span", { "aria-label": c, className: F, style: w.get(), children: m !== "small" && m !== "extraSmall" && a });
|
|
1870
|
+
return t ? /* @__PURE__ */ L("span", { className: x, ...g, children: [
|
|
1871
|
+
t,
|
|
1872
|
+
/* @__PURE__ */ r("span", { className: h, children: k })
|
|
1873
|
+
] }) : k;
|
|
1874
|
+
};
|
|
1875
|
+
Xt.displayName = "Badge";
|
|
1876
|
+
const rr = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r("path", { d: "M10 17V7L15 12L10 17Z", fill: "currentColor" }) }), ir = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
|
|
1877
|
+
"path",
|
|
1878
|
+
{
|
|
1879
|
+
d: "M9.5501 18L3.8501 12.3L5.2751 10.875L9.5501 15.15L18.7251 5.97498L20.1501 7.39998L9.5501 18Z",
|
|
1880
|
+
fill: "currentColor"
|
|
1881
|
+
}
|
|
1882
|
+
) }), or = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
|
|
1883
|
+
"path",
|
|
1884
|
+
{
|
|
1885
|
+
d: "M12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",
|
|
1886
|
+
fill: "currentColor"
|
|
1887
|
+
}
|
|
1888
|
+
) }), sr = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
|
|
1889
|
+
"path",
|
|
1890
|
+
{
|
|
1891
|
+
d: "M12 17C13.3833 17 14.5625 16.5125 15.5375 15.5375C16.5125 14.5625 17 13.3833 17 12C17 10.6167 16.5125 9.4375 15.5375 8.4625C14.5625 7.4875 13.3833 7 12 7C10.6167 7 9.4375 7.4875 8.4625 8.4625C7.4875 9.4375 7 10.6167 7 12C7 13.3833 7.4875 14.5625 8.4625 15.5375C9.4375 16.5125 10.6167 17 12 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",
|
|
1892
|
+
fill: "currentColor"
|
|
1893
|
+
}
|
|
1894
|
+
) }), bn = A(
|
|
1895
|
+
({
|
|
1896
|
+
shape: e,
|
|
1897
|
+
touchEffects: t = ["ripple"],
|
|
1898
|
+
focusEffects: n = ["ring", "overlay"],
|
|
1899
|
+
selectedEffects: i = ["color"],
|
|
1900
|
+
checkedIcon: s,
|
|
1901
|
+
uncheckedIcon: o,
|
|
1902
|
+
selectedColor: u,
|
|
1903
|
+
textColor: l,
|
|
1904
|
+
labelColor: m,
|
|
1905
|
+
descriptionColor: p,
|
|
1906
|
+
shortcutColor: c,
|
|
1907
|
+
fixedLeading: a,
|
|
1908
|
+
color: f,
|
|
1909
|
+
icon: b,
|
|
1910
|
+
endIcon: g,
|
|
1911
|
+
leading: x,
|
|
1912
|
+
trailing: $,
|
|
1913
|
+
label: C,
|
|
1914
|
+
disabled: h = !1,
|
|
1915
|
+
className: w,
|
|
1916
|
+
onClick: F,
|
|
1917
|
+
badge: k,
|
|
1918
|
+
expanded: V,
|
|
1919
|
+
active: O,
|
|
1920
|
+
children: q,
|
|
1921
|
+
focusVisible: M,
|
|
1922
|
+
type: E = "item",
|
|
1923
|
+
checked: v,
|
|
1924
|
+
description: y,
|
|
1925
|
+
shortcut: S,
|
|
1926
|
+
density: I,
|
|
1927
|
+
horizontal: Z,
|
|
1928
|
+
labelFont: U,
|
|
1929
|
+
font: X,
|
|
1930
|
+
descriptionFont: we,
|
|
1931
|
+
shortcutFont: he,
|
|
1932
|
+
selected: K,
|
|
1933
|
+
__index: Me,
|
|
1934
|
+
__interactionsDisabled: De,
|
|
1935
|
+
onChange: D,
|
|
1936
|
+
variant: P = "classic",
|
|
1937
|
+
...Q
|
|
1938
|
+
}, fe) => {
|
|
1939
|
+
const de = ce(null), j = lt.Children.toArray(q), Ve = j.find((G) => ht(G)), Fe = j.filter((G) => !ht(G)), z = !!Ve;
|
|
1940
|
+
let te;
|
|
1941
|
+
E !== "item" && (E === "radio" ? te = v ? s ?? sr : o ?? or : E === "checkbox" && (te = v ? s ?? ir : o));
|
|
1942
|
+
const W = te ?? x ?? b ?? (a && !Z), ie = W && /* @__PURE__ */ r("div", { className: "uui-icon uui-leading", children: W }), We = $ ?? g;
|
|
1943
|
+
let oe;
|
|
1944
|
+
k && (typeof k == "string" || typeof k == "number" ? oe = /* @__PURE__ */ r(Xt, { value: k }) : oe = k);
|
|
1945
|
+
const ne = P === "modern" ? "labelLarge" : "bodyLarge", xe = U ?? X ?? ne, He = we ?? (P === "modern" ? "bodySmall" : "bodyMedium"), _ = he ?? ne, me = T();
|
|
1946
|
+
me.text(c);
|
|
1947
|
+
const Ee = z && !Z ? rr : We, Re = S && /* @__PURE__ */ r("div", { className: `uui-menu-item-shortcut ${$e(_)}`, style: me.get(), children: S }), se = (S ?? k ?? Ee) && /* @__PURE__ */ L(et, { children: [
|
|
1948
|
+
Re,
|
|
1949
|
+
oe,
|
|
1950
|
+
Ee && /* @__PURE__ */ r("div", { className: "uui-icon uui-trailing", children: Ee })
|
|
1951
|
+
] }), Se = T();
|
|
1952
|
+
Se.text(m);
|
|
1953
|
+
const Ce = C && /* @__PURE__ */ r("div", { className: `uui-menu-item-label ${$e(xe)}`, style: Se.get(), children: C }), Ne = T();
|
|
1954
|
+
(p || !l && P === "classic" && (f != null && f.startsWith("surface"))) && (p ? Ne.text(p) : Ne.text.on("surfaceVariant"));
|
|
1955
|
+
const ke = y && /* @__PURE__ */ r(
|
|
1956
|
+
"div",
|
|
1957
|
+
{
|
|
1958
|
+
className: `uui-menu-item-description ${$e(He)}`,
|
|
1959
|
+
style: Ne.get(),
|
|
1960
|
+
children: y
|
|
1961
|
+
}
|
|
1962
|
+
), pe = (Ce ?? ke) && /* @__PURE__ */ L("div", { className: "uui-menu-item-text", children: [
|
|
1963
|
+
Ce,
|
|
1964
|
+
ke
|
|
1965
|
+
] }), qe = (G) => {
|
|
1966
|
+
if (De || h) {
|
|
1967
|
+
G == null || G.preventDefault();
|
|
1968
|
+
return;
|
|
1969
|
+
}
|
|
1970
|
+
F == null || F(G), t.includes("ripple") && de.current && G && wt(de.current, G);
|
|
1971
|
+
};
|
|
1972
|
+
let ge = f ?? (P === "modern" ? "surfaceContainerLow" : "surfaceContainer");
|
|
1973
|
+
E === "option" && K && i.includes("color") && (ge = u ?? (P === "modern" ? "tertiaryContainer" : "secondaryContainer"));
|
|
1974
|
+
const Be = T();
|
|
1975
|
+
Be.bg.on(ge);
|
|
1976
|
+
const Le = T();
|
|
1977
|
+
Le.bg(ge), l ? Le.text(l) : Le.text.on(ge);
|
|
1978
|
+
const Ze = [
|
|
1979
|
+
"uui-menu-item",
|
|
1980
|
+
w,
|
|
1981
|
+
ft(I),
|
|
1982
|
+
h && "uui-disabled",
|
|
1983
|
+
P === "modern" ? "uui-menu-item-modern" : "uui-menu-item-classic"
|
|
1984
|
+
].filter(Boolean).join(" "), le = je(e ?? (P === "modern" ? "rounded" : "smooth")), N = [
|
|
1985
|
+
"uui-menu-item-content",
|
|
1986
|
+
le,
|
|
1987
|
+
...n.includes("ring") && O ? ["uui-focus-ring-in"] : [],
|
|
1988
|
+
...n.includes("overlay") && O ? ["uui-focus-overlay"] : [],
|
|
1989
|
+
O && "uui-active",
|
|
1990
|
+
O && M && "uui-focus-visible"
|
|
1991
|
+
].filter(Boolean).join(" "), Y = /* @__PURE__ */ L("div", { className: N, style: Le.get(), children: [
|
|
1992
|
+
Fe.length > 0 ? /* @__PURE__ */ r("div", { className: "uui-menu-item-children", children: Fe }) : /* @__PURE__ */ L(et, { children: [
|
|
1993
|
+
ie,
|
|
1994
|
+
pe,
|
|
1995
|
+
se
|
|
1996
|
+
] }),
|
|
1997
|
+
/* @__PURE__ */ r("div", { className: ["uui-state", le].join(" "), style: Be.get() })
|
|
1998
|
+
] });
|
|
1999
|
+
let Te = "menuitem";
|
|
2000
|
+
return (E === "radio" || E === "checkbox") && (Te = E === "radio" ? "menuitemradio" : "menuitemcheckbox"), // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
|
|
2001
|
+
/* @__PURE__ */ r(
|
|
2002
|
+
"div",
|
|
2003
|
+
{
|
|
2004
|
+
...Q,
|
|
2005
|
+
"aria-checked": E === "radio" || E === "checkbox" ? v ?? !1 : void 0,
|
|
2006
|
+
"aria-disabled": h ? "true" : void 0,
|
|
2007
|
+
"aria-expanded": z ? V : void 0,
|
|
2008
|
+
"aria-haspopup": z ? "menu" : void 0,
|
|
2009
|
+
className: Ze,
|
|
2010
|
+
onClick: qe,
|
|
2011
|
+
ref: mt(de, fe),
|
|
2012
|
+
role: Te,
|
|
2013
|
+
tabIndex: -1,
|
|
2014
|
+
children: Y
|
|
2015
|
+
}
|
|
2016
|
+
);
|
|
2017
|
+
}
|
|
2018
|
+
);
|
|
2019
|
+
bn[Kt] = !0;
|
|
2020
|
+
bn.displayName = "MenuItem";
|
|
2021
|
+
const xn = (e) => {
|
|
2022
|
+
const {
|
|
2023
|
+
className: t,
|
|
2024
|
+
borderColor: n,
|
|
2025
|
+
color: i,
|
|
2026
|
+
border: s = 1,
|
|
2027
|
+
inset: o = "none",
|
|
2028
|
+
insetSize: u = 16,
|
|
2029
|
+
spacing: l = 8,
|
|
2030
|
+
vertical: m,
|
|
2031
|
+
variant: p = "strong",
|
|
2032
|
+
elevation: c,
|
|
2033
|
+
shape: a,
|
|
2034
|
+
style: f,
|
|
2035
|
+
height: b,
|
|
2036
|
+
...g
|
|
2037
|
+
} = e, x = ce(null), [$, C] = ee(!1);
|
|
2038
|
+
ln(() => {
|
|
2039
|
+
const V = x.current;
|
|
2040
|
+
if (!(V != null && V.parentElement))
|
|
2041
|
+
return;
|
|
2042
|
+
const O = getComputedStyle(V.parentElement).display;
|
|
2043
|
+
C(O.includes("flex"));
|
|
2044
|
+
}, []);
|
|
2045
|
+
const h = Math.min(4, Math.max(0, s)), w = [
|
|
2046
|
+
"uui-divider",
|
|
2047
|
+
Un(h === 0 ? 0 : 1),
|
|
2048
|
+
t,
|
|
2049
|
+
c && Wn(c),
|
|
2050
|
+
a && Pn(a)
|
|
2051
|
+
].filter(Boolean).join(" "), F = T(f), k = ct(n ?? i ?? "outlineVariant");
|
|
2052
|
+
if (F.border(k), F.bg(k), p !== "strong" && (p === "subtle" ? F.set("opacity", "var(--uui-subtle-opacity)") : F.set("opacity", "var(--uui-medium-opacity)")), $ ? m ? F.merge({
|
|
2053
|
+
height: b,
|
|
2054
|
+
alignSelf: "stretch",
|
|
2055
|
+
width: `${h}px`,
|
|
2056
|
+
marginInline: `${l}px`
|
|
2057
|
+
}) : F.merge({ flex: "1 1 auto", height: `${h}px`, marginBlock: `${l}px` }) : m ? F.merge({
|
|
2058
|
+
height: b,
|
|
2059
|
+
display: "inline-block",
|
|
2060
|
+
verticalAlign: "middle",
|
|
2061
|
+
width: `${h}px`,
|
|
2062
|
+
marginInline: `${l}px`
|
|
2063
|
+
}) : F.merge({
|
|
2064
|
+
height: `${h}px`,
|
|
2065
|
+
marginBlock: `${l}px`
|
|
2066
|
+
}), o !== "none") {
|
|
2067
|
+
const V = o === "left" || o === "top" || o === "middle", O = o === "right" || o === "bottom" || o === "middle";
|
|
2068
|
+
V && (m ? F.set("marginBlockStart", `${u}px`) : F.set("marginInlineStart", `${u}px`)), O && (m ? F.set("marginBlockEnd", `${u}px`) : F.set("marginInlineEnd", `${u}px`));
|
|
2069
|
+
}
|
|
2070
|
+
return /* @__PURE__ */ r(
|
|
2071
|
+
"div",
|
|
2072
|
+
{
|
|
2073
|
+
"aria-hidden": "true",
|
|
2074
|
+
className: w,
|
|
2075
|
+
ref: x,
|
|
2076
|
+
role: "separator",
|
|
2077
|
+
style: F.get(),
|
|
2078
|
+
...g
|
|
2079
|
+
}
|
|
2080
|
+
);
|
|
2081
|
+
};
|
|
2082
|
+
xn[hn] = !0;
|
|
2083
|
+
xn.displayName = "Divider";
|
|
2084
|
+
const ui = A((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, type: "number", className: "UINumberInput" })), lr = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "2 2 20 20", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
|
|
2085
|
+
"path",
|
|
2086
|
+
{
|
|
2087
|
+
d: "M12 17C13.3833 17 14.5625 16.5125 15.5375 15.5375C16.5125 14.5625 17 13.3833 17 12C17 10.6167 16.5125 9.4375 15.5375 8.4625C14.5625 7.4875 13.3833 7 12 7C10.6167 7 9.4375 7.4875 8.4625 8.4625C7.4875 9.4375 7 10.6167 7 12C7 13.3833 7.4875 14.5625 8.4625 15.5375C9.4375 16.5125 10.6167 17 12 17Z",
|
|
2088
|
+
fill: "currentColor"
|
|
2089
|
+
}
|
|
2090
|
+
) }), ar = A(
|
|
2091
|
+
({
|
|
2092
|
+
uncheckedBorder: e,
|
|
2093
|
+
border: t,
|
|
2094
|
+
color: n,
|
|
2095
|
+
borderColor: i,
|
|
2096
|
+
uncheckedBorderColor: s,
|
|
2097
|
+
shape: o = "round",
|
|
2098
|
+
size: u = "small",
|
|
2099
|
+
filled: l = !1,
|
|
2100
|
+
icon: m,
|
|
2101
|
+
uncheckedIcon: p,
|
|
2102
|
+
animation: c,
|
|
2103
|
+
...a
|
|
2104
|
+
}, f) => {
|
|
2105
|
+
const b = n ?? "primary";
|
|
2106
|
+
return /* @__PURE__ */ r(
|
|
2107
|
+
_t,
|
|
2108
|
+
{
|
|
2109
|
+
animation: c ?? "scale",
|
|
2110
|
+
border: !m && t === void 0 ? 2 : t,
|
|
2111
|
+
borderColor: i ?? b,
|
|
2112
|
+
color: b,
|
|
2113
|
+
elementClass: "uui-radio",
|
|
2114
|
+
filled: l,
|
|
2115
|
+
icon: m ?? lr,
|
|
2116
|
+
indeterminateIcon: void 0,
|
|
2117
|
+
ref: f,
|
|
2118
|
+
shape: o,
|
|
2119
|
+
size: u,
|
|
2120
|
+
type: "radio",
|
|
2121
|
+
uncheckedBorder: e ?? t ?? (p ? void 0 : 2),
|
|
2122
|
+
uncheckedBorderColor: s ?? i ?? "onSurfaceVariant",
|
|
2123
|
+
uncheckedIcon: p,
|
|
2124
|
+
...a
|
|
2125
|
+
}
|
|
2126
|
+
);
|
|
2127
|
+
}
|
|
2128
|
+
);
|
|
2129
|
+
ar.displayName = "Radio";
|
|
2130
|
+
const ci = A((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, type: "tel", className: "UITelInput" })), ur = A(({ ...e }, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, elementClass: "uui-field" }));
|
|
2131
|
+
ur.displayName = "Field";
|
|
2132
|
+
const on = {
|
|
2133
|
+
darkMode: !1,
|
|
2134
|
+
schemes: { light: {}, dark: {} }
|
|
2135
|
+
}, vn = Ht(null);
|
|
2136
|
+
function cr(e = "#6750A4", t, n = {}) {
|
|
2137
|
+
var c, a, f, b, g, x, $, C, h, w, F, k, V, O, q, M, E;
|
|
2138
|
+
const i = { light: {}, dark: {} }, s = (c = n.light) != null && c.primary ? bt(n.light.primary) : bt(e), o = {
|
|
2139
|
+
info: "#03a9f4",
|
|
2140
|
+
warning: "#ffd600",
|
|
2141
|
+
success: "#689f38",
|
|
2142
|
+
...t
|
|
2143
|
+
}, u = [];
|
|
2144
|
+
Object.keys(o).forEach((v) => {
|
|
2145
|
+
var S;
|
|
2146
|
+
const y = (S = n.light) == null ? void 0 : S[v];
|
|
2147
|
+
y ? u.push({ value: bt(y), name: v, blend: !0 }) : u.push({
|
|
2148
|
+
value: bt(o[v]),
|
|
2149
|
+
name: v,
|
|
2150
|
+
blend: !0
|
|
2151
|
+
});
|
|
2152
|
+
}), ["secondary", "tertiary", "error"].forEach((v) => {
|
|
2153
|
+
var S;
|
|
2154
|
+
const y = (S = n.light) == null ? void 0 : S[v];
|
|
2155
|
+
y && u.push({ value: bt(y), name: v, blend: !0 });
|
|
2156
|
+
});
|
|
2157
|
+
const l = Bn(s, u);
|
|
2158
|
+
["light", "dark"].forEach((v) => {
|
|
2159
|
+
const y = v;
|
|
2160
|
+
mn.forEach((S) => {
|
|
2161
|
+
var I;
|
|
2162
|
+
(I = n[y]) != null && I[S] ? i[y][S] = n[y][S] : typeof l.schemes[y][S] == "number" && (i[y][S] = ye(
|
|
2163
|
+
l.schemes[y][S]
|
|
2164
|
+
));
|
|
2165
|
+
});
|
|
2166
|
+
}), i.light.scrim = "#00000052", i.dark.scrim = "#00000052", l.customColors.forEach((v) => {
|
|
2167
|
+
const y = v.color.name[0].toUpperCase() + v.color.name.slice(1), S = {
|
|
2168
|
+
color: v.color.name,
|
|
2169
|
+
onColor: `on${y}`,
|
|
2170
|
+
colorContainer: `${v.color.name}Container`,
|
|
2171
|
+
onColorContainer: `on${y}Container`
|
|
2172
|
+
};
|
|
2173
|
+
["light", "dark"].forEach((I) => {
|
|
2174
|
+
const Z = I;
|
|
2175
|
+
Object.keys(S).forEach((U) => {
|
|
2176
|
+
var X;
|
|
2177
|
+
i[I][S[U]] = ((X = n[I]) == null ? void 0 : X[S[U]]) ?? ye(v[Z][U]);
|
|
2178
|
+
});
|
|
2179
|
+
});
|
|
2180
|
+
}), ["primary", "secondary", "tertiary", "error"].forEach((v) => {
|
|
2181
|
+
const y = v[0].toUpperCase() + v.slice(1);
|
|
2182
|
+
["light", "dark"].forEach((S) => {
|
|
2183
|
+
var I, Z, U, X;
|
|
2184
|
+
i[S][`${v}Fixed`] = (I = n[S]) != null && I[`${v}Fixed`] ? n[S][`${v}Fixed`] : ye(l.palettes[v].tone(90)), i[S][`${v}FixedDim`] = (Z = n[S]) != null && Z[`${v}FixedDim`] ? n[S][`${v}FixedDim`] : ye(l.palettes[v].tone(80)), i[S][`on${y}Fixed`] = (U = n[S]) != null && U[`on${y}Fixed`] ? n[S][`on${y}Fixed`] : ye(l.palettes[v].tone(10)), i[S][`on${y}FixedVariant`] = (X = n[S]) != null && X[`on${y}FixedVariant`] ? n[S][`on${y}FixedVariant`] : ye(l.palettes[v].tone(30));
|
|
2185
|
+
});
|
|
2186
|
+
});
|
|
2187
|
+
const m = (v, y) => {
|
|
2188
|
+
const S = Ln.fromInt(v);
|
|
2189
|
+
return ye(S.tone(y));
|
|
2190
|
+
};
|
|
2191
|
+
l.customColors.forEach((v) => {
|
|
2192
|
+
const y = v.color.name, S = y[0].toUpperCase() + y.slice(1);
|
|
2193
|
+
["light", "dark"].forEach((I) => {
|
|
2194
|
+
var U, X, we, he;
|
|
2195
|
+
const Z = v[I].color;
|
|
2196
|
+
i[I][`${y}Fixed`] = (U = n[I]) != null && U[`${y}Fixed`] ? n[I][`${y}Fixed`] : m(Z, 90), i[I][`${y}FixedDim`] = (X = n[I]) != null && X[`${y}FixedDim`] ? n[I][`${y}FixedDim`] : m(Z, 80), i[I][`on${S}Fixed`] = (we = n[I]) != null && we[`on${S}Fixed`] ? n[I][`on${S}Fixed`] : m(Z, 10), i[I][`on${S}FixedVariant`] = (he = n[I]) != null && he[`on${S}FixedVariant`] ? n[I][`on${S}FixedVariant`] : m(Z, 30);
|
|
2197
|
+
});
|
|
2198
|
+
});
|
|
2199
|
+
const p = {
|
|
2200
|
+
black: "#000000",
|
|
2201
|
+
onBlack: "#ffffff",
|
|
2202
|
+
white: "#ffffff",
|
|
2203
|
+
onWhite: "#000000"
|
|
2204
|
+
};
|
|
2205
|
+
return Object.assign(i.light, p), Object.assign(i.dark, p), i.light.surface = ((a = n.light) == null ? void 0 : a.surface) ?? ye(l.palettes.neutral.tone(99)), i.light.surfaceDim = ((f = n.light) == null ? void 0 : f.surfaceDim) ?? ye(l.palettes.neutral.tone(87)), i.light.surfaceBright = ((b = n.light) == null ? void 0 : b.surfaceBright) ?? ye(l.palettes.neutral.tone(99)), i.light.surfaceContainerLowest = ((g = n.light) == null ? void 0 : g.surfaceContainerLowest) ?? ye(l.palettes.neutral.tone(100)), i.light.surfaceContainerLow = ((x = n.light) == null ? void 0 : x.surfaceContainerLow) ?? ye(l.palettes.neutral.tone(96)), i.light.surfaceContainer = (($ = n.light) == null ? void 0 : $.surfaceContainer) ?? ye(l.palettes.neutral.tone(94)), i.light.surfaceContainerHigh = ((C = n.light) == null ? void 0 : C.surfaceContainerHigh) ?? ye(l.palettes.neutral.tone(92)), i.light.surfaceContainerHighest = ((h = n.light) == null ? void 0 : h.surfaceContainerHighest) ?? ye(l.palettes.neutral.tone(90)), i.dark.surface = ((w = n.dark) == null ? void 0 : w.surface) ?? ye(l.palettes.neutral.tone(6)), i.dark.surfaceDim = ((F = n.dark) == null ? void 0 : F.surfaceDim) ?? ye(l.palettes.neutral.tone(6)), i.dark.surfaceBright = ((k = n.dark) == null ? void 0 : k.surfaceBright) ?? ye(l.palettes.neutral.tone(24)), i.dark.surfaceContainerLowest = ((V = n.dark) == null ? void 0 : V.surfaceContainerLowest) ?? ye(l.palettes.neutral.tone(4)), i.dark.surfaceContainerLow = ((O = n.dark) == null ? void 0 : O.surfaceContainerLow) ?? ye(l.palettes.neutral.tone(10)), i.dark.surfaceContainer = ((q = n.dark) == null ? void 0 : q.surfaceContainer) ?? ye(l.palettes.neutral.tone(12)), i.dark.surfaceContainerHigh = ((M = n.dark) == null ? void 0 : M.surfaceContainerHigh) ?? ye(l.palettes.neutral.tone(17)), i.dark.surfaceContainerHighest = ((E = n.dark) == null ? void 0 : E.surfaceContainerHighest) ?? ye(l.palettes.neutral.tone(22)), i.light.surfaceTint = ye(l.palettes.primary.tone(40)), i.dark.surfaceTint = ye(l.palettes.primary.tone(80)), i;
|
|
2206
|
+
}
|
|
2207
|
+
function dr(e = "#6750A4", t, n = {}) {
|
|
2208
|
+
const i = "ufo-ui-theme";
|
|
2209
|
+
let s = document.getElementById(i);
|
|
2210
|
+
s || (s = document.createElement("style"), s.id = i, document.head.appendChild(s));
|
|
2211
|
+
const o = cr(e, t, n), u = [
|
|
2212
|
+
...Object.entries(o.light).map(
|
|
2213
|
+
([m, p]) => `--uui-color-${nn(m)}: ${p};`
|
|
2214
|
+
)
|
|
2215
|
+
].join(""), l = Object.entries(o.dark).map(([m, p]) => `--uui-color-${nn(m)}: ${p};`).join("");
|
|
2216
|
+
return s.textContent = `:root{${u}}.dark{${l}}`, o;
|
|
2217
|
+
}
|
|
2218
|
+
const di = ({ children: e, colorMode: t, seedColor: n, extraColors: i }) => {
|
|
2219
|
+
const [s, o] = ee(on), u = xt(
|
|
2220
|
+
(c) => {
|
|
2221
|
+
c ? document.body.classList.add("dark") : document.body.classList.remove("dark"), o((a) => ({ ...a, darkMode: c }));
|
|
2222
|
+
},
|
|
2223
|
+
[o]
|
|
2224
|
+
), l = xt(
|
|
2225
|
+
(c) => (s.darkMode ? s.schemes.dark : s.schemes.light)[c] ?? "",
|
|
2226
|
+
[s]
|
|
2227
|
+
), m = xt(
|
|
2228
|
+
(c, a) => s.schemes[c][a] ?? "",
|
|
2229
|
+
[s]
|
|
2230
|
+
);
|
|
2231
|
+
be(() => {
|
|
2232
|
+
if (t) {
|
|
2233
|
+
const c = t === "dark";
|
|
2234
|
+
document.body.classList.toggle("dark", c), o((a) => ({ ...a, darkMode: c }));
|
|
2235
|
+
}
|
|
2236
|
+
}, [t]), be(() => {
|
|
2237
|
+
const { schemes: c } = on;
|
|
2238
|
+
o((a) => ({
|
|
2239
|
+
darkMode: a.darkMode,
|
|
2240
|
+
schemes: dr(n, i, c)
|
|
2241
|
+
}));
|
|
2242
|
+
}, [i, n]);
|
|
2243
|
+
const p = an(
|
|
2244
|
+
() => ({
|
|
2245
|
+
theme: s,
|
|
2246
|
+
setTheme: o,
|
|
2247
|
+
darkMode: s.darkMode,
|
|
2248
|
+
setDarkMode: u,
|
|
2249
|
+
getColorValue: l,
|
|
2250
|
+
getThemeColorValue: m
|
|
2251
|
+
}),
|
|
2252
|
+
[l, m, u, s]
|
|
2253
|
+
);
|
|
2254
|
+
return /* @__PURE__ */ r(vn.Provider, { value: p, children: e });
|
|
2255
|
+
}, fi = A((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, type: "time", className: "UITimeInput" })), fr = A(
|
|
2256
|
+
({ children: e, className: t = "", title: n = "", align: i = "topRight", value: s, ...o }, u) => {
|
|
2257
|
+
const l = ce(null);
|
|
2258
|
+
return /* @__PURE__ */ L("span", { className: "uui-tooltip", ref: u, ...o, children: [
|
|
2259
|
+
/* @__PURE__ */ r(kt, { align: i, tooltip: /* @__PURE__ */ r("div", { children: n }), triggerRef: l }),
|
|
2260
|
+
/* @__PURE__ */ r("div", { ref: l, children: e })
|
|
2261
|
+
] });
|
|
2262
|
+
}
|
|
2263
|
+
);
|
|
2264
|
+
fr.displayName = "Tooltip";
|
|
2265
|
+
const mi = A((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, type: "url", className: "UIUrlInput" })), Xe = A((e, t) => {
|
|
2266
|
+
const {
|
|
2267
|
+
type: n = "flex",
|
|
2268
|
+
inline: i = !1,
|
|
2269
|
+
color: s,
|
|
2270
|
+
elevation: o,
|
|
2271
|
+
shape: u,
|
|
2272
|
+
border: l,
|
|
2273
|
+
direction: m,
|
|
2274
|
+
flow: p,
|
|
2275
|
+
borderColor: c,
|
|
2276
|
+
elementClass: a,
|
|
2277
|
+
children: f,
|
|
2278
|
+
className: b,
|
|
2279
|
+
style: g,
|
|
2280
|
+
fullWidth: x,
|
|
2281
|
+
grow: $,
|
|
2282
|
+
p: C,
|
|
2283
|
+
px: h,
|
|
2284
|
+
py: w,
|
|
2285
|
+
pt: F,
|
|
2286
|
+
pb: k,
|
|
2287
|
+
pl: V,
|
|
2288
|
+
pr: O,
|
|
2289
|
+
gap: q,
|
|
2290
|
+
gapX: M,
|
|
2291
|
+
gapY: E,
|
|
2292
|
+
justifyContent: v,
|
|
2293
|
+
alignItems: y,
|
|
2294
|
+
placeItems: S,
|
|
2295
|
+
alignContent: I,
|
|
2296
|
+
wrap: Z,
|
|
2297
|
+
cols: U,
|
|
2298
|
+
rows: X,
|
|
2299
|
+
component: we,
|
|
2300
|
+
row: he,
|
|
2301
|
+
col: K,
|
|
2302
|
+
...Me
|
|
2303
|
+
} = e, De = we ?? "div", D = T(g);
|
|
2304
|
+
l && +l > 0 && D.border(ct(c)), D.bg(s), D.text.on(s);
|
|
2305
|
+
const P = [];
|
|
2306
|
+
n === "flex" ? P.push(i ? "uui-flex-inline" : "uui-flex") : n === "grid" ? P.push(i ? "uui-grid-inline" : "uui-grid") : P.push(i ? "uui-inline-block" : "uui-block"), x && P.push("uui-full"), $ && P.push("uui-grow"), C !== void 0 && D.set("padding", C), h !== void 0 && (D.set("paddingLeft", h), D.set("paddingRight", h)), w !== void 0 && (D.set("paddingTop", w), D.set("paddingBottom", w)), F !== void 0 && D.set("paddingTop", F), k !== void 0 && D.set("paddingBottom", k), V !== void 0 && D.set("paddingLeft", V), O !== void 0 && D.set("paddingRight", O), q !== void 0 && D.set("gap", q), M !== void 0 && D.set("columnGap", M), E !== void 0 && D.set("rowGap", E), v !== void 0 && D.set("justifyContent", v), y !== void 0 && D.set("alignItems", y), S !== void 0 && D.set("placeItems", S), I !== void 0 && D.set("alignContent", I), Z && D.set("flexWrap", "wrap"), n === "grid" && (U !== void 0 && D.set("gridTemplateColumns", typeof U == "number" ? `repeat(${U}, 1fr)` : U), X !== void 0 && D.set("gridTemplateRows", typeof X == "number" ? `repeat(${X}, 1fr)` : X));
|
|
2307
|
+
const Q = (he ? "row" : void 0) ?? (K ? "col" : void 0) ?? m;
|
|
2308
|
+
let fe = "";
|
|
2309
|
+
Q && n === "flex" && (fe = Q === "col" ? "uui-flex-col" : "uui-flex-row");
|
|
2310
|
+
let de = "";
|
|
2311
|
+
p && n === "grid" && (de = p === "col" ? "uui-grid-flow-col" : "uui-grid-flow-row");
|
|
2312
|
+
const j = [
|
|
2313
|
+
"uui-box",
|
|
2314
|
+
a,
|
|
2315
|
+
...P,
|
|
2316
|
+
...u ? [je(u)] : [],
|
|
2317
|
+
...o !== void 0 ? [at(o)] : [],
|
|
2318
|
+
...l !== void 0 ? [tt(l)] : [],
|
|
2319
|
+
fe,
|
|
2320
|
+
de,
|
|
2321
|
+
b
|
|
2322
|
+
].filter(Boolean).join(" ");
|
|
2323
|
+
return /* @__PURE__ */ r(De, { className: j, ref: t, ...Me, style: D.get(), children: f });
|
|
2324
|
+
});
|
|
2325
|
+
Xe.displayName = "BoxBase";
|
|
2326
|
+
const mr = A(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, component: "header", direction: e, elementClass: "uui-header" }));
|
|
2327
|
+
mr.displayName = "Header";
|
|
2328
|
+
const pr = A(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, component: "footer", direction: e, elementClass: "uui-footer" }));
|
|
2329
|
+
pr.displayName = "Footer";
|
|
2330
|
+
const gr = A(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, component: "main", direction: e, elementClass: "uui-main" }));
|
|
2331
|
+
gr.displayName = "Main";
|
|
2332
|
+
const hr = A(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, component: "article", direction: e, elementClass: "uui-article" }));
|
|
2333
|
+
hr.displayName = "Article";
|
|
2334
|
+
const Cr = A(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, direction: e, elementClass: "uui-article-content" }));
|
|
2335
|
+
Cr.displayName = "Content";
|
|
2336
|
+
const yr = A(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, component: "section", direction: e, elementClass: "uui-section" }));
|
|
2337
|
+
yr.displayName = "Section";
|
|
2338
|
+
const br = A(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, component: "aside", direction: e, elementClass: "uui-aside" }));
|
|
2339
|
+
br.displayName = "Aside";
|
|
2340
|
+
const xr = A(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(Xe, { ref: n, ...t, component: "nav", direction: e, elementClass: "uui-nav" }));
|
|
2341
|
+
xr.displayName = "Nav";
|
|
2342
|
+
const vr = A(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(Xe, { ...t, direction: e, ref: n, type: "flex" }));
|
|
2343
|
+
vr.displayName = "Flex";
|
|
2344
|
+
const wr = A((e, t) => /* @__PURE__ */ r(Xe, { ...e, ref: t, type: "grid" }));
|
|
2345
|
+
wr.displayName = "Grid";
|
|
2346
|
+
const Sr = A((e, t) => /* @__PURE__ */ r(Xe, { ...e, ref: t, type: "block" }));
|
|
2347
|
+
Sr.displayName = "Div";
|
|
2348
|
+
function kr(e, t) {
|
|
2349
|
+
be(() => {
|
|
2350
|
+
if (!e)
|
|
2351
|
+
return;
|
|
2352
|
+
const n = (i) => {
|
|
2353
|
+
i.key === "Escape" && t();
|
|
2354
|
+
};
|
|
2355
|
+
return document.addEventListener("keydown", n), () => {
|
|
2356
|
+
document.removeEventListener("keydown", n);
|
|
2357
|
+
};
|
|
2358
|
+
}, [e, t]);
|
|
2359
|
+
}
|
|
2360
|
+
const $r = {
|
|
2361
|
+
basic: "scale",
|
|
2362
|
+
fullscreen: "fade",
|
|
2363
|
+
dockBottom: "slideUp",
|
|
2364
|
+
dockTop: "slideDown",
|
|
2365
|
+
dockRight: "slideRight",
|
|
2366
|
+
dockLeft: "slideLeft"
|
|
2367
|
+
}, Fr = (e, t) => e === "auto" ? $r[t] : e, sn = typeof document < "u" ? document.getElementById("dialog-root") ?? document.body : null, Nr = ({
|
|
2368
|
+
open: e,
|
|
2369
|
+
onClose: t,
|
|
2370
|
+
type: n = "basic",
|
|
2371
|
+
color: i = "surfaceContainerHigh",
|
|
2372
|
+
elevation: s = 3,
|
|
2373
|
+
shape: o = "rounded",
|
|
2374
|
+
border: u = 0,
|
|
2375
|
+
borderColor: l,
|
|
2376
|
+
size: m = "small",
|
|
2377
|
+
animation: p = "auto",
|
|
2378
|
+
duration: c = 250,
|
|
2379
|
+
disableBackdropClose: a,
|
|
2380
|
+
disableEscapeKey: f,
|
|
2381
|
+
children: b,
|
|
2382
|
+
className: g,
|
|
2383
|
+
motionStyle: x = "regular",
|
|
2384
|
+
modal: $ = !1
|
|
2385
|
+
}) => {
|
|
2386
|
+
const C = ce(null), [h, w] = ee(!1), [F, k] = ee(!1), [V, O] = ee(), [q, M] = ee(!1), [E, v] = ee("normal"), y = ce(null), S = () => C.current ? Array.from(
|
|
2387
|
+
C.current.querySelectorAll(
|
|
2388
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2389
|
+
)
|
|
2390
|
+
).filter((j) => !j.hasAttribute("disabled") && j.getAttribute("aria-hidden") !== "true") : [];
|
|
2391
|
+
be(() => {
|
|
2392
|
+
if (e)
|
|
2393
|
+
w(!0), v("normal"), M(!0), O(!0);
|
|
2394
|
+
else {
|
|
2395
|
+
v("reverse"), M(!1), O(!1);
|
|
2396
|
+
const j = setTimeout(() => {
|
|
2397
|
+
w(!1);
|
|
2398
|
+
}, c);
|
|
2399
|
+
return () => {
|
|
2400
|
+
clearTimeout(j);
|
|
2401
|
+
};
|
|
2402
|
+
}
|
|
2403
|
+
}, [e, c]), be(() => {
|
|
2404
|
+
E === "reverse" && M(!0);
|
|
2405
|
+
}, [E]), be(() => {
|
|
2406
|
+
V === !0 ? k(!0) : V === !1 && k(!1);
|
|
2407
|
+
}, [V]), kr(!f && h, () => t == null ? void 0 : t());
|
|
2408
|
+
const I = (j) => {
|
|
2409
|
+
a || j.target === j.currentTarget && (t == null || t());
|
|
2410
|
+
};
|
|
2411
|
+
if (be(() => {
|
|
2412
|
+
if (h) {
|
|
2413
|
+
const j = document.body.style.overflow;
|
|
2414
|
+
return document.body.style.overflow = "hidden", () => {
|
|
2415
|
+
document.body.style.overflow = j;
|
|
2416
|
+
};
|
|
2417
|
+
}
|
|
2418
|
+
}, [h]), be(() => {
|
|
2419
|
+
if (!h || !$)
|
|
2420
|
+
return;
|
|
2421
|
+
const j = S();
|
|
2422
|
+
y.current = document.activeElement;
|
|
2423
|
+
const Ve = j.length > 0 ? j[0] : C.current;
|
|
2424
|
+
Ve && Ve.focus();
|
|
2425
|
+
const Fe = (z) => {
|
|
2426
|
+
if (z.key !== "Tab")
|
|
2427
|
+
return;
|
|
2428
|
+
const te = S();
|
|
2429
|
+
if (te.length === 0) {
|
|
2430
|
+
z.preventDefault();
|
|
2431
|
+
return;
|
|
2432
|
+
}
|
|
2433
|
+
const W = te[0], ie = te[te.length - 1];
|
|
2434
|
+
z.shiftKey && document.activeElement === W && (z.preventDefault(), ie.focus()), !z.shiftKey && document.activeElement === ie && (z.preventDefault(), W.focus());
|
|
2435
|
+
};
|
|
2436
|
+
return document.addEventListener("keydown", Fe), () => {
|
|
2437
|
+
var z;
|
|
2438
|
+
document.removeEventListener("keydown", Fe), (z = y.current) == null || z.focus();
|
|
2439
|
+
};
|
|
2440
|
+
}, [$, h]), !h || !sn)
|
|
2441
|
+
return null;
|
|
2442
|
+
const Z = je(o), U = tt(u), X = Zt(ct(l)), we = at(s), { bgColor: he, textOnColor: K } = Vt(i), Me = Fr(p, n), De = Me === "none" ? "" : Mt[Me], D = x === "expressive" ? "uui-motion-expressive" : "", P = {
|
|
2443
|
+
"--uui-duration": String(c * 0.65) + "ms"
|
|
2444
|
+
}, Q = {
|
|
2445
|
+
"--uui-reverse": E,
|
|
2446
|
+
"--uui-duration": E === "reverse" ? String(c * 0.67) + "ms" : String(c) + "ms"
|
|
2447
|
+
}, fe = ["uui-dialog-backdrop", F && "uui-open"].filter(Boolean).join(" "), de = [
|
|
2448
|
+
"uui-db",
|
|
2449
|
+
`uui-dialog-${n}`,
|
|
2450
|
+
Z,
|
|
2451
|
+
U,
|
|
2452
|
+
Ct(m),
|
|
2453
|
+
X,
|
|
2454
|
+
we,
|
|
2455
|
+
he,
|
|
2456
|
+
K,
|
|
2457
|
+
q && De,
|
|
2458
|
+
D,
|
|
2459
|
+
g
|
|
2460
|
+
].filter(Boolean).join(" ");
|
|
2461
|
+
return qt(
|
|
2462
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
2463
|
+
/* @__PURE__ */ r("div", { className: fe, onClick: I, style: P, children: /* @__PURE__ */ r("div", { className: de, ref: C, style: Q, children: b }) }),
|
|
2464
|
+
sn
|
|
2465
|
+
);
|
|
2466
|
+
};
|
|
2467
|
+
Nr.displayName = "Dialog";
|
|
2468
|
+
const Br = ({ icon: e, label: t, children: n, className: i, font: s = "headlineSmall" }) => {
|
|
2469
|
+
const o = t ?? n ?? null, u = ["uui-dialog-title", i];
|
|
2470
|
+
u.push($e(s));
|
|
2471
|
+
const l = u.filter(Boolean).join(" ");
|
|
2472
|
+
return o ? /* @__PURE__ */ L("div", { className: l, children: [
|
|
2473
|
+
e && /* @__PURE__ */ r("div", { className: "uui-icon", children: e }),
|
|
2474
|
+
o && /* @__PURE__ */ r("div", { className: "uui-content", children: o })
|
|
2475
|
+
] }) : null;
|
|
2476
|
+
};
|
|
2477
|
+
Br.displayName = "DialogTitle";
|
|
2478
|
+
const Lr = ({ children: e, className: t }) => {
|
|
2479
|
+
const n = ["uui-dialog-content", t].filter(Boolean).join(" ");
|
|
2480
|
+
return e ? /* @__PURE__ */ r("div", { className: n, children: /* @__PURE__ */ r("div", { className: "uui-content", children: e }) }) : null;
|
|
2481
|
+
};
|
|
2482
|
+
Lr.displayName = "DialogContent";
|
|
2483
|
+
const Ir = ({
|
|
2484
|
+
children: e,
|
|
2485
|
+
className: t,
|
|
2486
|
+
color: n,
|
|
2487
|
+
borderTop: i = !1,
|
|
2488
|
+
borderTopWidth: s = 1,
|
|
2489
|
+
borderColor: o
|
|
2490
|
+
}) => {
|
|
2491
|
+
if (!e)
|
|
2492
|
+
return null;
|
|
2493
|
+
const u = n ? Vt(n) : null, l = i ? tt(s) : "", m = i && n ? Zt(ct(o)) : "", p = [
|
|
2494
|
+
"uui-dialog-actions",
|
|
2495
|
+
u == null ? void 0 : u.bgColor,
|
|
2496
|
+
u == null ? void 0 : u.textOnColor,
|
|
2497
|
+
i ? "uui-dialog-actions-border-top" : "",
|
|
2498
|
+
l,
|
|
2499
|
+
m,
|
|
2500
|
+
t
|
|
2501
|
+
].filter(Boolean).join(" ");
|
|
2502
|
+
return /* @__PURE__ */ r("div", { className: p, children: e });
|
|
2503
|
+
};
|
|
2504
|
+
Ir.displayName = "DialogActions";
|
|
2505
|
+
const Er = A(
|
|
2506
|
+
({
|
|
2507
|
+
description: e,
|
|
2508
|
+
error: t,
|
|
2509
|
+
font: n,
|
|
2510
|
+
label: i,
|
|
2511
|
+
disabled: s,
|
|
2512
|
+
legend: o,
|
|
2513
|
+
children: u,
|
|
2514
|
+
direction: l = "col",
|
|
2515
|
+
required: m,
|
|
2516
|
+
descriptionColor: p,
|
|
2517
|
+
descriptionFont: c,
|
|
2518
|
+
alignItems: a = "start",
|
|
2519
|
+
...f
|
|
2520
|
+
}, b) => {
|
|
2521
|
+
const g = o ?? i, x = ["uui-fieldset-legend", Tt(n ?? "labelLarge")].filter(Boolean).join(" "), $ = T();
|
|
2522
|
+
t ? $.text("error") : p ? $.text(p) : $.text.on("surfaceVariant");
|
|
2523
|
+
const C = [
|
|
2524
|
+
"uui-support-text",
|
|
2525
|
+
Tt(c ?? "bodySmall"),
|
|
2526
|
+
t && "uui-error",
|
|
2527
|
+
e && !t && "uui-description"
|
|
2528
|
+
].filter(Boolean).join(" "), h = (e ?? t) && /* @__PURE__ */ r("div", { className: C, style: $.get(), children: t ?? e });
|
|
2529
|
+
return /* @__PURE__ */ L(et, { children: [
|
|
2530
|
+
/* @__PURE__ */ r(Dt.Provider, { value: { disabled: s }, children: /* @__PURE__ */ L(
|
|
2531
|
+
Xe,
|
|
2532
|
+
{
|
|
2533
|
+
ref: b,
|
|
2534
|
+
...f,
|
|
2535
|
+
alignItems: a,
|
|
2536
|
+
component: "fieldset",
|
|
2537
|
+
direction: l,
|
|
2538
|
+
disabled: s,
|
|
2539
|
+
elementClass: "uui-fieldset",
|
|
2540
|
+
children: [
|
|
2541
|
+
g && /* @__PURE__ */ L("legend", { className: x, children: [
|
|
2542
|
+
g,
|
|
2543
|
+
m && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
|
|
2544
|
+
] }),
|
|
2545
|
+
u
|
|
2546
|
+
]
|
|
2547
|
+
}
|
|
2548
|
+
) }),
|
|
2549
|
+
h
|
|
2550
|
+
] });
|
|
2551
|
+
}
|
|
2552
|
+
);
|
|
2553
|
+
Er.displayName = "Fieldset";
|
|
2554
|
+
const wn = A(
|
|
2555
|
+
({
|
|
2556
|
+
description: e,
|
|
2557
|
+
error: t,
|
|
2558
|
+
font: n,
|
|
2559
|
+
label: i,
|
|
2560
|
+
disabled: s,
|
|
2561
|
+
legend: o,
|
|
2562
|
+
children: u,
|
|
2563
|
+
direction: l = "col",
|
|
2564
|
+
required: m,
|
|
2565
|
+
descriptionColor: p,
|
|
2566
|
+
descriptionFont: c,
|
|
2567
|
+
alignItems: a = "start",
|
|
2568
|
+
...f
|
|
2569
|
+
}, b) => {
|
|
2570
|
+
const g = o ?? i, x = ["uui-fieldset-legend", Tt(n ?? "labelLarge")].filter(Boolean).join(" "), $ = T();
|
|
2571
|
+
t ? $.text("error") : p ? $.text(p) : $.text.on("surfaceVariant");
|
|
2572
|
+
const C = [
|
|
2573
|
+
"uui-support-text",
|
|
2574
|
+
Tt(c ?? "bodySmall"),
|
|
2575
|
+
t && "uui-error",
|
|
2576
|
+
e && !t && "uui-description"
|
|
2577
|
+
].filter(Boolean).join(" "), h = (e ?? t) && /* @__PURE__ */ r("div", { className: C, style: $.get(), children: t ?? e });
|
|
2578
|
+
return /* @__PURE__ */ L(et, { children: [
|
|
2579
|
+
/* @__PURE__ */ r(Dt.Provider, { value: { disabled: s }, children: /* @__PURE__ */ L(
|
|
2580
|
+
Xe,
|
|
2581
|
+
{
|
|
2582
|
+
ref: b,
|
|
2583
|
+
...f,
|
|
2584
|
+
alignItems: a,
|
|
2585
|
+
component: "fieldset",
|
|
2586
|
+
direction: l,
|
|
2587
|
+
disabled: s,
|
|
2588
|
+
elementClass: "uui-fieldset",
|
|
2589
|
+
children: [
|
|
2590
|
+
g && /* @__PURE__ */ L("legend", { className: x, children: [
|
|
2591
|
+
g,
|
|
2592
|
+
m && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
|
|
2593
|
+
] }),
|
|
2594
|
+
u
|
|
2595
|
+
]
|
|
2596
|
+
}
|
|
2597
|
+
) }),
|
|
2598
|
+
h
|
|
2599
|
+
] });
|
|
2600
|
+
}
|
|
2601
|
+
);
|
|
2602
|
+
wn.displayName = "Fieldset";
|
|
2603
|
+
const Tr = A(
|
|
2604
|
+
({ name: e, disabled: t, onChange: n, value: i, defaultValue: s, children: o, ...u }, l) => {
|
|
2605
|
+
const [m, p] = ee(s), c = i !== void 0, a = c ? i : m, f = xt(
|
|
2606
|
+
(g) => {
|
|
2607
|
+
c || p(g), n == null || n(g);
|
|
2608
|
+
},
|
|
2609
|
+
[c, n]
|
|
2610
|
+
), b = an(
|
|
2611
|
+
() => ({ name: e, value: a, setValue: f, disabled: t }),
|
|
2612
|
+
[e, a, f, t]
|
|
2613
|
+
);
|
|
2614
|
+
return /* @__PURE__ */ r(wn, { disabled: t, ref: l, ...u, children: /* @__PURE__ */ r(gn.Provider, { value: b, children: o }) });
|
|
2615
|
+
}
|
|
2616
|
+
);
|
|
2617
|
+
Tr.displayName = "RadioGroup";
|
|
2618
|
+
const Mr = Symbol.for("uui.listItem"), Vr = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r("path", { d: "M10 17V7L15 12L10 17Z", fill: "currentColor" }) }), Dr = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
|
|
2619
|
+
"path",
|
|
2620
|
+
{
|
|
2621
|
+
d: "M9.5501 18L3.8501 12.3L5.2751 10.875L9.5501 15.15L18.7251 5.97498L20.1501 7.39998L9.5501 18Z",
|
|
2622
|
+
fill: "currentColor"
|
|
2623
|
+
}
|
|
2624
|
+
) }), jr = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
|
|
2625
|
+
"path",
|
|
2626
|
+
{
|
|
2627
|
+
d: "M12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",
|
|
2628
|
+
fill: "currentColor"
|
|
2629
|
+
}
|
|
2630
|
+
) }), Rr = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
|
|
2631
|
+
"path",
|
|
2632
|
+
{
|
|
2633
|
+
d: "M12 17C13.3833 17 14.5625 16.5125 15.5375 15.5375C16.5125 14.5625 17 13.3833 17 12C17 10.6167 16.5125 9.4375 15.5375 8.4625C14.5625 7.4875 13.3833 7 12 7C10.6167 7 9.4375 7.4875 8.4625 8.4625C7.4875 9.4375 7 10.6167 7 12C7 13.3833 7.4875 14.5625 8.4625 15.5375C9.4375 16.5125 10.6167 17 12 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",
|
|
2634
|
+
fill: "currentColor"
|
|
2635
|
+
}
|
|
2636
|
+
) }), zt = A(
|
|
2637
|
+
({
|
|
2638
|
+
shape: e,
|
|
2639
|
+
touchEffects: t = ["ripple"],
|
|
2640
|
+
focusEffects: n = ["ring", "overlay"],
|
|
2641
|
+
selectedEffects: i = ["color"],
|
|
2642
|
+
checkedIcon: s,
|
|
2643
|
+
uncheckedIcon: o,
|
|
2644
|
+
selectedColor: u,
|
|
2645
|
+
textColor: l,
|
|
2646
|
+
labelColor: m,
|
|
2647
|
+
descriptionColor: p,
|
|
2648
|
+
shortcutColor: c,
|
|
2649
|
+
fixedLeading: a,
|
|
2650
|
+
color: f,
|
|
2651
|
+
icon: b,
|
|
2652
|
+
endIcon: g,
|
|
2653
|
+
leading: x,
|
|
2654
|
+
trailing: $,
|
|
2655
|
+
label: C,
|
|
2656
|
+
disabled: h = !1,
|
|
2657
|
+
className: w,
|
|
2658
|
+
onClick: F,
|
|
2659
|
+
badge: k,
|
|
2660
|
+
expanded: V,
|
|
2661
|
+
active: O,
|
|
2662
|
+
children: q,
|
|
2663
|
+
focusVisible: M,
|
|
2664
|
+
type: E = "item",
|
|
2665
|
+
checked: v,
|
|
2666
|
+
description: y,
|
|
2667
|
+
shortcut: S,
|
|
2668
|
+
density: I,
|
|
2669
|
+
horizontal: Z,
|
|
2670
|
+
labelFont: U,
|
|
2671
|
+
font: X,
|
|
2672
|
+
descriptionFont: we,
|
|
2673
|
+
shortcutFont: he,
|
|
2674
|
+
selected: K,
|
|
2675
|
+
__index: Me,
|
|
2676
|
+
__interactionsDisabled: De,
|
|
2677
|
+
onChange: D,
|
|
2678
|
+
variant: P = "classic",
|
|
2679
|
+
...Q
|
|
2680
|
+
}, fe) => {
|
|
2681
|
+
const de = ce(null), j = lt.Children.toArray(q), Ve = j.find((G) => ht(G)), Fe = j.filter((G) => !ht(G)), z = !!Ve;
|
|
2682
|
+
let te;
|
|
2683
|
+
E !== "item" && (E === "radio" ? te = v ? s ?? Rr : o ?? jr : E === "checkbox" && (te = v ? s ?? Dr : o));
|
|
2684
|
+
const W = te ?? x ?? b ?? (a && !Z), ie = W && /* @__PURE__ */ r("div", { className: "uui-icon uui-leading", children: W }), We = $ ?? g;
|
|
2685
|
+
let oe;
|
|
2686
|
+
k && (typeof k == "string" || typeof k == "number" ? oe = /* @__PURE__ */ r(Xt, { value: k }) : oe = k);
|
|
2687
|
+
const ne = P === "modern" ? "labelLarge" : "bodyLarge", xe = U ?? X ?? ne, He = we ?? (P === "modern" ? "bodySmall" : "bodyMedium"), _ = he ?? ne, me = T();
|
|
2688
|
+
me.text(c);
|
|
2689
|
+
const Ee = z && !Z ? Vr : We, Re = S && /* @__PURE__ */ r("div", { className: `uui-menu-item-shortcut ${$e(_)}`, style: me.get(), children: S }), se = (S ?? k ?? Ee) && /* @__PURE__ */ L(et, { children: [
|
|
2690
|
+
Re,
|
|
2691
|
+
oe,
|
|
2692
|
+
Ee && /* @__PURE__ */ r("div", { className: "uui-icon uui-trailing", children: Ee })
|
|
2693
|
+
] }), Se = T();
|
|
2694
|
+
Se.text(m);
|
|
2695
|
+
const Ce = C && /* @__PURE__ */ r("div", { className: `uui-menu-item-label ${$e(xe)}`, style: Se.get(), children: C }), Ne = T();
|
|
2696
|
+
(p || !l && P === "classic" && (f != null && f.startsWith("surface"))) && (p ? Ne.text(p) : Ne.text.on("surfaceVariant"));
|
|
2697
|
+
const ke = y && /* @__PURE__ */ r(
|
|
2698
|
+
"div",
|
|
2699
|
+
{
|
|
2700
|
+
className: `uui-menu-item-description ${$e(He)}`,
|
|
2701
|
+
style: Ne.get(),
|
|
2702
|
+
children: y
|
|
2703
|
+
}
|
|
2704
|
+
), pe = (Ce ?? ke) && /* @__PURE__ */ L("div", { className: "uui-menu-item-text", children: [
|
|
2705
|
+
Ce,
|
|
2706
|
+
ke
|
|
2707
|
+
] }), qe = (G) => {
|
|
2708
|
+
if (De || h) {
|
|
2709
|
+
G == null || G.preventDefault();
|
|
2710
|
+
return;
|
|
2711
|
+
}
|
|
2712
|
+
F == null || F(G), t.includes("ripple") && de.current && G && wt(de.current, G);
|
|
2713
|
+
};
|
|
2714
|
+
let ge = f ?? (P === "modern" ? "surfaceContainerLow" : "surfaceContainer");
|
|
2715
|
+
E === "option" && K && i.includes("color") && (ge = u ?? (P === "modern" ? "tertiaryContainer" : "secondaryContainer"));
|
|
2716
|
+
const Be = T();
|
|
2717
|
+
Be.bg.on(ge);
|
|
2718
|
+
const Le = T();
|
|
2719
|
+
Le.bg(ge), l ? Le.text(l) : Le.text.on(ge);
|
|
2720
|
+
const Ze = [
|
|
2721
|
+
"uui-menu-item",
|
|
2722
|
+
w,
|
|
2723
|
+
ft(I),
|
|
2724
|
+
h && "uui-disabled",
|
|
2725
|
+
P === "modern" ? "uui-menu-item-modern" : "uui-menu-item-classic"
|
|
2726
|
+
].filter(Boolean).join(" "), le = je(e ?? (P === "modern" ? "rounded" : "smooth")), N = [
|
|
2727
|
+
"uui-menu-item-content",
|
|
2728
|
+
le,
|
|
2729
|
+
...n.includes("ring") && O ? ["uui-focus-ring-in"] : [],
|
|
2730
|
+
...n.includes("overlay") && O ? ["uui-focus-overlay"] : [],
|
|
2731
|
+
O && "uui-active",
|
|
2732
|
+
O && M && "uui-focus-visible"
|
|
2733
|
+
].filter(Boolean).join(" "), Y = /* @__PURE__ */ L("div", { className: N, style: Le.get(), children: [
|
|
2734
|
+
Fe.length > 0 ? /* @__PURE__ */ r("div", { className: "uui-menu-item-children", children: Fe }) : /* @__PURE__ */ L(et, { children: [
|
|
2735
|
+
ie,
|
|
2736
|
+
pe,
|
|
2737
|
+
se
|
|
2738
|
+
] }),
|
|
2739
|
+
/* @__PURE__ */ r("div", { className: ["uui-state", le].join(" "), style: Be.get() })
|
|
2740
|
+
] });
|
|
2741
|
+
return (
|
|
2742
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
|
|
2743
|
+
/* @__PURE__ */ r(
|
|
2744
|
+
"div",
|
|
2745
|
+
{
|
|
2746
|
+
...Q,
|
|
2747
|
+
"aria-checked": E === "radio" || E === "checkbox" ? v ?? !1 : void 0,
|
|
2748
|
+
"aria-disabled": h ? "true" : void 0,
|
|
2749
|
+
"aria-expanded": z ? V : void 0,
|
|
2750
|
+
"aria-haspopup": z ? "menu" : void 0,
|
|
2751
|
+
className: Ze,
|
|
2752
|
+
onClick: qe,
|
|
2753
|
+
ref: mt(de, fe),
|
|
2754
|
+
role: "option",
|
|
2755
|
+
tabIndex: -1,
|
|
2756
|
+
children: Y
|
|
2757
|
+
}
|
|
2758
|
+
)
|
|
2759
|
+
);
|
|
2760
|
+
}
|
|
2761
|
+
);
|
|
2762
|
+
zt[Mr] = !0;
|
|
2763
|
+
zt[Kt] = !0;
|
|
2764
|
+
zt.displayName = "ListItem";
|
|
2765
|
+
const Ar = A((e, t) => {
|
|
2766
|
+
const {
|
|
2767
|
+
density: n,
|
|
2768
|
+
icon: i,
|
|
2769
|
+
disabled: s,
|
|
2770
|
+
elevation: o,
|
|
2771
|
+
checked: u,
|
|
2772
|
+
children: l,
|
|
2773
|
+
color: m = "primary",
|
|
2774
|
+
uncheckedColor: p,
|
|
2775
|
+
defaultChecked: c,
|
|
2776
|
+
hoverEffects: a = ["overlay"],
|
|
2777
|
+
touchEffects: f = ["ripple"],
|
|
2778
|
+
focusEffects: b = ["ring"],
|
|
2779
|
+
selectedEffects: g = [],
|
|
2780
|
+
pressedEffects: x = ["overlay", "scale"],
|
|
2781
|
+
id: $,
|
|
2782
|
+
name: C,
|
|
2783
|
+
label: h,
|
|
2784
|
+
font: w,
|
|
2785
|
+
border: F,
|
|
2786
|
+
borderColor: k,
|
|
2787
|
+
uncheckedBorder: V,
|
|
2788
|
+
uncheckedBorderColor: O,
|
|
2789
|
+
onChange: q,
|
|
2790
|
+
onClick: M,
|
|
2791
|
+
required: E,
|
|
2792
|
+
shape: v = "round",
|
|
2793
|
+
title: y,
|
|
2794
|
+
value: S,
|
|
2795
|
+
size: I = "small",
|
|
2796
|
+
uncheckedIcon: Z,
|
|
2797
|
+
description: U,
|
|
2798
|
+
descriptionColor: X,
|
|
2799
|
+
descriptionFont: we,
|
|
2800
|
+
className: he,
|
|
2801
|
+
error: K,
|
|
2802
|
+
focusColor: Me,
|
|
2803
|
+
labelColor: De,
|
|
2804
|
+
textColor: D,
|
|
2805
|
+
duration: P = 200,
|
|
2806
|
+
tooltipAlign: Q = "auto",
|
|
2807
|
+
textPlacement: fe = "end",
|
|
2808
|
+
"aria-label": de,
|
|
2809
|
+
readOnly: j,
|
|
2810
|
+
...Ve
|
|
2811
|
+
} = e, Fe = ce(null), z = Lt(Dt), te = s ?? (z == null ? void 0 : z.disabled), W = jt(), [ie, We] = ee(!1), oe = ce(null), ne = ce(null), xe = ce(null), He = ce(St("check")), _ = $ ?? He.current, me = u !== void 0, [Ee, Re] = ee(c ?? !1), se = me ? !!u : Ee, Se = de ?? (h ? void 0 : y), Ce = K ? "error" : m, Ne = y ? /* @__PURE__ */ r("div", { id: `${_}-tip`, children: y }) : null, ke = (ue) => {
|
|
2812
|
+
if (j) {
|
|
2813
|
+
ue.preventDefault();
|
|
2814
|
+
return;
|
|
2815
|
+
}
|
|
2816
|
+
const Ye = ue.currentTarget;
|
|
2817
|
+
me || Re(Ye.checked), q == null || q(ue);
|
|
2818
|
+
}, pe = (ue) => {
|
|
2819
|
+
if (j) {
|
|
2820
|
+
ue.preventDefault();
|
|
2821
|
+
return;
|
|
2822
|
+
}
|
|
2823
|
+
f.includes("ripple") && (Fe.current && clearTimeout(Fe.current), Fe.current = window.setTimeout(() => {
|
|
2824
|
+
xe.current && ne.current && (wt(xe.current, ue, ne.current), Fe.current = null);
|
|
2825
|
+
}, P)), M == null || M(ue);
|
|
2826
|
+
}, qe = (ue) => {
|
|
2827
|
+
var Ye;
|
|
2828
|
+
We(!0), (Ye = e.onFocus) == null || Ye.call(e, ue);
|
|
2829
|
+
}, ge = (ue) => {
|
|
2830
|
+
var Ye;
|
|
2831
|
+
We(!1), (Ye = e.onBlur) == null || Ye.call(e, ue);
|
|
2832
|
+
}, Be = T(), Le = [
|
|
2833
|
+
"uui-switch",
|
|
2834
|
+
ft(n),
|
|
2835
|
+
he,
|
|
2836
|
+
te && "uui-disabled",
|
|
2837
|
+
...l ? [] : [Ct(I)]
|
|
2838
|
+
].filter(Boolean).join(" "), Ze = [
|
|
2839
|
+
"uui-switch-control",
|
|
2840
|
+
se && "uui-checked",
|
|
2841
|
+
Z && "uui-symmetric-thumb",
|
|
2842
|
+
...a.includes("overlay") && !j ? ["uui-hover-overlay"] : [],
|
|
2843
|
+
...b.includes("overlay") && W && ie ? ["uui-focus-overlay"] : [],
|
|
2844
|
+
...g.includes("overlay") ? ["uui-selected-overlay"] : [],
|
|
2845
|
+
...x.includes("overlay") && !j ? ["uui-pressed-overlay"] : [],
|
|
2846
|
+
...x.includes("scale") && !j ? ["uui-pressed-scale"] : [],
|
|
2847
|
+
je(v),
|
|
2848
|
+
b.includes("ring") && W && ie && "uui-focus-visible uui-focus-ring"
|
|
2849
|
+
].filter(Boolean).join(" "), le = T();
|
|
2850
|
+
Me && W && ie && le.set("--uui-focus-color", pn(Me).color), le.set("--uui-switch-duration", `${P}ms`);
|
|
2851
|
+
const N = ["uui-input"].filter(Boolean).join(" "), Y = ["uui-state", je("round")].filter(Boolean).join(" "), Te = T(), Je = [
|
|
2852
|
+
"uui-switch-track",
|
|
2853
|
+
tt(se ? F : V ?? F ?? 2),
|
|
2854
|
+
je(v),
|
|
2855
|
+
at(o)
|
|
2856
|
+
].filter(Boolean).join(" "), _e = T(), H = ["uui-switch-thumb", je(v)].filter(Boolean).join(" "), ae = ["uui-icon"].filter(Boolean).join(" "), Ae = T(), Oe = ["uui-switch-glyph"].filter(Boolean).join(" "), Pe = T(), J = T();
|
|
2857
|
+
_e.border(K ? "error" : k ?? "outline"), J.border(K ? "error" : k ?? "outline"), se ? (Te.bg(Ce), _e.bg(K ? "errorContainer" : m), Pe.bg.on(m), Ae.text.onContainer(m)) : (O && (_e.border(K ? "error" : O), J.border(K ? "error" : O)), Te.bg(K ? "error" : p ?? "onSurface"), _e.bg(K ? "errorContainer" : p ?? "surfaceContainerHighest"), p ? (Pe.bg.on(p), Ae.text.onContainer(p)) : (Pe.bg(Z ? "onSurfaceVariant" : "outline"), Ae.text("surfaceContainerHighest")));
|
|
2858
|
+
let ze;
|
|
2859
|
+
if (l) {
|
|
2860
|
+
const ue = [
|
|
2861
|
+
"uui-switch-content uui-overflow-hidden",
|
|
2862
|
+
je(v),
|
|
2863
|
+
tt(F),
|
|
2864
|
+
at(o)
|
|
2865
|
+
].filter(Boolean).join(" ");
|
|
2866
|
+
ze = /* @__PURE__ */ L("div", { className: ue, style: J.get(), children: [
|
|
2867
|
+
l,
|
|
2868
|
+
/* @__PURE__ */ r("div", { className: Y, ref: xe, style: Te.get() })
|
|
2869
|
+
] });
|
|
2870
|
+
} else {
|
|
2871
|
+
const ue = se ? i : Z;
|
|
2872
|
+
ze = /* @__PURE__ */ L(et, { children: [
|
|
2873
|
+
/* @__PURE__ */ r("div", { className: Je, style: _e.get() }),
|
|
2874
|
+
/* @__PURE__ */ L("div", { className: H, children: [
|
|
2875
|
+
/* @__PURE__ */ r("div", { className: Oe, style: Pe.get(), children: /* @__PURE__ */ r("div", { className: ae, style: Ae.get(), children: ue }) }),
|
|
2876
|
+
/* @__PURE__ */ r("div", { className: Y, ref: xe, style: Te.get() })
|
|
2877
|
+
] })
|
|
2878
|
+
] });
|
|
2879
|
+
}
|
|
2880
|
+
const Ie = T();
|
|
2881
|
+
Ie.text((K ? "error" : void 0) ?? De ?? D ?? "onSurface");
|
|
2882
|
+
const re = [$e(w ?? "bodyMedium"), "uui-switch-label"].join(" "), Qe = h && /* @__PURE__ */ L("label", { className: re, htmlFor: _, style: Ie.get(), children: [
|
|
2883
|
+
h,
|
|
2884
|
+
E && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
|
|
2885
|
+
] }), Ge = T();
|
|
2886
|
+
K ? Ge.text("error") : X ? Ge.text(X) : Ge.text.on("surfaceVariant");
|
|
2887
|
+
const ot = [
|
|
2888
|
+
$e(we ?? "bodySmall"),
|
|
2889
|
+
K && "uui-error uui-support-text",
|
|
2890
|
+
U && !K && "uui-description uui-support-text"
|
|
2891
|
+
].filter(Boolean).join(" "), nt = (U ?? K) && /* @__PURE__ */ r("div", { className: ot, style: Ge.get(), children: K ?? U }), pt = (Qe ?? nt) && /* @__PURE__ */ L(et, { children: [
|
|
2892
|
+
Qe,
|
|
2893
|
+
nt
|
|
2894
|
+
] }), Ke = T();
|
|
2895
|
+
return fe === "end" ? (Ie.set("gridColumn", 2), Ge.set("gridColumn", 2), Ke.set("gridColumn", 1)) : fe === "start" ? (Ie.set("gridColumn", 1), Ge.set("gridColumn", 1), Ke.set("gridColumn", 2), Ke.set("gridRow", 1)) : (Be.set("gridTemplateColumns", "1fr"), Be.set("justifyItems", "start")), fe === "top" && (Ke.set("order", 1), Ge.set("order", 2)), /* @__PURE__ */ L("div", { className: Le, style: Be.get(), children: [
|
|
2896
|
+
/* @__PURE__ */ r("div", { className: "uui-switch-control-wrapper", style: Ke.get(), children: /* @__PURE__ */ L("div", { className: Ze, ref: ne, style: le.get(), children: [
|
|
2897
|
+
/* @__PURE__ */ r(
|
|
2898
|
+
"input",
|
|
2899
|
+
{
|
|
2900
|
+
"aria-label": Se,
|
|
2901
|
+
"aria-readonly": j === !0 ? !0 : void 0,
|
|
2902
|
+
checked: !!se,
|
|
2903
|
+
className: N,
|
|
2904
|
+
disabled: te,
|
|
2905
|
+
id: _,
|
|
2906
|
+
name: C,
|
|
2907
|
+
onBlur: ge,
|
|
2908
|
+
onChange: ke,
|
|
2909
|
+
onClick: pe,
|
|
2910
|
+
onFocus: qe,
|
|
2911
|
+
readOnly: j,
|
|
2912
|
+
ref: mt(oe, t),
|
|
2913
|
+
type: "checkbox",
|
|
2914
|
+
value: S,
|
|
2915
|
+
...Ve
|
|
2916
|
+
}
|
|
2917
|
+
),
|
|
2918
|
+
ze
|
|
2919
|
+
] }) }),
|
|
2920
|
+
pt,
|
|
2921
|
+
Ne && /* @__PURE__ */ r(kt, { align: Q, tooltip: Ne, triggerRef: oe })
|
|
2922
|
+
] });
|
|
2923
|
+
});
|
|
2924
|
+
Ar.displayName = "Switch";
|
|
2925
|
+
function pi({ variant: e = "circular", inline: t, className: n }) {
|
|
2926
|
+
const i = ["uui-spinner", `uui-spinner-${e}`, t && "uui-spinner-inline", n].filter(Boolean).join(" ");
|
|
2927
|
+
return e === "circular" ? /* @__PURE__ */ r("svg", { "aria-hidden": "true", className: i, viewBox: "22 22 44 44", children: /* @__PURE__ */ r("circle", { className: "uui-spinner-circle", cx: "44", cy: "44", fill: "none", r: "19.8", strokeWidth: "4.6" }) }) : e === "bars2" ? /* @__PURE__ */ L("svg", { className: "uui-bars-spinner", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
2928
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", width: "4", x: "22" }),
|
|
2929
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-135 33.9 16.9)", width: "4", x: "33.9", y: "16.9" }),
|
|
2930
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-90 36 26)", width: "4", x: "36", y: "26" }),
|
|
2931
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-45 31.1 33.9)", width: "4", x: "31.1", y: "33.9" }),
|
|
2932
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", width: "4", x: "22", y: "36" }),
|
|
2933
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-135 8.4 42.4)", width: "4", x: "8.4", y: "42.4" }),
|
|
2934
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-90 0 26)", width: "4", y: "26" }),
|
|
2935
|
+
/* @__PURE__ */ r("rect", { height: "12", rx: "2", transform: "rotate(-45 5.6 8.4)", width: "4", x: "5.6", y: "8.4" })
|
|
2936
|
+
] }) : e === "orbit" ? /* @__PURE__ */ L("svg", { className: "uui-orbit-spinner", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
2937
|
+
/* @__PURE__ */ r("circle", { cx: "24", cy: "4", r: "4" }),
|
|
2938
|
+
/* @__PURE__ */ r("circle", { cx: "38.1421", cy: "9.8579", r: "4" }),
|
|
2939
|
+
/* @__PURE__ */ r("circle", { cx: "44", cy: "24", r: "4" }),
|
|
2940
|
+
/* @__PURE__ */ r("circle", { cx: "38.1421", cy: "38.1421", r: "4" }),
|
|
2941
|
+
/* @__PURE__ */ r("circle", { cx: "24", cy: "44", r: "4" }),
|
|
2942
|
+
/* @__PURE__ */ r("circle", { cx: "9.8579", cy: "38.1421", r: "4" }),
|
|
2943
|
+
/* @__PURE__ */ r("circle", { cx: "4", cy: "24", r: "4" }),
|
|
2944
|
+
/* @__PURE__ */ r("circle", { cx: "9.8579", cy: "9.8579", r: "4" })
|
|
2945
|
+
] }) : e === "arc" ? /* @__PURE__ */ L("svg", { className: "uui-ring-spinner", viewBox: "0 0 56 56", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
2946
|
+
/* @__PURE__ */ r("circle", { cx: "28", cy: "28", fill: "none", opacity: "0.25", r: "22", stroke: "currentColor", strokeWidth: "8" }),
|
|
2947
|
+
/* @__PURE__ */ r(
|
|
2948
|
+
"circle",
|
|
2949
|
+
{
|
|
2950
|
+
cx: "28",
|
|
2951
|
+
cy: "28",
|
|
2952
|
+
fill: "none",
|
|
2953
|
+
r: "22",
|
|
2954
|
+
stroke: "currentColor",
|
|
2955
|
+
strokeDasharray: "69 69",
|
|
2956
|
+
strokeDashoffset: "0",
|
|
2957
|
+
strokeLinecap: "butt",
|
|
2958
|
+
strokeWidth: "8"
|
|
2959
|
+
}
|
|
2960
|
+
)
|
|
2961
|
+
] }) : e === "stepBar" ? /* @__PURE__ */ L("svg", { className: "uui-bars-steps", viewBox: "0 0 48 48", children: [
|
|
2962
|
+
/* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "6", y: "20" }),
|
|
2963
|
+
/* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "20", y: "20" }),
|
|
2964
|
+
/* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "34", y: "20" })
|
|
2965
|
+
] }) : /* @__PURE__ */ L("svg", { className: "uui-dots2-spinner", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
2966
|
+
/* @__PURE__ */ r("circle", { cx: "10", cy: "24", r: "4" }),
|
|
2967
|
+
/* @__PURE__ */ r("circle", { cx: "24", cy: "24", r: "4" }),
|
|
2968
|
+
/* @__PURE__ */ r("circle", { cx: "38", cy: "24", r: "4" })
|
|
2969
|
+
] });
|
|
2970
|
+
}
|
|
2971
|
+
function gi() {
|
|
2972
|
+
const e = Lt(vn);
|
|
2973
|
+
if (!e)
|
|
2974
|
+
throw new Error("useTheme must be used within a <ThemeProvider>");
|
|
2975
|
+
return e;
|
|
2976
|
+
}
|
|
2977
|
+
const kt = ({ tooltip: e, align: t, triggerRef: n }) => {
|
|
2978
|
+
const [i, s] = ee(!1), [o, u] = ee(null), l = ce(null), { bgColor: m, textOnColor: p } = Vt("inverseSurface");
|
|
2979
|
+
be(() => {
|
|
2980
|
+
const f = n.current;
|
|
2981
|
+
if (!f)
|
|
2982
|
+
return;
|
|
2983
|
+
const b = () => {
|
|
2984
|
+
s(!0);
|
|
2985
|
+
}, g = () => {
|
|
2986
|
+
s(!1), u(null);
|
|
2987
|
+
}, x = ($) => {
|
|
2988
|
+
$.target.matches(":focus-visible") && s(!0);
|
|
2989
|
+
};
|
|
2990
|
+
return f.addEventListener("mouseenter", b), f.addEventListener("mouseleave", g), f.addEventListener("focus", x), f.addEventListener("blur", g), () => {
|
|
2991
|
+
f.removeEventListener("mouseenter", b), f.removeEventListener("mouseleave", g), f.removeEventListener("focus", x), f.removeEventListener("blur", g);
|
|
2992
|
+
};
|
|
2993
|
+
}, [n]), be(() => {
|
|
2994
|
+
if (!i)
|
|
2995
|
+
return;
|
|
2996
|
+
const f = requestAnimationFrame(() => {
|
|
2997
|
+
if (!l.current || !n.current)
|
|
2998
|
+
return;
|
|
2999
|
+
const b = yn(n, l, {
|
|
3000
|
+
placement: t,
|
|
3001
|
+
offset: 8
|
|
3002
|
+
});
|
|
3003
|
+
b && u({ x: b.x, y: b.y });
|
|
3004
|
+
});
|
|
3005
|
+
return () => {
|
|
3006
|
+
cancelAnimationFrame(f);
|
|
3007
|
+
};
|
|
3008
|
+
}, [t, i, n]);
|
|
3009
|
+
const c = {
|
|
3010
|
+
position: "absolute",
|
|
3011
|
+
top: (o == null ? void 0 : o.y) ?? -9999,
|
|
3012
|
+
left: (o == null ? void 0 : o.x) ?? -9999,
|
|
3013
|
+
zIndex: 1e3,
|
|
3014
|
+
opacity: o ? 1 : 0,
|
|
3015
|
+
pointerEvents: "none",
|
|
3016
|
+
visibility: o && i ? "visible" : "hidden"
|
|
3017
|
+
}, a = [
|
|
3018
|
+
p,
|
|
3019
|
+
m,
|
|
3020
|
+
"uui-tooltip",
|
|
3021
|
+
"uui-font-body-small",
|
|
3022
|
+
"uui-elevation-2",
|
|
3023
|
+
"uui-px-2",
|
|
3024
|
+
"uui-py-1",
|
|
3025
|
+
"uui-corner-small"
|
|
3026
|
+
].join(" ");
|
|
3027
|
+
return qt(
|
|
3028
|
+
/* @__PURE__ */ r("div", { className: a, ref: l, role: "tooltip", style: c, children: e }),
|
|
3029
|
+
document.body
|
|
3030
|
+
);
|
|
3031
|
+
};
|
|
3032
|
+
kt.displayName = "InlineTooltipManager";
|
|
3033
|
+
const yt = A((e, t) => {
|
|
3034
|
+
const {
|
|
3035
|
+
color: n,
|
|
3036
|
+
selectedColor: i,
|
|
3037
|
+
className: s,
|
|
3038
|
+
label: o,
|
|
3039
|
+
title: u,
|
|
3040
|
+
type: l = "button",
|
|
3041
|
+
size: m = "small",
|
|
3042
|
+
border: p,
|
|
3043
|
+
borderColor: c,
|
|
3044
|
+
hoverEffects: a = ["overlay", "elevate"],
|
|
3045
|
+
pressedEffects: f = ["overlay", "elevate"],
|
|
3046
|
+
touchEffects: b = ["ripple"],
|
|
3047
|
+
selectedEffects: g = ["morph", "color"],
|
|
3048
|
+
focusEffects: x = ["ring", "overlay"],
|
|
3049
|
+
children: $,
|
|
3050
|
+
outlined: C = !1,
|
|
3051
|
+
filled: h = !1,
|
|
3052
|
+
tonal: w = !1,
|
|
3053
|
+
elevated: F = !1,
|
|
3054
|
+
flat: k = !1,
|
|
3055
|
+
elevation: V,
|
|
3056
|
+
disabled: O,
|
|
3057
|
+
textColor: q,
|
|
3058
|
+
selectedTextColor: M,
|
|
3059
|
+
shape: E = "round",
|
|
3060
|
+
selectedShape: v = "rounded",
|
|
3061
|
+
icon: y,
|
|
3062
|
+
selectedIcon: S,
|
|
3063
|
+
leading: I,
|
|
3064
|
+
endIcon: Z,
|
|
3065
|
+
trailing: U,
|
|
3066
|
+
onClick: X,
|
|
3067
|
+
elementClass: we,
|
|
3068
|
+
font: he = "labelLarge",
|
|
3069
|
+
upload: K,
|
|
3070
|
+
uploadAccept: Me,
|
|
3071
|
+
uploadMultiple: De,
|
|
3072
|
+
onUploadChange: D,
|
|
3073
|
+
id: P = "",
|
|
3074
|
+
name: Q = "",
|
|
3075
|
+
loading: fe,
|
|
3076
|
+
fullWidth: de = !1,
|
|
3077
|
+
link: j,
|
|
3078
|
+
selected: Ve,
|
|
3079
|
+
defaultSelected: Fe,
|
|
3080
|
+
toggle: z = !1,
|
|
3081
|
+
tooltipAlign: te = "auto",
|
|
3082
|
+
density: W,
|
|
3083
|
+
style: ie,
|
|
3084
|
+
"aria-label": We,
|
|
3085
|
+
...oe
|
|
3086
|
+
} = e, ne = Ve !== void 0, [xe, He] = ee(Fe ?? !1), _ = ne ? Ve : xe, me = ce(null), Ee = ce(null), Re = ce(null), se = ce(St("button")), Se = P || Q || se.current, Ce = j ? lt.cloneElement(j, { ref: Ee, style: { display: "none" } }) : null, Ne = [
|
|
3087
|
+
we,
|
|
3088
|
+
s,
|
|
3089
|
+
"uui-wrapper uui-bb",
|
|
3090
|
+
ft(W),
|
|
3091
|
+
...de ? ["uui-full"] : []
|
|
3092
|
+
].filter(Boolean).join(" "), ke = [
|
|
3093
|
+
"uui-btn-control",
|
|
3094
|
+
$e(he),
|
|
3095
|
+
...h ? ["uui-filled"] : [],
|
|
3096
|
+
...F ? ["uui-elevated"] : [],
|
|
3097
|
+
...w ? ["uui-tonal"] : [],
|
|
3098
|
+
...C ? ["uui-outlined"] : [],
|
|
3099
|
+
...x.includes("ring") ? ["uui-focus-ring"] : [],
|
|
3100
|
+
...x.includes("overlay") ? ["uui-focus-overlay"] : [],
|
|
3101
|
+
...a.includes("overlay") ? ["uui-hover-overlay"] : [],
|
|
3102
|
+
...f.includes("overlay") ? ["uui-pressed-overlay"] : [],
|
|
3103
|
+
...g.includes("overlay") ? ["uui-selected-overlay"] : [],
|
|
3104
|
+
...fe ? ["uui-loading"] : [],
|
|
3105
|
+
...de ? ["uui-full"] : [],
|
|
3106
|
+
...$ ? [] : [Ct(m)],
|
|
3107
|
+
..._ ? ["uui-selected"] : []
|
|
3108
|
+
], pe = ["uui-state"], qe = z && _ && g.includes("morph") ? je(v) : je(E);
|
|
3109
|
+
ke.push(qe), pe.push(qe);
|
|
3110
|
+
const ge = "uui-icon", Be = z && _ ? S ?? I ?? y : I ?? y, Le = fe ? /* @__PURE__ */ r("div", { className: ge, children: /* @__PURE__ */ r(In, {}) }) : Be && /* @__PURE__ */ r("div", { className: ge, children: Be }), Ze = (U ?? Z) && /* @__PURE__ */ r("div", { className: ge, children: U ?? Z });
|
|
3111
|
+
let le;
|
|
3112
|
+
if ($) {
|
|
3113
|
+
const J = ["uui-btn-content uui-overflow-hidden", qe, $e(he)].filter(Boolean).join(" ");
|
|
3114
|
+
le = /* @__PURE__ */ r("div", { className: J, children: $ });
|
|
3115
|
+
} else
|
|
3116
|
+
le = /* @__PURE__ */ L("div", { className: "uui-btn-content", children: [
|
|
3117
|
+
Le,
|
|
3118
|
+
o && /* @__PURE__ */ r("span", { className: "uui-label " + $e(he), children: o }),
|
|
3119
|
+
Ze
|
|
3120
|
+
] });
|
|
3121
|
+
const N = T(ie), Y = T();
|
|
3122
|
+
if (C || p !== void 0) {
|
|
3123
|
+
N.border(ct(c));
|
|
3124
|
+
const ze = tt(p ?? (C ? 1 : 0));
|
|
3125
|
+
ke.push(ze);
|
|
3126
|
+
}
|
|
3127
|
+
let Te = V;
|
|
3128
|
+
V === void 0 && (w || h ? k || (Te = F ? 1 : 0) : F && (Te = 1));
|
|
3129
|
+
const G = [
|
|
3130
|
+
...a.includes("elevate") && !k ? ["uui-hover-elevate"] : [],
|
|
3131
|
+
...f.includes("elevate") && !k ? ["uui-pressed-elevate"] : []
|
|
3132
|
+
];
|
|
3133
|
+
ke.push(...G, at(Te));
|
|
3134
|
+
const Je = () => {
|
|
3135
|
+
h ? (N.bg(n ?? "primary"), Y.bg.on(n ?? "primary"), q ? N.text(q) : N.text.on(n ?? "primary")) : w ? (N.bg.container("secondary"), Y.bg.onContainer("secondary"), q ? N.text(q) : N.text.onContainer("secondary")) : F ? (N.bg("surfaceContainerLow"), N.text(q ?? n ?? "primary"), Y.bg(n ?? "primary")) : C && !q ? (N.text.on("surfaceVariant"), Y.bg.on("surfaceVariant")) : (N.text(q ?? n ?? "primary"), Y.bg(q ?? n ?? "primary"));
|
|
3136
|
+
}, _e = () => {
|
|
3137
|
+
n ? (N.bg(n), Y.bg.on(n), N.text.on(n)) : h ? (N.bg("surfaceContainer"), Y.bg.on("surfaceContainer"), N.text.on("surfaceVariant")) : F ? (N.bg("surfaceContainerLow"), Y.bg.on("surfaceContainerLow"), N.text("primary")) : w ? (N.bg.container("secondary"), Y.bg("secondary"), N.text.onContainer("secondary")) : C && !q ? (N.text.on("surfaceVariant"), Y.bg.on("surfaceVariant")) : (N.text(q ?? n ?? "primary"), Y.bg(q ?? n ?? "primary")), q && N.text(q);
|
|
3138
|
+
}, H = () => {
|
|
3139
|
+
const J = i ?? n ?? "primary";
|
|
3140
|
+
w && !i ? (N.bg("secondary"), Y.bg.on("secondary"), M ? N.text(M) : N.text.on("secondary")) : C && !i ? (N.bg("inverseSurface"), Y.bg.on("inverseSurface"), M ? N.text(M) : N.text.on("inverseSurface")) : (N.bg(J), Y.bg.on(J), M ? N.text(M) : N.text.on(J));
|
|
3141
|
+
};
|
|
3142
|
+
z && g.includes("color") ? _ ? H() : _e() : Je();
|
|
3143
|
+
const ae = (J) => {
|
|
3144
|
+
var ze;
|
|
3145
|
+
if (!O) {
|
|
3146
|
+
if (z) {
|
|
3147
|
+
const Ie = !_;
|
|
3148
|
+
ne || He(Ie), (ze = e.onChange) == null || ze.call(e, {
|
|
3149
|
+
...J,
|
|
3150
|
+
target: {
|
|
3151
|
+
...J.target,
|
|
3152
|
+
name: Q,
|
|
3153
|
+
value: Ie
|
|
3154
|
+
}
|
|
3155
|
+
});
|
|
3156
|
+
}
|
|
3157
|
+
if (Ee.current) {
|
|
3158
|
+
Ee.current.click();
|
|
3159
|
+
return;
|
|
3160
|
+
}
|
|
3161
|
+
if (K && me.current) {
|
|
3162
|
+
me.current.click();
|
|
3163
|
+
return;
|
|
3164
|
+
}
|
|
3165
|
+
X && X(J), b.includes("ripple") && wt(J.currentTarget, J);
|
|
3166
|
+
}
|
|
3167
|
+
}, Ae = u ? /* @__PURE__ */ r("div", { id: `${Se}-tip`, children: u }) : null;
|
|
3168
|
+
let Oe;
|
|
3169
|
+
o && $ && (Oe = o), !o && !$ && (Oe = u);
|
|
3170
|
+
const Pe = We ?? Oe;
|
|
3171
|
+
return /* @__PURE__ */ L("div", { className: Ne, children: [
|
|
3172
|
+
K && /* @__PURE__ */ r(
|
|
3173
|
+
"input",
|
|
3174
|
+
{
|
|
3175
|
+
accept: Me,
|
|
3176
|
+
"aria-labelledby": Se,
|
|
3177
|
+
multiple: De,
|
|
3178
|
+
onChange: D,
|
|
3179
|
+
ref: me,
|
|
3180
|
+
style: { display: "none" },
|
|
3181
|
+
type: "file"
|
|
3182
|
+
}
|
|
3183
|
+
),
|
|
3184
|
+
/* @__PURE__ */ L(
|
|
3185
|
+
"button",
|
|
3186
|
+
{
|
|
3187
|
+
"aria-busy": fe,
|
|
3188
|
+
"aria-describedby": u ? `${Se}-tip` : void 0,
|
|
3189
|
+
"aria-haspopup": K ? "dialog" : void 0,
|
|
3190
|
+
"aria-label": Pe,
|
|
3191
|
+
"aria-pressed": z ? _ : void 0,
|
|
3192
|
+
className: ke.join(" "),
|
|
3193
|
+
disabled: O,
|
|
3194
|
+
id: Se,
|
|
3195
|
+
name: Q || void 0,
|
|
3196
|
+
onClick: ae,
|
|
3197
|
+
ref: mt(t, Re),
|
|
3198
|
+
style: N.get(),
|
|
3199
|
+
type: l,
|
|
3200
|
+
...oe,
|
|
3201
|
+
children: [
|
|
3202
|
+
/* @__PURE__ */ r("div", { className: pe.join(" "), style: Y.get() }),
|
|
3203
|
+
le
|
|
3204
|
+
]
|
|
3205
|
+
}
|
|
3206
|
+
),
|
|
3207
|
+
Ce,
|
|
3208
|
+
Ae && /* @__PURE__ */ r(kt, { align: te, tooltip: Ae, triggerRef: Re })
|
|
3209
|
+
] });
|
|
3210
|
+
});
|
|
3211
|
+
yt.displayName = "ButtonBase";
|
|
3212
|
+
export {
|
|
3213
|
+
hr as Article,
|
|
3214
|
+
br as Aside,
|
|
3215
|
+
On as Badge,
|
|
3216
|
+
Xe as BoxBase,
|
|
3217
|
+
Rn as Button,
|
|
3218
|
+
yt as ButtonBase,
|
|
3219
|
+
qn as Card,
|
|
3220
|
+
zn as Checkbox,
|
|
3221
|
+
_t as CheckboxBase,
|
|
3222
|
+
An as Chip,
|
|
3223
|
+
Cr as Content,
|
|
3224
|
+
T as ControlStyle,
|
|
3225
|
+
si as DateInput,
|
|
3226
|
+
li as DateTimeInput,
|
|
3227
|
+
Nr as Dialog,
|
|
3228
|
+
Ir as DialogActions,
|
|
3229
|
+
Lr as DialogContent,
|
|
3230
|
+
Br as DialogTitle,
|
|
3231
|
+
Sr as Div,
|
|
3232
|
+
xn as Divider,
|
|
3233
|
+
ai as EmailInput,
|
|
3234
|
+
Jn as Fab,
|
|
3235
|
+
ut as FieldBase,
|
|
3236
|
+
Er as Fieldset,
|
|
3237
|
+
vr as Flex,
|
|
3238
|
+
pr as Footer,
|
|
3239
|
+
wr as Grid,
|
|
3240
|
+
mr as Header,
|
|
3241
|
+
Qn as IconButton,
|
|
3242
|
+
zt as ListItem,
|
|
3243
|
+
gr as Main,
|
|
3244
|
+
Gt as Menu,
|
|
3245
|
+
bn as MenuItem,
|
|
3246
|
+
xr as Nav,
|
|
3247
|
+
ui as NumberInput,
|
|
3248
|
+
ar as Radio,
|
|
3249
|
+
Tr as RadioGroup,
|
|
3250
|
+
yr as Section,
|
|
3251
|
+
pi as Spinner,
|
|
3252
|
+
Ar as Switch,
|
|
3253
|
+
ci as TelInput,
|
|
3254
|
+
ur as TextField,
|
|
3255
|
+
En as ThemeExtendedColorKeys,
|
|
3256
|
+
di as ThemeProvider,
|
|
3257
|
+
mn as ThemeSchemeKeys,
|
|
3258
|
+
dn as ThemeSemanticColorKeys,
|
|
3259
|
+
fn as ThemeSurfaceColorKeys,
|
|
3260
|
+
fi as TimeInput,
|
|
3261
|
+
er as ToggleButton,
|
|
3262
|
+
fr as Tooltip,
|
|
3263
|
+
mi as UrlInput,
|
|
3264
|
+
yn as calculateFloatingPosition,
|
|
3265
|
+
Hn as clampInt,
|
|
3266
|
+
ni as createRipple,
|
|
3267
|
+
zr as getAlignClass,
|
|
3268
|
+
Tn as getAnimationClass,
|
|
3269
|
+
Hr as getAnimationList,
|
|
3270
|
+
Yr as getBodySizeClass,
|
|
3271
|
+
Un as getBorderClass,
|
|
3272
|
+
ct as getBorderColor,
|
|
3273
|
+
Zt as getBorderColorClass,
|
|
3274
|
+
qr as getColorClasses,
|
|
3275
|
+
Xr as getCurrentColorClasses,
|
|
3276
|
+
ei as getDensityClass,
|
|
3277
|
+
ii as getElementDisplayName,
|
|
3278
|
+
Wn as getElevationClass,
|
|
3279
|
+
Gr as getFixedColorClasses,
|
|
3280
|
+
Tt as getFontClass,
|
|
3281
|
+
Mn as getMotionStyleClass,
|
|
3282
|
+
Qr as getOutlineClass,
|
|
3283
|
+
Vn as getSemanticColorClasses,
|
|
3284
|
+
Zr as getSemanticColorVar,
|
|
3285
|
+
Pn as getShapeClass,
|
|
3286
|
+
Jr as getSizeClass,
|
|
3287
|
+
Vt as getSurfaceColorClasses,
|
|
3288
|
+
pn as getSurfaceColorVar,
|
|
3289
|
+
Kr as getTintOverlayColor,
|
|
3290
|
+
_r as hexToRgb,
|
|
3291
|
+
Dn as hexToRgbValues,
|
|
3292
|
+
Et as inverseColorMap,
|
|
3293
|
+
Pt as isMenuItem,
|
|
3294
|
+
ti as mergeRefs,
|
|
3295
|
+
Mt as motionClassMap,
|
|
3296
|
+
oi as setFocusVisible,
|
|
3297
|
+
nn as toKebabCase,
|
|
3298
|
+
ri as uniqueID,
|
|
3299
|
+
gi as useTheme
|
|
3300
|
+
};
|