@nordcode/ui 1.2.0 → 1.3.1

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 CHANGED
@@ -1,56 +1,61 @@
1
+ ## 1.3.1 (2025-04-18)
1
2
 
2
- ## v1.0.4 (2024-09-15)
3
+ ### improvements
3
4
 
4
- ### New Features
5
+ - Tweak measure to better resemble old ch measurements
5
6
 
6
- - Added `.nc-alert` class, an alert and utility class for notifications.
7
- - Added `-aligned` variant to `.nc-button`, which applies negative margin, so you can visually align stealth buttons
7
+ ## 1.3.0 (2025-04-18)
8
8
 
9
- ### Fixes
9
+ ### improvements
10
10
 
11
- - Fixed Webkit `<detail>` style
12
- - Shadows not working using `light-dark`
11
+ - Switch from ch (and in some cases lh) to em for more consistent sizing and to prevent possible CLS due to font switching
12
+ - Add new typography token: `--font-size-medium` to provide a token for slightly larger text
13
13
 
14
- ## v1.0.5 (2024-11-28)
14
+ ## 1.2.0 (2025-04-03)
15
15
 
16
- ### Features
16
+ ### Improvements
17
17
 
18
- Make fieldset-based inputs more accessible by adding legends. This affects:
19
- - `nc-tag-select`
20
- - `nc-segmented-control`
21
- - `nc-radio-field`
22
- - `nc-checkbox-field`
18
+ - Add clickable card class
23
19
 
24
- Be sure to checkout the updated markup for these components in the documentation.
20
+ ## 1.1.6 (2025-01-09)
25
21
 
26
- ## v1.0.5 (2024-11-28)
22
+ ### Improvements
23
+
24
+ - Small changes to spacings.
25
+
26
+ ## 1.1.5 (2025-01-09)
27
+
28
+ ### Improvements
29
+
30
+ - Add `themed` class to apply `var(--text)` and `var(--surface)` colors
27
31
 
28
32
  ### Fixes
29
33
 
30
- - Fix fields not compiling
34
+ - Fix text colors for `<ins>` and `<del>`
31
35
 
32
- ## 1.0.8 (2024-12-27)
36
+ ## 1.1.4 (2025-01-04)
33
37
 
34
- ### Improvements
38
+ ### Fixes
35
39
 
36
- - Tweak Dialog Styles
37
- - Disable scroll when modal dialog is open
40
+ - Fix summary border-radius by using a border-radius token
41
+
42
+ ## 1.1.3 (2025-01-04)
38
43
 
39
44
  ### Fixes
40
45
 
41
- - Fix user selection styles
46
+ - Small design fixes and improvements
42
47
 
43
- ## 1.0.9 (2024-12-27)
48
+ ## 1.1.2 (2025-01-03)
44
49
 
45
- ### Improvements
50
+ ### Fixes
46
51
 
47
- - Tweak Dialog Radius and mobile styles
52
+ - Fix switch component not working
48
53
 
49
- ## 1.0.10 (2024-12-27)
54
+ ## 1.1.1 (2025-01-03)
50
55
 
51
56
  ### Fixes
52
57
 
53
- - Fix radius for real
58
+ - Made details full width again
54
59
 
55
60
  ## 1.1.0 (2025-01-03)
56
61
 
@@ -62,48 +67,55 @@ Lots of spring cleaning
62
67
  - Changed default styling for details
63
68
  - Cleanup unused styles
64
69
 
65
- ## 1.1.1 (2025-01-03)
70
+ ## 1.0.10 (2024-12-27)
66
71
 
67
72
  ### Fixes
68
73
 
69
- - Made details full width again
70
-
71
- ## 1.1.2 (2025-01-03)
74
+ - Fix radius for real
72
75
 
73
- ### Fixes
76
+ ## 1.0.9 (2024-12-27)
74
77
 
75
- - Fix switch component not working
78
+ ### Improvements
76
79
 
77
- ## 1.1.3 (2025-01-04)
80
+ - Tweak Dialog Radius and mobile styles
78
81
 
79
- ### Fixes
82
+ ## 1.0.8 (2024-12-27)
80
83
 
81
- - Small design fixes and improvements
84
+ ### Improvements
82
85
 
83
- ## 1.1.4 (2025-01-04)
86
+ - Tweak Dialog Styles
87
+ - Disable scroll when modal dialog is open
84
88
 
85
89
  ### Fixes
86
90
 
87
- - Fix summary border-radius by using a border-radius token
91
+ - Fix user selection styles
88
92
 
89
- ## 1.1.5 (2025-01-09)
93
+ ## v1.0.5 (2024-11-28)
90
94
 
91
- ### Improvements
95
+ ### Fixes
92
96
 
