analytica-frontend-lib 1.0.23 → 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.
package/dist/index.mjs CHANGED
@@ -1,157 +1,5 @@
1
- // src/components/Button/Button.tsx
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- var VARIANT_ACTION_CLASSES = {
4
- solid: {
5
- 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",
6
- 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",
7
- 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"
8
- },
9
- outline: {
10
- 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",
11
- 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",
12
- 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"
13
- },
14
- link: {
15
- 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",
16
- 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",
17
- 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"
18
- }
19
- };
20
- var SIZE_CLASSES = {
21
- "extra-small": "text-xs px-3.5 py-2",
22
- small: "text-sm px-4 py-2.5",
23
- medium: "text-md px-5 py-2.5",
24
- large: "text-lg px-6 py-3",
25
- "extra-large": "text-lg px-7 py-3.5"
26
- };
27
- var Button = ({
28
- children,
29
- iconLeft,
30
- iconRight,
31
- size = "medium",
32
- variant = "solid",
33
- action = "primary",
34
- className = "",
35
- disabled,
36
- type = "button",
37
- ...props
38
- }) => {
39
- const sizeClasses = SIZE_CLASSES[size];
40
- const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
41
- const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
42
- return /* @__PURE__ */ jsxs(
43
- "button",
44
- {
45
- className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
46
- disabled,
47
- type,
48
- ...props,
49
- children: [
50
- iconLeft && /* @__PURE__ */ jsx("span", { className: "mr-2 flex items-center", children: iconLeft }),
51
- children,
52
- iconRight && /* @__PURE__ */ jsx("span", { className: "ml-2 flex items-center", children: iconRight })
53
- ]
54
- }
55
- );
56
- };
57
-
58
- // src/components/IconRoundedButton/IconRoundedButton.tsx
59
- import { jsx as jsx2 } from "react/jsx-runtime";
60
- var IconRoundedButton = ({
61
- icon,
62
- className = "",
63
- disabled,
64
- ...props
65
- }) => {
66
- const baseClasses = [
67
- "inline-flex",
68
- "items-center",
69
- "justify-center",
70
- "w-8",
71
- "h-8",
72
- "rounded-full",
73
- "cursor-pointer",
74
- "border",
75
- "border-background-200",
76
- "bg-background",
77
- "text-text-950",
78
- "hover:shadow-hard-shadow-1",
79
- "focus-visible:outline-none",
80
- "focus-visible:shadow-hard-shadow-1",
81
- "focus-visible:ring-2",
82
- "focus-visible:ring-indicator-info",
83
- "focus-visible:ring-offset-0",
84
- "disabled:opacity-50",
85
- "disabled:cursor-not-allowed"
86
- ].join(" ");
87
- return /* @__PURE__ */ jsx2(
88
- "button",
89
- {
90
- type: "button",
91
- className: `${baseClasses} ${className}`,
92
- disabled,
93
- ...props,
94
- children: /* @__PURE__ */ jsx2("span", { className: "flex items-center justify-center w-5 h-5", children: icon })
95
- }
96
- );
97
- };
98
-
99
- // src/components/SelectionButton/SelectionButton.tsx
100
- import { forwardRef } from "react";
101
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
102
- var SelectionButton = forwardRef(
103
- ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
104
- const baseClasses = [
105
- "inline-flex",
106
- "items-center",
107
- "justify-start",
108
- "gap-2",
109
- "p-4",
110
- "rounded-xl",
111
- "cursor-pointer",
112
- "border",
113
- "border-border-50",
114
- "bg-background",
115
- "text-sm",
116
- "text-text-700",
117
- "font-bold",
118
- "shadow-soft-shadow-1",
119
- "hover:bg-background-100",
120
- "focus-visible:outline-none",
121
- "focus-visible:ring-2",
122
- "focus-visible:ring-indicator-info",
123
- "focus-visible:ring-offset-0",
124
- "focus-visible:shadow-none",
125
- "active:ring-2",
126
- "active:ring-primary-950",
127
- "active:ring-offset-0",
128
- "active:shadow-none",
129
- "disabled:opacity-50",
130
- "disabled:cursor-not-allowed"
131
- ];
132
- const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
133
- const allClasses = [...baseClasses, ...stateClasses].join(" ");
134
- return /* @__PURE__ */ jsxs2(
135
- "button",
136
- {
137
- ref,
138
- type: "button",
139
- className: `${allClasses} ${className}`,
140
- disabled,
141
- "aria-pressed": selected,
142
- ...props,
143
- children: [
144
- /* @__PURE__ */ jsx3("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
145
- /* @__PURE__ */ jsx3("span", { children: label })
146
- ]
147
- }
148
- );
149
- }
150
- );
151
- SelectionButton.displayName = "SelectionButton";
152
-
153
1
  // src/components/Text/Text.tsx
