@visitwonders/assembly 0.10.1 → 0.12.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 (82) hide show
  1. package/declarations/form/combobox-field.d.ts +73 -0
  2. package/declarations/form/combobox-field.d.ts.map +1 -0
  3. package/declarations/form/combobox-shared.d.ts +36 -0
  4. package/declarations/form/combobox-shared.d.ts.map +1 -0
  5. package/declarations/form/combobox.d.ts +239 -0
  6. package/declarations/form/combobox.d.ts.map +1 -0
  7. package/declarations/form/control.d.ts +3 -1
  8. package/declarations/form/control.d.ts.map +1 -1
  9. package/declarations/form/country-select-field.d.ts +2 -0
  10. package/declarations/form/country-select-field.d.ts.map +1 -1
  11. package/declarations/form/date-picker-field.d.ts +2 -0
  12. package/declarations/form/date-picker-field.d.ts.map +1 -1
  13. package/declarations/form/date-range-picker-field.d.ts +2 -0
  14. package/declarations/form/date-range-picker-field.d.ts.map +1 -1
  15. package/declarations/form/display-field.d.ts +2 -0
  16. package/declarations/form/display-field.d.ts.map +1 -1
  17. package/declarations/form/index.d.ts +4 -0
  18. package/declarations/form/index.d.ts.map +1 -1
  19. package/declarations/form/label.d.ts +1 -1
  20. package/declarations/form/label.d.ts.map +1 -1
  21. package/declarations/form/money-field.d.ts +2 -0
  22. package/declarations/form/money-field.d.ts.map +1 -1
  23. package/declarations/form/multi-combobox-field.d.ts +74 -0
  24. package/declarations/form/multi-combobox-field.d.ts.map +1 -0
  25. package/declarations/form/multi-combobox.d.ts +202 -0
  26. package/declarations/form/multi-combobox.d.ts.map +1 -0
  27. package/declarations/form/number-field.d.ts +2 -0
  28. package/declarations/form/number-field.d.ts.map +1 -1
  29. package/declarations/form/select-field.d.ts +2 -0
  30. package/declarations/form/select-field.d.ts.map +1 -1
  31. package/declarations/form/text-field.d.ts +2 -0
  32. package/declarations/form/text-field.d.ts.map +1 -1
  33. package/declarations/form/time-picker-field.d.ts +2 -0
  34. package/declarations/form/time-picker-field.d.ts.map +1 -1
  35. package/declarations/layout/h-stack.d.ts.map +1 -1
  36. package/declarations/layout/stack.d.ts.map +1 -1
  37. package/declarations/layout/v-stack.d.ts.map +1 -1
  38. package/declarations/overlay/popover.d.ts +20 -1
  39. package/declarations/overlay/popover.d.ts.map +1 -1
  40. package/dist/_app_/form/combobox-field.js +1 -0
  41. package/dist/_app_/form/combobox-shared.js +1 -0
  42. package/dist/_app_/form/combobox.js +1 -0
  43. package/dist/_app_/form/multi-combobox-field.js +1 -0
  44. package/dist/_app_/form/multi-combobox.js +1 -0
  45. package/dist/data/{sortable-list-css-211fcfeedc08052ccbac7f51549ce0b1.css → sortable-list-css-03e5d237ea377f7d6056e76cc85b2aaa.css} +8 -4
  46. package/dist/data/sortable-list.js +1 -1
  47. package/dist/form/combobox-field.js +37 -0
  48. package/dist/form/combobox-field.js.map +1 -0
  49. package/dist/form/combobox-shared.js +76 -0
  50. package/dist/form/combobox-shared.js.map +1 -0
  51. package/dist/form/combobox.css +345 -0
  52. package/dist/form/combobox.js +612 -0
  53. package/dist/form/combobox.js.map +1 -0
  54. package/dist/form/control.js +1 -1
  55. package/dist/form/country-select-field.js +1 -1
  56. package/dist/form/country-select-field.js.map +1 -1
  57. package/dist/form/date-picker-field.js +1 -1
  58. package/dist/form/date-picker-field.js.map +1 -1
  59. package/dist/form/date-range-picker-field.js +1 -1
  60. package/dist/form/date-range-picker-field.js.map +1 -1
  61. package/dist/form/{display-field-css-890d9be4b5da61613fd017071f330735.css → display-field-css-502236a2343d47e31e52bdb93a769ca1.css} +2 -2
  62. package/dist/form/display-field.js +2 -2
  63. package/dist/form/index.js +4 -0
  64. package/dist/form/index.js.map +1 -1
  65. package/dist/form/label.css +2 -1
  66. package/dist/form/label.js +1 -1
  67. package/dist/form/money-field.js +1 -1
  68. package/dist/form/multi-combobox-field.js +36 -0
  69. package/dist/form/multi-combobox-field.js.map +1 -0
  70. package/dist/form/multi-combobox.css +422 -0
  71. package/dist/form/multi-combobox.js +626 -0
  72. package/dist/form/multi-combobox.js.map +1 -0
  73. package/dist/form/number-field.js +1 -1
  74. package/dist/form/select-field.js +1 -1
  75. package/dist/form/select-field.js.map +1 -1
  76. package/dist/form/text-field.js +1 -1
  77. package/dist/form/time-picker-field.js +1 -1
  78. package/dist/form/time-picker-field.js.map +1 -1
  79. package/dist/layout/h-stack.js.map +1 -1
  80. package/dist/layout/v-stack.js.map +1 -1
  81. package/dist/overlay/popover.js +19 -1
  82. package/package.json +21 -17
@@ -0,0 +1,422 @@
1
+ /* src/form/multi-combobox.css */
2
+ /* ===================================
3
+ * MultiComboBox Component
4
+ * Multi-select with chips + typeahead
5
+ * =================================== */
6
+
7
+ .multi-combobox_e1a041f66 {
8
+ display: inline-flex;
9
+ width: 100%;
10
+ }
11
+
12
+ /* Visually-hidden aria-live region for screen-reader announcements. */
13
+ .multi-combobox-sr-only_e1a041f66 {
14
+ position: absolute;
15
+ width: 1px;
16
+ height: 1px;
17
+ padding: 0;
18
+ margin: -1px;
19
+ overflow: hidden;
20
+ clip: rect(0, 0, 0, 0);
21
+ white-space: nowrap;
22
+ border: 0;
23
+ }
24
+
25
+ /* ===================================
26
+ * Trigger wrapper — input-like surface that also holds the chips.
27
+ * Fixed height so adding chips doesn't resize the trigger (which
28
+ * would in turn make floating-ui reposition the popover — visible
29
+ * as a "jumping" dropdown on every pick).
30
+ * =================================== */
31
+
32
+ .multi-combobox_e1a041f66 .multi-combobox-trigger_e1a041f66 {
33
+ position: relative;
34
+ display: flex;
35
+ align-items: center;
36
+ width: 100%;
37
+ height: var(--input-height-md);
38
+ border: var(--border-width-1) solid var(--color-border-control);
39
+ border-radius: var(--radius-md);
40
+ background-color: var(--color-bg);
41
+ padding: 0 var(--spacing-1);
42
+ transition:
43
+ border-color var(--transition-fast),
44
+ box-shadow var(--transition-fast);
45
+ }
46
+
47
+ .multi-combobox_e1a041f66 .multi-combobox-trigger_e1a041f66:hover:not([data-disabled="true"]) {
48
+ border-color: var(--color-border-control-hover);
49
+ }
50
+
51
+ .multi-combobox_e1a041f66 .multi-combobox-trigger_e1a041f66:focus-within {
52
+ border-color: var(--color-border-focus);
53
+ box-shadow: var(--focus-ring);
54
+ }
55
+
56
+ /* ===================================
57
+ * Chips row — wraps chips inline with the input.
58
+ * =================================== */
59
+
60
+ .multi-combobox-chips_e1a041f66 {
61
+ flex: 1;
62
+ min-width: 0;
63
+ height: 100%;
64
+ display: flex;
65
+ flex-wrap: nowrap;
66
+ align-items: center;
67
+ gap: 4px;
68
+ padding: 0 var(--spacing-1);
69
+ overflow: hidden;
70
+ }
71
+
72
+ /* ===================================
73
+ * Chip
74
+ * =================================== */
75
+
76
+ .multi-combobox-chip_e1a041f66 {
77
+ display: inline-flex;
78
+ align-items: center;
79
+ gap: 4px;
80
+ max-width: 180px;
81
+ padding: 2px 4px 2px var(--spacing-2);
82
+ background-color: var(--color-bg-neutral-subtle);
83
+ border-radius: var(--radius-md);
84
+ font-size: var(--font-size-13);
85
+ line-height: var(--line-height-tight);
86
+ color: var(--color-text);
87
+ }
88
+
89
+ .multi-combobox-chip-label_e1a041f66 {
90
+ overflow: hidden;
91
+ text-overflow: ellipsis;
92
+ white-space: nowrap;
93
+ }
94
+
95
+ .multi-combobox-chip-remove_e1a041f66 {
96
+ flex-shrink: 0;
97
+ display: inline-flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ width: 18px;
101
+ height: 18px;
102
+ padding: 0;
103
+ border: none;
104
+ background: transparent;
105
+ color: var(--color-text-tertiary);
106
+ cursor: pointer;
107
+ border-radius: var(--radius-sm);
108
+ transition: color var(--transition-fast);
109
+ }
110
+
111
+ .multi-combobox-chip-remove_e1a041f66:hover {
112
+ color: var(--color-text-critical);
113
+ }
114
+
115
+ .multi-combobox-more_e1a041f66 {
116
+ font-size: var(--font-size-13);
117
+ color: var(--color-text-tertiary);
118
+ padding: 0 var(--spacing-1);
119
+ white-space: nowrap;
120
+ }
121
+
122
+ /* ===================================
123
+ * Input
124
+ * =================================== */
125
+
126
+ .multi-combobox-input_e1a041f66 {
127
+ flex: 1;
128
+ min-width: 80px;
129
+ height: var(--spacing-7);
130
+ padding: 0;
131
+ border: none;
132
+ background: transparent;
133
+ font-family: inherit;
134
+ font-size: var(--font-size-md);
135
+ line-height: var(--line-height-tight);
136
+ color: var(--color-text);
137
+ text-overflow: ellipsis;
138
+ }
139
+
140
+ .multi-combobox-input_e1a041f66,
141
+ .multi-combobox-input_e1a041f66:focus,
142
+ .multi-combobox-input_e1a041f66:focus-visible {
143
+ outline: none;
144
+ box-shadow: none;
145
+ }
146
+
147
+ .multi-combobox-input_e1a041f66::placeholder {
148
+ color: var(--color-text-tertiary);
149
+ }
150
+
151
+ .multi-combobox-input_e1a041f66:disabled {
152
+ cursor: not-allowed;
153
+ }
154
+
155
+ /* ===================================
156
+ * Clear + Chevron
157
+ * =================================== */
158
+
159
+ .multi-combobox-clear_e1a041f66,
160
+ .multi-combobox-chevron_e1a041f66 {
161
+ flex-shrink: 0;
162
+ display: inline-flex;
163
+ align-items: center;
164
+ justify-content: center;
165
+ width: 24px;
166
+ height: 24px;
167
+ padding: 0;
168
+ margin: 0 2px;
169
+ border: none;
170
+ background: transparent;
171
+ color: var(--color-text-tertiary);
172
+ cursor: pointer;
173
+ border-radius: var(--radius-sm);
174
+ transition: color var(--transition-fast);
175
+ align-self: center;
176
+ }
177
+
178
+ .multi-combobox-clear_e1a041f66:hover,
179
+ .multi-combobox-chevron_e1a041f66:hover:not(:disabled) {
180
+ color: var(--color-text);
181
+ }
182
+
183
+ .multi-combobox-chevron_e1a041f66 {
184
+ margin-right: var(--spacing-1);
185
+ transition:
186
+ transform var(--transition-fast),
187
+ color var(--transition-fast);
188
+ }
189
+
190
+ .multi-combobox_e1a041f66[data-open="true"] .multi-combobox-chevron_e1a041f66 {
191
+ transform: rotate(180deg);
192
+ }
193
+
194
+ .multi-combobox-chevron_e1a041f66:disabled {
195
+ color: var(--color-text-disabled);
196
+ cursor: not-allowed;
197
+ }
198
+
199
+ /* ===================================
200
+ * Invalid state
201
+ * =================================== */
202
+
203
+ .multi-combobox_e1a041f66[data-invalid="true"] .multi-combobox-trigger_e1a041f66 {
204
+ border-color: var(--color-border-critical);
205
+ }
206
+
207
+ .multi-combobox_e1a041f66[data-invalid="true"] .multi-combobox-trigger_e1a041f66:focus-within {
208
+ border-color: var(--color-border-critical);
209
+ box-shadow: var(--focus-ring-critical);
210
+ }
211
+
212
+ /* ===================================
213
+ * Disabled state
214
+ * =================================== */
215
+
216
+ .multi-combobox_e1a041f66[data-disabled="true"] .multi-combobox-trigger_e1a041f66 {
217
+ background-color: var(--color-bg-disabled);
218
+ border-color: var(--color-border-control-disabled);
219
+ cursor: not-allowed;
220
+ }
221
+
222
+ .multi-combobox_e1a041f66[data-disabled="true"] .multi-combobox-input_e1a041f66 {
223
+ color: var(--color-text-disabled);
224
+ }
225
+
226
+ /* ===================================
227
+ * Popover content
228
+ * =================================== */
229
+
230
+ .multi-combobox-popover-content_e1a041f66 {
231
+ min-width: 240px;
232
+ max-height: min(320px, 40vh);
233
+ display: flex;
234
+ flex-direction: column;
235
+ padding: 0;
236
+ overflow: hidden;
237
+ /* Anchor the open-scale animation to the top-left edge (where the
238
+ * popover meets the trigger with @side="bottom" @align="start"),
239
+ * so it appears to emerge from the trigger rather than inflate from
240
+ * its own centre. */
241
+ transform-origin: top left;
242
+ }
243
+
244
+ .multi-combobox-listbox_e1a041f66 {
245
+ flex: 1;
246
+ min-height: 0;
247
+ overflow-y: auto;
248
+ padding: var(--spacing-2) var(--spacing-1);
249
+ /* Keep the active row comfortably away from the scroll edges when
250
+ * keyboard nav brings it into view (scrollIntoView({ block: 'nearest' })). */
251
+ scroll-padding-block: var(--spacing-2);
252
+ }
253
+
254
+ /* ===================================
255
+ * Empty / Loading state
256
+ * =================================== */
257
+
258
+ .multi-combobox-empty_e1a041f66,
259
+ .multi-combobox-loading_e1a041f66 {
260
+ padding: var(--spacing-3);
261
+ text-align: center;
262
+ color: var(--color-text-tertiary);
263
+ font-size: var(--font-size-13);
264
+ }
265
+
266
+ /* ===================================
267
+ * Groups
268
+ * =================================== */
269
+
270
+ .multi-combobox-group_e1a041f66:not(:first-child) {
271
+ border-top: 1px solid var(--color-border-subtle);
272
+ margin-top: var(--spacing-1);
273
+ padding-top: var(--spacing-1);
274
+ }
275
+
276
+ .multi-combobox-group-heading_e1a041f66 {
277
+ padding: var(--spacing-2) var(--spacing-3) var(--spacing-1);
278
+ font-size: var(--font-size-11);
279
+ font-weight: var(--font-weight-medium);
280
+ color: var(--color-text-tertiary);
281
+ text-transform: uppercase;
282
+ letter-spacing: 0.05em;
283
+ }
284
+
285
+ /* ===================================
286
+ * Create row
287
+ * =================================== */
288
+
289
+ .multi-combobox-create_e1a041f66 {
290
+ border-top: 1px solid var(--color-border-subtle);
291
+ margin-top: var(--spacing-1);
292
+ padding-top: var(--spacing-2);
293
+ color: var(--color-text-accent);
294
+ font-weight: var(--font-weight-medium);
295
+ }
296
+
297
+ .multi-combobox-create-icon_e1a041f66 {
298
+ flex-shrink: 0;
299
+ display: inline-flex;
300
+ align-items: center;
301
+ justify-content: center;
302
+ width: 16px;
303
+ height: 16px;
304
+ font-size: var(--font-size-md);
305
+ line-height: 1;
306
+ }
307
+
308
+ /* ===================================
309
+ * Options
310
+ * =================================== */
311
+
312
+ .multi-combobox-option_e1a041f66 {
313
+ display: flex;
314
+ align-items: center;
315
+ justify-content: space-between;
316
+ gap: var(--spacing-2);
317
+ padding: var(--spacing-2) var(--spacing-3);
318
+ border-radius: var(--radius-sm);
319
+ font-size: var(--font-size-13);
320
+ line-height: var(--line-height-tight);
321
+ color: var(--color-text);
322
+ cursor: pointer;
323
+ user-select: none;
324
+ transition: background-color var(--transition-fast);
325
+ }
326
+
327
+ /* When a description is present, the content block becomes two-line;
328
+ * switch alignment so the checkbox aligns with the first line (label),
329
+ * not the visual centre between the two lines. */
330
+ .multi-combobox-option_e1a041f66:has(.multi-combobox-option-description_e1a041f66) {
331
+ align-items: flex-start;
332
+ }
333
+
334
+ .multi-combobox-option_e1a041f66:hover:not([data-disabled="true"]) {
335
+ background-color: var(--color-bg-neutral-subtle);
336
+ }
337
+
338
+ .multi-combobox-option_e1a041f66[data-active="true"]:not([data-disabled="true"]) {
339
+ background-color: var(--color-bg-neutral-subtle);
340
+ }
341
+
342
+ .multi-combobox-option_e1a041f66[data-disabled="true"] {
343
+ color: var(--color-text-disabled);
344
+ cursor: not-allowed;
345
+ }
346
+
347
+ .multi-combobox-option-content_e1a041f66 {
348
+ flex: 1;
349
+ min-width: 0;
350
+ display: flex;
351
+ flex-direction: column;
352
+ gap: 2px;
353
+ }
354
+
355
+ .multi-combobox-option-label_e1a041f66 {
356
+ display: block;
357
+ overflow: hidden;
358
+ text-overflow: ellipsis;
359
+ white-space: nowrap;
360
+ }
361
+
362
+ .multi-combobox-option-description_e1a041f66 {
363
+ display: block;
364
+ font-size: var(--font-size-11);
365
+ font-weight: var(--font-weight-regular);
366
+ color: var(--color-text-tertiary);
367
+ overflow: hidden;
368
+ text-overflow: ellipsis;
369
+ white-space: nowrap;
370
+ }
371
+
372
+ /* ===================================
373
+ * Match highlight
374
+ * =================================== */
375
+
376
+ .multi-combobox-mark_e1a041f66 {
377
+ background: transparent;
378
+ color: inherit;
379
+ font-weight: var(--font-weight-bold);
380
+ padding: 0;
381
+ }
382
+
383
+ /* ===================================
384
+ * Checkbox indicator (trailing, Stripe-style)
385
+ * =================================== */
386
+
387
+ .multi-combobox-checkbox_e1a041f66 {
388
+ flex-shrink: 0;
389
+ position: relative;
390
+ width: 16px;
391
+ height: 16px;
392
+ border: var(--border-width-1) solid var(--color-border-control);
393
+ border-radius: var(--radius-sm);
394
+ background-color: var(--color-bg-surface);
395
+ transition:
396
+ background-color var(--transition-fast),
397
+ border-color var(--transition-fast);
398
+ }
399
+
400
+ /* Align with the first line of content when a description pushes the
401
+ * option to two lines. Without this it would center between lines. */
402
+ .multi-combobox-option_e1a041f66:has(.multi-combobox-option-description_e1a041f66)
403
+ .multi-combobox-checkbox_e1a041f66 {
404
+ margin-top: 2px;
405
+ }
406
+
407
+ .multi-combobox-checkbox_e1a041f66[data-checked="true"] {
408
+ background-color: var(--color-bg-fill-accent);
409
+ border-color: var(--color-bg-fill-accent);
410
+ }
411
+
412
+ .multi-combobox-checkbox_e1a041f66[data-checked="true"]::before {
413
+ content: "";
414
+ position: absolute;
415
+ left: 5px;
416
+ top: 1px;
417
+ width: 4px;
418
+ height: 9px;
419
+ border: solid var(--color-text-on-accent);
420
+ border-width: 0 2px 2px 0;
421
+ transform: rotate(45deg);
422
+ }