jvdm-ui 1.0.5
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 +21 -0
- package/README.md +221 -0
- package/bin/jvdm-ui.mjs +49 -0
- package/dist/atoms/index.d.ts +343 -0
- package/dist/atoms/index.js +3 -0
- package/dist/atoms/index.js.map +1 -0
- package/dist/chunk-AHE2576G.js +682 -0
- package/dist/chunk-AHE2576G.js.map +1 -0
- package/dist/chunk-CGDYSB4G.js +3 -0
- package/dist/chunk-CGDYSB4G.js.map +1 -0
- package/dist/chunk-JYNDKPAH.js +362 -0
- package/dist/chunk-JYNDKPAH.js.map +1 -0
- package/dist/chunk-WWOXGKLF.js +724 -0
- package/dist/chunk-WWOXGKLF.js.map +1 -0
- package/dist/client/code-block.d.ts +9 -0
- package/dist/client/code-block.js +65 -0
- package/dist/client/code-block.js.map +1 -0
- package/dist/client/confirm-dialog.d.ts +16 -0
- package/dist/client/confirm-dialog.js +181 -0
- package/dist/client/confirm-dialog.js.map +1 -0
- package/dist/client/date-picker.d.ts +10 -0
- package/dist/client/date-picker.js +236 -0
- package/dist/client/date-picker.js.map +1 -0
- package/dist/client/file-upload.d.ts +12 -0
- package/dist/client/file-upload.js +58 -0
- package/dist/client/file-upload.js.map +1 -0
- package/dist/client/gallery.d.ts +14 -0
- package/dist/client/gallery.js +122 -0
- package/dist/client/gallery.js.map +1 -0
- package/dist/client/menu.d.ts +24 -0
- package/dist/client/menu.js +115 -0
- package/dist/client/menu.js.map +1 -0
- package/dist/client/modal.d.ts +19 -0
- package/dist/client/modal.js +147 -0
- package/dist/client/modal.js.map +1 -0
- package/dist/client/multi-select.d.ts +16 -0
- package/dist/client/multi-select.js +84 -0
- package/dist/client/multi-select.js.map +1 -0
- package/dist/client/number-input.d.ts +6 -0
- package/dist/client/number-input.js +59 -0
- package/dist/client/number-input.js.map +1 -0
- package/dist/client/password-input.d.ts +16 -0
- package/dist/client/password-input.js +103 -0
- package/dist/client/password-input.js.map +1 -0
- package/dist/client/pin-input.d.ts +10 -0
- package/dist/client/pin-input.js +55 -0
- package/dist/client/pin-input.js.map +1 -0
- package/dist/client/theme-toggle.d.ts +8 -0
- package/dist/client/theme-toggle.js +126 -0
- package/dist/client/theme-toggle.js.map +1 -0
- package/dist/client/theme.d.ts +8 -0
- package/dist/client/theme.js +32 -0
- package/dist/client/theme.js.map +1 -0
- package/dist/client/time-picker.d.ts +10 -0
- package/dist/client/time-picker.js +140 -0
- package/dist/client/time-picker.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/molecules/index.d.ts +309 -0
- package/dist/molecules/index.js +4 -0
- package/dist/molecules/index.js.map +1 -0
- package/dist/organisms/index.d.ts +113 -0
- package/dist/organisms/index.js +4 -0
- package/dist/organisms/index.js.map +1 -0
- package/dist/presets/gavel.css +19 -0
- package/dist/theme/index.d.ts +60 -0
- package/dist/theme/index.js +85 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/tokens/index.d.ts +8 -0
- package/dist/tokens/index.js +3 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens.css +129 -0
- package/package.json +114 -0
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { DatePicker } from 'jvdm-ui/client/date-picker';
|
|
3
|
+
export * from 'jvdm-ui/client/date-picker';
|
|
4
|
+
import { TimePicker } from 'jvdm-ui/client/time-picker';
|
|
5
|
+
export * from 'jvdm-ui/client/time-picker';
|
|
6
|
+
export * from 'jvdm-ui/client/file-upload';
|
|
7
|
+
export { PasswordInput } from 'jvdm-ui/client/password-input';
|
|
8
|
+
export * from 'jvdm-ui/client/multi-select';
|
|
9
|
+
export * from 'jvdm-ui/client/number-input';
|
|
10
|
+
export * from 'jvdm-ui/client/pin-input';
|
|
11
|
+
export { ThemeToggle } from 'jvdm-ui/client/theme-toggle';
|
|
12
|
+
|
|
13
|
+
// src/atoms/avatar/index.tsx
|
|
14
|
+
function initials(name) {
|
|
15
|
+
const parts = name.trim().split(/\s+/);
|
|
16
|
+
const first = parts[0]?.[0] ?? "";
|
|
17
|
+
const last = parts.length > 1 ? parts[parts.length - 1][0] ?? "" : "";
|
|
18
|
+
return (first + last).toUpperCase();
|
|
19
|
+
}
|
|
20
|
+
var SIZES = {
|
|
21
|
+
sm: "size-8 text-xs",
|
|
22
|
+
md: "size-10 text-sm",
|
|
23
|
+
lg: "size-12 text-base"
|
|
24
|
+
};
|
|
25
|
+
function Avatar({
|
|
26
|
+
name,
|
|
27
|
+
size = "md",
|
|
28
|
+
label = name
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
"aria-label": label,
|
|
34
|
+
className: `flex shrink-0 items-center justify-center rounded-md bg-raised font-medium text-ink-muted ${SIZES[size]}`,
|
|
35
|
+
role: "img",
|
|
36
|
+
children: initials(name)
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
var TONES = {
|
|
41
|
+
neutral: "bg-raised text-ink-soft",
|
|
42
|
+
accent: "bg-accent-soft text-accent-ink",
|
|
43
|
+
ok: "bg-ok-soft text-ok",
|
|
44
|
+
warn: "bg-warn-soft text-warn",
|
|
45
|
+
danger: "bg-danger-soft text-danger",
|
|
46
|
+
info: "bg-info-soft text-info"
|
|
47
|
+
};
|
|
48
|
+
function Badge({
|
|
49
|
+
tone = "neutral",
|
|
50
|
+
children,
|
|
51
|
+
className = ""
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
className: `inline-flex items-center gap-1 rounded-xs px-2 py-0.5 text-2xs font-medium ${TONES[tone]} ${className}`,
|
|
57
|
+
children
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/atoms/button/button-style.ts
|
|
63
|
+
var VARIANTS = {
|
|
64
|
+
primary: "bg-accent font-medium text-on-accent hover:bg-accent-ink",
|
|
65
|
+
secondary: "border border-line-strong hover:bg-raised",
|
|
66
|
+
ghost: "text-ink-muted hover:bg-raised hover:text-ink-soft",
|
|
67
|
+
danger: "border border-danger/50 text-danger hover:bg-danger-soft"
|
|
68
|
+
};
|
|
69
|
+
var SIZES2 = {
|
|
70
|
+
sm: "gap-2 px-3 py-2 text-xs",
|
|
71
|
+
md: "gap-2 px-4 py-3 text-sm",
|
|
72
|
+
lg: "gap-2 px-4 py-4 text-base",
|
|
73
|
+
icon: "h-10 w-10 shrink-0",
|
|
74
|
+
"icon-sm": "h-8 w-8 shrink-0"
|
|
75
|
+
};
|
|
76
|
+
var BASE = "inline-flex touch-manipulation select-none items-center justify-center rounded-md transition-[background-color,border-color,color,box-shadow,transform] duration-(--duration-fast) ease-out active:scale-95 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent focus-visible:ring-2 focus-visible:ring-accent/30 disabled:pointer-events-none disabled:opacity-50";
|
|
77
|
+
function buttonClass({
|
|
78
|
+
variant = "secondary",
|
|
79
|
+
size = "md",
|
|
80
|
+
className = ""
|
|
81
|
+
} = {}) {
|
|
82
|
+
return `${BASE} ${VARIANTS[variant]} ${SIZES2[size]} ${className}`;
|
|
83
|
+
}
|
|
84
|
+
function Button({
|
|
85
|
+
variant,
|
|
86
|
+
size,
|
|
87
|
+
className,
|
|
88
|
+
...props
|
|
89
|
+
}) {
|
|
90
|
+
return /* @__PURE__ */ jsx("button", { type: "button", ...props, className: buttonClass({ variant, size, className }) });
|
|
91
|
+
}
|
|
92
|
+
var PADDINGS = {
|
|
93
|
+
none: "",
|
|
94
|
+
sm: "p-4",
|
|
95
|
+
md: "p-5",
|
|
96
|
+
lg: "p-6"
|
|
97
|
+
};
|
|
98
|
+
function Card({
|
|
99
|
+
children,
|
|
100
|
+
padding = "md",
|
|
101
|
+
className = ""
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ jsx("div", { className: `rounded-md border border-line bg-surface ${PADDINGS[padding]} ${className}`, children });
|
|
104
|
+
}
|
|
105
|
+
function Checkbox({
|
|
106
|
+
label,
|
|
107
|
+
className = "",
|
|
108
|
+
...props
|
|
109
|
+
}) {
|
|
110
|
+
return /* @__PURE__ */ jsxs("label", { className: `inline-flex min-h-10 items-center gap-3 text-sm text-ink-soft ${className}`, children: [
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
"input",
|
|
113
|
+
{
|
|
114
|
+
...props,
|
|
115
|
+
className: "size-5 shrink-0 accent-accent focus-visible:ring-2 focus-visible:ring-accent/30 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",
|
|
116
|
+
type: "checkbox"
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
label ? /* @__PURE__ */ jsx("span", { children: label }) : null
|
|
120
|
+
] });
|
|
121
|
+
}
|
|
122
|
+
function Combobox({
|
|
123
|
+
options,
|
|
124
|
+
onValueChange,
|
|
125
|
+
className = "",
|
|
126
|
+
...props
|
|
127
|
+
}) {
|
|
128
|
+
const listId = `${props.id ?? props.name ?? "combobox"}-options`;
|
|
129
|
+
function handleChange(event) {
|
|
130
|
+
onValueChange?.(event.target.value);
|
|
131
|
+
}
|
|
132
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133
|
+
/* @__PURE__ */ jsx(
|
|
134
|
+
"input",
|
|
135
|
+
{
|
|
136
|
+
...props,
|
|
137
|
+
className: `w-full min-w-0 rounded-md border border-line-strong bg-field px-4 py-3 text-base text-ink transition-[background-color,border-color,box-shadow] duration-(--duration-fast) ease-out outline-none focus:border-accent focus:ring-2 focus:ring-accent/30 sm:text-sm ${className}`,
|
|
138
|
+
list: listId,
|
|
139
|
+
onChange: handleChange
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ jsx("datalist", { id: listId, children: options.map((option) => /* @__PURE__ */ jsx("option", { label: option.label, value: option.value }, option.value)) })
|
|
143
|
+
] });
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// src/atoms/date-time-picker/locales.ts
|
|
147
|
+
var locales = { date: "Date", time: "Time" };
|
|
148
|
+
function DateTimePicker({
|
|
149
|
+
date,
|
|
150
|
+
time,
|
|
151
|
+
onDateChange,
|
|
152
|
+
onTimeChange,
|
|
153
|
+
className = ""
|
|
154
|
+
}) {
|
|
155
|
+
return /* @__PURE__ */ jsxs("div", { className: `grid gap-3 sm:grid-cols-[1.4fr_1fr] ${className}`, children: [
|
|
156
|
+
/* @__PURE__ */ jsx(DatePicker, { "aria-label": locales.date, onValueChange: onDateChange, value: date }),
|
|
157
|
+
/* @__PURE__ */ jsx(TimePicker, { "aria-label": locales.time, onValueChange: onTimeChange, value: time })
|
|
158
|
+
] });
|
|
159
|
+
}
|
|
160
|
+
function Divider({
|
|
161
|
+
children,
|
|
162
|
+
vertical = false,
|
|
163
|
+
className = ""
|
|
164
|
+
}) {
|
|
165
|
+
if (vertical) {
|
|
166
|
+
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: `w-px self-stretch bg-line ${className}` });
|
|
167
|
+
}
|
|
168
|
+
if (!children) {
|
|
169
|
+
return /* @__PURE__ */ jsx("hr", { className: `h-px border-0 bg-line ${className}` });
|
|
170
|
+
}
|
|
171
|
+
return /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-3 ${className}`, children: [
|
|
172
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "h-px flex-1 bg-line" }),
|
|
173
|
+
/* @__PURE__ */ jsx("span", { className: "text-2xs font-medium tracking-caps text-ink-dim uppercase", children }),
|
|
174
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "h-px flex-1 bg-line" })
|
|
175
|
+
] });
|
|
176
|
+
}
|
|
177
|
+
function FormAlert({
|
|
178
|
+
className = "",
|
|
179
|
+
children
|
|
180
|
+
}) {
|
|
181
|
+
return /* @__PURE__ */ jsx(
|
|
182
|
+
"p",
|
|
183
|
+
{
|
|
184
|
+
role: "alert",
|
|
185
|
+
className: `rounded-md bg-danger-soft px-3 py-2 text-sm text-danger ${className}`,
|
|
186
|
+
children
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
var SIZES3 = {
|
|
191
|
+
sm: "h-3 w-3",
|
|
192
|
+
md: "h-4 w-4",
|
|
193
|
+
lg: "h-5 w-5",
|
|
194
|
+
xl: "h-6 w-6",
|
|
195
|
+
"2xl": "h-8 w-8"
|
|
196
|
+
};
|
|
197
|
+
function Svg({ size = "md", className = "", children }) {
|
|
198
|
+
return /* @__PURE__ */ jsx(
|
|
199
|
+
"svg",
|
|
200
|
+
{
|
|
201
|
+
className: `${SIZES3[size]} shrink-0 ${className}`,
|
|
202
|
+
viewBox: "0 0 24 24",
|
|
203
|
+
fill: "none",
|
|
204
|
+
stroke: "currentColor",
|
|
205
|
+
strokeWidth: "1.6",
|
|
206
|
+
strokeLinecap: "round",
|
|
207
|
+
strokeLinejoin: "round",
|
|
208
|
+
"aria-hidden": "true",
|
|
209
|
+
children
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
function AccessIcon(p) {
|
|
214
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
215
|
+
/* @__PURE__ */ jsx("path", { d: "M4 8V5.5A1.5 1.5 0 0 1 5.5 4H8" }),
|
|
216
|
+
/* @__PURE__ */ jsx("path", { d: "M16 4h2.5A1.5 1.5 0 0 1 20 5.5V8" }),
|
|
217
|
+
/* @__PURE__ */ jsx("path", { d: "M20 16v2.5a1.5 1.5 0 0 1-1.5 1.5H16" }),
|
|
218
|
+
/* @__PURE__ */ jsx("path", { d: "M8 20H5.5A1.5 1.5 0 0 1 4 18.5V16" }),
|
|
219
|
+
/* @__PURE__ */ jsx("path", { d: "M4 12h16" })
|
|
220
|
+
] });
|
|
221
|
+
}
|
|
222
|
+
function AlertIcon(p) {
|
|
223
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
224
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8.5v5" }),
|
|
225
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16.7h.01" }),
|
|
226
|
+
/* @__PURE__ */ jsx("path", { d: "M10.3 3.9 2.6 17.4A1.9 1.9 0 0 0 4.3 20.3h15.4a1.9 1.9 0 0 0 1.7-2.9L13.7 3.9a1.9 1.9 0 0 0-3.4 0Z" })
|
|
227
|
+
] });
|
|
228
|
+
}
|
|
229
|
+
function BackIcon(p) {
|
|
230
|
+
return /* @__PURE__ */ jsx(Svg, { ...p, children: /* @__PURE__ */ jsx("path", { d: "m14 6-6 6 6 6" }) });
|
|
231
|
+
}
|
|
232
|
+
function BoxIcon(p) {
|
|
233
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
234
|
+
/* @__PURE__ */ jsx("path", { d: "M20.5 8.2v7.6a1.6 1.6 0 0 1-.8 1.4l-6.9 3.8a1.6 1.6 0 0 1-1.6 0l-6.9-3.8a1.6 1.6 0 0 1-.8-1.4V8.2" }),
|
|
235
|
+
/* @__PURE__ */ jsx("path", { d: "m3.9 7.3 7.3-4a1.6 1.6 0 0 1 1.6 0l7.3 4a1 1 0 0 1 0 1.7l-7.3 4a1.6 1.6 0 0 1-1.6 0l-7.3-4a1 1 0 0 1 0-1.7Z" }),
|
|
236
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12.8v8" })
|
|
237
|
+
] });
|
|
238
|
+
}
|
|
239
|
+
function BuildingIcon(p) {
|
|
240
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
241
|
+
/* @__PURE__ */ jsx("path", { d: "M4.5 20.5V5a1.5 1.5 0 0 1 1.5-1.5h7A1.5 1.5 0 0 1 14.5 5v15.5" }),
|
|
242
|
+
/* @__PURE__ */ jsx("path", { d: "M14.5 10h4A1.5 1.5 0 0 1 20 11.5v9" }),
|
|
243
|
+
/* @__PURE__ */ jsx("path", { d: "M3 20.5h18M7.5 7.5h4M7.5 11h4M7.5 14.5h4M7.5 18h4" })
|
|
244
|
+
] });
|
|
245
|
+
}
|
|
246
|
+
function CalendarIcon(p) {
|
|
247
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
248
|
+
/* @__PURE__ */ jsx("rect", { x: "3.5", y: "5", width: "17", height: "16", rx: "2.5" }),
|
|
249
|
+
/* @__PURE__ */ jsx("path", { d: "M3.5 10h17M8 3.5v3M16 3.5v3" })
|
|
250
|
+
] });
|
|
251
|
+
}
|
|
252
|
+
function CarIcon(p) {
|
|
253
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
254
|
+
/* @__PURE__ */ jsx("path", { d: "M3 13.5 5 8a2 2 0 0 1 1.9-1.4h10.2A2 2 0 0 1 19 8l2 5.5" }),
|
|
255
|
+
/* @__PURE__ */ jsx("path", { d: "M2.5 13.5h19v4a1 1 0 0 1-1 1h-17a1 1 0 0 1-1-1Z" }),
|
|
256
|
+
/* @__PURE__ */ jsx("path", { d: "M6 18.5v2M18 18.5v2M6 16h1.5M16.5 16H18" })
|
|
257
|
+
] });
|
|
258
|
+
}
|
|
259
|
+
function ChevronIcon(p) {
|
|
260
|
+
return /* @__PURE__ */ jsx(Svg, { ...p, children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) });
|
|
261
|
+
}
|
|
262
|
+
function CloseIcon(p) {
|
|
263
|
+
return /* @__PURE__ */ jsx(Svg, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M6 6l12 12M18 6 6 18" }) });
|
|
264
|
+
}
|
|
265
|
+
function DashboardIcon(p) {
|
|
266
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
267
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1.5" }),
|
|
268
|
+
/* @__PURE__ */ jsx("rect", { x: "14", y: "3", width: "7", height: "7", rx: "1.5" }),
|
|
269
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1.5" }),
|
|
270
|
+
/* @__PURE__ */ jsx("rect", { x: "14", y: "14", width: "7", height: "7", rx: "1.5" })
|
|
271
|
+
] });
|
|
272
|
+
}
|
|
273
|
+
function EyeIcon(p) {
|
|
274
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
275
|
+
/* @__PURE__ */ jsx("path", { d: "M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z" }),
|
|
276
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
277
|
+
] });
|
|
278
|
+
}
|
|
279
|
+
function EyeOffIcon(p) {
|
|
280
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
281
|
+
/* @__PURE__ */ jsx("path", { d: "M9.9 5.8A9.3 9.3 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a17 17 0 0 1-3.3 4.1" }),
|
|
282
|
+
/* @__PURE__ */ jsx("path", { d: "M6.4 7.6A17 17 0 0 0 2.5 12S6 18.5 12 18.5a9.5 9.5 0 0 0 3.7-.7" }),
|
|
283
|
+
/* @__PURE__ */ jsx("path", { d: "M10 10a2.8 2.8 0 0 0 4 4" }),
|
|
284
|
+
/* @__PURE__ */ jsx("path", { d: "m4 4 16 16" })
|
|
285
|
+
] });
|
|
286
|
+
}
|
|
287
|
+
function FaceIcon(p) {
|
|
288
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
289
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "9.5", r: "3.6" }),
|
|
290
|
+
/* @__PURE__ */ jsx("path", { d: "M4.5 20c0-3.6 3.4-5.6 7.5-5.6s7.5 2 7.5 5.6" })
|
|
291
|
+
] });
|
|
292
|
+
}
|
|
293
|
+
function FactoryIcon(p) {
|
|
294
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
295
|
+
/* @__PURE__ */ jsx("path", { d: "M2.5 20.5V11l6 3.5V11l6 3.5V6.5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v14Z" }),
|
|
296
|
+
/* @__PURE__ */ jsx("path", { d: "M2 20.5h20" })
|
|
297
|
+
] });
|
|
298
|
+
}
|
|
299
|
+
function FunnelIcon(p) {
|
|
300
|
+
return /* @__PURE__ */ jsx(Svg, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M3 5h18l-7 8v6l-4 2v-8z" }) });
|
|
301
|
+
}
|
|
302
|
+
function GavelIcon(p) {
|
|
303
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
304
|
+
/* @__PURE__ */ jsx("path", { d: "m13.4 6.6 4 4" }),
|
|
305
|
+
/* @__PURE__ */ jsx("path", { d: "M15.9 2.9a2 2 0 0 1 2.8 0l2.4 2.4a2 2 0 0 1 0 2.8l-2 2a2 2 0 0 1-2.8 0l-2.4-2.4a2 2 0 0 1 0-2.8Z" }),
|
|
306
|
+
/* @__PURE__ */ jsx("path", { d: "m14.2 9.8-7.6 7.6a2 2 0 0 0 0 2.8 2 2 0 0 0 2.8 0l7.6-7.6" }),
|
|
307
|
+
/* @__PURE__ */ jsx("path", { d: "M3.5 21.5h7" })
|
|
308
|
+
] });
|
|
309
|
+
}
|
|
310
|
+
function InstagramIcon(p) {
|
|
311
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
312
|
+
/* @__PURE__ */ jsx("rect", { x: "3.5", y: "3.5", width: "17", height: "17", rx: "4.5" }),
|
|
313
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3.8" }),
|
|
314
|
+
/* @__PURE__ */ jsx("path", { d: "M17 7h.01" })
|
|
315
|
+
] });
|
|
316
|
+
}
|
|
317
|
+
function LogoutIcon(p) {
|
|
318
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
319
|
+
/* @__PURE__ */ jsx("path", { d: "M9 4.5H6A1.5 1.5 0 0 0 4.5 6v12A1.5 1.5 0 0 0 6 19.5h3" }),
|
|
320
|
+
/* @__PURE__ */ jsx("path", { d: "M15.5 15.5 19.5 12l-4-3.5M19 12H9.5" })
|
|
321
|
+
] });
|
|
322
|
+
}
|
|
323
|
+
function MailIcon(p) {
|
|
324
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
325
|
+
/* @__PURE__ */ jsx("rect", { x: "2.5", y: "4.5", width: "19", height: "15", rx: "2.5" }),
|
|
326
|
+
/* @__PURE__ */ jsx("path", { d: "m3.5 7 7.4 5.2a2 2 0 0 0 2.2 0L20.5 7" })
|
|
327
|
+
] });
|
|
328
|
+
}
|
|
329
|
+
function MoonIcon(p) {
|
|
330
|
+
return /* @__PURE__ */ jsx(Svg, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M20 14.2A8.2 8.2 0 0 1 9.8 4a8.2 8.2 0 1 0 10.2 10.2Z" }) });
|
|
331
|
+
}
|
|
332
|
+
function PencilIcon(p) {
|
|
333
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
334
|
+
/* @__PURE__ */ jsx("path", { d: "M4 20h4l10-10a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
|
335
|
+
/* @__PURE__ */ jsx("path", { d: "M13.5 6.5l4 4" })
|
|
336
|
+
] });
|
|
337
|
+
}
|
|
338
|
+
function PhoneIcon(p) {
|
|
339
|
+
return /* @__PURE__ */ jsx(Svg, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M8.4 3.5H5.2a1.9 1.9 0 0 0-1.9 2.1c.4 3.7 1.8 7.2 4.1 10.1a19 19 0 0 0 5.9 5.1 1.9 1.9 0 0 0 2.6-.7l1.4-2.3a1.9 1.9 0 0 0-.6-2.5l-2.2-1.4-2.3 2.3a14 14 0 0 1-3.9-3.9l2.3-2.3-1.4-2.2a1.9 1.9 0 0 0-1.6-.9Z" }) });
|
|
340
|
+
}
|
|
341
|
+
function PlansIcon(p) {
|
|
342
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
343
|
+
/* @__PURE__ */ jsx("rect", { x: "2.5", y: "5", width: "19", height: "14", rx: "2.5" }),
|
|
344
|
+
/* @__PURE__ */ jsx("path", { d: "M2.5 10h19" })
|
|
345
|
+
] });
|
|
346
|
+
}
|
|
347
|
+
function PlusIcon(p) {
|
|
348
|
+
return /* @__PURE__ */ jsx(Svg, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) });
|
|
349
|
+
}
|
|
350
|
+
function SearchIcon(p) {
|
|
351
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
352
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "6.5" }),
|
|
353
|
+
/* @__PURE__ */ jsx("path", { d: "m16 16 4.5 4.5" })
|
|
354
|
+
] });
|
|
355
|
+
}
|
|
356
|
+
function ShieldCheckIcon(p) {
|
|
357
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
358
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2.8 4.5 5.9v5.6c0 4.4 3.1 8.5 7.5 9.7 4.4-1.2 7.5-5.3 7.5-9.7V5.9Z" }),
|
|
359
|
+
/* @__PURE__ */ jsx("path", { d: "m9 11.8 2.2 2.2 4-4" })
|
|
360
|
+
] });
|
|
361
|
+
}
|
|
362
|
+
function StaffIcon(p) {
|
|
363
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
364
|
+
/* @__PURE__ */ jsx("rect", { x: "2.5", y: "4.5", width: "19", height: "15", rx: "2.5" }),
|
|
365
|
+
/* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "10.5", r: "2.2" }),
|
|
366
|
+
/* @__PURE__ */ jsx("path", { d: "M5 16.4c0-1.7 1.6-2.6 3.5-2.6s3.5.9 3.5 2.6" }),
|
|
367
|
+
/* @__PURE__ */ jsx("path", { d: "M15 10h4" }),
|
|
368
|
+
/* @__PURE__ */ jsx("path", { d: "M15 14h4" })
|
|
369
|
+
] });
|
|
370
|
+
}
|
|
371
|
+
function StudentsIcon(p) {
|
|
372
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
373
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "8", r: "3.2" }),
|
|
374
|
+
/* @__PURE__ */ jsx("path", { d: "M3.5 19c0-3 2.5-4.6 5.5-4.6s5.5 1.6 5.5 4.6" }),
|
|
375
|
+
/* @__PURE__ */ jsx("path", { d: "M16.5 6.6a3 3 0 0 1 0 5.6" }),
|
|
376
|
+
/* @__PURE__ */ jsx("path", { d: "M18 14.6c2 .6 3.2 2 3.2 4.4" })
|
|
377
|
+
] });
|
|
378
|
+
}
|
|
379
|
+
function SunIcon(p) {
|
|
380
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
381
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
|
382
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2.5v2M12 19.5v2M4.6 4.6l1.4 1.4M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4" })
|
|
383
|
+
] });
|
|
384
|
+
}
|
|
385
|
+
function TrashIcon(p) {
|
|
386
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
387
|
+
/* @__PURE__ */ jsx("path", { d: "M5 7h14" }),
|
|
388
|
+
/* @__PURE__ */ jsx("path", { d: "M9 7V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2" }),
|
|
389
|
+
/* @__PURE__ */ jsx("path", { d: "M7 7l1 13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1l1-13" }),
|
|
390
|
+
/* @__PURE__ */ jsx("path", { d: "M10 11v6" }),
|
|
391
|
+
/* @__PURE__ */ jsx("path", { d: "M14 11v6" })
|
|
392
|
+
] });
|
|
393
|
+
}
|
|
394
|
+
function WhatsappIcon(p) {
|
|
395
|
+
return /* @__PURE__ */ jsxs(Svg, { ...p, children: [
|
|
396
|
+
/* @__PURE__ */ jsx("path", { d: "M3.4 20.6 4.7 16a8.2 8.2 0 1 1 3.3 3.2Z" }),
|
|
397
|
+
/* @__PURE__ */ jsx("path", { d: "M9 9.2c0 3 2.3 5.4 5.2 5.5.7 0 1.3-.5 1.4-1.2l-2-1-.8.9a5 5 0 0 1-2.2-2.3l.9-.8-1-2c-.7.1-1.2.7-1.2 1.4Z" })
|
|
398
|
+
] });
|
|
399
|
+
}
|
|
400
|
+
function IconButton({
|
|
401
|
+
label,
|
|
402
|
+
variant = "ghost",
|
|
403
|
+
size = "icon",
|
|
404
|
+
className,
|
|
405
|
+
...props
|
|
406
|
+
}) {
|
|
407
|
+
return /* @__PURE__ */ jsx(
|
|
408
|
+
"button",
|
|
409
|
+
{
|
|
410
|
+
type: "button",
|
|
411
|
+
...props,
|
|
412
|
+
"aria-label": label,
|
|
413
|
+
title: label,
|
|
414
|
+
className: buttonClass({ variant, size, className })
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// src/atoms/input/control.ts
|
|
420
|
+
var CONTROL = "w-full min-w-0 rounded-md border border-line-strong bg-field text-base text-ink sm:text-sm outline-none transition-[background-color,border-color,box-shadow] duration-(--duration-fast) ease-out focus:border-accent focus:ring-2 focus:ring-accent/30 aria-invalid:border-danger aria-invalid:ring-2 aria-invalid:ring-danger/20";
|
|
421
|
+
var CONTROL_SIZES = {
|
|
422
|
+
md: "px-4 py-3",
|
|
423
|
+
sm: "px-3 py-2"
|
|
424
|
+
};
|
|
425
|
+
function Input({
|
|
426
|
+
size = "md",
|
|
427
|
+
className = "",
|
|
428
|
+
...props
|
|
429
|
+
}) {
|
|
430
|
+
return /* @__PURE__ */ jsx("input", { ...props, className: `${CONTROL} ${CONTROL_SIZES[size]} ${className}` });
|
|
431
|
+
}
|
|
432
|
+
function Select({
|
|
433
|
+
size = "md",
|
|
434
|
+
className = "",
|
|
435
|
+
...props
|
|
436
|
+
}) {
|
|
437
|
+
return /* @__PURE__ */ jsxs("span", { className: "relative block", children: [
|
|
438
|
+
/* @__PURE__ */ jsx(
|
|
439
|
+
"select",
|
|
440
|
+
{
|
|
441
|
+
...props,
|
|
442
|
+
className: `${CONTROL} ${CONTROL_SIZES[size]} appearance-none pr-10 ${className}`
|
|
443
|
+
}
|
|
444
|
+
),
|
|
445
|
+
/* @__PURE__ */ jsx(
|
|
446
|
+
ChevronIcon,
|
|
447
|
+
{
|
|
448
|
+
className: "pointer-events-none absolute top-1/2 right-4 -translate-y-1/2 text-ink-muted",
|
|
449
|
+
size: "md"
|
|
450
|
+
}
|
|
451
|
+
)
|
|
452
|
+
] });
|
|
453
|
+
}
|
|
454
|
+
function Textarea({
|
|
455
|
+
size = "md",
|
|
456
|
+
rows = 4,
|
|
457
|
+
className = "",
|
|
458
|
+
...props
|
|
459
|
+
}) {
|
|
460
|
+
return /* @__PURE__ */ jsx(
|
|
461
|
+
"textarea",
|
|
462
|
+
{
|
|
463
|
+
...props,
|
|
464
|
+
rows,
|
|
465
|
+
className: `${CONTROL} ${CONTROL_SIZES[size]} resize-y ${className}`
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
function Kbd({ children, className = "" }) {
|
|
470
|
+
return /* @__PURE__ */ jsx(
|
|
471
|
+
"kbd",
|
|
472
|
+
{
|
|
473
|
+
className: `inline-flex min-w-6 items-center justify-center rounded-xs border border-line-strong bg-raised px-1 py-0.5 font-mono text-2xs text-ink-soft ${className}`,
|
|
474
|
+
children
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
var TONES2 = {
|
|
479
|
+
muted: "text-ink-muted",
|
|
480
|
+
dim: "text-ink-dim",
|
|
481
|
+
accent: "text-accent-ink"
|
|
482
|
+
};
|
|
483
|
+
function Label({
|
|
484
|
+
children,
|
|
485
|
+
tone = "muted",
|
|
486
|
+
className = ""
|
|
487
|
+
}) {
|
|
488
|
+
return /* @__PURE__ */ jsx("span", { className: `text-2xs tracking-caps ${TONES2[tone]} ${className}`, children });
|
|
489
|
+
}
|
|
490
|
+
var TONES3 = {
|
|
491
|
+
accent: "text-accent-ink decoration-accent/40 hover:decoration-accent",
|
|
492
|
+
ink: "text-ink decoration-line-strong hover:decoration-ink-muted",
|
|
493
|
+
muted: "text-ink-muted decoration-line hover:text-ink-soft hover:decoration-line-strong"
|
|
494
|
+
};
|
|
495
|
+
function Link({
|
|
496
|
+
tone = "accent",
|
|
497
|
+
className = "",
|
|
498
|
+
...props
|
|
499
|
+
}) {
|
|
500
|
+
return /* @__PURE__ */ jsx(
|
|
501
|
+
"a",
|
|
502
|
+
{
|
|
503
|
+
...props,
|
|
504
|
+
className: `rounded-xs underline decoration-1 underline-offset-4 transition-colors duration-(--duration-fast) ease-out focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ${TONES3[tone]} ${className}`
|
|
505
|
+
}
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
function MoreIcon() {
|
|
509
|
+
return /* @__PURE__ */ jsxs(Svg, { size: "lg", children: [
|
|
510
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "1.5", fill: "currentColor", stroke: "none" }),
|
|
511
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1.5", fill: "currentColor", stroke: "none" }),
|
|
512
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "19", r: "1.5", fill: "currentColor", stroke: "none" })
|
|
513
|
+
] });
|
|
514
|
+
}
|
|
515
|
+
var FILL = {
|
|
516
|
+
accent: "bg-accent",
|
|
517
|
+
ok: "bg-ok",
|
|
518
|
+
warn: "bg-warn",
|
|
519
|
+
danger: "bg-danger"
|
|
520
|
+
};
|
|
521
|
+
var HEIGHTS = { md: "h-2", xs: "h-1" };
|
|
522
|
+
function ProgressBar({
|
|
523
|
+
value,
|
|
524
|
+
tone = "accent",
|
|
525
|
+
size = "md",
|
|
526
|
+
dim = false,
|
|
527
|
+
label,
|
|
528
|
+
className = ""
|
|
529
|
+
}) {
|
|
530
|
+
const pct = Math.max(0, Math.min(1, value)) * 100;
|
|
531
|
+
return /* @__PURE__ */ jsx(
|
|
532
|
+
"div",
|
|
533
|
+
{
|
|
534
|
+
"aria-label": label,
|
|
535
|
+
"aria-valuemax": 100,
|
|
536
|
+
"aria-valuemin": 0,
|
|
537
|
+
"aria-valuenow": pct,
|
|
538
|
+
className: `${HEIGHTS[size]} overflow-hidden rounded-full bg-raised ${className}`,
|
|
539
|
+
role: "progressbar",
|
|
540
|
+
children: /* @__PURE__ */ jsx(
|
|
541
|
+
"div",
|
|
542
|
+
{
|
|
543
|
+
className: `h-full origin-left rounded-full transition-transform duration-(--duration-base) ease-out ${FILL[tone]} ${dim ? "opacity-45" : ""}`,
|
|
544
|
+
style: { transform: `scaleX(${pct / 100})` }
|
|
545
|
+
}
|
|
546
|
+
)
|
|
547
|
+
}
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// src/atoms/range-date-picker/locales.ts
|
|
552
|
+
var locales2 = { start: "Start date", end: "End date" };
|
|
553
|
+
function RangeDatePicker({
|
|
554
|
+
start,
|
|
555
|
+
end,
|
|
556
|
+
onStartChange,
|
|
557
|
+
onEndChange,
|
|
558
|
+
className = ""
|
|
559
|
+
}) {
|
|
560
|
+
return /* @__PURE__ */ jsxs("div", { className: `grid gap-3 sm:grid-cols-2 ${className}`, children: [
|
|
561
|
+
/* @__PURE__ */ jsx(DatePicker, { "aria-label": locales2.start, onValueChange: onStartChange, value: start }),
|
|
562
|
+
/* @__PURE__ */ jsx(DatePicker, { "aria-label": locales2.end, onValueChange: onEndChange, value: end })
|
|
563
|
+
] });
|
|
564
|
+
}
|
|
565
|
+
function Radio({
|
|
566
|
+
label,
|
|
567
|
+
className = "",
|
|
568
|
+
...props
|
|
569
|
+
}) {
|
|
570
|
+
return /* @__PURE__ */ jsxs("label", { className: `inline-flex min-h-10 items-center gap-3 text-sm text-ink-soft ${className}`, children: [
|
|
571
|
+
/* @__PURE__ */ jsx(
|
|
572
|
+
"input",
|
|
573
|
+
{
|
|
574
|
+
...props,
|
|
575
|
+
className: "size-5 shrink-0 accent-accent focus-visible:ring-2 focus-visible:ring-accent/30 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",
|
|
576
|
+
type: "radio"
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
label ? /* @__PURE__ */ jsx("span", { children: label }) : null
|
|
580
|
+
] });
|
|
581
|
+
}
|
|
582
|
+
function Segmented({
|
|
583
|
+
name,
|
|
584
|
+
options,
|
|
585
|
+
value,
|
|
586
|
+
defaultValue,
|
|
587
|
+
onValueChange,
|
|
588
|
+
label,
|
|
589
|
+
className = ""
|
|
590
|
+
}) {
|
|
591
|
+
function handleChange(event) {
|
|
592
|
+
onValueChange?.(event.target.value);
|
|
593
|
+
}
|
|
594
|
+
return /* @__PURE__ */ jsx(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
role: "group",
|
|
598
|
+
"aria-label": label,
|
|
599
|
+
className: `inline-flex gap-1 rounded-md border border-line bg-panel p-1 ${className}`,
|
|
600
|
+
children: options.map((option) => /* @__PURE__ */ jsxs(
|
|
601
|
+
"label",
|
|
602
|
+
{
|
|
603
|
+
className: "relative inline-flex min-h-8 cursor-pointer items-center justify-center rounded-sm px-3 text-xs text-ink-muted transition-colors duration-(--duration-fast) ease-out select-none not-has-checked:hover:bg-raised not-has-checked:hover:text-ink-soft has-checked:bg-accent has-checked:font-medium has-checked:text-on-accent has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-accent has-disabled:cursor-not-allowed has-disabled:opacity-50",
|
|
604
|
+
children: [
|
|
605
|
+
/* @__PURE__ */ jsx(
|
|
606
|
+
"input",
|
|
607
|
+
{
|
|
608
|
+
className: "absolute size-0 opacity-0",
|
|
609
|
+
type: "radio",
|
|
610
|
+
name,
|
|
611
|
+
value: option.value,
|
|
612
|
+
disabled: option.disabled,
|
|
613
|
+
checked: value === void 0 ? void 0 : value === option.value,
|
|
614
|
+
defaultChecked: value === void 0 ? defaultValue === option.value : void 0,
|
|
615
|
+
onChange: handleChange
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
option.label
|
|
619
|
+
]
|
|
620
|
+
},
|
|
621
|
+
option.value
|
|
622
|
+
))
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
function Skeleton({ className = "" }) {
|
|
627
|
+
return /* @__PURE__ */ jsx("div", { className: `animate-pulse rounded-sm bg-raised ${className}` });
|
|
628
|
+
}
|
|
629
|
+
function Slider({ className = "", ...props }) {
|
|
630
|
+
return /* @__PURE__ */ jsx(
|
|
631
|
+
"input",
|
|
632
|
+
{
|
|
633
|
+
...props,
|
|
634
|
+
className: `h-6 w-full cursor-grab touch-manipulation bg-transparent accent-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent active:cursor-grabbing disabled:cursor-not-allowed disabled:opacity-50 ${className}`,
|
|
635
|
+
type: "range"
|
|
636
|
+
}
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// src/atoms/spinner/locales.ts
|
|
641
|
+
var locales3 = {
|
|
642
|
+
label: "Loading"
|
|
643
|
+
};
|
|
644
|
+
var SIZES4 = {
|
|
645
|
+
sm: "h-3 w-3",
|
|
646
|
+
md: "h-4 w-4",
|
|
647
|
+
lg: "h-5 w-5",
|
|
648
|
+
xl: "h-6 w-6",
|
|
649
|
+
"2xl": "h-8 w-8"
|
|
650
|
+
};
|
|
651
|
+
function Spinner({
|
|
652
|
+
size = "md",
|
|
653
|
+
label = locales3.label,
|
|
654
|
+
className = ""
|
|
655
|
+
}) {
|
|
656
|
+
return /* @__PURE__ */ jsxs(
|
|
657
|
+
"svg",
|
|
658
|
+
{
|
|
659
|
+
className: `${SIZES4[size]} shrink-0 animate-spin ${className}`,
|
|
660
|
+
viewBox: "0 0 24 24",
|
|
661
|
+
fill: "none",
|
|
662
|
+
role: "status",
|
|
663
|
+
"aria-label": label,
|
|
664
|
+
children: [
|
|
665
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2.4", opacity: "0.2" }),
|
|
666
|
+
/* @__PURE__ */ jsx(
|
|
667
|
+
"path",
|
|
668
|
+
{
|
|
669
|
+
d: "M21 12a9 9 0 0 0-9-9",
|
|
670
|
+
stroke: "currentColor",
|
|
671
|
+
strokeWidth: "2.4",
|
|
672
|
+
strokeLinecap: "round"
|
|
673
|
+
}
|
|
674
|
+
)
|
|
675
|
+
]
|
|
676
|
+
}
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
function Switch({
|
|
680
|
+
checked,
|
|
681
|
+
onCheckedChange,
|
|
682
|
+
label,
|
|
683
|
+
disabled = false,
|
|
684
|
+
className = ""
|
|
685
|
+
}) {
|
|
686
|
+
return /* @__PURE__ */ jsxs("label", { className: `inline-flex min-h-10 items-center gap-3 text-sm text-ink-soft ${className}`, children: [
|
|
687
|
+
/* @__PURE__ */ jsx(
|
|
688
|
+
"button",
|
|
689
|
+
{
|
|
690
|
+
"aria-checked": checked,
|
|
691
|
+
className: `relative h-6 w-10 shrink-0 rounded-full transition-colors duration-(--duration-fast) ease-out focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:opacity-50 ${checked ? "bg-accent" : "bg-raised"}`,
|
|
692
|
+
disabled,
|
|
693
|
+
onClick: () => onCheckedChange(!checked),
|
|
694
|
+
role: "switch",
|
|
695
|
+
type: "button",
|
|
696
|
+
children: /* @__PURE__ */ jsx(
|
|
697
|
+
"span",
|
|
698
|
+
{
|
|
699
|
+
className: `absolute top-1 left-1 size-4 rounded-full transition-[background-color,transform] duration-(--duration-fast) ease-out ${checked ? "translate-x-4 bg-on-accent" : "translate-x-0 bg-ink"}`
|
|
700
|
+
}
|
|
701
|
+
)
|
|
702
|
+
}
|
|
703
|
+
),
|
|
704
|
+
label ? /* @__PURE__ */ jsx("span", { children: label }) : null
|
|
705
|
+
] });
|
|
706
|
+
}
|
|
707
|
+
function Thumb({
|
|
708
|
+
src,
|
|
709
|
+
alt,
|
|
710
|
+
fallback,
|
|
711
|
+
className = ""
|
|
712
|
+
}) {
|
|
713
|
+
return /* @__PURE__ */ jsx(
|
|
714
|
+
"div",
|
|
715
|
+
{
|
|
716
|
+
className: `flex aspect-[4/3] items-center justify-center overflow-hidden rounded-md bg-raised text-ink-dim ${className}`,
|
|
717
|
+
children: src ? /* @__PURE__ */ jsx("img", { src, alt, loading: "lazy", className: "h-full w-full object-cover" }) : fallback
|
|
718
|
+
}
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export { AccessIcon, AlertIcon, Avatar, BackIcon, Badge, BoxIcon, BuildingIcon, Button, CONTROL, CONTROL_SIZES, CalendarIcon, CarIcon, Card, Checkbox, ChevronIcon, CloseIcon, Combobox, DashboardIcon, DateTimePicker, Divider, EyeIcon, EyeOffIcon, FaceIcon, FactoryIcon, FormAlert, FunnelIcon, GavelIcon, IconButton, Input, InstagramIcon, Kbd, Label, Link, LogoutIcon, MailIcon, MoonIcon, MoreIcon, PencilIcon, PhoneIcon, PlansIcon, PlusIcon, ProgressBar, Radio, RangeDatePicker, SearchIcon, Segmented, Select, ShieldCheckIcon, Skeleton, Slider, Spinner, StaffIcon, StudentsIcon, SunIcon, Svg, Switch, Textarea, Thumb, TrashIcon, WhatsappIcon, buttonClass };
|
|
723
|
+
//# sourceMappingURL=chunk-WWOXGKLF.js.map
|
|
724
|
+
//# sourceMappingURL=chunk-WWOXGKLF.js.map
|