analytica-frontend-lib 1.0.9 → 1.0.11

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.css CHANGED
@@ -22,7 +22,6 @@
22
22
  "Courier New",
23
23
  monospace;
24
24
  --spacing: 0.25rem;
25
- --container-2xs: 18rem;
26
25
  --text-xs: 0.75rem;
27
26
  --text-xs--line-height: calc(1 / 0.75);
28
27
  --text-sm: 0.875rem;
@@ -49,6 +48,8 @@
49
48
  --font-weight-extrabold: 800;
50
49
  --font-weight-black: 900;
51
50
  --radius-xl: 0.75rem;
51
+ --default-transition-duration: 150ms;
52
+ --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
52
53
  --default-font-family: var(--font-sans);
53
54
  --default-mono-font-family: var(--font-mono);
54
55
  --color-primary-400: #525252;
@@ -58,7 +59,9 @@
58
59
  --color-primary-800: #0d0d0d;
59
60
  --color-primary-950: #080808;
60
61
  --color-text: #fefeff;
62
+ --color-text-600: #737373;
61
63
  --color-text-700: #525252;
64
+ --color-text-800: #404040;
62
65
  --color-text-900: #262627;
63
66
  --color-text-950: #171717;
64
67
  --color-background: #ffffff;
@@ -66,6 +69,8 @@
66
69
  --color-background-100: #f2f1f1;
67
70
  --color-background-200: #dcdbdb;
68
71
  --color-border-50: #f3f3f3;
72
+ --color-border-100: #e6e6e6;
73
+ --color-border-200: #dddcdb;
69
74
  --color-success-300: #66b584;
70
75
  --color-success-400: #489766;
71
76
  --color-success-500: #348352;
@@ -76,7 +81,9 @@
76
81
  --color-error-500: #e63535;
77
82
  --color-error-600: #dc2626;
78
83
  --color-error-700: #b91c1c;
84
+ --color-indicator-primary: #373737;
79
85
  --color-indicator-info: #5399ec;
86
+ --color-indicator-error: #b91c1c;
80
87
  --font-weight-hairline: 100;
81
88
  --text-2xs: 0.625rem;
82
89
  --text-2xs--line-height: calc(1 / 0.625);
@@ -284,18 +291,38 @@
284
291
  }
285
292
  }
