analytica-frontend-lib 1.0.8 → 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 +87 -2
- package/dist/index.d.mts +82 -1
- package/dist/index.d.ts +82 -1
- package/dist/index.js +96 -2
- package/dist/index.mjs +94 -2
- package/package.json +1 -1
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,6 +368,9 @@
|
|
|
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;
|
|
@@ -356,6 +378,9 @@
|
|
|
356
378
|
.border-background-200 {
|
|
357
379
|
border-color: var(--color-background-200);
|
|
358
380
|
}
|
|
381
|
+
.border-border-50 {
|
|
382
|
+
border-color: var(--color-border-50);
|
|
383
|
+
}
|
|
359
384
|
.border-error-300 {
|
|
360
385
|
border-color: var(--color-error-300);
|
|
361
386
|
}
|
|
@@ -516,6 +541,15 @@
|
|
|
516
541
|
.text-text-950 {
|
|
517
542
|
color: var(--color-text-950);
|
|
518
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
|
+
}
|
|
519
553
|
.outline {
|
|
520
554
|
outline-style: var(--tw-outline-style);
|
|
521
555
|
outline-width: 1px;
|
|
@@ -569,6 +603,13 @@
|
|
|
569
603
|
}
|
|
570
604
|
}
|
|
571
605
|
}
|
|
606
|
+
.hover\:bg-background-100 {
|
|
607
|
+
&:hover {
|
|
608
|
+
@media (hover: hover) {
|
|
609
|
+
background-color: var(--color-background-100);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
572
613
|
.hover\:bg-error-600 {
|
|
573
614
|
&:hover {
|
|
574
615
|
@media (hover: hover) {
|
|
@@ -671,6 +712,17 @@
|
|
|
671
712
|
var(--tw-shadow);
|
|
672
713
|
}
|
|
673
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
|
+
}
|
|
674
726
|
.focus-visible\:ring-2 {
|
|
675
727
|
&:focus-visible {
|
|
676
728
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
@@ -744,6 +796,39 @@
|
|
|
744
796
|
color: var(--color-success-700);
|
|
745
797
|
}
|
|
746
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
|
+
}
|
|
747
832
|
.disabled\:cursor-not-allowed {
|
|
748
833
|
&:disabled {
|
|
749
834
|
cursor: not-allowed;
|
|
@@ -1117,7 +1202,6 @@
|
|
|
1117
1202
|
@property --tw-skew-y { syntax: "*"; inherits: false; }
|
|
1118
1203
|
@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }
|
|
1119
1204
|
@property --tw-font-weight { syntax: "*"; inherits: false; }
|
|
1120
|
-
@property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
|
|
1121
1205
|
@property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
1122
1206
|
@property --tw-shadow-color { syntax: "*"; inherits: false; }
|
|
1123
1207
|
@property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
|
|
@@ -1132,6 +1216,7 @@
|
|
|
1132
1216
|
@property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }
|
|
1133
1217
|
@property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }
|
|
1134
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; }
|
|
1135
1220
|
@layer properties {
|
|
1136
1221
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
1137
1222
|
*,
|
|
@@ -1145,7 +1230,6 @@
|
|
|
1145
1230
|
--tw-skew-y: initial;
|
|
1146
1231
|
--tw-border-style: solid;
|
|
1147
1232
|
--tw-font-weight: initial;
|
|
1148
|
-
--tw-outline-style: solid;
|
|
1149
1233
|
--tw-shadow: 0 0 #0000;
|
|
1150
1234
|
--tw-shadow-color: initial;
|
|
1151
1235
|
--tw-shadow-alpha: 100%;
|
|
@@ -1160,6 +1244,7 @@
|
|
|
1160
1244
|
--tw-ring-offset-width: 0px;
|
|
1161
1245
|
--tw-ring-offset-color: #fff;
|
|
1162
1246
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1247
|
+
--tw-outline-style: solid;
|
|
1163
1248
|
}
|
|
1164
1249
|
}
|
|
1165
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);
|
|
@@ -82,8 +84,98 @@ var Button = ({
|
|
|
82
84
|
);
|
|
83
85
|
};
|
|
84
86
|
|
|
85
|
-
// src/components/
|
|
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,
|
|
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
|
@@ -55,8 +55,98 @@ var Button = ({
|
|
|
55
55
|
);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
// src/components/
|
|
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__ */
|
|
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