ui-svelte 0.2.11 → 0.2.12

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 (204) hide show
  1. package/dist/charts/ArcChart.svelte +9 -13
  2. package/dist/charts/ArcChart.svelte.d.ts +3 -3
  3. package/dist/charts/AreaChart.svelte +347 -118
  4. package/dist/charts/AreaChart.svelte.d.ts +33 -4
  5. package/dist/charts/BarChart.svelte +288 -66
  6. package/dist/charts/BarChart.svelte.d.ts +26 -1
  7. package/dist/charts/Candlestick.svelte +53 -50
  8. package/dist/charts/Candlestick.svelte.d.ts +8 -8
  9. package/dist/charts/LineChart.svelte +391 -91
  10. package/dist/charts/LineChart.svelte.d.ts +26 -3
  11. package/dist/charts/PieChart.svelte +333 -92
  12. package/dist/charts/PieChart.svelte.d.ts +33 -5
  13. package/dist/charts/css/arc-chart.css +3 -3
  14. package/dist/charts/css/area-chart.css +127 -29
  15. package/dist/charts/css/bar-chart.css +114 -8
  16. package/dist/charts/css/candlestick.css +2 -0
  17. package/dist/charts/css/line-chart.css +111 -13
  18. package/dist/charts/css/pie-chart.css +92 -20
  19. package/dist/control/Audio.svelte +86 -44
  20. package/dist/control/Audio.svelte.d.ts +4 -1
  21. package/dist/control/Button.svelte +18 -27
  22. package/dist/control/Button.svelte.d.ts +3 -2
  23. package/dist/control/IconButton.svelte +17 -27
  24. package/dist/control/IconButton.svelte.d.ts +3 -3
  25. package/dist/control/Image.svelte +123 -0
  26. package/dist/control/Image.svelte.d.ts +13 -0
  27. package/dist/control/Record.svelte +144 -98
  28. package/dist/control/Record.svelte.d.ts +2 -1
  29. package/dist/control/ToggleGroup.svelte +22 -8
  30. package/dist/control/ToggleGroup.svelte.d.ts +2 -1
  31. package/dist/control/ToggleTheme.svelte +13 -11
  32. package/dist/control/ToggleTheme.svelte.d.ts +3 -2
  33. package/dist/control/Video.svelte +55 -29
  34. package/dist/control/Video.svelte.d.ts +1 -0
  35. package/dist/control/css/btn.css +200 -152
  36. package/dist/control/css/image.css +56 -0
  37. package/dist/control/css/media.css +95 -30
  38. package/dist/control/css/toggle-group.css +269 -84
  39. package/dist/control/css/video.css +1 -14
  40. package/dist/css/animations.css +5 -9
  41. package/dist/css/base.css +13 -347
  42. package/dist/css/decorations.css +402 -0
  43. package/dist/css/rich-text.css +485 -0
  44. package/dist/css/transitions.css +158 -0
  45. package/dist/css/typography.css +291 -0
  46. package/dist/display/Accordion.svelte +28 -4
  47. package/dist/display/Accordion.svelte.d.ts +2 -1
  48. package/dist/display/Alert.svelte +32 -12
  49. package/dist/display/Alert.svelte.d.ts +2 -3
  50. package/dist/display/Avatar.svelte +23 -18
  51. package/dist/display/Avatar.svelte.d.ts +4 -1
  52. package/dist/display/AvatarGroup.svelte +20 -18
  53. package/dist/display/AvatarGroup.svelte.d.ts +6 -3
  54. package/dist/display/Badge.svelte +11 -4
  55. package/dist/display/Badge.svelte.d.ts +2 -1
  56. package/dist/display/Card.svelte +15 -14
  57. package/dist/display/Card.svelte.d.ts +2 -3
  58. package/dist/display/Carousel.svelte +130 -99
  59. package/dist/display/Carousel.svelte.d.ts +6 -4
  60. package/dist/display/ChatBox.svelte +245 -106
  61. package/dist/display/ChatBox.svelte.d.ts +32 -5
  62. package/dist/display/Chip.svelte +31 -17
  63. package/dist/display/Chip.svelte.d.ts +3 -2
  64. package/dist/display/Code.svelte +6 -3
  65. package/dist/display/Code.svelte.d.ts +1 -0
  66. package/dist/display/Collapsible.svelte +30 -4
  67. package/dist/display/Collapsible.svelte.d.ts +2 -1
  68. package/dist/display/Empty.svelte +37 -3
  69. package/dist/display/Empty.svelte.d.ts +3 -0
  70. package/dist/display/Item.svelte +30 -11
  71. package/dist/display/Item.svelte.d.ts +2 -2
  72. package/dist/display/Map.svelte +488 -0
  73. package/dist/display/Map.svelte.d.ts +44 -0
  74. package/dist/display/Section.svelte +14 -12
  75. package/dist/display/Section.svelte.d.ts +2 -3
  76. package/dist/display/Skeleton.svelte +32 -0
  77. package/dist/display/Skeleton.svelte.d.ts +10 -0
  78. package/dist/display/Table.svelte +94 -132
  79. package/dist/display/Table.svelte.d.ts +10 -1
  80. package/dist/display/css/accordion.css +349 -52
  81. package/dist/display/css/alert.css +18 -25
  82. package/dist/display/css/avatar-group.css +38 -75
  83. package/dist/display/css/avatar.css +139 -121
  84. package/dist/display/css/badge.css +50 -27
  85. package/dist/display/css/card.css +51 -71
  86. package/dist/display/css/carousel.css +25 -5
  87. package/dist/display/css/chat-box.css +158 -26
  88. package/dist/display/css/chip.css +142 -68
  89. package/dist/display/css/code.css +2 -6
  90. package/dist/display/css/collapsible.css +349 -45
  91. package/dist/display/css/divider.css +8 -6
  92. package/dist/display/css/empty.css +7 -0
  93. package/dist/display/css/item.css +311 -89
  94. package/dist/display/css/map.css +164 -0
  95. package/dist/display/css/section.css +78 -33
  96. package/dist/display/css/skeleton.css +58 -0
  97. package/dist/display/css/table.css +320 -189
  98. package/dist/form/Checkbox.svelte +11 -5
  99. package/dist/form/Checkbox.svelte.d.ts +2 -1
  100. package/dist/form/ColorField.svelte +543 -0
  101. package/dist/form/ColorField.svelte.d.ts +29 -0
  102. package/dist/form/ComboBox.svelte +24 -9
  103. package/dist/form/ComboBox.svelte.d.ts +2 -2
  104. package/dist/form/CsvField.svelte +62 -136
  105. package/dist/form/CsvField.svelte.d.ts +2 -2
  106. package/dist/form/DateField.svelte +33 -15
  107. package/dist/form/DateField.svelte.d.ts +2 -1
  108. package/dist/form/DateRange.svelte +436 -0
  109. package/dist/form/DateRange.svelte.d.ts +24 -0
  110. package/dist/form/DragDrop.svelte +348 -0
  111. package/dist/form/DragDrop.svelte.d.ts +32 -0
  112. package/dist/form/Dropzone.svelte +28 -8
  113. package/dist/form/Dropzone.svelte.d.ts +2 -2
  114. package/dist/form/Editor.svelte +626 -0
  115. package/dist/form/Editor.svelte.d.ts +50 -0
  116. package/dist/form/ImageCropper.svelte +291 -61
  117. package/dist/form/ImageCropper.svelte.d.ts +15 -1
  118. package/dist/form/{PasswordStrength.svelte → PasswordField.svelte} +58 -24
  119. package/dist/form/{PasswordStrength.svelte.d.ts → PasswordField.svelte.d.ts} +6 -5
  120. package/dist/form/PhoneField.svelte +26 -14
  121. package/dist/form/PhoneField.svelte.d.ts +4 -3
  122. package/dist/form/PinField.svelte +39 -31
  123. package/dist/form/PinField.svelte.d.ts +3 -3
  124. package/dist/form/RadioGroup.svelte +4 -4
  125. package/dist/form/RadioGroup.svelte.d.ts +1 -1
  126. package/dist/form/Select.svelte +20 -19
  127. package/dist/form/Select.svelte.d.ts +2 -2
  128. package/dist/form/Slider.svelte +4 -2
  129. package/dist/form/Slider.svelte.d.ts +1 -0
  130. package/dist/form/TextField.svelte +16 -7
  131. package/dist/form/TextField.svelte.d.ts +2 -2
  132. package/dist/form/Textarea.svelte +15 -6
  133. package/dist/form/Textarea.svelte.d.ts +2 -2
  134. package/dist/form/Toggle.svelte +1 -1
  135. package/dist/form/css/checkbox.css +18 -2
  136. package/dist/form/css/color-field.css +141 -0
  137. package/dist/form/css/control.css +193 -82
  138. package/dist/form/css/csv-field.css +226 -0
  139. package/dist/form/css/date-range.css +122 -0
  140. package/dist/form/css/date.css +24 -2
  141. package/dist/form/css/drag-drop.css +271 -0
  142. package/dist/form/css/dropzone.css +153 -34
  143. package/dist/form/css/editor.css +367 -0
  144. package/dist/form/css/field.css +4 -0
  145. package/dist/form/css/image-cropper.css +223 -22
  146. package/dist/form/css/radio-group.css +1 -1
  147. package/dist/form/css/select.css +2 -2
  148. package/dist/form/css/slider.css +1 -0
  149. package/dist/form/css/textarea.css +178 -75
  150. package/dist/form/css/toggle.css +3 -3
  151. package/dist/hooks/use-table.svelte.d.ts +1 -0
  152. package/dist/hooks/use-table.svelte.js +6 -0
  153. package/dist/icons/index.d.ts +30 -2
  154. package/dist/icons/index.js +32 -4
  155. package/dist/index.css +16 -1
  156. package/dist/index.d.ts +12 -4
  157. package/dist/index.js +11 -3
  158. package/dist/layout/AppBar.svelte +22 -14
  159. package/dist/layout/AppBar.svelte.d.ts +2 -1
  160. package/dist/layout/Footer.svelte +19 -11
  161. package/dist/layout/Footer.svelte.d.ts +2 -1
  162. package/dist/layout/Provider.svelte +27 -4
  163. package/dist/layout/Provider.svelte.d.ts +3 -1
  164. package/dist/layout/css/app-bar.css +63 -66
  165. package/dist/layout/css/footer.css +62 -65
  166. package/dist/navigation/BottomNav.svelte +41 -13
  167. package/dist/navigation/FooterGroup.svelte +1 -1
  168. package/dist/navigation/NavMenu.svelte +47 -23
  169. package/dist/navigation/NavMenu.svelte.d.ts +29 -0
  170. package/dist/navigation/Pagination.svelte +158 -0
  171. package/dist/navigation/Pagination.svelte.d.ts +18 -0
  172. package/dist/navigation/SideNav.svelte +30 -25
  173. package/dist/navigation/SideNav.svelte.d.ts +2 -3
  174. package/dist/navigation/Tabs.svelte +17 -7
  175. package/dist/navigation/Tabs.svelte.d.ts +2 -2
  176. package/dist/navigation/css/bottom-nav.css +279 -257
  177. package/dist/navigation/css/footer-group.css +1 -1
  178. package/dist/navigation/css/footer-nav.css +1 -1
  179. package/dist/navigation/css/nav-menu.css +332 -106
  180. package/dist/navigation/css/pagination.css +74 -0
  181. package/dist/navigation/css/side-nav.css +515 -75
  182. package/dist/navigation/css/tabs.css +246 -52
  183. package/dist/overlay/Command.svelte +340 -0
  184. package/dist/overlay/Command.svelte.d.ts +24 -25
  185. package/dist/overlay/Drawer.svelte +49 -21
  186. package/dist/overlay/Drawer.svelte.d.ts +2 -2
  187. package/dist/overlay/Dropdown.svelte +3 -3
  188. package/dist/overlay/Modal.svelte +51 -16
  189. package/dist/overlay/Modal.svelte.d.ts +3 -3
  190. package/dist/overlay/Toast.svelte +41 -17
  191. package/dist/overlay/Toast.svelte.d.ts +1 -1
  192. package/dist/overlay/Tooltip.svelte +40 -26
  193. package/dist/overlay/Tooltip.svelte.d.ts +2 -2
  194. package/dist/overlay/css/command.css +80 -0
  195. package/dist/overlay/css/drawer.css +63 -24
  196. package/dist/overlay/css/dropdown.css +1 -1
  197. package/dist/overlay/css/hovercard.css +1 -1
  198. package/dist/overlay/css/modal.css +27 -27
  199. package/dist/overlay/css/toast.css +17 -29
  200. package/dist/overlay/css/tooltip.css +83 -66
  201. package/dist/stores/theme.svelte.js +26 -1
  202. package/dist/stores/toast.svelte.d.ts +4 -4
  203. package/dist/stores/toast.svelte.js +2 -2
  204. package/package.json +1 -1