286
293
  @layer utilities {
294
+ .sr-only {
295
+ position: absolute;
296
+ width: 1px;
297
+ height: 1px;
298
+ padding: 0;
299
+ margin: -1px;
300
+ overflow: hidden;
301
+ clip: rect(0, 0, 0, 0);
302
+ white-space: nowrap;
303
+ border-width: 0;
304
+ }
305
+ .relative {
306
+ position: relative;
307
+ }
287
308
  .mx-2 {
288
309
  margin-inline: calc(var(--spacing) * 2);
289
310
  }
290
311
  .my-4 {
291
312
  margin-block: calc(var(--spacing) * 4);
292
313
  }
314
+ .mt-2 {
315
+ margin-top: calc(var(--spacing) * 2);
316
+ }
293
317
  .mr-2 {
294
318
  margin-right: calc(var(--spacing) * 2);
295
319
  }
296
320
  .mb-2 {
297
321
  margin-bottom: calc(var(--spacing) * 2);
298
322
  }
323
+ .mb-3 {
324
+ margin-bottom: calc(var(--spacing) * 3);
325
+ }
299
326
  .ml-2 {
300
327
  margin-left: calc(var(--spacing) * 2);
301
328
  }
@@ -317,8 +344,8 @@
317
344
  .h-8 {
318
345
  height: calc(var(--spacing) * 8);
319
346
  }
320
- .w-2xs {
321
- width: var(--container-2xs);
347
+ .h-10 {
348
+ height: calc(var(--spacing) * 10);
322
349
  }
323
350
  .w-5 {
324
351
  width: calc(var(--spacing) * 5);
@@ -329,9 +356,18 @@
329
356
  .w-8 {
330
357
  width: calc(var(--spacing) * 8);
331
358
  }
359
+ .w-full {
360
+ width: 100%;
361
+ }
362
+ .caption-bottom {
363
+ caption-side: bottom;
364
+ }
332
365
  .transform {
333
366
  transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
334
367
  }
368
+ .cursor-not-allowed {
369
+ cursor: not-allowed;
370
+ }
335
371
  .cursor-pointer {
336
372
  cursor: pointer;
337
373
  }
@@ -365,6 +401,9 @@
365
401
  .gap-6 {
366
402
  gap: calc(var(--spacing) * 6);
367
403
  }
404
+ .overflow-hidden {
405
+ overflow: hidden;
406
+ }
368
407
  .rounded-full {
369
408
  border-radius: calc(infinity * 1px);
370
409
  }
@@ -375,18 +414,42 @@
375
414
  border-style: var(--tw-border-style);
376
415
  border-width: 1px;
377
416
  }
417
+ .border-t {
418
+ border-top-style: var(--tw-border-style);
419
+ border-top-width: 1px;
420
+ }
421
+ .border-b {
422
+ border-bottom-style: var(--tw-border-style);
423
+ border-bottom-width: 1px;
424
+ }
425
+ .border-b-2 {
426
+ border-bottom-style: var(--tw-border-style);
427
+ border-bottom-width: 2px;
428
+ }
378
429
  .border-background-200 {
379
430
  border-color: var(--color-background-200);
380
431
  }
381
432
  .border-border-50 {
382
433
  border-color: var(--color-border-50);
383
434
  }
435
+ .border-border-100 {
436
+ border-color: var(--color-border-100);
437
+ }
438
+ .border-border-200 {
439
+ border-color: var(--color-border-200);
440
+ }
384
441
  .border-error-300 {
385
442
  border-color: var(--color-error-300);
386
443
  }
387
444
  .border-error-500 {
388
445
  border-color: var(--color-error-500);
389
446
  }
447
+ .border-indicator-error {
448
+ border-color: var(--color-indicator-error);
449
+ }
450
+ .border-indicator-primary {
451
+ border-color: var(--color-indicator-primary);
452
+ }
390
453
  .border-primary-950 {
391
454
  border-color: var(--color-primary-950);
392
455
  }
@@ -399,6 +462,9 @@
399
462
  .bg-background {
400
463
  background-color: var(--color-background);
401
464
  }
465
+ .bg-background-50 {
466
+ background-color: var(--color-background-50);
467
+ }
402
468
  .bg-error-500 {
403
469
  background-color: var(--color-error-500);
404
470
  }
@@ -411,6 +477,9 @@
411
477
  .bg-transparent {
412
478
  background-color: transparent;
413
479
  }
480
+ .p-2 {
481
+ padding: calc(var(--spacing) * 2);
482
+ }
414
483
  .p-4 {
415
484
  padding: calc(var(--spacing) * 4);
416
485
  }
@@ -444,6 +513,15 @@
444
513
  .py-3\.5 {
445
514
  padding-block: calc(var(--spacing) * 3.5);
446
515
  }
516
+ .text-left {
517
+ text-align: left;
518
+ }
519
+ .text-right {
520
+ text-align: right;
521
+ }
522
+ .align-middle {
523
+ vertical-align: middle;
524
+ }
447
525
  .text-2xl {
448
526
  font-size: var(--text-2xl);
449
527
  line-height: var(--tw-leading, var(--text-2xl--line-height));
@@ -532,15 +610,36 @@
532
610
  .text-text {
533
611
  color: var(--color-text);
534
612
  }
613
+ .text-text-600 {
614
+ color: var(--color-text-600);
615
+ }
535
616
  .text-text-700 {
536
617
  color: var(--color-text-700);
537
618
  }
619
+ .text-text-800 {
620
+ color: var(--color-text-800);
621
+ }
538
622
  .text-text-900 {
539
623
  color: var(--color-text-900);
540
624
  }
541
625
  .text-text-950 {
542
626
  color: var(--color-text-950);
543
627
  }
628
+ .capitalize {
629
+ text-transform: capitalize;
630
+ }
631
+ .opacity-50 {
632
+ opacity: 50%;
633
+ }
634
+ .shadow-none {
635
+ --tw-shadow: 0 0 #0000;
636
+ box-shadow:
637
+ var(--tw-inset-shadow),
638
+ var(--tw-inset-ring-shadow),
639
+ var(--tw-ring-offset-shadow),
640
+ var(--tw-ring-shadow),
641
+ var(--tw-shadow);
642
+ }
544
643
  .shadow-soft-shadow-1 {
545
644
  --tw-shadow: 0px 0px 10px var(--tw-shadow-color, rgba(38, 38, 38, 0.1));
546
645
  box-shadow:
@@ -550,10 +649,41 @@
550
649
  var(--tw-ring-shadow),
551
650
  var(--tw-shadow);
552
651
  }
652
+ .ring-2 {
653
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
654
+ box-shadow:
655
+ var(--tw-inset-shadow),
656
+ var(--tw-inset-ring-shadow),
657
+ var(--tw-ring-offset-shadow),
658
+ var(--tw-ring-shadow),
659
+ var(--tw-shadow);
660
+ }
661
+ .ring-primary-950 {
662
+ --tw-ring-color: var(--color-primary-950);
663
+ }
664
+ .ring-offset-0 {
665
+ --tw-ring-offset-width: 0px;
666
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
667
+ }
553
668
  .outline {
554
669
  outline-style: var(--tw-outline-style);
555
670
  outline-width: 1px;
556
671
  }
672
+ .transition-colors {
673
+ transition-property:
674
+ color,
675
+ background-color,
676
+ border-color,
677
+ outline-color,
678
+ text-decoration-color,
679
+ fill,
680
+ stroke,
681
+ --tw-gradient-from,
682
+ --tw-gradient-via,
683
+ --tw-gradient-to;
684
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
685
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
686
+ }
557
687
  .hover\:border-error-400 {
558
688
  &:hover {
559
689
  @media (hover: hover) {
@@ -874,6 +1004,37 @@
874
1004
  opacity: 50%;
875
1005
  }
876
1006
  }
1007
+ .\[\&_tr\:first-child\]\:border-0 {
1008
+ & tr:first-child {
1009
+ border-style: var(--tw-border-style);
1010
+ border-width: 0px;
1011
+ }
1012
+ }
1013
+ .\[\&_tr\:last-child\]\:border-0 {
1014
+ & tr:last-child {
1015
+ border-style: var(--tw-border-style);
1016
+ border-width: 0px;
1017
+ }
1018
+ }
1019
+ .\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0 {
1020
+ &:has([role=checkbox]) {
1021
+ padding-right: calc(var(--spacing) * 0);
1022
+ }
1023
+ }
1024
+ .\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\] {
1025
+ & > [role=checkbox] {
1026
+ --tw-translate-y: 2px;
1027
+ translate: var(--tw-translate-x) var(--tw-translate-y);
1028
+ }
1029
+ }
1030
+ .\[\&\>tr\]\:last\:border-b-0 {
1031
+ & > tr {
1032
+ &:last-child {
1033
+ border-bottom-style: var(--tw-border-style);
1034
+ border-bottom-width: 0px;
1035
+ }
1036
+ }
1037
+ }
877
1038
  }
878
1039
  @layer base {
879
1040
  [data-theme=dark] {
@@ -1217,6 +1378,9 @@
1217
1378
  @property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }
1218
1379
  @property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
1219
1380
  @property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
1381
+ @property --tw-translate-x { syntax: "*"; inherits: false; initial-value: 0; }
1382
+ @property --tw-translate-y { syntax: "*"; inherits: false; initial-value: 0; }
1383
+ @property --tw-translate-z { syntax: "*"; inherits: false; initial-value: 0; }
1220
1384
  @layer properties {
1221
1385
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
1222
1386
  *,
@@ -1245,6 +1409,9 @@
1245
1409
  --tw-ring-offset-color: #fff;
1246
1410
  --tw-ring-offset-shadow: 0 0 #0000;
1247
1411
  --tw-outline-style: solid;
1412
+ --tw-translate-x: 0;
1413
+ --tw-translate-y: 0;
1414
+ --tw-translate-z: 0;
1248
1415
  }
1249
1416
  }
1250
1417
  }
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef } from 'react';
3
+ import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef, HTMLAttributes, TdHTMLAttributes } from 'react';
4
4
 
