analytica-frontend-lib 1.0.8 → 1.0.10

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
@@ -47,6 +47,7 @@
47
47
  --font-weight-bold: 700;
48
48
  --font-weight-extrabold: 800;
49
49
  --font-weight-black: 900;
50
+ --radius-xl: 0.75rem;
50
51
  --default-font-family: var(--font-sans);
51
52
  --default-mono-font-family: var(--font-mono);
52
53
  --color-primary-400: #525252;
@@ -56,12 +57,15 @@
56
57
  --color-primary-800: #0d0d0d;
57
58
  --color-primary-950: #080808;
58
59
  --color-text: #fefeff;
60
+ --color-text-600: #737373;
59
61
  --color-text-700: #525252;
60
62
  --color-text-900: #262627;
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;
@@ -286,12 +290,18 @@
286
290
  .my-4 {
287
291
  margin-block: calc(var(--spacing) * 4);
288
292
  }
293
+ .mt-2 {
294
+ margin-top: calc(var(--spacing) * 2);
295
+ }
289
296
  .mr-2 {
290
297
  margin-right: calc(var(--spacing) * 2);
291
298
  }
292
299
  .mb-2 {
293
300
  margin-bottom: calc(var(--spacing) * 2);
294
301
  }
302
+ .mb-3 {
303
+ margin-bottom: calc(var(--spacing) * 3);
304
+ }
295
305
  .ml-2 {
296
306
  margin-left: calc(var(--spacing) * 2);
297
307
  }
@@ -307,12 +317,18 @@
307
317
  .h-5 {
308
318
  height: calc(var(--spacing) * 5);
309
319
  }
320
+ .h-6 {
321
+ height: calc(var(--spacing) * 6);
322
+ }
310
323
  .h-8 {
311
324
  height: calc(var(--spacing) * 8);
312
325
  }
313
326
  .w-5 {
314
327
  width: calc(var(--spacing) * 5);
315
328
  }
329
+ .w-6 {
330
+ width: calc(var(--spacing) * 6);
331
+ }
316
332
  .w-8 {
317
333
  width: calc(var(--spacing) * 8);
318
334
  }
@@ -337,9 +353,15 @@
337
353
  .justify-center {
338
354
  justify-content: center;
339
355
  }
356
+ .justify-start {
357
+ justify-content: flex-start;
358
+ }
340
359
  .gap-2 {
341
360
  gap: calc(var(--spacing) * 2);
342
361
  }
362
+ .gap-3 {
363
+ gap: calc(var(--spacing) * 3);
364
+ }
343
365
  .gap-4 {
344
366
  gap: calc(var(--spacing) * 4);
345
367
  }
@@ -349,6 +371,9 @@
349
371
  .rounded-full {
350
372
  border-radius: calc(infinity * 1px);
351
373
  }
374
+ .rounded-xl {
375
+ border-radius: var(--radius-xl);
376
+ }
352
377
  .border {
353
378
  border-style: var(--tw-border-style);
354
379
  border-width: 1px;
@@ -356,6 +381,9 @@
356
381
  .border-background-200 {
357
382
  border-color: var(--color-background-200);
358
383
  }
384
+ .border-border-50 {
385
+ border-color: var(--color-border-50);
386
+ }
359
387
  .border-error-300 {
360
388
  border-color: var(--color-error-300);
361
389
  }
@@ -507,6 +535,9 @@
507
535
  .text-text {
508
536
  color: var(--color-text);
509
537
  }
538
+ .text-text-600 {
539
+ color: var(--color-text-600);
540
+ }
510
541
  .text-text-700 {
511
542
  color: var(--color-text-700);
512
543
  }
@@ -516,6 +547,40 @@
516
547
  .text-text-950 {
517
548
  color: var(--color-text-950);
518
549
  }
550
+ .shadow-none {
551
+ --tw-shadow: 0 0 #0000;
552
+ box-shadow:
553
+ var(--tw-inset-shadow),
554
+ var(--tw-inset-ring-shadow),
555
+ var(--tw-ring-offset-shadow),
556
+ var(--tw-ring-shadow),
557
+ var(--tw-shadow);
558
+ }
559
+ .shadow-soft-shadow-1 {
560
+ --tw-shadow: 0px 0px 10px var(--tw-shadow-color, rgba(38, 38, 38, 0.1));
561
+ box-shadow:
562
+ var(--tw-inset-shadow),
563
+ var(--tw-inset-ring-shadow),
564
+ var(--tw-ring-offset-shadow),
565
+ var(--tw-ring-shadow),
566
+ var(--tw-shadow);
567
+ }
568
+ .ring-2 {
569
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
570
+ box-shadow:
571
+ var(--tw-inset-shadow),
572
+ var(--tw-inset-ring-shadow),
573
+ var(--tw-ring-offset-shadow),
574
+ var(--tw-ring-shadow),
575
+ var(--tw-shadow);
576
+ }
577
+ .ring-primary-950 {
578
+ --tw-ring-color: var(--color-primary-950);
579
+ }
580
+ .ring-offset-0 {
581
+ --tw-ring-offset-width: 0px;
582
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
583
+ }
519
584
  .outline {
520
585
  outline-style: var(--tw-outline-style);
521
586
  outline-width: 1px;
@@ -569,6 +634,13 @@
569
634
  }
570
635
  }