93
- - Add `themed` class to apply `var(--text)` and `var(--surface)` colors
97
+ - Fix fields not compiling
94
98
 
95
- ### Fixes
99
+ ## v1.0.5 (2024-11-28)
96
100
 
97
- - Fix text colors for `<ins>` and `<del>`
101
+ ### Features
98
102
 
99
- ## 1.1.6 (2025-01-09)
103
+ Make fieldset-based inputs more accessible by adding legends. This affects:
104
+ - `nc-tag-select`
105
+ - `nc-segmented-control`
106
+ - `nc-radio-field`
107
+ - `nc-checkbox-field`
100
108
 
101
- ### Improvements
109
+ Be sure to checkout the updated markup for these components in the documentation.
102
110
 
103
- - Small changes to spacings.
111
+ ## v1.0.4 (2024-09-15)
104
112
 
105
- ## 1.2.0 (2025-04-03)
113
+ ### New Features
106
114
 
107
- ### Improvements
115
+ - Added `.nc-alert` class, an alert and utility class for notifications.
116
+ - Added `-aligned` variant to `.nc-button`, which applies negative margin, so you can visually align stealth buttons
108
117
 
109
- - Add clickable card class
118
+ ### Fixes
119
+
120
+ - Fixed Webkit `<detail>` style
121
+ - Shadows not working using `light-dark`
package/out/bundle.css CHANGED
@@ -12,14 +12,15 @@
12
12
  --line-height-base: 1.55;
13
13
  --line-height-small: 1.1;
14
14
  --tracking-base: normal;
15
- --tracking-tight: -.04ch;
16
- --tracking-wide: .06ch;
17
- --measure-large: 88ch;
18
- --measure-base: 72ch;
19
- --measure-small: 44ch;
15
+ --tracking-tight: -.02em;
16
+ --tracking-wide: .03em;
17
+ --measure-large: 56em;
18
+ --measure-base: 44em;
19
+ --measure-small: 28em;
20
20
  --font-size-smallest: max(.75rem, 12px);
21
21
  --font-size-small: max(.875rem, 14px);
22
22
  --font-size-base: 1rem;
23
+ --font-size-medium: 1.125rem;
23
24
  --font-size-large: 1.25rem;
24
25
  --font-size-largest: 1.5rem;
25
26
  --font-size-display: 3.5rem;
@@ -330,7 +331,7 @@
330
331
 
331
332
  :where(:not(:active):focus-visible) {
332
333
  outline: var(--border-width-medium) solid var(--color-brand-primary-base);
333
- outline-offset: 1ch;
334
+ outline-offset: .5em;
334
335
  }
335
336
 
336
337
  :where(:focus:not(:focus-visible)) {
@@ -460,7 +461,7 @@
460
461
  grid-column: 1 / 1;
461
462
  min-block-size: 100%;
462
463
  padding-block-end: 0;
463
- padding-inline-end: 2ch;
464
+ padding-inline-end: 1em;
464
465
  }
465
466
 