5
5
  /**
6
6
  * Button component props interface
@@ -78,13 +78,14 @@ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconR
78
78
  /**
79
79
  * SelectionButton component for Analytica Ensino platforms
80
80
  *
81
- * Um botão com ícone e texto para ações e navegação.
82
- * Ideal para filtros, tags, categorias, etc.
81
+ * Um botão com ícone e texto para ações e navegação com estado de seleção.
82
+ * Ideal para filtros, tags, categorias, seleção de tipos, etc.
83
83
  * Compatível com Next.js 15 e React 19.
84
84
  * Suporta forwardRef para acesso programático ao elemento DOM.
85
85
  *
86
86
  * @param icon - O ícone a ser exibido no botão
87
87
  * @param label - O texto/label a ser exibido
88
+ * @param selected - Estado de seleção do botão
88
89
  * @param className - Classes CSS adicionais
89
90
  * @param props - Todos os outros atributos HTML padrão de button
90
91
  * @returns Um elemento button estilizado
@@ -94,7 +95,8 @@ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconR
94
95
  * <SelectionButton
95
96
  * icon={<TagIcon />}
96
97
  * label="Categoria"
97
- * onClick={() => handleAction()}
98
+ * selected={false}
99
+ * onClick={() => handleSelection()}
98
100
  * />
99
101
  * ```
100
102
  *
@@ -111,7 +113,8 @@ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconR
111
113
  * ref={buttonRef}
112
114
  * icon={<TagIcon />}
113
115
  * label="Categoria"
114
- * onClick={() => handleAction()}
116
+ * selected={isSelected}
117
+ * onClick={() => setSelected(!isSelected)}
115
118
  * />
116
119
  * ```
117
120
  */
@@ -120,6 +123,8 @@ declare const SelectionButton: react.ForwardRefExoticComponent<{
120
123
  icon: ReactNode;
121
124
  /** Texto/label a ser exibido ao lado do ícone */
122
125
  label: string;
126
+ /** Estado de seleção do botão */
127
+ selected?: boolean;
123
128
  /** Additional CSS classes to apply */
124
129
  className?: string;
125
130
  } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
@@ -179,4 +184,17 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
179
184
  */
180
185
  declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
181
186
 
182
- export { Button, IconRoundedButton, SelectionButton, Text };
187
+ type TableRowState = 'default' | 'selected' | 'invalid' | 'disabled';
188
+ interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
189
+ state?: TableRowState;
190
+ }
191
+ declare const Table: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
192
+ declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
193
+ declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
194
+ declare const TableFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
195
+ declare const TableRow: react.ForwardRefExoticComponent<TableRowProps & react.RefAttributes<HTMLTableRowElement>>;
196
+ declare const TableHead: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
197
+ declare const TableCell: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
198
+ declare const TableCaption: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & react.RefAttributes<HTMLTableCaptionElement>>;
199
+
200
+ export { Button, IconRoundedButton, SelectionButton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef } from 'react';
3
+ import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef, HTMLAttributes, TdHTMLAttributes } from 'react';
4
4
 
