@justin_evo/evo-ui 1.0.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 (110) hide show
  1. package/dist/Alert/Alert.d.ts +11 -0
  2. package/dist/AutoComplete/AutoComplete.d.ts +95 -0
  3. package/dist/Badge/Badge.d.ts +23 -0
  4. package/dist/Breadcrumb/Breadcrumb.d.ts +16 -0
  5. package/dist/Button/Button.d.ts +54 -0
  6. package/dist/Card/Card.d.ts +60 -0
  7. package/dist/Checkbox/Checkbox.d.ts +16 -0
  8. package/dist/CommandPalette/CommandPalette.d.ts +17 -0
  9. package/dist/Container/Container.d.ts +10 -0
  10. package/dist/Divider/Divider.d.ts +7 -0
  11. package/dist/Form/Form.d.ts +61 -0
  12. package/dist/Grid/Grid.d.ts +23 -0
  13. package/dist/ImageCropper/ImageCropper.d.ts +111 -0
  14. package/dist/Input/Input.d.ts +12 -0
  15. package/dist/Modal/Modal.d.ts +26 -0
  16. package/dist/Nav/Nav.d.ts +63 -0
  17. package/dist/Notification/Notification.d.ts +186 -0
  18. package/dist/Pagination/Pagination.d.ts +10 -0
  19. package/dist/Radio/Radio.d.ts +20 -0
  20. package/dist/RichTextArea/RichTextArea.d.ts +70 -0
  21. package/dist/Select/Select.d.ts +44 -0
  22. package/dist/Skeleton/Skeleton.d.ts +23 -0
  23. package/dist/Stack/Stack.d.ts +16 -0
  24. package/dist/Table/Table.d.ts +77 -0
  25. package/dist/Tabs/Tabs.d.ts +28 -0
  26. package/dist/Theme/ThemeProvider.d.ts +96 -0
  27. package/dist/Theme/ThemeToggle.d.ts +22 -0
  28. package/dist/Toggle/Toggle.d.ts +11 -0
  29. package/dist/Tooltip/Tooltip.d.ts +10 -0
  30. package/dist/TopNav/TopNav.d.ts +76 -0
  31. package/dist/TreeSelect/TreeSelect.d.ts +50 -0
  32. package/dist/declarations.d.ts +6 -0
  33. package/dist/evo-ui.css +1 -0
  34. package/dist/index.cjs.js +1 -0
  35. package/dist/index.d.ts +31 -0
  36. package/dist/index.es.js +5688 -0
  37. package/package.json +52 -0
  38. package/src/Alert/Alert.tsx +49 -0
  39. package/src/AutoComplete/AutoComplete.tsx +810 -0
  40. package/src/Badge/Badge.tsx +53 -0
  41. package/src/Breadcrumb/Breadcrumb.tsx +53 -0
  42. package/src/Button/Button.tsx +125 -0
  43. package/src/Card/Card.tsx +257 -0
  44. package/src/Checkbox/Checkbox.tsx +59 -0
  45. package/src/CommandPalette/CommandPalette.tsx +185 -0
  46. package/src/Container/Container.tsx +31 -0
  47. package/src/Divider/Divider.tsx +31 -0
  48. package/src/Form/Form.tsx +185 -0
  49. package/src/Grid/Grid.tsx +66 -0
  50. package/src/ImageCropper/ImageCropper.tsx +911 -0
  51. package/src/Input/Input.tsx +74 -0
  52. package/src/Modal/Modal.tsx +77 -0
  53. package/src/Nav/Nav.tsx +626 -0
  54. package/src/Notification/Notification.tsx +1503 -0
  55. package/src/Pagination/Pagination.tsx +76 -0
  56. package/src/Radio/Radio.tsx +69 -0
  57. package/src/RichTextArea/RichTextArea.tsx +869 -0
  58. package/src/Select/Select.tsx +515 -0
  59. package/src/Skeleton/Skeleton.tsx +70 -0
  60. package/src/Stack/Stack.tsx +52 -0
  61. package/src/Table/Table.tsx +335 -0
  62. package/src/Tabs/Tabs.tsx +90 -0
  63. package/src/Theme/ThemeProvider.tsx +253 -0
  64. package/src/Theme/ThemeToggle.tsx +79 -0
  65. package/src/Toggle/Toggle.tsx +48 -0
  66. package/src/Tooltip/Tooltip.tsx +38 -0
  67. package/src/TopNav/TopNav.tsx +994 -0
  68. package/src/TreeSelect/TreeSelect.tsx +825 -0
  69. package/src/css/alert.module.scss +93 -0
  70. package/src/css/autocomplete.module.scss +416 -0
  71. package/src/css/badge.module.scss +82 -0
  72. package/src/css/base/_color.scss +159 -0
  73. package/src/css/base/_theme.scss +237 -0
  74. package/src/css/base/_variables.scss +161 -0
  75. package/src/css/breadcrumb.module.scss +50 -0
  76. package/src/css/button.module.scss +385 -0
  77. package/src/css/card.module.scss +217 -0
  78. package/src/css/checkbox.module.scss +120 -0
  79. package/src/css/commandpalette.module.scss +211 -0
  80. package/src/css/container.module.scss +18 -0
  81. package/src/css/divider.module.scss +41 -0
  82. package/src/css/form.module.scss +245 -0
  83. package/src/css/imagecropper.module.scss +397 -0
  84. package/src/css/input.module.scss +89 -0
  85. package/src/css/modal.module.scss +105 -0
  86. package/src/css/nav.module.scss +339 -0
  87. package/src/css/notification.module.scss +691 -0
  88. package/src/css/pagination.module.scss +63 -0
  89. package/src/css/radio.module.scss +89 -0
  90. package/src/css/richtextarea.module.scss +307 -0
  91. package/src/css/select.module.scss +525 -0
  92. package/src/css/skeleton.module.scss +30 -0
  93. package/src/css/table.module.scss +386 -0
  94. package/src/css/tabs.module.scss +63 -0
  95. package/src/css/theme-toggle.module.scss +83 -0
  96. package/src/css/toggle.module.scss +54 -0
  97. package/src/css/tooltip.module.scss +97 -0
  98. package/src/css/topnav.module.scss +396 -0
  99. package/src/css/treeselect.module.scss +558 -0
  100. package/src/css/utilities/_borders.scss +111 -0
  101. package/src/css/utilities/_colors.scss +66 -0
  102. package/src/css/utilities/_effects.scss +216 -0
  103. package/src/css/utilities/_layout.scss +181 -0
  104. package/src/css/utilities/_position.scss +75 -0
  105. package/src/css/utilities/_sizing.scss +138 -0
  106. package/src/css/utilities/_spacing.scss +99 -0
  107. package/src/css/utilities/_typography.scss +121 -0
  108. package/src/css/utilities/index.scss +24 -0
  109. package/src/declarations.d.ts +6 -0
  110. package/src/index.ts +60 -0