466
467
  :where(dt):not(:last-of-type) {
@@ -496,19 +497,19 @@
496
497
  :where(figcaption) {
497
498
  color: var(--color-surface-subtle);
498
499
  background-color: var(--color-text-base);
499
- padding: .25lh 1ch;
500
+ padding: .35em .5em;
500
501
  display: block;
501
502
  }
502
503
 
503
504
  :where(details) {
504
- --p-x-details: 2ch;
505
- --p-y-details: .75lh;
505
+ --p-x-details: 1em;
506
+ --p-y-details: 1em;
506
507
  --b-r-details: var(--border-radius-medium);
507
508
  background-color: var(--color-surface-muted);
508
509
  border-radius: var(--b-r-details);
509
- border: var(--border-width-thin) solid var(--color-border-base);
510
510
  padding: var(--p-y-details) var(--p-x-details);
511
511
  inline-size: 100%;
512
+ box-shadow: 0 0 0 var(--border-width-thin) var(--color-border-base);
512
513
  }
513
514
 
514
515
  :where(details) > summary {
@@ -517,7 +518,7 @@
517
518
  font-weight: var(--font-weight-heading);
518
519
  border-radius: var(--b-r-details);
519
520
  padding: var(--p-y-details) var(--p-x-details);
520
- margin: calc(-1 * var(--p-y-details)) calc(-1 * var(--p-x-details) + var(--border-width-thin));
521
+ margin: calc(-1 * var(--p-y-details)) calc(-1 * var(--p-x-details));
521
522
  }
522
523
 
523
524
  :where(details)[open] > summary {
@@ -534,7 +535,7 @@
534
535
  font-size: var(--font-size-large);
535
536
  margin-inline: 0;
536
537
  padding: 0;
537
- padding-inline-start: 2ch;
538
+ padding-inline-start: 1em;
538
539
  position: relative;
539
540
  }
540
541
 
@@ -561,7 +562,7 @@
561
562
 
562
563
  :is(.note, blockquote) cite:before {
563
564
  content: "—";
564
- margin-inline-end: .5ch;
565
+ margin-inline-end: .5em;
565
566
  }
566
567
 
567
568
  cite {
@@ -624,7 +625,7 @@
624
625
  :where(a, .nc-link) {
625
626
  color: inherit;
626
627
  font-family: var(--font-family-link);
627
- text-underline-offset: .25lh;
628
+ text-underline-offset: .35em;
628
629
  font-weight: var(--font-weight-default);
629
630
  cursor: pointer;
630
631
  letter-spacing: var(--tracking-tight);
@@ -675,7 +676,7 @@
675
676
  line-height: inherit;
676
677
  -webkit-box-decoration-break: clone;
677
678
  box-decoration-break: clone;
678
- padding-inline: .5ch;
679
+ padding-inline: .25em;
679
680
  }
680
681
 
681
682
  :where(code, kbd, var) {
@@ -689,7 +690,7 @@
689
690
  word-spacing: normal;
690
691
  overflow-wrap: normal;
691
692
  max-inline-size: fit-content;
692
- padding-block: .125lh;
693
+ padding-block: .2em;
693
694
  font-style: normal;
694
695
  }
695
696
 
@@ -716,7 +717,7 @@
716
717
  border-radius: var(--border-radius-medium);
717
718
  background: var(--color-surface-subtle);
718
719
  -webkit-overflow-scrolling: touch;
719
- padding: .5lh 2ch;
720
+ padding: 1em;
720
721
  overflow-x: auto;
721
722
  }
722
723
 
@@ -757,7 +758,7 @@
757
758
  line-height: var(--line-height-small);
758
759
  white-space: nowrap;
759
760
  font-variant-numeric: tabular-nums;
760
- padding: .4lh 1ch;
761
+ padding: .5em;
761
762
  }
762
763
 
763
764
  :where(td), :where(thead th) {
@@ -827,15 +828,11 @@
827
828
  }
828
829
 
829
830
  :where(ul, ol) {
830
- padding-inline-start: 2ch;
831
- }
832
-
833
- :where(li + li) {
834
- margin-block-start: .5lh;
831
+ padding-inline-start: 1em;
835
832
  }
836
833
 
837
- :where(li > :is(ul, ol)) {
838
- margin-block-start: .25lh;
834
+ :where(li + li), :where(li > :is(ul, ol)) {
835
+ margin-block-start: .5em;
839
836
  }
840
837
 
841
838
  @supports (font-variant-position: sub) {
@@ -869,7 +866,7 @@
869
866
  content: close-quote;
870
867
  content: "“";
871
868
  content: "”";
872
- margin-inline-start: -.87ch;
869
+ margin-inline-start: -.5em;
873
870
  }
874
871
 
875
872
  :where(.quoted p) {
@@ -962,11 +959,11 @@
962
959
  }
963
960
 
964
961
  :where(.nc-flow) > * {
965
- max-inline-size: var(--flow-base-meassure, 72ch);
962
+ max-inline-size: var(--flow-base-meassure, 36em);
966
963
  }
967
964
 
968
965
  :where(.nc-flow) > :is(h1, h2, h3, h4, h5, h6) {
969
- max-inline-size: var(--flow-headline-meassure, 32ch);
966
+ max-inline-size: var(--flow-headline-meassure, 16em);
970
967
  --flow-gap: 1.5lh;
971
968
  }
972
969
 
@@ -111,7 +111,7 @@
111
111
 
112
112
  :where(:not(:active):focus-visible) {
113
113
  outline: var(--border-width-medium) solid var(--color-brand-primary-base);
114
- outline-offset: 1ch;
114
+ outline-offset: .5em;
115
115
  }
116
116
 
117
117
  :where(:focus:not(:focus-visible)) {
@@ -241,7 +241,7 @@
241
241
  grid-column: 1 / 1;
242
242
  min-block-size: 100%;
243
243
  padding-block-end: 0;
244
- padding-inline-end: 2ch;
244
+ padding-inline-end: 1em;
245
245
  }
246
246
 
247
247
  :where(dt):not(:last-of-type) {
@@ -277,19 +277,19 @@
277
277
  :where(figcaption) {
278
278
  color: var(--color-surface-subtle);
279
279
  background-color: var(--color-text-base);
280
- padding: .25lh 1ch;
280
+ padding: .35em .5em;
281
281
  display: block;
282
282
  }
283
283
 
284
284
  :where(details) {
285
- --p-x-details: 2ch;
286
- --p-y-details: .75lh;
285
+ --p-x-details: 1em;
286
+ --p-y-details: 1em;
287
287
  --b-r-details: var(--border-radius-medium);
288
288
  background-color: var(--color-surface-muted);
289
289
  border-radius: var(--b-r-details);
290
- border: var(--border-width-thin) solid var(--color-border-base);
291
290
  padding: var(--p-y-details) var(--p-x-details);
292
291
  inline-size: 100%;
292
+ box-shadow: 0 0 0 var(--border-width-thin) var(--color-border-base);
293
293
  }
294
294
 
295
295
  :where(details) > summary {
@@ -298,7 +298,7 @@
298
298
  font-weight: var(--font-weight-heading);
299
299
  border-radius: var(--b-r-details);
300
300
  padding: var(--p-y-details) var(--p-x-details);
301
- margin: calc(-1 * var(--p-y-details)) calc(-1 * var(--p-x-details) + var(--border-width-thin));
301
+ margin: calc(-1 * var(--p-y-details)) calc(-1 * var(--p-x-details));
302
302
  }
303
303
 
304
304
  :where(details)[open] > summary {
@@ -315,7 +315,7 @@
315
315
  font-size: var(--font-size-large);
316
316
  margin-inline: 0;
317
317
  padding: 0;
318
- padding-inline-start: 2ch;
318
+ padding-inline-start: 1em;
319
319
  position: relative;
320
320
  }
321
321
 
@@ -342,7 +342,7 @@
342
342
 
343
343
  :is(.note, blockquote) cite:before {
344
344
  content: "—";
345
- margin-inline-end: .5ch;
345
+ margin-inline-end: .5em;
346
346
  }
347
347
 
348
348
  cite {
@@ -405,7 +405,7 @@
405
405
  :where(a, .nc-link) {
406
406
  color: inherit;
407
407
  font-family: var(--font-family-link);
408
- text-underline-offset: .25lh;
408
+ text-underline-offset: .35em;
409
409
  font-weight: var(--font-weight-default);
410
410
  cursor: pointer;
411
411
  letter-spacing: var(--tracking-tight);
@@ -456,7 +456,7 @@
456
456
  line-height: inherit;
457
457
  -webkit-box-decoration-break: clone;
458
458
  box-decoration-break: clone;
459
- padding-inline: .5ch;
459
+ padding-inline: .25em;
460
460
  }
461
461
 
462
462
  :where(code, kbd, var) {
@@ -470,7 +470,7 @@
470
470
  word-spacing: normal;
471
471
  overflow-wrap: normal;
472
472
  max-inline-size: fit-content;
473
- padding-block: .125lh;
473
+ padding-block: .2em;
474
474
  font-style: normal;
475
475
  }
476
476
 
@@ -497,7 +497,7 @@
497
497
  border-radius: var(--border-radius-medium);
498
498
  background: var(--color-surface-subtle);
499
499
  -webkit-overflow-scrolling: touch;
500
- padding: .5lh 2ch;
500
+ padding: 1em;
501
501
  overflow-x: auto;
502
502
  }
503
503
 
@@ -538,7 +538,7 @@
538
538
  line-height: var(--line-height-small);
539
539
  white-space: nowrap;
540
540
  font-variant-numeric: tabular-nums;
541
- padding: .4lh 1ch;
541
+ padding: .5em;
542
542
  }
543
543
 
544
544
  :where(td), :where(thead th) {
@@ -608,15 +608,11 @@
608
608
  }
609
609
 
610
610
  :where(ul, ol) {
611
- padding-inline-start: 2ch;
612
- }
613
-
614
- :where(li + li) {
615
- margin-block-start: .5lh;
611
+ padding-inline-start: 1em;
616
612
  }
617
613
 
618
- :where(li > :is(ul, ol)) {
619
- margin-block-start: .25lh;
614
+ :where(li + li), :where(li > :is(ul, ol)) {
615
+ margin-block-start: .5em;
620
616
  }
621
617
 
622
618
  @supports (font-variant-position: sub) {
@@ -650,7 +646,7 @@
650
646
  content: close-quote;
651
647
  content: "“";
652
648
  content: "”";
653
- margin-inline-start: -.87ch;
649
+ margin-inline-start: -.5em;
654
650
  }
655
651
 
656
652
  :where(.quoted p) {
@@ -743,11 +739,11 @@
743
739
  }
744
740
 
745
741
  :where(.nc-flow) > * {
746
- max-inline-size: var(--flow-base-meassure, 72ch);
742
+ max-inline-size: var(--flow-base-meassure, 36em);
747
743
  }
748
744
 
749
745
  :where(.nc-flow) > :is(h1, h2, h3, h4, h5, h6) {
750
- max-inline-size: var(--flow-headline-meassure, 32ch);
746
+ max-inline-size: var(--flow-headline-meassure, 16em);
751
747
  --flow-gap: 1.5lh;
752
748
  }
753
749