5
5
  /**
6
6
  * Button component props interface
@@ -78,13 +78,14 @@ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconR
78
78
  /**
79
79
  * SelectionButton component for Analytica Ensino platforms
80
80
  *
81
- * Um botão com ícone e texto para ações e navegação.
82
- * Ideal para filtros, tags, categorias, etc.
81
+ * Um botão com ícone e texto para ações e navegação com estado de seleção.
82
+ * Ideal para filtros, tags, categorias, seleção de tipos, etc.
83
83
  * Compatível com Next.js 15 e React 19.
84
84
  * Suporta forwardRef para acesso programático ao elemento DOM.
85
85
  *
86
86
  * @param icon - O ícone a ser exibido no botão
87
87
  * @param label - O texto/label a ser exibido
88
+ * @param selected - Estado de seleção do botão
88
89
  * @param className - Classes CSS adicionais
89
90
  * @param props - Todos os outros atributos HTML padrão de button
90
91
  * @returns Um elemento button estilizado
@@ -94,7 +95,8 @@ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconR
94
95
  * <SelectionButton
95
96
  * icon={<TagIcon />}
96
97
  * label="Categoria"
97
- * onClick={() => handleAction()}
98
+ * selected={false}
99
+ * onClick={() => handleSelection()}
98
100
  * />
99
101
  * ```
100
102
  *
@@ -111,7 +113,8 @@ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconR
111
113
  * ref={buttonRef}
112
114
  * icon={<TagIcon />}
113
115
  * label="Categoria"
114
- * onClick={() => handleAction()}
116
+ * selected={isSelected}
117
+ * onClick={() => setSelected(!isSelected)}
115
118
  * />
116
119
  * ```
117
120
  */
@@ -120,6 +123,8 @@ declare const SelectionButton: react.ForwardRefExoticComponent<{
120
123
  icon: ReactNode;
121
124
  /** Texto/label a ser exibido ao lado do ícone */
122
125
  label: string;
126
+ /** Estado de seleção do botão */
127
+ selected?: boolean;
123
128
  /** Additional CSS classes to apply */
124
129
  className?: string;
125
130
  } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
@@ -179,4 +184,17 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
179
184
  */
180
185
  declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
181
186
 
182
- export { Button, IconRoundedButton, SelectionButton, Text };
187
+ type TableRowState = 'default' | 'selected' | 'invalid' | 'disabled';
188
+ interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
189
+ state?: TableRowState;
190
+ }
191
+ declare const Table: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
192
+ declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
193
+ declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
194
+ declare const TableFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
195
+ declare const TableRow: react.ForwardRefExoticComponent<TableRowProps & react.RefAttributes<HTMLTableRowElement>>;
196
+ declare const TableHead: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
197
+ declare const TableCell: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
198
+ declare const TableCaption: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & react.RefAttributes<HTMLTableCaptionElement>>;
199
+
200
+ export { Button, IconRoundedButton, SelectionButton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text };
package/dist/index.js CHANGED
@@ -23,6 +23,14 @@ __export(index_exports, {
23
23
  Button: () => Button,
24
24
  IconRoundedButton: () => IconRoundedButton,
25
25
  SelectionButton: () => SelectionButton,
26
+ Table: () => Table,
27
+ TableBody: () => TableBody,
28
+ TableCaption: () => TableCaption,
29
+ TableCell: () => TableCell,
30
+ TableFooter: () => TableFooter,
31
+ TableHead: () => TableHead,
32
+ TableHeader: () => TableHeader,
33
+ TableRow: () => TableRow,
26
34
  Text: () => Text
27
35
  });
28
36
  module.exports = __toCommonJS(index_exports);