@@ -1,14 +1,217 @@
1
1
  @layer components {
2
- .image-cropper {
3
- @apply flex flex-col gap-4 w-full;
2
+ .image-cropper-wrapper {
3
+ @apply relative inline-flex flex-col items-center gap-2;
4
+ }
5
+
6
+ .image-cropper-avatar {
7
+ @apply relative flex flex-col items-center justify-center;
8
+ @apply border-2 border-dashed cursor-pointer;
9
+ @apply transition-all duration-300;
10
+ @apply overflow-hidden;
11
+ }
12
+
13
+ .image-cropper-avatar.is-circle {
14
+ @apply rounded-full;
15
+ }
16
+
17
+ .image-cropper-avatar:not(.is-circle) {
18
+ @apply rounded-ui;
19
+ }
20
+
21
+ .image-cropper-avatar.is-xs {
22
+ @apply size-12;
23
+ }
24
+
25
+ .image-cropper-avatar.is-sm {
26
+ @apply size-16;
27
+ }
28
+
29
+ .image-cropper-avatar.is-md {
30
+ @apply size-24;
31
+ }
32
+
33
+ .image-cropper-avatar.is-lg {
34
+ @apply size-32;
35
+ }
36
+
37
+ .image-cropper-avatar.is-xl {
38
+ @apply size-40;
39
+ }
40
+
41
+ .image-cropper-avatar.is-soft {
42
+ &.is-primary {
43
+ @apply bg-on-primary/10 text-primary border-primary/30;
44
+ }
45
+ &.is-secondary {
46
+ @apply bg-on-secondary/10 text-secondary border-secondary/30;
47
+ }
48
+ &.is-muted {
49
+ @apply bg-muted/50 text-on-muted border-muted;
50
+ }
51
+ &.is-success {
52
+ @apply bg-on-success/10 text-success border-success/30;
53
+ }
54
+ &.is-info {
55
+ @apply bg-on-info/10 text-info border-info/30;
56
+ }
57
+ &.is-warning {
58
+ @apply bg-on-warning/10 text-warning border-warning/30;
59
+ }
60
+ &.is-danger {
61
+ @apply bg-on-danger/10 text-danger border-danger/30;
62
+ }
63
+ }
64
+
65
+ .image-cropper-avatar.is-outlined {
66
+ @apply bg-transparent;
67
+
68
+ &.is-primary {
69
+ @apply border-primary text-primary;
70
+ }
71
+ &.is-secondary {
72
+ @apply border-secondary text-secondary;
73
+ }
74
+ &.is-muted {
75
+ @apply border-muted text-on-muted;
76
+ }
77
+ &.is-success {
78
+ @apply border-success text-success;
79
+ }
80
+ &.is-info {
81
+ @apply border-info text-info;
82
+ }
83
+ &.is-warning {
84
+ @apply border-warning text-warning;
85
+ }
86
+ &.is-danger {
87
+ @apply border-danger text-danger;
88
+ }
89
+ }
90
+
91
+ .image-cropper-avatar.is-solid {
92
+ &.is-primary {
93
+ @apply bg-primary text-on-primary border-primary;
94
+ }
95
+ &.is-secondary {
96
+ @apply bg-secondary text-on-secondary border-secondary;
97
+ }
98
+ &.is-muted {
99
+ @apply bg-muted text-on-muted border-muted;
100
+ }
101
+ &.is-success {
102
+ @apply bg-success text-on-success border-success;
103
+ }
104
+ &.is-info {
105
+ @apply bg-info text-on-info border-info;
106
+ }
107
+ &.is-warning {
108
+ @apply bg-warning text-on-warning border-warning;
109
+ }
110
+ &.is-danger {
111
+ @apply bg-danger text-on-danger border-danger;
112
+ }
113
+ }
114
+
115
+ .image-cropper-avatar.is-ghost {
116
+ @apply bg-transparent border-transparent;
117
+
118
+ &.is-primary {
119
+ @apply text-primary;
120
+ }
121
+ &.is-secondary {
122
+ @apply text-secondary;
123
+ }
124
+ &.is-muted {
125
+ @apply text-on-muted;
126
+ }
127
+ &.is-success {
128
+ @apply text-success;
129
+ }
130
+ &.is-info {
131
+ @apply text-info;
132
+ }
133
+ &.is-warning {
134
+ @apply text-warning;
135
+ }
136
+ &.is-danger {
137
+ @apply text-danger;
138
+ }
139
+ }
140
+
141
+ .image-cropper-avatar:hover:not(.is-disabled) {
142
+ @apply border-solid;
143
+ @apply scale-105;
144
+ }
145
+
146
+ .image-cropper-avatar.is-disabled {
147
+ @apply opacity-50 cursor-not-allowed;
148
+ }
149
+
150
+ .image-cropper-avatar.is-error {
151
+ @apply border-danger;
152
+ }
153
+
154
+ .image-cropper-icon {
155
+ @apply size-6 opacity-70;
156
+ }
157
+
158
+ .image-cropper-avatar.is-xs .image-cropper-icon,
159
+ .image-cropper-avatar.is-sm .image-cropper-icon {
160
+ @apply size-4;
161
+ }
162
+
163
+ .image-cropper-avatar.is-lg .image-cropper-icon,
164
+ .image-cropper-avatar.is-xl .image-cropper-icon {
165
+ @apply size-8;
166
+ }
167
+
168
+ .image-cropper-placeholder {
169
+ @apply text-xs opacity-70 text-center mt-1;
170
+ }
171
+
172
+ .image-cropper-avatar.is-xs .image-cropper-placeholder,
173
+ .image-cropper-avatar.is-sm .image-cropper-placeholder {
174
+ @apply hidden;
175
+ }
176
+
177
+ .image-cropper-preview {
178
+ @apply absolute inset-0 w-full h-full object-cover;
179
+ }
180
+ .image-cropper-overlay-edit {
181
+ @apply absolute inset-0 flex items-center justify-center;
182
+ @apply bg-black/50 opacity-0 transition-opacity duration-300;
183
+ @apply text-white;
184
+ }
185
+
186
+ .image-cropper-avatar:hover .image-cropper-overlay-edit {
187
+ @apply opacity-100;
188
+ }
189
+
190
+ .image-cropper-actions {
191
+ @apply flex gap-1;
192
+ }
193
+ .image-cropper-modal {
194
+ @apply max-w-2xl w-full;
195
+ }
196
+
197
+ .image-cropper-modal-title {
198
+ @apply text-lg font-semibold;
199
+ }
200
+
201
+ .image-cropper-modal-body {
202
+ @apply flex flex-col gap-4;
203
+ }
204
+
205
+ .image-cropper-modal-footer {
206
+ @apply flex items-center justify-end gap-2;
4
207
  }
5
208
 
6
209
  .image-cropper-container {
7
210
  @apply relative w-full overflow-hidden;
8
211
  @apply bg-muted rounded-ui;
9
212
  @apply flex items-center justify-center;
10
- min-height: 400px;
11
- max-height: 600px;
213
+ min-height: 300px;
214
+ max-height: 500px;
12
215
  }
13
216
 
14
217
  .image-cropper-image {
@@ -17,8 +220,11 @@
17
220
  -webkit-user-drag: none;
18
221
  }
19
222
 
20
- .image-cropper-overlay {
21
- @apply absolute inset-0 pointer-events-none;
223
+ .image-cropper-crop-overlay {
224
+ @apply absolute pointer-events-none;
225
+ top: 50%;
226
+ left: 50%;
227
+ transform: translate(-50%, -50%);
22
228
  }
23
229
 
24
230
  .overlay-top,
@@ -33,7 +239,7 @@
33
239
  }
34
240
 
35
241
  .overlay-bottom {
36
- @apply left-0 right-0 bottom-0;
242
+ @apply left-0 right-0;
37
243
  }
38
244
 
39
245
  .overlay-middle {
@@ -53,17 +259,21 @@
53
259
  @apply absolute pointer-events-auto;
54
260
  @apply border-2 border-primary;
55
261
  @apply cursor-move;
56
- @apply transition-shadow duration-200;
262
+ @apply transition-shadow duration-300;
57
263
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
58
264
  }
59
265
 
266
+ .crop-area.is-circle {
267
+ @apply rounded-full;
268
+ }
269
+
60
270
  .crop-area:hover {
61
271
  @apply border-primary/80;
62
272
  }
63
273
 
64
274
  .crop-grid {
65
275
  @apply absolute inset-0 pointer-events-none;
66
- @apply opacity-0 transition-opacity duration-200;
276
+ @apply opacity-0 transition-opacity duration-300;
67
277
  }
68
278
 
69
279
  .crop-area:hover .crop-grid,
@@ -85,7 +295,7 @@
85
295
 
86
296
  .resize-handle {
87
297
  @apply absolute bg-primary border-2 border-background;
88
- @apply transition-all duration-200;
298
+ @apply transition-all duration-300;
89
299
  @apply opacity-0;
90
300
  @apply z-10;
91
301
  }
@@ -130,26 +340,17 @@
130
340
  @apply scale-125 bg-primary/90;
131
341
  }
132
342
 
133
- .image-cropper-controls {
134
- @apply flex items-center justify-end gap-2;
135
- }
136
-
137
343
  .image-cropper-canvas {
138
344
  @apply hidden;
139
345
  }
140
346
 
141
- /* Responsive */
142
347
  @media (max-width: 640px) {
143
348
  .image-cropper-container {
144
- min-height: 300px;
145
- }
146
-
147
- .image-cropper-controls {
148
- @apply flex-col w-full;
349
+ min-height: 250px;
149
350
  }
150
351
 
151
- .image-cropper-controls .btn {
152
- @apply w-full;
352
+ .image-cropper-modal-footer {
353
+ @apply flex-wrap justify-center;
153
354
  }
154
355
  }
155
356
  }
@@ -8,7 +8,7 @@
8
8
  .radio {
9
9
  @apply relative appearance-none border-2 border-muted rounded-full cursor-pointer;
10
10
  @apply focus:outline-none;
11
- @apply transition-colors duration-200;
11
+ @apply transition-colors duration-300;
12
12
 
13
13
  &.is-primary {
14
14
  @apply checked:border-primary;
@@ -1,7 +1,7 @@
1
1
  @layer components {
2
2
  .select-popover {
3
- @apply max-h-56 flex flex-col gap-2 p-2 my-1 overflow-hidden;
4
- @apply bg-background text-on-background rounded-ui;
3
+ @apply max-h-56 flex flex-col gap-2 p-2 my-1 overflow-hidden w-full;
4
+ @apply bg-background text-on-background rounded-box;
5
5
  @apply invisible opacity-0 transition-opacity duration-300 ease-in-out;
6
6
  @apply shadow shadow-muted;
7
7
  position: fixed;
@@ -1,6 +1,7 @@
1
1
  @layer components {
2
2
  .slider-wrapper {
3
3
  @apply flex flex-col gap-0.5 w-full;
4
+ @apply transition-all duration-300;
4
5
  }
5
6
  .slider-info {
6
7
  @apply flex justify-between items-center text-sm font-medium leading-none;
@@ -7,124 +7,227 @@
7
7
  .textarea-control-label {
8
8
  @apply absolute left-3 top-3;
9
9
  @apply transition-all duration-300;
10
- }
11
10
 
12
- .textarea-control-label.is-active {
13
- @apply text-xs left-3 top-1 translate-y-px!;
11
+ &.is-active {
12
+ @apply text-xs left-3 top-1 translate-y-px!;
13
+ }
14
14
  }
15
15
 
16
- .textarea-control.is-sm {
17
- @apply text-sm py-2;
18
- }
16
+ .textarea-control {
17
+ &.is-sm {
18
+ @apply text-sm py-2;
19
+ }
19
20
 
20
- .textarea-control.is-md {
21
- @apply text-base py-2.5;
22
- }
21
+ &.is-md {
22
+ @apply text-base py-2.5;
23
+ }
23
24
 
24
- .textarea-control.is-lg {
25
- @apply text-xl py-3;
25
+ &.is-lg {
26
+ @apply text-xl py-3;
26
27
 
27
- .textarea-control-label.is-active {
28
- @apply text-sm;
28
+ .textarea-control-label.is-active {
29
+ @apply text-sm;
30
+ }
29
31
  }
30
- }
31
32
 
32
- .textarea-control.is-float.is-sm {
33
- @apply pt-5 pb-2;
34
- }
33
+ &.is-float {
34
+ &.is-sm {
35
+ @apply pt-5 pb-2;
36
+ }
35
37
 
36
- .textarea-control.is-float.is-md {
37
- @apply pt-6 pb-2.5;
38
- }
38
+ &.is-md {
39
+ @apply pt-6 pb-2.5;
40
+ }
39
41
 
40
- .textarea-control.is-float.is-lg {
41
- @apply pt-7 pb-3;
42
+ &.is-lg {
43
+ @apply pt-7 pb-3;
44
+ }
45
+ }
42
46
  }
43
47
 
44
- .textarea-control.is-primary {
45
- @apply bg-on-primary text-primary rounded-ui;
46
- }
48
+ .textarea-control.is-soft {
49
+ @apply rounded-ui;
47
50
 
48
- .textarea-control.is-solid.is-primary {
49
- @apply bg-primary text-on-primary;
50
- }
51
+ &.is-primary {
52
+ @apply bg-on-primary text-primary;
53
+ &.is-active {
54
+ @apply bg-on-primary/90;
55
+ }
56
+ }
51
57
 
52
- .textarea-control.is-primary.is-active {
53
- @apply bg-on-primary/90;
54
- }
58
+ &.is-secondary {
59
+ @apply bg-on-secondary text-secondary;
60
+ &.is-active {
61
+ @apply bg-on-secondary/90;
62
+ }
63
+ }
55
64
 
56
- .textarea-control.is-solid.is-primary.is-active {
57
- @apply bg-primary/90;
58
- }
65
+ &.is-muted {
66
+ @apply bg-muted text-on-muted;
67
+ &.is-active {
68
+ @apply bg-muted/90;
69
+ }
70
+ }
59
71
 
60
- .textarea-control.is-secondary {
61
- @apply bg-on-secondary text-secondary rounded-ui;
62
- }
72
+ &.is-success {
73
+ @apply bg-on-success text-success;
74
+ &.is-active {
75
+ @apply bg-on-success/90;
76
+ }
77
+ }
63
78
 
64
- .textarea-control.is-solid.is-secondary {
65
- @apply bg-secondary text-on-secondary;
66
- }
79
+ &.is-info {
80
+ @apply bg-on-info text-info;
81
+ &.is-active {
82
+ @apply bg-on-info/90;
83
+ }
84
+ }
67
85
 
68
- .textarea-control.is-secondary.is-active {
69
- @apply bg-on-secondary/90;
70
- }
86
+ &.is-danger {
87
+ @apply bg-on-danger text-danger;
88
+ &.is-active {
89
+ @apply bg-on-danger/90;
90
+ }
91
+ }
71
92
 
72
- .textarea-control.is-solid.is-secondary.is-active {
73
- @apply bg-secondary/90;
93
+ &.is-warning {
94
+ @apply bg-on-warning text-warning;
95
+ &.is-active {
96
+ @apply bg-on-warning/90;
97
+ }
98
+ }
74
99
  }
75
100
 
76
- .textarea-control.is-muted {
77
- @apply bg-muted text-on-muted rounded-ui;
78
- }
101
+ .textarea-control.is-solid {
102
+ @apply rounded-ui;
79
103
 
80
- .textarea-control.is-solid.is-muted {
81
- @apply bg-on-muted text-muted;
82
- }
104
+ &.is-primary {
105
+ @apply bg-primary text-on-primary;
106
+ &.is-active {
107
+ @apply bg-primary/90;
108
+ }
109
+ }
83
110
 
84
- .textarea-control.is-muted.is-active {
85
- @apply bg-muted/90;
86
- }
111
+ &.is-secondary {
112
+ @apply bg-secondary text-on-secondary;
113
+ &.is-active {
114
+ @apply bg-secondary/90;
115
+ }
116
+ }
117
+
118
+ &.is-muted {
119
+ @apply bg-on-muted text-muted;
120
+ &.is-active {
121
+ @apply bg-on-muted/90;
122
+ }
123
+ }
124
+
125
+ &.is-success {
126
+ @apply bg-success text-on-success;
127
+ &.is-active {
128
+ @apply bg-success/90;
129
+ }
130
+ }
87
131
 
88
- .textarea-control.is-solid.is-muted.is-active {
89
- @apply bg-on-muted/90;
132
+ &.is-info {
133
+ @apply bg-info text-on-info;
134
+ &.is-active {
135
+ @apply bg-info/90;
136
+ }
137
+ }
138
+
139
+ &.is-danger {
140
+ @apply bg-danger text-on-danger;
141
+ &.is-active {
142
+ @apply bg-danger/90;
143
+ }
144
+ }
145
+
146
+ &.is-warning {
147
+ @apply bg-warning text-on-warning;
148
+ &.is-active {
149
+ @apply bg-warning/90;
150
+ }
151
+ }
90
152
  }
91
153
 
92
154
  .textarea-control.is-outlined {
93
- @apply inset-ring-2 inset-ring-muted rounded-ui;
94
- }
155
+ @apply rounded-ui inset-ring;
156
+
157
+ &.is-active {
158
+ @apply inset-ring-2;
159
+ }
95
160
 
96
- .textarea-control.is-outlined.is-active {
97
- @apply inset-ring-2 inset-ring-primary;
161
+ &.is-primary {
162
+ @apply inset-ring-primary;
163
+ }
164
+ &.is-secondary {
165
+ @apply inset-ring-secondary;
166
+ }
167
+ &.is-muted {
168
+ @apply inset-ring-muted;
169
+ }
170
+ &.is-success {
171
+ @apply inset-ring-success;
172
+ }
173
+ &.is-info {
174
+ @apply inset-ring-info;
175
+ }
176
+ &.is-danger {
177
+ @apply inset-ring-danger;
178
+ }
179
+ &.is-warning {
180
+ @apply inset-ring-warning;
181
+ }
98
182
  }
99
183
 
100
184
  .textarea-control.is-line {
101
- @apply box-border border-b-2 border-muted text-on-muted px-0;
185
+ @apply box-border border-b px-0;
102
186
 
103
187
  .textarea-control-label {
104
188
  @apply left-0!;
105
189
  }
106
- }
107
190
 
108
- .textarea-control.is-line.is-active {
109
- @apply border-primary;
191
+ &.is-active {
192
+ @apply border-b-2;
193
+ }
194
+
195
+ &.is-primary {
196
+ @apply border-primary text-primary;
197
+ }
198
+ &.is-secondary {
199
+ @apply border-secondary text-secondary;
200
+ }
201
+ &.is-muted {
202
+ @apply border-on-muted text-on-muted;
203
+ }
204
+ &.is-success {
205
+ @apply border-success text-success;
206
+ }
207
+ &.is-info {
208
+ @apply border-info text-info;
209
+ }
210
+ &.is-danger {
211
+ @apply border-danger text-danger;
212
+ }
213
+ &.is-warning {
214
+ @apply border-warning text-warning;
215
+ }
110
216
  }
111
217
 
112
218
  .textarea-control-input {
113
219
  @apply appearance-none flex-1 w-full border-none outline-none;
114
- @apply placeholder:transition-opacity placeholder:duration-200;
220
+ @apply placeholder:transition-opacity placeholder:duration-300;
115
221
  @apply bg-transparent;
116
222
  @apply min-h-12;
117
- }
118
-
119
- .textarea-control-input.invisible {
120
- @apply opacity-0;
121
- }
122
-
123
- .textarea-control-input {
124
223
  resize: none;
125
- }
126
224
 
127
- .textarea-control-input.is-resizable {
128
- resize: both;
225
+ &.invisible {
226
+ @apply opacity-0;
227
+ }
228
+
229
+ &.is-resizable {
230
+ resize: both;
231
+ }
129
232
  }
130
233
  }
@@ -4,11 +4,11 @@
4
4
 
5
5
  .toggle-input {
6
6
  @apply relative appearance-none w-10 h-6 rounded-full;
7
- @apply bg-muted transition-colors duration-200 ease-in-out;
7
+ @apply bg-muted transition-colors duration-300 ease-in-out;
8
8
  @apply focus:outline-none;
9
9
  @apply before:content-[''] before:absolute before:h-4 before:w-4 before:left-1 before:top-1;
10
10
  @apply before:bg-white before:rounded-full before:shadow;
11
- @apply before:transition-transform before:duration-200 before:ease-in-out;
11
+ @apply before:transition-transform before:duration-300 before:ease-in-out;
12
12
  @apply checked:before:translate-x-4;
13
13
  }
14
14
 
@@ -26,7 +26,7 @@
26
26
 
27
27
  .toggle-label-left,
28
28
  .toggle-label-right {
29
- @apply text-muted transition-colors duration-200;
29
+ @apply text-muted transition-colors duration-300;
30
30
 
31
31
  &.is-active {
32
32
  @apply text-on-muted;
@@ -10,6 +10,7 @@ interface Column {
10
10
  export interface TableState {
11
11
  data: any[];
12
12
  isLoading: boolean;
13
+ hasInitialized: boolean;
13
14
  error: any;
14
15
  sortBy?: string;
15
16
  sortOrder: 'ASC' | 'DESC';
@@ -9,6 +9,7 @@ export const useTable = (config) => {
9
9
  let sortOrder = $state(config.initialSortOrder ?? 'ASC');
10
10
  let search = $state(config.initialSearch ?? '');
11
11
  let isLoading = $state(false);
12
+ let hasInitialized = $state(false);
12
13
  let error = $state(null);
13
14
  const selectable = config.selectable ?? false;
14
15
  const rowKey = config.rowKey ?? 'id';
@@ -82,6 +83,7 @@ export const useTable = (config) => {
82
83
  const startIndex = (page - 1) * pageSize;
83
84
  const endIndex = startIndex + pageSize;
84
85
  data = processedData.slice(startIndex, endIndex);
86
+ hasInitialized = true;
85
87
  };
86
88
  const fetchData = async () => {
87
89
  if (isManualMode) {
@@ -125,6 +127,7 @@ export const useTable = (config) => {
125
127
  catch (err) {
126
128
  error = err;
127
129
  config.onError?.(err);
130
+ hasInitialized = true;
128
131
  }
129
132
  finally {
130
133
  isLoading = false;
@@ -307,6 +310,9 @@ export const useTable = (config) => {
307
310
  get isLoading() {
308
311
  return isLoading;
309
312
  },
313
+ get hasInitialized() {
314
+ return hasInitialized;
315
+ },
310
316
  get error() {
311
317
  return error;
312
318
  },