@leitware/composables 2.0.0 → 3.0.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.
Files changed (88) hide show
  1. package/README.md +16 -0
  2. package/dist/presets/brutalist.css +16 -17
  3. package/dist/presets/default.css +11 -13
  4. package/dist/presets/editorial-grid.css +12 -13
  5. package/dist/presets/kumo.css +14 -20
  6. package/dist/presets/signal-pop.css +14 -26
  7. package/dist/styles.css +1 -1
  8. package/dist/tailwind.css +20 -0
  9. package/package.json +7 -7
  10. package/rules/composables.md +10 -9
  11. package/skills/use-composables/references/public-api.md +1 -1
  12. package/skills/use-composables/references/semantic-utilities.md +5 -0
  13. package/src/_internal/accordion.tsx +10 -10
  14. package/src/_internal/alert-dialog.tsx +3 -3
  15. package/src/_internal/alert.tsx +9 -7
  16. package/src/_internal/avatar.tsx +25 -14
  17. package/src/_internal/badge.tsx +2 -1
  18. package/src/_internal/bubble.tsx +2 -2
  19. package/src/_internal/button.tsx +16 -8
  20. package/src/_internal/calendar.tsx +3 -3
  21. package/src/_internal/card.tsx +53 -17
  22. package/src/_internal/checkbox.tsx +2 -2
  23. package/src/_internal/combobox.tsx +2 -2
  24. package/src/_internal/dialog.tsx +29 -9
  25. package/src/_internal/divider.tsx +14 -16
  26. package/src/_internal/dropdown-menu.tsx +4 -4
  27. package/src/_internal/empty.tsx +6 -3
  28. package/src/_internal/field.tsx +11 -7
  29. package/src/_internal/hover-card.tsx +1 -1
  30. package/src/_internal/input-group.tsx +17 -12
  31. package/src/_internal/input.tsx +33 -4
  32. package/src/_internal/item.tsx +2 -2
  33. package/src/_internal/label.tsx +1 -1
  34. package/src/_internal/message.tsx +1 -1
  35. package/src/_internal/native-select.tsx +1 -1
  36. package/src/_internal/popover.tsx +9 -3
  37. package/src/_internal/progress.tsx +37 -7
  38. package/src/_internal/radio-group.tsx +39 -4
  39. package/src/_internal/select.tsx +2 -2
  40. package/src/_internal/separator.tsx +1 -1
  41. package/src/_internal/sheet.tsx +9 -3
  42. package/src/_internal/sidebar.tsx +0 -35
  43. package/src/_internal/skeleton.tsx +26 -3
  44. package/src/_internal/slider.tsx +9 -7
  45. package/src/_internal/sonner.tsx +4 -4
  46. package/src/_internal/spinner.tsx +43 -3
  47. package/src/_internal/switch.tsx +2 -2
  48. package/src/_internal/table.tsx +20 -5
  49. package/src/_internal/tabs.tsx +4 -1
  50. package/src/_internal/textarea.tsx +1 -1
  51. package/src/_internal/toggle.tsx +1 -1
  52. package/src/_internal/tooltip.tsx +53 -8
  53. package/src/_internal/typography.tsx +4 -2
  54. package/src/index.ts +2 -1
  55. package/src/lib/utils.ts +2 -2
  56. package/src/opinionated/alert.tsx +8 -10
  57. package/src/opinionated/avatar.tsx +2 -2
  58. package/src/opinionated/button.tsx +13 -3
  59. package/src/opinionated/dialog.tsx +10 -1
  60. package/src/opinionated/form-calendar-popover.tsx +5 -10
  61. package/src/opinionated/form-checkbox.tsx +2 -2
  62. package/src/opinionated/form-date-of-birth.tsx +12 -8
  63. package/src/opinionated/form-input-group.tsx +1 -1
  64. package/src/opinionated/form-radiogroup.tsx +24 -7
  65. package/src/opinionated/form-switch.tsx +7 -6
  66. package/src/opinionated/progress.tsx +7 -2
  67. package/src/opinionated/select.tsx +4 -1
  68. package/src/opinionated/sidebar.tsx +0 -1
  69. package/src/opinionated/skeleton.tsx +3 -13
  70. package/src/opinionated/spinner.tsx +2 -0
  71. package/src/opinionated/token-config-panel/spacing-editor.tsx +21 -3
  72. package/src/opinionated/tooltip.tsx +20 -2
  73. package/src/styles/presets/brutalist.css +16 -17
  74. package/src/styles/presets/default.css +11 -13
  75. package/src/styles/presets/editorial-grid.css +12 -13
  76. package/src/styles/presets/kumo.css +14 -20
  77. package/src/styles/presets/signal-pop.css +14 -26
  78. package/src/styles/presets-data/brutalist.ts +16 -19
  79. package/src/styles/presets-data/default.ts +11 -15
  80. package/src/styles/presets-data/editorial-grid.ts +12 -6
  81. package/src/styles/presets-data/kumo.ts +12 -6
  82. package/src/styles/presets-data/signal-pop.ts +14 -30
  83. package/src/styles/tokens/components.css +64 -20
  84. package/src/styles/tokens/registry.ts +33 -0
  85. package/src/styles/tokens/semantic-utilities.css +20 -0
  86. package/src/styles/tokens/semantic.css +10 -0
  87. package/src/styles/tokens/tailwind-color-adapter.css +3 -0
  88. package/src/styles/tokens/tailwind-public-utilities.css +20 -0