@@ -128,50 +136,55 @@ var IconRoundedButton = ({
128
136
  // src/components/SelectionButton/SelectionButton.tsx
129
137
  var import_react = require("react");
130
138
  var import_jsx_runtime3 = require("react/jsx-runtime");
131
- var SelectionButton = (0, import_react.forwardRef)(({ icon, label, className = "", disabled, ...props }, ref) => {
132
- const baseClasses = [
133
- "inline-flex",
134
- "items-center",
135
- "justify-start",
136
- "gap-2",
137
- "p-4",
138
- "rounded-xl",
139
- "cursor-pointer",
140
- "border",
141
- "border-border-50",
142
- "bg-background",
143
- "text-sm",
144
- "text-text-700",
145
- "font-bold",
146
- "shadow-soft-shadow-1",
147
- "hover:bg-background-100",
148
- "focus-visible:outline-none",
149
- "focus-visible:ring-2",
150
- "focus-visible:ring-indicator-info",
151
- "focus-visible:ring-offset-0",
152
- "focus-visible:shadow-none",
153
- "active:ring-2",
154
- "active:ring-primary-950",
155
- "active:ring-offset-0",
156
- "active:shadow-none",
157
- "disabled:opacity-50",
158
- "disabled:cursor-not-allowed"
159
- ].join(" ");
160
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
161
- "button",
162
- {
163
- ref,
164
- type: "button",
165
- className: `${baseClasses} ${className}`,
166
- disabled,
167
- ...props,
168
- children: [
169
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
170
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: label })
171
- ]
172
- }
173
- );
174
- });
139
+ var SelectionButton = (0, import_react.forwardRef)(
140
+ ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
141
+ const baseClasses = [
142
+ "inline-flex",
143
+ "items-center",
144
+ "justify-start",
145
+ "gap-2",
146
+ "p-4",
147
+ "rounded-xl",
148
+ "cursor-pointer",
149
+ "border",
150
+ "border-border-50",
151
+ "bg-background",
152
+ "text-sm",
153
+ "text-text-700",
154
+ "font-bold",
155
+ "shadow-soft-shadow-1",
156
+ "hover:bg-background-100",
157
+ "focus-visible:outline-none",
158
+ "focus-visible:ring-2",
159
+ "focus-visible:ring-indicator-info",
160
+ "focus-visible:ring-offset-0",
161
+ "focus-visible:shadow-none",
162
+ "active:ring-2",
163
+ "active:ring-primary-950",
164
+ "active:ring-offset-0",
165
+ "active:shadow-none",
166
+ "disabled:opacity-50",
167
+ "disabled:cursor-not-allowed"
168
+ ];
169
+ const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
170
+ const allClasses = [...baseClasses, ...stateClasses].join(" ");
171
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
172
+ "button",
173
+ {
174
+ ref,
175
+ type: "button",
176
+ className: `${allClasses} ${className}`,
177
+ disabled,
178
+ "aria-pressed": selected,
179
+ ...props,
180
+ children: [
181
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
182
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: label })
183
+ ]
184
+ }
185
+ );
186
+ }
187
+ );
175
188
  SelectionButton.displayName = "SelectionButton";
176
189
 
177
190
  // src/components/Text/Text.tsx
@@ -229,10 +242,116 @@ var Text = ({
229
242
  }
230
243
  );
231
244
  };
