@zvndev/yable-themes 0.1.0 → 0.3.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-present ZVN DEV
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/base.css CHANGED
@@ -137,11 +137,11 @@
137
137
  transition: background var(--yable-transition-fast);
138
138
  }
139
139
 
140
- .yable-th[data-sortable="true"] {
140
+ .yable-th[data-sortable='true'] {
141
141
  cursor: pointer;
142
142
  }
143
143
 
144
- .yable-th[data-sortable="true"]:hover {
144
+ .yable-th[data-sortable='true']:hover {
145
145
  background: var(--yable-bg-row-hover);
146
146
  }
147
147
 
@@ -164,22 +164,23 @@
164
164
  height: calc(var(--yable-sort-icon-size) + 2px);
165
165
  color: var(--yable-sort-icon-color);
166
166
  opacity: 0;
167
- transition: color var(--yable-transition),
168
- transform var(--yable-transition),
169
- opacity var(--yable-transition);
167
+ transition:
168
+ color var(--yable-transition),
169
+ transform var(--yable-transition),
170
+ opacity var(--yable-transition);
170
171
  }
171
172
 
172
173
  /* Show sort indicator on header hover */
173
- .yable-th[data-sortable="true"]:hover .yable-sort-indicator {
174
+ .yable-th[data-sortable='true']:hover .yable-sort-indicator {
174
175
  opacity: 0.4;
175
176
  }
176
177
 
177
- .yable-sort-indicator[data-active="true"] {
178
+ .yable-sort-indicator[data-active='true'] {
178
179
  color: var(--yable-sort-icon-color-active);
179
180
  opacity: 1;
180
181
  }
181
182
 
182
- .yable-sort-indicator[data-direction="desc"] {
183
+ .yable-sort-indicator[data-direction='desc'] {
183
184
  transform: rotate(180deg);
184
185
  }
185
186
 
@@ -219,8 +220,9 @@
219
220
  height: 0%;
220
221
  border-radius: 2px;
221
222
  background: var(--yable-resize-handle-color);
222
- transition: background var(--yable-transition),
223
- height var(--yable-transition);
223
+ transition:
224
+ background var(--yable-transition),
225
+ height var(--yable-transition);
224
226
  }
225
227
 
226
228
  .yable-resize-handle:hover::after {
@@ -228,25 +230,25 @@
228
230
  height: 50%;
229
231
  }
230
232
 
231
- .yable-resize-handle[data-resizing="true"]::after {
233
+ .yable-resize-handle[data-resizing='true']::after {
232
234
  background: var(--yable-resize-handle-color-active);
233
235
  height: 70%;
234
236
  }
235
237
 
236
238
  /* ── Column Reorder ──────────────────────────────────────────────────────── */
237
239
 
238
- .yable-th[data-reorderable="true"] {
240
+ .yable-th[data-reorderable='true'] {
239
241
  cursor: grab;
240
242
  }
241
243
 
242
- .yable-th[data-reorderable="true"]:active {
244
+ .yable-th[data-reorderable='true']:active {
243
245
  cursor: grabbing;
244
246
  }
245
247
 
246
248
  /* When sortable AND reorderable, sort cursor wins on the content area so the
247
249
  header still feels clickable. The drag is initiated from a mousedown that
248
250
  moves; a click without movement still triggers the sort. */
249
- .yable-th[data-sortable="true"][data-reorderable="true"] {
251
+ .yable-th[data-sortable='true'][data-reorderable='true'] {
250
252
  cursor: pointer;
251
253
  }
252
254
 
@@ -264,16 +266,16 @@
264
266
  z-index: calc(var(--yable-z-resize) + 1);
265
267
  }
266
268
 
267
- .yable-th[data-drag-over="left"]::before {
269
+ .yable-th[data-drag-over='left']::before {
268
270
  left: -1px;
269
271
  }
270
272
 
271
- .yable-th[data-drag-over="right"]::after {
273
+ .yable-th[data-drag-over='right']::after {
272
274
  right: -1px;
273
275
  }
274
276
 
275
- .yable-th[data-drag-over="left"]::after,
276
- .yable-th[data-drag-over="right"]::before {
277
+ .yable-th[data-drag-over='left']::after,
278
+ .yable-th[data-drag-over='right']::before {
277
279
  display: none;
278
280
  }
279
281
 
@@ -299,20 +301,20 @@
299
301
  background: var(--yable-bg-row-hover);
300
302
  }
301
303
 
302
- .yable-tr[data-selected="true"] {
304
+ .yable-tr[data-selected='true'] {
303
305
  background: var(--yable-bg-row-selected);
304
306
  box-shadow: inset 2px 0 0 0 var(--yable-accent);
305
307
  }
306
308
 
307
- .yable-tr[data-selected="true"]:hover {
309
+ .yable-tr[data-selected='true']:hover {
308
310
  background: var(--yable-bg-row-selected);
309
311
  }
310
312
 
311
- .yable-tr[data-expanded="true"] {
313
+ .yable-tr[data-expanded='true'] {
312
314
  background: var(--yable-bg-row-expanded);
313
315
  }
314
316
 
315
- .yable-tr[data-clickable="true"] {
317
+ .yable-tr[data-clickable='true'] {
316
318
  cursor: pointer;
317
319
  }
318
320
 
@@ -354,20 +356,58 @@
354
356
  white-space: nowrap;
355
357
  overflow: hidden;
356
358
  text-overflow: ellipsis;
357
- transition: background var(--yable-transition-fast),
358
- box-shadow var(--yable-transition-fast);
359
+ transition:
360
+ background var(--yable-transition-fast),
361
+ box-shadow var(--yable-transition-fast);
359
362
  }
360
363
 
361
- .yable-td[data-editing="true"] {
364
+ .yable-td[data-cell-selected='true'] {
365
+ --yable-selection-top-width: 0px;
366
+ --yable-selection-right-width: 0px;
367
+ --yable-selection-bottom-width: 0px;
368
+ --yable-selection-left-width: 0px;
369
+ background: color-mix(in srgb, var(--yable-accent) 10%, transparent);
370
+ position: relative;
371
+ }
372
+
373
+ .yable-td[data-cell-selected='true']::after {
374
+ content: '';
375
+ position: absolute;
376
+ inset: 0;
377
+ pointer-events: none;
378
+ border-style: solid;
379
+ border-color: var(--yable-accent);
380
+ border-width: var(--yable-selection-top-width) var(--yable-selection-right-width)
381
+ var(--yable-selection-bottom-width) var(--yable-selection-left-width);
382
+ }
383
+
384
+ .yable-td.yable-cell--selection-top {
385
+ --yable-selection-top-width: 2px;
386
+ }
387
+
388
+ .yable-td.yable-cell--selection-right {
389
+ --yable-selection-right-width: 2px;
390
+ }
391
+
392
+ .yable-td.yable-cell--selection-bottom {
393
+ --yable-selection-bottom-width: 2px;
394
+ }
395
+
396
+ .yable-td.yable-cell--selection-left {
397
+ --yable-selection-left-width: 2px;
398
+ }
399
+
400
+ .yable-td[data-editing='true'] {
362
401
  padding: 4px 6px;
363
402
  background: var(--yable-bg-cell-editing);
364
- box-shadow: inset 0 0 0 2px var(--yable-accent),
365
- 0 0 0 3px var(--yable-accent-light);
403
+ box-shadow:
404
+ inset 0 0 0 2px var(--yable-accent),
405
+ 0 0 0 3px var(--yable-accent-light);
366
406
  z-index: 2;
367
407
  position: relative;
368
408
  }
369
409
 
370
- .yable-td.yable-cell--focused:not([data-editing="true"]) {
410
+ .yable-td.yable-cell--focused:not([data-editing='true']) {
371
411
  box-shadow: var(--yable-focus-ring);
372
412
  position: relative;
373
413
  z-index: calc(var(--yable-z-pinned) + 1);
@@ -375,16 +415,16 @@
375
415
 
376
416
  /* ── Column Pinning ──────────────────────────────────────────────────────── */
377
417
 
378
- .yable-th[data-pinned="left"],
379
- .yable-td[data-pinned="left"] {
418
+ .yable-th[data-pinned='left'],
419
+ .yable-td[data-pinned='left'] {
380
420
  position: sticky;
381
421
  left: var(--yable-pin-offset, 0px);
382
422
  z-index: var(--yable-z-pinned);
383
423
  background: var(--yable-bg-pinned);
384
424
  }
385
425
 
386
- .yable-th[data-pinned="right"],
387
- .yable-td[data-pinned="right"] {
426
+ .yable-th[data-pinned='right'],
427
+ .yable-td[data-pinned='right'] {
388
428
  position: sticky;
389
429
  right: var(--yable-pin-offset, 0px);
390
430
  z-index: var(--yable-z-pinned);
@@ -392,14 +432,14 @@
392
432
  }
393
433
 
394
434
  /* Shadow on last left-pinned and first right-pinned */
395
- .yable-th[data-pinned-edge="left"],
396
- .yable-td[data-pinned-edge="left"] {
435
+ .yable-th[data-pinned-edge='left'],
436
+ .yable-td[data-pinned-edge='left'] {
397
437
  box-shadow: var(--yable-shadow-pinned);
398
438
  clip-path: inset(0 -10px 0 0);
399
439
  }
400
440
 
401
- .yable-th[data-pinned-edge="right"],
402
- .yable-td[data-pinned-edge="right"] {
441
+ .yable-th[data-pinned-edge='right'],
442
+ .yable-td[data-pinned-edge='right'] {
403
443
  box-shadow: calc(var(--yable-shadow-pinned) * -1);
404
444
  clip-path: inset(0 0 0 -10px);
405
445
  }
@@ -420,7 +460,7 @@
420
460
 
421
461
  /* ── Row Pinning ─────────────────────────────────────────────────────────── */
422
462
 
423
- .yable-tr[data-pinned="top"] {
463
+ .yable-tr[data-pinned='top'] {
424
464
  position: sticky;
425
465
  top: 0;
426
466
  z-index: calc(var(--yable-z-pinned) - 1);
@@ -428,7 +468,7 @@
428
468
  box-shadow: 0 1px 0 var(--yable-border-color);
429
469
  }
430
470
 
431
- .yable-tr[data-pinned="bottom"] {
471
+ .yable-tr[data-pinned='bottom'] {
432
472
  position: sticky;
433
473
  bottom: 0;
434
474
  z-index: calc(var(--yable-z-pinned) - 1);
@@ -470,9 +510,10 @@
470
510
  background: none;
471
511
  cursor: pointer;
472
512
  color: var(--yable-text-secondary);
473
- transition: transform var(--yable-transition),
474
- color var(--yable-transition-fast),
475
- background var(--yable-transition-fast);
513
+ transition:
514
+ transform var(--yable-transition),
515
+ color var(--yable-transition-fast),
516
+ background var(--yable-transition-fast);
476
517
  padding: 0;
477
518
  border-radius: var(--yable-border-radius-sm);
478
519
  }
@@ -482,7 +523,7 @@
482
523
  background: var(--yable-bg-row-hover);
483
524
  }
484
525
 
485
- .yable-expand-toggle[data-expanded="true"] {
526
+ .yable-expand-toggle[data-expanded='true'] {
486
527
  transform: rotate(90deg);
487
528
  color: var(--yable-accent);
488
529
  }
@@ -500,9 +541,10 @@
500
541
  font-size: var(--yable-input-font-size);
501
542
  color: var(--yable-text-primary);
502
543
  outline: none;
503
- transition: border-color var(--yable-transition-fast),
504
- background var(--yable-transition-fast),
505
- box-shadow var(--yable-transition-fast);
544
+ transition:
545
+ border-color var(--yable-transition-fast),
546
+ background var(--yable-transition-fast),
547
+ box-shadow var(--yable-transition-fast);
506
548
  }
507
549
 
508
550
  .yable-input:hover {
@@ -557,9 +599,10 @@
557
599
  background-repeat: no-repeat;
558
600
  background-position: right 6px center;
559
601
  background-size: 12px;
560
- transition: border-color var(--yable-transition-fast),
561
- background-color var(--yable-transition-fast),
562
- box-shadow var(--yable-transition-fast);
602
+ transition:
603
+ border-color var(--yable-transition-fast),
604
+ background-color var(--yable-transition-fast),
605
+ box-shadow var(--yable-transition-fast);
563
606
  }
564
607
 
565
608
  .yable-select:hover {
@@ -582,9 +625,10 @@
582
625
  cursor: pointer;
583
626
  position: relative;
584
627
  flex-shrink: 0;
585
- transition: background var(--yable-transition-fast),
586
- border-color var(--yable-transition-fast),
587
- box-shadow var(--yable-transition-fast);
628
+ transition:
629
+ background var(--yable-transition-fast),
630
+ border-color var(--yable-transition-fast),
631
+ box-shadow var(--yable-transition-fast);
588
632
  }
589
633
 
590
634
  .yable-checkbox:checked {
@@ -710,20 +754,21 @@
710
754
  font-size: var(--yable-font-size-sm);
711
755
  font-weight: var(--yable-font-weight-medium);
712
756
  cursor: pointer;
713
- transition: background var(--yable-transition-fast),
714
- color var(--yable-transition-fast),
715
- border-color var(--yable-transition-fast),
716
- box-shadow var(--yable-transition-fast);
757
+ transition:
758
+ background var(--yable-transition-fast),
759
+ color var(--yable-transition-fast),
760
+ border-color var(--yable-transition-fast),
761
+ box-shadow var(--yable-transition-fast);
717
762
  user-select: none;
718
763
  font-variant-numeric: tabular-nums;
719
764
  }
720
765
 
721
- .yable-pagination-btn:hover:not(:disabled):not([data-active="true"]) {
766
+ .yable-pagination-btn:hover:not(:disabled):not([data-active='true']) {
722
767
  background: var(--yable-pagination-button-bg-hover);
723
768
  border-color: var(--yable-border-color);
724
769
  }
725
770
 
726
- .yable-pagination-btn[data-active="true"] {
771
+ .yable-pagination-btn[data-active='true'] {
727
772
  background: var(--yable-pagination-button-bg-active);
728
773
  color: var(--yable-pagination-button-text-active);
729
774
  border-color: var(--yable-pagination-button-bg-active);
@@ -751,8 +796,9 @@
751
796
  background-repeat: no-repeat;
752
797
  background-position: right 8px center;
753
798
  background-size: 10px;
754
- transition: border-color var(--yable-transition-fast),
755
- box-shadow var(--yable-transition-fast);
799
+ transition:
800
+ border-color var(--yable-transition-fast),
801
+ box-shadow var(--yable-transition-fast);
756
802
  }
757
803
 
758
804
  .yable-pagination-select:hover {
@@ -791,10 +837,11 @@
791
837
  font-size: var(--yable-font-size);
792
838
  color: var(--yable-text-primary);
793
839
  outline: none;
794
- transition: border-color var(--yable-transition),
795
- background var(--yable-transition),
796
- box-shadow var(--yable-transition),
797
- width var(--yable-transition-slow);
840
+ transition:
841
+ border-color var(--yable-transition),
842
+ background var(--yable-transition),
843
+ box-shadow var(--yable-transition),
844
+ width var(--yable-transition-slow);
798
845
  /* Search icon via background-image */
799
846
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5L14 14'/%3E%3C/svg%3E");
800
847
  background-repeat: no-repeat;
@@ -829,8 +876,9 @@
829
876
  cursor: pointer;
830
877
  border-radius: 50%;
831
878
  margin-left: -30px;
832
- transition: color var(--yable-transition-fast),
833
- background var(--yable-transition-fast);
879
+ transition:
880
+ color var(--yable-transition-fast),
881
+ background var(--yable-transition-fast);
834
882
  }
835
883
 
836
884
  .yable-global-filter-clear:hover {
@@ -897,8 +945,12 @@
897
945
  }
898
946
 
899
947
  @keyframes yable-shimmer {
900
- 0% { background-position: 200% 0; }
901
- 100% { background-position: -200% 0; }
948
+ 0% {
949
+ background-position: 200% 0;
950
+ }
951
+ 100% {
952
+ background-position: -200% 0;
953
+ }
902
954
  }
903
955
 
904
956
  /* ── Selection Column ────────────────────────────────────────────────────── */
@@ -914,7 +966,7 @@
914
966
 
915
967
  /* ── Accessibility ───────────────────────────────────────────────────────── */
916
968
 
917
- .yable [role="columnheader"][aria-sort] {
969
+ .yable [role='columnheader'][aria-sort] {
918
970
  cursor: pointer;
919
971
  }
920
972
 
@@ -955,8 +1007,9 @@
955
1007
  z-index: var(--yable-z-resize);
956
1008
  border-radius: 1px;
957
1009
  pointer-events: auto;
958
- transition: width var(--yable-transition-fast),
959
- height var(--yable-transition-fast);
1010
+ transition:
1011
+ width var(--yable-transition-fast),
1012
+ height var(--yable-transition-fast);
960
1013
  }
961
1014
 
962
1015
  .yable-fill-handle:hover {
@@ -998,8 +1051,9 @@
998
1051
  cursor: grab;
999
1052
  color: var(--yable-text-tertiary);
1000
1053
  border-radius: var(--yable-border-radius-sm);
1001
- transition: color var(--yable-transition-fast),
1002
- background var(--yable-transition-fast);
1054
+ transition:
1055
+ color var(--yable-transition-fast),
1056
+ background var(--yable-transition-fast);
1003
1057
  flex-shrink: 0;
1004
1058
  }
1005
1059
 
@@ -1058,9 +1112,10 @@
1058
1112
  cursor: pointer;
1059
1113
  color: var(--yable-text-secondary);
1060
1114
  border-radius: var(--yable-border-radius-sm);
1061
- transition: transform var(--yable-transition),
1062
- color var(--yable-transition-fast),
1063
- background var(--yable-transition-fast);
1115
+ transition:
1116
+ transform var(--yable-transition),
1117
+ color var(--yable-transition-fast),
1118
+ background var(--yable-transition-fast);
1064
1119
  flex-shrink: 0;
1065
1120
  margin-right: 4px;
1066
1121
  }
@@ -1070,7 +1125,7 @@
1070
1125
  background: var(--yable-bg-row-hover);
1071
1126
  }
1072
1127
 
1073
- .yable-tree-toggle-btn[data-expanded="true"] {
1128
+ .yable-tree-toggle-btn[data-expanded='true'] {
1074
1129
  transform: rotate(90deg);
1075
1130
  }
1076
1131
 
@@ -1087,23 +1142,23 @@
1087
1142
  }
1088
1143
 
1089
1144
  /* Tree depth visual indentation */
1090
- .yable-tr[data-tree-depth="1"] .yable-tree-toggle {
1145
+ .yable-tr[data-tree-depth='1'] .yable-tree-toggle {
1091
1146
  padding-left: 20px;
1092
1147
  }
1093
1148
 
1094
- .yable-tr[data-tree-depth="2"] .yable-tree-toggle {
1149
+ .yable-tr[data-tree-depth='2'] .yable-tree-toggle {
1095
1150
  padding-left: 40px;
1096
1151
  }
1097
1152
 
1098
- .yable-tr[data-tree-depth="3"] .yable-tree-toggle {
1153
+ .yable-tr[data-tree-depth='3'] .yable-tree-toggle {
1099
1154
  padding-left: 60px;
1100
1155
  }
1101
1156
 
1102
- .yable-tr[data-tree-depth="4"] .yable-tree-toggle {
1157
+ .yable-tr[data-tree-depth='4'] .yable-tree-toggle {
1103
1158
  padding-left: 80px;
1104
1159
  }
1105
1160
 
1106
- .yable-tr[data-tree-depth="5"] .yable-tree-toggle {
1161
+ .yable-tr[data-tree-depth='5'] .yable-tree-toggle {
1107
1162
  padding-left: 100px;
1108
1163
  }
1109
1164
 
@@ -1136,9 +1191,10 @@
1136
1191
  cursor: pointer;
1137
1192
  color: var(--yable-text-secondary);
1138
1193
  border-radius: var(--yable-border-radius-sm);
1139
- transition: transform var(--yable-transition),
1140
- color var(--yable-transition-fast),
1141
- background var(--yable-transition-fast);
1194
+ transition:
1195
+ transform var(--yable-transition),
1196
+ color var(--yable-transition-fast),
1197
+ background var(--yable-transition-fast);
1142
1198
  flex-shrink: 0;
1143
1199
  }
1144
1200
 
@@ -1171,8 +1227,9 @@
1171
1227
  border: 1px dashed var(--yable-border-color);
1172
1228
  border-radius: var(--yable-border-radius);
1173
1229
  background: var(--yable-bg);
1174
- transition: border-color var(--yable-transition-fast),
1175
- background var(--yable-transition-fast);
1230
+ transition:
1231
+ border-color var(--yable-transition-fast),
1232
+ background var(--yable-transition-fast);
1176
1233
  }
1177
1234
 
1178
1235
  .yable-pivot-zone:hover {
@@ -1217,9 +1274,10 @@
1217
1274
  color: var(--yable-text-primary);
1218
1275
  cursor: grab;
1219
1276
  user-select: none;
1220
- transition: background var(--yable-transition-fast),
1221
- box-shadow var(--yable-transition-fast),
1222
- border-color var(--yable-transition-fast);
1277
+ transition:
1278
+ background var(--yable-transition-fast),
1279
+ box-shadow var(--yable-transition-fast),
1280
+ border-color var(--yable-transition-fast);
1223
1281
  }
1224
1282
 
1225
1283
  .yable-pivot-field:hover {
@@ -1250,8 +1308,9 @@
1250
1308
  font-size: 12px;
1251
1309
  line-height: 1;
1252
1310
  border-radius: 50%;
1253
- transition: color var(--yable-transition-fast),
1254
- background var(--yable-transition-fast);
1311
+ transition:
1312
+ color var(--yable-transition-fast),
1313
+ background var(--yable-transition-fast);
1255
1314
  }
1256
1315
 
1257
1316
  .yable-pivot-field-remove:hover {
@@ -1316,8 +1375,9 @@
1316
1375
  font-size: inherit;
1317
1376
  color: var(--yable-text-primary);
1318
1377
  outline: none;
1319
- transition: border-color var(--yable-transition-fast),
1320
- box-shadow var(--yable-transition-fast);
1378
+ transition:
1379
+ border-color var(--yable-transition-fast),
1380
+ box-shadow var(--yable-transition-fast);
1321
1381
  }
1322
1382
 
1323
1383
  .yable-formula-bar-input:focus {
@@ -1374,8 +1434,12 @@
1374
1434
  }
1375
1435
 
1376
1436
  @keyframes yable-overlay-fade-in {
1377
- from { opacity: 0; }
1378
- to { opacity: 1; }
1437
+ from {
1438
+ opacity: 0;
1439
+ }
1440
+ to {
1441
+ opacity: 1;
1442
+ }
1379
1443
  }
1380
1444
 
1381
1445
  .yable-overlay-loading-content {
@@ -1397,8 +1461,12 @@
1397
1461
  }
1398
1462
 
1399
1463
  @keyframes yable-spin {
1400
- from { transform: rotate(0deg); }
1401
- to { transform: rotate(360deg); }
1464
+ from {
1465
+ transform: rotate(0deg);
1466
+ }
1467
+ to {
1468
+ transform: rotate(360deg);
1469
+ }
1402
1470
  }
1403
1471
 
1404
1472
  /* ============================================================================
@@ -1650,23 +1718,26 @@
1650
1718
  background: var(--yable-bg);
1651
1719
  border: var(--yable-border-width) solid var(--yable-border-color);
1652
1720
  border-radius: 8px;
1653
- box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12),
1654
- 0 2px 8px rgba(0, 0, 0, 0.06);
1721
+ box-shadow:
1722
+ 0 8px 30px rgba(0, 0, 0, 0.12),
1723
+ 0 2px 8px rgba(0, 0, 0, 0.06);
1655
1724
  font-size: var(--yable-font-size-sm);
1656
1725
  animation: yable-ctx-appear 120ms ease;
1657
1726
  overflow: hidden;
1658
1727
  }
1659
1728
 
1660
1729
  @media (prefers-color-scheme: dark) {
1661
- :root:not([data-yable-theme="light"]) .yable-ctx-menu {
1662
- box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4),
1663
- 0 2px 8px rgba(0, 0, 0, 0.2);
1730
+ :root:not([data-yable-theme='light']) .yable-ctx-menu {
1731
+ box-shadow:
1732
+ 0 8px 30px rgba(0, 0, 0, 0.4),
1733
+ 0 2px 8px rgba(0, 0, 0, 0.2);
1664
1734
  }
1665
1735
  }
1666
1736
 
1667
- [data-yable-theme="dark"] .yable-ctx-menu {
1668
- box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4),
1669
- 0 2px 8px rgba(0, 0, 0, 0.2);
1737
+ [data-yable-theme='dark'] .yable-ctx-menu {
1738
+ box-shadow:
1739
+ 0 8px 30px rgba(0, 0, 0, 0.4),
1740
+ 0 2px 8px rgba(0, 0, 0, 0.2);
1670
1741
  }
1671
1742
 
1672
1743
  @keyframes yable-ctx-appear {
@@ -1691,8 +1762,9 @@
1691
1762
  user-select: none;
1692
1763
  outline: none;
1693
1764
  color: var(--yable-text-primary);
1694
- transition: background var(--yable-transition-fast),
1695
- color var(--yable-transition-fast);
1765
+ transition:
1766
+ background var(--yable-transition-fast),
1767
+ color var(--yable-transition-fast);
1696
1768
  }
1697
1769
 
1698
1770
  .yable-ctx-item:hover,
@@ -1819,8 +1891,9 @@
1819
1891
  font-weight: var(--yable-font-weight-medium);
1820
1892
  cursor: pointer;
1821
1893
  border-radius: 6px;
1822
- transition: color var(--yable-transition-fast),
1823
- background var(--yable-transition-fast);
1894
+ transition:
1895
+ color var(--yable-transition-fast),
1896
+ background var(--yable-transition-fast);
1824
1897
  }
1825
1898
 
1826
1899
  .yable-sidebar-tab:hover {
@@ -1844,8 +1917,9 @@
1844
1917
  color: var(--yable-text-tertiary);
1845
1918
  cursor: pointer;
1846
1919
  border-radius: 6px;
1847
- transition: color var(--yable-transition-fast),
1848
- background var(--yable-transition-fast);
1920
+ transition:
1921
+ color var(--yable-transition-fast),
1922
+ background var(--yable-transition-fast);
1849
1923
  }
1850
1924
 
1851
1925
  .yable-sidebar-close:hover {
@@ -1897,9 +1971,10 @@
1897
1971
  font-size: var(--yable-font-size-sm);
1898
1972
  color: var(--yable-text-primary);
1899
1973
  outline: none;
1900
- transition: border-color var(--yable-transition-fast),
1901
- background var(--yable-transition-fast),
1902
- box-shadow var(--yable-transition-fast);
1974
+ transition:
1975
+ border-color var(--yable-transition-fast),
1976
+ background var(--yable-transition-fast),
1977
+ box-shadow var(--yable-transition-fast);
1903
1978
  }
1904
1979
 
1905
1980
  .yable-sidebar-search-input:focus {
@@ -1928,9 +2003,10 @@
1928
2003
  font-size: 11px;
1929
2004
  font-weight: var(--yable-font-weight-medium);
1930
2005
  cursor: pointer;
1931
- transition: color var(--yable-transition-fast),
1932
- background var(--yable-transition-fast),
1933
- border-color var(--yable-transition-fast);
2006
+ transition:
2007
+ color var(--yable-transition-fast),
2008
+ background var(--yable-transition-fast),
2009
+ border-color var(--yable-transition-fast);
1934
2010
  }
1935
2011
 
1936
2012
  .yable-sidebar-action-btn:hover {
@@ -2078,8 +2154,9 @@
2078
2154
  cursor: pointer;
2079
2155
  border-radius: 4px;
2080
2156
  flex-shrink: 0;
2081
- transition: color var(--yable-transition-fast),
2082
- background var(--yable-transition-fast);
2157
+ transition:
2158
+ color var(--yable-transition-fast),
2159
+ background var(--yable-transition-fast);
2083
2160
  }
2084
2161
 
2085
2162
  .yable-sidebar-filter-remove:hover {
@@ -2212,7 +2289,7 @@
2212
2289
  background: #fff !important;
2213
2290
  }
2214
2291
 
2215
- .yable-print-mode .yable-tr[data-selected="true"] {
2292
+ .yable-print-mode .yable-tr[data-selected='true'] {
2216
2293
  box-shadow: none !important;
2217
2294
  background: transparent !important;
2218
2295
  }
@@ -2232,7 +2309,7 @@
2232
2309
  left: 0;
2233
2310
  }
2234
2311
 
2235
- .yable--rtl .yable-tr[data-selected="true"] {
2312
+ .yable--rtl .yable-tr[data-selected='true'] {
2236
2313
  box-shadow: inset -2px 0 0 0 var(--yable-accent);
2237
2314
  }
2238
2315
 
@@ -2452,21 +2529,60 @@
2452
2529
  white-space: nowrap;
2453
2530
  }
2454
2531
 
2455
- .yable-cell-badge--soft.yable-cell-badge--default { background: var(--yable-bg-hover); color: var(--yable-text-secondary); }
2456
- .yable-cell-badge--soft.yable-cell-badge--accent { background: var(--yable-accent-bg, rgba(99, 102, 241, 0.1)); color: var(--yable-accent); }
2457
- .yable-cell-badge--soft.yable-cell-badge--success { background: rgba(52, 211, 153, 0.1); color: #34d399; }
2458
- .yable-cell-badge--soft.yable-cell-badge--warning { background: rgba(251, 191, 36, 0.1); color: #fbbf24; }
2459
- .yable-cell-badge--soft.yable-cell-badge--danger { background: rgba(248, 113, 113, 0.1); color: #f87171; }
2460
- .yable-cell-badge--soft.yable-cell-badge--info { background: rgba(56, 189, 248, 0.1); color: #38bdf8; }
2532
+ .yable-cell-badge--soft.yable-cell-badge--default {
2533
+ background: var(--yable-bg-hover);
2534
+ color: var(--yable-text-secondary);
2535
+ }
2536
+ .yable-cell-badge--soft.yable-cell-badge--accent {
2537
+ background: var(--yable-accent-bg, rgba(99, 102, 241, 0.1));
2538
+ color: var(--yable-accent);
2539
+ }
2540
+ .yable-cell-badge--soft.yable-cell-badge--success {
2541
+ background: rgba(52, 211, 153, 0.1);
2542
+ color: #34d399;
2543
+ }
2544
+ .yable-cell-badge--soft.yable-cell-badge--warning {
2545
+ background: rgba(251, 191, 36, 0.1);
2546
+ color: #fbbf24;
2547
+ }
2548
+ .yable-cell-badge--soft.yable-cell-badge--danger {
2549
+ background: rgba(248, 113, 113, 0.1);
2550
+ color: #f87171;
2551
+ }
2552
+ .yable-cell-badge--soft.yable-cell-badge--info {
2553
+ background: rgba(56, 189, 248, 0.1);
2554
+ color: #38bdf8;
2555
+ }
2461
2556
 
2462
- .yable-cell-badge--solid.yable-cell-badge--default { background: var(--yable-text-secondary); color: var(--yable-bg); }
2463
- .yable-cell-badge--solid.yable-cell-badge--accent { background: var(--yable-accent); color: #fff; }
2464
- .yable-cell-badge--solid.yable-cell-badge--success { background: #34d399; color: #0a2e1f; }
2465
- .yable-cell-badge--solid.yable-cell-badge--warning { background: #fbbf24; color: #422006; }
2466
- .yable-cell-badge--solid.yable-cell-badge--danger { background: #f87171; color: #2a0a0a; }
2467
- .yable-cell-badge--solid.yable-cell-badge--info { background: #38bdf8; color: #082f49; }
2557
+ .yable-cell-badge--solid.yable-cell-badge--default {
2558
+ background: var(--yable-text-secondary);
2559
+ color: var(--yable-bg);
2560
+ }
2561
+ .yable-cell-badge--solid.yable-cell-badge--accent {
2562
+ background: var(--yable-accent);
2563
+ color: #fff;
2564
+ }
2565
+ .yable-cell-badge--solid.yable-cell-badge--success {
2566
+ background: #34d399;
2567
+ color: #0a2e1f;
2568
+ }
2569
+ .yable-cell-badge--solid.yable-cell-badge--warning {
2570
+ background: #fbbf24;
2571
+ color: #422006;
2572
+ }
2573
+ .yable-cell-badge--solid.yable-cell-badge--danger {
2574
+ background: #f87171;
2575
+ color: #2a0a0a;
2576
+ }
2577
+ .yable-cell-badge--solid.yable-cell-badge--info {
2578
+ background: #38bdf8;
2579
+ color: #082f49;
2580
+ }
2468
2581
 
2469
- .yable-cell-badge--outline { background: transparent; border: 1px solid currentColor; }
2582
+ .yable-cell-badge--outline {
2583
+ background: transparent;
2584
+ border: 1px solid currentColor;
2585
+ }
2470
2586
 
2471
2587
  /* ── CellCurrency ───────────────────────────────────────────────────────── */
2472
2588
 
@@ -2477,8 +2593,12 @@
2477
2593
  white-space: nowrap;
2478
2594
  }
2479
2595
 
2480
- .yable-cell-currency--positive { color: #34d399; }
2481
- .yable-cell-currency--negative { color: #f87171; }
2596
+ .yable-cell-currency--positive {
2597
+ color: #34d399;
2598
+ }
2599
+ .yable-cell-currency--negative {
2600
+ color: #f87171;
2601
+ }
2482
2602
 
2483
2603
  /* ── CellStatus ─────────────────────────────────────────────────────────── */
2484
2604
 
@@ -2500,16 +2620,36 @@
2500
2620
  flex-shrink: 0;
2501
2621
  }
2502
2622
 
2503
- .yable-cell-status--success { color: #34d399; }
2504
- .yable-cell-status--success::before { background: #34d399; }
2505
- .yable-cell-status--warning { color: #fbbf24; }
2506
- .yable-cell-status--warning::before { background: #fbbf24; }
2507
- .yable-cell-status--danger { color: #f87171; }
2508
- .yable-cell-status--danger::before { background: #f87171; }
2509
- .yable-cell-status--info { color: #38bdf8; }
2510
- .yable-cell-status--info::before { background: #38bdf8; }
2511
- .yable-cell-status--default { color: var(--yable-text-secondary); }
2512
- .yable-cell-status--default::before { background: var(--yable-text-secondary); }
2623
+ .yable-cell-status--success {
2624
+ color: #34d399;
2625
+ }
2626
+ .yable-cell-status--success::before {
2627
+ background: #34d399;
2628
+ }
2629
+ .yable-cell-status--warning {
2630
+ color: #fbbf24;
2631
+ }
2632
+ .yable-cell-status--warning::before {
2633
+ background: #fbbf24;
2634
+ }
2635
+ .yable-cell-status--danger {
2636
+ color: #f87171;
2637
+ }
2638
+ .yable-cell-status--danger::before {
2639
+ background: #f87171;
2640
+ }
2641
+ .yable-cell-status--info {
2642
+ color: #38bdf8;
2643
+ }
2644
+ .yable-cell-status--info::before {
2645
+ background: #38bdf8;
2646
+ }
2647
+ .yable-cell-status--default {
2648
+ color: var(--yable-text-secondary);
2649
+ }
2650
+ .yable-cell-status--default::before {
2651
+ background: var(--yable-text-secondary);
2652
+ }
2513
2653
 
2514
2654
  /* ── CellNumeric ────────────────────────────────────────────────────────── */
2515
2655
 
@@ -2525,8 +2665,12 @@
2525
2665
  color: var(--yable-text-secondary);
2526
2666
  }
2527
2667
 
2528
- .yable-cell-numeric--positive { color: #34d399; }
2529
- .yable-cell-numeric--negative { color: #f87171; }
2668
+ .yable-cell-numeric--positive {
2669
+ color: #34d399;
2670
+ }
2671
+ .yable-cell-numeric--negative {
2672
+ color: #f87171;
2673
+ }
2530
2674
 
2531
2675
  /* ── CellRating ─────────────────────────────────────────────────────────── */
2532
2676
 
@@ -2565,10 +2709,18 @@
2565
2709
  flex-shrink: 0;
2566
2710
  }
2567
2711
 
2568
- .yable-cell-boolean--success { color: #34d399; }
2569
- .yable-cell-boolean--success.yable-cell-boolean--dot::before { background: #34d399; }
2570
- .yable-cell-boolean--danger { color: #f87171; }
2571
- .yable-cell-boolean--danger.yable-cell-boolean--dot::before { background: #f87171; }
2712
+ .yable-cell-boolean--success {
2713
+ color: #34d399;
2714
+ }
2715
+ .yable-cell-boolean--success.yable-cell-boolean--dot::before {
2716
+ background: #34d399;
2717
+ }
2718
+ .yable-cell-boolean--danger {
2719
+ color: #f87171;
2720
+ }
2721
+ .yable-cell-boolean--danger.yable-cell-boolean--dot::before {
2722
+ background: #f87171;
2723
+ }
2572
2724
 
2573
2725
  .yable-cell-boolean--badge {
2574
2726
  padding: 2px 8px;
@@ -2576,8 +2728,12 @@
2576
2728
  font-weight: 500;
2577
2729
  }
2578
2730
 
2579
- .yable-cell-boolean--badge.yable-cell-boolean--success { background: rgba(52, 211, 153, 0.1); }
2580
- .yable-cell-boolean--badge.yable-cell-boolean--danger { background: rgba(248, 113, 113, 0.1); }
2731
+ .yable-cell-boolean--badge.yable-cell-boolean--success {
2732
+ background: rgba(52, 211, 153, 0.1);
2733
+ }
2734
+ .yable-cell-boolean--badge.yable-cell-boolean--danger {
2735
+ background: rgba(248, 113, 113, 0.1);
2736
+ }
2581
2737
 
2582
2738
  /* ── CellProgress ───────────────────────────────────────────────────────── */
2583
2739
 
@@ -2604,11 +2760,21 @@
2604
2760
  transition: width 200ms ease;
2605
2761
  }
2606
2762
 
2607
- .yable-cell-progress--accent .yable-cell-progress__fill { background: var(--yable-accent); }
2608
- .yable-cell-progress--default .yable-cell-progress__fill { background: var(--yable-text-secondary); }
2609
- .yable-cell-progress--success .yable-cell-progress__fill { background: #34d399; }
2610
- .yable-cell-progress--warning .yable-cell-progress__fill { background: #fbbf24; }
2611
- .yable-cell-progress--danger .yable-cell-progress__fill { background: #f87171; }
2763
+ .yable-cell-progress--accent .yable-cell-progress__fill {
2764
+ background: var(--yable-accent);
2765
+ }
2766
+ .yable-cell-progress--default .yable-cell-progress__fill {
2767
+ background: var(--yable-text-secondary);
2768
+ }
2769
+ .yable-cell-progress--success .yable-cell-progress__fill {
2770
+ background: #34d399;
2771
+ }
2772
+ .yable-cell-progress--warning .yable-cell-progress__fill {
2773
+ background: #fbbf24;
2774
+ }
2775
+ .yable-cell-progress--danger .yable-cell-progress__fill {
2776
+ background: #f87171;
2777
+ }
2612
2778
 
2613
2779
  .yable-cell-progress__label {
2614
2780
  font-variant-numeric: tabular-nums;
package/package.json CHANGED
@@ -1,16 +1,23 @@
1
1
  {
2
2
  "name": "@zvndev/yable-themes",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "CSS design token system and themes for Yable data tables",
5
- "keywords": ["table", "themes", "css", "design-tokens", "dark-mode", "yable"],
5
+ "keywords": [
6
+ "table",
7
+ "themes",
8
+ "css",
9
+ "design-tokens",
10
+ "dark-mode",
11
+ "yable"
12
+ ],
6
13
  "license": "MIT",
7
14
  "author": "ZVN DEV",
8
15
  "repository": {
9
16
  "type": "git",
10
- "url": "https://github.com/ZVN-DEV/table.git",
17
+ "url": "https://github.com/ZVN-DEV/yable.git",
11
18
  "directory": "packages/themes"
12
19
  },
13
- "homepage": "https://github.com/ZVN-DEV/table#readme",
20
+ "homepage": "https://github.com/ZVN-DEV/yable#readme",
14
21
  "type": "module",
15
22
  "main": "./dist/index.css",
16
23
  "exports": {
@@ -25,14 +32,31 @@
25
32
  "./mono.css": "./dist/themes/mono.css",
26
33
  "./tokens.css": "./dist/tokens.css",
27
34
  "./rtl.css": "./dist/rtl.css",
28
- "./tailwind.css": "./dist/tailwind.css",
29
- "./tailwind-preset": "./src/tailwind-preset.ts",
30
- "./createTheme": "./src/createTheme.ts"
35
+ "./tailwind.css": "./dist/tailwind.css"
36
+ },
37
+ "files": [
38
+ "dist"
39
+ ],
40
+ "devDependencies": {
41
+ "typescript": "^5.7.0",
42
+ "vitest": "^2.1.0"
43
+ },
44
+ "sideEffects": [
45
+ "**/*.css"
46
+ ],
47
+ "bugs": {
48
+ "url": "https://github.com/ZVN-DEV/yable/issues"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
31
52
  },
32
- "files": ["dist", "src/tailwind-preset.ts"],
33
53
  "scripts": {
34
54
  "build": "node build.mjs",
35
55
  "dev": "node build.mjs --watch",
56
+ "lint": "eslint src",
57
+ "test": "vitest",
58
+ "test:ci": "vitest run --passWithNoTests",
59
+ "test:coverage": "vitest run --passWithNoTests --coverage",
36
60
  "clean": "rm -rf dist"
37
61
  }
38
- }
62
+ }
@@ -1,80 +0,0 @@
1
- // @zvndev/yable-themes — Tailwind v3 preset
2
- //
3
- // Usage:
4
- //
5
- // // tailwind.config.ts
6
- // import yablePreset from '@zvndev/yable-themes/tailwind-preset'
7
- //
8
- // export default {
9
- // presets: [yablePreset],
10
- // content: ['./src/**/*.{ts,tsx}', './node_modules/@zvndev/yable-react/dist/**/*.js'],
11
- // }
12
- //
13
- // All token utilities resolve to the live CSS variable, so they automatically
14
- // follow whatever Yable theme is active on the surrounding container.
15
-
16
- const cssVar = (name: string) => `var(--${name})`
17
-
18
- const yableTailwindPreset = {
19
- theme: {
20
- extend: {
21
- colors: {
22
- yable: {
23
- DEFAULT: cssVar('yable-bg'),
24
- bg: cssVar('yable-bg'),
25
- 'bg-header': cssVar('yable-bg-header'),
26
- 'bg-footer': cssVar('yable-bg-footer'),
27
- 'bg-row': cssVar('yable-bg-row'),
28
- 'bg-row-alt': cssVar('yable-bg-row-alt'),
29
- 'bg-row-hover': cssVar('yable-bg-row-hover'),
30
- 'bg-row-selected': cssVar('yable-bg-row-selected'),
31
- 'bg-row-expanded': cssVar('yable-bg-row-expanded'),
32
- 'bg-cell-editing': cssVar('yable-bg-cell-editing'),
33
- 'bg-pinned': cssVar('yable-bg-pinned'),
34
-
35
- text: cssVar('yable-text-primary'),
36
- 'text-secondary': cssVar('yable-text-secondary'),
37
- 'text-tertiary': cssVar('yable-text-tertiary'),
38
- 'text-header': cssVar('yable-text-header'),
39
- 'text-disabled': cssVar('yable-text-disabled'),
40
- 'text-link': cssVar('yable-text-link'),
41
- 'text-placeholder': cssVar('yable-text-placeholder'),
42
-
43
- border: cssVar('yable-border-color'),
44
- 'border-strong': cssVar('yable-border-color-strong'),
45
-
46
- accent: cssVar('yable-accent'),
47
- 'accent-hover': cssVar('yable-accent-hover'),
48
- 'accent-light': cssVar('yable-accent-light'),
49
- 'accent-text': cssVar('yable-accent-text'),
50
- 'focus-ring': cssVar('yable-focus-ring'),
51
- },
52
- },
53
- spacing: {
54
- 'yable-cell-x': cssVar('yable-cell-padding-x'),
55
- 'yable-cell-y': cssVar('yable-cell-padding-y'),
56
- 'yable-header-x': cssVar('yable-header-padding-x'),
57
- 'yable-header-y': cssVar('yable-header-padding-y'),
58
- },
59
- borderRadius: {
60
- yable: cssVar('yable-border-radius'),
61
- 'yable-sm': cssVar('yable-border-radius-sm'),
62
- 'yable-lg': cssVar('yable-border-radius-lg'),
63
- },
64
- fontFamily: {
65
- yable: [cssVar('yable-font-family')],
66
- },
67
- fontSize: {
68
- yable: [cssVar('yable-font-size'), { lineHeight: cssVar('yable-line-height') }],
69
- 'yable-sm': [cssVar('yable-font-size-sm'), { lineHeight: cssVar('yable-line-height') }],
70
- 'yable-header': [
71
- cssVar('yable-font-size-header'),
72
- { lineHeight: cssVar('yable-line-height') },
73
- ],
74
- },
75
- },
76
- },
77
- }
78
-
79
- export default yableTailwindPreset
80
- export { yableTailwindPreset }