analytica-frontend-lib 1.0.24 → 1.0.25

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.
Files changed (85) hide show
  1. package/dist/{chunk-JNPCNN67.mjs → Alert/Alert.mjs} +1 -2
  2. package/dist/{chunk-GSEO6POW.mjs → Badge/Badge.mjs} +0 -1
  3. package/dist/{chunk-IB4IJ3GF.mjs → Button/Button.mjs} +0 -1
  4. package/dist/{chunk-LYOJCBOM.mjs → CheckBox/CheckBox.mjs} +2 -2
  5. package/dist/{chunk-KT6HNGRV.mjs → DropdownMenu/DropdownMenu.mjs} +3 -2
  6. package/dist/{chunk-RPYPJ5O5.mjs → IconButton/IconButton.mjs} +0 -1
  7. package/dist/{chunk-QOFMTSHE.mjs → IconRoundedButton/IconRoundedButton.mjs} +0 -1
  8. package/dist/{chunk-CETSS3RA.mjs → NavButton/NavButton.mjs} +0 -1
  9. package/dist/{chunk-SESX5OEP.mjs → SelectionButton/SelectionButton.mjs} +0 -1
  10. package/dist/{chunk-NWGRQN6R.mjs → Table/Table.mjs} +4 -5
  11. package/dist/{components/Text → Text}/Text.mjs +1 -1
  12. package/dist/{chunk-QODEDLAX.mjs → TextArea/TextArea.mjs} +2 -2
  13. package/dist/{components/Toast → Toast}/Toast.mjs +1 -1
  14. package/dist/{components/Toast → Toast}/utils/ToastStore.mjs +1 -1
  15. package/dist/{chunk-IH5TEC64.mjs → Toast/utils/Toaster.mjs} +3 -3
  16. package/dist/index.d.mts +154 -26
  17. package/dist/index.d.ts +154 -26
  18. package/dist/index.js +671 -16
  19. package/dist/index.mjs +676 -8
  20. package/package.json +1 -6
  21. package/dist/client-components.d.mts +0 -9
  22. package/dist/client-components.d.ts +0 -9
  23. package/dist/client-components.js +0 -755
  24. package/dist/client-components.mjs +0 -39
  25. package/dist/components/Alert/Alert.mjs +0 -7
  26. package/dist/components/Badge/Badge.mjs +0 -6
  27. package/dist/components/Button/Button.mjs +0 -6
  28. package/dist/components/CheckBox/CheckBox.mjs +0 -8
  29. package/dist/components/DropdownMenu/DropdownMenu.mjs +0 -17
  30. package/dist/components/IconButton/IconButton.mjs +0 -6
  31. package/dist/components/IconRoundedButton/IconRoundedButton.mjs +0 -6
  32. package/dist/components/NavButton/NavButton.mjs +0 -6
  33. package/dist/components/SelectionButton/SelectionButton.mjs +0 -6
  34. package/dist/components/Table/Table.mjs +0 -20
  35. package/dist/components/TextArea/TextArea.mjs +0 -8
  36. package/dist/components/Toast/utils/Toaster.mjs +0 -11
  37. package/dist/server-components.d.mts +0 -11
  38. package/dist/server-components.d.ts +0 -11
  39. package/dist/server-components.js +0 -629
  40. package/dist/server-components.mjs +0 -52
  41. /package/dist/{components/Alert → Alert}/Alert.d.mts +0 -0
  42. /package/dist/{components/Alert → Alert}/Alert.d.ts +0 -0
  43. /package/dist/{components/Alert → Alert}/Alert.js +0 -0
  44. /package/dist/{components/Badge → Badge}/Badge.d.mts +0 -0
  45. /package/dist/{components/Badge → Badge}/Badge.d.ts +0 -0
  46. /package/dist/{components/Badge → Badge}/Badge.js +0 -0
  47. /package/dist/{components/Button → Button}/Button.d.mts +0 -0
  48. /package/dist/{components/Button → Button}/Button.d.ts +0 -0
  49. /package/dist/{components/Button → Button}/Button.js +0 -0
  50. /package/dist/{components/CheckBox → CheckBox}/CheckBox.d.mts +0 -0
  51. /package/dist/{components/CheckBox → CheckBox}/CheckBox.d.ts +0 -0
  52. /package/dist/{components/CheckBox → CheckBox}/CheckBox.js +0 -0
  53. /package/dist/{components/DropdownMenu → DropdownMenu}/DropdownMenu.d.mts +0 -0
  54. /package/dist/{components/DropdownMenu → DropdownMenu}/DropdownMenu.d.ts +0 -0
  55. /package/dist/{components/DropdownMenu → DropdownMenu}/DropdownMenu.js +0 -0
  56. /package/dist/{components/IconButton → IconButton}/IconButton.d.mts +0 -0
  57. /package/dist/{components/IconButton → IconButton}/IconButton.d.ts +0 -0
  58. /package/dist/{components/IconButton → IconButton}/IconButton.js +0 -0
  59. /package/dist/{components/IconRoundedButton → IconRoundedButton}/IconRoundedButton.d.mts +0 -0
  60. /package/dist/{components/IconRoundedButton → IconRoundedButton}/IconRoundedButton.d.ts +0 -0
  61. /package/dist/{components/IconRoundedButton → IconRoundedButton}/IconRoundedButton.js +0 -0
  62. /package/dist/{components/NavButton → NavButton}/NavButton.d.mts +0 -0
  63. /package/dist/{components/NavButton → NavButton}/NavButton.d.ts +0 -0
  64. /package/dist/{components/NavButton → NavButton}/NavButton.js +0 -0
  65. /package/dist/{components/SelectionButton → SelectionButton}/SelectionButton.d.mts +0 -0
  66. /package/dist/{components/SelectionButton → SelectionButton}/SelectionButton.d.ts +0 -0
  67. /package/dist/{components/SelectionButton → SelectionButton}/SelectionButton.js +0 -0
  68. /package/dist/{components/Table → Table}/Table.d.mts +0 -0
  69. /package/dist/{components/Table → Table}/Table.d.ts +0 -0
  70. /package/dist/{components/Table → Table}/Table.js +0 -0
  71. /package/dist/{components/Text → Text}/Text.d.mts +0 -0
  72. /package/dist/{components/Text → Text}/Text.d.ts +0 -0
  73. /package/dist/{components/Text → Text}/Text.js +0 -0
  74. /package/dist/{components/TextArea → TextArea}/TextArea.d.mts +0 -0
  75. /package/dist/{components/TextArea → TextArea}/TextArea.d.ts +0 -0
  76. /package/dist/{components/TextArea → TextArea}/TextArea.js +0 -0
  77. /package/dist/{components/Toast → Toast}/Toast.d.mts +0 -0
  78. /package/dist/{components/Toast → Toast}/Toast.d.ts +0 -0
  79. /package/dist/{components/Toast → Toast}/Toast.js +0 -0
  80. /package/dist/{components/Toast → Toast}/utils/ToastStore.d.mts +0 -0
  81. /package/dist/{components/Toast → Toast}/utils/ToastStore.d.ts +0 -0
  82. /package/dist/{components/Toast → Toast}/utils/ToastStore.js +0 -0
  83. /package/dist/{components/Toast → Toast}/utils/Toaster.d.mts +0 -0
  84. /package/dist/{components/Toast → Toast}/utils/Toaster.d.ts +0 -0
  85. /package/dist/{components/Toast → Toast}/utils/Toaster.js +0 -0
