@nordcode/ui 2.1.9 → 2.2.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,3 +1,17 @@
1
+ ## 2.2.1 (2026-01-03)
2
+
3
+ ### fixes
4
+
5
+ - fix non input label font weights
6
+
7
+ ## 2.2.0 (2026-01-03)
8
+
9
+ ### features
10
+
11
+ - simplify dialog styles
12
+ - use ch/lh in few select places (measures, tracking)
13
+ - extend `nc-segmented-control` to be usable for button groups, tabgroups and horizontal controls
14
+
1
15
  ## 2.1.9 (2026-01-02)
2
16
 
3
17
  ### fixes
package/out/bundle.css CHANGED
@@ -12,11 +12,11 @@
12
12
  --line-height-base: 1.55;
13
13
  --line-height-small: 1.1;
14
14
  --tracking-base: normal;
15
- --tracking-tight: -.02em;
16
- --tracking-wide: .03em;
17
- --measure-large: 56em;
18
- --measure-base: 44em;
19
- --measure-small: 28em;
15
+ --tracking-tight: -.04ch;
16
+ --tracking-wide: .06ch;
17
+ --measure-large: 88ch;
18
+ --measure-base: 72ch;
19
+ --measure-small: 44ch;
20
20
  --font-size-smallest: max(.75rem, 12px);
21
21
  --font-size-small: max(.875rem, 14px);
22
22
  --font-size-base: 1rem;
@@ -468,7 +468,7 @@
468
468
  grid-column: 1 / 1;
469
469
  min-block-size: 100%;
470
470
  padding-block-end: 0;
471
- padding-inline-end: 1em;
471
+ padding-inline-end: var(--control-spacing-base, 1em);
472
472
  }
473
473
 
474
474
  :where(dt):not(:last-of-type) {
@@ -966,11 +966,11 @@
966
966
  }
967
967
 
968
968
  :where(.nc-flow) > * {
969
- max-inline-size: var(--flow-base-meassure, 44em);
969
+ max-inline-size: var(--flow-base-meassure, 72ch);
970
970
  }
971
971
 
972
972
  :where(.nc-flow) > :is(h1, h2, h3, h4, h5, h6) {
973
- max-inline-size: var(--flow-headline-meassure, 22em);
973
+ max-inline-size: var(--flow-headline-meassure, 32ch);
974
974
  --flow-gap: 1.5lh;
975
975
  }
976
976
 
@@ -252,7 +252,7 @@
252
252
  grid-column: 1 / 1;
253
253
  min-block-size: 100%;
254
254
  padding-block-end: 0;
255
- padding-inline-end: 1em;
255
+ padding-inline-end: var(--control-spacing-base, 1em);
256
256
  }
257
257
 
258
258
  :where(dt):not(:last-of-type) {
@@ -750,11 +750,11 @@
750
750
  }
751
751
 
752
752
  :where(.nc-flow) > * {
753
- max-inline-size: var(--flow-base-meassure, 44em);
753
+ max-inline-size: var(--flow-base-meassure, 72ch);
754
754
  }
755
755
 
756
756
  :where(.nc-flow) > :is(h1, h2, h3, h4, h5, h6) {
757
- max-inline-size: var(--flow-headline-meassure, 22em);
757
+ max-inline-size: var(--flow-headline-meassure, 32ch);
758
758
  --flow-gap: 1.5lh;
759
759
  }
760
760
 
package/out/complete.css CHANGED
@@ -12,11 +12,11 @@
12
12
  --line-height-base: 1.55;
13
13
  --line-height-small: 1.1;
14
14
  --tracking-base: normal;
15
- --tracking-tight: -.02em;
16
- --tracking-wide: .03em;
17
- --measure-large: 56em;
18
- --measure-base: 44em;
19
- --measure-small: 28em;
15
+ --tracking-tight: -.04ch;
16
+ --tracking-wide: .06ch;
17
+ --measure-large: 88ch;
18
+ --measure-base: 72ch;
19
+ --measure-small: 44ch;
20
20
  --font-size-smallest: max(.75rem, 12px);
21
21
  --font-size-small: max(.875rem, 14px);
22
22
  --font-size-base: 1rem;
@@ -468,7 +468,7 @@
468
468
  grid-column: 1 / 1;
469
469
  min-block-size: 100%;