154
- import { jsx as jsx4 } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
155
3
  var Text = ({
156
4
  children,
157
5
  size = "md",
@@ -190,7 +38,7 @@ var Text = ({
190
38
  weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
191
39
  const baseClasses = "font-primary";
192
40
  const Component = as ?? "p";
193
- return /* @__PURE__ */ jsx4(
41
+ return /* @__PURE__ */ jsx(
194
42
  Component,
195
43
  {
196
44
  className: `${baseClasses} ${sizeClasses} ${weightClasses} ${color} ${className}`,
@@ -200,144 +48,66 @@ var Text = ({
200
48
  );
201
49
  };
202
50
 
203
- // src/components/TextArea/TextArea.tsx
204
- import {
205
- forwardRef as forwardRef2,
206
- useState,
207
- useId
208
- } from "react";
209
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
210
- var SIZE_CLASSES2 = {
211
- small: {
212
- container: "w-72",
213
- // 288px width
214
- textarea: "h-24 text-sm",
215
- // 96px height, 14px font
216
- textSize: "sm"
217
- },
218
- medium: {
219
- container: "w-72",
220
- // 288px width
221
- textarea: "h-24 text-base",
222
- // 96px height, 16px font
223
- textSize: "md"
51
+ // src/components/Button/Button.tsx
52
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
53
+ var VARIANT_ACTION_CLASSES = {
54
+ solid: {
55
+ 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",
56
+ 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",
57
+ 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"
224
58
  },
225
- large: {
226
- container: "w-72",
227
- // 288px width
228
- textarea: "h-24 text-lg",
229
- // 96px height, 18px font
230
- textSize: "lg"
59
+ outline: {
60
+ 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",
61
+ 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",
62
+ 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"
231
63
  },
232
- extraLarge: {
233
- container: "w-72",
234
- // 288px width
235
- textarea: "h-24 text-xl",
236
- // 96px height, 20px font
237
- textSize: "xl"
64
+ link: {
65
+ 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",
66
+ 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",
67
+ 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"
238
68
  }
239
69
  };
240
- var BASE_TEXTAREA_CLASSES = "w-full box-border p-3 bg-background border border-solid rounded-[4px] resize-none focus:outline-none font-roboto font-normal leading-[150%] placeholder:text-text-600 transition-all duration-200";
241
- var STATE_CLASSES = {
242
- default: {
243
- base: "border-border-300 bg-background text-text-600",
244
- hover: "hover:border-border-400",
245
- focus: "focus:border-border-500"
246
- },
247
- hovered: {
248
- base: "border-border-400 bg-background text-text-600",
249
- hover: "",
250
- focus: "focus:border-border-500"
251
- },
252
- focused: {
253
- base: "border-2 border-primary-950 bg-background text-text-900",
254
- hover: "",
255
- focus: ""
256
- },
257
- invalid: {
258
- base: "border-2 border-red-700 bg-white text-gray-800",
259
- hover: "hover:border-red-700",
260
- focus: "focus:border-red-700"
261
- },
262
- disabled: {
263
- base: "border-border-300 bg-background text-text-600 cursor-not-allowed opacity-40",
264
- hover: "",
265
- focus: ""
266
- }
70
+ var SIZE_CLASSES = {
71
+ "extra-small": "text-xs px-3.5 py-2",
72
+ small: "text-sm px-4 py-2.5",
73
+ medium: "text-md px-5 py-2.5",
74
+ large: "text-lg px-6 py-3",
75
+ "extra-large": "text-lg px-7 py-3.5"
267
76
  };
268
- var TextArea = forwardRef2(
269
- ({
270
- label,
271
- size = "medium",
272
- state = "default",
273
- errorMessage,
274
- helperMessage,
275
- className = "",
276
- labelClassName = "",
277
- disabled,
278
- id,
279
- onChange,
280
- placeholder,
281
- ...props
282
- }, ref) => {
283
- const generatedId = useId();
284
- const inputId = id ?? `textarea-${generatedId}`;
285
- const [isFocused, setIsFocused] = useState(false);
286
- const handleChange = (event) => {
287
- onChange?.(event);
288
- };
289
- const handleFocus = (event) => {
290
- setIsFocused(true);
291
- props.onFocus?.(event);
292
- };
293
- const handleBlur = (event) => {
294
- setIsFocused(false);
295
- props.onBlur?.(event);
296
- };
297
- let currentState = disabled ? "disabled" : state;
298
- if (isFocused && currentState !== "invalid" && currentState !== "disabled") {
299
- currentState = "focused";
77
+ var Button = ({
78
+ children,
79
+ iconLeft,
80
+ iconRight,
81
+ size = "medium",
82
+ variant = "solid",
83
+ action = "primary",
84
+ className = "",
85
+ disabled,
86
+ type = "button",
87
+ ...props
88
+ }) => {
89
+ const sizeClasses = SIZE_CLASSES[size];
90
+ const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
91
+ const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
92
+ return /* @__PURE__ */ jsxs(
93
+ "button",
94
+ {
95
+ className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
96
+ disabled,
97
+ type,
98
+ ...props,
99
+ children: [
100
+ iconLeft && /* @__PURE__ */ jsx2("span", { className: "mr-2 flex items-center", children: iconLeft }),
101
+ children,
102
+ iconRight && /* @__PURE__ */ jsx2("span", { className: "ml-2 flex items-center", children: iconRight })
103
+ ]
300
104
  }
301
- const sizeClasses = SIZE_CLASSES2[size];
302
- const stateClasses = STATE_CLASSES[currentState];
303
- const textareaClasses = `${BASE_TEXTAREA_CLASSES} ${sizeClasses.textarea} ${stateClasses.base} ${stateClasses.hover} ${stateClasses.focus} ${className}`;
304
- return /* @__PURE__ */ jsxs3("div", { className: `flex flex-col ${sizeClasses.container}`, children: [
305
- label && /* @__PURE__ */ jsx5(
306
- Text,
307
- {
308
- as: "label",
309
- htmlFor: inputId,
310
- size: sizeClasses.textSize,
311
- weight: "medium",
312
- color: "text-text-950",
313
- className: `mb-1.5 ${labelClassName}`,
314
- children: label
315
- }
316
- ),
317
- /* @__PURE__ */ jsx5(
318
- "textarea",
319
- {
320
- ref,
321
- id: inputId,
322
- disabled,
323
- onChange: handleChange,
324
- onFocus: handleFocus,
325
- onBlur: handleBlur,
326
- className: textareaClasses,
327
- placeholder,
328
- ...props
329
- }
330
- ),
331
- errorMessage && /* @__PURE__ */ jsx5(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-error-600", children: errorMessage }),
332
- helperMessage && !errorMessage && /* @__PURE__ */ jsx5(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
333
- ] });
334
- }
335
- );
336
- TextArea.displayName = "TextArea";
105
+ );
106
+ };
337
107
 
338
108
  // src/components/Badge/Badge.tsx
339
109
  import { Bell } from "phosphor-react";
340
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
110
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
341
111
  var VARIANT_ACTION_CLASSES2 = {
342
112
  solid: {
343
113
  error: "bg-error text-error-700 focus-visible:outline-none",
@@ -365,7 +135,7 @@ var VARIANT_ACTION_CLASSES2 = {
365
135
  },
366
136
  notification: "text-primary"
367
137
  };
368
- var SIZE_CLASSES3 = {
138
+ var SIZE_CLASSES2 = {
369
139
  small: "text-2xs px-2 py-1",
370
140
  medium: "text-xs px-2 py-1",
371
141
  large: "text-sm px-2 py-1"
@@ -386,54 +156,427 @@ var Badge = ({
386
156
  notificationActive = false,
387
157
  ...props
388
158
  }) => {
389
- const sizeClasses = SIZE_CLASSES3[size];
159
+ const sizeClasses = SIZE_CLASSES2[size];
390
160
  const sizeClassesIcon = SIZE_CLASSES_ICON[size];
391
161
  const variantActionMap = VARIANT_ACTION_CLASSES2[variant] || {};
392
162
  const variantClasses = typeof variantActionMap === "string" ? variantActionMap : variantActionMap[action] ?? variantActionMap.muted ?? "";
393
163
  const baseClasses = "inline-flex items-center justify-center rounded-xs font-medium gap-1 relative";
394
164
  const baseClassesIcon = "flex items-center";
395
165
  if (variant === "notification") {
166
+ return /* @__PURE__ */ jsxs2(
167
+ "div",
168
+ {
169
+ className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
170
+ ...props,
171
+ children: [
172
+ /* @__PURE__ */ jsx3(Bell, { size: 24, className: "text-primary-950" }),
173
+ notificationActive && /* @__PURE__ */ jsx3(
174
+ "span",
175
+ {
176
+ "data-testid": "notification-dot",
177
+ className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
178
+ }
179
+ )
180
+ ]
181
+ }
182
+ );
183
+ }
184
+ return /* @__PURE__ */ jsxs2(
185
+ "div",
186
+ {
187
+ className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
188
+ ...props,
189
+ children: [
190
+ iconLeft && /* @__PURE__ */ jsx3("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconLeft }),
191
+ children,
192
+ iconRight && /* @__PURE__ */ jsx3("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconRight })
193
+ ]
194
+ }
195
+ );
196
+ };
197
+
198
+ // src/components/Alert/Alert.tsx
199
+ import { CheckCircle, Info, WarningCircle, XCircle } from "phosphor-react";
200
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
201
+ var VARIANT_ACTION_CLASSES3 = {
202
+ solid: {
203
+ default: "bg-background-50 border-transparent",
204
+ info: "bg-info border-transparent",
205
+ success: "bg-success border-transparent",
206
+ warning: "bg-warning border-transparent",
207
+ error: "bg-error border-transparent"
208
+ },
209
+ outline: {
210
+ default: "bg-background border border-border-100",
211
+ info: "bg-background border border-border-100",
212
+ success: "bg-background border border-border-100",
213
+ warning: "bg-background border border-border-100",
214
+ error: "bg-background border border-border-100"
215
+ }
216
+ };
217
+ var COLOR_CLASSES = {
218
+ default: "text-text-950",
219
+ info: "text-info-800",
220
+ success: "text-success-800",
221
+ warning: "text-warning-800",
222
+ error: "text-error-800"
223
+ };
224
+ var ICONS = {
225
+ default: /* @__PURE__ */ jsx4(CheckCircle, { size: 18 }),
226
+ info: /* @__PURE__ */ jsx4(Info, { size: 18 }),
227
+ success: /* @__PURE__ */ jsx4(CheckCircle, { size: 18 }),
228
+ warning: /* @__PURE__ */ jsx4(WarningCircle, { size: 18 }),
229
+ error: /* @__PURE__ */ jsx4(XCircle, { size: 18 })
230
+ };
231
+ var Alert = ({
232
+ variant = "solid",
233
+ title,
234
+ description,
235
+ action = "default",
236
+ className,
237
+ ...props
238
+ }) => {
239
+ const baseClasses = "alert-wrapper flex items-start gap-2 w-[384px] py-3 px-4 font-inherit rounded-md";
240
+ const variantClasses = VARIANT_ACTION_CLASSES3[variant][action];
241
+ const variantColor = COLOR_CLASSES[action];
242
+ const variantIcon = ICONS[action];
243
+ const hasHeading = Boolean(title);
244
+ return /* @__PURE__ */ jsxs3(
245
+ "div",
246
+ {
247
+ className: `${baseClasses} ${variantClasses} ${className ?? ""}`,
248
+ ...props,
249
+ children: [
250
+ /* @__PURE__ */ jsx4("span", { className: `mt-0.5 ${variantColor}`, children: variantIcon }),
251
+ /* @__PURE__ */ jsxs3("div", { children: [
252
+ hasHeading && /* @__PURE__ */ jsx4(
253
+ Text,
254
+ {
255
+ size: "md",
256
+ weight: "medium",
257
+ color: variantColor,
258
+ className: "mb-0.5",
259
+ children: title
260
+ }
261
+ ),
262
+ /* @__PURE__ */ jsx4(
263
+ Text,
264
+ {
265
+ size: hasHeading ? "sm" : "md",
266
+ weight: "normal",
267
+ color: !hasHeading ? variantColor : "text-text-700",
268
+ children: description
269
+ }
270
+ )
271
+ ] })
272
+ ]
273
+ }
274
+ );
275
+ };
276
+
277
+ // src/components/IconButton/IconButton.tsx
278
+ import { forwardRef } from "react";
279
+ import { jsx as jsx5 } from "react/jsx-runtime";
280
+ var IconButton = forwardRef(
281
+ ({ icon, size = "md", active = false, className = "", disabled, ...props }, ref) => {
282
+ const baseClasses = [
283
+ "inline-flex",
284
+ "items-center",
285
+ "justify-center",
286
+ "rounded-lg",
287
+ "font-medium",
288
+ "bg-transparent",
289
+ "text-text-950",
290
+ "cursor-pointer",
291
+ "hover:bg-primary-600",
292
+ "hover:text-text",
293
+ "focus-visible:outline-none",
294
+ "focus-visible:ring-2",
295
+ "focus-visible:ring-offset-0",
296
+ "focus-visible:ring-indicator-info",
297
+ "disabled:opacity-50",
298
+ "disabled:cursor-not-allowed",
299
+ "disabled:pointer-events-none"
300
+ ];
301
+ const sizeClasses = {
302
+ sm: ["w-6", "h-6", "text-sm"],
303
+ md: ["w-10", "h-10", "text-base"]
304
+ };
305
+ const activeClasses = active ? ["!bg-primary-50", "!text-primary-950", "hover:!bg-primary-100"] : [];
306
+ const allClasses = [
307
+ ...baseClasses,
308
+ ...sizeClasses[size],
309
+ ...activeClasses
310
+ ].join(" ");
311
+ const ariaLabel = props["aria-label"] ?? "Bot\xE3o de a\xE7\xE3o";
312
+ return /* @__PURE__ */ jsx5(
313
+ "button",
314
+ {
315
+ ref,
316
+ type: "button",
317
+ className: `${allClasses} ${className}`,
318
+ disabled,
319
+ "aria-pressed": active,
320
+ "aria-label": ariaLabel,
321
+ ...props,
322
+ children: /* @__PURE__ */ jsx5("span", { className: "flex items-center justify-center", children: icon })
323
+ }
324
+ );
325
+ }
326
+ );
327
+ IconButton.displayName = "IconButton";
328
+
329
+ // src/components/IconRoundedButton/IconRoundedButton.tsx
330
+ import { jsx as jsx6 } from "react/jsx-runtime";
331
+ var IconRoundedButton = ({
332
+ icon,
333
+ className = "",
334
+ disabled,
335
+ ...props
336
+ }) => {
337
+ const baseClasses = [
338
+ "inline-flex",
339
+ "items-center",
340
+ "justify-center",
341
+ "w-8",
342
+ "h-8",
343
+ "rounded-full",
344
+ "cursor-pointer",
345
+ "border",
346
+ "border-background-200",
347
+ "bg-background",
348
+ "text-text-950",
349
+ "hover:shadow-hard-shadow-1",
350
+ "focus-visible:outline-none",
351
+ "focus-visible:shadow-hard-shadow-1",
352
+ "focus-visible:ring-2",
353
+ "focus-visible:ring-indicator-info",
354
+ "focus-visible:ring-offset-0",
355
+ "disabled:opacity-50",
356
+ "disabled:cursor-not-allowed"
357
+ ].join(" ");
358
+ return /* @__PURE__ */ jsx6(
359
+ "button",
360
+ {
361
+ type: "button",
362
+ className: `${baseClasses} ${className}`,
363
+ disabled,
364
+ ...props,
365
+ children: /* @__PURE__ */ jsx6("span", { className: "flex items-center justify-center w-5 h-5", children: icon })
366
+ }
367
+ );
368
+ };
369
+
370
+ // src/components/NavButton/NavButton.tsx
371
+ import { forwardRef as forwardRef2 } from "react";
372
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
373
+ var NavButton = forwardRef2(
374
+ ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
375
+ const baseClasses = [
376
+ "flex",
377
+ "flex-col",
378
+ "items-center",
379
+ "justify-center",
380
+ "gap-0.5",
381
+ "px-12",
382
+ "py-1",
383
+ "rounded-sm",
384
+ "cursor-pointer",
385
+ "text-text-950",
386
+ "text-xs",
387
+ "font-medium",
388
+ "hover:text-text",
389
+ "hover:bg-primary-600",
390
+ "focus-visible:outline-none",
391
+ "focus-visible:ring-2",
392
+ "focus-visible:ring-offset-0",
393
+ "focus-visible:ring-indicator-info",
394
+ "disabled:opacity-50",
395
+ "disabled:cursor-not-allowed",
396
+ "disabled:pointer-events-none"
397
+ ];
398
+ const stateClasses = selected ? ["bg-primary-50", "text-primary-950"] : [];
399
+ const allClasses = [...baseClasses, ...stateClasses].join(" ");
396
400
  return /* @__PURE__ */ jsxs4(
397
- "div",
401
+ "button",
398
402
  {
399
- className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
403
+ ref,
404
+ type: "button",
405
+ className: `${allClasses} ${className}`,
406
+ disabled,
407
+ "aria-pressed": selected,
400
408
  ...props,
401
409
  children: [
402
- /* @__PURE__ */ jsx6(Bell, { size: 24, className: "text-primary-950" }),
403
- notificationActive && /* @__PURE__ */ jsx6(
404
- "span",
405
- {
406
- "data-testid": "notification-dot",
407
- className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
408
- }
409
- )
410
+ /* @__PURE__ */ jsx7("span", { className: "flex items-center justify-center w-5 h-5", children: icon }),
411
+ /* @__PURE__ */ jsx7("span", { className: "whitespace-nowrap", children: label })
410
412
  ]
411
413
  }
412
414
  );
413
415
  }
414
- return /* @__PURE__ */ jsxs4(
415
- "div",
416
+ );
417
+ NavButton.displayName = "NavButton";
418
+
419
+ // src/components/SelectionButton/SelectionButton.tsx
420
+ import { forwardRef as forwardRef3 } from "react";
421
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
422
+ var SelectionButton = forwardRef3(
423
+ ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
424
+ const baseClasses = [
425
+ "inline-flex",
426
+ "items-center",
427
+ "justify-start",
428
+ "gap-2",
429
+ "p-4",
430
+ "rounded-xl",
431
+ "cursor-pointer",
432
+ "border",
433
+ "border-border-50",
434
+ "bg-background",
435
+ "text-sm",
436
+ "text-text-700",
437
+ "font-bold",
438
+ "shadow-soft-shadow-1",
439
+ "hover:bg-background-100",
440
+ "focus-visible:outline-none",
441
+ "focus-visible:ring-2",
442
+ "focus-visible:ring-indicator-info",
443
+ "focus-visible:ring-offset-0",
444
+ "focus-visible:shadow-none",
445
+ "active:ring-2",
446
+ "active:ring-primary-950",
447
+ "active:ring-offset-0",
448
+ "active:shadow-none",
449
+ "disabled:opacity-50",
450
+ "disabled:cursor-not-allowed"
451
+ ];
452
+ const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
453
+ const allClasses = [...baseClasses, ...stateClasses].join(" ");
454
+ return /* @__PURE__ */ jsxs5(
455
+ "button",
456
+ {
457
+ ref,
458
+ type: "button",
459
+ className: `${allClasses} ${className}`,
460
+ disabled,
461
+ "aria-pressed": selected,
462
+ ...props,
463
+ children: [
464
+ /* @__PURE__ */ jsx8("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
465
+ /* @__PURE__ */ jsx8("span", { children: label })
466
+ ]
467
+ }
468
+ );
469
+ }
470
+ );
471
+ SelectionButton.displayName = "SelectionButton";
472
+
473
+ // src/components/Table/Table.tsx
474
+ import { forwardRef as forwardRef4 } from "react";
475
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
476
+ var Table = forwardRef4(
477
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx9("div", { className: "border border-border-200 rounded-xl relative w-full overflow-hidden", children: /* @__PURE__ */ jsxs6(
478
+ "table",
416
479
  {
417
- className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
480
+ ref,
481
+ className: `w-full caption-bottom text-sm ${className ?? ""}`,
418
482
  ...props,
419
483
  children: [
420
- iconLeft && /* @__PURE__ */ jsx6("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconLeft }),
421
- children,
422
- iconRight && /* @__PURE__ */ jsx6("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconRight })
484
+ /* @__PURE__ */ jsx9("caption", { className: "sr-only", children: "My Table" }),
485
+ children
423
486
  ]
424
487
  }
425
- );
488
+ ) })
489
+ );
490
+ Table.displayName = "Table";
491
+ var TableHeader = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
492
+ "thead",
493
+ {
494
+ ref,
495
+ className: `[&_tr:first-child]:border-0 ${className}`,
496
+ ...props
497
+ }
498
+ ));
499
+ TableHeader.displayName = "TableHeader";
500
+ var TableBody = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
501
+ "tbody",
502
+ {
503
+ ref,
504
+ className: `[&_tr:last-child]:border-0 border-t border-border-200 ${className}`,
505
+ ...props
506
+ }
507
+ ));
508
+ TableBody.displayName = "TableBody";
509
+ var TableFooter = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
510
+ "tfoot",
511
+ {
512
+ ref,
513
+ className: `border-t bg-background-50 border-border-200 font-medium [&>tr]:last:border-b-0 px-6 py-3.5 ${className}`,
514
+ ...props
515
+ }
516
+ ));
517
+ TableFooter.displayName = "TableFooter";
518
+ var VARIANT_STATES_ROW = {
519
+ default: "border-b border-border-200",
520
+ selected: "border-b-2 border-indicator-primary",
521
+ invalid: "border-b-2 border-indicator-error",
522
+ disabled: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed"
426
523
  };
524
+ var TableRow = forwardRef4(
525
+ ({ state = "default", className, ...props }, ref) => {
526
+ return /* @__PURE__ */ jsx9(
527
+ "tr",
528
+ {
529
+ ref,
530
+ className: `
531
+ transition-colors
532
+ ${state !== "disabled" ? "hover:bg-muted/50" : ""}
533
+ ${VARIANT_STATES_ROW[state]}
534
+ ${className}
535
+ `,
536
+ "aria-disabled": state === "disabled",
537
+ ...props
538
+ }
539
+ );
540
+ }
541
+ );
542
+ TableRow.displayName = "TableRow";
543
+ var TableHead = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
544
+ "th",
545
+ {
546
+ ref,
547
+ 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}`,
548
+ ...props
549
+ }
550
+ ));
551
+ TableHead.displayName = "TableHead";
552
+ var TableCell = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
553
+ "td",
554
+ {
555
+ ref,
556
+ 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}`,
557
+ ...props
558
+ }
559
+ ));
560
+ TableCell.displayName = "TableCell";
561
+ var TableCaption = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
562
+ "caption",
563
+ {
564
+ ref,
565
+ className: `border-t border-border-200 text-sm text-text-800 px-6 py-3.5 ${className}`,
566
+ ...props
567
+ }
568
+ ));
569
+ TableCaption.displayName = "TableCaption";
427
570
 
428
571
  // src/components/CheckBox/CheckBox.tsx
429
572
  import {
430
- forwardRef as forwardRef3,
431
- useState as useState2,
432
- useId as useId2
573
+ forwardRef as forwardRef5,
574
+ useState,
575
+ useId
433
576
  } from "react";
434
577
  import { Check, Minus } from "phosphor-react";
435
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
436
- var SIZE_CLASSES4 = {
578
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
579
+ var SIZE_CLASSES3 = {
437
580
  small: {
438
581
  checkbox: "w-4 h-4",
439
582
  // 16px x 16px
@@ -470,7 +613,7 @@ var SIZE_CLASSES4 = {
470
613
  }
471
614
  };
472
615
  var BASE_CHECKBOX_CLASSES = "rounded border cursor-pointer transition-all duration-200 flex items-center justify-center focus:outline-none";
473
- var STATE_CLASSES2 = {
616
+ var STATE_CLASSES = {
474
617
  default: {
475
618
  unchecked: "border-border-400 bg-background hover:border-border-500",
476
619
  checked: "border-primary-950 bg-primary-950 text-text hover:border-primary-800 hover:bg-primary-800"
@@ -492,7 +635,7 @@ var STATE_CLASSES2 = {
492
635
  checked: "border-primary-600 bg-primary-600 text-text cursor-not-allowed opacity-40"
493
636
  }
494
637
  };
495
- var CheckBox = forwardRef3(
638
+ var CheckBox = forwardRef5(
496
639
  ({
497
640
  label,
498
641
  size = "medium",
@@ -508,9 +651,9 @@ var CheckBox = forwardRef3(
508
651
  onChange,
509
652
  ...props
510
653
  }, ref) => {
511
- const generatedId = useId2();
654
+ const generatedId = useId();
512
655
  const inputId = id ?? `checkbox-${generatedId}`;
513
- const [internalChecked, setInternalChecked] = useState2(false);
656
+ const [internalChecked, setInternalChecked] = useState(false);
514
657
  const isControlled = checkedProp !== void 0;
515
658
  const checked = isControlled ? checkedProp : internalChecked;
516
659
  const handleChange = (event) => {
@@ -520,14 +663,14 @@ var CheckBox = forwardRef3(
520
663
  onChange?.(event);
521
664
  };
522
665
  const currentState = disabled ? "disabled" : state;
523
- const sizeClasses = SIZE_CLASSES4[size];
666
+ const sizeClasses = SIZE_CLASSES3[size];
524
667
  const checkVariant = checked || indeterminate ? "checked" : "unchecked";
525
- const stylingClasses = STATE_CLASSES2[currentState][checkVariant];
668
+ const stylingClasses = STATE_CLASSES[currentState][checkVariant];
526
669
  const borderWidthClass = state === "focused" || state === "hovered" && size === "large" ? "border-[3px]" : sizeClasses.borderWidth;
527
670
  const checkboxClasses = `${BASE_CHECKBOX_CLASSES} ${sizeClasses.checkbox} ${borderWidthClass} ${stylingClasses} ${className}`;
528
671
  const renderIcon = () => {
529
672
  if (indeterminate) {
530
- return /* @__PURE__ */ jsx7(
673
+ return /* @__PURE__ */ jsx10(
531
674
  Minus,
532
675
  {
533
676
  size: sizeClasses.iconSize,
@@ -537,7 +680,7 @@ var CheckBox = forwardRef3(
537
680
  );
538
681
  }
539
682
  if (checked) {
540
- return /* @__PURE__ */ jsx7(
683
+ return /* @__PURE__ */ jsx10(
541
684
  Check,
542
685
  {
543
686
  size: sizeClasses.iconSize,
@@ -548,13 +691,13 @@ var CheckBox = forwardRef3(
548
691
  }
549
692
  return null;
550
693
  };
551
- return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col", children: [
552
- /* @__PURE__ */ jsxs5(
694
+ return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
695
+ /* @__PURE__ */ jsxs7(
553
696
  "div",
554
697
  {
555
698
  className: `flex flex-row items-center ${sizeClasses.spacing} ${disabled ? "opacity-40" : ""}`,
556
699
  children: [
557
- /* @__PURE__ */ jsx7(
700
+ /* @__PURE__ */ jsx10(
558
701
  "input",
559
702
  {
560
703
  ref,
@@ -567,12 +710,12 @@ var CheckBox = forwardRef3(
567
710
  ...props
568
711
  }
569
712
  ),
570
- /* @__PURE__ */ jsx7("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
571
- label && /* @__PURE__ */ jsx7(
713
+ /* @__PURE__ */ jsx10("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
714
+ label && /* @__PURE__ */ jsx10(
572
715
  "div",
573
716
  {
574
717
  className: `flex flex-row items-center ${sizeClasses.labelHeight}`,
575
- children: /* @__PURE__ */ jsx7(
718
+ children: /* @__PURE__ */ jsx10(
576
719
  Text,
577
720
  {
578
721
  as: "label",
@@ -588,128 +731,165 @@ var CheckBox = forwardRef3(
588
731
  ]
589
732
  }
590
733
  ),
591
- errorMessage && /* @__PURE__ */ jsx7(
734
+ errorMessage && /* @__PURE__ */ jsx10(
735
+ Text,
736
+ {
737
+ size: "sm",
738
+ weight: "normal",
739
+ className: "mt-1.5",
740
+ color: "text-error-600",
741
+ children: errorMessage
742
+ }
743
+ ),
744
+ helperText && !errorMessage && /* @__PURE__ */ jsx10(
745
+ Text,
746
+ {
747
+ size: "sm",
748
+ weight: "normal",
749
+ className: "mt-1.5",
750
+ color: "text-text-500",
751
+ children: helperText
752
+ }
753
+ )
754
+ ] });
755
+ }
756
+ );
757
+ CheckBox.displayName = "CheckBox";
758
+
759
+ // src/components/TextArea/TextArea.tsx
760
+ import {
761
+ forwardRef as forwardRef6,
762
+ useState as useState2,
763
+ useId as useId2
764
+ } from "react";
765
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
766
+ var SIZE_CLASSES4 = {
767
+ small: {
768
+ container: "w-72",
769
+ // 288px width
770
+ textarea: "h-24 text-sm",
771
+ // 96px height, 14px font
772
+ textSize: "sm"
773
+ },
774
+ medium: {
775
+ container: "w-72",
776
+ // 288px width
777
+ textarea: "h-24 text-base",
778
+ // 96px height, 16px font
779
+ textSize: "md"
780
+ },
781
+ large: {
782
+ container: "w-72",
783
+ // 288px width
784
+ textarea: "h-24 text-lg",
785
+ // 96px height, 18px font
786
+ textSize: "lg"
787
+ },
788
+ extraLarge: {
789
+ container: "w-72",
790
+ // 288px width
791
+ textarea: "h-24 text-xl",
792
+ // 96px height, 20px font
793
+ textSize: "xl"
794
+ }
795
+ };
796
+ var BASE_TEXTAREA_CLASSES = "w-full box-border p-3 bg-background border border-solid rounded-[4px] resize-none focus:outline-none font-roboto font-normal leading-[150%] placeholder:text-text-600 transition-all duration-200";
797
+ var STATE_CLASSES2 = {
798
+ default: {
799
+ base: "border-border-300 bg-background text-text-600",
800
+ hover: "hover:border-border-400",
801
+ focus: "focus:border-border-500"
802
+ },
803
+ hovered: {
804
+ base: "border-border-400 bg-background text-text-600",
805
+ hover: "",
806
+ focus: "focus:border-border-500"
807
+ },
808
+ focused: {
809
+ base: "border-2 border-primary-950 bg-background text-text-900",
810
+ hover: "",
811
+ focus: ""
812
+ },
813
+ invalid: {
814
+ base: "border-2 border-red-700 bg-white text-gray-800",
815
+ hover: "hover:border-red-700",
816
+ focus: "focus:border-red-700"
817
+ },
818
+ disabled: {
819
+ base: "border-border-300 bg-background text-text-600 cursor-not-allowed opacity-40",
820
+ hover: "",
821
+ focus: ""
822
+ }
823
+ };
824
+ var TextArea = forwardRef6(
825
+ ({
826
+ label,
827
+ size = "medium",
828
+ state = "default",
829
+ errorMessage,
830
+ helperMessage,
831
+ className = "",
832
+ labelClassName = "",
833
+ disabled,
834
+ id,
835
+ onChange,
836
+ placeholder,
837
+ ...props
838
+ }, ref) => {
839
+ const generatedId = useId2();
840
+ const inputId = id ?? `textarea-${generatedId}`;
841
+ const [isFocused, setIsFocused] = useState2(false);
842
+ const handleChange = (event) => {
843
+ onChange?.(event);
844
+ };
845
+ const handleFocus = (event) => {
846
+ setIsFocused(true);
847
+ props.onFocus?.(event);
848
+ };
849
+ const handleBlur = (event) => {
850
+ setIsFocused(false);
851
+ props.onBlur?.(event);
852
+ };
853
+ let currentState = disabled ? "disabled" : state;
854
+ if (isFocused && currentState !== "invalid" && currentState !== "disabled") {
855
+ currentState = "focused";
856
+ }
857
+ const sizeClasses = SIZE_CLASSES4[size];
858
+ const stateClasses = STATE_CLASSES2[currentState];
859
+ const textareaClasses = `${BASE_TEXTAREA_CLASSES} ${sizeClasses.textarea} ${stateClasses.base} ${stateClasses.hover} ${stateClasses.focus} ${className}`;
860
+ return /* @__PURE__ */ jsxs8("div", { className: `flex flex-col ${sizeClasses.container}`, children: [
861
+ label && /* @__PURE__ */ jsx11(
592
862
  Text,
593
863
  {
594
- size: "sm",
595
- weight: "normal",
596
- className: "mt-1.5",
597
- color: "text-error-600",
598
- children: errorMessage
864
+ as: "label",
865
+ htmlFor: inputId,
866
+ size: sizeClasses.textSize,
867
+ weight: "medium",
868
+ color: "text-text-950",
869
+ className: `mb-1.5 ${labelClassName}`,
870
+ children: label
599
871
  }
600
872
  ),
601
- helperText && !errorMessage && /* @__PURE__ */ jsx7(
602
- Text,
873
+ /* @__PURE__ */ jsx11(
874
+ "textarea",
603
875
  {
604
- size: "sm",
605
- weight: "normal",
606
- className: "mt-1.5",
607
- color: "text-text-500",
608
- children: helperText
876
+ ref,
877
+ id: inputId,
878
+ disabled,
879
+ onChange: handleChange,
880
+ onFocus: handleFocus,
881
+ onBlur: handleBlur,
882
+ className: textareaClasses,
883
+ placeholder,
884
+ ...props
609
885
  }
610
- )
886
+ ),
887
+ errorMessage && /* @__PURE__ */ jsx11(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-error-600", children: errorMessage }),
888
+ helperMessage && !errorMessage && /* @__PURE__ */ jsx11(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
611
889
  ] });
612
890
  }
613
891
  );
614
- CheckBox.displayName = "CheckBox";
615
-
616
- // src/components/Table/Table.tsx
617
- import { forwardRef as forwardRef4 } from "react";
618
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
619
- var Table = forwardRef4(
620
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx8("div", { className: "border border-border-200 rounded-xl relative w-full overflow-hidden", children: /* @__PURE__ */ jsxs6(
621
- "table",
622
- {
623
- ref,
624
- className: `w-full caption-bottom text-sm ${className ?? ""}`,
625
- ...props,
626
- children: [
627
- /* @__PURE__ */ jsx8("caption", { className: "sr-only", children: "My Table" }),
628
- children
629
- ]
630
- }
631
- ) })
632
- );
633
- Table.displayName = "Table";
634
- var TableHeader = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
635
- "thead",
636
- {
637
- ref,
638
- className: `[&_tr:first-child]:border-0 ${className}`,
639
- ...props
640
- }
641
- ));
642
- TableHeader.displayName = "TableHeader";
643
- var TableBody = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
644
- "tbody",
645
- {
646
- ref,
647
- className: `[&_tr:last-child]:border-0 border-t border-border-200 ${className}`,
648
- ...props
649
- }
650
- ));
651
- TableBody.displayName = "TableBody";
652
- var TableFooter = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
653
- "tfoot",
654
- {
655
- ref,
656
- className: `border-t bg-background-50 border-border-200 font-medium [&>tr]:last:border-b-0 px-6 py-3.5 ${className}`,
657
- ...props
658
- }
659
- ));
660
- TableFooter.displayName = "TableFooter";
661
- var VARIANT_STATES_ROW = {
662
- default: "border-b border-border-200",
663
- selected: "border-b-2 border-indicator-primary",
664
- invalid: "border-b-2 border-indicator-error",
665
- disabled: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed"
666
- };
667
- var TableRow = forwardRef4(
668
- ({ state = "default", className, ...props }, ref) => {
669
- return /* @__PURE__ */ jsx8(
670
- "tr",
671
- {
672
- ref,
673
- className: `
674
- transition-colors
675
- ${state !== "disabled" ? "hover:bg-muted/50" : ""}
676
- ${VARIANT_STATES_ROW[state]}
677
- ${className}
678
- `,
679
- "aria-disabled": state === "disabled",
680
- ...props
681
- }
682
- );
683
- }
684
- );
685
- TableRow.displayName = "TableRow";
686
- var TableHead = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
687
- "th",
688
- {
689
- ref,
690
- 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}`,
691
- ...props
692
- }
693
- ));
694
- TableHead.displayName = "TableHead";
695
- var TableCell = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
696
- "td",
697
- {
698
- ref,
699
- 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}`,
700
- ...props
701
- }
702
- ));
703
- TableCell.displayName = "TableCell";
704
- var TableCaption = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
705
- "caption",
706
- {
707
- ref,
708
- className: `border-t border-border-200 text-sm text-text-800 px-6 py-3.5 ${className}`,
709
- ...props
710
- }
711
- ));
712
- TableCaption.displayName = "TableCaption";
892
+ TextArea.displayName = "TextArea";
713
893
 
714
894
  // src/components/DropdownMenu/DropdownMenu.tsx
715
895
  import {
@@ -717,12 +897,12 @@ import {
717
897
  useState as useState3,
718
898
  useCallback,
719
899
  useContext,
720
- forwardRef as forwardRef5,
900
+ forwardRef as forwardRef7,
721
901
  useEffect,
722
902
  useRef,
723
903
  useMemo
724
904
  } from "react";
725
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
905
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
726
906
  var DropdownMenuContext = createContext(
727
907
  void 0
728
908
  );
@@ -785,14 +965,14 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
785
965
  () => ({ open: currentOpen, setOpen }),
786
966
  [currentOpen, setOpen]
787
967
  );
788
- return /* @__PURE__ */ jsx9(DropdownMenuContext.Provider, { value, children: /* @__PURE__ */ jsx9("div", { className: "relative", ref: menuRef, children }) });
968
+ return /* @__PURE__ */ jsx12(DropdownMenuContext.Provider, { value, children: /* @__PURE__ */ jsx12("div", { className: "relative", ref: menuRef, children }) });
789
969
  };
790
- var DropdownMenuTrigger = forwardRef5(({ className, children, onClick, ...props }, ref) => {
970
+ var DropdownMenuTrigger = forwardRef7(({ className, children, onClick, ...props }, ref) => {
791
971
  const context = useContext(DropdownMenuContext);
792
972
  if (!context)
793
973
  throw new Error("DropdownMenuTrigger must be used within a DropdownMenu");
794
974
  const { open, setOpen } = context;
795
- return /* @__PURE__ */ jsx9(
975
+ return /* @__PURE__ */ jsx12(
796
976
  "button",
797
977
  {
798
978
  ref,
@@ -824,7 +1004,7 @@ var ALIGN_CLASSES = {
824
1004
  center: "left-1/2 -translate-x-1/2",
825
1005
  end: "right-0"
826
1006
  };
827
- var MenuLabel = forwardRef5(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx9(
1007
+ var MenuLabel = forwardRef7(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx12(
828
1008
  "fieldset",
829
1009
  {
830
1010
  ref,
@@ -834,7 +1014,7 @@ var MenuLabel = forwardRef5(({ className, inset, ...props }, ref) => /* @__PURE_
834
1014
  }
835
1015
  ));
836
1016
  MenuLabel.displayName = "MenuLabel";
837
- var MenuContent = forwardRef5(
1017
+ var MenuContent = forwardRef7(
838
1018
  ({
839
1019
  className,
840
1020
  align = "start",
@@ -859,7 +1039,7 @@ var MenuContent = forwardRef5(
859
1039
  const horizontal = ALIGN_CLASSES[align];
860
1040
  return `absolute ${vertical} ${horizontal}`;
861
1041
  };
862
- return /* @__PURE__ */ jsx9(
1042
+ return /* @__PURE__ */ jsx12(
863
1043
  "div",
864
1044
  {
865
1045
  ref,
@@ -883,7 +1063,7 @@ var MenuContent = forwardRef5(
883
1063
  }
884
1064
  );
885
1065
  MenuContent.displayName = "MenuContent";
886
- var MenuItem = forwardRef5(
1066
+ var MenuItem = forwardRef7(
887
1067
  ({
888
1068
  className,
889
1069
  inset,
@@ -904,7 +1084,7 @@ var MenuItem = forwardRef5(
904
1084
  }
905
1085
  onClick?.(e);
906
1086
  };
907
- return /* @__PURE__ */ jsxs7(
1087
+ return /* @__PURE__ */ jsxs9(
908
1088
  "div",
909
1089
  {
910
1090
  ref,
@@ -934,7 +1114,7 @@ var MenuItem = forwardRef5(
934
1114
  }
935
1115
  );
936
1116
  MenuItem.displayName = "MenuItem";
937
- var MenuSeparator = forwardRef5(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
1117
+ var MenuSeparator = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
938
1118
  "div",
939
1119
  {
940
1120
  ref,
@@ -944,111 +1124,10 @@ var MenuSeparator = forwardRef5(({ className, ...props }, ref) => /* @__PURE__ *
944
1124
  ));
945
1125
  MenuSeparator.displayName = "MenuSeparator";
946
1126
 
947
- // src/components/NavButton/NavButton.tsx
948
- import { forwardRef as forwardRef6 } from "react";
949
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
950
- var NavButton = forwardRef6(
951
- ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
952
- const baseClasses = [
953
- "flex",
954
- "flex-col",
955
- "items-center",
956
- "justify-center",
957
- "gap-0.5",
958
- "px-12",
959
- "py-1",
960
- "rounded-sm",
961
- "cursor-pointer",
962
- "text-text-950",
963
- "text-xs",
964
- "font-medium",
965
- "hover:text-text",
966
- "hover:bg-primary-600",
967
- "focus-visible:outline-none",
968
- "focus-visible:ring-2",
969
- "focus-visible:ring-offset-0",
970
- "focus-visible:ring-indicator-info",
971
- "disabled:opacity-50",
972
- "disabled:cursor-not-allowed",
973
- "disabled:pointer-events-none"
974
- ];
975
- const stateClasses = selected ? ["bg-primary-50", "text-primary-950"] : [];
976
- const allClasses = [...baseClasses, ...stateClasses].join(" ");
977
- return /* @__PURE__ */ jsxs8(
978
- "button",
979
- {
980
- ref,
981
- type: "button",
982
- className: `${allClasses} ${className}`,
983
- disabled,
984
- "aria-pressed": selected,
985
- ...props,
986
- children: [
987
- /* @__PURE__ */ jsx10("span", { className: "flex items-center justify-center w-5 h-5", children: icon }),
988
- /* @__PURE__ */ jsx10("span", { className: "whitespace-nowrap", children: label })
989
- ]
990
- }
991
- );
992
- }
993
- );
994
- NavButton.displayName = "NavButton";
995
-
996
- // src/components/IconButton/IconButton.tsx
997
- import { forwardRef as forwardRef7 } from "react";
998
- import { jsx as jsx11 } from "react/jsx-runtime";
999
- var IconButton = forwardRef7(
1000
- ({ icon, size = "md", active = false, className = "", disabled, ...props }, ref) => {
1001
- const baseClasses = [
1002
- "inline-flex",
1003
- "items-center",
1004
- "justify-center",
1005
- "rounded-lg",
1006
- "font-medium",
1007
- "bg-transparent",
1008
- "text-text-950",
1009
- "cursor-pointer",
1010
- "hover:bg-primary-600",
1011
- "hover:text-text",
1012
- "focus-visible:outline-none",
1013
- "focus-visible:ring-2",
1014
- "focus-visible:ring-offset-0",
1015
- "focus-visible:ring-indicator-info",
1016
- "disabled:opacity-50",
1017
- "disabled:cursor-not-allowed",
1018
- "disabled:pointer-events-none"
1019
- ];
1020
- const sizeClasses = {
1021
- sm: ["w-6", "h-6", "text-sm"],
1022
- md: ["w-10", "h-10", "text-base"]
1023
- };
1024
- const activeClasses = active ? ["!bg-primary-50", "!text-primary-950", "hover:!bg-primary-100"] : [];
1025
- const allClasses = [
1026
- ...baseClasses,
1027
- ...sizeClasses[size],
1028
- ...activeClasses
1029
- ].join(" ");
1030
- const ariaLabel = props["aria-label"] ?? "Bot\xE3o de a\xE7\xE3o";
1031
- return /* @__PURE__ */ jsx11(
1032
- "button",
1033
- {
1034
- ref,
1035
- type: "button",
1036
- className: `${allClasses} ${className}`,
1037
- disabled,
1038
- "aria-pressed": active,
1039
- "aria-label": ariaLabel,
1040
- ...props,
1041
- children: /* @__PURE__ */ jsx11("span", { className: "flex items-center justify-center", children: icon })
1042
- }
1043
- );
1044
- }
1045
- );
1046
- IconButton.displayName = "IconButton";
1047
-
1048
1127
  // src/components/Toast/Toast.tsx
1049
- import { CheckCircle, WarningCircle, Info, X } from "phosphor-react";
1050
- import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
1051
- var VARIANT_ACTION_CLASSES3 = {
1128
+ import { CheckCircle as CheckCircle2, WarningCircle as WarningCircle2, Info as Info2, X } from "phosphor-react";
1129
+ import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
1130
+ var VARIANT_ACTION_CLASSES4 = {
1052
1131
  solid: {
1053
1132
  warning: "bg-warning text-warning-800 border-none focus-visible:outline-none",
1054
1133
  success: "bg-success text-success-800 border-none focus-visible:outline-none",
@@ -1061,9 +1140,9 @@ var VARIANT_ACTION_CLASSES3 = {
1061
1140
  }
1062
1141
  };
1063
1142
  var iconMap = {
1064
- success: CheckCircle,
1065
- info: Info,
1066
- warning: WarningCircle
1143
+ success: CheckCircle2,
1144
+ info: Info2,
1145
+ warning: WarningCircle2
1067
1146
  };
1068
1147
  var Toast = ({
1069
1148
  variant = "outlined",
@@ -1075,7 +1154,7 @@ var Toast = ({
1075
1154
  position = "default",
1076
1155
  ...props
1077
1156
  }) => {
1078
- const variantClasses = VARIANT_ACTION_CLASSES3[variant][action];
1157
+ const variantClasses = VARIANT_ACTION_CLASSES4[variant][action];
1079
1158
  const positionClasses = {
1080
1159
  "top-left": "fixed top-4 left-4",
1081
1160
  "top-center": "fixed top-4 left-1/2 transform -translate-x-1/2",
@@ -1087,7 +1166,7 @@ var Toast = ({
1087
1166
  };
1088
1167
  const IconAction = iconMap[action] || iconMap["success"];
1089
1168
  const baseClasses = "max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group";
1090
- return /* @__PURE__ */ jsxs9(
1169
+ return /* @__PURE__ */ jsxs10(
1091
1170
  "div",
1092
1171
  {
1093
1172
  role: "alert",
@@ -1096,20 +1175,20 @@ var Toast = ({
1096
1175
  className: `${baseClasses} ${positionClasses[position]} ${variantClasses} ${className}`,
1097
1176
  ...props,
1098
1177
  children: [
1099
- /* @__PURE__ */ jsxs9("div", { className: "flex flex-row items-start gap-3", children: [
1100
- /* @__PURE__ */ jsx12("span", { className: "mt-1", "data-testid": `toast-icon-${action}`, children: /* @__PURE__ */ jsx12(IconAction, {}) }),
1101
- /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-start justify-start", children: [
1102
- /* @__PURE__ */ jsx12("p", { className: "font-semibold text-md", children: title }),
1103
- description && /* @__PURE__ */ jsx12("p", { className: "text-md text-text-900", children: description })
1178
+ /* @__PURE__ */ jsxs10("div", { className: "flex flex-row items-start gap-3", children: [
1179
+ /* @__PURE__ */ jsx13("span", { className: "mt-1", "data-testid": `toast-icon-${action}`, children: /* @__PURE__ */ jsx13(IconAction, {}) }),
1180
+ /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-start justify-start", children: [
1181
+ /* @__PURE__ */ jsx13("p", { className: "font-semibold text-md", children: title }),
1182
+ description && /* @__PURE__ */ jsx13("p", { className: "text-md text-text-900", children: description })
1104
1183
  ] })
1105
1184
  ] }),
1106
- /* @__PURE__ */ jsx12(
1185
+ /* @__PURE__ */ jsx13(
1107
1186
  "button",
1108
1187
  {
1109
1188
  onClick: onClose,
1110
1189
  "aria-label": "Dismiss notification",
1111
1190
  className: "text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
1112
- children: /* @__PURE__ */ jsx12(X, {})
1191
+ children: /* @__PURE__ */ jsx13(X, {})
1113
1192
  }
1114
1193
  )
1115
1194
  ]
@@ -1135,11 +1214,11 @@ var useToastStore = create((set) => ({
1135
1214
  }));
1136
1215
 
1137
1216
  // src/components/Toast/utils/Toaster.tsx
1138
- import { Fragment, jsx as jsx13 } from "react/jsx-runtime";
1217
+ import { Fragment, jsx as jsx14 } from "react/jsx-runtime";
1139
1218
  var Toaster = () => {
1140
1219
  const toasts = useToastStore((state) => state.toasts);
1141
1220
  const removeToast = useToastStore((state) => state.removeToast);
1142
- return /* @__PURE__ */ jsx13(Fragment, { children: toasts.map((toast) => /* @__PURE__ */ jsx13(
1221
+ return /* @__PURE__ */ jsx14(Fragment, { children: toasts.map((toast) => /* @__PURE__ */ jsx14(
1143
1222
  Toast,
1144
1223
  {
1145
1224
  title: toast.title,
@@ -1152,37 +1231,25 @@ var Toaster = () => {
1152
1231
  toast.id
1153
1232
  )) });
1154
1233
  };
1155
- var useToast = () => {
1156
- const addToast = useToastStore((state) => state.addToast);
1157
- const removeToast = useToastStore((state) => state.removeToast);
1158
- return { addToast, removeToast };
1159
- };
1160
1234
  export {
1235
+ Alert,
1161
1236
  Badge,
1162
1237
  Button,
1163
1238
  CheckBox,
1164
1239
  DropdownMenu,
1240
+ MenuContent as DropdownMenuContent,
1241
+ MenuItem as DropdownMenuItem,
1242
+ MenuLabel as DropdownMenuLabel,
1243
+ MenuSeparator as DropdownMenuSeparator,
1165
1244
  DropdownMenuTrigger,
1166
1245
  IconButton,
1167
1246
  IconRoundedButton,
1168
- MenuContent,
1169
- MenuItem,
1170
- MenuLabel,
1171
- MenuSeparator,
1172
1247
  NavButton,
1173
1248
  SelectionButton,
1174
1249
  Table,
1175
- TableBody,
1176
- TableCaption,
1177
- TableCell,
1178
- TableFooter,
1179
- TableHead,
1180
- TableHeader,
1181
- TableRow,
1182
1250
  Text,
1183
1251
  TextArea,
1184
1252
  Toast,
1185
1253
  Toaster,
1186
- useToast,
1187
1254
  useToastStore
1188
1255
  };