@@ -125,6 +125,12 @@ export const semanticColorTokens: SemanticColorToken[] = [
125
125
  category: 'bg',
126
126
  label: 'surface-hover',
127
127
  },
128
+ {
129
+ cssVar: '--bg-surface-input',
130
+ reference: '{neutral.200}',
131
+ category: 'bg',
132
+ label: 'surface-input',
133
+ },
128
134
  {
129
135
  cssVar: '--bg-fill-default',
130
136
  reference: '{neutral.100}',
@@ -137,6 +143,12 @@ export const semanticColorTokens: SemanticColorToken[] = [
137
143
  category: 'bg',
138
144
  label: 'fill-primary',
139
145
  },
146
+ {
147
+ cssVar: '--bg-fill-primary-hover',
148
+ reference: '{neutral.900}',
149
+ category: 'bg',
150
+ label: 'fill-primary-hover',
151
+ },
140
152
  { cssVar: '--bg-fill-brand', reference: '{pink.800}', category: 'bg', label: 'fill-brand' },
141
153
  {
142
154
  cssVar: '--bg-fill-brand-2',
@@ -179,6 +191,18 @@ export const semanticColorTokens: SemanticColorToken[] = [
179
191
  category: 'bg',
180
192
  label: 'fill-secondary',
181
193
  },
194
+ {
195
+ cssVar: '--bg-fill-secondary-hover',
196
+ reference: '{neutral.900}',
197
+ category: 'bg',
198
+ label: 'fill-secondary-hover',
199
+ },
200
+ {
201
+ cssVar: '--bg-fill-selected',
202
+ reference: '{neutral.1000}',
203
+ category: 'bg',
204
+ label: 'fill-selected',
205
+ },
182
206
  {
183
207
  cssVar: '--bg-fill-secondary-inverse',
184
208
  reference: '{base.white}',
@@ -220,6 +244,12 @@ export const semanticColorTokens: SemanticColorToken[] = [
220
244
  category: 'text',
221
245
  label: 'on-fill-secondary',
222
246
  },
247
+ {
248
+ cssVar: '--text-on-fill-selected',
249
+ reference: '{neutral.0}',
250
+ category: 'text',
251
+ label: 'on-fill-selected',
252
+ },
223
253
  {
224
254
  cssVar: '--text-on-surface-accent',
225
255
  reference: '{neutral.1000}',
@@ -345,6 +375,8 @@ export const tailwindColorAliases: TailwindColorAlias[] = [
345
375
  { cssVar: '--color-field', target: '--border-secondary' },
346
376
  { cssVar: '--color-focus', target: '--border-focus' },
347
377
  { cssVar: '--color-fill-critical', target: '--bg-fill-critical' },
378
+ { cssVar: '--color-selected', target: '--bg-fill-selected' },
379
+ { cssVar: '--color-selected-foreground', target: '--text-on-fill-selected' },
348
380
  { cssVar: '--color-sidebar-stroke', target: '--border-default' },
349
381
  { cssVar: '--color-chart-1', target: '--chart-1' },
350
382
  { cssVar: '--color-chart-2', target: '--chart-2' },
@@ -367,6 +399,7 @@ export const tailwindColorAliases: TailwindColorAlias[] = [
367
399
  { cssVar: '--color-surface-critical', target: '--bg-surface-critical' },
368
400
  { cssVar: '--color-surface-info', target: '--bg-surface-info' },
369
401
  { cssVar: '--color-surface-emphasis', target: '--bg-surface-emphasis' },
402
+ { cssVar: '--color-surface-input', target: '--bg-surface-input' },
370
403
  { cssVar: '--color-surface-brand', target: '--bg-surface-brand' },
371
404
  { cssVar: '--color-surface-brand-2', target: '--bg-surface-brand-2' },
372
405
  { cssVar: '--color-surface-brand-3', target: '--bg-surface-brand-3' },
@@ -93,6 +93,10 @@
93
93
  background-color: var(--bg-surface-hover);
94
94
  }
95
95
 
96
+ .bg-surface-input {
97
+ background-color: var(--bg-surface-input);
98
+ }
99
+
96
100
  .bg-fill-default {
97
101
  background-color: var(--bg-fill-default);
98
102
  }
@@ -101,6 +105,10 @@
101
105
  background-color: var(--bg-fill-primary);
102
106
  }
103
107
 
108
+ .bg-fill-primary-hover {
109
+ background-color: var(--bg-fill-primary-hover);
110
+ }
111
+
104
112
  .bg-fill-brand {
105
113
  background-color: var(--bg-fill-brand);
106
114
  }
@@ -149,6 +157,14 @@
149
157
  background-color: var(--bg-fill-secondary);
150
158
  }
151
159
 
160
+ .bg-fill-secondary-hover {
161
+ background-color: var(--bg-fill-secondary-hover);
162
+ }
163
+
164
+ .bg-fill-selected {
165
+ background-color: var(--bg-fill-selected);
166
+ }
167
+
152
168
  .bg-fill-secondary-inverse {
153
169
  background-color: var(--bg-fill-secondary-inverse);
154
170
  }
@@ -185,6 +201,10 @@
185
201
  color: var(--text-on-fill-secondary);
186
202
  }
187
203
 
204
+ .text-on-fill-selected {
205
+ color: var(--text-on-fill-selected);
206
+ }
207
+
188
208
  .text-on-surface-accent {
189
209
  color: var(--text-on-surface-accent);
190
210
  }
@@ -41,8 +41,10 @@
41
41
  --bg-surface-brand-4: #e0e8f8ff;
42
42
  --bg-surface-brand-5: #e8f0e8ff;
43
43
  --bg-surface-hover: #efefefff;
44
+ --bg-surface-input: #2e2e2e33;
44
45
  --bg-fill-default: #f8f8f8ff;
45
46
  --bg-fill-primary: #0a0a0aff;
47
+ --bg-fill-primary-hover: #0a0a0aff;
46
48
  --bg-fill-brand: #e87000ff;
47
49
  --bg-fill-brand-2: #0a8080ff;
48
50
  --bg-fill-brand-3: #c89030ff;
@@ -55,6 +57,8 @@
55
57
  --bg-fill-emphasis: #0a0a0aff;
56
58
  --bg-fill-transparent: #00000010;
57
59
  --bg-fill-secondary: #efefefff;
60
+ --bg-fill-secondary-hover: #efefefff;
61
+ --bg-fill-selected: #0a0a0aff;
58
62
  --bg-fill-secondary-inverse: #f8f8f8ff;
59
63
 
60
64
  /* ── Text ──────────────────────────────────────────────────────────── */
@@ -66,6 +70,7 @@
66
70
  --text-on-fill-primary: #f8f8f8ff;
67
71
  --text-on-fill-brand: #0a0a0aff;
68
72
  --text-on-fill-secondary: #0a0a0aff;
73
+ --text-on-fill-selected: #f8f8f8ff;
69
74
  --text-on-surface-accent: #0a0a0aff;
70
75
  --text-info: #001e5eff;
71
76
  --text-success: #003a00ff;
@@ -174,8 +179,10 @@
174
179
  --bg-surface-brand-4: #0a101eff;
175
180
  --bg-surface-brand-5: #0a1a10ff;
176
181
  --bg-surface-hover: #1a1a1aff;
182
+ --bg-surface-input: #8888884d;
177
183
  --bg-fill-default: #0a0a0aff;
178
184
  --bg-fill-primary: #f0f0f0ff;
185
+ --bg-fill-primary-hover: #f0f0f0ff;
179
186
  --bg-fill-brand: #88cc00ff;
180
187
  --bg-fill-brand-2: #22aaaaff;
181
188
  --bg-fill-brand-3: #d09830ff;
@@ -188,6 +195,8 @@
188
195
  --bg-fill-emphasis: #f0f0f0ff;
189
196
  --bg-fill-transparent: #ffffff10;
190
197
  --bg-fill-secondary: #141414ff;
198
+ --bg-fill-secondary-hover: #141414ff;
199
+ --bg-fill-selected: #f0f0f0ff;
191
200
  --bg-fill-secondary-inverse: #0a0a0aff;
192
201
 
193
202
  /* ── Text ──────────────────────────────────────────────────────────── */
@@ -199,6 +208,7 @@
199
208
  --text-on-fill-primary: #0a0a0aff;
200
209
  --text-on-fill-brand: #0a0a0aff;
201
210
  --text-on-fill-secondary: #f0f0f0ff;
211
+ --text-on-fill-selected: #0a0a0aff;
202
212
  --text-on-surface-accent: #f0f0f0ff;
203
213
  --text-info: #99bbffff;
204
214
  --text-success: #77dd77ff;
@@ -42,6 +42,8 @@
42
42
  --color-field: var(--border-secondary);
43
43
  --color-focus: var(--border-focus);
44
44
  --color-fill-critical: var(--bg-fill-critical);
45
+ --color-selected: var(--bg-fill-selected);
46
+ --color-selected-foreground: var(--text-on-fill-selected);
45
47
  --color-sidebar-stroke: var(--border-default);
46
48
  --color-chart-1: var(--chart-1);
47
49
  --color-chart-2: var(--chart-2);
@@ -64,6 +66,7 @@
64
66
  --color-surface-critical: var(--bg-surface-critical);
65
67
  --color-surface-info: var(--bg-surface-info);
66
68
  --color-surface-emphasis: var(--bg-surface-emphasis);
69
+ --color-surface-input: var(--bg-surface-input);
67
70
  --color-surface-brand: var(--bg-surface-brand);
68
71
  --color-surface-brand-2: var(--bg-surface-brand-2);
69
72
  --color-surface-brand-3: var(--bg-surface-brand-3);
@@ -91,6 +91,10 @@
91
91
  background-color: var(--bg-surface-hover);
92
92
  }
93
93
 
94
+ @utility bg-surface-input {
95
+ background-color: var(--bg-surface-input);
96
+ }
97
+
94
98
  @utility bg-fill-default {
95
99
  background-color: var(--bg-fill-default);
96
100
  }
@@ -99,6 +103,10 @@
99
103
  background-color: var(--bg-fill-primary);
100
104
  }
101
105
 
106
+ @utility bg-fill-primary-hover {
107
+ background-color: var(--bg-fill-primary-hover);
108
+ }
109
+
102
110
  @utility bg-fill-brand {
103
111
  background-color: var(--bg-fill-brand);
104
112
  }
@@ -147,6 +155,14 @@
147
155
  background-color: var(--bg-fill-secondary);
148
156
  }
149
157
 
158
+ @utility bg-fill-secondary-hover {
159
+ background-color: var(--bg-fill-secondary-hover);
160
+ }
161
+
162
+ @utility bg-fill-selected {
163
+ background-color: var(--bg-fill-selected);
164
+ }
165
+
150
166
  @utility bg-fill-secondary-inverse {
151
167
  background-color: var(--bg-fill-secondary-inverse);
152
168
  }
@@ -183,6 +199,10 @@
183
199
  color: var(--text-on-fill-secondary);
184
200
  }
185
201
 
202
+ @utility text-on-fill-selected {
203
+ color: var(--text-on-fill-selected);
204
+ }
205
+
186
206
  @utility text-on-surface-accent {
187
207
  color: var(--text-on-surface-accent);
188
208
  }