@justin_evo/evo-ui 1.1.0 → 1.2.1

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.
Files changed (80) hide show
  1. package/README.md +3 -3
  2. package/dist/TopNav/TopNav.d.ts +19 -0
  3. package/dist/declarations.d.ts +6 -6
  4. package/dist/evo-ui.css +1 -1
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.es.js +3301 -3197
  7. package/package.json +52 -52
  8. package/src/Alert/Alert.tsx +49 -49
  9. package/src/AutoComplete/AutoComplete.tsx +810 -810
  10. package/src/Badge/Badge.tsx +53 -53
  11. package/src/Breadcrumb/Breadcrumb.tsx +53 -53
  12. package/src/Button/Button.tsx +125 -125
  13. package/src/Card/Card.tsx +257 -257
  14. package/src/Checkbox/Checkbox.tsx +59 -59
  15. package/src/CommandPalette/CommandPalette.tsx +185 -185
  16. package/src/Container/Container.tsx +31 -31
  17. package/src/Divider/Divider.tsx +31 -31
  18. package/src/Form/Form.tsx +185 -185
  19. package/src/Grid/Grid.tsx +66 -66
  20. package/src/ImageCropper/ImageCropper.tsx +911 -911
  21. package/src/Input/Input.tsx +74 -74
  22. package/src/Modal/Modal.tsx +77 -77
  23. package/src/Nav/Nav.tsx +708 -708
  24. package/src/Notification/Notification.tsx +1503 -1503
  25. package/src/Pagination/Pagination.tsx +76 -76
  26. package/src/Radio/Radio.tsx +69 -69
  27. package/src/RichTextArea/RichTextArea.tsx +886 -869
  28. package/src/Select/Select.tsx +515 -515
  29. package/src/Skeleton/Skeleton.tsx +70 -70
  30. package/src/Stack/Stack.tsx +52 -52
  31. package/src/Table/Table.tsx +335 -335
  32. package/src/Tabs/Tabs.tsx +90 -90
  33. package/src/Theme/ThemeProvider.tsx +253 -253
  34. package/src/Theme/ThemeToggle.tsx +79 -79
  35. package/src/Toggle/Toggle.tsx +48 -48
  36. package/src/Tooltip/Tooltip.tsx +38 -38
  37. package/src/TopNav/TopNav.tsx +1163 -994
  38. package/src/TreeSelect/TreeSelect.tsx +825 -825
  39. package/src/css/alert.module.scss +93 -93
  40. package/src/css/autocomplete.module.scss +416 -416
  41. package/src/css/badge.module.scss +82 -82
  42. package/src/css/base/_color.scss +159 -159
  43. package/src/css/base/_theme.scss +237 -237
  44. package/src/css/base/_variables.scss +161 -161
  45. package/src/css/breadcrumb.module.scss +50 -50
  46. package/src/css/button.module.scss +385 -385
  47. package/src/css/card.module.scss +217 -217
  48. package/src/css/checkbox.module.scss +123 -120
  49. package/src/css/commandpalette.module.scss +211 -211
  50. package/src/css/container.module.scss +18 -18
  51. package/src/css/divider.module.scss +41 -41
  52. package/src/css/form.module.scss +245 -245
  53. package/src/css/imagecropper.module.scss +397 -397
  54. package/src/css/input.module.scss +89 -89
  55. package/src/css/modal.module.scss +105 -105
  56. package/src/css/nav.module.scss +494 -494
  57. package/src/css/notification.module.scss +691 -691
  58. package/src/css/pagination.module.scss +63 -63
  59. package/src/css/radio.module.scss +89 -89
  60. package/src/css/richtextarea.module.scss +307 -307
  61. package/src/css/select.module.scss +525 -525
  62. package/src/css/skeleton.module.scss +30 -30
  63. package/src/css/table.module.scss +386 -386
  64. package/src/css/tabs.module.scss +63 -63
  65. package/src/css/theme-toggle.module.scss +83 -83
  66. package/src/css/toggle.module.scss +54 -54
  67. package/src/css/tooltip.module.scss +97 -97
  68. package/src/css/topnav.module.scss +568 -396
  69. package/src/css/treeselect.module.scss +558 -558
  70. package/src/css/utilities/_borders.scss +111 -111
  71. package/src/css/utilities/_colors.scss +66 -66
  72. package/src/css/utilities/_effects.scss +216 -216
  73. package/src/css/utilities/_layout.scss +181 -181
  74. package/src/css/utilities/_position.scss +75 -75
  75. package/src/css/utilities/_sizing.scss +138 -138
  76. package/src/css/utilities/_spacing.scss +99 -99
  77. package/src/css/utilities/_typography.scss +121 -121
  78. package/src/css/utilities/index.scss +24 -24
  79. package/src/declarations.d.ts +6 -6
  80. package/src/index.ts +60 -60