470
470
  padding-block-end: 0;
471
- padding-inline-end: 1em;
471
+ padding-inline-end: var(--control-spacing-base, 1em);
472
472
  }
473
473
 
474
474
  :where(dt):not(:last-of-type) {
@@ -966,11 +966,11 @@
966
966
  }
967
967
 
968
968
  :where(.nc-flow) > * {
969
- max-inline-size: var(--flow-base-meassure, 44em);
969
+ max-inline-size: var(--flow-base-meassure, 72ch);
970
970
  }
971
971
 
972
972
  :where(.nc-flow) > :is(h1, h2, h3, h4, h5, h6) {
973
- max-inline-size: var(--flow-headline-meassure, 22em);
973
+ max-inline-size: var(--flow-headline-meassure, 32ch);
974
974
  --flow-gap: 1.5lh;
975
975
  }
976
976
 
@@ -1969,6 +1969,8 @@
1969
1969
  :where(.nc-dialog) :where(.dialog-content) {
1970
1970
  padding-inline: var(--_dialog-padding-inline);
1971
1971
  padding-block: var(--spacing-near);
1972
+ overscroll-behavior: contain;
1973
+ scroll-behavior: smooth;
1972
1974
  grid-area: content;
1973
1975
  overflow: auto;
1974
1976
  }
@@ -2146,6 +2148,10 @@
2146
2148
  display: inline-flex;
2147
2149
  }
2148
2150
 
2151
+ :where(label, .nc-input-label) .nc-hint, :where(label, .nc-input-label) .nc-input-error {
2152
+ font-weight: var(--font-weight-default);
2153
+ }
2154
+
2149
2155
  :where(input, textarea, select, .nc-input, .nc-select, .nc-textarea, .nc-input-checkbox, .nc-input-radio, .nc-input-label, .nc-input-color, .nc-input-field, .nc-input-error, .nc-checkbox-wrapper, .nc-input-switch, .nc-radio-field, .nc-checkbox-field) {
2150
2156
  --_input-background: var(--input-background, var(--color-surface-subtle));
2151
2157
  --_input-background-active: var(--input-background-active, var(--color-surface-base));
@@ -2457,86 +2463,145 @@
2457
2463
  outline-offset: 0;
2458
2464
  }
2459
2465
 
2466
+ :where(.nc-segmented-control):focus-within:has( > button) {
2467
+ outline: none;
2468
+ }
2469
+
2460
2470
  :where(.nc-segmented-control) input {
2461
2471
  opacity: 0;
2462
2472
  position: absolute;
2463
2473
  }
2464
2474
 