245
+
246
+ // src/components/Table/Table.tsx
247
+ var import_react2 = require("react");
248
+ var import_jsx_runtime5 = require("react/jsx-runtime");
249
+ var Table = (0, import_react2.forwardRef)(
250
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "border border-border-200 rounded-xl relative w-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
251
+ "table",
252
+ {
253
+ ref,
254
+ className: `w-full caption-bottom text-sm ${className ?? ""}`,
255
+ ...props,
256
+ children: [
257
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("caption", { className: "sr-only", children: "My Table" }),
258
+ children
259
+ ]
260
+ }
261
+ ) })
262
+ );
263
+ Table.displayName = "Table";
264
+ var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
265
+ "thead",
266
+ {
267
+ ref,
268
+ className: `[&_tr:first-child]:border-0 ${className}`,
269
+ ...props
270
+ }
271
+ ));
272
+ TableHeader.displayName = "TableHeader";
273
+ var TableBody = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
274
+ "tbody",
275
+ {
276
+ ref,
277
+ className: `[&_tr:last-child]:border-0 border-t border-border-200 ${className}`,
278
+ ...props
279
+ }
280
+ ));
281
+ TableBody.displayName = "TableBody";
282
+ var TableFooter = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
283
+ "tfoot",
284
+ {
285
+ ref,
286
+ className: `border-t bg-background-50 border-border-200 font-medium [&>tr]:last:border-b-0 px-6 py-3.5 ${className}`,
287
+ ...props
288
+ }
289
+ ));
290
+ TableFooter.displayName = "TableFooter";
291
+ var VARIANT_STATES_ROW = {
292
+ default: "border-b border-border-200",
293
+ selected: "border-b-2 border-indicator-primary",
294
+ invalid: "border-b-2 border-indicator-error",
295
+ disabled: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed"
296
+ };
297
+ var TableRow = (0, import_react2.forwardRef)(
298
+ ({ state = "default", className, ...props }, ref) => {
299
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
300
+ "tr",
301
+ {
302
+ ref,
303
+ className: `
304
+ transition-colors
305
+ ${state !== "disabled" ? "hover:bg-muted/50" : ""}
306
+ ${VARIANT_STATES_ROW[state]}
307
+ ${className}
308
+ `,
309
+ "aria-disabled": state === "disabled",
310
+ ...props
311
+ }
312
+ );
313
+ }
314
+ );
315
+ TableRow.displayName = "TableRow";
316
+ var TableHead = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
317
+ "th",
318
+ {
319
+ ref,
320
+ 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}`,
321
+ ...props
322
+ }
323
+ ));
324
+ TableHead.displayName = "TableHead";
325
+ var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
326
+ "td",
327
+ {
328
+ ref,
329
+ 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}`,
330
+ ...props
331
+ }
332
+ ));
333
+ TableCell.displayName = "TableCell";
334
+ var TableCaption = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
335
+ "caption",
336
+ {
337
+ ref,
338
+ className: `border-t border-border-200 text-sm text-text-800 px-6 py-3.5 ${className}`,
339
+ ...props
340
+ }
341
+ ));
342
+ TableCaption.displayName = "TableCaption";
232
343
  // Annotate the CommonJS export names for ESM import in node:
233
344
  0 && (module.exports = {
234
345
  Button,
235
346
  IconRoundedButton,
236
347
  SelectionButton,
348
+ Table,
349
+ TableBody,
350
+ TableCaption,
351
+ TableCell,
352
+ TableFooter,
353
+ TableHead,
354
+ TableHeader,
355
+ TableRow,
237
356
  Text
238
357
  });
