analytica-frontend-lib 1.0.7 → 1.0.9

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,6 +22,7 @@
22
22
  "Courier New",
23
23
  monospace;
24
24
  --spacing: 0.25rem;
25
+ --container-2xs: 18rem;
25
26
  --text-xs: 0.75rem;
26
27
  --text-xs--line-height: calc(1 / 0.75);
27
28
  --text-sm: 0.875rem;
@@ -47,6 +48,7 @@
47
48
  --font-weight-bold: 700;
48
49
  --font-weight-extrabold: 800;
49
50
  --font-weight-black: 900;
51
+ --radius-xl: 0.75rem;
50
52
  --default-font-family: var(--font-sans);
51
53
  --default-mono-font-family: var(--font-mono);
52
54
  --color-primary-400: #525252;
@@ -61,7 +63,9 @@
61
63
  --color-text-950: #171717;
62
64
  --color-background: #ffffff;
63
65
  --color-background-50: #f6f6f6;
66
+ --color-background-100: #f2f1f1;
64
67
  --color-background-200: #dcdbdb;
68
+ --color-border-50: #f3f3f3;
65
69
  --color-success-300: #66b584;
66
70
  --color-success-400: #489766;
67
71
  --color-success-500: #348352;
@@ -307,12 +311,21 @@
307
311
  .h-5 {
308
312
  height: calc(var(--spacing) * 5);
309
313
  }
314
+ .h-6 {
315
+ height: calc(var(--spacing) * 6);
316
+ }
310
317
  .h-8 {
311
318
  height: calc(var(--spacing) * 8);
312
319
  }
320
+ .w-2xs {
321
+ width: var(--container-2xs);
322
+ }
313
323
  .w-5 {
314
324
  width: calc(var(--spacing) * 5);
315
325
  }
326
+ .w-6 {
327
+ width: calc(var(--spacing) * 6);
328
+ }
316
329
  .w-8 {
317
330
  width: calc(var(--spacing) * 8);
318
331
  }
@@ -337,9 +350,15 @@
337
350
  .justify-center {
338
351
  justify-content: center;
339
352
  }
353
+ .justify-start {
354
+ justify-content: flex-start;
355
+ }
340
356
  .gap-2 {
341
357
  gap: calc(var(--spacing) * 2);
342
358
  }
359
+ .gap-3 {
360
+ gap: calc(var(--spacing) * 3);
361
+ }
343
362
  .gap-4 {
344
363
  gap: calc(var(--spacing) * 4);
345
364
  }
@@ -349,17 +368,19 @@
349
368
  .rounded-full {
350
369
  border-radius: calc(infinity * 1px);
351
370
  }
371
+ .rounded-xl {
372
+ border-radius: var(--radius-xl);
373
+ }
352
374
  .border {
353
375
  border-style: var(--tw-border-style);
354
376
  border-width: 1px;
355
377
  }
356
- .border-2 {
357
- border-style: var(--tw-border-style);
358
- border-width: 2px;
359
- }
360
378
  .border-background-200 {
361
379
  border-color: var(--color-background-200);
362
380
  }
381
+ .border-border-50 {
382
+ border-color: var(--color-border-50);
383
+ }
363
384
  .border-error-300 {
364
385
  border-color: var(--color-error-300);
365
386
  }
@@ -520,6 +541,15 @@
520
541
  .text-text-950 {
521
542
  color: var(--color-text-950);
522
543
  }
544
+ .shadow-soft-shadow-1 {
545
+ --tw-shadow: 0px 0px 10px var(--tw-shadow-color, rgba(38, 38, 38, 0.1));
546
+ box-shadow:
547
+ var(--tw-inset-shadow),
548
+ var(--tw-inset-ring-shadow),
549
+ var(--tw-ring-offset-shadow),
550
+ var(--tw-ring-shadow),
551
+ var(--tw-shadow);
552
+ }
523
553
  .outline {
524
554
  outline-style: var(--tw-outline-style);
525
555
  outline-width: 1px;
@@ -573,6 +603,13 @@
573
603
  }
574
604
  }
575
605
  }
606
+ .hover\:bg-background-100 {
607
+ &:hover {
608
+ @media (hover: hover) {
609
+ background-color: var(--color-background-100);
610
+ }
611
+ }
612
+ }
576
613
  .hover\:bg-error-600 {
577
614
  &:hover {
578
615
  @media (hover: hover) {
@@ -628,15 +665,10 @@
628
665
  }
629
666
  }
630
667
  }
