@eldrajs/ui 0.2.1 → 0.2.2
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/CHANGELOG.md +6 -0
- package/README.md +114 -3
- package/dist/{VariantPicker-CKw8hmxt.js → VariantPicker-CqDAtSju.js} +208 -167
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/image/types.d.ts +2 -2
- package/dist/components/nav-menu/NavMenu.vue.d.ts +58 -0
- package/dist/components/nav-menu/NavMenuPanel.vue.d.ts +32 -0
- package/dist/components/nav-menu/navLinks.d.ts +27 -0
- package/dist/components/nav-menu/navMenuKeys.d.ts +17 -0
- package/dist/components/nav-menu/types.d.ts +62 -0
- package/dist/components.css +5468 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +984 -158
- package/dist/messages/en-US.d.ts +8 -0
- package/dist/messages/is-IS.js +4 -0
- package/dist/resolver.js +1 -0
- package/dist/style.css +552 -205
- package/dist/tailwind.css +221 -117
- package/dist/utils/sizes.d.ts +2 -0
- package/dist/vee-validate.js +1 -1
- package/package.json +3 -2
package/dist/tailwind.css
CHANGED
|
@@ -129,66 +129,90 @@
|
|
|
129
129
|
max-width: var(--eldra-container-wide);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
/* Type styles
|
|
132
|
+
/* Type styles, one per spec style. Weight reads `--tw-font-weight` so a `font-*` utility wins. */
|
|
133
133
|
@utility text-display {
|
|
134
|
-
font: var(--eldra-text-display-
|
|
135
|
-
|
|
134
|
+
font-family: var(--eldra-text-display-family);
|
|
135
|
+
font-size: var(--eldra-text-display-size);
|
|
136
|
+
line-height: var(--eldra-text-display-line);
|
|
137
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-display-weight));
|
|
136
138
|
letter-spacing: var(--eldra-text-display-tracking);
|
|
137
139
|
}
|
|
138
140
|
@utility text-h1 {
|
|
139
|
-
font: var(--eldra-text-h1-
|
|
140
|
-
|
|
141
|
+
font-family: var(--eldra-text-h1-family);
|
|
142
|
+
font-size: var(--eldra-text-h1-size);
|
|
143
|
+
line-height: var(--eldra-text-h1-line);
|
|
144
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-h1-weight));
|
|
141
145
|
letter-spacing: var(--eldra-text-h1-tracking);
|
|
142
146
|
}
|
|
143
147
|
@utility text-h2 {
|
|
144
|
-
font: var(--eldra-text-h2-
|
|
145
|
-
|
|
148
|
+
font-family: var(--eldra-text-h2-family);
|
|
149
|
+
font-size: var(--eldra-text-h2-size);
|
|
150
|
+
line-height: var(--eldra-text-h2-line);
|
|
151
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-h2-weight));
|
|
146
152
|
letter-spacing: var(--eldra-text-h2-tracking);
|
|
147
153
|
}
|
|
148
154
|
@utility text-h3 {
|
|
149
|
-
font: var(--eldra-text-h3-
|
|
150
|
-
|
|
155
|
+
font-family: var(--eldra-text-h3-family);
|
|
156
|
+
font-size: var(--eldra-text-h3-size);
|
|
157
|
+
line-height: var(--eldra-text-h3-line);
|
|
158
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-h3-weight));
|
|
151
159
|
letter-spacing: var(--eldra-text-h3-tracking);
|
|
152
160
|
}
|
|
153
161
|
@utility text-h4 {
|
|
154
|
-
font: var(--eldra-text-h4-
|
|
155
|
-
|
|
162
|
+
font-family: var(--eldra-text-h4-family);
|
|
163
|
+
font-size: var(--eldra-text-h4-size);
|
|
164
|
+
line-height: var(--eldra-text-h4-line);
|
|
165
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-h4-weight));
|
|
156
166
|
letter-spacing: var(--eldra-text-h4-tracking);
|
|
157
167
|
}
|
|
158
168
|
@utility text-body-lg {
|
|
159
|
-
font: var(--eldra-text-body-lg-
|
|
160
|
-
|
|
169
|
+
font-family: var(--eldra-text-body-lg-family);
|
|
170
|
+
font-size: var(--eldra-text-body-lg-size);
|
|
171
|
+
line-height: var(--eldra-text-body-lg-line);
|
|
172
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-lg-weight));
|
|
161
173
|
letter-spacing: var(--eldra-text-body-lg-tracking);
|
|
162
174
|
}
|
|
163
175
|
@utility text-body {
|
|
164
|
-
font: var(--eldra-text-body-
|
|
165
|
-
|
|
176
|
+
font-family: var(--eldra-text-body-family);
|
|
177
|
+
font-size: var(--eldra-text-body-size);
|
|
178
|
+
line-height: var(--eldra-text-body-line);
|
|
179
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
166
180
|
letter-spacing: var(--eldra-text-body-tracking);
|
|
167
181
|
}
|
|
168
182
|
@utility text-body-sm {
|
|
169
|
-
font: var(--eldra-text-body-sm-
|
|
170
|
-
|
|
183
|
+
font-family: var(--eldra-text-body-sm-family);
|
|
184
|
+
font-size: var(--eldra-text-body-sm-size);
|
|
185
|
+
line-height: var(--eldra-text-body-sm-line);
|
|
186
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-sm-weight));
|
|
171
187
|
letter-spacing: var(--eldra-text-body-sm-tracking);
|
|
172
188
|
}
|
|
173
189
|
@utility text-caption {
|
|
174
|
-
font: var(--eldra-text-caption-
|
|
175
|
-
|
|
190
|
+
font-family: var(--eldra-text-caption-family);
|
|
191
|
+
font-size: var(--eldra-text-caption-size);
|
|
192
|
+
line-height: var(--eldra-text-caption-line);
|
|
193
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-caption-weight));
|
|
176
194
|
letter-spacing: var(--eldra-text-caption-tracking);
|
|
177
195
|
}
|
|
178
196
|
@utility text-overline {
|
|
179
|
-
font: var(--eldra-text-overline-
|
|
180
|
-
|
|
197
|
+
font-family: var(--eldra-text-overline-family);
|
|
198
|
+
font-size: var(--eldra-text-overline-size);
|
|
199
|
+
line-height: var(--eldra-text-overline-line);
|
|
200
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-overline-weight));
|
|
181
201
|
letter-spacing: var(--eldra-text-overline-tracking);
|
|
182
202
|
text-transform: uppercase;
|
|
183
203
|
}
|
|
184
204
|
@utility text-label {
|
|
185
|
-
font: var(--eldra-text-label-
|
|
186
|
-
|
|
205
|
+
font-family: var(--eldra-text-label-family);
|
|
206
|
+
font-size: var(--eldra-text-label-size);
|
|
207
|
+
line-height: var(--eldra-text-label-line);
|
|
208
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
187
209
|
letter-spacing: var(--eldra-text-label-tracking);
|
|
188
210
|
}
|
|
189
211
|
@utility text-code {
|
|
190
|
-
font: var(--eldra-text-code-
|
|
191
|
-
|
|
212
|
+
font-family: var(--eldra-text-code-family);
|
|
213
|
+
font-size: var(--eldra-text-code-size);
|
|
214
|
+
line-height: var(--eldra-text-code-line);
|
|
215
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-code-weight));
|
|
192
216
|
letter-spacing: var(--eldra-text-code-tracking);
|
|
193
217
|
}
|
|
194
218
|
|
|
@@ -198,8 +222,10 @@
|
|
|
198
222
|
want); only the 1 line ratio has no token of its own, so — like `text-button-md`'s 1.2 — it is
|
|
199
223
|
a per-component variable with that literal default. */
|
|
200
224
|
@utility text-badge {
|
|
201
|
-
font: var(--eldra-
|
|
202
|
-
|
|
225
|
+
font-family: var(--eldra-font-body);
|
|
226
|
+
font-size: var(--eldra-text-caption-size);
|
|
227
|
+
line-height: var(--eldra-badge-line-height, 1);
|
|
228
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
203
229
|
letter-spacing: var(--eldra-text-caption-tracking);
|
|
204
230
|
}
|
|
205
231
|
|
|
@@ -210,8 +236,10 @@
|
|
|
210
236
|
badge text above, the status line is a short sentence rather than a tag, so it is allowed to
|
|
211
237
|
wrap on a narrow card rather than forcing `whitespace-nowrap`. */
|
|
212
238
|
@utility text-stock-status {
|
|
213
|
-
font: var(--eldra-
|
|
214
|
-
|
|
239
|
+
font-family: var(--eldra-font-body);
|
|
240
|
+
font-size: var(--eldra-text-body-sm-size);
|
|
241
|
+
line-height: var(--eldra-stock-status-line, 1.4);
|
|
242
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
215
243
|
}
|
|
216
244
|
|
|
217
245
|
/* The Logo item wordmark fallback (spec "Logo item" → Sizes, "Wordmark" row): "heading family,
|
|
@@ -222,8 +250,10 @@
|
|
|
222
250
|
`Button`'s `--eldra-button-font-size-lg` — it is a per-component variable with that literal
|
|
223
251
|
default. */
|
|
224
252
|
@utility text-logo-wordmark {
|
|
225
|
-
font: var(--eldra-text-h2-
|
|
226
|
-
|
|
253
|
+
font-family: var(--eldra-text-h2-family);
|
|
254
|
+
font-size: var(--eldra-logo-wordmark-size, 1.25rem);
|
|
255
|
+
line-height: var(--eldra-text-h2-line);
|
|
256
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-h2-weight));
|
|
227
257
|
letter-spacing: var(--eldra-text-h3-tracking);
|
|
228
258
|
}
|
|
229
259
|
|
|
@@ -245,7 +275,7 @@
|
|
|
245
275
|
above sets or inherits. */
|
|
246
276
|
@utility text-price-current {
|
|
247
277
|
font-family: var(--eldra-font-body);
|
|
248
|
-
font-weight: var(--eldra-text-label-weight);
|
|
278
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
249
279
|
font-variant-numeric: tabular-nums;
|
|
250
280
|
}
|
|
251
281
|
|
|
@@ -259,7 +289,7 @@
|
|
|
259
289
|
@utility text-price-secondary {
|
|
260
290
|
font-family: var(--eldra-font-body);
|
|
261
291
|
font-size: 0.9em;
|
|
262
|
-
font-weight: var(--eldra-text-body-weight);
|
|
292
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
263
293
|
font-variant-numeric: tabular-nums;
|
|
264
294
|
}
|
|
265
295
|
|
|
@@ -269,7 +299,7 @@
|
|
|
269
299
|
@utility text-price-unit {
|
|
270
300
|
font-family: var(--eldra-font-body);
|
|
271
301
|
font-size: var(--eldra-text-caption-size);
|
|
272
|
-
font-weight: var(--eldra-text-body-weight);
|
|
302
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
273
303
|
font-variant-numeric: tabular-nums;
|
|
274
304
|
}
|
|
275
305
|
|
|
@@ -290,16 +320,22 @@
|
|
|
290
320
|
own font size. sm and md reuse the body-sm and body token sizes; lg's 1.0625rem sits between two
|
|
291
321
|
type styles and has no token, so it is a per-component variable with that default. */
|
|
292
322
|
@utility text-button-sm {
|
|
293
|
-
font: var(--eldra-
|
|
294
|
-
|
|
323
|
+
font-family: var(--eldra-font-body);
|
|
324
|
+
font-size: var(--eldra-text-body-sm-size);
|
|
325
|
+
line-height: var(--eldra-button-line-height, 1.2);
|
|
326
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
295
327
|
}
|
|
296
328
|
@utility text-button-md {
|
|
297
|
-
font: var(--eldra-
|
|
298
|
-
|
|
329
|
+
font-family: var(--eldra-font-body);
|
|
330
|
+
font-size: var(--eldra-text-body-size);
|
|
331
|
+
line-height: var(--eldra-button-line-height, 1.2);
|
|
332
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
299
333
|
}
|
|
300
334
|
@utility text-button-lg {
|
|
301
|
-
font: var(--eldra-
|
|
302
|
-
|
|
335
|
+
font-family: var(--eldra-font-body);
|
|
336
|
+
font-size: var(--eldra-button-font-size-lg, 1.0625rem);
|
|
337
|
+
line-height: var(--eldra-button-line-height, 1.2);
|
|
338
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
303
339
|
}
|
|
304
340
|
|
|
305
341
|
/* Compact-control type (spec "Actions and forms" → Compact controls, and "Input" → Sizes): the
|
|
@@ -313,20 +349,28 @@
|
|
|
313
349
|
is 48rem, which is the edge the spec measures for this rule — a viewport query, not the block
|
|
314
350
|
`@max-tablet` container query the spec's own button touch-target growth would have measured). */
|
|
315
351
|
@utility text-control-sm {
|
|
316
|
-
font: var(--eldra-
|
|
317
|
-
|
|
352
|
+
font-family: var(--eldra-font-body);
|
|
353
|
+
font-size: var(--eldra-text-body-sm-size);
|
|
354
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
355
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
318
356
|
}
|
|
319
357
|
@utility text-control {
|
|
320
|
-
font: var(--eldra-
|
|
321
|
-
|
|
358
|
+
font-family: var(--eldra-font-body);
|
|
359
|
+
font-size: var(--eldra-control-font-size, 0.9375rem);
|
|
360
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
361
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
322
362
|
}
|
|
323
363
|
@utility text-control-lg {
|
|
324
|
-
font: var(--eldra-
|
|
325
|
-
|
|
364
|
+
font-family: var(--eldra-font-body);
|
|
365
|
+
font-size: var(--eldra-text-body-size);
|
|
366
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
367
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
326
368
|
}
|
|
327
369
|
@utility text-control-mobile {
|
|
328
|
-
font: var(--eldra-
|
|
329
|
-
|
|
370
|
+
font-family: var(--eldra-font-body);
|
|
371
|
+
font-size: var(--eldra-control-font-size-mobile, 1rem);
|
|
372
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
373
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
330
374
|
}
|
|
331
375
|
|
|
332
376
|
/* A field's character counter (spec "Textarea" → Sizes, Counter row): "0.8125rem, line-height
|
|
@@ -366,8 +410,10 @@
|
|
|
366
410
|
that literal default. The card's hint reuses `text-body-sm` `muted`, exactly as `Checkbox`'s
|
|
367
411
|
hint does. */
|
|
368
412
|
@utility text-card-title {
|
|
369
|
-
font: var(--eldra-
|
|
370
|
-
|
|
413
|
+
font-family: var(--eldra-font-body);
|
|
414
|
+
font-size: var(--eldra-text-body-size);
|
|
415
|
+
line-height: var(--eldra-radio-card-title-line, 1.4);
|
|
416
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
371
417
|
}
|
|
372
418
|
|
|
373
419
|
/* Accordion's label (spec "Accordion" → Sizes, "Label" row): "1.0625rem / 1.4, weight 600" —
|
|
@@ -376,34 +422,36 @@
|
|
|
376
422
|
and the body family, with the 1.4 line ratio as a per-component variable carrying that literal
|
|
377
423
|
default. */
|
|
378
424
|
@utility text-accordion-title {
|
|
379
|
-
font: var(--eldra-
|
|
380
|
-
|
|
425
|
+
font-family: var(--eldra-font-body);
|
|
426
|
+
font-size: 1.0625rem;
|
|
427
|
+
line-height: var(--eldra-accordion-title-line, 1.4);
|
|
428
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
381
429
|
}
|
|
382
430
|
|
|
383
431
|
/* The Quantity stepper's value (spec "Quantity stepper" → Sizes): "0.9375rem, 600, tabular" at
|
|
384
432
|
`md`, "0.875rem" at `sm` (weight and line stay the same size only). The size matches
|
|
385
|
-
`text-control`/`text-control-sm` exactly
|
|
386
|
-
bakes in `--eldra-text-body-weight` (400), and layering a `font-semibold` utility after a
|
|
387
|
-
shorthand `font` property is order-dependent (see `text-counter`'s own comment above) — so this
|
|
388
|
-
is its own utility rather than `text-control` plus an override, reusing `--eldra-text-label-
|
|
389
|
-
weight` (600) as `text-card-title` does for the same reason. */
|
|
433
|
+
`text-control`/`text-control-sm` exactly; the weight reuses `--eldra-text-label-weight` (600). */
|
|
390
434
|
@utility text-stepper-value {
|
|
391
|
-
font: var(--eldra-
|
|
392
|
-
|
|
435
|
+
font-family: var(--eldra-font-body);
|
|
436
|
+
font-size: var(--eldra-control-font-size, 0.9375rem);
|
|
437
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
438
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
393
439
|
}
|
|
394
440
|
@utility text-stepper-value-sm {
|
|
395
|
-
font: var(--eldra-
|
|
396
|
-
|
|
441
|
+
font-family: var(--eldra-font-body);
|
|
442
|
+
font-size: var(--eldra-text-body-sm-size);
|
|
443
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
444
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
397
445
|
}
|
|
398
446
|
|
|
399
447
|
/* `FilterGroup`'s trigger label (spec "Filter panel" → Sizes, "Trigger" row): "0.9375rem weight
|
|
400
|
-
600, left-aligned" — the same size and line as `text-control`,
|
|
401
|
-
|
|
402
|
-
explains, so a trailing `font-semibold` is order-dependent rather than reliable. Its own
|
|
403
|
-
utility, reusing `--eldra-text-label-weight` (600), the same shape as `text-stepper-value`. */
|
|
448
|
+
600, left-aligned" — the same size and line as `text-control`, at `--eldra-text-label-weight`
|
|
449
|
+
(600), the same shape as `text-stepper-value`. */
|
|
404
450
|
@utility text-filter-trigger {
|
|
405
|
-
font: var(--eldra-
|
|
406
|
-
|
|
451
|
+
font-family: var(--eldra-font-body);
|
|
452
|
+
font-size: var(--eldra-control-font-size, 0.9375rem);
|
|
453
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
454
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
407
455
|
}
|
|
408
456
|
|
|
409
457
|
/* `EmptyState`'s title (spec "Empty and error states" → Sizes, "Title" row): "heading family,
|
|
@@ -413,8 +461,10 @@
|
|
|
413
461
|
per-component variables with that literal default, the same shape as `text-counter`'s 1.5 — see
|
|
414
462
|
the README's Customisation table for `--eldra-empty-state-title-size`. */
|
|
415
463
|
@utility text-empty-state-title {
|
|
416
|
-
font: var(--eldra-
|
|
417
|
-
|
|
464
|
+
font-family: var(--eldra-font-heading);
|
|
465
|
+
font-size: var(--eldra-empty-state-title-size, 1.25rem);
|
|
466
|
+
line-height: var(--eldra-empty-state-title-line, 1.3);
|
|
467
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
418
468
|
}
|
|
419
469
|
|
|
420
470
|
/* `ContentCard`'s title (spec "Content card" → Sizes, "Title" row): "heading family, 1.25rem,
|
|
@@ -427,8 +477,10 @@
|
|
|
427
477
|
default — the same shape as `text-empty-state-title`'s own — see the README's Customisation
|
|
428
478
|
table for `--eldra-content-card-title-size`. */
|
|
429
479
|
@utility text-content-card-title {
|
|
430
|
-
font: var(--eldra-
|
|
431
|
-
|
|
480
|
+
font-family: var(--eldra-font-heading);
|
|
481
|
+
font-size: var(--eldra-content-card-title-size, 1.25rem);
|
|
482
|
+
line-height: var(--eldra-content-card-title-line, 1.3);
|
|
483
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
432
484
|
letter-spacing: var(--eldra-text-h3-tracking);
|
|
433
485
|
}
|
|
434
486
|
|
|
@@ -443,7 +495,7 @@
|
|
|
443
495
|
font-family: var(--eldra-font-body);
|
|
444
496
|
font-size: var(--eldra-content-card-excerpt-size, 0.9375rem);
|
|
445
497
|
line-height: var(--eldra-content-card-excerpt-line, 1.5);
|
|
446
|
-
font-weight: var(--eldra-text-body-weight);
|
|
498
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
447
499
|
}
|
|
448
500
|
|
|
449
501
|
/* Control heights and targets. */
|
|
@@ -1026,16 +1078,20 @@
|
|
|
1026
1078
|
the "with description" paragraph: "line-height 1.4"), so — like `text-card-title`'s 1.4 before
|
|
1027
1079
|
it — it is a per-component variable with that literal default. */
|
|
1028
1080
|
@utility text-switch-label {
|
|
1029
|
-
font: var(--eldra-
|
|
1030
|
-
|
|
1081
|
+
font-family: var(--eldra-font-body);
|
|
1082
|
+
font-size: var(--eldra-text-body-size);
|
|
1083
|
+
line-height: var(--eldra-switch-label-line, 1.4);
|
|
1084
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
1031
1085
|
}
|
|
1032
1086
|
|
|
1033
1087
|
/* The Switch description (spec "Switch" → Sizes: "the description is 0.875rem `muted`", and the
|
|
1034
1088
|
same paragraph's "line-height 1.4"). 0.875rem already reads the body-sm token's size; the line
|
|
1035
1089
|
ratio is this component's own, exactly like `text-switch-label` above. */
|
|
1036
1090
|
@utility text-switch-description {
|
|
1037
|
-
font: var(--eldra-
|
|
1038
|
-
|
|
1091
|
+
font-family: var(--eldra-font-body);
|
|
1092
|
+
font-size: var(--eldra-text-body-sm-size);
|
|
1093
|
+
line-height: var(--eldra-switch-description-line, 1.4);
|
|
1094
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
1039
1095
|
}
|
|
1040
1096
|
|
|
1041
1097
|
/* --- Select ---------------------------------------------------------------------------------- */
|
|
@@ -1045,8 +1101,10 @@
|
|
|
1045
1101
|
already; the spec's 0.06em is half the overline token's 0.12em, so it is this component's own
|
|
1046
1102
|
and gets a variable with that literal default, exactly like `text-card-title`'s 1.4 line. */
|
|
1047
1103
|
@utility text-select-group {
|
|
1048
|
-
font: var(--eldra-
|
|
1049
|
-
|
|
1104
|
+
font-family: var(--eldra-font-body);
|
|
1105
|
+
font-size: var(--eldra-text-overline-size);
|
|
1106
|
+
line-height: var(--eldra-text-overline-line);
|
|
1107
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-overline-weight));
|
|
1050
1108
|
letter-spacing: var(--eldra-select-group-tracking, 0.06em);
|
|
1051
1109
|
text-transform: uppercase;
|
|
1052
1110
|
}
|
|
@@ -1057,18 +1115,21 @@
|
|
|
1057
1115
|
deliberately not `text-control`, whose fixed 1.5rem line is the height of a 2.5rem field box and
|
|
1058
1116
|
would push a two-line option (label + hint) past the spec's row. */
|
|
1059
1117
|
@utility text-select-option {
|
|
1060
|
-
font: var(--eldra-
|
|
1061
|
-
|
|
1118
|
+
font-family: var(--eldra-font-body);
|
|
1119
|
+
font-size: var(--eldra-control-font-size, 0.9375rem);
|
|
1120
|
+
line-height: var(--eldra-select-option-line, 1.35);
|
|
1121
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
1062
1122
|
}
|
|
1063
1123
|
|
|
1064
1124
|
/* The "+N" pill on a Multi-select trigger (spec "Multi-select" -> Sizes: "0.75rem 600 tabular").
|
|
1065
1125
|
The overline token carries both numbers, but `text-overline` itself is uppercase — which "+2"
|
|
1066
1126
|
must not be — so the pill takes the token pair without the transform, on the pill's own 1.25rem
|
|
1067
|
-
height as its line box.
|
|
1068
|
-
it. */
|
|
1127
|
+
height as its line box. */
|
|
1069
1128
|
@utility text-select-pill {
|
|
1070
|
-
font: var(--eldra-
|
|
1071
|
-
|
|
1129
|
+
font-family: var(--eldra-font-body);
|
|
1130
|
+
font-size: var(--eldra-text-overline-size);
|
|
1131
|
+
line-height: var(--eldra-select-pill-line, 1.25rem);
|
|
1132
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-overline-weight));
|
|
1072
1133
|
font-variant-numeric: tabular-nums;
|
|
1073
1134
|
}
|
|
1074
1135
|
|
|
@@ -1216,30 +1277,33 @@
|
|
|
1216
1277
|
tabular" — a price. Both numbers already read tokens (`text-label-weight` is 600,
|
|
1217
1278
|
`text-body-sm-size` is 0.875rem); only the 1.35 line of the row's text stack is this component's
|
|
1218
1279
|
own, and it is shared with the row's title, which reuses `text-select-option` (the same
|
|
1219
|
-
0.9375rem on the same 1.35 line the spec gives both components).
|
|
1220
|
-
after the `font` shorthand, which resets it. */
|
|
1280
|
+
0.9375rem on the same 1.35 line the spec gives both components). */
|
|
1221
1281
|
@utility text-search-meta {
|
|
1222
|
-
font: var(--eldra-
|
|
1223
|
-
|
|
1282
|
+
font-family: var(--eldra-font-body);
|
|
1283
|
+
font-size: var(--eldra-text-body-sm-size);
|
|
1284
|
+
line-height: var(--eldra-search-text-line, 1.35);
|
|
1285
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
1224
1286
|
font-variant-numeric: tabular-nums;
|
|
1225
1287
|
}
|
|
1226
1288
|
|
|
1227
1289
|
/* The no-results title (spec -> Sizes, "No-results message" row): "Title 1rem 600". The size and
|
|
1228
1290
|
the weight are tokens; the 1.4 line has none of its own, so it is a per-component variable with
|
|
1229
|
-
that literal default, exactly like `text-card-title`'s.
|
|
1230
|
-
weight layered over `text-body`, because layering `font-semibold` after a shorthand `font`
|
|
1231
|
-
property that already bakes in a weight is order-dependent (see `text-counter`'s comment). */
|
|
1291
|
+
that literal default, exactly like `text-card-title`'s. */
|
|
1232
1292
|
@utility text-search-title {
|
|
1233
|
-
font: var(--eldra-
|
|
1234
|
-
|
|
1293
|
+
font-family: var(--eldra-font-body);
|
|
1294
|
+
font-size: var(--eldra-text-body-size);
|
|
1295
|
+
line-height: var(--eldra-search-empty-line, 1.4);
|
|
1296
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
1235
1297
|
}
|
|
1236
1298
|
|
|
1237
1299
|
/* The `/` keyboard-key chip (spec -> Sizes, "Keyboard hint" row): "monospace, 0.75rem". The size
|
|
1238
1300
|
is the overline token's, the family the mono token's, and the 1rem line box is the chip's own
|
|
1239
1301
|
height rather than a ratio. */
|
|
1240
1302
|
@utility text-search-kbd {
|
|
1241
|
-
font: var(--eldra-
|
|
1242
|
-
|
|
1303
|
+
font-family: var(--eldra-font-mono);
|
|
1304
|
+
font-size: var(--eldra-text-overline-size);
|
|
1305
|
+
line-height: var(--eldra-search-kbd-line, 1rem);
|
|
1306
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
1243
1307
|
}
|
|
1244
1308
|
|
|
1245
1309
|
/* The results panel's own box (spec -> Sizes, Panel row): "Max height min(32rem, 70vh), scrolls
|
|
@@ -1400,23 +1464,31 @@
|
|
|
1400
1464
|
`sm` (`Avatar.vue`'s own comment) rather than a fifth type style, since the spec's States table
|
|
1401
1465
|
gives it the identical treatment ("Initials / '+N' … `text`"). */
|
|
1402
1466
|
@utility text-avatar-initials-sm {
|
|
1403
|
-
font: var(--eldra-
|
|
1404
|
-
|
|
1467
|
+
font-family: var(--eldra-font-body);
|
|
1468
|
+
font-size: var(--eldra-avatar-initials-size-sm, 0.76rem);
|
|
1469
|
+
line-height: 1;
|
|
1470
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
1405
1471
|
letter-spacing: var(--eldra-avatar-initials-tracking, 0.02em);
|
|
1406
1472
|
}
|
|
1407
1473
|
@utility text-avatar-initials-md {
|
|
1408
|
-
font: var(--eldra-
|
|
1409
|
-
|
|
1474
|
+
font-family: var(--eldra-font-body);
|
|
1475
|
+
font-size: var(--eldra-avatar-initials-size-md, 0.95rem);
|
|
1476
|
+
line-height: 1;
|
|
1477
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
1410
1478
|
letter-spacing: var(--eldra-avatar-initials-tracking, 0.02em);
|
|
1411
1479
|
}
|
|
1412
1480
|
@utility text-avatar-initials-lg {
|
|
1413
|
-
font: var(--eldra-
|
|
1414
|
-
|
|
1481
|
+
font-family: var(--eldra-font-body);
|
|
1482
|
+
font-size: var(--eldra-avatar-initials-size-lg, 1.33rem);
|
|
1483
|
+
line-height: 1;
|
|
1484
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
1415
1485
|
letter-spacing: var(--eldra-avatar-initials-tracking, 0.02em);
|
|
1416
1486
|
}
|
|
1417
1487
|
@utility text-avatar-initials-xl {
|
|
1418
|
-
font: var(--eldra-
|
|
1419
|
-
|
|
1488
|
+
font-family: var(--eldra-font-body);
|
|
1489
|
+
font-size: var(--eldra-avatar-initials-size-xl, 2.28rem);
|
|
1490
|
+
line-height: 1;
|
|
1491
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
1420
1492
|
letter-spacing: var(--eldra-avatar-initials-tracking, 0.02em);
|
|
1421
1493
|
}
|
|
1422
1494
|
|
|
@@ -1481,8 +1553,10 @@
|
|
|
1481
1553
|
sit between two type styles with no token of their own, so, like `Button`'s `lg` size, they are
|
|
1482
1554
|
per-component variables with the spec's literals as defaults. */
|
|
1483
1555
|
@utility text-dialog-title {
|
|
1484
|
-
font: var(--eldra-
|
|
1485
|
-
|
|
1556
|
+
font-family: var(--eldra-font-heading);
|
|
1557
|
+
font-size: var(--eldra-dialog-title-size, 1.25rem);
|
|
1558
|
+
line-height: var(--eldra-dialog-title-line, 1.3);
|
|
1559
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-h3-weight));
|
|
1486
1560
|
letter-spacing: var(--eldra-text-h3-tracking);
|
|
1487
1561
|
}
|
|
1488
1562
|
|
|
@@ -1564,8 +1638,10 @@
|
|
|
1564
1638
|
rather than a shared one: a consumer restyling one component's title should not have to think
|
|
1565
1639
|
about whether the other one moves with it. */
|
|
1566
1640
|
@utility text-drawer-title {
|
|
1567
|
-
font: var(--eldra-
|
|
1568
|
-
|
|
1641
|
+
font-family: var(--eldra-font-heading);
|
|
1642
|
+
font-size: var(--eldra-drawer-title-size, 1.25rem);
|
|
1643
|
+
line-height: var(--eldra-drawer-title-line, 1.3);
|
|
1644
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-h3-weight));
|
|
1569
1645
|
letter-spacing: var(--eldra-text-h3-tracking);
|
|
1570
1646
|
}
|
|
1571
1647
|
|
|
@@ -1636,8 +1712,10 @@
|
|
|
1636
1712
|
its own, so, like `text-button-lg`'s identical number, it is a per-component variable with the
|
|
1637
1713
|
spec's literal as its default. */
|
|
1638
1714
|
@utility text-search-modal-field {
|
|
1639
|
-
font: var(--eldra-
|
|
1640
|
-
|
|
1715
|
+
font-family: var(--eldra-font-body);
|
|
1716
|
+
font-size: var(--eldra-search-modal-field-size, 1.0625rem);
|
|
1717
|
+
line-height: var(--eldra-control-line-height, 1.5rem);
|
|
1718
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
1641
1719
|
}
|
|
1642
1720
|
|
|
1643
1721
|
/* The foot's own text (spec "Search modal" → Sizes, Foot row): "0.75rem `muted` text on `surface`".
|
|
@@ -1645,16 +1723,20 @@
|
|
|
1645
1723
|
copy, not an uppercase, tracked label — so it is its own utility rather than that one plus an
|
|
1646
1724
|
override. */
|
|
1647
1725
|
@utility text-search-modal-foot {
|
|
1648
|
-
font: var(--eldra-
|
|
1649
|
-
|
|
1726
|
+
font-family: var(--eldra-font-body);
|
|
1727
|
+
font-size: var(--eldra-search-modal-foot-size, 0.75rem);
|
|
1728
|
+
line-height: var(--eldra-search-modal-foot-line, 1.4);
|
|
1729
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
1650
1730
|
}
|
|
1651
1731
|
|
|
1652
1732
|
/* The foot's key caps (spec, same row): "monospace 0.6875rem, min-width 1.25rem" — smaller than
|
|
1653
1733
|
`text-search-kbd` (the Search bar's own inline `/` chip, 0.75rem), for a denser row of three
|
|
1654
1734
|
hints. */
|
|
1655
1735
|
@utility text-search-modal-kbd {
|
|
1656
|
-
font: var(--eldra-
|
|
1657
|
-
|
|
1736
|
+
font-family: var(--eldra-font-mono);
|
|
1737
|
+
font-size: var(--eldra-search-modal-kbd-size, 0.6875rem);
|
|
1738
|
+
line-height: 1rem;
|
|
1739
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
1658
1740
|
}
|
|
1659
1741
|
|
|
1660
1742
|
/* The dialog's own box (spec "Search modal" → Sizes, Dialog row): "min(40rem, 100vw − 2rem) wide;
|
|
@@ -1705,8 +1787,10 @@
|
|
|
1705
1787
|
0.9375rem and `text-dialog-title`'s 1.25rem — so it is a per-component variable with that literal
|
|
1706
1788
|
default. No line-height is given, so, like `text-stock-status`'s 1.4, it gets one too. */
|
|
1707
1789
|
@utility text-toast-title {
|
|
1708
|
-
font: var(--eldra-
|
|
1709
|
-
|
|
1790
|
+
font-family: var(--eldra-font-body);
|
|
1791
|
+
font-size: var(--eldra-toast-title-size, 0.9375rem);
|
|
1792
|
+
line-height: var(--eldra-toast-title-line, 1.4);
|
|
1793
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
1710
1794
|
}
|
|
1711
1795
|
|
|
1712
1796
|
/* The toast's own entrance (spec "Toast" -> Behaviour & motion): "Enter: fade in with a 0.5rem
|
|
@@ -2001,7 +2085,7 @@
|
|
|
2001
2085
|
font-family: var(--eldra-font-body);
|
|
2002
2086
|
font-size: var(--eldra-text-overline-size);
|
|
2003
2087
|
line-height: var(--eldra-text-overline-line);
|
|
2004
|
-
font-weight: var(--eldra-text-label-weight);
|
|
2088
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-label-weight));
|
|
2005
2089
|
letter-spacing: var(--eldra-filter-subheading-tracking, 0.06em);
|
|
2006
2090
|
text-transform: uppercase;
|
|
2007
2091
|
}
|
|
@@ -2015,7 +2099,7 @@
|
|
|
2015
2099
|
font-family: var(--eldra-font-body);
|
|
2016
2100
|
font-size: var(--eldra-text-overline-size);
|
|
2017
2101
|
line-height: var(--eldra-text-caption-line);
|
|
2018
|
-
font-weight: var(--eldra-text-body-weight);
|
|
2102
|
+
font-weight: var(--tw-font-weight, var(--eldra-text-body-weight));
|
|
2019
2103
|
}
|
|
2020
2104
|
|
|
2021
2105
|
/* A colour swatch's own edge (spec → Sizes, Swatch row: "Swatch 1.5rem circle with a 1px inner
|
|
@@ -2055,3 +2139,23 @@
|
|
|
2055
2139
|
border-start-start-radius: var(--eldra-filter-histogram-bar-radius, 1px);
|
|
2056
2140
|
border-start-end-radius: var(--eldra-filter-histogram-bar-radius, 1px);
|
|
2057
2141
|
}
|
|
2142
|
+
|
|
2143
|
+
/* --- Nav menu --------------------------------------------------------------------------------- */
|
|
2144
|
+
|
|
2145
|
+
/* The gap under the bar is the panel's own padding, so a hovering pointer never leaves the menu. */
|
|
2146
|
+
@utility eldra-nav-menu-panel {
|
|
2147
|
+
padding-top: var(--eldra-nav-menu-offset, var(--eldra-space-2));
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
@utility eldra-nav-menu-dropdown {
|
|
2151
|
+
width: max-content;
|
|
2152
|
+
min-width: var(--eldra-nav-menu-dropdown-min, 14rem);
|
|
2153
|
+
max-width: min(var(--eldra-nav-menu-dropdown-max, 24rem), calc(100vw - 2rem));
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
@utility eldra-nav-menu-columns {
|
|
2157
|
+
grid-template-columns: repeat(
|
|
2158
|
+
auto-fit,
|
|
2159
|
+
minmax(min(100%, var(--eldra-nav-menu-column-min, 12rem)), 1fr)
|
|
2160
|
+
);
|
|
2161
|
+
}
|
package/dist/vee-validate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as CurrencyInput_default, b as focusInvalid, d as MultiSelect_default, ht as useMessages, i as SearchBar_default, it as CheckboxGroup_default, k as UnitInput_default, l as RadioGroup_default, n as Textarea_default, ot as Checkbox_default, r as Select_default, st as FIELD_KEY, t as VariantPicker_default, u as QuantityStepper_default, w as Input_default, x as Switch_default, y as FormLayout_default, yt as useUiId } from "./VariantPicker-
|
|
1
|
+
import { O as CurrencyInput_default, b as focusInvalid, d as MultiSelect_default, ht as useMessages, i as SearchBar_default, it as CheckboxGroup_default, k as UnitInput_default, l as RadioGroup_default, n as Textarea_default, ot as Checkbox_default, r as Select_default, st as FIELD_KEY, t as VariantPicker_default, u as QuantityStepper_default, w as Input_default, x as Switch_default, y as FormLayout_default, yt as useUiId } from "./VariantPicker-CqDAtSju.js";
|
|
2
2
|
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createSlots, createTextVNode, defineComponent, guardReactiveProps, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, onMounted, onScopeDispose, openBlock, provide, ref, renderList, renderSlot, toDisplayString, unref, watch, withCtx } from "vue";
|
|
3
3
|
import { FormContextKey, useField, useForm } from "vee-validate";
|
|
4
4
|
//#region src/vee-validate/context.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eldrajs/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Accessible Vue 3 core components for Eldra storefronts: buttons, forms, selects, cards, overlays and navigation, themed through CSS design tokens.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessible",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"./tokens.css": "./dist/tokens.css",
|
|
48
48
|
"./tailwind.css": "./dist/tailwind.css",
|
|
49
49
|
"./style.css": "./dist/style.css",
|
|
50
|
+
"./components.css": "./dist/components.css",
|
|
50
51
|
"./package.json": "./package.json"
|
|
51
52
|
},
|
|
52
53
|
"publishConfig": {
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"@floating-ui/vue": "^1.1.5",
|
|
58
59
|
"tailwind-merge": "^3.0.0",
|
|
59
|
-
"@eldrajs/sdk": "^0.3.
|
|
60
|
+
"@eldrajs/sdk": "^0.3.2"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@playwright/test": "1.62.1",
|