2465
- :where(.nc-segmented-control) label {
2475
+ :where(.nc-segmented-control) > * {
2466
2476
  padding-inline: var(--_input-padding-inline);
2467
2477
  padding-block: var(--_input-padding-block);
2468
2478
  min-block-size: var(--segmented-control-min-height, var(--control-height-base));
2469
2479
  color: var(--_input-color);
2470
2480
  border: var(--_input-border);
2481
+ cursor: pointer;
2482
+ background: none;
2471
2483
  justify-content: center;
2472
2484
  align-items: center;
2473
2485
  display: flex;
2474
2486
  }
2475
2487
 
2476
- :where(.nc-segmented-control) label > .nc-input-label {
2488
+ :where(.nc-segmented-control) > * > .nc-input-label {
2477
2489
  color: inherit;
2478
2490
  }
2479
2491
 
2480
- :where(.nc-segmented-control) label:hover {
2492
+ button:is(:where(.nc-segmented-control) > *) {
2493
+ box-shadow: none;
2494
+ border-radius: 0;
2495
+ transform: none;
2496
+ }
2497
+
2498
+ button:is(:where(.nc-segmented-control) > *):active {
2499
+ scale: 1;
2500
+ }
2501
+
2502
+ button:is(:where(.nc-segmented-control) > *):focus-within {
2503
+ outline-offset: 0;
2504
+ outline: 1px auto;
2505
+ }
2506
+
2507
+ :where(.nc-segmented-control) > *:hover {
2481
2508
  --current-background: var(--_input-hover-background);
2482
2509
  background-color: var(--_input-hover-background);
2483
2510
  }
2484
2511
 
2485
- :where(.nc-segmented-control) label:first-child {
2512
+ :where(.nc-segmented-control) > *:first-child {
2486
2513
  border-radius: var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0 0;
2487
2514
  }
2488
2515
 
2489
- :where(.nc-segmented-control) label:last-child {
2516
+ :where(.nc-segmented-control) > *:last-child {
2490
2517
  border-radius: 0 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius);
2491
2518
  }
2492
2519
 
2493
- :where(.nc-segmented-control) label:not(:last-child) {
2520
+ :where(.nc-segmented-control) > *:not(:last-child) {
2494
2521
  border-block-end: var(--border-width-thin) solid var(--color-border-muted);
2495
2522
  }
2496
2523
 
2497
- :where(.nc-segmented-control) label:not(:first-child) {
2524
+ :where(.nc-segmented-control) > *:not(:first-child) {
2498
2525
  border-block-start: none;
2499
2526
  }
2500
2527
 
2501
- :where(.nc-segmented-control) label:has(input:checked) {
2528
+ :where(.nc-segmented-control) > *[aria-pressed="true"], :where(.nc-segmented-control) > *[aria-current] {
2529
+ background: var(--_segmented-control-checked-surface-color);
2530
+ color: var(--_segmented-control-checked-text-color);
2531
+ box-shadow: var(--shadow-near);
2532
+ font-weight: var(--font-weight-default);
2533
+ }
2534
+
2535
+ :where(.nc-segmented-control) > *:has(input:checked) {
2502
2536
  background: var(--_segmented-control-checked-surface-color);
2503
2537
  color: var(--_segmented-control-checked-text-color);
2504
2538
  box-shadow: var(--shadow-near);
2539
+ font-weight: var(--font-weight-default);
2505
2540
  }
2506
2541
 
2507
- :where(.nc-segmented-control) label:focus-within {
2542
+ :where(.nc-segmented-control) > *:focus-within {
2508
2543
  outline: none;
2509
2544
  }
2510
2545
 
2511
- :where(.nc-segmented-control) label:has(input:disabled) {
2546
+ :where(.nc-segmented-control) > *:disabled, :where(.nc-segmented-control) > *[aria-disabled="true"] {
2512
2547
  filter: var(--_input-disabled-filter);
2513
2548
  cursor: not-allowed;
2514
2549
  }
2515
2550
 
2516
- @container segmented-control (width >= 32rem) {
2551
+ :where(.nc-segmented-control) > *:has(input:disabled) {
2552
+ filter: var(--_input-disabled-filter);
2553
+ cursor: not-allowed;
2554
+ }
2555
+
2556
+ @container segmented-control (width >= 32rem) or style(--horizontal: true) {
2517
2557
  :where(.nc-segmented-control) {
2518
2558
  grid-auto-columns: 1fr;
2519
2559
  grid-auto-flow: column;
2560
+ inline-size: auto;
2520
2561
  }
2521
2562
 
2522
- :where(.nc-segmented-control) > label:first-child {
2563
+ :where(.nc-segmented-control) > *:first-child {
2523
2564
  border-radius: var(--_segmented-control-border-radius) 0 0 var(--_segmented-control-border-radius);
2524
2565
  }
2525
2566
 
2526
- :where(.nc-segmented-control) > label:last-child {
2567
+ :where(.nc-segmented-control) > *:last-child {
2527
2568
  border-radius: 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0;
2528
2569
  }
2529
2570
 
2530
- :where(.nc-segmented-control) > label:not(:last-child) {
2571
+ :where(.nc-segmented-control) > *:not(:last-child) {
2531
2572
  border-block-end: var(--_input-border);
2532
2573
  border-inline-end: var(--border-width-thin) solid var(--color-border-muted);
2533
2574
  }
2534
2575
 
2535
- :where(.nc-segmented-control) > label:not(:first-child) {
2576
+ :where(.nc-segmented-control) > *:not(:first-child) {
2536
2577
  border-block-start: var(--_input-border);
2537
2578
  border-inline-start: none;
2538
2579
  }
2539
2580
  }
2581
+
2582
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) {
2583
+ grid-auto-columns: 1fr;
2584
+ grid-auto-flow: column;
2585
+ inline-size: auto;
2586
+ }
2587
+
2588
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:first-child {
2589
+ border-radius: var(--_segmented-control-border-radius) 0 0 var(--_segmented-control-border-radius);
2590
+ }
2591
+
2592
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:last-child {
2593
+ border-radius: 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0;
2594
+ }
2595
+
2596
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:not(:last-child) {
2597
+ border-block-end: var(--_input-border);
2598
+ border-inline-end: var(--border-width-thin) solid var(--color-border-muted);
2599
+ }
2600
+
2601
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:not(:first-child) {
2602
+ border-block-start: var(--_input-border);
2603
+ border-inline-start: none;
2604
+ }
2540
2605
  }
2541
2606
 
2542
2607
  @layer components.input-switch {
@@ -252,7 +252,7 @@
252
252
  grid-column: 1 / 1;
253
253
  min-block-size: 100%;
254
254
  padding-block-end: 0;
255
- padding-inline-end: 1em;
255
+ padding-inline-end: var(--control-spacing-base, 1em);
256
256
  }
257
257
 
258
258
  :where(dt):not(:last-of-type) {
@@ -750,11 +750,11 @@
750
750
  }
751
751
 
752
752
  :where(.nc-flow) > * {
753
- max-inline-size: var(--flow-base-meassure, 44em);
753
+ max-inline-size: var(--flow-base-meassure, 72ch);
754
754
  }
755
755
 
756
756
  :where(.nc-flow) > :is(h1, h2, h3, h4, h5, h6) {
757
- max-inline-size: var(--flow-headline-meassure, 22em);
757
+ max-inline-size: var(--flow-headline-meassure, 32ch);
758
758
  --flow-gap: 1.5lh;
759
759
  }
760
760
 
@@ -1753,6 +1753,8 @@
1753
1753
  :where(.nc-dialog) :where(.dialog-content) {
1754
1754
  padding-inline: var(--_dialog-padding-inline);
1755
1755
  padding-block: var(--spacing-near);
1756
+ overscroll-behavior: contain;
1757
+ scroll-behavior: smooth;
1756
1758
  grid-area: content;
1757
1759
  overflow: auto;
1758
1760
  }
@@ -1930,6 +1932,10 @@
1930
1932
  display: inline-flex;
1931
1933
  }
1932
1934
 
1935
+ :where(label, .nc-input-label) .nc-hint, :where(label, .nc-input-label) .nc-input-error {
1936
+ font-weight: var(--font-weight-default);
1937
+ }
1938
+
1933
1939
  :where(input, textarea, select, .nc-input, .nc-select, .nc-textarea, .nc-input-checkbox, .nc-input-radio, .nc-input-label, .nc-input-color, .nc-input-field, .nc-input-error, .nc-checkbox-wrapper, .nc-input-switch, .nc-radio-field, .nc-checkbox-field) {
1934
1940
  --_input-background: var(--input-background, var(--color-surface-subtle));
1935
1941
  --_input-background-active: var(--input-background-active, var(--color-surface-base));
@@ -2241,86 +2247,145 @@
2241
2247
  outline-offset: 0;
2242
2248
  }
2243
2249
 
2250
+ :where(.nc-segmented-control):focus-within:has( > button) {
2251
+ outline: none;
2252
+ }
2253
+
2244
2254
  :where(.nc-segmented-control) input {
2245
2255
  opacity: 0;
2246
2256
  position: absolute;
2247
2257
  }
2248
2258
 
2249
- :where(.nc-segmented-control) label {
2259
+ :where(.nc-segmented-control) > * {
2250
2260
  padding-inline: var(--_input-padding-inline);
2251
2261
  padding-block: var(--_input-padding-block);
2252
2262
  min-block-size: var(--segmented-control-min-height, var(--control-height-base));
2253
2263
  color: var(--_input-color);
2254
2264
  border: var(--_input-border);
2265
+ cursor: pointer;
2266
+ background: none;
2255
2267
  justify-content: center;
2256
2268
  align-items: center;
2257
2269
  display: flex;
2258
2270
  }
2259
2271
 
2260
- :where(.nc-segmented-control) label > .nc-input-label {
2272
+ :where(.nc-segmented-control) > * > .nc-input-label {
2261
2273
  color: inherit;
2262
2274
  }
2263
2275
 
2264
- :where(.nc-segmented-control) label:hover {
2276
+ button:is(:where(.nc-segmented-control) > *) {
2277
+ box-shadow: none;
2278
+ border-radius: 0;
2279
+ transform: none;
2280
+ }
2281
+
2282
+ button:is(:where(.nc-segmented-control) > *):active {
2283
+ scale: 1;
2284
+ }
2285
+
2286
+ button:is(:where(.nc-segmented-control) > *):focus-within {
2287
+ outline-offset: 0;
2288
+ outline: 1px auto;
2289
+ }
2290
+
2291
+ :where(.nc-segmented-control) > *:hover {
2265
2292
  --current-background: var(--_input-hover-background);
2266
2293
  background-color: var(--_input-hover-background);
2267
2294
  }
2268
2295
 
2269
- :where(.nc-segmented-control) label:first-child {
2296
+ :where(.nc-segmented-control) > *:first-child {
2270
2297
  border-radius: var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0 0;
2271
2298
  }
2272
2299
 
2273
- :where(.nc-segmented-control) label:last-child {
2300
+ :where(.nc-segmented-control) > *:last-child {
2274
2301
  border-radius: 0 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius);
2275
2302
  }
2276
2303
 
2277
- :where(.nc-segmented-control) label:not(:last-child) {
2304
+ :where(.nc-segmented-control) > *:not(:last-child) {
2278
2305
  border-block-end: var(--border-width-thin) solid var(--color-border-muted);
2279
2306
  }
2280
2307
 
2281
- :where(.nc-segmented-control) label:not(:first-child) {
2308
+ :where(.nc-segmented-control) > *:not(:first-child) {
2282
2309
  border-block-start: none;
2283
2310
  }
2284
2311
 
2285
- :where(.nc-segmented-control) label:has(input:checked) {
2312
+ :where(.nc-segmented-control) > *[aria-pressed="true"], :where(.nc-segmented-control) > *[aria-current] {
2313
+ background: var(--_segmented-control-checked-surface-color);
2314
+ color: var(--_segmented-control-checked-text-color);
2315
+ box-shadow: var(--shadow-near);
2316
+ font-weight: var(--font-weight-default);
2317
+ }
2318
+
2319
+ :where(.nc-segmented-control) > *:has(input:checked) {
2286
2320
  background: var(--_segmented-control-checked-surface-color);
2287
2321
  color: var(--_segmented-control-checked-text-color);
2288
2322
  box-shadow: var(--shadow-near);
2323
+ font-weight: var(--font-weight-default);
2289
2324
  }
2290
2325
 
2291
- :where(.nc-segmented-control) label:focus-within {
2326
+ :where(.nc-segmented-control) > *:focus-within {
2292
2327
  outline: none;
2293
2328
  }
2294
2329
 
2295
- :where(.nc-segmented-control) label:has(input:disabled) {
2330
+ :where(.nc-segmented-control) > *:disabled, :where(.nc-segmented-control) > *[aria-disabled="true"] {
2296
2331
  filter: var(--_input-disabled-filter);
2297
2332
  cursor: not-allowed;
2298
2333
  }
2299
2334
 
2300
- @container segmented-control (width >= 32rem) {
2335
+ :where(.nc-segmented-control) > *:has(input:disabled) {
2336
+ filter: var(--_input-disabled-filter);
2337
+ cursor: not-allowed;
2338
+ }
2339
+
2340
+ @container segmented-control (width >= 32rem) or style(--horizontal: true) {
2301
2341
  :where(.nc-segmented-control) {
2302
2342
  grid-auto-columns: 1fr;
2303
2343
  grid-auto-flow: column;
2344
+ inline-size: auto;
2304
2345
  }
2305
2346
 
2306
- :where(.nc-segmented-control) > label:first-child {
2347
+ :where(.nc-segmented-control) > *:first-child {
2307
2348
  border-radius: var(--_segmented-control-border-radius) 0 0 var(--_segmented-control-border-radius);
2308
2349
  }
2309
2350
 
2310
- :where(.nc-segmented-control) > label:last-child {
2351
+ :where(.nc-segmented-control) > *:last-child {
2311
2352
  border-radius: 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0;
2312
2353
  }
2313
2354
 
2314
- :where(.nc-segmented-control) > label:not(:last-child) {
2355
+ :where(.nc-segmented-control) > *:not(:last-child) {
2315
2356
  border-block-end: var(--_input-border);
2316
2357
  border-inline-end: var(--border-width-thin) solid var(--color-border-muted);
2317
2358
  }
2318
2359
 
2319
- :where(.nc-segmented-control) > label:not(:first-child) {
2360
+ :where(.nc-segmented-control) > *:not(:first-child) {
2320
2361
  border-block-start: var(--_input-border);
2321
2362
  border-inline-start: none;
2322
2363
  }
2323
2364
  }
2365
+
2366
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) {
2367
+ grid-auto-columns: 1fr;
2368
+ grid-auto-flow: column;
2369
+ inline-size: auto;
2370
+ }
2371
+
2372
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:first-child {
2373
+ border-radius: var(--_segmented-control-border-radius) 0 0 var(--_segmented-control-border-radius);
2374
+ }
2375
+
2376
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:last-child {
2377
+ border-radius: 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0;
2378
+ }
2379
+
2380
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:not(:last-child) {
2381
+ border-block-end: var(--_input-border);
2382
+ border-inline-end: var(--border-width-thin) solid var(--color-border-muted);
2383
+ }
2384
+
2385
+ :where(.nc-segmented-control-group.-horizontal) :where(.nc-segmented-control) > *:not(:first-child) {
2386
+ border-block-start: var(--_input-border);
2387
+ border-inline-start: none;
2388
+ }
2324
2389
  }
2325
2390
 
2326
2391
  @layer components.input-switch {
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "type": "git",
13
13
  "url": "https://github.com/nordcode-agency/nordcode/tree/main/packages/ui"
14
14
  },
15
- "version": "2.1.9",
15
+ "version": "2.2.1",
16
16
  "publishConfig": {
17
17
  "access": "public"
18
18
  },
@@ -131,6 +131,8 @@
131
131
  padding-inline: var(--_dialog-padding-inline);
132
132
  padding-block: var(--spacing-near);
133
133
  overflow: auto;
134
+ overscroll-behavior: contain;
135
+ scroll-behavior: smooth;
134
136
  }
135
137
 
136
138
  :where(.dialog-actions) {
@@ -8,6 +8,10 @@
8
8
  font-size: inherit;
9
9
  gap: 0;
10
10
  align-items: center;
11
+
12
+ & .nc-hint, & .nc-input-error {
13
+ font-weight: var(--font-weight-default);
14
+ }
11
15
  }
12
16
 
13
17
  :where(input, textarea, select, .nc-input, .nc-select, .nc-textarea, .nc-input-checkbox, .nc-input-radio, .nc-input-label, .nc-input-color, .nc-input-field, .nc-input-error, .nc-checkbox-wrapper, .nc-input-switch, .nc-radio-field, .nc-checkbox-field) {
@@ -34,12 +34,16 @@
34
34
  outline-offset: 0;
35
35
  }
36
36
 
37
+ &:focus-within:has(> button) {
38
+ outline: none;
39
+ }
40
+
37
41
  & input {
38
42
  opacity: 0;
39
43
  position: absolute;
40
44
  }
41
45
 
42
- & label {
46
+ & > * {
43
47
  display: flex;
44
48
  padding-inline: var(--_input-padding-inline);
45
49
  padding-block: var(--_input-padding-block);
@@ -48,11 +52,28 @@
48
52
  border: var(--_input-border);
49
53
  align-items: center;
50
54
  justify-content: center;
55
+ cursor: pointer;
56
+ background: none;
51
57
 
52
58
  > .nc-input-label {
53
59
  color: inherit;
54
60
  }
55
61
 
62
+ &button {
63
+ transform: none;
64
+ box-shadow: none;
65
+ border-radius: 0;
66
+
67
+ &:active {
68
+ scale: 1;
69
+ }
70
+
71
+ &:focus-within {
72
+ outline-offset: 0;
73
+ outline: 1px auto;
74
+ }
75
+ }
76
+
56
77
  &:hover {
57
78
  --current-background: var(--_input-hover-background);
58
79
  background-color: var(--_input-hover-background);
@@ -74,29 +95,60 @@
74
95
  border-block-start: none;
75
96
  }
76
97
 
77
- &:has(input:checked) {
98
+ &:has(input:checked), &[aria-pressed="true"], &[aria-current] {
78
99
  background: var(--_segmented-control-checked-surface-color);
79
100
  color: var(--_segmented-control-checked-text-color);
80
101
  box-shadow: var(--shadow-near);
102
+ font-weight: var(--font-weight-default);
81
103
  }
82
104
 
83
105
  &:focus-within {
84
106
  outline: none;
85
107
  }
86
108
 
87
- &:has(input:disabled) {
109
+ &:has(input:disabled), &:disabled, &[aria-disabled="true"] {
88
110
  filter: var(--_input-disabled-filter);
89
111
  cursor: not-allowed;
90
112
  }
91
113
  }
92
114
  }
93
115
 
94
- @container segmented-control (min-width: 32rem) {
116
+ @container segmented-control (min-width: 32rem) or style(--horizontal: true) {
117
+ :where(.nc-segmented-control) {
118
+ grid-auto-columns: 1fr;
119
+ grid-auto-flow: column;
120
+ inline-size: auto;
121
+
122
+ > * {
123
+ &:first-child {
124
+ border-radius: var(--_segmented-control-border-radius) 0 0 var(--_segmented-control-border-radius);
125
+ }
126
+
127
+ &:last-child {
128
+ border-radius: 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0;
129
+ }
130
+
131
+ &:not(:last-child) {
132
+ border-block-end: var(--_input-border);
133
+ border-inline-end: var(--border-width-thin) solid var(--color-border-muted);
134
+ }
135
+
136
+ &:not(:first-child) {
137
+ border-block-start: var(--_input-border);
138
+ border-inline-start: none;
139
+ }
140
+ }
141
+ }
142
+ }
143
+
144
+ /* @todo: remove once style container queries are widely supported */
145
+ :where(.nc-segmented-control-group.-horizontal) {
95
146
  :where(.nc-segmented-control) {
96
147
  grid-auto-columns: 1fr;
97
148
  grid-auto-flow: column;
149
+ inline-size: auto;
98
150
 
99
- > label {
151
+ > * {
100
152
  &:first-child {
101
153
  border-radius: var(--_segmented-control-border-radius) 0 0 var(--_segmented-control-border-radius);
102
154
  }
@@ -17,12 +17,12 @@
17
17
  --line-height-small: 1.1;
18
18
 
19
19
  --tracking-base: normal;
20
- --tracking-tight: -0.02em;
21
- --tracking-wide: 0.03em;
20
+ --tracking-tight: -0.04ch;
21
+ --tracking-wide: 0.06ch;
22
22
 
23
- --measure-large: 56em;
24
- --measure-base: 44em;
25
- --measure-small: 28em;
23
+ --measure-large: 88ch;
24
+ --measure-base: 72ch;
25
+ --measure-small: 44ch;
26
26
 
27
27
  --font-size-smallest: max(0.75rem, 12px);
28
28
  --font-size-small: max(0.875rem, 14px);
@@ -113,7 +113,6 @@
113
113
  --lightness-diff: calc(var(--lightness-max) - var(--lightness-min));
114
114
  --lightness-contrast-cutoff: calc(var(--lightness-min) + var(--lightness-diff) * 0.5 + 0.05);
115
115
  --neutral-chroma-scale: 0.95;
116
- --transparency-weaker: 0.8;
117
116
  --c-brand-primary: 0.3;
118
117
  --h-brand-primary: 265;
119
118
  --l-brand-primary-light: 0.56;
@@ -39,7 +39,7 @@
39
39
  @container description-list (min-width: 30rem) {
40
40
  :where(dt) {
41
41
  grid-column: 1 / 1;
42
- padding-inline-end: 1em;
42
+ padding-inline-end: var(--control-spacing-base, 1em);
43
43
  padding-block-end: 0;
44
44
  min-block-size: 100%;
45
45
 
@@ -58,11 +58,11 @@
58
58
  }
59
59
 
60
60
  > * {
61
- max-inline-size: var(--flow-base-meassure, 44em);
61
+ max-inline-size: var(--flow-base-meassure, 72ch);
62
62
  }
63
63
 
64
64
  > *:is(h1, h2, h3, h4, h5, h6) {
65
- max-inline-size: var(--flow-headline-meassure, 22em);
65
+ max-inline-size: var(--flow-headline-meassure, 32ch);
66
66
  --flow-gap: 1.5lh;
67
67
  }
68
68