@rabelo-digital/ds-rd 1.1.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/dist/index.js ADDED
@@ -0,0 +1,774 @@
1
+ 'use strict';
2
+
3
+ var chunkCZMDBTZY_js = require('./chunk-CZMDBTZY.js');
4
+ var React = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var RadixCheckbox = require('@radix-ui/react-checkbox');
7
+ var RadixRadio = require('@radix-ui/react-radio-group');
8
+ var RadixSelect = require('@radix-ui/react-select');
9
+ var RadixTooltip = require('@radix-ui/react-tooltip');
10
+ var fa = require('react-icons/fa');
11
+ var Dialog = require('@radix-ui/react-dialog');
12
+ var RadixTabs = require('@radix-ui/react-tabs');
13
+ var RadixAccordion = require('@radix-ui/react-accordion');
14
+ var RadixToast = require('@radix-ui/react-toast');
15
+
16
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
17
+
18
+ function _interopNamespace(e) {
19
+ if (e && e.__esModule) return e;
20
+ var n = Object.create(null);
21
+ if (e) {
22
+ Object.keys(e).forEach(function (k) {
23
+ if (k !== 'default') {
24
+ var d = Object.getOwnPropertyDescriptor(e, k);
25
+ Object.defineProperty(n, k, d.get ? d : {
26
+ enumerable: true,
27
+ get: function () { return e[k]; }
28
+ });
29
+ }
30
+ });
31
+ }
32
+ n.default = e;
33
+ return Object.freeze(n);
34
+ }
35
+
36
+ var React__default = /*#__PURE__*/_interopDefault(React);
37
+ var RadixCheckbox__namespace = /*#__PURE__*/_interopNamespace(RadixCheckbox);
38
+ var RadixRadio__namespace = /*#__PURE__*/_interopNamespace(RadixRadio);
39
+ var RadixSelect__namespace = /*#__PURE__*/_interopNamespace(RadixSelect);
40
+ var RadixTooltip__namespace = /*#__PURE__*/_interopNamespace(RadixTooltip);
41
+ var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
42
+ var RadixTabs__namespace = /*#__PURE__*/_interopNamespace(RadixTabs);
43
+ var RadixAccordion__namespace = /*#__PURE__*/_interopNamespace(RadixAccordion);
44
+ var RadixToast__namespace = /*#__PURE__*/_interopNamespace(RadixToast);
45
+
46
+ // src/components/atoms/Button/Button.module.css
47
+ var Button_default = {};
48
+ var Button = React__default.default.forwardRef(
49
+ ({
50
+ variant = "primary",
51
+ size = "md",
52
+ loading = false,
53
+ disabled,
54
+ className,
55
+ children,
56
+ onClick,
57
+ ...props
58
+ }, ref) => {
59
+ const isDisabled = disabled || loading;
60
+ return /* @__PURE__ */ jsxRuntime.jsxs(
61
+ "button",
62
+ {
63
+ ref,
64
+ className: [
65
+ Button_default.button,
66
+ Button_default[variant],
67
+ Button_default[size],
68
+ loading ? Button_default.loading : "",
69
+ className ?? ""
70
+ ].filter(Boolean).join(" "),
71
+ disabled: isDisabled,
72
+ "aria-disabled": isDisabled || void 0,
73
+ "aria-busy": loading || void 0,
74
+ onClick: isDisabled ? void 0 : onClick,
75
+ ...props,
76
+ children: [
77
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: loading ? Button_default.labelHidden : Button_default.label, children }),
78
+ loading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Button_default.spinner, "aria-hidden": "true" })
79
+ ]
80
+ }
81
+ );
82
+ }
83
+ );
84
+ Button.displayName = "Button";
85
+
86
+ // src/components/atoms/Input/Input.module.css
87
+ var Input_default = {};
88
+ var Input = React__default.default.forwardRef(
89
+ ({ label, error, helperText, size = "md", className, id, ...props }, ref) => {
90
+ const generatedId = React.useId();
91
+ const inputId = id ?? generatedId;
92
+ const errorId = `${inputId}-error`;
93
+ const helperId = `${inputId}-helper`;
94
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Input_default.wrapper, children: [
95
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: inputId, className: Input_default.label, children: label }),
96
+ /* @__PURE__ */ jsxRuntime.jsx(
97
+ "input",
98
+ {
99
+ ref,
100
+ id: inputId,
101
+ className: [Input_default.input, Input_default[size], error ? Input_default.error : "", className ?? ""].filter(Boolean).join(" "),
102
+ "aria-invalid": !!error,
103
+ "aria-describedby": [error ? errorId : null, helperText ? helperId : null].filter(Boolean).join(" ") || void 0,
104
+ ...props
105
+ }
106
+ ),
107
+ error && /* @__PURE__ */ jsxRuntime.jsx("span", { id: errorId, className: Input_default.errorText, role: "alert", children: error }),
108
+ helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("span", { id: helperId, className: Input_default.helperText, children: helperText })
109
+ ] });
110
+ }
111
+ );
112
+ Input.displayName = "Input";
113
+
114
+ // src/components/atoms/Textarea/Textarea.module.css
115
+ var Textarea_default = {};
116
+ var Textarea = React__default.default.forwardRef(
117
+ ({ label, error, helperText, showCount = false, maxLength, className, id, onChange, ...props }, ref) => {
118
+ const generatedId = React.useId();
119
+ const textareaId = id ?? generatedId;
120
+ const errorId = `${textareaId}-error`;
121
+ const helperId = `${textareaId}-helper`;
122
+ const [count, setCount] = React.useState(typeof props.value === "string" ? props.value.length : 0);
123
+ const handleChange = (e) => {
124
+ setCount(e.target.value.length);
125
+ onChange?.(e);
126
+ };
127
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Textarea_default.wrapper, children: [
128
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: textareaId, className: Textarea_default.label, children: label }),
129
+ /* @__PURE__ */ jsxRuntime.jsx(
130
+ "textarea",
131
+ {
132
+ ref,
133
+ id: textareaId,
134
+ className: [Textarea_default.textarea, error ? Textarea_default.error : "", className ?? ""].filter(Boolean).join(" "),
135
+ maxLength,
136
+ onChange: handleChange,
137
+ "aria-invalid": !!error,
138
+ "aria-describedby": [error ? errorId : null, helperText ? helperId : null].filter(Boolean).join(" ") || void 0,
139
+ ...props
140
+ }
141
+ ),
142
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Textarea_default.footer, children: [
143
+ error && /* @__PURE__ */ jsxRuntime.jsx("span", { id: errorId, className: Textarea_default.errorText, role: "alert", children: error }),
144
+ helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("span", { id: helperId, className: Textarea_default.helperText, children: helperText }),
145
+ showCount && maxLength && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: Textarea_default.counter, "aria-live": "polite", children: [
146
+ count,
147
+ "/",
148
+ maxLength
149
+ ] })
150
+ ] })
151
+ ] });
152
+ }
153
+ );
154
+ Textarea.displayName = "Textarea";
155
+
156
+ // src/components/atoms/Badge/Badge.module.css
157
+ var Badge_default = {};
158
+ var Badge = ({
159
+ variant = "default",
160
+ size = "md",
161
+ children,
162
+ className
163
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
164
+ "span",
165
+ {
166
+ className: [Badge_default.badge, Badge_default[variant], Badge_default[size], className ?? ""].filter(Boolean).join(" "),
167
+ children
168
+ }
169
+ );
170
+ Badge.displayName = "Badge";
171
+
172
+ // src/components/atoms/Avatar/Avatar.module.css
173
+ var Avatar_default = {};
174
+ function getInitials(name) {
175
+ return name.split(" ").map((part) => part[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
176
+ }
177
+ var Avatar = ({
178
+ src,
179
+ alt,
180
+ name,
181
+ size = "md",
182
+ shape = "circle",
183
+ className
184
+ }) => {
185
+ const [imgError, setImgError] = React.useState(false);
186
+ const initials = name ? getInitials(name) : null;
187
+ const showImage = src && !imgError;
188
+ const wrapperClass = [Avatar_default.avatar, Avatar_default[size], Avatar_default[shape], className ?? ""].filter(Boolean).join(" ");
189
+ if (showImage) {
190
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: wrapperClass, children: /* @__PURE__ */ jsxRuntime.jsx(
191
+ "img",
192
+ {
193
+ src,
194
+ alt: alt ?? name ?? "",
195
+ className: Avatar_default.image,
196
+ onError: () => setImgError(true)
197
+ }
198
+ ) });
199
+ }
200
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: wrapperClass, role: "img", "aria-label": alt ?? name ?? "Avatar", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: Avatar_default.initials, "aria-hidden": "true", children: initials ?? "?" }) });
201
+ };
202
+ Avatar.displayName = "Avatar";
203
+
204
+ // src/components/atoms/Checkbox/Checkbox.module.css
205
+ var Checkbox_default = {};
206
+ var Checkbox = ({
207
+ checked,
208
+ defaultChecked,
209
+ onCheckedChange,
210
+ disabled,
211
+ label,
212
+ id,
213
+ className
214
+ }) => {
215
+ const generatedId = React.useId();
216
+ const checkboxId = id ?? generatedId;
217
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [Checkbox_default.wrapper, className ?? ""].filter(Boolean).join(" "), children: [
218
+ /* @__PURE__ */ jsxRuntime.jsx(
219
+ RadixCheckbox__namespace.Root,
220
+ {
221
+ id: checkboxId,
222
+ checked,
223
+ defaultChecked,
224
+ onCheckedChange,
225
+ disabled,
226
+ className: Checkbox_default.root,
227
+ children: /* @__PURE__ */ jsxRuntime.jsx(RadixCheckbox__namespace.Indicator, { className: Checkbox_default.indicator, children: checked === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "2", viewBox: "0 0 10 2", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "10", height: "2", rx: "1" }) }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
228
+ "path",
229
+ {
230
+ d: "M1 4l2.5 2.5L9 1",
231
+ stroke: "currentColor",
232
+ strokeWidth: "1.5",
233
+ strokeLinecap: "round",
234
+ strokeLinejoin: "round"
235
+ }
236
+ ) }) })
237
+ }
238
+ ),
239
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: checkboxId, className: Checkbox_default.label, children: label })
240
+ ] });
241
+ };
242
+ Checkbox.displayName = "Checkbox";
243
+
244
+ // src/components/atoms/Radio/Radio.module.css
245
+ var Radio_default = {};
246
+ var RadioGroup = ({
247
+ options,
248
+ value,
249
+ defaultValue,
250
+ onValueChange,
251
+ disabled,
252
+ name,
253
+ orientation = "vertical",
254
+ className
255
+ }) => {
256
+ const baseId = React.useId();
257
+ return /* @__PURE__ */ jsxRuntime.jsx(
258
+ RadixRadio__namespace.Root,
259
+ {
260
+ value,
261
+ defaultValue,
262
+ onValueChange,
263
+ disabled,
264
+ name,
265
+ orientation,
266
+ className: [Radio_default.group, Radio_default[orientation], className ?? ""].filter(Boolean).join(" "),
267
+ children: options.map((option) => {
268
+ const radioId = `${baseId}-${option.value}`;
269
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Radio_default.item, children: [
270
+ /* @__PURE__ */ jsxRuntime.jsx(
271
+ RadixRadio__namespace.Item,
272
+ {
273
+ id: radioId,
274
+ value: option.value,
275
+ disabled: option.disabled ?? disabled,
276
+ className: Radio_default.radio,
277
+ children: /* @__PURE__ */ jsxRuntime.jsx(RadixRadio__namespace.Indicator, { className: Radio_default.indicator })
278
+ }
279
+ ),
280
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: radioId, className: Radio_default.label, children: option.label })
281
+ ] }, option.value);
282
+ })
283
+ }
284
+ );
285
+ };
286
+ RadioGroup.displayName = "RadioGroup";
287
+
288
+ // src/components/atoms/Select/Select.module.css
289
+ var Select_default = {};
290
+ var Select = ({
291
+ options,
292
+ value,
293
+ defaultValue,
294
+ onValueChange,
295
+ label,
296
+ placeholder = "Selecione...",
297
+ error,
298
+ helperText,
299
+ disabled,
300
+ size = "md",
301
+ id,
302
+ className
303
+ }) => {
304
+ const generatedId = React.useId();
305
+ const selectId = id ?? generatedId;
306
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [Select_default.wrapper, className ?? ""].filter(Boolean).join(" "), children: [
307
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { id: `${selectId}-label`, className: Select_default.label, children: label }),
308
+ /* @__PURE__ */ jsxRuntime.jsxs(
309
+ RadixSelect__namespace.Root,
310
+ {
311
+ value,
312
+ defaultValue,
313
+ onValueChange,
314
+ disabled,
315
+ children: [
316
+ /* @__PURE__ */ jsxRuntime.jsxs(
317
+ RadixSelect__namespace.Trigger,
318
+ {
319
+ id: selectId,
320
+ "aria-labelledby": label ? `${selectId}-label` : void 0,
321
+ "aria-invalid": !!error,
322
+ className: [Select_default.trigger, Select_default[size], error ? Select_default.error : ""].filter(Boolean).join(" "),
323
+ children: [
324
+ /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Value, { placeholder }),
325
+ /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Icon, { className: Select_default.icon, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
326
+ "path",
327
+ {
328
+ d: "M1 1l5 5 5-5",
329
+ stroke: "currentColor",
330
+ strokeWidth: "1.5",
331
+ strokeLinecap: "round",
332
+ strokeLinejoin: "round"
333
+ }
334
+ ) }) })
335
+ ]
336
+ }
337
+ ),
338
+ /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Content, { className: Select_default.content, position: "popper", sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Viewport, { className: Select_default.viewport, children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
339
+ RadixSelect__namespace.Item,
340
+ {
341
+ value: option.value,
342
+ disabled: option.disabled,
343
+ className: Select_default.item,
344
+ children: [
345
+ /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.ItemText, { children: option.label }),
346
+ /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.ItemIndicator, { className: Select_default.itemIndicator, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "10", viewBox: "0 0 12 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
347
+ "path",
348
+ {
349
+ d: "M1 5l3 3 7-7",
350
+ stroke: "currentColor",
351
+ strokeWidth: "1.5",
352
+ strokeLinecap: "round",
353
+ strokeLinejoin: "round"
354
+ }
355
+ ) }) })
356
+ ]
357
+ },
358
+ option.value
359
+ )) }) }) })
360
+ ]
361
+ }
362
+ ),
363
+ error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Select_default.errorText, role: "alert", children: error }),
364
+ helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Select_default.helperText, children: helperText })
365
+ ] });
366
+ };
367
+ Select.displayName = "Select";
368
+
369
+ // src/components/atoms/Tooltip/Tooltip.module.css
370
+ var Tooltip_default = {};
371
+ var TooltipProvider = RadixTooltip__namespace.Provider;
372
+ var Tooltip = ({
373
+ content,
374
+ children,
375
+ side = "top",
376
+ delayDuration = 300
377
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(RadixTooltip__namespace.Root, { delayDuration, children: [
378
+ /* @__PURE__ */ jsxRuntime.jsx(RadixTooltip__namespace.Trigger, { asChild: true, children }),
379
+ /* @__PURE__ */ jsxRuntime.jsx(RadixTooltip__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(RadixTooltip__namespace.Content, { side, className: Tooltip_default.content, sideOffset: 6, children: [
380
+ content,
381
+ /* @__PURE__ */ jsxRuntime.jsx(RadixTooltip__namespace.Arrow, { className: Tooltip_default.arrow })
382
+ ] }) })
383
+ ] });
384
+ Tooltip.displayName = "Tooltip";
385
+
386
+ // src/components/atoms/SocialIcons/SocialIcons.module.css
387
+ var SocialIcons_default = {};
388
+ var ICON_MAP = {
389
+ linkedin: fa.FaLinkedinIn,
390
+ instagram: fa.FaInstagram,
391
+ github: fa.FaGithub,
392
+ youtube: fa.FaYoutube,
393
+ whatsapp: fa.FaWhatsapp,
394
+ facebook: fa.FaFacebookF,
395
+ twitter: fa.FaTwitter
396
+ };
397
+ var DEFAULT_LABELS = {
398
+ linkedin: "Seguir no LinkedIn",
399
+ instagram: "Seguir no Instagram",
400
+ github: "Ver no GitHub",
401
+ youtube: "Assistir no YouTube",
402
+ whatsapp: "Conversar no WhatsApp",
403
+ facebook: "Seguir no Facebook",
404
+ twitter: "Seguir no Twitter"
405
+ };
406
+ var SocialIcons = ({ links, size = "md", className }) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: [SocialIcons_default.list, className ?? ""].filter(Boolean).join(" "), children: links.map(({ platform, url, label }) => {
407
+ const Icon2 = ICON_MAP[platform];
408
+ const ariaLabel = label ?? DEFAULT_LABELS[platform];
409
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
410
+ "a",
411
+ {
412
+ href: url,
413
+ target: "_blank",
414
+ rel: "noopener noreferrer",
415
+ "aria-label": ariaLabel,
416
+ className: [SocialIcons_default.link, SocialIcons_default[size]].join(" "),
417
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { "aria-hidden": "true" })
418
+ }
419
+ ) }, platform);
420
+ }) });
421
+ SocialIcons.displayName = "SocialIcons";
422
+
423
+ // src/components/molecules/Card/Card.module.css
424
+ var Card_default = {};
425
+ var CardHeader = ({ children, className }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: [Card_default.header, className ?? ""].filter(Boolean).join(" "), children });
426
+ var CardBody = ({ children, className }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: [Card_default.body, className ?? ""].filter(Boolean).join(" "), children });
427
+ var CardFooter = ({ children, className }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: [Card_default.footer, className ?? ""].filter(Boolean).join(" "), children });
428
+ var Card = ({ elevation: elevation2 = "sm", radius = "lg", className, children }) => /* @__PURE__ */ jsxRuntime.jsx(
429
+ "div",
430
+ {
431
+ className: [Card_default.card, className ?? ""].filter(Boolean).join(" "),
432
+ style: {
433
+ boxShadow: `var(--ds-elevation-${elevation2})`,
434
+ borderRadius: `var(--ds-radius-${radius})`
435
+ },
436
+ children
437
+ }
438
+ );
439
+ Card.Header = CardHeader;
440
+ Card.Body = CardBody;
441
+ Card.Footer = CardFooter;
442
+ Card.displayName = "Card";
443
+
444
+ // src/components/molecules/Modal/Modal.module.css
445
+ var Modal_default = {};
446
+ var Modal = ({
447
+ open,
448
+ onOpenChange,
449
+ title,
450
+ description,
451
+ size = "md",
452
+ children,
453
+ trigger
454
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Root, { open, onOpenChange, children: [
455
+ trigger && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { asChild: true, children: trigger }),
456
+ /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
457
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { className: Modal_default.overlay }),
458
+ /* @__PURE__ */ jsxRuntime.jsxs(
459
+ Dialog__namespace.Content,
460
+ {
461
+ className: [Modal_default.content, Modal_default[size]].join(" "),
462
+ "aria-describedby": description ? "modal-description" : void 0,
463
+ children: [
464
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Modal_default.header, children: [
465
+ title && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { className: Modal_default.title, children: title }),
466
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: Modal_default.close, "aria-label": "Fechar", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
467
+ "path",
468
+ {
469
+ d: "M2 2l12 12M14 2L2 14",
470
+ stroke: "currentColor",
471
+ strokeWidth: "2",
472
+ strokeLinecap: "round"
473
+ }
474
+ ) }) }) })
475
+ ] }),
476
+ description && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Description, { id: "modal-description", className: Modal_default.description, children: description }),
477
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: Modal_default.body, children })
478
+ ]
479
+ }
480
+ )
481
+ ] })
482
+ ] });
483
+ Modal.displayName = "Modal";
484
+
485
+ // src/components/molecules/Drawer/Drawer.module.css
486
+ var Drawer_default = {};
487
+ var Drawer = ({
488
+ open,
489
+ onOpenChange,
490
+ title,
491
+ side = "right",
492
+ children,
493
+ trigger
494
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Root, { open, onOpenChange, children: [
495
+ trigger && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { asChild: true, children: trigger }),
496
+ /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
497
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { className: Drawer_default.overlay }),
498
+ /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Content, { className: [Drawer_default.content, Drawer_default[side]].join(" "), children: [
499
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Drawer_default.header, children: [
500
+ title && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { className: Drawer_default.title, children: title }),
501
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: Drawer_default.close, "aria-label": "Fechar", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
502
+ "path",
503
+ {
504
+ d: "M2 2l12 12M14 2L2 14",
505
+ stroke: "currentColor",
506
+ strokeWidth: "2",
507
+ strokeLinecap: "round"
508
+ }
509
+ ) }) }) })
510
+ ] }),
511
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: Drawer_default.body, children })
512
+ ] })
513
+ ] })
514
+ ] });
515
+ Drawer.displayName = "Drawer";
516
+
517
+ // src/components/molecules/Tabs/Tabs.module.css
518
+ var Tabs_default = {};
519
+ var Tabs = ({
520
+ tabs,
521
+ defaultValue,
522
+ value,
523
+ onValueChange,
524
+ className
525
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(
526
+ RadixTabs__namespace.Root,
527
+ {
528
+ defaultValue: defaultValue ?? tabs[0]?.value,
529
+ value,
530
+ onValueChange,
531
+ className: [Tabs_default.root, className ?? ""].filter(Boolean).join(" "),
532
+ children: [
533
+ /* @__PURE__ */ jsxRuntime.jsx(RadixTabs__namespace.List, { className: Tabs_default.list, "aria-label": "Tabs", children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
534
+ RadixTabs__namespace.Trigger,
535
+ {
536
+ value: tab.value,
537
+ disabled: tab.disabled,
538
+ className: Tabs_default.trigger,
539
+ children: tab.label
540
+ },
541
+ tab.value
542
+ )) }),
543
+ tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(RadixTabs__namespace.Content, { value: tab.value, className: Tabs_default.content, children: tab.content }, tab.value))
544
+ ]
545
+ }
546
+ );
547
+ Tabs.displayName = "Tabs";
548
+
549
+ // src/components/molecules/Accordion/Accordion.module.css
550
+ var Accordion_default = {};
551
+ var Accordion = ({
552
+ items,
553
+ type = "single",
554
+ defaultValue,
555
+ value,
556
+ onValueChange,
557
+ collapsible = true,
558
+ className
559
+ }) => {
560
+ const rootClassName = [Accordion_default.root, className ?? ""].filter(Boolean).join(" ");
561
+ const content = items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
562
+ RadixAccordion__namespace.Item,
563
+ {
564
+ value: item.value,
565
+ disabled: item.disabled,
566
+ className: Accordion_default.item,
567
+ children: [
568
+ /* @__PURE__ */ jsxRuntime.jsx(RadixAccordion__namespace.Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(RadixAccordion__namespace.Trigger, { className: Accordion_default.trigger, children: [
569
+ item.trigger,
570
+ /* @__PURE__ */ jsxRuntime.jsx(
571
+ "svg",
572
+ {
573
+ className: Accordion_default.chevron,
574
+ width: "14",
575
+ height: "9",
576
+ viewBox: "0 0 14 9",
577
+ fill: "none",
578
+ "aria-hidden": "true",
579
+ children: /* @__PURE__ */ jsxRuntime.jsx(
580
+ "path",
581
+ {
582
+ d: "M1 1l6 6 6-6",
583
+ stroke: "currentColor",
584
+ strokeWidth: "1.5",
585
+ strokeLinecap: "round",
586
+ strokeLinejoin: "round"
587
+ }
588
+ )
589
+ }
590
+ )
591
+ ] }) }),
592
+ /* @__PURE__ */ jsxRuntime.jsx(RadixAccordion__namespace.Content, { className: Accordion_default.content, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: Accordion_default.contentInner, children: item.content }) })
593
+ ]
594
+ },
595
+ item.value
596
+ ));
597
+ if (type === "multiple") {
598
+ return /* @__PURE__ */ jsxRuntime.jsx(
599
+ RadixAccordion__namespace.Root,
600
+ {
601
+ type: "multiple",
602
+ className: rootClassName,
603
+ defaultValue,
604
+ value,
605
+ onValueChange,
606
+ children: content
607
+ }
608
+ );
609
+ }
610
+ return /* @__PURE__ */ jsxRuntime.jsx(
611
+ RadixAccordion__namespace.Root,
612
+ {
613
+ type: "single",
614
+ collapsible,
615
+ className: rootClassName,
616
+ defaultValue,
617
+ value,
618
+ onValueChange,
619
+ children: content
620
+ }
621
+ );
622
+ };
623
+ Accordion.displayName = "Accordion";
624
+
625
+ // src/components/molecules/Toast/Toast.module.css
626
+ var Toast_default = {};
627
+ var ToastContext = React.createContext(null);
628
+ var useToast = () => {
629
+ const ctx = React.useContext(ToastContext);
630
+ if (!ctx) throw new Error("useToast must be used within ToastProvider");
631
+ return ctx;
632
+ };
633
+ var ToastProvider = ({ children }) => {
634
+ const [toasts, setToasts] = React.useState([]);
635
+ const show = React.useCallback((message) => {
636
+ const id = Math.random().toString(36).slice(2);
637
+ setToasts((prev) => [...prev, { ...message, id }]);
638
+ }, []);
639
+ const dismiss = React.useCallback((id) => {
640
+ setToasts((prev) => prev.filter((t) => t.id !== id));
641
+ }, []);
642
+ return /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Provider, { value: { show }, children: /* @__PURE__ */ jsxRuntime.jsxs(RadixToast__namespace.Provider, { swipeDirection: "right", children: [
643
+ children,
644
+ toasts.map((toast) => /* @__PURE__ */ jsxRuntime.jsx(
645
+ RadixToast__namespace.Root,
646
+ {
647
+ duration: toast.duration ?? 4e3,
648
+ className: [Toast_default.root, Toast_default[toast.variant ?? "default"]].join(" "),
649
+ onOpenChange: (open) => {
650
+ if (!open) dismiss(toast.id);
651
+ },
652
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Toast_default.content, children: [
653
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Toast_default.text, children: [
654
+ /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Title, { className: Toast_default.title, children: toast.title }),
655
+ toast.description && /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Description, { className: Toast_default.description, children: toast.description })
656
+ ] }),
657
+ /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: Toast_default.close, "aria-label": "Fechar notifica\xE7\xE3o", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
658
+ "path",
659
+ {
660
+ d: "M1 1l10 10M11 1L1 11",
661
+ stroke: "currentColor",
662
+ strokeWidth: "1.5",
663
+ strokeLinecap: "round"
664
+ }
665
+ ) }) }) })
666
+ ] })
667
+ },
668
+ toast.id
669
+ )),
670
+ /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Viewport, { className: Toast_default.viewport, "aria-label": "Notifica\xE7\xF5es", role: "region" })
671
+ ] }) });
672
+ };
673
+
674
+ // src/components/molecules/Table/Table.module.css
675
+ var Table_default = {};
676
+ var TableHead = ({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("thead", { className: [Table_default.head, className ?? ""].filter(Boolean).join(" "), ...props, children });
677
+ var TableBody = ({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: [Table_default.body, className ?? ""].filter(Boolean).join(" "), ...props, children });
678
+ var TableRow = ({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: [Table_default.row, className ?? ""].filter(Boolean).join(" "), ...props, children });
679
+ var TableCell = ({
680
+ as: Tag = "td",
681
+ scope,
682
+ className,
683
+ children,
684
+ ...props
685
+ }) => {
686
+ const cellClass = [Tag === "th" ? Table_default.th : Table_default.td, className ?? ""].filter(Boolean).join(" ");
687
+ return /* @__PURE__ */ jsxRuntime.jsx(
688
+ Tag,
689
+ {
690
+ className: cellClass,
691
+ scope,
692
+ ...props,
693
+ children
694
+ }
695
+ );
696
+ };
697
+ var Table = ({ caption, stickyHeader, className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: Table_default.wrapper, children: /* @__PURE__ */ jsxRuntime.jsxs(
698
+ "table",
699
+ {
700
+ className: [Table_default.table, stickyHeader ? Table_default.stickyHeader : "", className ?? ""].filter(Boolean).join(" "),
701
+ ...props,
702
+ children: [
703
+ caption && /* @__PURE__ */ jsxRuntime.jsx("caption", { className: Table_default.caption, children: caption }),
704
+ children
705
+ ]
706
+ }
707
+ ) });
708
+ Table.Head = TableHead;
709
+ Table.Body = TableBody;
710
+ Table.Row = TableRow;
711
+ Table.Cell = TableCell;
712
+ Table.displayName = "Table";
713
+
714
+ Object.defineProperty(exports, "breakpoints", {
715
+ enumerable: true,
716
+ get: function () { return chunkCZMDBTZY_js.breakpoints; }
717
+ });
718
+ Object.defineProperty(exports, "elevation", {
719
+ enumerable: true,
720
+ get: function () { return chunkCZMDBTZY_js.elevation; }
721
+ });
722
+ Object.defineProperty(exports, "mediaQuery", {
723
+ enumerable: true,
724
+ get: function () { return chunkCZMDBTZY_js.mediaQuery; }
725
+ });
726
+ Object.defineProperty(exports, "motion", {
727
+ enumerable: true,
728
+ get: function () { return chunkCZMDBTZY_js.motion; }
729
+ });
730
+ Object.defineProperty(exports, "primitiveColors", {
731
+ enumerable: true,
732
+ get: function () { return chunkCZMDBTZY_js.primitiveColors; }
733
+ });
734
+ Object.defineProperty(exports, "radii", {
735
+ enumerable: true,
736
+ get: function () { return chunkCZMDBTZY_js.radii; }
737
+ });
738
+ Object.defineProperty(exports, "semanticColors", {
739
+ enumerable: true,
740
+ get: function () { return chunkCZMDBTZY_js.semanticColors; }
741
+ });
742
+ Object.defineProperty(exports, "spacing", {
743
+ enumerable: true,
744
+ get: function () { return chunkCZMDBTZY_js.spacing; }
745
+ });
746
+ Object.defineProperty(exports, "typography", {
747
+ enumerable: true,
748
+ get: function () { return chunkCZMDBTZY_js.typography; }
749
+ });
750
+ Object.defineProperty(exports, "zIndex", {
751
+ enumerable: true,
752
+ get: function () { return chunkCZMDBTZY_js.zIndex; }
753
+ });
754
+ exports.Accordion = Accordion;
755
+ exports.Avatar = Avatar;
756
+ exports.Badge = Badge;
757
+ exports.Button = Button;
758
+ exports.Card = Card;
759
+ exports.Checkbox = Checkbox;
760
+ exports.Drawer = Drawer;
761
+ exports.Input = Input;
762
+ exports.Modal = Modal;
763
+ exports.RadioGroup = RadioGroup;
764
+ exports.Select = Select;
765
+ exports.SocialIcons = SocialIcons;
766
+ exports.Table = Table;
767
+ exports.Tabs = Tabs;
768
+ exports.Textarea = Textarea;
769
+ exports.ToastProvider = ToastProvider;
770
+ exports.Tooltip = Tooltip;
771
+ exports.TooltipProvider = TooltipProvider;
772
+ exports.useToast = useToast;
773
+ //# sourceMappingURL=index.js.map
774
+ //# sourceMappingURL=index.js.map