analytica-frontend-lib 1.0.34 → 1.0.36

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.d.ts CHANGED
@@ -8,71 +8,17 @@ export { default as NavButton } from './NavButton/index.js';
8
8
  export { default as SelectionButton } from './SelectionButton/index.js';
9
9
  export { default as Table } from './Table/index.js';
10
10
  export { default as CheckBox } from './CheckBox/index.js';
11
- import * as react from 'react';
12
- import { ReactNode, InputHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes } from 'react';
11
+ export { default as Radio } from './Radio/index.js';
13
12
  export { default as TextArea } from './TextArea/index.js';
14
13
  export { default as Toast } from './Toast/index.js';
15
14
  export { default as Toaster } from './Toast/Toaster/index.js';
16
15
  import * as react_jsx_runtime from 'react/jsx-runtime';
16
+ import * as react from 'react';
17
+ import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes } from 'react';
17
18
  export { default as useToastStore } from './Toast/ToastStore/index.js';
18
- export { default as DropdownMenu, MenuContent as DropdownMenuContent, MenuItem as DropdownMenuItem, MenuLabel as DropdownMenuLabel, MenuSeparator as DropdownMenuSeparator, DropdownMenuTrigger } from './DropdownMenu/index.js';
19
- import 'zustand';
20
-
21
- /**
22
- * Radio size variants
23
- */
24
- type RadioSize = 'small' | 'medium' | 'large' | 'extraLarge';
25
- /**
26
- * Radio visual state
27
- */
28
- type RadioState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
29
- /**
30
- * Radio component for Analytica Ensino platforms
31
- *
32
- * A radio button component with essential states, sizes and themes.
33
- * Uses the Analytica Ensino Design System colors from styles.css with automatic
34
- * light/dark mode support. Includes Text component integration for consistent typography.
35
- *
36
- * @example
37
- * ```tsx
38
- * // Basic radio
39
- * <Radio name="option" value="1" label="Option 1" />
40
- *
41
- * // Small size
42
- * <Radio size="small" name="option" value="2" label="Small option" />
43
- *
44
- * // Invalid state
45
- * <Radio state="invalid" name="option" value="3" label="Required field" />
46
- *
47
- * // Disabled state
48
- * <Radio disabled name="option" value="4" label="Disabled option" />
49
- *
50
- * // Default checked (uncontrolled)
51
- * <Radio defaultChecked name="option" value="5" label="Initially checked" />
52
- * ```
53
- */
54
- declare const Radio: react.ForwardRefExoticComponent<{
55
- /** Label text to display next to the radio */
56
- label?: ReactNode;
57
- /** Size variant of the radio */
58
- size?: RadioSize;
59
- /** Visual state of the radio */
60
- state?: RadioState;
61
- /** Error message to display */
62
- errorMessage?: string;
63
- /** Helper text to display */
64
- helperText?: string;
65
- /** Additional CSS classes */
66
- className?: string;
67
- /** Label CSS classes */
68
- labelClassName?: string;
69
- /** Radio group name */
70
- name?: string;
71
- /** Radio value */
72
- value?: string;
73
- /** Default checked state for uncontrolled radios */
74
- defaultChecked?: boolean;
75
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "defaultChecked" | "type"> & react.RefAttributes<HTMLInputElement>>;
19
+ export { default as ProgressBar } from './ProgressBar/index.js';
20
+ export { default as DropdownMenu, DropdownMenuTrigger, MenuContent, MenuItem, MenuLabel, MenuSeparator, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.js';
21
+ import { StoreApi } from 'zustand';
76
22
 
77
23
  /**
78
24
  * Divider component props interface
@@ -162,4 +108,46 @@ type ChipsProps = {
162
108
  */
163
109
  declare const Chips: ({ children, selected, className, disabled, type, ...props }: ChipsProps) => react_jsx_runtime.JSX.Element;
164
110
 
165
- export { Chips, Divider, Input, Radio };
111
+ interface SelectStore {
112
+ open: boolean;
113
+ setOpen: (open: boolean) => void;
114
+ value: string;
115
+ setValue: (value: string) => void;
116
+ selectedLabel: ReactNode;
117
+ setSelectedLabel: (label: ReactNode) => void;
118
+ }
119
+ type SelectStoreApi = StoreApi<SelectStore>;
120
+ interface SelectProps {
121
+ children: ReactNode;
122
+ defaultValue?: string;
123
+ value?: string;
124
+ onValueChange?: (value: string) => void;
125
+ size?: 'small' | 'medium' | 'large';
126
+ }
127
+ declare const Select: ({ children, defaultValue, value: propValue, onValueChange, size, }: SelectProps) => react_jsx_runtime.JSX.Element;
128
+ declare const SelectValue: ({ placeholder, store: externalStore, }: {
129
+ placeholder?: string;
130
+ store?: SelectStoreApi;
131
+ }) => react_jsx_runtime.JSX.Element;
132
+ interface SelectTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
133
+ className?: string;
134
+ invalid?: boolean;
135
+ variant?: 'outlined' | 'underlined' | 'rounded';
136
+ store?: SelectStoreApi;
137
+ }
138
+ declare const SelectTrigger: react.ForwardRefExoticComponent<SelectTriggerProps & react.RefAttributes<HTMLButtonElement>>;
139
+ interface SelectContentProps extends HTMLAttributes<HTMLDivElement> {
140
+ className?: string;
141
+ align?: 'start' | 'center' | 'end';
142
+ side?: 'top' | 'right' | 'bottom' | 'left';
143
+ store?: SelectStoreApi;
144
+ }
145
+ declare const SelectContent: react.ForwardRefExoticComponent<SelectContentProps & react.RefAttributes<HTMLDivElement>>;
146
+ interface SelectItemProps extends HTMLAttributes<HTMLDivElement> {
147
+ value: string;
148
+ disabled?: boolean;
149
+ store?: SelectStoreApi;
150
+ }
151
+ declare const SelectItem: react.ForwardRefExoticComponent<SelectItemProps & react.RefAttributes<HTMLDivElement>>;
152
+
153
+ export { Chips, Divider, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue };