@visitwonders/assembly 0.15.0 → 0.16.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/README.md +8 -0
- package/dist/_app_/data/pagination-cluster.js +1 -0
- package/dist/_app_/data/pagination.js +1 -0
- package/dist/action/button.css +30 -19
- package/dist/data/index.js +1 -0
- package/dist/data/index.js.map +1 -1
- package/dist/data/pagination-cluster.js +106 -0
- package/dist/data/pagination-cluster.js.map +1 -0
- package/dist/data/pagination.css +216 -0
- package/dist/data/pagination.js +287 -0
- package/dist/data/pagination.js.map +1 -0
- package/dist/form/calendar.css +6 -6
- package/dist/form/checkbox.css +25 -24
- package/dist/form/date-range-picker.css +1 -1
- package/dist/form/input.css +16 -15
- package/dist/form/multi-combobox.css +2 -2
- package/dist/form/multi-select.css +2 -2
- package/dist/form/radio.css +19 -16
- package/dist/form/toggle.css +4 -2
- package/dist/status/tag.css +2 -2
- package/dist/styles/semantic/colors.css +31 -5
- package/dist/styles/semantic/component.css +154 -0
- package/dist/styles/semantic/effects.css +9 -3
- package/dist/styles/semantic/typography.css +60 -0
- package/dist/styles/tokens.css +3 -0
- package/dist/styles.css +258 -8
- package/dist/typography/{heading-css-726c4c3109f2b741657733e1ba103c67.css → heading-css-eca8b0ae619f69fcbe9535f4700db421.css} +35 -3
- package/dist/typography/heading.js +34 -39
- package/dist/typography/{text-css-935f55e9cd74b06a5ce61330c4c79ef9.css → text-css-a4c06f76a813db6b613c4f3c22e6bb85.css} +23 -9
- package/dist/typography/text.js +1 -1
- package/package.json +6 -6
package/dist/styles.css
CHANGED
|
@@ -296,6 +296,15 @@
|
|
|
296
296
|
--color-bg-inverse: var(--gray-900); /* Dark background for contrast */
|
|
297
297
|
--color-bg-disabled: var(--gray-100); /* Disabled backgrounds */
|
|
298
298
|
|
|
299
|
+
/* Status Surfaces — for panels, banners, callouts, toasts.
|
|
300
|
+
Distinct from `bg-{semantic}-subtle` (tinted hover/badge backgrounds)
|
|
301
|
+
and `bg-fill-{semantic}` (solid status fills). Surface tier sits at
|
|
302
|
+
the same level as `bg-surface` but carries status sentiment. */
|
|
303
|
+
--color-bg-surface-success: var(--green-50);
|
|
304
|
+
--color-bg-surface-warning: var(--amber-50);
|
|
305
|
+
--color-bg-surface-critical: var(--red-50);
|
|
306
|
+
--color-bg-surface-info: var(--cyan-50);
|
|
307
|
+
|
|
299
308
|
/* Hover States */
|
|
300
309
|
--color-bg-hover-subtle: var(--gray-50);
|
|
301
310
|
|
|
@@ -312,13 +321,19 @@
|
|
|
312
321
|
--color-bg-fill-interactive-selected: var(--gray-175);
|
|
313
322
|
--color-bg-fill-interactive-disabled: var(--gray-50);
|
|
314
323
|
|
|
315
|
-
/* Accent Fill (Selected controls — checkboxes, toggles, radios
|
|
324
|
+
/* Accent Fill (Selected controls — checkboxes, toggles, radios,
|
|
325
|
+
calendar selected day, multi-select chips, date-range fill) */
|
|
316
326
|
--color-bg-fill-accent: var(--indigo-500);
|
|
317
327
|
--color-bg-fill-accent-hover: var(--indigo-600);
|
|
318
328
|
--color-bg-fill-accent-active: var(--indigo-700);
|
|
319
329
|
--color-bg-fill-accent-disabled: var(--indigo-300);
|
|
320
330
|
|
|
321
|
-
/*
|
|
331
|
+
/* Accent Fill — Subtle (tinted accent backgrounds, e.g. table row
|
|
332
|
+
selected). Sits in the same range as the other `*-subtle` tints. */
|
|
333
|
+
--color-bg-fill-accent-subtle: var(--indigo-50);
|
|
334
|
+
--color-bg-fill-accent-subtle-hover: var(--indigo-100);
|
|
335
|
+
|
|
336
|
+
/* reserved — no consumers yet, validate value when first used */
|
|
322
337
|
--color-bg-fill-secondary: var(--cyan-600);
|
|
323
338
|
--color-bg-fill-secondary-hover: var(--cyan-700);
|
|
324
339
|
--color-bg-fill-secondary-active: var(--cyan-800);
|
|
@@ -414,6 +429,15 @@
|
|
|
414
429
|
--color-border-control-active: var(--gray-500);
|
|
415
430
|
--color-border-control-disabled: var(--gray-300);
|
|
416
431
|
--color-border-control-readonly: var(--gray-300);
|
|
432
|
+
/* Aliased to `--color-border-critical` so consumers reach for the
|
|
433
|
+
error-state intent rather than the raw critical token. */
|
|
434
|
+
--color-border-control-error: var(--color-border-critical);
|
|
435
|
+
|
|
436
|
+
/* Control Fill — Checked (selected affordance for checkbox, toggle,
|
|
437
|
+
radio, multi-select, multi-combobox, calendar selected day,
|
|
438
|
+
date-range range fill). Aliased to `--color-bg-fill-accent` so all
|
|
439
|
+
"checked/selected" controls share one anchor. */
|
|
440
|
+
--color-bg-control-checked: var(--color-bg-fill-accent);
|
|
417
441
|
|
|
418
442
|
/* Brand/Primary Border */
|
|
419
443
|
--color-border-primary: var(--indigo-700);
|
|
@@ -421,9 +445,11 @@
|
|
|
421
445
|
/* Focus Border */
|
|
422
446
|
--color-border-focus: var(--indigo-500);
|
|
423
447
|
|
|
424
|
-
/* Focus Ring
|
|
425
|
-
|
|
426
|
-
|
|
448
|
+
/* Focus Ring — two-stop composite (WCAG 2.2 non-text-contrast).
|
|
449
|
+
`inner` separates the ring from the focused element; `outer` carries
|
|
450
|
+
the ring colour. Composed in `effects.css` as `--focus-ring`. */
|
|
451
|
+
--color-focus-ring-inner: var(--white);
|
|
452
|
+
--color-focus-ring-outer: var(--indigo-500);
|
|
427
453
|
|
|
428
454
|
/* Semantic Borders */
|
|
429
455
|
--color-border-neutral: var(--gray-900);
|
|
@@ -500,6 +526,66 @@
|
|
|
500
526
|
--letter-spacing-tight: -0.025em;
|
|
501
527
|
--letter-spacing-normal: 0;
|
|
502
528
|
--letter-spacing-wide: 0.025em;
|
|
529
|
+
|
|
530
|
+
/* ===================================
|
|
531
|
+
* Typography Roles — Bundled Sub-tokens
|
|
532
|
+
*
|
|
533
|
+
* Role names (display | page | section | subsection for headings;
|
|
534
|
+
* sm | md | lg for body) survive a redesign that re-scales the type
|
|
535
|
+
* ramp. Components consume the four sub-tokens (size, weight, leading,
|
|
536
|
+
* tracking) per role rather than composing atomic font-size +
|
|
537
|
+
* line-height + weight per call site. Sub-tokens not `font:`
|
|
538
|
+
* shorthand — shorthand resets font-stretch/variant and cannot carry
|
|
539
|
+
* letter-spacing.
|
|
540
|
+
*
|
|
541
|
+
* Heading mapping (locked, see WON-580):
|
|
542
|
+
* level=1 → page (default page title)
|
|
543
|
+
* level=2 → section (first-level section header)
|
|
544
|
+
* level=3-6 → subsection (size step-down via @size override)
|
|
545
|
+
* `display` is an opt-in @size — never a level default.
|
|
546
|
+
* =================================== */
|
|
547
|
+
|
|
548
|
+
/* Heading — Display (opt-in via @size="display") */
|
|
549
|
+
--typography-heading-display-size: var(--font-size-5xl); /* 30px */
|
|
550
|
+
--typography-heading-display-weight: var(--font-weight-medium);
|
|
551
|
+
--typography-heading-display-leading: var(--line-height-36);
|
|
552
|
+
--typography-heading-display-tracking: var(--letter-spacing-tight);
|
|
553
|
+
|
|
554
|
+
/* Heading — Page (level=1 default) */
|
|
555
|
+
--typography-heading-page-size: var(--font-size-4xl); /* 24px */
|
|
556
|
+
--typography-heading-page-weight: var(--font-weight-medium);
|
|
557
|
+
--typography-heading-page-leading: var(--line-height-28);
|
|
558
|
+
--typography-heading-page-tracking: var(--letter-spacing-tight);
|
|
559
|
+
|
|
560
|
+
/* Heading — Section (level=2 default) */
|
|
561
|
+
--typography-heading-section-size: var(--font-size-3xl); /* 20px */
|
|
562
|
+
--typography-heading-section-weight: var(--font-weight-medium);
|
|
563
|
+
--typography-heading-section-leading: var(--line-height-24);
|
|
564
|
+
--typography-heading-section-tracking: var(--letter-spacing-normal);
|
|
565
|
+
|
|
566
|
+
/* Heading — Subsection (level=3 default; 4-6 step down via @size) */
|
|
567
|
+
--typography-heading-subsection-size: var(--font-size-2xl); /* 18px */
|
|
568
|
+
--typography-heading-subsection-weight: var(--font-weight-medium);
|
|
569
|
+
--typography-heading-subsection-leading: var(--line-height-24);
|
|
570
|
+
--typography-heading-subsection-tracking: var(--letter-spacing-normal);
|
|
571
|
+
|
|
572
|
+
/* Body — Small (captions, dense table cells, helper text) */
|
|
573
|
+
--typography-body-sm-size: var(--font-size-sm); /* 12px */
|
|
574
|
+
--typography-body-sm-weight: var(--font-weight-regular);
|
|
575
|
+
--typography-body-sm-leading: var(--line-height-tight); /* 16px */
|
|
576
|
+
--typography-body-sm-tracking: var(--letter-spacing-normal);
|
|
577
|
+
|
|
578
|
+
/* Body — Medium (default body text) */
|
|
579
|
+
--typography-body-md-size: var(--font-size-md); /* 13px */
|
|
580
|
+
--typography-body-md-weight: var(--font-weight-regular);
|
|
581
|
+
--typography-body-md-leading: var(--line-height-normal); /* 20px */
|
|
582
|
+
--typography-body-md-tracking: var(--letter-spacing-normal);
|
|
583
|
+
|
|
584
|
+
/* Body — Large (lead paragraphs, emphasized body) */
|
|
585
|
+
--typography-body-lg-size: var(--font-size-lg); /* 14px */
|
|
586
|
+
--typography-body-lg-weight: var(--font-weight-regular);
|
|
587
|
+
--typography-body-lg-leading: var(--line-height-normal); /* 20px */
|
|
588
|
+
--typography-body-lg-tracking: var(--letter-spacing-normal);
|
|
503
589
|
}
|
|
504
590
|
|
|
505
591
|
:root {
|
|
@@ -582,9 +668,15 @@
|
|
|
582
668
|
--shadow-surface: var(--shadow-xs);
|
|
583
669
|
--shadow-modal: var(--shadow-lg);
|
|
584
670
|
|
|
585
|
-
/* Focus Ring
|
|
586
|
-
|
|
587
|
-
|
|
671
|
+
/* Focus Ring — two-stop composite. Inner stop separates the ring from
|
|
672
|
+
the focused surface; outer stop carries the ring colour. Meets WCAG
|
|
673
|
+
2.2 non-text-contrast on light + dark surfaces. */
|
|
674
|
+
--focus-ring:
|
|
675
|
+
0 0 0 2px var(--color-focus-ring-inner),
|
|
676
|
+
0 0 0 4px var(--color-focus-ring-outer);
|
|
677
|
+
--focus-ring-critical:
|
|
678
|
+
0 0 0 2px var(--color-focus-ring-inner),
|
|
679
|
+
0 0 0 4px var(--color-border-critical);
|
|
588
680
|
|
|
589
681
|
/* Z-Index Semantic Layers */
|
|
590
682
|
--z-dropdown: var(--z-100);
|
|
@@ -606,6 +698,164 @@
|
|
|
606
698
|
var(--easing-in-out) infinite;
|
|
607
699
|
}
|
|
608
700
|
|
|
701
|
+
/* Component-tier tokens (Action + Input matrices only) */
|
|
702
|
+
|
|
703
|
+
/* ===================================
|
|
704
|
+
* Component-Tier Tokens (Layer 3)
|
|
705
|
+
*
|
|
706
|
+
* Action and Input matrices. Every cell aliases a layer-2 generic — no
|
|
707
|
+
* flat hex. Variants compose in component CSS (e.g. button.css picks
|
|
708
|
+
* which property carries the tone colour for `outline` vs `solid`).
|
|
709
|
+
*
|
|
710
|
+
* The rest of Assembly's components consume semantic tokens directly;
|
|
711
|
+
* only action + input have a layer-3 surface. See
|
|
712
|
+
* `docs/component-tokens.md` for the rationale and the cell-by-cell
|
|
713
|
+
* spec — this file mirrors it.
|
|
714
|
+
* =================================== */
|
|
715
|
+
|
|
716
|
+
:root {
|
|
717
|
+
/* ===================================
|
|
718
|
+
* Action Matrix
|
|
719
|
+
* Shape: --color-action-{tone}-{property}-{state}
|
|
720
|
+
* tones = primary | neutral | critical
|
|
721
|
+
* properties = bg | border | text | icon
|
|
722
|
+
* states = default | hover | focus | pressed | disabled
|
|
723
|
+
* =================================== */
|
|
724
|
+
|
|
725
|
+
/* Primary — bg */
|
|
726
|
+
--color-action-primary-bg-default: var(--color-bg-fill-primary);
|
|
727
|
+
--color-action-primary-bg-hover: var(--color-bg-fill-primary-hover);
|
|
728
|
+
--color-action-primary-bg-focus: var(--color-bg-fill-primary);
|
|
729
|
+
--color-action-primary-bg-pressed: var(--color-bg-fill-primary-active);
|
|
730
|
+
--color-action-primary-bg-disabled: var(--color-bg-fill-primary-disabled);
|
|
731
|
+
|
|
732
|
+
/* Primary — border */
|
|
733
|
+
--color-action-primary-border-default: var(--color-border-primary);
|
|
734
|
+
--color-action-primary-border-hover: var(--color-border-primary);
|
|
735
|
+
--color-action-primary-border-focus: var(--color-border-focus);
|
|
736
|
+
--color-action-primary-border-pressed: var(--color-border-primary);
|
|
737
|
+
--color-action-primary-border-disabled: var(--color-border-control-disabled);
|
|
738
|
+
|
|
739
|
+
/* Primary — text */
|
|
740
|
+
--color-action-primary-text-default: var(--color-text-on-primary);
|
|
741
|
+
--color-action-primary-text-hover: var(--color-text-on-primary);
|
|
742
|
+
--color-action-primary-text-focus: var(--color-text-on-primary);
|
|
743
|
+
--color-action-primary-text-pressed: var(--color-text-on-primary);
|
|
744
|
+
--color-action-primary-text-disabled: var(--color-text-disabled);
|
|
745
|
+
|
|
746
|
+
/* Primary — icon */
|
|
747
|
+
--color-action-primary-icon-default: var(--color-text-on-primary);
|
|
748
|
+
--color-action-primary-icon-hover: var(--color-text-on-primary);
|
|
749
|
+
--color-action-primary-icon-focus: var(--color-text-on-primary);
|
|
750
|
+
--color-action-primary-icon-pressed: var(--color-text-on-primary);
|
|
751
|
+
--color-action-primary-icon-disabled: var(--color-text-disabled);
|
|
752
|
+
|
|
753
|
+
/* Neutral — bg */
|
|
754
|
+
--color-action-neutral-bg-default: var(--color-bg-fill-interactive);
|
|
755
|
+
--color-action-neutral-bg-hover: var(--color-bg-fill-interactive-hover);
|
|
756
|
+
--color-action-neutral-bg-focus: var(--color-bg-fill-interactive);
|
|
757
|
+
--color-action-neutral-bg-pressed: var(--color-bg-fill-interactive-active);
|
|
758
|
+
--color-action-neutral-bg-disabled: var(--color-bg-fill-interactive-disabled);
|
|
759
|
+
|
|
760
|
+
/* Neutral — border */
|
|
761
|
+
--color-action-neutral-border-default: var(--color-border-control);
|
|
762
|
+
--color-action-neutral-border-hover: var(--color-border-control-hover);
|
|
763
|
+
--color-action-neutral-border-focus: var(--color-border-focus);
|
|
764
|
+
--color-action-neutral-border-pressed: var(--color-border-control-active);
|
|
765
|
+
--color-action-neutral-border-disabled: var(--color-border-control-disabled);
|
|
766
|
+
|
|
767
|
+
/* Neutral — text */
|
|
768
|
+
--color-action-neutral-text-default: var(--color-text);
|
|
769
|
+
--color-action-neutral-text-hover: var(--color-text);
|
|
770
|
+
--color-action-neutral-text-focus: var(--color-text);
|
|
771
|
+
--color-action-neutral-text-pressed: var(--color-text);
|
|
772
|
+
--color-action-neutral-text-disabled: var(--color-text-disabled);
|
|
773
|
+
|
|
774
|
+
/* Neutral — icon */
|
|
775
|
+
--color-action-neutral-icon-default: var(--color-icon);
|
|
776
|
+
--color-action-neutral-icon-hover: var(--color-icon-interactive-hover);
|
|
777
|
+
--color-action-neutral-icon-focus: var(--color-icon);
|
|
778
|
+
--color-action-neutral-icon-pressed: var(--color-icon);
|
|
779
|
+
--color-action-neutral-icon-disabled: var(--color-icon-disabled);
|
|
780
|
+
|
|
781
|
+
/* Critical — bg */
|
|
782
|
+
--color-action-critical-bg-default: var(--color-bg-fill-critical);
|
|
783
|
+
--color-action-critical-bg-hover: var(--color-bg-fill-critical-hover);
|
|
784
|
+
--color-action-critical-bg-focus: var(--color-bg-fill-critical);
|
|
785
|
+
--color-action-critical-bg-pressed: var(--color-bg-fill-critical-active);
|
|
786
|
+
--color-action-critical-bg-disabled: var(
|
|
787
|
+
--color-bg-fill-interactive-disabled
|
|
788
|
+
);
|
|
789
|
+
|
|
790
|
+
/* Critical — border */
|
|
791
|
+
--color-action-critical-border-default: var(--color-border-critical);
|
|
792
|
+
--color-action-critical-border-hover: var(--color-border-critical);
|
|
793
|
+
--color-action-critical-border-focus: var(--color-border-critical);
|
|
794
|
+
--color-action-critical-border-pressed: var(--color-border-critical);
|
|
795
|
+
--color-action-critical-border-disabled: var(--color-border-control-disabled);
|
|
796
|
+
|
|
797
|
+
/* Critical — text */
|
|
798
|
+
--color-action-critical-text-default: var(--color-text-on-critical);
|
|
799
|
+
--color-action-critical-text-hover: var(--color-text-on-critical);
|
|
800
|
+
--color-action-critical-text-focus: var(--color-text-on-critical);
|
|
801
|
+
--color-action-critical-text-pressed: var(--color-text-on-critical);
|
|
802
|
+
--color-action-critical-text-disabled: var(--color-text-disabled);
|
|
803
|
+
|
|
804
|
+
/* Critical — icon */
|
|
805
|
+
--color-action-critical-icon-default: var(--color-text-on-critical);
|
|
806
|
+
--color-action-critical-icon-hover: var(--color-text-on-critical);
|
|
807
|
+
--color-action-critical-icon-focus: var(--color-text-on-critical);
|
|
808
|
+
--color-action-critical-icon-pressed: var(--color-text-on-critical);
|
|
809
|
+
--color-action-critical-icon-disabled: var(--color-text-disabled);
|
|
810
|
+
|
|
811
|
+
/* ===================================
|
|
812
|
+
* Input Matrix
|
|
813
|
+
* Shape: --color-input-{property}-{state}
|
|
814
|
+
* properties = bg | border | text | icon | checked
|
|
815
|
+
* states = default | hover | focus | disabled | error
|
|
816
|
+
*
|
|
817
|
+
* `checked` is the selected-state affordance; it collapses the state
|
|
818
|
+
* axis (the "checked" affordance itself is a state). Inputs without a
|
|
819
|
+
* checked affordance (text inputs, textareas) ignore the `checked-*`
|
|
820
|
+
* cells.
|
|
821
|
+
* =================================== */
|
|
822
|
+
|
|
823
|
+
/* bg */
|
|
824
|
+
--color-input-bg-default: var(--color-bg-surface);
|
|
825
|
+
--color-input-bg-hover: var(--color-bg-surface);
|
|
826
|
+
--color-input-bg-focus: var(--color-bg-surface);
|
|
827
|
+
--color-input-bg-disabled: var(--color-bg-disabled);
|
|
828
|
+
--color-input-bg-error: var(--color-bg-surface);
|
|
829
|
+
|
|
830
|
+
/* border */
|
|
831
|
+
--color-input-border-default: var(--color-border-control);
|
|
832
|
+
--color-input-border-hover: var(--color-border-control-hover);
|
|
833
|
+
--color-input-border-focus: var(--color-border-focus);
|
|
834
|
+
--color-input-border-disabled: var(--color-border-control-disabled);
|
|
835
|
+
--color-input-border-error: var(--color-border-control-error);
|
|
836
|
+
|
|
837
|
+
/* text */
|
|
838
|
+
--color-input-text-default: var(--color-text);
|
|
839
|
+
--color-input-text-hover: var(--color-text);
|
|
840
|
+
--color-input-text-focus: var(--color-text);
|
|
841
|
+
--color-input-text-disabled: var(--color-text-disabled);
|
|
842
|
+
--color-input-text-error: var(--color-text);
|
|
843
|
+
|
|
844
|
+
/* icon */
|
|
845
|
+
--color-input-icon-default: var(--color-icon-secondary);
|
|
846
|
+
--color-input-icon-hover: var(--color-icon);
|
|
847
|
+
--color-input-icon-focus: var(--color-icon);
|
|
848
|
+
--color-input-icon-disabled: var(--color-icon-disabled);
|
|
849
|
+
--color-input-icon-error: var(--color-icon-critical);
|
|
850
|
+
|
|
851
|
+
/* checked (selected affordance) */
|
|
852
|
+
--color-input-checked-bg: var(--color-bg-control-checked);
|
|
853
|
+
--color-input-checked-bg-hover: var(--color-bg-fill-accent-hover);
|
|
854
|
+
--color-input-checked-border: var(--color-bg-control-checked);
|
|
855
|
+
--color-input-checked-icon: var(--color-text-on-accent);
|
|
856
|
+
--color-input-checked-disabled: var(--color-bg-fill-accent-disabled);
|
|
857
|
+
}
|
|
858
|
+
|
|
609
859
|
/* Base styles */
|
|
610
860
|
|
|
611
861
|
:root {
|
|
@@ -1,10 +1,42 @@
|
|
|
1
|
-
/* <inline>/src/typography/heading-css-
|
|
1
|
+
/* <inline>/src/typography/heading-css-eca8b0ae619f69fcbe9535f4700db421.css */
|
|
2
2
|
|
|
3
3
|
.heading_e24a71ed2 {
|
|
4
4
|
margin: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
/*
|
|
7
|
+
/* Role - bundled defaults driven by level. Sub-tokens consumed
|
|
8
|
+
individually because the font shorthand cannot carry letter-spacing
|
|
9
|
+
and resets font-stretch/font-variant. The size override below wins
|
|
10
|
+
via document order. */
|
|
11
|
+
.heading_e24a71ed2[data-role="page"] {
|
|
12
|
+
font-size: var(--typography-heading-page-size);
|
|
13
|
+
font-weight: var(--typography-heading-page-weight);
|
|
14
|
+
line-height: var(--typography-heading-page-leading);
|
|
15
|
+
letter-spacing: var(--typography-heading-page-tracking);
|
|
16
|
+
}
|
|
17
|
+
.heading_e24a71ed2[data-role="section"] {
|
|
18
|
+
font-size: var(--typography-heading-section-size);
|
|
19
|
+
font-weight: var(--typography-heading-section-weight);
|
|
20
|
+
line-height: var(--typography-heading-section-leading);
|
|
21
|
+
letter-spacing: var(--typography-heading-section-tracking);
|
|
22
|
+
}
|
|
23
|
+
.heading_e24a71ed2[data-role="subsection"] {
|
|
24
|
+
font-size: var(--typography-heading-subsection-size);
|
|
25
|
+
font-weight: var(--typography-heading-subsection-weight);
|
|
26
|
+
line-height: var(--typography-heading-subsection-leading);
|
|
27
|
+
letter-spacing: var(--typography-heading-subsection-tracking);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Size override - explicit @size opts out of the role-driven defaults.
|
|
31
|
+
display consumes the display role bundle; the named atomic sizes
|
|
32
|
+
consume font-size + line-height directly (used to step down within a
|
|
33
|
+
role, e.g. shrinking h4-h6 from the subsection default). */
|
|
34
|
+
.heading_e24a71ed2[data-size="display"] {
|
|
35
|
+
font-size: var(--typography-heading-display-size);
|
|
36
|
+
font-weight: var(--typography-heading-display-weight);
|
|
37
|
+
line-height: var(--typography-heading-display-leading);
|
|
38
|
+
letter-spacing: var(--typography-heading-display-tracking);
|
|
39
|
+
}
|
|
8
40
|
.heading_e24a71ed2[data-size="sm"] {
|
|
9
41
|
font-size: var(--font-size-sm);
|
|
10
42
|
line-height: var(--line-height-16);
|
|
@@ -38,7 +70,7 @@
|
|
|
38
70
|
line-height: var(--line-height-36);
|
|
39
71
|
}
|
|
40
72
|
|
|
41
|
-
/* Weight */
|
|
73
|
+
/* Weight - explicit override wins over role-bundled weight. */
|
|
42
74
|
.heading_e24a71ed2[data-weight="regular"] {
|
|
43
75
|
font-weight: var(--font-weight-regular);
|
|
44
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./heading-css-
|
|
1
|
+
import "./heading-css-eca8b0ae619f69fcbe9535f4700db421.css"
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { element } from 'ember-element-helper';
|
|
4
4
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
@@ -6,53 +6,48 @@ import { setComponentTemplate } from '@ember/component';
|
|
|
6
6
|
|
|
7
7
|
;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
1:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
3:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
4: {
|
|
26
|
-
tag: 'h4',
|
|
27
|
-
size: 'xl',
|
|
28
|
-
weight: 'medium'
|
|
29
|
-
},
|
|
30
|
-
5: {
|
|
31
|
-
tag: 'h5',
|
|
32
|
-
size: 'lg',
|
|
33
|
-
weight: 'medium'
|
|
34
|
-
},
|
|
35
|
-
6: {
|
|
36
|
-
tag: 'h6',
|
|
37
|
-
size: 'md',
|
|
38
|
-
weight: 'medium'
|
|
39
|
-
}
|
|
9
|
+
const LEVEL_TAGS = {
|
|
10
|
+
1: 'h1',
|
|
11
|
+
2: 'h2',
|
|
12
|
+
3: 'h3',
|
|
13
|
+
4: 'h4',
|
|
14
|
+
5: 'h5',
|
|
15
|
+
6: 'h6'
|
|
16
|
+
};
|
|
17
|
+
const LEVEL_ROLES = {
|
|
18
|
+
1: 'page',
|
|
19
|
+
2: 'section',
|
|
20
|
+
3: 'subsection',
|
|
21
|
+
4: 'subsection',
|
|
22
|
+
5: 'subsection',
|
|
23
|
+
6: 'subsection'
|
|
40
24
|
};
|
|
41
25
|
class Heading extends Component {
|
|
42
26
|
get level() {
|
|
43
27
|
return this.args.level ?? 2;
|
|
44
28
|
}
|
|
45
|
-
get levelDefaults() {
|
|
46
|
-
return LEVEL_DEFAULTS[this.level];
|
|
47
|
-
}
|
|
48
29
|
get tag() {
|
|
49
|
-
return this.
|
|
30
|
+
return LEVEL_TAGS[this.level];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Role drives the bundled typography role tokens
|
|
34
|
+
* (--typography-heading-{role}-{size|weight|leading|tracking}).
|
|
35
|
+
* `@size` overrides the visual scale without changing the semantic level -
|
|
36
|
+
* when set, the data-size rule below wins via document order.
|
|
37
|
+
*/
|
|
38
|
+
get role() {
|
|
39
|
+
return LEVEL_ROLES[this.level];
|
|
50
40
|
}
|
|
51
41
|
get size() {
|
|
52
|
-
return this.args.size
|
|
42
|
+
return this.args.size;
|
|
53
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Weight is left undefined when the consumer doesn't pass `@weight` so the
|
|
46
|
+
* data-weight rule below stays absent and the role-bundled weight wins.
|
|
47
|
+
* Explicit `@weight` overrides the role default via document-order tie-break.
|
|
48
|
+
*/
|
|
54
49
|
get weight() {
|
|
55
|
-
return this.args.weight
|
|
50
|
+
return this.args.weight;
|
|
56
51
|
}
|
|
57
52
|
get tone() {
|
|
58
53
|
return this.args.tone ?? 'primary';
|
|
@@ -67,7 +62,7 @@ class Heading extends Component {
|
|
|
67
62
|
return this.args.wrap ?? 'normal';
|
|
68
63
|
}
|
|
69
64
|
static {
|
|
70
|
-
setComponentTemplate(precompileTemplate("\n\n{{#let (element this.tag) as |Tag|}}\n <Tag class=\"heading_e24a71ed2\" data-size={{this.size}} data-weight={{this.weight}} data-tone={{this.tone}} data-align={{this.align}} data-truncate={{this.truncate}} data-wrap={{this.wrap}} ...attributes>\n {{yield}}\n </Tag>\n{{/let}}", {
|
|
65
|
+
setComponentTemplate(precompileTemplate("\n\n{{#let (element this.tag) as |Tag|}}\n <Tag class=\"heading_e24a71ed2\" data-role={{this.role}} data-size={{this.size}} data-weight={{this.weight}} data-tone={{this.tone}} data-align={{this.align}} data-truncate={{this.truncate}} data-wrap={{this.wrap}} ...attributes>\n {{yield}}\n </Tag>\n{{/let}}", {
|
|
71
66
|
strictMode: true,
|
|
72
67
|
scope: () => ({
|
|
73
68
|
element
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
/* <inline>/src/typography/text-css-
|
|
1
|
+
/* <inline>/src/typography/text-css-a4c06f76a813db6b613c4f3c22e6bb85.css */
|
|
2
2
|
|
|
3
3
|
.text_e5637097c {
|
|
4
4
|
margin: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
/* Size
|
|
7
|
+
/* Size - sm/md/lg consume the bundled body role tokens; xs stays atomic
|
|
8
|
+
(no body-xs role exists - keeping atomic preserves caption/overline
|
|
9
|
+
variants that anchor on font-size-xs). Sub-tokens consumed
|
|
10
|
+
individually because the font shorthand cannot carry letter-spacing
|
|
11
|
+
and resets font-stretch/font-variant. The data-weight rule below
|
|
12
|
+
overrides the role's bundled weight when set, which lets variants
|
|
13
|
+
like label (sm + medium) layer their own weight on top of the role
|
|
14
|
+
size+leading. */
|
|
8
15
|
.text_e5637097c[data-size="xs"] {
|
|
9
16
|
font-size: var(--font-size-xs);
|
|
10
17
|
line-height: var(--line-height-tight);
|
|
11
18
|
}
|
|
12
19
|
.text_e5637097c[data-size="sm"] {
|
|
13
|
-
font-size: var(--
|
|
14
|
-
|
|
20
|
+
font-size: var(--typography-body-sm-size);
|
|
21
|
+
font-weight: var(--typography-body-sm-weight);
|
|
22
|
+
line-height: var(--typography-body-sm-leading);
|
|
23
|
+
letter-spacing: var(--typography-body-sm-tracking);
|
|
15
24
|
}
|
|
16
25
|
.text_e5637097c[data-size="md"] {
|
|
17
|
-
font-size: var(--
|
|
18
|
-
|
|
26
|
+
font-size: var(--typography-body-md-size);
|
|
27
|
+
font-weight: var(--typography-body-md-weight);
|
|
28
|
+
line-height: var(--typography-body-md-leading);
|
|
29
|
+
letter-spacing: var(--typography-body-md-tracking);
|
|
19
30
|
}
|
|
20
31
|
.text_e5637097c[data-size="lg"] {
|
|
21
|
-
font-size: var(--
|
|
22
|
-
|
|
32
|
+
font-size: var(--typography-body-lg-size);
|
|
33
|
+
font-weight: var(--typography-body-lg-weight);
|
|
34
|
+
line-height: var(--typography-body-lg-leading);
|
|
35
|
+
letter-spacing: var(--typography-body-lg-tracking);
|
|
23
36
|
}
|
|
24
37
|
|
|
25
38
|
/* Monospace */
|
|
@@ -27,7 +40,8 @@
|
|
|
27
40
|
font-family: var(--font-family-mono);
|
|
28
41
|
}
|
|
29
42
|
|
|
30
|
-
/* Weight
|
|
43
|
+
/* Weight - explicit/variant-derived weight wins over role-bundled
|
|
44
|
+
weight via document-order tie-break. */
|
|
31
45
|
.text_e5637097c[data-weight="regular"] {
|
|
32
46
|
font-weight: var(--font-weight-regular);
|
|
33
47
|
}
|
package/dist/typography/text.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visitwonders/assembly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "The default blueprint for Embroider v2 addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
88
88
|
"lint:js": "eslint . --cache",
|
|
89
89
|
"lint:js:fix": "eslint . --fix",
|
|
90
|
-
"lint:types": "
|
|
90
|
+
"lint:types": "ember-tsc",
|
|
91
91
|
"prepack": "rollup --config",
|
|
92
92
|
"start": "rollup --config --watch",
|
|
93
93
|
"test": "echo 'A v2 addon does not have tests, run tests in showcase'"
|
|
@@ -119,10 +119,8 @@
|
|
|
119
119
|
"@embroider/addon-dev": "^8.2.0",
|
|
120
120
|
"@eslint/js": "^9.17.0",
|
|
121
121
|
"@glimmer/component": "^2.0.0",
|
|
122
|
-
"@glint/
|
|
123
|
-
"@glint/
|
|
124
|
-
"@glint/environment-ember-template-imports": "^1.4.0",
|
|
125
|
-
"@glint/template": "^1.4.0",
|
|
122
|
+
"@glint/ember-tsc": "^1.5.0",
|
|
123
|
+
"@glint/template": "^1.7.7",
|
|
126
124
|
"@rollup/plugin-babel": "^6.0.4",
|
|
127
125
|
"babel-plugin-ember-template-compilation": "^3.1.0",
|
|
128
126
|
"concurrently": "^9.0.1",
|
|
@@ -158,6 +156,8 @@
|
|
|
158
156
|
"./action/button-group.js": "./dist/_app_/action/button-group.js",
|
|
159
157
|
"./action/button.js": "./dist/_app_/action/button.js",
|
|
160
158
|
"./action/link.js": "./dist/_app_/action/link.js",
|
|
159
|
+
"./data/pagination-cluster.js": "./dist/_app_/data/pagination-cluster.js",
|
|
160
|
+
"./data/pagination.js": "./dist/_app_/data/pagination.js",
|
|
161
161
|
"./data/sortable-list.js": "./dist/_app_/data/sortable-list.js",
|
|
162
162
|
"./data/table.js": "./dist/_app_/data/table.js",
|
|
163
163
|
"./form/calendar.js": "./dist/_app_/form/calendar.js",
|