@@ -0,0 +1,339 @@
1
+ @use 'base/variables' as *;
2
+ @use 'base/color' as *;
3
+
4
+ // ==========================================================
5
+ // EvoNav — compose-based sidebar / drawer.
6
+ // ----------------------------------------------------------
7
+ // Layout layers:
8
+ // .navContainer — the <nav> landmark
9
+ // .navList — top-level <ul>
10
+ // .navSubList — nested <ul> (uses --evo-nav-indent on rows)
11
+ // .navRow — shared row (button or anchor)
12
+ // .navGroup — group with heading
13
+ //
14
+ // Responsive:
15
+ // .navDesktop — inline sidebar (>= breakpoint)
16
+ // .navMobile — off-canvas drawer (< breakpoint, default 768)
17
+ //
18
+ // Tokens only — no raw hex. Touch targets stay >= 44px on mobile via
19
+ // rem-based `min-height` on rows.
20
+ // ==========================================================
21
+
22
+ .navContainer {
23
+ width: 100%;
24
+ font-family: $font-sans;
25
+ color: $color-text-secondary;
26
+ }
27
+
28
+ .navList {
29
+ list-style: none;
30
+ margin: 0;
31
+ padding: 0;
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 0.125rem;
35
+ }
36
+
37
+ .navLi {
38
+ list-style: none;
39
+ }
40
+
41
+ // ---------- Row (button or anchor) ----------
42
+
43
+ .navRow {
44
+ // Stretch the click area across the row, no matter button-vs-anchor.
45
+ display: flex;
46
+ align-items: center;
47
+ gap: 0.625rem;
48
+ width: 100%;
49
+ padding: 0.5rem 0.75rem;
50
+ padding-left: calc(0.75rem + var(--evo-nav-indent, 0rem));
51
+ min-height: 2.25rem;
52
+ font-family: inherit;
53
+ font-size: $text-sm;
54
+ font-weight: 500;
55
+ line-height: 1.4;
56
+ color: $color-text-secondary;
57
+ background: transparent;
58
+ border: none;
59
+ border-radius: $radius-sm;
60
+ cursor: pointer;
61
+ text-align: left;
62
+ text-decoration: none;
63
+ transition:
64
+ background-color $transition-fast,
65
+ color $transition-fast;
66
+ position: relative;
67
+ // Ensure the focus outline isn't clipped by sibling rows.
68
+ outline-offset: 2px;
69
+
70
+ &:hover {
71
+ background-color: $color-surface-hover;
72
+ color: $color-text-primary;
73
+ }
74
+
75
+ &:focus-visible {
76
+ outline: $evo-btn-outline-width solid $evo-primary-focus;
77
+ outline-offset: $evo-btn-outline-offset;
78
+ }
79
+
80
+ &.active {
81
+ background-color: $evo-primary-soft;
82
+ color: $evo-primary-color;
83
+
84
+ &::before {
85
+ content: '';
86
+ position: absolute;
87
+ left: 0;
88
+ top: 25%;
89
+ bottom: 25%;
90
+ width: 2px;
91
+ border-radius: $radius-full;
92
+ background: $evo-primary-color;
93
+ }
94
+ }
95
+
96
+ &.disabled,
97
+ &[aria-disabled='true'] {
98
+ opacity: $evo-btn-disabled-opacity;
99
+ cursor: not-allowed;
100
+ pointer-events: none;
101
+ }
102
+ }
103
+
104
+ .navRowTop {
105
+ font-weight: 500;
106
+ }
107
+
108
+ .navRowSub {
109
+ font-weight: 400;
110
+ font-size: $text-sm;
111
+ // Tighter density for nested rows.
112
+ min-height: 2rem;
113
+ padding-top: 0.375rem;
114
+ padding-bottom: 0.375rem;
115
+ }
116
+
117
+ .navLabel {
118
+ flex: 1;
119
+ text-align: left;
120
+ min-width: 0;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ }
125
+
126
+ .navIcon {
127
+ display: inline-flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ flex-shrink: 0;
131
+ width: 1.125rem;
132
+ height: 1.125rem;
133
+ font-size: 1rem;
134
+ line-height: 1;
135
+ }
136
+
137
+ .chevron {
138
+ flex-shrink: 0;
139
+ color: $color-text-muted;
140
+ transition: transform $transition-fast;
141
+
142
+ &.chevronOpen {
143
+ transform: rotate(90deg);
144
+ }
145
+ }
146
+
147
+ .navSubList {
148
+ list-style: none;
149
+ margin: 0.125rem 0 0;
150
+ padding: 0;
151
+ display: flex;
152
+ flex-direction: column;
153
+ gap: 0.125rem;
154
+
155
+ &[hidden] {
156
+ display: none;
157
+ }
158
+ }
159
+
160
+ // ---------- Group ----------
161
+
162
+ .navGroup {
163
+ list-style: none;
164
+ margin: 0.5rem 0 0;
165
+ padding: 0;
166
+ }
167
+
168
+ .navGroupLabel {
169
+ display: block;
170
+ font-size: $text-xs;
171
+ font-weight: 600;
172
+ text-transform: uppercase;
173
+ letter-spacing: 0.06em;
174
+ color: $color-text-muted;
175
+ padding: 0.5rem 0.75rem 0.25rem;
176
+ }
177
+
178
+ // ---------- Skeleton ----------
179
+
180
+ .navSkeletonItem {
181
+ display: flex;
182
+ align-items: center;
183
+ gap: 0.625rem;
184
+ padding: 0.5rem 0.75rem;
185
+ }
186
+
187
+ .navSkeletonIcon {
188
+ width: 1.125rem;
189
+ height: 1.125rem;
190
+ border-radius: $radius-sm;
191
+ background: $color-skeleton-base;
192
+ flex-shrink: 0;
193
+ animation: navShimmer 1.6s ease-in-out infinite;
194
+ }
195
+
196
+ .navSkeletonText {
197
+ height: 0.6875rem;
198
+ border-radius: $radius-sm;
199
+ background: $color-skeleton-base;
200
+ animation: navShimmer 1.6s ease-in-out infinite;
201
+ animation-delay: 0.1s;
202
+ }
203
+
204
+ @keyframes navShimmer {
205
+ 0%, 100% { opacity: 0.4; }
206
+ 50% { opacity: 0.9; }
207
+ }
208
+
209
+ // ---------- Quick action ----------
210
+
211
+ .navQuickAction {
212
+ display: flex;
213
+ align-items: center;
214
+ gap: 0.625rem;
215
+ width: 100%;
216
+ padding: 0.5rem 0.75rem;
217
+ min-height: 2.25rem;
218
+ font-family: inherit;
219
+ font-size: $text-sm;
220
+ font-weight: 500;
221
+ color: $evo-primary-color;
222
+ background: $evo-primary-soft;
223
+ border: 1px dashed color-mix(in srgb, $evo-primary-color 35%, transparent);
224
+ border-radius: $radius-sm;
225
+ cursor: pointer;
226
+ transition:
227
+ background-color $transition-fast,
228
+ border-color $transition-fast;
229
+
230
+ &:hover {
231
+ background: color-mix(in srgb, $evo-primary-color 15%, transparent);
232
+ border-color: color-mix(in srgb, $evo-primary-color 55%, transparent);
233
+ }
234
+
235
+ &:active {
236
+ background: color-mix(in srgb, $evo-primary-color 22%, transparent);
237
+ }
238
+
239
+ &:focus-visible {
240
+ outline: $evo-btn-outline-width solid $evo-primary-focus;
241
+ outline-offset: $evo-btn-outline-offset;
242
+ }
243
+ }
244
+
245
+ // ---------- Responsive: hamburger + drawer ----------
246
+
247
+ .navTrigger {
248
+ display: inline-flex;
249
+ align-items: center;
250
+ justify-content: center;
251
+ width: 2.75rem;
252
+ height: 2.75rem;
253
+ padding: 0;
254
+ background: transparent;
255
+ border: 1px solid $color-border;
256
+ border-radius: $radius-sm;
257
+ color: $color-text-primary;
258
+ cursor: pointer;
259
+ transition:
260
+ background-color $transition-fast,
261
+ border-color $transition-fast;
262
+
263
+ &:hover {
264
+ background-color: $color-surface-hover;
265
+ border-color: $color-border-strong;
266
+ }
267
+
268
+ &:focus-visible {
269
+ outline: $evo-btn-outline-width solid $evo-primary-focus;
270
+ outline-offset: $evo-btn-outline-offset;
271
+ }
272
+ }
273
+
274
+ .navBackdrop {
275
+ position: fixed;
276
+ inset: 0;
277
+ background: $color-backdrop;
278
+ z-index: 60;
279
+ animation: navFadeIn $transition-fast;
280
+ }
281
+
282
+ // Desktop default — nav renders inline as a sidebar.
283
+ .navDesktop {
284
+ position: relative;
285
+ }
286
+
287
+ // Mobile default — nav lives off-canvas. The trigger sits next to it
288
+ // (rendered by the root before the <nav>); the drawer slides in when
289
+ // `aria-hidden` is not set.
290
+ .navMobile {
291
+ position: fixed;
292
+ top: 0;
293
+ left: 0;
294
+ bottom: 0;
295
+ width: min(280px, 85vw);
296
+ padding: 1rem 0.75rem;
297
+ background: $color-surface-elevated;
298
+ border-right: 1px solid $color-border;
299
+ box-shadow: $shadow-lg;
300
+ z-index: 70;
301
+ transform: translateX(-100%);
302
+ transition: transform $transition-normal;
303
+ // Always allow scrolling inside the drawer; touch-action keeps native
304
+ // scroll smooth on mobile.
305
+ overflow-y: auto;
306
+ touch-action: pan-y;
307
+
308
+ // Slightly larger touch targets inside the drawer.
309
+ .navRow,
310
+ .navQuickAction {
311
+ min-height: 2.75rem;
312
+ }
313
+ }
314
+
315
+ .navMobile.navDrawerOpen {
316
+ transform: translateX(0);
317
+ }
318
+
319
+ @keyframes navFadeIn {
320
+ from { opacity: 0; }
321
+ to { opacity: 1; }
322
+ }
323
+
324
+ // ---------- Reduced motion ----------
325
+
326
+ @media (prefers-reduced-motion: reduce) {
327
+ .navRow,
328
+ .navQuickAction,
329
+ .chevron,
330
+ .navTrigger,
331
+ .navMobile {
332
+ transition: none;
333
+ }
334
+ .navSkeletonIcon,
335
+ .navSkeletonText,
336
+ .navBackdrop {
337
+ animation-duration: 0.001ms;
338
+ }
339
+ }