571
636
  }
637
+ .hover\:bg-background-100 {
638
+ &:hover {
639
+ @media (hover: hover) {
640
+ background-color: var(--color-background-100);
641
+ }
642
+ }
643
+ }
572
644
  .hover\:bg-error-600 {
573
645
  &:hover {
574
646
  @media (hover: hover) {
@@ -671,6 +743,17 @@
671
743
  var(--tw-shadow);
672
744
  }
673
745
  }
746
+ .focus-visible\:shadow-none {
747
+ &:focus-visible {
748
+ --tw-shadow: 0 0 #0000;
749
+ box-shadow:
750
+ var(--tw-inset-shadow),
751
+ var(--tw-inset-ring-shadow),
752
+ var(--tw-ring-offset-shadow),
753
+ var(--tw-ring-shadow),
754
+ var(--tw-shadow);
755
+ }
756
+ }
674
757
  .focus-visible\:ring-2 {
675
758
  &:focus-visible {
676
759
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -744,6 +827,39 @@
744
827
  color: var(--color-success-700);
745
828
  }
746
829
  }
830
+ .active\:shadow-none {
831
+ &:active {
832
+ --tw-shadow: 0 0 #0000;
833
+ box-shadow:
834
+ var(--tw-inset-shadow),
835
+ var(--tw-inset-ring-shadow),
836
+ var(--tw-ring-offset-shadow),
837
+ var(--tw-ring-shadow),
838
+ var(--tw-shadow);
839
+ }
840
+ }
841
+ .active\:ring-2 {
842
+ &:active {
843
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
844
+ box-shadow:
845
+ var(--tw-inset-shadow),
846
+ var(--tw-inset-ring-shadow),
847
+ var(--tw-ring-offset-shadow),
848
+ var(--tw-ring-shadow),
849
+ var(--tw-shadow);
850
+ }
851
+ }
852
+ .active\:ring-primary-950 {
853
+ &:active {
854
+ --tw-ring-color: var(--color-primary-950);
855
+ }
856
+ }
857
+ .active\:ring-offset-0 {
858
+ &:active {
859
+ --tw-ring-offset-width: 0px;
860
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
861
+ }
862
+ }
747
863
  .disabled\:cursor-not-allowed {
748
864
  &:disabled {
749
865
  cursor: not-allowed;
@@ -1117,7 +1233,6 @@
1117
1233
  @property --tw-skew-y { syntax: "*"; inherits: false; }
1118
1234
  @property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }
1119
1235
  @property --tw-font-weight { syntax: "*"; inherits: false; }
1120
- @property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
1121
1236
  @property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
1122
1237
  @property --tw-shadow-color { syntax: "*"; inherits: false; }
1123
1238
  @property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@@ -1132,6 +1247,7 @@
1132
1247
  @property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }
1133
1248
  @property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }
1134
1249
  @property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
1250
+ @property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
1135
1251
  @layer properties {
1136
1252
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
1137
1253
  *,
@@ -1145,7 +1261,6 @@
1145
1261
  --tw-skew-y: initial;
1146
1262
  --tw-border-style: solid;
1147
1263
  --tw-font-weight: initial;
1148
- --tw-outline-style: solid;
1149
1264
  --tw-shadow: 0 0 #0000;
1150
1265
  --tw-shadow-color: initial;
1151
1266
  --tw-shadow-alpha: 100%;
@@ -1160,6 +1275,7 @@
1160
1275
  --tw-ring-offset-width: 0px;
1161
1276
  --tw-ring-offset-color: #fff;
1162
1277
  --tw-ring-offset-shadow: 0 0 #0000;
1278
+ --tw-outline-style: solid;
1163
1279
  }
1164
1280
  }
1165
1281
  }
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,91 @@ 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 com estado de seleção.
82
+ * Ideal para filtros, tags, categorias, seleção de tipos, 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 selected - Estado de seleção do botão
89
+ * @param className - Classes CSS adicionais
90
+ * @param props - Todos os outros atributos HTML padrão de button
91
+ * @returns Um elemento button estilizado
92
+ *
93
+ * @example
94
+ * ```tsx
95
+ * <SelectionButton
96
+ * icon={<TagIcon />}
97
+ * label="Categoria"
98
+ * selected={false}
99
+ * onClick={() => handleSelection()}
100
+ * />
101
+ * ```
102
+ *
103
+ * @example
104
+ * ```tsx
105
+ * // Usando ref para foco programático
106
+ * const buttonRef = useRef<HTMLButtonElement>(null);
107
+ *
108
+ * const handleFocus = () => {
109
+ * buttonRef.current?.focus();
110
+ * };
111
+ *
112
+ * <SelectionButton
113
+ * ref={buttonRef}
114
+ * icon={<TagIcon />}
115
+ * label="Categoria"
116
+ * selected={isSelected}
117
+ * onClick={() => setSelected(!isSelected)}
118
+ * />
119
+ * ```
120
+ */
121
+ declare const SelectionButton: react.ForwardRefExoticComponent<{
122
+ /** Ícone a ser exibido no botão */
123
+ icon: ReactNode;
124
+ /** Texto/label a ser exibido ao lado do ícone */
125
+ label: string;
126
+ /** Estado de seleção do botão */
127
+ selected?: boolean;
128
+ /** Additional CSS classes to apply */
129
+ className?: string;
130
+ } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
131
+
46
132
  /**
47
133
  * Base text component props
48
134
  */
@@ -98,4 +184,4 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
98
184
  */
99
185
  declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
100
186
 
101
- export { Button, Text };
187
+ 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,91 @@ 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 com estado de seleção.
82
+ * Ideal para filtros, tags, categorias, seleção de tipos, 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 selected - Estado de seleção do botão
89
+ * @param className - Classes CSS adicionais
90
+ * @param props - Todos os outros atributos HTML padrão de button
91
+ * @returns Um elemento button estilizado
92
+ *
93
+ * @example
94
+ * ```tsx
95
+ * <SelectionButton
96
+ * icon={<TagIcon />}
97
+ * label="Categoria"
98
+ * selected={false}
99
+ * onClick={() => handleSelection()}
100
+ * />
101
+ * ```
102
+ *
103
+ * @example
104
+ * ```tsx
105
+ * // Usando ref para foco programático
106
+ * const buttonRef = useRef<HTMLButtonElement>(null);
107
+ *
108
+ * const handleFocus = () => {
109
+ * buttonRef.current?.focus();
110
+ * };
111
+ *
112
+ * <SelectionButton
113
+ * ref={buttonRef}
114
+ * icon={<TagIcon />}
115
+ * label="Categoria"
116
+ * selected={isSelected}
117
+ * onClick={() => setSelected(!isSelected)}
118
+ * />
119
+ * ```
120
+ */
121
+ declare const SelectionButton: react.ForwardRefExoticComponent<{
122
+ /** Ícone a ser exibido no botão */
123
+ icon: ReactNode;
124
+ /** Texto/label a ser exibido ao lado do ícone */
125
+ label: string;
126
+ /** Estado de seleção do botão */
127
+ selected?: boolean;
128
+ /** Additional CSS classes to apply */
129
+ className?: string;
130
+ } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
131
+
46
132
  /**
47
133
  * Base text component props
48
134
  */