package/dist/index.mjs CHANGED
@@ -99,50 +99,55 @@ var IconRoundedButton = ({
99
99
  // src/components/SelectionButton/SelectionButton.tsx
100
100
  import { forwardRef } from "react";
101
101
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
102
- var SelectionButton = forwardRef(({ icon, label, className = "", disabled, ...props }, ref) => {
103
- const baseClasses = [
104
- "inline-flex",
105
- "items-center",
106
- "justify-start",
107
- "gap-2",
108
- "p-4",
109
- "rounded-xl",
110
- "cursor-pointer",
111
- "border",
112
- "border-border-50",
113
- "bg-background",
114
- "text-sm",
115
- "text-text-700",
116
- "font-bold",
117
- "shadow-soft-shadow-1",
118
- "hover:bg-background-100",
119
- "focus-visible:outline-none",
120
- "focus-visible:ring-2",
121
- "focus-visible:ring-indicator-info",
122
- "focus-visible:ring-offset-0",
123
- "focus-visible:shadow-none",
124
- "active:ring-2",
125
- "active:ring-primary-950",
126
- "active:ring-offset-0",
127
- "active:shadow-none",
128
- "disabled:opacity-50",
129
- "disabled:cursor-not-allowed"
130
- ].join(" ");
131
- return /* @__PURE__ */ jsxs2(
132
- "button",
133
- {
134
- ref,
135
- type: "button",
136
- className: `${baseClasses} ${className}`,
137
- disabled,
138
- ...props,
139
- children: [
140
- /* @__PURE__ */ jsx3("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
141
- /* @__PURE__ */ jsx3("span", { children: label })
142
- ]
143
- }
144
- );
145
- });
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
+ );
146
151
  SelectionButton.displayName = "SelectionButton";
147
152
 
148
153
  // src/components/Text/Text.tsx
@@ -200,9 +205,115 @@ var Text = ({
200
205
  }
201
206
  );
202
207
  };
208
+
209
+ // src/components/Table/Table.tsx
210
+ import { forwardRef as forwardRef2 } from "react";
211
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
212
+ var Table = forwardRef2(
213
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx5("div", { className: "border border-border-200 rounded-xl relative w-full overflow-hidden", children: /* @__PURE__ */ jsxs3(
214
+ "table",
215
+ {
216
+ ref,
217
+ className: `w-full caption-bottom text-sm ${className ?? ""}`,
218
+ ...props,
219
+ children: [
220
+ /* @__PURE__ */ jsx5("caption", { className: "sr-only", children: "My Table" }),
221
+ children
222
+ ]
223
+ }
224
+ ) })
225
+ );
226
+ Table.displayName = "Table";
227
+ var TableHeader = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
228
+ "thead",
229
+ {
230
+ ref,
231
+ className: `[&_tr:first-child]:border-0 ${className}`,
232
+ ...props
233
+ }
234
+ ));
235
+ TableHeader.displayName = "TableHeader";
236
+ var TableBody = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
237
+ "tbody",
238
+ {
239
+ ref,
240
+ className: `[&_tr:last-child]:border-0 border-t border-border-200 ${className}`,
241
+ ...props
242
+ }
243
+ ));
244
+ TableBody.displayName = "TableBody";
245
+ var TableFooter = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
246
+ "tfoot",
247
+ {
248
+ ref,
249
+ className: `border-t bg-background-50 border-border-200 font-medium [&>tr]:last:border-b-0 px-6 py-3.5 ${className}`,
250
+ ...props
251
+ }
252
+ ));
253
+ TableFooter.displayName = "TableFooter";
254
+ var VARIANT_STATES_ROW = {
255
+ default: "border-b border-border-200",
256
+ selected: "border-b-2 border-indicator-primary",
257
+ invalid: "border-b-2 border-indicator-error",
258
+ disabled: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed"
259
+ };
260
+ var TableRow = forwardRef2(
261
+ ({ state = "default", className, ...props }, ref) => {
262
+ return /* @__PURE__ */ jsx5(
263
+ "tr",
264
+ {
265
+ ref,
266
+ className: `
267
+ transition-colors
268
+ ${state !== "disabled" ? "hover:bg-muted/50" : ""}
269
+ ${VARIANT_STATES_ROW[state]}
270
+ ${className}
271
+ `,
272
+ "aria-disabled": state === "disabled",
273
+ ...props
274
+ }
275
+ );
276
+ }
277
+ );
278
+ TableRow.displayName = "TableRow";
279
+ var TableHead = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
280
+ "th",
281
+ {
282
+ ref,
283
+ 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}`,
284
+ ...props
285
+ }
286
+ ));
287
+ TableHead.displayName = "TableHead";
288
+ var TableCell = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
289
+ "td",
290
+ {
291
+ ref,
292
+ 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}`,
293
+ ...props
294
+ }
295
+ ));
296
+ TableCell.displayName = "TableCell";
297
+ var TableCaption = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
298
+ "caption",
299
+ {
300
+ ref,
301
+ className: `border-t border-border-200 text-sm text-text-800 px-6 py-3.5 ${className}`,
302
+ ...props
303
+ }
304
+ ));
305
+ TableCaption.displayName = "TableCaption";
203
306
  export {
204
307
  Button,
205
308
  IconRoundedButton,
206
309
  SelectionButton,
310
+ Table,
311
+ TableBody,
312
+ TableCaption,
313
+ TableCell,
314
+ TableFooter,
315
+ TableHead,
316
+ TableHeader,
317
+ TableRow,
207
318
  Text
208
319
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analytica-frontend-lib",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Repositório público dos componentes utilizados nas plataformas da Analytica Ensino",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "./dist/index.js",