@nordcode/ui 1.2.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -1,56 +1,55 @@
1
+ ## 1.3.0 (2025-04-18)
1
2
 
2
- ## v1.0.4 (2024-09-15)
3
+ ### improvements
3
4
 
4
- ### New Features
5
+ - Switch from ch (and in some cases lh) to em for more consistent sizing and to prevent possible CLS due to font switching
6
+ - Add new typography token: `--font-size-medium` to provide a token for slightly larger text
5
7
 
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
8
+ ## 1.2.0 (2025-04-03)
8
9
 
9
- ### Fixes
10
+ ### Improvements
10
11
 
11
- - Fixed Webkit `<detail>` style
12
- - Shadows not working using `light-dark`
12
+ - Add clickable card class
13
13
 
14
- ## v1.0.5 (2024-11-28)
14
+ ## 1.1.6 (2025-01-09)
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
+ - Small changes to spacings.
23
19
 
24
- Be sure to checkout the updated markup for these components in the documentation.
20
+ ## 1.1.5 (2025-01-09)
25
21
 
26
- ## v1.0.5 (2024-11-28)
22
+ ### Improvements
23
+
24
+ - Add `themed` class to apply `var(--text)` and `var(--surface)` colors
27
25
 
28
26
  ### Fixes
29
27
 
30
- - Fix fields not compiling
28
+ - Fix text colors for `<ins>` and `<del>`
31
29
 
32
- ## 1.0.8 (2024-12-27)
30
+ ## 1.1.4 (2025-01-04)
33
31
 
34
- ### Improvements
32
+ ### Fixes
35
33
 
36
- - Tweak Dialog Styles
37
- - Disable scroll when modal dialog is open
34
+ - Fix summary border-radius by using a border-radius token
35
+
36
+ ## 1.1.3 (2025-01-04)
38
37
 
39
38
  ### Fixes
40
39
 
41
- - Fix user selection styles
40
+ - Small design fixes and improvements
42
41
 
43
- ## 1.0.9 (2024-12-27)
42
+ ## 1.1.2 (2025-01-03)
44
43
 
45
- ### Improvements
44
+ ### Fixes
46
45
 
47
- - Tweak Dialog Radius and mobile styles
46
+ - Fix switch component not working
48
47
 
49
- ## 1.0.10 (2024-12-27)
48
+ ## 1.1.1 (2025-01-03)
50
49
 
51
50
  ### Fixes
52
51
 
53
- - Fix radius for real
52
+ - Made details full width again
54
53
 
55
54
  ## 1.1.0 (2025-01-03)
56
55
 
@@ -62,48 +61,55 @@ Lots of spring cleaning
62
61
  - Changed default styling for details
63
62
  - Cleanup unused styles
64
63
 
65
- ## 1.1.1 (2025-01-03)
64
+ ## 1.0.10 (2024-12-27)
66
65
 
67
66
  ### Fixes
68
67
 
69
- - Made details full width again
70
-
71
- ## 1.1.2 (2025-01-03)
68
+ - Fix radius for real
72
69
 
73
- ### Fixes
70
+ ## 1.0.9 (2024-12-27)
74
71
 
75
- - Fix switch component not working
72
+ ### Improvements
76
73
 
77
- ## 1.1.3 (2025-01-04)
74
+ - Tweak Dialog Radius and mobile styles
78
75
 
79
- ### Fixes
76
+ ## 1.0.8 (2024-12-27)
80
77
 
81
- - Small design fixes and improvements
78
+ ### Improvements
82
79
 
83
- ## 1.1.4 (2025-01-04)
80
+ - Tweak Dialog Styles
81
+ - Disable scroll when modal dialog is open
84
82
 
85
83
  ### Fixes
86
84
 
87
- - Fix summary border-radius by using a border-radius token
85
+ - Fix user selection styles
88
86
 
89
- ## 1.1.5 (2025-01-09)
87
+ ## v1.0.5 (2024-11-28)
90
88
 
91
- ### Improvements
89
+ ### Fixes
92
90
 
93
- - Add `themed` class to apply `var(--text)` and `var(--surface)` colors
91
+ - Fix fields not compiling
94
92
 
95
- ### Fixes
93
+ ## v1.0.5 (2024-11-28)
96
94
 
97
- - Fix text colors for `<ins>` and `<del>`
95
+ ### Features
98
96
 
99
- ## 1.1.6 (2025-01-09)
97
+ Make fieldset-based inputs more accessible by adding legends. This affects:
98
+ - `nc-tag-select`
99
+ - `nc-segmented-control`
100
+ - `nc-radio-field`
101
+ - `nc-checkbox-field`
100
102
 
101
- ### Improvements
103
+ Be sure to checkout the updated markup for these components in the documentation.
102
104
 
103
- - Small changes to spacings.
105
+ ## v1.0.4 (2024-09-15)
104
106
 
105
- ## 1.2.0 (2025-04-03)
107
+ ### New Features
106
108
 
107
- ### Improvements
109
+ - Added `.nc-alert` class, an alert and utility class for notifications.
110
+ - Added `-aligned` variant to `.nc-button`, which applies negative margin, so you can visually align stealth buttons
108
111
 
109
- - Add clickable card class
112
+ ### Fixes
113
+
114
+ - Fixed Webkit `<detail>` style
115
+ - 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: 44em;
18
+ --measure-base: 36em;
19
+ --measure-small: 22em;
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