@@ -98,4 +184,4 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
98
184
  */
99
185
  declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
100
186
 
101
- export { Button, Text };
187
+ 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);
@@ -82,8 +84,103 @@ 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)(
132
+ ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
133
+ const baseClasses = [
134
+ "inline-flex",
135
+ "items-center",
136
+ "justify-start",
137
+ "gap-2",
138
+ "p-4",
139
+ "rounded-xl",
140
+ "cursor-pointer",
141
+ "border",
142
+ "border-border-50",
143
+ "bg-background",
144
+ "text-sm",
145
+ "text-text-700",
146
+ "font-bold",
147
+ "shadow-soft-shadow-1",
148
+ "hover:bg-background-100",
149
+ "focus-visible:outline-none",
150
+ "focus-visible:ring-2",
151
+ "focus-visible:ring-indicator-info",
152
+ "focus-visible:ring-offset-0",
153
+ "focus-visible:shadow-none",
154
+ "active:ring-2",
155
+ "active:ring-primary-950",
156
+ "active:ring-offset-0",
157
+ "active:shadow-none",
158
+ "disabled:opacity-50",
159
+ "disabled:cursor-not-allowed"
160
+ ];
161
+ const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
162
+ const allClasses = [...baseClasses, ...stateClasses].join(" ");
163
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
164
+ "button",
165
+ {
166
+ ref,
167
+ type: "button",
168
+ className: `${allClasses} ${className}`,
169
+ disabled,
170
+ "aria-pressed": selected,
171
+ ...props,
172
+ children: [
173
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
174
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: label })
175
+ ]
176
+ }
177
+ );
178
+ }
179
+ );
180
+ SelectionButton.displayName = "SelectionButton";
181
+
182
+ // src/components/Text/Text.tsx
183
+ var import_jsx_runtime4 = require("react/jsx-runtime");
87
184
  var Text = ({
88
185
  children,
89
186
  size = "md",
@@ -128,7 +225,7 @@ var Text = ({
128
225
  colorClasses = colorClassMap[color] ?? colorClassMap.black;
129
226
  const baseClasses = "font-primary";
130
227
  const Component = as ?? "p";
131
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
228
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
132
229
  Component,
133
230
  {
134
231
  className: `${baseClasses} ${sizeClasses} ${weightClasses} ${colorClasses} ${className}`,
@@ -140,5 +237,7 @@ var Text = ({
140
237
  // Annotate the CommonJS export names for ESM import in node:
141
238
  0 && (module.exports = {
142
239
  Button,
240
+ IconRoundedButton,
241
+ SelectionButton,
143
242
  Text
144
243
  });
package/dist/index.mjs CHANGED
@@ -55,8 +55,103 @@ 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(
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
+ // src/components/Text/Text.tsx
154
+ import { jsx as jsx4 } from "react/jsx-runtime";
60
155
  var Text = ({
61
156
  children,
62
157
  size = "md",
@@ -101,7 +196,7 @@ var Text = ({
101
196
  colorClasses = colorClassMap[color] ?? colorClassMap.black;
102
197
  const baseClasses = "font-primary";
103
198
  const Component = as ?? "p";
104
- return /* @__PURE__ */ jsx2(
199
+ return /* @__PURE__ */ jsx4(
105
200
  Component,
106
201
  {
107
202
  className: `${baseClasses} ${sizeClasses} ${weightClasses} ${colorClasses} ${className}`,
@@ -112,5 +207,7 @@ var Text = ({
112
207
  };
113
208
  export {
114
209
  Button,
210
+ IconRoundedButton,
211
+ SelectionButton,
115
212
  Text
116
213
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analytica-frontend-lib",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
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",