@@ -1,245 +1,245 @@
1
- @use 'base/variables' as *;
2
- @use 'base/color' as *;
3
-
4
- // ============================================================
5
- // EvoForm — composable, lightweight form primitives.
6
- // Inspired by patterns from shadcn/ui, Radix, Mantine, Tailwind UI,
7
- // Polaris and Ant Design — kept dependency-free and CSS-module only.
8
- // ============================================================
9
-
10
- // ----- Root -----
11
- .form {
12
- display: flex;
13
- flex-direction: column;
14
- gap: 1.25rem;
15
- font-family: $font-sans;
16
- color: $color-text-primary;
17
- width: 100%;
18
- }
19
-
20
- .form_sm { gap: 0.875rem; font-size: $text-xs; }
21
- .form_md { gap: 1.25rem; font-size: $text-sm; }
22
- .form_lg { gap: 1.5rem; font-size: $text-base; }
23
-
24
- .form_vertical {} // default
25
- .form_horizontal {
26
- // Reserved for future horizontal label/control layouts.
27
- // Currently a no-op so the prop is non-breaking.
28
- }
29
-
30
- // ----- Header -----
31
- .header {
32
- display: flex;
33
- flex-direction: column;
34
- gap: 0.375rem;
35
- padding-bottom: 1rem;
36
- border-bottom: 1px solid $color-border;
37
- }
38
-
39
- .headerBadge {
40
- display: inline-flex;
41
- align-self: flex-start;
42
- align-items: center;
43
- padding: 0.125rem 0.5rem;
44
- font-size: $text-xs;
45
- font-weight: 600;
46
- color: $evo-primary-color;
47
- background: color-mix(in srgb, $evo-primary-color 10%, transparent);
48
- border: 1px solid color-mix(in srgb, $evo-primary-color 25%, transparent);
49
- border-radius: $radius-full;
50
- letter-spacing: 0.02em;
51
- }
52
-
53
- .headerTitle {
54
- margin: 0;
55
- font-size: $text-xl;
56
- font-weight: 600;
57
- line-height: 1.3;
58
- color: $color-text-primary;
59
- letter-spacing: -0.01em;
60
- }
61
-
62
- .headerDesc {
63
- margin: 0;
64
- font-size: $text-sm;
65
- line-height: 1.55;
66
- color: $color-text-secondary;
67
- }
68
-
69
- // ----- Section -----
70
- .section {
71
- display: flex;
72
- flex-direction: column;
73
- gap: 0.875rem;
74
-
75
- & + & {
76
- margin-top: 0.5rem;
77
- padding-top: 1.25rem;
78
- border-top: 1px dashed $color-border;
79
- }
80
- }
81
-
82
- .sectionHead {
83
- display: flex;
84
- flex-direction: column;
85
- gap: 0.25rem;
86
- position: relative;
87
- padding-left: 0.625rem;
88
-
89
- &::before {
90
- content: '';
91
- position: absolute;
92
- top: 0.25rem;
93
- bottom: 0.25rem;
94
- left: 0;
95
- width: 2px;
96
- border-radius: $radius-full;
97
- background: linear-gradient(180deg, $evo-primary-color, $evo-primary-active);
98
- opacity: 0.85;
99
- }
100
- }
101
-
102
- .sectionTitle {
103
- margin: 0;
104
- font-size: $text-base;
105
- font-weight: 600;
106
- line-height: 1.3;
107
- color: $color-text-primary;
108
- letter-spacing: -0.005em;
109
- }
110
-
111
- .sectionDesc {
112
- margin: 0;
113
- font-size: $text-xs;
114
- line-height: 1.5;
115
- color: $color-text-secondary;
116
- }
117
-
118
- .sectionBody {
119
- display: flex;
120
- flex-direction: column;
121
- gap: 0.875rem;
122
- }
123
-
124
- // Split layout: title/description on the left, fields on the right.
125
- // Stacks on small screens for a clean responsive collapse.
126
- .section_split {
127
- @media (min-width: 720px) {
128
- display: grid;
129
- grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
130
- gap: 2.5rem;
131
- align-items: start;
132
-
133
- .sectionHead {
134
- padding-left: 0;
135
-
136
- &::before { display: none; }
137
- }
138
- }
139
- }
140
-
141
- .section_stacked {} // default
142
-
143
- // ----- Row (side-by-side fields) -----
144
- .row {
145
- display: flex;
146
- flex-wrap: wrap;
147
-
148
- > * {
149
- flex: 1 1 200px;
150
- min-width: 0;
151
- }
152
- }
153
-
154
- .row_sm { gap: 0.5rem; }
155
- .row_md { gap: 0.875rem; }
156
- .row_lg { gap: 1.25rem; }
157
-
158
- .row_align_start { align-items: flex-start; }
159
- .row_align_center { align-items: center; }
160
- .row_align_end { align-items: flex-end; }
161
-
162
- // ----- Field -----
163
- .field {
164
- display: flex;
165
- flex-direction: column;
166
- gap: 0.375rem;
167
- min-width: 0;
168
- }
169
-
170
- .fieldLabel {
171
- display: inline-flex;
172
- align-items: center;
173
- gap: 0.25rem;
174
- font-size: $text-sm;
175
- font-weight: 500;
176
- line-height: 1.3;
177
- color: $color-text-primary;
178
- }
179
-
180
- .fieldRequired {
181
- color: $evo-danger-color;
182
- font-weight: 600;
183
- line-height: 1;
184
- }
185
-
186
- .fieldControl {
187
- display: flex;
188
- flex-direction: column;
189
- }
190
-
191
- .fieldDesc {
192
- margin: 0;
193
- font-size: $text-xs;
194
- line-height: 1.45;
195
- color: $color-text-muted;
196
- }
197
-
198
- .fieldError {
199
- margin: 0;
200
- font-size: $text-xs;
201
- line-height: 1.45;
202
- color: $evo-danger-color;
203
- display: inline-flex;
204
- align-items: center;
205
- gap: 0.3rem;
206
-
207
- &::before {
208
- content: '';
209
- display: inline-block;
210
- width: 0.35rem;
211
- height: 0.35rem;
212
- border-radius: $radius-full;
213
- background: $evo-danger-color;
214
- flex-shrink: 0;
215
- }
216
- }
217
-
218
- .field_error {
219
- .fieldLabel { color: $color-text-primary; }
220
- }
221
-
222
- // ----- Actions (footer) -----
223
- .actions {
224
- display: flex;
225
- flex-wrap: wrap;
226
- align-items: center;
227
- gap: 0.625rem;
228
- padding-top: 0.5rem;
229
- }
230
-
231
- .actions_divider {
232
- margin-top: 0.5rem;
233
- padding-top: 1.125rem;
234
- border-top: 1px solid $color-border;
235
- }
236
-
237
- .actions_left { justify-content: flex-start; }
238
- .actions_right { justify-content: flex-end; }
239
- .actions_center { justify-content: center; }
240
- .actions_between { justify-content: space-between; }
241
-
242
- // ----- Disabled state (root only — children read context themselves) -----
243
- .form:has(:disabled) {
244
- // visual hint without blocking interaction; child controls handle real disabling
245
- }
1
+ @use 'base/variables' as *;
2
+ @use 'base/color' as *;
3
+
4
+ // ============================================================
5
+ // EvoForm — composable, lightweight form primitives.
6
+ // Inspired by patterns from shadcn/ui, Radix, Mantine, Tailwind UI,
7
+ // Polaris and Ant Design — kept dependency-free and CSS-module only.
8
+ // ============================================================
9
+
10
+ // ----- Root -----
11
+ .form {
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: 1.25rem;
15
+ font-family: $font-sans;
16
+ color: $color-text-primary;
17
+ width: 100%;
18
+ }
19
+
20
+ .form_sm { gap: 0.875rem; font-size: $text-xs; }
21
+ .form_md { gap: 1.25rem; font-size: $text-sm; }
22
+ .form_lg { gap: 1.5rem; font-size: $text-base; }
23
+
24
+ .form_vertical {} // default
25
+ .form_horizontal {
26
+ // Reserved for future horizontal label/control layouts.
27
+ // Currently a no-op so the prop is non-breaking.
28
+ }
29
+
30
+ // ----- Header -----
31
+ .header {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 0.375rem;
35
+ padding-bottom: 1rem;
36
+ border-bottom: 1px solid $color-border;
37
+ }
38
+
39
+ .headerBadge {
40
+ display: inline-flex;
41
+ align-self: flex-start;
42
+ align-items: center;
43
+ padding: 0.125rem 0.5rem;
44
+ font-size: $text-xs;
45
+ font-weight: 600;
46
+ color: $evo-primary-color;
47
+ background: color-mix(in srgb, $evo-primary-color 10%, transparent);
48
+ border: 1px solid color-mix(in srgb, $evo-primary-color 25%, transparent);
49
+ border-radius: $radius-full;
50
+ letter-spacing: 0.02em;
51
+ }
52
+
53
+ .headerTitle {
54
+ margin: 0;
55
+ font-size: $text-xl;
56
+ font-weight: 600;
57
+ line-height: 1.3;
58
+ color: $color-text-primary;
59
+ letter-spacing: -0.01em;
60
+ }
61
+
62
+ .headerDesc {
63
+ margin: 0;
64
+ font-size: $text-sm;
65
+ line-height: 1.55;
66
+ color: $color-text-secondary;
67
+ }
68
+
69
+ // ----- Section -----
70
+ .section {
71
+ display: flex;
72
+ flex-direction: column;
73
+ gap: 0.875rem;
74
+
75
+ & + & {
76
+ margin-top: 0.5rem;
77
+ padding-top: 1.25rem;
78
+ border-top: 1px dashed $color-border;
79
+ }
80
+ }
81
+
82
+ .sectionHead {
83
+ display: flex;
84
+ flex-direction: column;
85
+ gap: 0.25rem;
86
+ position: relative;
87
+ padding-left: 0.625rem;
88
+
89
+ &::before {
90
+ content: '';
91
+ position: absolute;
92
+ top: 0.25rem;
93
+ bottom: 0.25rem;
94
+ left: 0;
95
+ width: 2px;
96
+ border-radius: $radius-full;
97
+ background: linear-gradient(180deg, $evo-primary-color, $evo-primary-active);
98
+ opacity: 0.85;
99
+ }
100
+ }
101
+
102
+ .sectionTitle {
103
+ margin: 0;
104
+ font-size: $text-base;
105
+ font-weight: 600;
106
+ line-height: 1.3;
107
+ color: $color-text-primary;
108
+ letter-spacing: -0.005em;
109
+ }
110
+
111
+ .sectionDesc {
112
+ margin: 0;
113
+ font-size: $text-xs;
114
+ line-height: 1.5;
115
+ color: $color-text-secondary;
116
+ }
117
+
118
+ .sectionBody {
119
+ display: flex;
120
+ flex-direction: column;
121
+ gap: 0.875rem;
122
+ }
123
+
124
+ // Split layout: title/description on the left, fields on the right.
125
+ // Stacks on small screens for a clean responsive collapse.
126
+ .section_split {
127
+ @media (min-width: 720px) {
128
+ display: grid;
129
+ grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
130
+ gap: 2.5rem;
131
+ align-items: start;
132
+
133
+ .sectionHead {
134
+ padding-left: 0;
135
+
136
+ &::before { display: none; }
137
+ }
138
+ }
139
+ }
140
+
141
+ .section_stacked {} // default
142
+
143
+ // ----- Row (side-by-side fields) -----
144
+ .row {
145
+ display: flex;
146
+ flex-wrap: wrap;
147
+
148
+ > * {
149
+ flex: 1 1 200px;
150
+ min-width: 0;
151
+ }
152
+ }
153
+
154
+ .row_sm { gap: 0.5rem; }
155
+ .row_md { gap: 0.875rem; }
156
+ .row_lg { gap: 1.25rem; }
157
+
158
+ .row_align_start { align-items: flex-start; }
159
+ .row_align_center { align-items: center; }
160
+ .row_align_end { align-items: flex-end; }
161
+
162
+ // ----- Field -----
163
+ .field {
164
+ display: flex;
165
+ flex-direction: column;
166
+ gap: 0.375rem;
167
+ min-width: 0;
168
+ }
169
+
170
+ .fieldLabel {
171
+ display: inline-flex;
172
+ align-items: center;
173
+ gap: 0.25rem;
174
+ font-size: $text-sm;
175
+ font-weight: 500;
176
+ line-height: 1.3;
177
+ color: $color-text-primary;
178
+ }
179
+
180
+ .fieldRequired {
181
+ color: $evo-danger-color;
182
+ font-weight: 600;
183
+ line-height: 1;
184
+ }
185
+
186
+ .fieldControl {
187
+ display: flex;
188
+ flex-direction: column;
189
+ }
190
+
191
+ .fieldDesc {
192
+ margin: 0;
193
+ font-size: $text-xs;
194
+ line-height: 1.45;
195
+ color: $color-text-muted;
196
+ }
197
+
198
+ .fieldError {
199
+ margin: 0;
200
+ font-size: $text-xs;
201
+ line-height: 1.45;
202
+ color: $evo-danger-color;
203
+ display: inline-flex;
204
+ align-items: center;
205
+ gap: 0.3rem;
206
+
207
+ &::before {
208
+ content: '';
209
+ display: inline-block;
210
+ width: 0.35rem;
211
+ height: 0.35rem;
212
+ border-radius: $radius-full;
213
+ background: $evo-danger-color;
214
+ flex-shrink: 0;
215
+ }
216
+ }
217
+
218
+ .field_error {
219
+ .fieldLabel { color: $color-text-primary; }
220
+ }
221
+
222
+ // ----- Actions (footer) -----
223
+ .actions {
224
+ display: flex;
225
+ flex-wrap: wrap;
226
+ align-items: center;
227
+ gap: 0.625rem;
228
+ padding-top: 0.5rem;
229
+ }
230
+
231
+ .actions_divider {
232
+ margin-top: 0.5rem;
233
+ padding-top: 1.125rem;
234
+ border-top: 1px solid $color-border;
235
+ }
236
+
237
+ .actions_left { justify-content: flex-start; }
238
+ .actions_right { justify-content: flex-end; }
239
+ .actions_center { justify-content: center; }
240
+ .actions_between { justify-content: space-between; }
241
+
242
+ // ----- Disabled state (root only — children read context themselves) -----
243
+ .form:has(:disabled) {
244
+ // visual hint without blocking interaction; child controls handle real disabling
245
+ }