631
- .focus-visible\:border-2 {
668
+ .focus-visible\:border-0 {
632
669
  &:focus-visible {
633
670
  border-style: var(--tw-border-style);
634
- border-width: 2px;
635
- }
636
- }
637
- .focus-visible\:border-indicator-info {
638
- &:focus-visible {
639
- border-color: var(--color-indicator-info);
671
+ border-width: 0px;
640
672
  }
641
673
  }
642
674
  .focus-visible\:bg-error-500 {
@@ -680,6 +712,45 @@
680
712
  var(--tw-shadow);
681
713
  }
682
714
  }
715
+ .focus-visible\:shadow-none {
716
+ &:focus-visible {
717
+ --tw-shadow: 0 0 #0000;
718
+ box-shadow:
719
+ var(--tw-inset-shadow),
720
+ var(--tw-inset-ring-shadow),
721
+ var(--tw-ring-offset-shadow),
722
+ var(--tw-ring-shadow),
723
+ var(--tw-shadow);
724
+ }
725
+ }
726
+ .focus-visible\:ring-2 {
727
+ &:focus-visible {
728
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
729
+ box-shadow:
730
+ var(--tw-inset-shadow),
731
+ var(--tw-inset-ring-shadow),
732
+ var(--tw-ring-offset-shadow),
733
+ var(--tw-ring-shadow),
734
+ var(--tw-shadow);
735
+ }
736
+ }
737
+ .focus-visible\:ring-indicator-info {
738
+ &:focus-visible {
739
+ --tw-ring-color: var(--color-indicator-info);
740
+ }
741
+ }
742
+ .focus-visible\:ring-offset-0 {
743
+ &:focus-visible {
744
+ --tw-ring-offset-width: 0px;
745
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
746
+ }
747
+ }
748
+ .focus-visible\:outline-none {
749
+ &:focus-visible {
750
+ --tw-outline-style: none;
751
+ outline-style: none;
752
+ }
753
+ }
683
754
  .active\:border-error-700 {
684
755
  &:active {
685
756
  border-color: var(--color-error-700);
@@ -725,6 +796,39 @@
725
796
  color: var(--color-success-700);
726
797
  }
727
798
  }
799
+ .active\:shadow-none {
800
+ &:active {
801
+ --tw-shadow: 0 0 #0000;
802
+ box-shadow:
803
+ var(--tw-inset-shadow),
804
+ var(--tw-inset-ring-shadow),
805
+ var(--tw-ring-offset-shadow),
806
+ var(--tw-ring-shadow),
807
+ var(--tw-shadow);
808
+ }
809
+ }
810
+ .active\:ring-2 {
811
+ &:active {
812
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
813
+ box-shadow:
814
+ var(--tw-inset-shadow),
815
+ var(--tw-inset-ring-shadow),
816
+ var(--tw-ring-offset-shadow),
817
+ var(--tw-ring-shadow),
818
+ var(--tw-shadow);
819
+ }
820
+ }
821
+ .active\:ring-primary-950 {
822
+ &:active {
823
+ --tw-ring-color: var(--color-primary-950);
824
+ }
825
+ }
826
+ .active\:ring-offset-0 {
827
+ &:active {
828
+ --tw-ring-offset-width: 0px;
829
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
830
+ }
831
+ }
728
832
  .disabled\:cursor-not-allowed {
729
833
  &:disabled {
730
834
  cursor: not-allowed;
@@ -1098,7 +1202,6 @@
1098
1202
  @property --tw-skew-y { syntax: "*"; inherits: false; }
1099
1203
  @property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }
1100
1204
  @property --tw-font-weight { syntax: "*"; inherits: false; }
1101
- @property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
1102
1205
  @property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
1103
1206
  @property --tw-shadow-color { syntax: "*"; inherits: false; }
1104
1207
  @property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@@ -1113,6 +1216,7 @@
1113
1216
  @property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }
1114
1217
  @property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }
1115
1218
  @property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
1219
+ @property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
1116
1220
  @layer properties {
1117
1221
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
1118
1222
  *,
@@ -1126,7 +1230,6 @@
1126
1230
  --tw-skew-y: initial;
1127
1231
  --tw-border-style: solid;
1128
1232
  --tw-font-weight: initial;
1129
- --tw-outline-style: solid;
1130
1233
  --tw-shadow: 0 0 #0000;
1131
1234
  --tw-shadow-color: initial;
1132
1235
  --tw-shadow-alpha: 100%;
@@ -1141,6 +1244,7 @@
1141
1244
  --tw-ring-offset-width: 0px;
1142
1245
  --tw-ring-offset-color: #fff;
1143
1246
  --tw-ring-offset-shadow: 0 0 #0000;
1247
+ --tw-outline-style: solid;
1144
1248
  }