@@ -1,629 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/server-components.ts
21
- var server_components_exports = {};
22
- __export(server_components_exports, {
23
- Alert: () => Alert,
24
- Badge: () => Badge,
25
- Button: () => Button,
26
- IconButton: () => IconButton,
27
- IconRoundedButton: () => IconRoundedButton,
28
- NavButton: () => NavButton,
29
- SelectionButton: () => SelectionButton,
30
- Table: () => Table,
31
- TableBody: () => TableBody,
32
- TableCaption: () => TableCaption,
33
- TableCell: () => TableCell,
34
- TableFooter: () => TableFooter,
35
- TableHead: () => TableHead,
36
- TableHeader: () => TableHeader,
37
- TableRow: () => TableRow,
38
- Text: () => Text
39
- });
40
- module.exports = __toCommonJS(server_components_exports);
41
-
42
- // src/components/Text/Text.tsx
43
- var import_jsx_runtime = require("react/jsx-runtime");
44
- var Text = ({
45
- children,
46
- size = "md",
47
- weight = "normal",
48
- color = "text-text-950",
49
- as,
50
- className = "",
51
- ...props
52
- }) => {
53
- let sizeClasses = "";
54
- let weightClasses = "";
55
- const sizeClassMap = {
56
- "2xs": "text-2xs",
57
- xs: "text-xs",
58
- sm: "text-sm",
59
- md: "text-md",
60
- lg: "text-lg",
61
- xl: "text-xl",
62
- "2xl": "text-2xl",
63
- "3xl": "text-3xl",
64
- "4xl": "text-4xl",
65
- "5xl": "text-5xl",
66
- "6xl": "text-6xl"
67
- };
68
- sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
69
- const weightClassMap = {
70
- hairline: "font-hairline",
71
- light: "font-light",
72
- normal: "font-normal",
73
- medium: "font-medium",
74
- semibold: "font-semibold",
75
- bold: "font-bold",
76
- extrabold: "font-extrabold",
77
- black: "font-black"
78
- };
79
- weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
80
- const baseClasses = "font-primary";
81
- const Component = as ?? "p";
82
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
- Component,
84
- {
85
- className: `${baseClasses} ${sizeClasses} ${weightClasses} ${color} ${className}`,
86
- ...props,
87
- children
88
- }
89
- );
90
- };
91
-
92
- // src/components/Button/Button.tsx
93
- var import_jsx_runtime2 = require("react/jsx-runtime");
94
- var VARIANT_ACTION_CLASSES = {
95
- solid: {
96
- primary: "bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
97
- positive: "bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
98
- negative: "bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
99
- },
100
- outline: {
101
- primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
102
- positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
103
- negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
104
- },
105
- link: {
106
- primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
107
- positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
108
- negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
109
- }
110
- };
111
- var SIZE_CLASSES = {
112
- "extra-small": "text-xs px-3.5 py-2",
113
- small: "text-sm px-4 py-2.5",
114
- medium: "text-md px-5 py-2.5",
115
- large: "text-lg px-6 py-3",
116
- "extra-large": "text-lg px-7 py-3.5"
117
- };
118
- var Button = ({
119
- children,
120
- iconLeft,
121
- iconRight,
122
- size = "medium",
123
- variant = "solid",
124
- action = "primary",
125
- className = "",
126
- disabled,
127
- type = "button",
128
- ...props
129
- }) => {
130
- const sizeClasses = SIZE_CLASSES[size];
131
- const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
132
- const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
133
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
134
- "button",
135
- {
136
- className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
137
- disabled,
138
- type,
139
- ...props,
140
- children: [
141
- iconLeft && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "mr-2 flex items-center", children: iconLeft }),
142
- children,
143
- iconRight && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ml-2 flex items-center", children: iconRight })
144
- ]
145
- }
146
- );
147
- };
148
-
149
- // src/components/Badge/Badge.tsx
150
- var import_phosphor_react = require("phosphor-react");
151
- var import_jsx_runtime3 = require("react/jsx-runtime");
152
- var VARIANT_ACTION_CLASSES2 = {
153
- solid: {
154
- error: "bg-error text-error-700 focus-visible:outline-none",
155
- warning: "bg-warning text-warning-800 focus-visible:outline-none",
156
- success: "bg-success text-success-800 focus-visible:outline-none",
157
- info: "bg-info text-info-800 focus-visible:outline-none",
158
- muted: "bg-background-muted text-background-800 focus-visible:outline-none"
159
- },
160
- outlined: {
161
- error: "bg-error text-error-700 border border-error-300 focus-visible:outline-none",
162
- warning: "bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none",
163
- success: "bg-success text-success-800 border border-success-300 focus-visible:outline-none",
164
- info: "bg-info text-info-800 border border-info-300 focus-visible:outline-none",
165
- muted: "bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none"
166
- },
167
- exams: {
168
- exam1: "bg-exam-1 text-info-200 focus-visible:outline-none",
169
- exam2: "bg-exam-2 text-typography-1 focus-visible:outline-none",
170
- exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
171
- exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
172
- },
173
- resultStatus: {
174
- negative: "bg-error text-error-800 focus-visible:outline-none",
175
- positive: "bg-success text-success-800 focus-visible:outline-none"
176
- },
177
- notification: "text-primary"
178
- };
179
- var SIZE_CLASSES2 = {
180
- small: "text-2xs px-2 py-1",
181
- medium: "text-xs px-2 py-1",
182
- large: "text-sm px-2 py-1"
183
- };
184
- var SIZE_CLASSES_ICON = {
185
- small: "size-3",
186
- medium: "size-3.5",
187
- large: "size-4"
188
- };
189
- var Badge = ({
190
- children,
191
- iconLeft,
192
- iconRight,
193
- size = "medium",
194
- variant = "solid",
195
- action = "error",
196
- className = "",
197
- notificationActive = false,
198
- ...props
199
- }) => {
200
- const sizeClasses = SIZE_CLASSES2[size];
201
- const sizeClassesIcon = SIZE_CLASSES_ICON[size];
202
- const variantActionMap = VARIANT_ACTION_CLASSES2[variant] || {};
203
- const variantClasses = typeof variantActionMap === "string" ? variantActionMap : variantActionMap[action] ?? variantActionMap.muted ?? "";
204
- const baseClasses = "inline-flex items-center justify-center rounded-xs font-medium gap-1 relative";
205
- const baseClassesIcon = "flex items-center";
206
- if (variant === "notification") {
207
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
208
- "div",
209
- {
210
- className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
211
- ...props,
212
- children: [
213
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react.Bell, { size: 24, className: "text-primary-950" }),
214
- notificationActive && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
215
- "span",
216
- {
217
- "data-testid": "notification-dot",
218
- className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
219
- }
220
- )
221
- ]
222
- }
223
- );
224
- }
225
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
226
- "div",
227
- {
228
- className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
229
- ...props,
230
- children: [
231
- iconLeft && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconLeft }),
232
- children,
233
- iconRight && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconRight })
234
- ]
235
- }
236
- );
237
- };
238
-
239
- // src/components/Alert/Alert.tsx
240
- var import_phosphor_react2 = require("phosphor-react");
241
- var import_jsx_runtime4 = require("react/jsx-runtime");
242
- var VARIANT_ACTION_CLASSES3 = {
243
- solid: {
244
- default: "bg-background-50 border-transparent",
245
- info: "bg-info border-transparent",
246
- success: "bg-success border-transparent",
247
- warning: "bg-warning border-transparent",
248
- error: "bg-error border-transparent"
249
- },
250
- outline: {
251
- default: "bg-background border border-border-100",
252
- info: "bg-background border border-border-100",
253
- success: "bg-background border border-border-100",
254
- warning: "bg-background border border-border-100",
255
- error: "bg-background border border-border-100"
256
- }
257
- };
258
- var COLOR_CLASSES = {
259
- default: "text-text-950",
260
- info: "text-info-800",
261
- success: "text-success-800",
262
- warning: "text-warning-800",
263
- error: "text-error-800"
264
- };
265
- var ICONS = {
266
- default: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.CheckCircle, { size: 18 }),
267
- info: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.Info, { size: 18 }),
268
- success: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.CheckCircle, { size: 18 }),
269
- warning: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.WarningCircle, { size: 18 }),
270
- error: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.XCircle, { size: 18 })
271
- };
272
- var Alert = ({
273
- variant = "solid",
274
- title,
275
- description,
276
- action = "default",
277
- className,
278
- ...props
279
- }) => {
280
- const baseClasses = "alert-wrapper flex items-start gap-2 w-[384px] py-3 px-4 font-inherit rounded-md";
281
- const variantClasses = VARIANT_ACTION_CLASSES3[variant][action];
282
- const variantColor = COLOR_CLASSES[action];
283
- const variantIcon = ICONS[action];
284
- const hasHeading = Boolean(title);
285
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
286
- "div",
287
- {
288
- className: `${baseClasses} ${variantClasses} ${className ?? ""}`,
289
- ...props,
290
- children: [
291
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: `mt-0.5 ${variantColor}`, children: variantIcon }),
292
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
293
- hasHeading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
294
- Text,
295
- {
296
- size: "md",
297
- weight: "medium",
298
- color: variantColor,
299
- className: "mb-0.5",
300
- children: title
301
- }
302
- ),
303
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
304
- Text,
305
- {
306
- size: hasHeading ? "sm" : "md",
307
- weight: "normal",
308
- color: !hasHeading ? variantColor : "text-text-700",
309
- children: description
310
- }
311
- )
312
- ] })
313
- ]
314
- }
315
- );
316
- };
317
-
318
- // src/components/IconButton/IconButton.tsx
319
- var import_react = require("react");
320
- var import_jsx_runtime5 = require("react/jsx-runtime");
321
- var IconButton = (0, import_react.forwardRef)(
322
- ({ icon, size = "md", active = false, className = "", disabled, ...props }, ref) => {
323
- const baseClasses = [
324
- "inline-flex",
325
- "items-center",
326
- "justify-center",
327
- "rounded-lg",
328
- "font-medium",
329
- "bg-transparent",
330
- "text-text-950",
331
- "cursor-pointer",
332
- "hover:bg-primary-600",
333
- "hover:text-text",
334
- "focus-visible:outline-none",
335
- "focus-visible:ring-2",
336
- "focus-visible:ring-offset-0",
337
- "focus-visible:ring-indicator-info",
338
- "disabled:opacity-50",
339
- "disabled:cursor-not-allowed",
340
- "disabled:pointer-events-none"
341
- ];
342
- const sizeClasses = {
343
- sm: ["w-6", "h-6", "text-sm"],
344
- md: ["w-10", "h-10", "text-base"]
345
- };
346
- const activeClasses = active ? ["!bg-primary-50", "!text-primary-950", "hover:!bg-primary-100"] : [];
347
- const allClasses = [
348
- ...baseClasses,
349
- ...sizeClasses[size],
350
- ...activeClasses
351
- ].join(" ");
352
- const ariaLabel = props["aria-label"] ?? "Bot\xE3o de a\xE7\xE3o";
353
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
354
- "button",
355
- {
356
- ref,
357
- type: "button",
358
- className: `${allClasses} ${className}`,
359
- disabled,
360
- "aria-pressed": active,
361
- "aria-label": ariaLabel,
362
- ...props,
363
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "flex items-center justify-center", children: icon })
364
- }
365
- );
366
- }
367
- );
368
- IconButton.displayName = "IconButton";
369
-
370
- // src/components/IconRoundedButton/IconRoundedButton.tsx
371
- var import_jsx_runtime6 = require("react/jsx-runtime");
372
- var IconRoundedButton = ({
373
- icon,
374
- className = "",
375
- disabled,
376
- ...props
377
- }) => {
378
- const baseClasses = [
379
- "inline-flex",
380
- "items-center",
381
- "justify-center",
382
- "w-8",
383
- "h-8",
384
- "rounded-full",
385
- "cursor-pointer",
386
- "border",
387
- "border-background-200",
388
- "bg-background",
389
- "text-text-950",
390
- "hover:shadow-hard-shadow-1",
391
- "focus-visible:outline-none",
392
- "focus-visible:shadow-hard-shadow-1",
393
- "focus-visible:ring-2",
394
- "focus-visible:ring-indicator-info",
395
- "focus-visible:ring-offset-0",
396
- "disabled:opacity-50",
397
- "disabled:cursor-not-allowed"
398
- ].join(" ");
399
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
400
- "button",
401
- {
402
- type: "button",
403
- className: `${baseClasses} ${className}`,
404
- disabled,
405
- ...props,
406
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "flex items-center justify-center w-5 h-5", children: icon })
407
- }
408
- );
409
- };
410
-
411
- // src/components/NavButton/NavButton.tsx
412
- var import_react2 = require("react");
413
- var import_jsx_runtime7 = require("react/jsx-runtime");
414
- var NavButton = (0, import_react2.forwardRef)(
415
- ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
416
- const baseClasses = [
417
- "flex",
418
- "flex-col",
419
- "items-center",
420
- "justify-center",
421
- "gap-0.5",
422
- "px-12",
423
- "py-1",
424
- "rounded-sm",
425
- "cursor-pointer",
426
- "text-text-950",
427
- "text-xs",
428
- "font-medium",
429
- "hover:text-text",
430
- "hover:bg-primary-600",
431
- "focus-visible:outline-none",
432
- "focus-visible:ring-2",
433
- "focus-visible:ring-offset-0",
434
- "focus-visible:ring-indicator-info",
435
- "disabled:opacity-50",
436
- "disabled:cursor-not-allowed",
437
- "disabled:pointer-events-none"
438
- ];
439
- const stateClasses = selected ? ["bg-primary-50", "text-primary-950"] : [];
440
- const allClasses = [...baseClasses, ...stateClasses].join(" ");
441
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
442
- "button",
443
- {
444
- ref,
445
- type: "button",
446
- className: `${allClasses} ${className}`,
447
- disabled,
448
- "aria-pressed": selected,
449
- ...props,
450
- children: [
451
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "flex items-center justify-center w-5 h-5", children: icon }),
452
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "whitespace-nowrap", children: label })
453
- ]
454
- }
455
- );
456
- }
457
- );
458
- NavButton.displayName = "NavButton";
459
-
460
- // src/components/SelectionButton/SelectionButton.tsx
461
- var import_react3 = require("react");
462
- var import_jsx_runtime8 = require("react/jsx-runtime");
463
- var SelectionButton = (0, import_react3.forwardRef)(
464
- ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
465
- const baseClasses = [
466
- "inline-flex",
467
- "items-center",
468
- "justify-start",
469
- "gap-2",
470
- "p-4",
471
- "rounded-xl",
472
- "cursor-pointer",
473
- "border",
474
- "border-border-50",
475
- "bg-background",
476
- "text-sm",
477
- "text-text-700",
478
- "font-bold",
479
- "shadow-soft-shadow-1",
480
- "hover:bg-background-100",
481
- "focus-visible:outline-none",
482
- "focus-visible:ring-2",
483
- "focus-visible:ring-indicator-info",
484
- "focus-visible:ring-offset-0",
485
- "focus-visible:shadow-none",
486
- "active:ring-2",
487
- "active:ring-primary-950",
488
- "active:ring-offset-0",
489
- "active:shadow-none",
490
- "disabled:opacity-50",
491
- "disabled:cursor-not-allowed"
492
- ];
493
- const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
494
- const allClasses = [...baseClasses, ...stateClasses].join(" ");
495
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
496
- "button",
497
- {
498
- ref,
499
- type: "button",
500
- className: `${allClasses} ${className}`,
501
- disabled,
502
- "aria-pressed": selected,
503
- ...props,
504
- children: [
505
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
506
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label })
507
- ]
508
- }
509
- );
510
- }
511
- );
512
- SelectionButton.displayName = "SelectionButton";
513
-
514
- // src/components/Table/Table.tsx
515
- var import_react4 = require("react");
516
- var import_jsx_runtime9 = require("react/jsx-runtime");
517
- var Table = (0, import_react4.forwardRef)(
518
- ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "border border-border-200 rounded-xl relative w-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
519
- "table",
520
- {
521
- ref,
522
- className: `w-full caption-bottom text-sm ${className ?? ""}`,
523
- ...props,
524
- children: [
525
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("caption", { className: "sr-only", children: "My Table" }),
526
- children
527
- ]
528
- }
529
- ) })
530
- );
531
- Table.displayName = "Table";
532
- var TableHeader = (0, import_react4.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
533
- "thead",
534
- {
535
- ref,
536
- className: `[&_tr:first-child]:border-0 ${className}`,
537
- ...props
538
- }
539
- ));
540
- TableHeader.displayName = "TableHeader";
541
- var TableBody = (0, import_react4.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
542
- "tbody",
543
- {
544
- ref,
545
- className: `[&_tr:last-child]:border-0 border-t border-border-200 ${className}`,
546
- ...props
547
- }
548
- ));
549
- TableBody.displayName = "TableBody";
550
- var TableFooter = (0, import_react4.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
551
- "tfoot",
552
- {
553
- ref,
554
- className: `border-t bg-background-50 border-border-200 font-medium [&>tr]:last:border-b-0 px-6 py-3.5 ${className}`,
555
- ...props
556
- }
557
- ));
558
- TableFooter.displayName = "TableFooter";
559
- var VARIANT_STATES_ROW = {
560
- default: "border-b border-border-200",
561
- selected: "border-b-2 border-indicator-primary",
562
- invalid: "border-b-2 border-indicator-error",
563
- disabled: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed"
564
- };
565
- var TableRow = (0, import_react4.forwardRef)(
566
- ({ state = "default", className, ...props }, ref) => {
567
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
568
- "tr",
569
- {
570
- ref,
571
- className: `
572
- transition-colors
573
- ${state !== "disabled" ? "hover:bg-muted/50" : ""}
574
- ${VARIANT_STATES_ROW[state]}
575
- ${className}
576
- `,
577
- "aria-disabled": state === "disabled",
578
- ...props
579
- }
580
- );
581
- }
582
- );
583
- TableRow.displayName = "TableRow";
584
- var TableHead = (0, import_react4.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
585
- "th",
586
- {
587
- ref,
588
- className: `h-10 px-6 py-3.5 bg-bg-secondary bg-muted/50 text-left align-middle font-bold text-text-800 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] ${className}`,
589
- ...props
590
- }
591
- ));
592
- TableHead.displayName = "TableHead";
593
- var TableCell = (0, import_react4.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
594
- "td",
595
- {
596
- ref,
597
- className: `p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-md text-text-800 px-6 py-3.5 ${className}`,
598
- ...props
599
- }
600
- ));
601
- TableCell.displayName = "TableCell";
602
- var TableCaption = (0, import_react4.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
603
- "caption",
604
- {
605
- ref,
606
- className: `border-t border-border-200 text-sm text-text-800 px-6 py-3.5 ${className}`,
607
- ...props
608
- }
609
- ));
610
- TableCaption.displayName = "TableCaption";
611
- // Annotate the CommonJS export names for ESM import in node:
612
- 0 && (module.exports = {
613
- Alert,
614
- Badge,
615
- Button,
616
- IconButton,
617
- IconRoundedButton,
618
- NavButton,
619
- SelectionButton,
620
- Table,
621
- TableBody,
622
- TableCaption,
623
- TableCell,
624
- TableFooter,
625
- TableHead,
626
- TableHeader,
627
- TableRow,
628
- Text
629
- });
@@ -1,52 +0,0 @@
1
- import {
2
- IconRoundedButton
3
- } from "./chunk-QOFMTSHE.mjs";
4
- import {
5
- NavButton
6
- } from "./chunk-CETSS3RA.mjs";
7
- import {
8
- SelectionButton
9
- } from "./chunk-SESX5OEP.mjs";
10
- import {
11
- Table,
12
- TableBody,
13
- TableCaption,
14
- TableCell,
15
- TableFooter,
16
- TableHead,
17
- TableHeader,
18
- TableRow
19
- } from "./chunk-NWGRQN6R.mjs";
20
- import {
21
- Alert
22
- } from "./chunk-JNPCNN67.mjs";
23
- import {
24
- Badge
25
- } from "./chunk-GSEO6POW.mjs";
26
- import {
27
- Button
28
- } from "./chunk-IB4IJ3GF.mjs";
29
- import {
30
- Text
31
- } from "./chunk-TT3VCQGR.mjs";
32
- import {
33
- IconButton
34
- } from "./chunk-RPYPJ5O5.mjs";
35
- export {
36
- Alert,
37
- Badge,
38
- Button,
39
- IconButton,
40
- IconRoundedButton,
41
- NavButton,
42
- SelectionButton,
43
- Table,
44
- TableBody,
45
- TableCaption,
46
- TableCell,
47
- TableFooter,
48
- TableHead,
49
- TableHeader,
50
- TableRow,
51
- Text
52
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes