@12min/ds 0.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,653 @@
1
1
  import {
2
+ DEFAULT_OPTIONS,
2
3
  darkTheme,
3
4
  lightTheme
4
- } from "./chunk-QIJRSFZB.mjs";
5
+ } from "./chunk-ZKPOS2PD.mjs";
5
6
  import {
6
- colors
7
- } from "./chunk-E2C4G6H4.mjs";
7
+ borderWidth,
8
+ colors,
9
+ grid,
10
+ opacity,
11
+ radius,
12
+ shadow,
13
+ spacing,
14
+ typography
15
+ } from "./chunk-ZK7NW4WW.mjs";
16
+
17
+ // src/components/Button/Button.web.tsx
18
+ import { cva } from "class-variance-authority";
19
+
20
+ // src/utils/cn.ts
21
+ import { clsx } from "clsx";
22
+ import { twMerge } from "tailwind-merge";
23
+ function cn(...inputs) {
24
+ return twMerge(clsx(inputs));
25
+ }
26
+
27
+ // src/components/Button/Button.web.tsx
28
+ import { jsx } from "react/jsx-runtime";
29
+ var button = cva(
30
+ "inline-flex items-center justify-center gap-2 rounded-full transition-colors disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black dark:focus-visible:ring-white",
31
+ {
32
+ variants: {
33
+ variant: {
34
+ primary: "bg-marian-blue-600 text-white dark:text-midnight-900 enabled:hover:bg-marian-blue-700 dark:enabled:hover:bg-marian-blue-500 enabled:active:bg-marian-blue-800 dark:enabled:active:bg-marian-blue-600 disabled:bg-gray-25 disabled:text-gray-400 dark:disabled:bg-midnight-700 dark:disabled:text-gray-600",
35
+ secondary: "bg-marian-blue-200 text-marian-blue-900 dark:bg-marian-blue-900 dark:text-white enabled:hover:bg-marian-blue-300 dark:enabled:hover:bg-marian-blue-800 enabled:active:bg-marian-blue-400 dark:enabled:active:bg-marian-blue-700 disabled:bg-gray-25 disabled:text-gray-400 dark:disabled:bg-midnight-700 dark:disabled:text-gray-600",
36
+ ghost: "bg-transparent text-marian-blue-600 dark:text-marian-blue-300 enabled:hover:bg-marian-blue-200 dark:enabled:hover:bg-marian-blue-900 enabled:active:bg-marian-blue-300 dark:enabled:active:bg-marian-blue-800 disabled:text-gray-400 dark:disabled:text-gray-600"
37
+ },
38
+ size: {
39
+ sm: "h-8 px-3 text-button-small",
40
+ md: "h-10 px-4 text-button-default",
41
+ lg: "h-12 px-6 text-button-large"
42
+ }
43
+ },
44
+ defaultVariants: {
45
+ variant: "primary",
46
+ size: "lg"
47
+ }
48
+ }
49
+ );
50
+ function Button({ variant, size, disabled, children, onClick, type = "button", className }) {
51
+ return /* @__PURE__ */ jsx(
52
+ "button",
53
+ {
54
+ type,
55
+ disabled,
56
+ onClick,
57
+ className: cn(button({ variant, size }), className),
58
+ children
59
+ }
60
+ );
61
+ }
62
+
63
+ // src/components/ButtonIcon/ButtonIcon.web.tsx
64
+ import { cva as cva2 } from "class-variance-authority";
65
+ import { jsx as jsx2 } from "react/jsx-runtime";
66
+ var buttonIcon = cva2(
67
+ "inline-flex items-center justify-center shrink-0 rounded-full transition-colors disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black dark:focus-visible:ring-white",
68
+ {
69
+ variants: {
70
+ variant: {
71
+ primary: "bg-marian-blue-600 text-white dark:text-midnight-900 enabled:hover:bg-marian-blue-700 dark:enabled:hover:bg-marian-blue-500 enabled:active:bg-marian-blue-800 dark:enabled:active:bg-marian-blue-600 disabled:bg-gray-25 disabled:text-gray-400 dark:disabled:bg-midnight-700 dark:disabled:text-gray-600",
72
+ secondary: "bg-marian-blue-200 text-marian-blue-900 dark:bg-marian-blue-900 dark:text-white enabled:hover:bg-marian-blue-300 dark:enabled:hover:bg-marian-blue-800 enabled:active:bg-marian-blue-400 dark:enabled:active:bg-marian-blue-700 disabled:bg-gray-25 disabled:text-gray-400 dark:disabled:bg-midnight-700 dark:disabled:text-gray-600",
73
+ ghost: "bg-transparent text-marian-blue-600 dark:text-marian-blue-300 enabled:hover:bg-marian-blue-200 dark:enabled:hover:bg-marian-blue-900 enabled:active:bg-marian-blue-300 dark:enabled:active:bg-marian-blue-800 disabled:text-gray-400 dark:disabled:text-gray-600",
74
+ overlay: "bg-overlay-black-8 text-marian-blue-900 dark:bg-overlay-white-8 dark:text-white enabled:hover:bg-overlay-black-12 dark:enabled:hover:bg-overlay-white-12 enabled:active:bg-overlay-black-16 dark:enabled:active:bg-overlay-white-16 disabled:bg-gray-25 disabled:text-gray-400 dark:disabled:bg-midnight-700 dark:disabled:text-gray-600"
75
+ },
76
+ size: {
77
+ sm: "size-10",
78
+ md: "size-12",
79
+ lg: "size-16"
80
+ }
81
+ },
82
+ defaultVariants: {
83
+ variant: "primary",
84
+ size: "md"
85
+ }
86
+ }
87
+ );
88
+ function ButtonIcon({ variant, size, icon, label, disabled, onClick, type = "button", className }) {
89
+ return /* @__PURE__ */ jsx2(
90
+ "button",
91
+ {
92
+ type,
93
+ disabled,
94
+ onClick,
95
+ "aria-label": label,
96
+ className: cn(buttonIcon({ variant, size }), className),
97
+ children: icon
98
+ }
99
+ );
100
+ }
101
+
102
+ // src/components/DismissButton/DismissButton.web.tsx
103
+ import { cva as cva3 } from "class-variance-authority";
104
+ import { jsx as jsx3 } from "react/jsx-runtime";
105
+ var dismissButton = cva3(
106
+ "inline-flex items-center justify-center shrink-0 rounded-full transition-colors disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black dark:focus-visible:ring-white",
107
+ {
108
+ variants: {
109
+ variant: {
110
+ subtle: "bg-overlay-black-8 text-marian-blue-900 dark:bg-overlay-white-8 dark:text-white enabled:hover:bg-overlay-black-12 dark:enabled:hover:bg-overlay-white-12 enabled:active:bg-overlay-black-16 dark:enabled:active:bg-overlay-white-16 disabled:bg-gray-25 disabled:text-gray-400 dark:disabled:bg-midnight-700 dark:disabled:text-gray-600",
111
+ ghost: "bg-transparent text-marian-blue-900 dark:text-white enabled:hover:bg-marian-blue-200 dark:enabled:hover:bg-marian-blue-900 enabled:active:bg-marian-blue-300 dark:enabled:active:bg-marian-blue-800 disabled:text-gray-400 dark:disabled:text-gray-600"
112
+ },
113
+ size: {
114
+ xs: "size-5",
115
+ sm: "size-8",
116
+ md: "size-10"
117
+ }
118
+ },
119
+ defaultVariants: {
120
+ variant: "subtle",
121
+ size: "sm"
122
+ }
123
+ }
124
+ );
125
+ var glyphSize = {
126
+ xs: 12,
127
+ sm: 16,
128
+ md: 20
129
+ };
130
+ function DismissButton({ variant, size = "sm", label = "Fechar", disabled, onClick, className }) {
131
+ const s = glyphSize[size ?? "sm"];
132
+ return /* @__PURE__ */ jsx3(
133
+ "button",
134
+ {
135
+ type: "button",
136
+ disabled,
137
+ onClick,
138
+ "aria-label": label,
139
+ className: cn(dismissButton({ variant, size }), className),
140
+ children: /* @__PURE__ */ jsx3("svg", { width: s, height: s, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx3("path", { d: "M18 6 6 18M6 6l12 12" }) })
141
+ }
142
+ );
143
+ }
144
+
145
+ // src/components/Chip/Chip.web.tsx
146
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
147
+ var sizeCls = {
148
+ sm: "h-8 px-3 text-xs leading-4 tracking-[0.5px]",
149
+ md: "h-11 px-4 text-sm leading-5"
150
+ };
151
+ function Chip({ children, checked = false, disabled = false, size = "md", leading, trailing, onClick, className }) {
152
+ return /* @__PURE__ */ jsxs(
153
+ "button",
154
+ {
155
+ type: "button",
156
+ role: "button",
157
+ "aria-pressed": checked,
158
+ disabled,
159
+ onClick,
160
+ className: cn(
161
+ "inline-flex items-center justify-center gap-2 rounded-full border border-solid transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-marian-blue-900 dark:focus-visible:ring-white",
162
+ sizeCls[size],
163
+ checked ? "font-semibold" : "font-medium",
164
+ disabled ? "cursor-not-allowed border-gray-50 bg-gray-25 text-gray-400 dark:border-midnight-700 dark:bg-midnight-700 dark:text-gray-600" : checked ? "cursor-pointer border-marian-blue-700 bg-marian-blue-700 text-white enabled:hover:bg-marian-blue-800 enabled:active:bg-marian-blue-900 dark:border-marian-blue-800 dark:bg-marian-blue-800 dark:enabled:hover:bg-marian-blue-900" : "cursor-pointer border-marian-blue-200 bg-transparent text-marian-blue-900 enabled:hover:bg-marian-blue-700/[0.08] enabled:active:bg-marian-blue-700/[0.12] dark:border-midnight-50 dark:text-white dark:enabled:hover:bg-marian-blue-800/[0.08] dark:enabled:active:bg-marian-blue-800/[0.12]",
165
+ className
166
+ ),
167
+ children: [
168
+ leading && /* @__PURE__ */ jsx4("span", { className: "shrink-0", children: leading }),
169
+ children,
170
+ trailing && /* @__PURE__ */ jsx4("span", { className: "shrink-0", children: trailing })
171
+ ]
172
+ }
173
+ );
174
+ }
175
+
176
+ // src/components/Alert/Alert.web.tsx
177
+ import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
178
+ var variantStyles = {
179
+ success: { bg: "bg-green-100 dark:bg-green-800", icon: "text-green-text" },
180
+ info: { bg: "bg-blue-100 dark:bg-blue-700", icon: "text-blue-600 dark:text-blue-100" },
181
+ warning: { bg: "bg-amber-100 dark:bg-amber-800", icon: "text-amber-600 dark:text-amber-100" },
182
+ error: { bg: "bg-ketchup-100 dark:bg-ketchup-800", icon: "text-ketchup-600 dark:text-ketchup-text" }
183
+ };
184
+ function AlertIcon({ variant }) {
185
+ const common = { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true };
186
+ switch (variant) {
187
+ case "success":
188
+ return /* @__PURE__ */ jsxs2("svg", { ...common, children: [
189
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "9" }),
190
+ /* @__PURE__ */ jsx5("path", { d: "M8.5 12.5 11 15l4.5-5" })
191
+ ] });
192
+ case "error":
193
+ return /* @__PURE__ */ jsxs2("svg", { ...common, children: [
194
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "9" }),
195
+ /* @__PURE__ */ jsx5("path", { d: "M15 9l-6 6M9 9l6 6" })
196
+ ] });
197
+ case "warning":
198
+ return /* @__PURE__ */ jsxs2("svg", { ...common, children: [
199
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "9" }),
200
+ /* @__PURE__ */ jsx5("path", { d: "M12 7.5v5M12 16h.01" })
201
+ ] });
202
+ case "info":
203
+ return /* @__PURE__ */ jsxs2("svg", { ...common, children: [
204
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "9" }),
205
+ /* @__PURE__ */ jsx5("path", { d: "M12 11v5M12 8h.01" })
206
+ ] });
207
+ }
208
+ }
209
+ function Alert({ variant = "info", size = "default", layout = "stacked", title, description, onDismiss, className }) {
210
+ const styles = variantStyles[variant];
211
+ const pad = size === "compact" ? "p-3" : "p-5";
212
+ const gap = size === "compact" ? "gap-2" : "gap-3";
213
+ const icon = /* @__PURE__ */ jsx5("span", { className: cn("shrink-0", styles.icon), children: /* @__PURE__ */ jsx5(AlertIcon, { variant }) });
214
+ const body = description && /* @__PURE__ */ jsx5("p", { className: "text-body-default text-gray-700 dark:text-gray-300 w-full", children: description });
215
+ const close = onDismiss && /* @__PURE__ */ jsx5("button", { type: "button", onClick: onDismiss, "aria-label": "Fechar", className: "shrink-0 text-marian-blue-900 dark:text-white", children: /* @__PURE__ */ jsx5("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx5("path", { d: "M18 6 6 18M6 6l12 12" }) }) });
216
+ return /* @__PURE__ */ jsxs2(
217
+ "div",
218
+ {
219
+ role: variant === "error" ? "alert" : "status",
220
+ className: cn(
221
+ "flex w-full items-start rounded-tl-2xl rounded-tr-2xl rounded-br-2xl border border-solid border-overlay-black-5 dark:border-overlay-white-5",
222
+ pad,
223
+ gap,
224
+ styles.bg,
225
+ className
226
+ ),
227
+ children: [
228
+ layout === "inline" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
229
+ icon,
230
+ body
231
+ ] }) : /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
232
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
233
+ icon,
234
+ title && /* @__PURE__ */ jsx5("p", { className: "flex-1 text-h3 text-marian-blue-900 dark:text-white", children: title })
235
+ ] }),
236
+ body
237
+ ] }),
238
+ close
239
+ ]
240
+ }
241
+ );
242
+ }
243
+
244
+ // src/components/ProgressBar/ProgressBar.web.tsx
245
+ import { jsx as jsx6 } from "react/jsx-runtime";
246
+ function ProgressBar({ value, className }) {
247
+ const pct = Math.min(100, Math.max(0, value));
248
+ return /* @__PURE__ */ jsx6(
249
+ "div",
250
+ {
251
+ role: "progressbar",
252
+ "aria-valuenow": pct,
253
+ "aria-valuemin": 0,
254
+ "aria-valuemax": 100,
255
+ className: cn(
256
+ "relative h-2 w-full rounded-full bg-gray-15 overflow-hidden dark:bg-midnight-800",
257
+ className
258
+ ),
259
+ children: /* @__PURE__ */ jsx6(
260
+ "div",
261
+ {
262
+ className: "absolute inset-y-0 left-0 bg-marian-blue-600 rounded-full transition-[width]",
263
+ style: { width: `${pct}%` }
264
+ }
265
+ )
266
+ }
267
+ );
268
+ }
269
+
270
+ // src/components/Input/Input.web.tsx
271
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
272
+ function Input({ value, placeholder = "exemplo@email.com", state = "default", leadingIcon, trailingIcon, onChange, className }) {
273
+ const isDisabled = state === "disabled";
274
+ const isError = state === "error";
275
+ return /* @__PURE__ */ jsxs3(
276
+ "div",
277
+ {
278
+ className: cn(
279
+ "flex items-center gap-2 h-12 px-3 rounded-input border border-solid text-body-default transition-colors",
280
+ "focus-within:ring-2 focus-within:ring-black dark:focus-within:ring-white",
281
+ isDisabled ? "bg-gray-25 border-gray-50 text-gray-400 cursor-not-allowed dark:bg-midnight-700 dark:border-midnight-700 dark:text-gray-600" : isError ? "bg-white border-ketchup-600 text-ketchup-text dark:bg-midnight-900 dark:border-ketchup-500 dark:text-ketchup-600" : "bg-white border-marian-blue-200 text-marian-blue-900 dark:bg-midnight-900 dark:border-midnight-50 dark:text-white",
282
+ className
283
+ ),
284
+ children: [
285
+ leadingIcon && /* @__PURE__ */ jsx7("span", { className: "shrink-0 text-current", children: leadingIcon }),
286
+ /* @__PURE__ */ jsx7(
287
+ "input",
288
+ {
289
+ type: "text",
290
+ value,
291
+ placeholder,
292
+ disabled: isDisabled,
293
+ onChange,
294
+ className: "flex-1 bg-transparent outline-none text-current placeholder:text-gray-500 min-w-0"
295
+ }
296
+ ),
297
+ trailingIcon && /* @__PURE__ */ jsx7("span", { className: "shrink-0 text-current", children: trailingIcon })
298
+ ]
299
+ }
300
+ );
301
+ }
302
+
303
+ // src/components/InputField/InputField.web.tsx
304
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
305
+ function InputField({
306
+ label,
307
+ required,
308
+ helperText,
309
+ error,
310
+ value,
311
+ placeholder,
312
+ disabled,
313
+ leadingIcon,
314
+ trailingIcon,
315
+ onChange,
316
+ className
317
+ }) {
318
+ const state = disabled ? "disabled" : error ? "error" : "default";
319
+ return /* @__PURE__ */ jsxs4("div", { className: cn("flex flex-col gap-2 w-full", className), children: [
320
+ /* @__PURE__ */ jsxs4("label", { className: "flex flex-col gap-2", children: [
321
+ label && /* @__PURE__ */ jsxs4("span", { className: "inline-flex items-center gap-0.5 text-label-default text-marian-blue-900 dark:text-white", children: [
322
+ label,
323
+ required && /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "text-ketchup-text dark:text-ketchup-600", children: "*" })
324
+ ] }),
325
+ /* @__PURE__ */ jsx8(
326
+ Input,
327
+ {
328
+ state,
329
+ value,
330
+ placeholder,
331
+ leadingIcon,
332
+ trailingIcon,
333
+ onChange
334
+ }
335
+ )
336
+ ] }),
337
+ helperText && /* @__PURE__ */ jsx8("span", { className: cn("text-caption", error ? "text-ketchup-text dark:text-ketchup-600" : "text-gray-700 dark:text-gray-300"), children: helperText })
338
+ ] });
339
+ }
340
+
341
+ // src/components/Checkbox/Checkbox.web.tsx
342
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
343
+ var boxSize = {
344
+ xs: "size-4",
345
+ sm: "size-5",
346
+ md: "size-6"
347
+ };
348
+ function CheckIcon() {
349
+ return /* @__PURE__ */ jsx9("svg", { viewBox: "0 0 24 24", fill: "none", className: "w-3/4 h-3/4", "aria-hidden": "true", children: /* @__PURE__ */ jsx9("path", { d: "M5 12.5 10 17.5 19 7", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
350
+ }
351
+ function Checkbox({ checked = false, onChange, disabled = false, size = "sm", className }) {
352
+ return /* @__PURE__ */ jsxs5(
353
+ "label",
354
+ {
355
+ className: cn(
356
+ "inline-flex items-center justify-center rounded-full p-1 transition-colors",
357
+ disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-marian-blue-700/[0.08] active:bg-marian-blue-700/[0.12] dark:hover:bg-marian-blue-800/[0.08] dark:active:bg-marian-blue-800/[0.12]",
358
+ className
359
+ ),
360
+ children: [
361
+ /* @__PURE__ */ jsx9(
362
+ "input",
363
+ {
364
+ type: "checkbox",
365
+ checked,
366
+ disabled,
367
+ onChange: () => onChange?.(!checked),
368
+ className: "peer sr-only"
369
+ }
370
+ ),
371
+ /* @__PURE__ */ jsx9(
372
+ "span",
373
+ {
374
+ className: cn(
375
+ "flex items-center justify-center rounded-[6px] border-2 transition-colors",
376
+ "peer-focus-visible:ring-2 peer-focus-visible:ring-marian-blue-900 dark:peer-focus-visible:ring-white",
377
+ boxSize[size],
378
+ checked ? disabled ? "bg-gray-25 border-gray-25 text-gray-400 dark:bg-midnight-700 dark:border-midnight-700 dark:text-gray-600" : "bg-marian-blue-700 border-marian-blue-700 text-white dark:bg-marian-blue-800 dark:border-marian-blue-800" : disabled ? "border-gray-400 dark:border-gray-600" : "border-gray-600 dark:border-gray-400"
379
+ ),
380
+ children: checked && /* @__PURE__ */ jsx9(CheckIcon, {})
381
+ }
382
+ )
383
+ ]
384
+ }
385
+ );
386
+ }
387
+
388
+ // src/components/ToggleSwitch/ToggleSwitch.web.tsx
389
+ import { jsx as jsx10 } from "react/jsx-runtime";
390
+ var trackSize = {
391
+ xs: "w-8 h-5",
392
+ sm: "w-10 h-6",
393
+ md: "w-[52px] h-8"
394
+ };
395
+ var knobSize = {
396
+ xs: "size-4",
397
+ sm: "size-5",
398
+ md: "size-7"
399
+ };
400
+ var knobOn = {
401
+ xs: "translate-x-3",
402
+ sm: "translate-x-4",
403
+ md: "translate-x-5"
404
+ };
405
+ function ToggleSwitch({ value = false, onChange, disabled = false, size = "sm", label, className }) {
406
+ return /* @__PURE__ */ jsx10(
407
+ "button",
408
+ {
409
+ type: "button",
410
+ role: "switch",
411
+ "aria-checked": value,
412
+ "aria-label": label,
413
+ disabled,
414
+ onClick: () => onChange?.(!value),
415
+ className: cn(
416
+ "inline-flex shrink-0 items-center rounded-full p-0.5 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-marian-blue-900 dark:focus-visible:ring-white",
417
+ trackSize[size],
418
+ disabled ? "cursor-not-allowed bg-gray-25 dark:bg-midnight-700" : value ? "cursor-pointer bg-marian-blue-700 dark:bg-marian-blue-800" : "cursor-pointer bg-gray-25 dark:bg-midnight-700",
419
+ className
420
+ ),
421
+ children: /* @__PURE__ */ jsx10(
422
+ "span",
423
+ {
424
+ className: cn(
425
+ "rounded-full transition-transform",
426
+ knobSize[size],
427
+ disabled ? "bg-gray-400 dark:bg-gray-600" : "bg-white dark:bg-midnight-900",
428
+ value ? knobOn[size] : "translate-x-0"
429
+ )
430
+ }
431
+ )
432
+ }
433
+ );
434
+ }
435
+
436
+ // src/components/RadioGroup/RadioGroup.web.tsx
437
+ import { jsx as jsx11 } from "react/jsx-runtime";
438
+ function RadioGroup({ children, label, className }) {
439
+ return /* @__PURE__ */ jsx11(
440
+ "div",
441
+ {
442
+ role: "radiogroup",
443
+ "aria-label": label,
444
+ className: cn("flex flex-col gap-2", className),
445
+ children
446
+ }
447
+ );
448
+ }
449
+
450
+ // src/components/ChoiceCard/ChoiceCard.web.tsx
451
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
452
+ function containerClass(selected, disabled) {
453
+ if (disabled) {
454
+ return "cursor-not-allowed border border-gray-50 bg-white dark:border-midnight-700 dark:bg-midnight-900";
455
+ }
456
+ if (selected) {
457
+ return "cursor-pointer border-2 border-marian-blue-600 bg-marian-blue-200 enabled:hover:bg-marian-blue-300 enabled:active:bg-marian-blue-400 dark:border-marian-blue-300 dark:bg-marian-blue-900 dark:enabled:hover:bg-marian-blue-800 dark:enabled:active:bg-marian-blue-700";
458
+ }
459
+ return "cursor-pointer border border-marian-blue-200 bg-white enabled:hover:bg-gray-15 enabled:active:bg-gray-35 dark:border-midnight-50 dark:bg-midnight-900 dark:enabled:hover:bg-midnight-800 dark:enabled:active:bg-midnight-600";
460
+ }
461
+ function CheckGlyph() {
462
+ return /* @__PURE__ */ jsx12("svg", { viewBox: "0 0 24 24", fill: "none", className: "w-3/4 h-3/4", "aria-hidden": "true", children: /* @__PURE__ */ jsx12("path", { d: "M5 12.5 10 17.5 19 7", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
463
+ }
464
+ function Trailing({ type, selected, disabled }) {
465
+ const off = disabled ? "border-gray-400 dark:border-gray-600" : "border-gray-600 dark:border-gray-400";
466
+ const on = "border-marian-blue-700 dark:border-marian-blue-800";
467
+ if (type === "action") {
468
+ return /* @__PURE__ */ jsx12("span", { className: cn("shrink-0", disabled ? "text-gray-400 dark:text-gray-600" : "text-gray-600 dark:text-gray-400"), children: /* @__PURE__ */ jsx12("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx12("path", { d: "M9 6l6 6-6 6" }) }) });
469
+ }
470
+ if (type === "checkbox") {
471
+ return /* @__PURE__ */ jsx12("span", { className: cn("flex size-6 shrink-0 items-center justify-center rounded-[6px] border-2", selected ? cn(on, "bg-marian-blue-700 text-white dark:bg-marian-blue-800") : off), children: selected && /* @__PURE__ */ jsx12(CheckGlyph, {}) });
472
+ }
473
+ return /* @__PURE__ */ jsx12("span", { className: cn("flex size-6 shrink-0 items-center justify-center rounded-full border-2", selected ? on : off), children: selected && /* @__PURE__ */ jsx12("span", { className: "size-3 rounded-full bg-marian-blue-700 dark:bg-marian-blue-800" }) });
474
+ }
475
+ function ChoiceCard({ type = "radio", label, description, selected = false, disabled = false, leading, showTrailing = true, onClick, className }) {
476
+ const isSelected = type === "action" ? false : selected;
477
+ const textColor = disabled ? "text-gray-400 dark:text-gray-600" : "text-marian-blue-900 dark:text-white";
478
+ const descColor = disabled ? "text-gray-400 dark:text-gray-600" : "text-gray-700 dark:text-gray-300";
479
+ return /* @__PURE__ */ jsxs6(
480
+ "button",
481
+ {
482
+ type: "button",
483
+ role: type === "radio" ? "radio" : type === "checkbox" ? "checkbox" : "button",
484
+ "aria-checked": type === "action" ? void 0 : isSelected,
485
+ disabled,
486
+ onClick,
487
+ className: cn(
488
+ "flex w-full items-center gap-3 rounded-[20px] p-4 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-marian-blue-900 dark:focus-visible:ring-white",
489
+ containerClass(isSelected, disabled),
490
+ className
491
+ ),
492
+ children: [
493
+ leading && /* @__PURE__ */ jsx12("span", { className: "flex size-6 shrink-0 items-center justify-center", children: leading }),
494
+ /* @__PURE__ */ jsxs6("span", { className: "flex flex-1 flex-col gap-1 min-w-0", children: [
495
+ /* @__PURE__ */ jsx12("span", { className: cn("text-sm leading-5", description ? "font-semibold" : "font-medium", textColor), children: label }),
496
+ description && /* @__PURE__ */ jsx12("span", { className: cn("text-sm font-medium leading-5", descColor), children: description })
497
+ ] }),
498
+ showTrailing && /* @__PURE__ */ jsx12(Trailing, { type, selected: isSelected, disabled })
499
+ ]
500
+ }
501
+ );
502
+ }
503
+
504
+ // src/components/ListItem/ListItem.web.tsx
505
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
506
+ function CheckGlyph2() {
507
+ return /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 24 24", fill: "none", className: "w-3/4 h-3/4", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M5 12.5 10 17.5 19 7", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
508
+ }
509
+ function TrailingVisual({ trailing, selected, disabled }) {
510
+ const off = disabled ? "border-gray-400 dark:border-gray-600" : "border-gray-600 dark:border-gray-400";
511
+ const on = "border-marian-blue-700 dark:border-marian-blue-800";
512
+ if (trailing === "action") {
513
+ return /* @__PURE__ */ jsx13("span", { className: cn("shrink-0", disabled ? "text-gray-400 dark:text-gray-600" : "text-gray-600 dark:text-gray-400"), children: /* @__PURE__ */ jsx13("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M9 6l6 6-6 6" }) }) });
514
+ }
515
+ if (trailing === "checkbox") {
516
+ return /* @__PURE__ */ jsx13("span", { className: cn("flex size-6 shrink-0 items-center justify-center rounded-[6px] border-2", selected ? cn(on, "bg-marian-blue-700 text-white dark:bg-marian-blue-800") : off), children: selected && /* @__PURE__ */ jsx13(CheckGlyph2, {}) });
517
+ }
518
+ return /* @__PURE__ */ jsx13("span", { className: cn("flex size-6 shrink-0 items-center justify-center rounded-full border-2", selected ? on : off), children: selected && /* @__PURE__ */ jsx13("span", { className: "size-3 rounded-full bg-marian-blue-700 dark:bg-marian-blue-800" }) });
519
+ }
520
+ function ListItem({ trailing = "none", label, description, selected = false, disabled = false, leading, switchValue = false, onSwitchChange, onClick, className }) {
521
+ const isSelected = trailing === "radio" || trailing === "checkbox" ? selected : false;
522
+ const pad = description ? "p-4" : "p-2.5";
523
+ const textColor = disabled ? "text-gray-400 dark:text-gray-600" : "text-marian-blue-900 dark:text-white";
524
+ const descColor = disabled ? "text-gray-400 dark:text-gray-600" : "text-gray-700 dark:text-gray-300";
525
+ const hover = disabled ? "" : isSelected ? "hover:bg-marian-blue-300 active:bg-marian-blue-400 dark:hover:bg-marian-blue-800 dark:active:bg-marian-blue-700" : "hover:bg-gray-15 active:bg-gray-35 dark:hover:bg-midnight-800 dark:active:bg-midnight-600";
526
+ const base = cn("flex w-full items-center gap-3 text-left transition-colors", pad, isSelected && "bg-marian-blue-200 dark:bg-marian-blue-900", hover, className);
527
+ const content = /* @__PURE__ */ jsxs7(Fragment2, { children: [
528
+ leading && /* @__PURE__ */ jsx13("span", { className: "flex size-6 shrink-0 items-center justify-center", children: leading }),
529
+ /* @__PURE__ */ jsxs7("span", { className: "flex flex-1 flex-col gap-1 min-w-0", children: [
530
+ /* @__PURE__ */ jsx13("span", { className: cn("text-sm leading-5", description ? "font-semibold" : "font-medium", textColor), children: label }),
531
+ description && /* @__PURE__ */ jsx13("span", { className: cn("text-sm font-medium leading-5", descColor), children: description })
532
+ ] }),
533
+ trailing === "switch" ? /* @__PURE__ */ jsx13(ToggleSwitch, { size: "sm", value: switchValue, onChange: onSwitchChange, disabled, label }) : trailing !== "none" ? /* @__PURE__ */ jsx13(TrailingVisual, { trailing, selected: isSelected, disabled }) : null
534
+ ] });
535
+ if (trailing === "switch" || trailing === "none") {
536
+ return /* @__PURE__ */ jsx13("div", { className: base, children: content });
537
+ }
538
+ return /* @__PURE__ */ jsx13(
539
+ "button",
540
+ {
541
+ type: "button",
542
+ role: trailing === "radio" ? "radio" : trailing === "checkbox" ? "checkbox" : "button",
543
+ "aria-checked": trailing === "radio" || trailing === "checkbox" ? isSelected : void 0,
544
+ disabled,
545
+ onClick,
546
+ className: cn(base, "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-marian-blue-900 dark:focus-visible:ring-white"),
547
+ children: content
548
+ }
549
+ );
550
+ }
551
+
552
+ // src/components/Stepper/Stepper.web.tsx
553
+ import { jsx as jsx14 } from "react/jsx-runtime";
554
+ function segmentClass(index, currentStep) {
555
+ if (index < currentStep - 1) return "bg-marian-blue-600";
556
+ if (index === currentStep - 1) return "bg-marian-blue-200 dark:bg-marian-blue-900";
557
+ return "bg-gray-25 dark:bg-midnight-700";
558
+ }
559
+ function Stepper({ totalSteps, currentStep, className }) {
560
+ return /* @__PURE__ */ jsx14(
561
+ "div",
562
+ {
563
+ role: "progressbar",
564
+ "aria-valuenow": currentStep,
565
+ "aria-valuemin": 1,
566
+ "aria-valuemax": totalSteps,
567
+ "aria-label": `Etapa ${currentStep} de ${totalSteps}`,
568
+ className: cn("flex w-full items-start gap-1", className),
569
+ children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx14("div", { "aria-hidden": "true", className: cn("h-1 flex-1 rounded-full", segmentClass(i, currentStep)) }, i))
570
+ }
571
+ );
572
+ }
573
+
574
+ // src/components/RatingScale/RatingScale.web.tsx
575
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
576
+ function RatingScale({ value = null, onChange, options = DEFAULT_OPTIONS, disabled = false, className }) {
577
+ return /* @__PURE__ */ jsx15(
578
+ "div",
579
+ {
580
+ role: "radiogroup",
581
+ "aria-label": "Avalia\xE7\xE3o de 1 a 5",
582
+ className: cn("flex items-center justify-center gap-2 p-4", className),
583
+ children: options.map((option, index) => {
584
+ const itemValue = index + 1;
585
+ const selected = value === itemValue;
586
+ return /* @__PURE__ */ jsxs8(
587
+ "button",
588
+ {
589
+ type: "button",
590
+ role: "radio",
591
+ "aria-checked": selected,
592
+ "aria-label": option.label.replace("\n", " "),
593
+ disabled,
594
+ onClick: () => onChange?.(itemValue),
595
+ className: "flex flex-1 flex-col items-center justify-center gap-1.5 py-1 disabled:cursor-not-allowed",
596
+ children: [
597
+ /* @__PURE__ */ jsx15(
598
+ "div",
599
+ {
600
+ className: cn(
601
+ "flex size-[60px] items-center justify-center overflow-hidden rounded-full transition-colors",
602
+ disabled ? "border border-gray-50 bg-gray-25 dark:border-midnight-700 dark:bg-midnight-700" : selected ? "border-2 border-marian-blue-600 bg-marian-blue-200 dark:border-marian-blue-300 dark:bg-marian-blue-900" : "border border-marian-blue-200 bg-white dark:border-midnight-50 dark:bg-midnight-900"
603
+ ),
604
+ children: /* @__PURE__ */ jsx15("span", { className: cn("select-none text-[28px] leading-none", disabled && "opacity-40"), children: option.emoji })
605
+ }
606
+ ),
607
+ /* @__PURE__ */ jsx15(
608
+ "span",
609
+ {
610
+ className: cn(
611
+ "w-full whitespace-pre-line text-center text-caption",
612
+ disabled ? "text-gray-400 dark:text-gray-600" : "text-marian-blue-900 dark:text-white"
613
+ ),
614
+ children: option.label
615
+ }
616
+ ),
617
+ /* @__PURE__ */ jsx15("span", { className: "text-[10px] font-semibold leading-none tracking-[0.8px] text-gray-400 dark:text-gray-600", children: itemValue })
618
+ ]
619
+ },
620
+ itemValue
621
+ );
622
+ })
623
+ }
624
+ );
625
+ }
8
626
  export {
627
+ Alert,
628
+ Button,
629
+ ButtonIcon,
630
+ Checkbox,
631
+ Chip,
632
+ ChoiceCard,
633
+ DismissButton,
634
+ Input,
635
+ InputField,
636
+ ListItem,
637
+ ProgressBar,
638
+ RadioGroup,
639
+ RatingScale,
640
+ Stepper,
641
+ ToggleSwitch,
642
+ borderWidth,
9
643
  colors,
10
644
  darkTheme,
11
- lightTheme
645
+ grid,
646
+ lightTheme,
647
+ opacity,
648
+ radius,
649
+ shadow,
650
+ spacing,
651
+ typography
12
652
  };
13
653
  //# sourceMappingURL=index.web.mjs.map