1145
1249
  }
1146
1250
  }
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
2
3
  import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef } from 'react';
3
4
 
4
5
  /**
@@ -43,6 +44,86 @@ type ButtonProps = {
43
44
  */
44
45
  declare const Button: ({ children, iconLeft, iconRight, size, variant, action, className, disabled, type, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
45
46
 
47
+ /**
48
+ * IconRoundedButton component props interface
49
+ */
50
+ type IconRoundedButtonProps = {
51
+ /** Ícone a ser exibido no botão */
52
+ icon: ReactNode;
53
+ /** Additional CSS classes to apply */
54
+ className?: string;
55
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
56
+ /**
57
+ * IconRoundedButton component for Analytica Ensino platforms
58
+ *
59
+ * Um botão redondo simples que exibe apenas um ícone.
60
+ * Ideal para ações como navegação, fechar, editar, etc.
61
+ * Compatível com Next.js 15 e React 19.
62
+ *
63
+ * @param icon - O ícone a ser exibido no botão
64
+ * @param className - Classes CSS adicionais
65
+ * @param props - Todos os outros atributos HTML padrão de button
66
+ * @returns Um elemento button estilizado e redondo
67
+ *
68
+ * @example
69
+ * ```tsx
70
+ * <IconRoundedButton
71
+ * icon={<ChevronRightIcon />}
72
+ * onClick={() => console.log('clicked')}
73
+ * />
74
+ * ```
75
+ */
76
+ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconRoundedButtonProps) => react_jsx_runtime.JSX.Element;
77
+
78
+ /**
79
+ * SelectionButton component for Analytica Ensino platforms
80
+ *
81
+ * Um botão com ícone e texto para ações e navegação.
82
+ * Ideal para filtros, tags, categorias, etc.
83
+ * Compatível com Next.js 15 e React 19.
84
+ * Suporta forwardRef para acesso programático ao elemento DOM.
85
+ *
86
+ * @param icon - O ícone a ser exibido no botão
87
+ * @param label - O texto/label a ser exibido
88
+ * @param className - Classes CSS adicionais
89
+ * @param props - Todos os outros atributos HTML padrão de button
90
+ * @returns Um elemento button estilizado
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * <SelectionButton
95
+ * icon={<TagIcon />}
96
+ * label="Categoria"
97
+ * onClick={() => handleAction()}
98
+ * />
99
+ * ```
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * // Usando ref para foco programático
104
+ * const buttonRef = useRef<HTMLButtonElement>(null);
105
+ *
106
+ * const handleFocus = () => {
107
+ * buttonRef.current?.focus();
108
+ * };
109
+ *
110
+ * <SelectionButton
111
+ * ref={buttonRef}
112
+ * icon={<TagIcon />}
113
+ * label="Categoria"
114
+ * onClick={() => handleAction()}
115
+ * />
116
+ * ```
117
+ */
118
+ declare const SelectionButton: react.ForwardRefExoticComponent<{
119
+ /** Ícone a ser exibido no botão */
120
+ icon: ReactNode;
121
+ /** Texto/label a ser exibido ao lado do ícone */
122
+ label: string;
123
+ /** Additional CSS classes to apply */
124
+ className?: string;
125
+ } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
126
+
46
127
  /**
47
128
  * Base text component props
48
129
  */
@@ -98,4 +179,4 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
98
179
  */
99
180
  declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
100
181
 
101
- export { Button, Text };
182
+ export { Button, IconRoundedButton, SelectionButton, Text };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
2
3
  import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef } from 'react';
3
4
 
4
5
  /**
@@ -43,6 +44,86 @@ type ButtonProps = {
43
44
  */
44
45
  declare const Button: ({ children, iconLeft, iconRight, size, variant, action, className, disabled, type, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
45
46
 
47
+ /**
48
+ * IconRoundedButton component props interface
49
+ */
50
+ type IconRoundedButtonProps = {
51
+ /** Ícone a ser exibido no botão */
52
+ icon: ReactNode;
53
+ /** Additional CSS classes to apply */
54
+ className?: string;
55
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
56
+ /**
57
+ * IconRoundedButton component for Analytica Ensino platforms
58
+ *
59
+ * Um botão redondo simples que exibe apenas um ícone.
60
+ * Ideal para ações como navegação, fechar, editar, etc.
61
+ * Compatível com Next.js 15 e React 19.
62
+ *
63
+ * @param icon - O ícone a ser exibido no botão
64
+ * @param className - Classes CSS adicionais
65
+ * @param props - Todos os outros atributos HTML padrão de button
66
+ * @returns Um elemento button estilizado e redondo
67
+ *
68
+ * @example
69
+ * ```tsx
70
+ * <IconRoundedButton
71
+ * icon={<ChevronRightIcon />}
72
+ * onClick={() => console.log('clicked')}
73
+ * />
74
+ * ```
75
+ */
76
+ declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconRoundedButtonProps) => react_jsx_runtime.JSX.Element;
77
+
78
+ /**
79
+ * SelectionButton component for Analytica Ensino platforms
80
+ *
81
+ * Um botão com ícone e texto para ações e navegação.
82
+ * Ideal para filtros, tags, categorias, etc.
83
+ * Compatível com Next.js 15 e React 19.
84
+ * Suporta forwardRef para acesso programático ao elemento DOM.
85
+ *
86
+ * @param icon - O ícone a ser exibido no botão
87
+ * @param label - O texto/label a ser exibido
88
+ * @param className - Classes CSS adicionais
89
+ * @param props - Todos os outros atributos HTML padrão de button
90
+ * @returns Um elemento button estilizado
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * <SelectionButton
95
+ * icon={<TagIcon />}
96
+ * label="Categoria"
97
+ * onClick={() => handleAction()}
98
+ * />
99
+ * ```
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * // Usando ref para foco programático
104
+ * const buttonRef = useRef<HTMLButtonElement>(null);
105
+ *
106
+ * const handleFocus = () => {
107
+ * buttonRef.current?.focus();
108
+ * };
109
+ *
110
+ * <SelectionButton
111
+ * ref={buttonRef}
112
+ * icon={<TagIcon />}
113
+ * label="Categoria"
114
+ * onClick={() => handleAction()}
115
+ * />
116
+ * ```
117
+ */
118
+ declare const SelectionButton: react.ForwardRefExoticComponent<{
119
+ /** Ícone a ser exibido no botão */
120
+ icon: ReactNode;
121
+ /** Texto/label a ser exibido ao lado do ícone */
122
+ label: string;
123
+ /** Additional CSS classes to apply */
124
+ className?: string;
125
+ } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
126
+
46
127
  /**
47
128
  * Base text component props
48
129
  */
@@ -98,4 +179,4 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
98
179
  */
99
180
  declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
100
181
 
101
- export { Button, Text };
182
+ export { Button, IconRoundedButton, SelectionButton, Text };
package/dist/index.js CHANGED
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  Button: () => Button,
24
+ IconRoundedButton: () => IconRoundedButton,
25
+ SelectionButton: () => SelectionButton,
24
26
  Text: () => Text
25
27
  });
26
28
  module.exports = __toCommonJS(index_exports);
@@ -29,19 +31,19 @@ module.exports = __toCommonJS(index_exports);
29
31
  var import_jsx_runtime = require("react/jsx-runtime");
30
32
  var VARIANT_ACTION_CLASSES = {
31
33
  solid: {
32
- primary: "bg-primary-950 text-text border-2 border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:bg-primary-950 focus-visible:border-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",
33
- positive: "bg-success-500 text-text border-2 border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:bg-success-500 focus-visible:border-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",
34
- negative: "bg-error-500 text-text border-2 border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:bg-error-500 focus-visible:border-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"
34
+ 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",
35
+ 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",
36
+ 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"
35
37
  },
36
38
  outline: {
37
- primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:text-primary-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
38
- positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:text-success-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
39
- negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:text-error-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
39
+ 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",
40
+ 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",
41
+ 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"
40
42
  },
41
43
  link: {
42
- primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:text-primary-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
43
- positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:text-success-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
44
- negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:text-error-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
44
+ 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",
45
+ 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",
46
+ 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"
45
47
  }
46
48
  };
47
49
  var SIZE_CLASSES = {
@@ -82,8 +84,98 @@ var Button = ({
82
84
  );
83
85
  };
84
86
 
85
- // src/components/Text/Text.tsx
87
+ // src/components/IconRoundedButton/IconRoundedButton.tsx
86
88
  var import_jsx_runtime2 = require("react/jsx-runtime");
89
+ var IconRoundedButton = ({
90
+ icon,
91
+ className = "",
92
+ disabled,
93
+ ...props
94
+ }) => {
95
+ const baseClasses = [
96
+ "inline-flex",
97
+ "items-center",
98
+ "justify-center",
99
+ "w-8",
100
+ "h-8",
101
+ "rounded-full",
102
+ "cursor-pointer",
103
+ "border",
104
+ "border-background-200",
105
+ "bg-background",
106
+ "text-text-950",
107
+ "hover:shadow-hard-shadow-1",
108
+ "focus-visible:outline-none",
109
+ "focus-visible:shadow-hard-shadow-1",
110
+ "focus-visible:ring-2",
111
+ "focus-visible:ring-indicator-info",
112
+ "focus-visible:ring-offset-0",
113
+ "disabled:opacity-50",
114
+ "disabled:cursor-not-allowed"
115
+ ].join(" ");
116
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
117
+ "button",
118
+ {
119
+ type: "button",
120
+ className: `${baseClasses} ${className}`,
121
+ disabled,
122
+ ...props,
123
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "flex items-center justify-center w-5 h-5", children: icon })
124
+ }
125
+ );
126
+ };
127
+
128
+ // src/components/SelectionButton/SelectionButton.tsx
129
+ var import_react = require("react");
130
+ 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
+ });
175
+ SelectionButton.displayName = "SelectionButton";
176
+
177
+ // src/components/Text/Text.tsx
178
+ var import_jsx_runtime4 = require("react/jsx-runtime");
87
179
  var Text = ({
88
180
  children,
89
181
  size = "md",
@@ -128,7 +220,7 @@ var Text = ({
128
220
  colorClasses = colorClassMap[color] ?? colorClassMap.black;
129
221
  const baseClasses = "font-primary";
130
222
  const Component = as ?? "p";
131
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
223
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
132
224
  Component,
133
225
  {
134
226
  className: `${baseClasses} ${sizeClasses} ${weightClasses} ${colorClasses} ${className}`,
@@ -140,5 +232,7 @@ var Text = ({
140
232
  // Annotate the CommonJS export names for ESM import in node:
141
233
  0 && (module.exports = {
142
234
  Button,
235
+ IconRoundedButton,
236
+ SelectionButton,
143
237
  Text
144
238
  });
package/dist/index.mjs CHANGED
@@ -2,19 +2,19 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  var VARIANT_ACTION_CLASSES = {
4
4
  solid: {
5
- primary: "bg-primary-950 text-text border-2 border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:bg-primary-950 focus-visible:border-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-2 border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:bg-success-500 focus-visible:border-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-2 border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:bg-error-500 focus-visible:border-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"
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
8
  },
9
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:text-primary-600 focus-visible:border-2 focus-visible:border-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:text-success-600 focus-visible:border-2 focus-visible:border-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:text-error-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
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
13
  },
14
14
  link: {
15
- primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:text-primary-600 focus-visible:border-2 focus-visible:border-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:text-success-600 focus-visible:border-2 focus-visible:border-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:text-error-600 focus-visible:border-2 focus-visible:border-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
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
18
  }
19
19
  };
20
20
  var SIZE_CLASSES = {
@@ -55,8 +55,98 @@ var Button = ({
55
55
  );
56
56
  };
57
57
 
58
- // src/components/Text/Text.tsx
58
+ // src/components/IconRoundedButton/IconRoundedButton.tsx
59
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(({ 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
+ });
146
+ SelectionButton.displayName = "SelectionButton";
147
+
148
+ // src/components/Text/Text.tsx
149
+ import { jsx as jsx4 } from "react/jsx-runtime";
60
150
  var Text = ({
61
151
  children,
62
152
  size = "md",
@@ -101,7 +191,7 @@ var Text = ({
101
191
  colorClasses = colorClassMap[color] ?? colorClassMap.black;
102
192
  const baseClasses = "font-primary";
103
193
  const Component = as ?? "p";
104
- return /* @__PURE__ */ jsx2(
194
+ return /* @__PURE__ */ jsx4(
105
195
  Component,
106
196
  {
107
197
  className: `${baseClasses} ${sizeClasses} ${weightClasses} ${colorClasses} ${className}`,
@@ -112,5 +202,7 @@ var Text = ({
112
202
  };
113
203
  export {
114
204
  Button,
205
+ IconRoundedButton,
206
+ SelectionButton,
115
207
  Text
116
208
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analytica-frontend-lib",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
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",