analytica-frontend-lib 1.0.45 → 1.0.47
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/Card/index.d.mts +85 -0
- package/dist/Card/index.d.ts +85 -0
- package/dist/Card/index.js +1205 -0
- package/dist/Card/index.js.map +1 -0
- package/dist/Card/index.mjs +1176 -0
- package/dist/Card/index.mjs.map +1 -0
- package/dist/Menu/index.js +3 -0
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs +3 -0
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/Select/index.js +4 -4
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs +4 -4
- package/dist/Select/index.mjs.map +1 -1
- package/dist/Stepper/index.d.mts +169 -0
- package/dist/Stepper/index.d.ts +169 -0
- package/dist/Stepper/index.js +381 -0
- package/dist/Stepper/index.js.map +1 -0
- package/dist/Stepper/index.mjs +354 -0
- package/dist/Stepper/index.mjs.map +1 -0
- package/dist/index.css +429 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +963 -130
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +956 -126
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +429 -0
- package/dist/styles.css.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Stepper size variants
|
|
5
|
+
*/
|
|
6
|
+
type StepperSize = 'small' | 'medium' | 'large' | 'extraLarge';
|
|
7
|
+
/**
|
|
8
|
+
* Step state variants
|
|
9
|
+
*/
|
|
10
|
+
type StepState = 'pending' | 'current' | 'completed';
|
|
11
|
+
/**
|
|
12
|
+
* Individual step data interface
|
|
13
|
+
*/
|
|
14
|
+
interface StepData {
|
|
15
|
+
/** Unique identifier for the step */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Label text for the step */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Current state of the step */
|
|
20
|
+
state: StepState;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Size configurations - Following design system pattern from CSS specifications
|
|
24
|
+
* Small size based on exact CSS: width 58px, height 38px, gap 8px
|
|
25
|
+
*/
|
|
26
|
+
declare const SIZE_CLASSES: {
|
|
27
|
+
readonly small: {
|
|
28
|
+
readonly container: "gap-2";
|
|
29
|
+
readonly stepWidth: "w-[58px]";
|
|
30
|
+
readonly stepHeight: "h-[38px]";
|
|
31
|
+
readonly indicator: "w-5 h-5";
|
|
32
|
+
readonly progressBar: "h-0.5";
|
|
33
|
+
readonly indicatorTextSize: "2xs";
|
|
34
|
+
readonly labelTextSize: "xs";
|
|
35
|
+
readonly iconSize: "w-3 h-3";
|
|
36
|
+
};
|
|
37
|
+
readonly medium: {
|
|
38
|
+
readonly container: "gap-3";
|
|
39
|
+
readonly stepWidth: "w-[110px]";
|
|
40
|
+
readonly stepHeight: "h-[48px]";
|
|
41
|
+
readonly indicator: "w-6 h-6";
|
|
42
|
+
readonly progressBar: "h-0.5";
|
|
43
|
+
readonly indicatorTextSize: "2xs";
|
|
44
|
+
readonly labelTextSize: "xs";
|
|
45
|
+
readonly iconSize: "w-3.5 h-3.5";
|
|
46
|
+
};
|
|
47
|
+
readonly large: {
|
|
48
|
+
readonly container: "gap-4";
|
|
49
|
+
readonly stepWidth: "w-[160px]";
|
|
50
|
+
readonly stepHeight: "h-[58px]";
|
|
51
|
+
readonly indicator: "w-7 h-7";
|
|
52
|
+
readonly progressBar: "h-1";
|
|
53
|
+
readonly indicatorTextSize: "xs";
|
|
54
|
+
readonly labelTextSize: "sm";
|
|
55
|
+
readonly iconSize: "w-4 h-4";
|
|
56
|
+
};
|
|
57
|
+
readonly extraLarge: {
|
|
58
|
+
readonly container: "gap-5";
|
|
59
|
+
readonly stepWidth: "w-[200px]";
|
|
60
|
+
readonly stepHeight: "h-[68px]";
|
|
61
|
+
readonly indicator: "w-8 h-8";
|
|
62
|
+
readonly progressBar: "h-1";
|
|
63
|
+
readonly indicatorTextSize: "xs";
|
|
64
|
+
readonly labelTextSize: "sm";
|
|
65
|
+
readonly iconSize: "w-[18px] h-[18px]";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* State configurations using exact colors from CSS specs
|
|
70
|
+
* pending: #A3A3A3 = text-400 (etapa ainda não iniciada)
|
|
71
|
+
* current: #1C61B2 = primary-800 (etapa atual sendo preenchida) - baseado no CSS fornecido
|
|
72
|
+
* completed: #1C61B2 = primary-800 (etapa concluída)
|
|
73
|
+
* text color: #FEFEFF = text
|
|
74
|
+
*/
|
|
75
|
+
declare const STATE_CLASSES: {
|
|
76
|
+
readonly pending: {
|
|
77
|
+
readonly progressBar: "bg-text-400";
|
|
78
|
+
readonly indicator: "bg-text-400";
|
|
79
|
+
readonly indicatorText: "text-white";
|
|
80
|
+
readonly label: "text-text-400";
|
|
81
|
+
};
|
|
82
|
+
readonly current: {
|
|
83
|
+
readonly progressBar: "bg-primary-800";
|
|
84
|
+
readonly indicator: "bg-primary-800";
|
|
85
|
+
readonly indicatorText: "text-white";
|
|
86
|
+
readonly label: "text-primary-800";
|
|
87
|
+
};
|
|
88
|
+
readonly completed: {
|
|
89
|
+
readonly progressBar: "bg-primary-400";
|
|
90
|
+
readonly indicator: "bg-primary-400";
|
|
91
|
+
readonly indicatorText: "text-white";
|
|
92
|
+
readonly label: "text-primary-400";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Type for size classes
|
|
97
|
+
*/
|
|
98
|
+
type SizeClassType = (typeof SIZE_CLASSES)[keyof typeof SIZE_CLASSES];
|
|
99
|
+
/**
|
|
100
|
+
* Type for state classes
|
|
101
|
+
*/
|
|
102
|
+
type StateClassType = (typeof STATE_CLASSES)[keyof typeof STATE_CLASSES];
|
|
103
|
+
/**
|
|
104
|
+
* Props for individual step component
|
|
105
|
+
*/
|
|
106
|
+
interface StepProps {
|
|
107
|
+
step: StepData;
|
|
108
|
+
index: number;
|
|
109
|
+
size: StepperSize;
|
|
110
|
+
sizeClasses: SizeClassType;
|
|
111
|
+
stateClasses: StateClassType;
|
|
112
|
+
isLast: boolean;
|
|
113
|
+
className?: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Individual Step component - Based on exact design specifications
|
|
117
|
+
* Layout: flex-column with progress bar at top, then icon+label row
|
|
118
|
+
* Fully responsive for mobile, tablets, and laptops
|
|
119
|
+
*/
|
|
120
|
+
declare const Step: ({ step, index, size: _size, sizeClasses, stateClasses, isLast: _isLast, className, }: StepProps) => react_jsx_runtime.JSX.Element;
|
|
121
|
+
/**
|
|
122
|
+
* Stepper component props interface
|
|
123
|
+
*/
|
|
124
|
+
type StepperProps = {
|
|
125
|
+
/** Array of step data */
|
|
126
|
+
steps: StepData[];
|
|
127
|
+
/** Size variant of the stepper */
|
|
128
|
+
size?: StepperSize;
|
|
129
|
+
/** Current active step index */
|
|
130
|
+
currentStep?: number;
|
|
131
|
+
/** Additional CSS classes */
|
|
132
|
+
className?: string;
|
|
133
|
+
/** Step container CSS classes */
|
|
134
|
+
stepClassName?: string;
|
|
135
|
+
/** Progress indicator (e.g., "Etapa 2 de 4") */
|
|
136
|
+
showProgress?: boolean;
|
|
137
|
+
/** Custom progress text */
|
|
138
|
+
progressText?: string;
|
|
139
|
+
/** Make stepper responsive (vertical on mobile) */
|
|
140
|
+
responsive?: boolean;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Stepper component for Analytica Ensino platforms
|
|
144
|
+
*
|
|
145
|
+
* A progress stepper component that displays a sequence of steps with different states.
|
|
146
|
+
* Follows the exact design specifications with proper spacing, colors, and layout.
|
|
147
|
+
* Fully responsive for mobile, tablets, and laptops.
|
|
148
|
+
*
|
|
149
|
+
* Design specifications:
|
|
150
|
+
* - Based on exact CSS specifications from Figma design
|
|
151
|
+
* - Fully responsive: mobile (320px+) -> tablets (640px+) -> laptops (1024px+)
|
|
152
|
+
* - Progressive sizing with responsive breakpoints that adapt to device type
|
|
153
|
+
* - Consistent gaps that scale with screen size and device capabilities
|
|
154
|
+
* - Consistent color scheme: pending (gray), current (dark blue), completed (light blue)
|
|
155
|
+
* - Responsive design with overflow scroll on smaller devices
|
|
156
|
+
* - Optimized text sizing and layout for each device category
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```tsx
|
|
160
|
+
* // Basic stepper - automatically responsive for all devices
|
|
161
|
+
* <Stepper steps={steps} currentStep={1} />
|
|
162
|
+
*
|
|
163
|
+
* // Custom styling with full responsive behavior
|
|
164
|
+
* <Stepper steps={steps} size="medium" showProgress responsive />
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
declare const Stepper: ({ steps: initialSteps, size, currentStep, className, stepClassName, showProgress, progressText, responsive, }: StepperProps) => react_jsx_runtime.JSX.Element;
|
|
168
|
+
|
|
169
|
+
export { Step, type StepData, type StepperProps, Stepper as default };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Stepper size variants
|
|
5
|
+
*/
|
|
6
|
+
type StepperSize = 'small' | 'medium' | 'large' | 'extraLarge';
|
|
7
|
+
/**
|
|
8
|
+
* Step state variants
|
|
9
|
+
*/
|
|
10
|
+
type StepState = 'pending' | 'current' | 'completed';
|
|
11
|
+
/**
|
|
12
|
+
* Individual step data interface
|
|
13
|
+
*/
|
|
14
|
+
interface StepData {
|
|
15
|
+
/** Unique identifier for the step */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Label text for the step */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Current state of the step */
|
|
20
|
+
state: StepState;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Size configurations - Following design system pattern from CSS specifications
|
|
24
|
+
* Small size based on exact CSS: width 58px, height 38px, gap 8px
|
|
25
|
+
*/
|
|
26
|
+
declare const SIZE_CLASSES: {
|
|
27
|
+
readonly small: {
|
|
28
|
+
readonly container: "gap-2";
|
|
29
|
+
readonly stepWidth: "w-[58px]";
|
|
30
|
+
readonly stepHeight: "h-[38px]";
|
|
31
|
+
readonly indicator: "w-5 h-5";
|
|
32
|
+
readonly progressBar: "h-0.5";
|
|
33
|
+
readonly indicatorTextSize: "2xs";
|
|
34
|
+
readonly labelTextSize: "xs";
|
|
35
|
+
readonly iconSize: "w-3 h-3";
|
|
36
|
+
};
|
|
37
|
+
readonly medium: {
|
|
38
|
+
readonly container: "gap-3";
|
|
39
|
+
readonly stepWidth: "w-[110px]";
|
|
40
|
+
readonly stepHeight: "h-[48px]";
|
|
41
|
+
readonly indicator: "w-6 h-6";
|
|
42
|
+
readonly progressBar: "h-0.5";
|
|
43
|
+
readonly indicatorTextSize: "2xs";
|
|
44
|
+
readonly labelTextSize: "xs";
|
|
45
|
+
readonly iconSize: "w-3.5 h-3.5";
|
|
46
|
+
};
|
|
47
|
+
readonly large: {
|
|
48
|
+
readonly container: "gap-4";
|
|
49
|
+
readonly stepWidth: "w-[160px]";
|
|
50
|
+
readonly stepHeight: "h-[58px]";
|
|
51
|
+
readonly indicator: "w-7 h-7";
|
|
52
|
+
readonly progressBar: "h-1";
|
|
53
|
+
readonly indicatorTextSize: "xs";
|
|
54
|
+
readonly labelTextSize: "sm";
|
|
55
|
+
readonly iconSize: "w-4 h-4";
|
|
56
|
+
};
|
|
57
|
+
readonly extraLarge: {
|
|
58
|
+
readonly container: "gap-5";
|
|
59
|
+
readonly stepWidth: "w-[200px]";
|
|
60
|
+
readonly stepHeight: "h-[68px]";
|
|
61
|
+
readonly indicator: "w-8 h-8";
|
|
62
|
+
readonly progressBar: "h-1";
|
|
63
|
+
readonly indicatorTextSize: "xs";
|
|
64
|
+
readonly labelTextSize: "sm";
|
|
65
|
+
readonly iconSize: "w-[18px] h-[18px]";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* State configurations using exact colors from CSS specs
|
|
70
|
+
* pending: #A3A3A3 = text-400 (etapa ainda não iniciada)
|
|
71
|
+
* current: #1C61B2 = primary-800 (etapa atual sendo preenchida) - baseado no CSS fornecido
|
|
72
|
+
* completed: #1C61B2 = primary-800 (etapa concluída)
|
|
73
|
+
* text color: #FEFEFF = text
|
|
74
|
+
*/
|
|
75
|
+
declare const STATE_CLASSES: {
|
|
76
|
+
readonly pending: {
|
|
77
|
+
readonly progressBar: "bg-text-400";
|
|
78
|
+
readonly indicator: "bg-text-400";
|
|
79
|
+
readonly indicatorText: "text-white";
|
|
80
|
+
readonly label: "text-text-400";
|
|
81
|
+
};
|
|
82
|
+
readonly current: {
|
|
83
|
+
readonly progressBar: "bg-primary-800";
|
|
84
|
+
readonly indicator: "bg-primary-800";
|
|
85
|
+
readonly indicatorText: "text-white";
|
|
86
|
+
readonly label: "text-primary-800";
|
|
87
|
+
};
|
|
88
|
+
readonly completed: {
|
|
89
|
+
readonly progressBar: "bg-primary-400";
|
|
90
|
+
readonly indicator: "bg-primary-400";
|
|
91
|
+
readonly indicatorText: "text-white";
|
|
92
|
+
readonly label: "text-primary-400";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Type for size classes
|
|
97
|
+
*/
|
|
98
|
+
type SizeClassType = (typeof SIZE_CLASSES)[keyof typeof SIZE_CLASSES];
|
|
99
|
+
/**
|
|
100
|
+
* Type for state classes
|
|
101
|
+
*/
|
|
102
|
+
type StateClassType = (typeof STATE_CLASSES)[keyof typeof STATE_CLASSES];
|
|
103
|
+
/**
|
|
104
|
+
* Props for individual step component
|
|
105
|
+
*/
|
|
106
|
+
interface StepProps {
|
|
107
|
+
step: StepData;
|
|
108
|
+
index: number;
|
|
109
|
+
size: StepperSize;
|
|
110
|
+
sizeClasses: SizeClassType;
|
|
111
|
+
stateClasses: StateClassType;
|
|
112
|
+
isLast: boolean;
|
|
113
|
+
className?: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Individual Step component - Based on exact design specifications
|
|
117
|
+
* Layout: flex-column with progress bar at top, then icon+label row
|
|
118
|
+
* Fully responsive for mobile, tablets, and laptops
|
|
119
|
+
*/
|
|
120
|
+
declare const Step: ({ step, index, size: _size, sizeClasses, stateClasses, isLast: _isLast, className, }: StepProps) => react_jsx_runtime.JSX.Element;
|
|
121
|
+
/**
|
|
122
|
+
* Stepper component props interface
|
|
123
|
+
*/
|
|
124
|
+
type StepperProps = {
|
|
125
|
+
/** Array of step data */
|
|
126
|
+
steps: StepData[];
|
|
127
|
+
/** Size variant of the stepper */
|
|
128
|
+
size?: StepperSize;
|
|
129
|
+
/** Current active step index */
|
|
130
|
+
currentStep?: number;
|
|
131
|
+
/** Additional CSS classes */
|
|
132
|
+
className?: string;
|
|
133
|
+
/** Step container CSS classes */
|
|
134
|
+
stepClassName?: string;
|
|
135
|
+
/** Progress indicator (e.g., "Etapa 2 de 4") */
|
|
136
|
+
showProgress?: boolean;
|
|
137
|
+
/** Custom progress text */
|
|
138
|
+
progressText?: string;
|
|
139
|
+
/** Make stepper responsive (vertical on mobile) */
|
|
140
|
+
responsive?: boolean;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Stepper component for Analytica Ensino platforms
|
|
144
|
+
*
|
|
145
|
+
* A progress stepper component that displays a sequence of steps with different states.
|
|
146
|
+
* Follows the exact design specifications with proper spacing, colors, and layout.
|
|
147
|
+
* Fully responsive for mobile, tablets, and laptops.
|
|
148
|
+
*
|
|
149
|
+
* Design specifications:
|
|
150
|
+
* - Based on exact CSS specifications from Figma design
|
|
151
|
+
* - Fully responsive: mobile (320px+) -> tablets (640px+) -> laptops (1024px+)
|
|
152
|
+
* - Progressive sizing with responsive breakpoints that adapt to device type
|
|
153
|
+
* - Consistent gaps that scale with screen size and device capabilities
|
|
154
|
+
* - Consistent color scheme: pending (gray), current (dark blue), completed (light blue)
|
|
155
|
+
* - Responsive design with overflow scroll on smaller devices
|
|
156
|
+
* - Optimized text sizing and layout for each device category
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```tsx
|
|
160
|
+
* // Basic stepper - automatically responsive for all devices
|
|
161
|
+
* <Stepper steps={steps} currentStep={1} />
|
|
162
|
+
*
|
|
163
|
+
* // Custom styling with full responsive behavior
|
|
164
|
+
* <Stepper steps={steps} size="medium" showProgress responsive />
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
declare const Stepper: ({ steps: initialSteps, size, currentStep, className, stepClassName, showProgress, progressText, responsive, }: StepperProps) => react_jsx_runtime.JSX.Element;
|
|
168
|
+
|
|
169
|
+
export { Step, type StepData, type StepperProps, Stepper as default };
|