@pontive/pontkit-core 1.32.1 → 1.34.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.
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Preview specimens: one component at a time, for the dashboard's Component
3
+ * scope (docs/14-dashboard-branding.md §"Previews").
4
+ *
5
+ * `PREVIEW_SCREENS` shows whole sign-in screens, which is right for the
6
+ * Global scope. When the branding editor is open on one component ("Button",
7
+ * "Alert" …) it shows that component's specimen instead: its variants, sizes
8
+ * and states side by side, so every token in its panel has something visible
9
+ * to change.
10
+ *
11
+ * - **Keyed by token component** (a manifest `component`, `tokens.json`), not
12
+ * by tag: that is what the editor's items are. A guardrail checks every key
13
+ * is one.
14
+ * - **pont2 owns the markup.** The dashboard renders `html` as given and never
15
+ * writes pont2 markup itself, so a markup change here never needs a
16
+ * dashboard change.
17
+ * - Specimens sit at the global scope (no widget around them): the editor's
18
+ * Component scope edits `:root` tokens.
19
+ * - Nothing in a specimen reaches a server: there is no flow host, so action
20
+ * buttons only show their busy state, if anything.
21
+ *
22
+ * Pure data: no DOM, no Lit, no network.
23
+ */
24
+ export interface PreviewSpecimen {
25
+ /** A name for the specimen. */
26
+ label: string;
27
+ /** The markup to render, inside a `<form>` that does not submit. */
28
+ html: string;
29
+ }
30
+ export declare const PREVIEW_SPECIMENS: Readonly<Record<string, PreviewSpecimen>>;
@@ -25,3 +25,4 @@ export * from './scope-list/scope-list';
25
25
  export * from './layout/layout';
26
26
  export * from './flow-widget/flow-widget';
27
27
  export * from './flow-widget/preview';
28
+ export * from './flow-widget/specimens';
@@ -832,13 +832,18 @@ layer(pont2.tokens);
832
832
 
833
833
  /* ./sem/shape.css */
834
834
  /*
835
- * sem · shape: focus ring. The radius scale lives in sem/radius.css, derived
836
- * from the ref knob in ref/radius.css.
835
+ * sem · shape and state: the focus ring, the hairline border width, and the
836
+ * disabled opacity. The radius scale lives in sem/radius.css, derived from
837
+ * the ref knob in ref/radius.css.
837
838
  */
838
839
  @layer pont2.tokens {
839
840
  :root {
840
841
  /* Focus ring: `focus-visible:ring-3 ring-ring/50` */
841
842
  --pont2-sem-ring-width: 3px;
843
+ /* Every 1px border (shadcn's `border`): controls, cards, dividers, the QR frame */
844
+ --pont2-sem-border-width: 1px;
845
+ /* Every disabled control and its label (shadcn's `disabled:opacity-50`) */
846
+ --pont2-sem-opacity-disabled: 0.5;
842
847
  }
843
848
  }
844
849
 
@@ -1145,7 +1150,7 @@ layer(pont2.tokens);
1145
1150
  transition-timing-function: var(--pont2-sem-ease-in-out);
1146
1151
 
1147
1152
  /* .cn-button */
1148
- border: 1px solid var(--_pont2-button-border-color);
1153
+ border: var(--pont2-sem-border-width) solid var(--_pont2-button-border-color);
1149
1154
  border-radius: var(--_pont2-button-radius);
1150
1155
  background-clip: padding-box;
1151
1156
  background-color: var(--_pont2-button-bg);
@@ -1200,7 +1205,7 @@ layer(pont2.tokens);
1200
1205
  [data-pont2-button][data-disabled],
1201
1206
  [data-pont2-button][aria-disabled="true"] {
1202
1207
  pointer-events: none;
1203
- opacity: 0.5;
1208
+ opacity: var(--pont2-sem-opacity-disabled);
1204
1209
  }
1205
1210
 
1206
1211
  /* ------------------------------------------------------------------ */
@@ -1365,7 +1370,7 @@ layer(pont2.tokens);
1365
1370
  /* group-data-[disabled=true]: inside a disabled group (e.g. <pont2-prim-field data-disabled>) */
1366
1371
  :is([data-disabled="true"], [data-disabled=""]) [data-pont2-label] {
1367
1372
  pointer-events: none;
1368
- opacity: 0.5;
1373
+ opacity: var(--pont2-sem-opacity-disabled);
1369
1374
  }
1370
1375
 
1371
1376
  /* peer-disabled: the label follows a disabled control (native or form-associated).
@@ -1374,7 +1379,7 @@ layer(pont2.tokens);
1374
1379
  :is(:disabled, [data-disabled]) ~ [data-pont2-label],
1375
1380
  :is(:disabled, [data-disabled]) ~ [data-pont2-shell] > [data-pont2-label] {
1376
1381
  cursor: not-allowed;
1377
- opacity: 0.5;
1382
+ opacity: var(--pont2-sem-opacity-disabled);
1378
1383
  }
1379
1384
  }
1380
1385
 
@@ -1417,7 +1422,7 @@ layer(pont2.tokens);
1417
1422
  min-width: 0;
1418
1423
  height: var(--_pont2-input-height);
1419
1424
  padding: 0.25rem 0.625rem;
1420
- border: 1px solid var(--_pont2-input-border-color);
1425
+ border: var(--pont2-sem-border-width) solid var(--_pont2-input-border-color);
1421
1426
  border-radius: var(--_pont2-input-radius);
1422
1427
  background-color: var(--_pont2-input-bg);
1423
1428
  font-size: var(--pont2-sem-text-base);
@@ -1467,7 +1472,7 @@ layer(pont2.tokens);
1467
1472
  [data-pont2-input]:disabled {
1468
1473
  pointer-events: none;
1469
1474
  cursor: not-allowed;
1470
- opacity: 0.5;
1475
+ opacity: var(--pont2-sem-opacity-disabled);
1471
1476
  }
1472
1477
  }
1473
1478
 
@@ -1507,7 +1512,7 @@ layer(pont2.tokens);
1507
1512
  min-height: 4rem;
1508
1513
  width: 100%;
1509
1514
  padding: 0.5rem 0.625rem;
1510
- border: 1px solid var(--_pont2-textarea-border-color);
1515
+ border: var(--pont2-sem-border-width) solid var(--_pont2-textarea-border-color);
1511
1516
  border-radius: var(--_pont2-textarea-radius);
1512
1517
  background-color: var(--_pont2-textarea-bg);
1513
1518
  font-size: var(--pont2-sem-text-base);
@@ -1544,7 +1549,7 @@ layer(pont2.tokens);
1544
1549
 
1545
1550
  [data-pont2-textarea]:disabled {
1546
1551
  cursor: not-allowed;
1547
- opacity: 0.5;
1552
+ opacity: var(--pont2-sem-opacity-disabled);
1548
1553
  }
1549
1554
  }
1550
1555
 
@@ -1588,7 +1593,7 @@ layer(pont2.tokens);
1588
1593
  justify-content: center;
1589
1594
  width: 1rem;
1590
1595
  height: 1rem;
1591
- border: 1px solid var(--_pont2-checkbox-border-color);
1596
+ border: var(--pont2-sem-border-width) solid var(--_pont2-checkbox-border-color);
1592
1597
  border-radius: var(--_pont2-checkbox-radius);
1593
1598
  background-color: var(--_pont2-checkbox-bg);
1594
1599
  outline: none;
@@ -1628,12 +1633,12 @@ layer(pont2.tokens);
1628
1633
 
1629
1634
  [data-pont2-checkbox]:is(:disabled, [data-disabled]) {
1630
1635
  cursor: not-allowed;
1631
- opacity: 0.5;
1636
+ opacity: var(--pont2-sem-opacity-disabled);
1632
1637
  }
1633
1638
 
1634
1639
  /* group-has-disabled/field:opacity-50 */
1635
1640
  [data-slot="field"]:has(:disabled) [data-pont2-checkbox] {
1636
- opacity: 0.5;
1641
+ opacity: var(--pont2-sem-opacity-disabled);
1637
1642
  }
1638
1643
 
1639
1644
  /* Inside a choice-card FieldLabel the label draws the focus ring instead. */
@@ -1759,7 +1764,7 @@ layer(pont2.tokens);
1759
1764
  height: var(--_pont2-badge-height);
1760
1765
  gap: 0.25rem;
1761
1766
  padding: 0.125rem 0.5rem;
1762
- border: 1px solid var(--_pont2-badge-border-color);
1767
+ border: var(--pont2-sem-border-width) solid var(--_pont2-badge-border-color);
1763
1768
  border-radius: var(--_pont2-badge-radius);
1764
1769
  font-size: var(--pont2-sem-text-xs);
1765
1770
  line-height: var(--pont2-sem-text-xs--line-height);
@@ -1998,7 +2003,7 @@ layer(pont2.tokens);
1998
2003
  gap: 0.125rem;
1999
2004
  margin: 0;
2000
2005
  padding: var(--_pont2-alert-padding-y) var(--_pont2-alert-padding-x);
2001
- border: 1px solid var(--_pont2-alert-border-color);
2006
+ border: var(--pont2-sem-border-width) solid var(--_pont2-alert-border-color);
2002
2007
  border-radius: var(--_pont2-alert-radius);
2003
2008
  text-align: left;
2004
2009
  font-size: var(--pont2-sem-text-sm);
@@ -2134,7 +2139,7 @@ layer(pont2.tokens);
2134
2139
  position: absolute;
2135
2140
  inset: 0;
2136
2141
  box-sizing: border-box;
2137
- border: 1px solid var(--_pont2-avatar-border-color);
2142
+ border: var(--pont2-sem-border-width) solid var(--_pont2-avatar-border-color);
2138
2143
  border-radius: var(--_pont2-avatar-radius);
2139
2144
  mix-blend-mode: var(--pont2-sem-mode-blend);
2140
2145
  pointer-events: none;
@@ -2392,7 +2397,7 @@ layer(pont2.tokens);
2392
2397
  gap: 0.5rem;
2393
2398
  margin: 0;
2394
2399
  padding: 0 0.625rem;
2395
- border: 1px solid var(--_pont2-button-group-text-border-color, var(--pont2-sem-color-border));
2400
+ border: var(--pont2-sem-border-width) solid var(--_pont2-button-group-text-border-color, var(--pont2-sem-color-border));
2396
2401
  border-radius: var(--_pont2-button-group-text-radius, var(--pont2-sem-radius-md));
2397
2402
  background-color: var(--_pont2-button-group-text-bg, var(--pont2-sem-color-muted));
2398
2403
  font-size: var(--pont2-sem-text-sm);
@@ -2476,7 +2481,7 @@ layer(pont2.tokens);
2476
2481
  color: var(--_pont2-card-fg);
2477
2482
  font-size: var(--pont2-sem-text-sm);
2478
2483
  line-height: var(--pont2-sem-text-sm--line-height);
2479
- --pont2-ring-shadow: 0 0 0 1px var(--_pont2-card-border-color);
2484
+ --pont2-ring-shadow: 0 0 0 var(--pont2-sem-border-width) var(--_pont2-card-border-color);
2480
2485
  --pont2-shadow: var(--_pont2-card-shadow);
2481
2486
  box-shadow: var(--pont2-ring-shadow), var(--pont2-shadow);
2482
2487
  }
@@ -2558,10 +2563,10 @@ layer(pont2.tokens);
2558
2563
 
2559
2564
  /* `border-b` / `border-t` on header/footer, for apps without Tailwind */
2560
2565
  :is(pont2-prim-card-header, [data-pont2-card-header])[data-border~="bottom"] {
2561
- border-bottom: 1px solid var(--pont2-sem-color-border);
2566
+ border-bottom: var(--pont2-sem-border-width) solid var(--pont2-sem-color-border);
2562
2567
  }
2563
2568
  :is(pont2-prim-card-footer, [data-pont2-card-footer])[data-border~="top"] {
2564
- border-top: 1px solid var(--pont2-sem-color-border);
2569
+ border-top: var(--pont2-sem-border-width) solid var(--pont2-sem-color-border);
2565
2570
  }
2566
2571
  }
2567
2572
 
@@ -2881,14 +2886,14 @@ layer(pont2.tokens);
2881
2886
  }
2882
2887
  [data-pont2-field][data-disabled]:not([data-disabled="false"]) [data-pont2-field-label],
2883
2888
  [data-pont2-field][data-disabled]:not([data-disabled="false"]) [data-pont2-field-title] {
2884
- opacity: 0.5;
2889
+ opacity: var(--pont2-sem-opacity-disabled);
2885
2890
  }
2886
2891
 
2887
2892
  /* Choice card: a FieldLabel that wraps a whole Field */
2888
2893
  [data-pont2-field-label]:has(> [data-slot="field"]) {
2889
2894
  width: 100%;
2890
2895
  flex-direction: column;
2891
- border: 1px solid var(--_pont2-field-choice-border-color);
2896
+ border: var(--pont2-sem-border-width) solid var(--_pont2-field-choice-border-color);
2892
2897
  border-radius: var(--_pont2-field-choice-radius);
2893
2898
  box-shadow: var(--pont2-ring-shadow), var(--pont2-shadow);
2894
2899
  }
@@ -3058,7 +3063,7 @@ layer(pont2.tokens);
3058
3063
  min-width: 0;
3059
3064
  height: var(--_pont2-input-group-height);
3060
3065
  margin: 0;
3061
- border: 1px solid var(--_pont2-input-group-border-color);
3066
+ border: var(--pont2-sem-border-width) solid var(--_pont2-input-group-border-color);
3062
3067
  border-radius: var(--_pont2-input-group-radius);
3063
3068
  background-color: var(--_pont2-input-group-bg);
3064
3069
  outline: none;
@@ -3125,7 +3130,7 @@ layer(pont2.tokens);
3125
3130
  padding-left: 0.5rem;
3126
3131
  }
3127
3132
  [data-pont2-input-group]:is([data-disabled="true"], [data-disabled=""]) :is(pont2-prim-input-group-addon, [data-pont2-input-group-addon]) {
3128
- opacity: 0.5;
3133
+ opacity: var(--pont2-sem-opacity-disabled);
3129
3134
  }
3130
3135
  :is(pont2-prim-input-group-addon, [data-pont2-input-group-addon]) > :is(kbd, pont2-prim-kbd, pont2-kbd, [data-pont2-kbd]) {
3131
3136
  border-radius: calc(var(--pont2-sem-radius-lg) - 5px);
@@ -3174,10 +3179,10 @@ layer(pont2.tokens);
3174
3179
  padding-top: 0.5rem;
3175
3180
  }
3176
3181
  [data-pont2-input-group-addon][data-border~="bottom"] {
3177
- border-bottom: 1px solid var(--pont2-sem-color-border);
3182
+ border-bottom: var(--pont2-sem-border-width) solid var(--pont2-sem-color-border);
3178
3183
  }
3179
3184
  [data-pont2-input-group-addon][data-border~="top"] {
3180
- border-top: 1px solid var(--pont2-sem-color-border);
3185
+ border-top: var(--pont2-sem-border-width) solid var(--pont2-sem-color-border);
3181
3186
  }
3182
3187
 
3183
3188
  /* ---------------- Text ---------------- */
@@ -3334,7 +3339,7 @@ layer(pont2.tokens);
3334
3339
  gap: 0.875rem;
3335
3340
  margin: 0;
3336
3341
  padding: 0.875rem 1rem;
3337
- border: 1px solid var(--_pont2-item-border-color);
3342
+ border: var(--pont2-sem-border-width) solid var(--_pont2-item-border-color);
3338
3343
  border-radius: var(--_pont2-item-radius);
3339
3344
  background-color: var(--_pont2-item-bg);
3340
3345
  color: inherit;
@@ -3523,7 +3528,7 @@ layer(pont2.tokens);
3523
3528
  width: fit-content;
3524
3529
  }
3525
3530
  :is(pont2-prim-native-select, pont2-native-select, [data-pont2-native-select-wrapper]):has(select:disabled) {
3526
- opacity: 0.5;
3531
+ opacity: var(--pont2-sem-opacity-disabled);
3527
3532
  }
3528
3533
  :is(pont2-prim-native-select, pont2-native-select, [data-pont2-native-select-wrapper])::after {
3529
3534
  content: "";
@@ -3552,7 +3557,7 @@ layer(pont2.tokens);
3552
3557
  min-width: 0;
3553
3558
  height: var(--_pont2-native-select-height);
3554
3559
  padding: 0.25rem 2rem 0.25rem 0.625rem;
3555
- border: 1px solid var(--_pont2-native-select-border-color);
3560
+ border: var(--pont2-sem-border-width) solid var(--_pont2-native-select-border-color);
3556
3561
  border-radius: var(--_pont2-native-select-radius);
3557
3562
  background-color: var(--_pont2-native-select-bg);
3558
3563
  font-size: var(--pont2-sem-text-sm);
@@ -3659,14 +3664,14 @@ layer(pont2.tokens);
3659
3664
  }
3660
3665
 
3661
3666
  :is(:is(pont2-prim-table, pont2-table) > table > thead, [data-pont2-table-header]) tr {
3662
- border-bottom: 1px solid var(--_pont2-table-border-color, var(--pont2-sem-color-border));
3667
+ border-bottom: var(--pont2-sem-border-width) solid var(--_pont2-table-border-color, var(--pont2-sem-color-border));
3663
3668
  }
3664
3669
  :is(:is(pont2-prim-table, pont2-table) > table > tbody, [data-pont2-table-body]) tr:last-child {
3665
3670
  border: 0;
3666
3671
  }
3667
3672
  :is(:is(pont2-prim-table, pont2-table) > table > tfoot, [data-pont2-table-footer]) {
3668
3673
  background-color: var(--_pont2-table-footer-bg, color-mix(in oklab, var(--pont2-sem-color-muted) 50%, transparent));
3669
- border-top: 1px solid var(--_pont2-table-border-color, var(--pont2-sem-color-border));
3674
+ border-top: var(--pont2-sem-border-width) solid var(--_pont2-table-border-color, var(--pont2-sem-color-border));
3670
3675
  font-weight: var(--pont2-sem-font-weight-medium);
3671
3676
  }
3672
3677
  :is(:is(pont2-prim-table, pont2-table) > table > tfoot, [data-pont2-table-footer]) > tr:last-child {
@@ -3674,7 +3679,7 @@ layer(pont2.tokens);
3674
3679
  }
3675
3680
 
3676
3681
  :is(:is(pont2-prim-table, pont2-table) > table > * > tr, [data-pont2-table-row]) {
3677
- border-bottom: 1px solid var(--_pont2-table-border-color, var(--pont2-sem-color-border));
3682
+ border-bottom: var(--pont2-sem-border-width) solid var(--_pont2-table-border-color, var(--pont2-sem-color-border));
3678
3683
  transition-property: color, background-color, border-color;
3679
3684
  transition-duration: var(--pont2-sem-duration);
3680
3685
  transition-timing-function: var(--pont2-sem-ease-in-out);
@@ -3781,7 +3786,7 @@ layer(pont2.tokens);
3781
3786
  user-select: none;
3782
3787
  }
3783
3788
  :is(pont2-prim-input-otp, [data-pont2-input-otp]):has(:disabled) {
3784
- opacity: 0.5;
3789
+ opacity: var(--pont2-sem-opacity-disabled);
3785
3790
  }
3786
3791
 
3787
3792
  /* The real input, laid transparently over the slots (input-otp's inline styles). */
@@ -3841,7 +3846,7 @@ layer(pont2.tokens);
3841
3846
  height: var(--_pont2-input-otp-slot-height);
3842
3847
  border-style: solid;
3843
3848
  border-color: var(--_pont2-input-otp-slot-border-color);
3844
- border-width: 1px 1px 1px 0;
3849
+ border-width: var(--pont2-sem-border-width) var(--pont2-sem-border-width) var(--pont2-sem-border-width) 0;
3845
3850
  background-color: var(--_pont2-input-otp-slot-bg);
3846
3851
  font-size: var(--pont2-sem-text-sm);
3847
3852
  line-height: var(--pont2-sem-text-sm--line-height);
@@ -3853,7 +3858,7 @@ layer(pont2.tokens);
3853
3858
  transition-timing-function: var(--pont2-sem-ease-in-out);
3854
3859
  }
3855
3860
  :is(pont2-prim-input-otp-slot, [data-pont2-input-otp-slot]):first-child {
3856
- border-left-width: 1px;
3861
+ border-left-width: var(--pont2-sem-border-width);
3857
3862
  border-top-left-radius: var(--_pont2-input-otp-radius);
3858
3863
  border-bottom-left-radius: var(--_pont2-input-otp-radius);
3859
3864
  }
@@ -4026,7 +4031,7 @@ layer(pont2.tokens);
4026
4031
  aspect-ratio: var(--pont2-sem-aspect-square);
4027
4032
  width: 1rem;
4028
4033
  height: 1rem;
4029
- border: 1px solid var(--_pont2-radio-group-item-border-color);
4034
+ border: var(--pont2-sem-border-width) solid var(--_pont2-radio-group-item-border-color);
4030
4035
  border-radius: var(--pont2-sem-radius-full);
4031
4036
  background-color: var(--_pont2-radio-group-item-bg);
4032
4037
  outline: none;
@@ -4063,7 +4068,7 @@ layer(pont2.tokens);
4063
4068
 
4064
4069
  [data-pont2-radio-group-item]:is(:disabled, [data-disabled]) {
4065
4070
  cursor: not-allowed;
4066
- opacity: 0.5;
4071
+ opacity: var(--pont2-sem-opacity-disabled);
4067
4072
  }
4068
4073
 
4069
4074
  /* Inside a choice-card FieldLabel the label draws the focus ring instead. */
@@ -4161,7 +4166,7 @@ layer(pont2.tokens);
4161
4166
  justify-content: center;
4162
4167
  }
4163
4168
  [data-pont2-slider-control][data-disabled] {
4164
- opacity: 0.5;
4169
+ opacity: var(--pont2-sem-opacity-disabled);
4165
4170
  }
4166
4171
 
4167
4172
  [data-pont2-slider-track] {
@@ -4204,7 +4209,7 @@ layer(pont2.tokens);
4204
4209
  user-select: none;
4205
4210
  width: var(--_pont2-slider-thumb);
4206
4211
  height: var(--_pont2-slider-thumb);
4207
- border: 1px solid var(--_pont2-slider-thumb-border-color);
4212
+ border: var(--pont2-sem-border-width) solid var(--_pont2-slider-thumb-border-color);
4208
4213
  border-radius: var(--pont2-sem-radius-full);
4209
4214
  background-color: var(--_pont2-slider-thumb-bg);
4210
4215
  outline: none;
@@ -4273,7 +4278,7 @@ layer(pont2.tokens);
4273
4278
  align-items: center;
4274
4279
  height: 18.4px;
4275
4280
  width: 32px;
4276
- border: 1px solid transparent;
4281
+ border: var(--pont2-sem-border-width) solid transparent;
4277
4282
  border-radius: var(--pont2-sem-radius-full);
4278
4283
  background-color: var(--_pont2-switch-bg);
4279
4284
  outline: none;
@@ -4311,7 +4316,7 @@ layer(pont2.tokens);
4311
4316
 
4312
4317
  [data-pont2-switch][data-disabled] {
4313
4318
  cursor: not-allowed;
4314
- opacity: 0.5;
4319
+ opacity: var(--pont2-sem-opacity-disabled);
4315
4320
  }
4316
4321
 
4317
4322
  /* Inside a choice-card FieldLabel the label draws the focus ring instead. */
@@ -4456,7 +4461,7 @@ layer(pont2.tokens);
4456
4461
  gap: 0.375rem;
4457
4462
  padding: 0.25rem 0.5rem;
4458
4463
  white-space: nowrap;
4459
- border: 1px solid transparent;
4464
+ border: var(--pont2-sem-border-width) solid transparent;
4460
4465
  border-radius: var(--_pont2-tabs-trigger-radius, var(--pont2-sem-radius-md));
4461
4466
  color: var(--_pont2-tabs-trigger-fg, var(--pont2-sem-color-segment-fg));
4462
4467
  font-size: var(--pont2-sem-text-sm);
@@ -4479,7 +4484,7 @@ layer(pont2.tokens);
4479
4484
  }
4480
4485
  [data-pont2-tabs-trigger]:is([data-disabled], [aria-disabled="true"]) {
4481
4486
  pointer-events: none;
4482
- opacity: 0.5;
4487
+ opacity: var(--pont2-sem-opacity-disabled);
4483
4488
  }
4484
4489
  [data-pont2-tabs-trigger] svg {
4485
4490
  pointer-events: none;
@@ -4509,7 +4514,7 @@ layer(pont2.tokens);
4509
4514
  /* After data-active, so a focused active tab shows the ring border too. */
4510
4515
  [data-pont2-tabs-trigger]:focus-visible {
4511
4516
  border-color: var(--pont2-sem-color-ring);
4512
- --pont2-ring-shadow: 0 0 0 3px color-mix(in oklab, var(--pont2-sem-color-ring) 50%, transparent);
4517
+ --pont2-ring-shadow: 0 0 0 var(--pont2-sem-ring-width) color-mix(in oklab, var(--pont2-sem-color-ring) 50%, transparent);
4513
4518
  outline: 1px solid var(--pont2-sem-color-ring);
4514
4519
  }
4515
4520
 
@@ -4712,7 +4717,7 @@ layer(pont2.tokens);
4712
4717
  line-height: var(--pont2-sem-text-sm--line-height);
4713
4718
  outline: none;
4714
4719
  --pont2-shadow: var(--_pont2-popover-shadow);
4715
- --pont2-ring-shadow: 0 0 0 1px var(--_pont2-popover-border-color);
4720
+ --pont2-ring-shadow: 0 0 0 var(--pont2-sem-border-width) var(--_pont2-popover-border-color);
4716
4721
  box-shadow: var(--pont2-ring-shadow), var(--pont2-shadow);
4717
4722
  }
4718
4723
 
@@ -4811,7 +4816,7 @@ layer(pont2.tokens);
4811
4816
  color: var(--_pont2-dropdown-menu-fg);
4812
4817
  outline: none;
4813
4818
  --pont2-shadow: var(--_pont2-dropdown-menu-shadow);
4814
- --pont2-ring-shadow: 0 0 0 1px var(--_pont2-dropdown-menu-border-color);
4819
+ --pont2-ring-shadow: 0 0 0 var(--pont2-sem-border-width) var(--_pont2-dropdown-menu-border-color);
4815
4820
  box-shadow: var(--pont2-ring-shadow), var(--pont2-shadow);
4816
4821
  }
4817
4822
  [data-pont2-dropdown-menu-content][data-closed] {
@@ -4854,7 +4859,7 @@ layer(pont2.tokens);
4854
4859
  }
4855
4860
  [data-pont2-menu-item][data-disabled] {
4856
4861
  pointer-events: none;
4857
- opacity: 0.5;
4862
+ opacity: var(--pont2-sem-opacity-disabled);
4858
4863
  }
4859
4864
 
4860
4865
  /* focus:bg-accent focus:text-accent-foreground (+ not-destructive **:text-accent-foreground) */
@@ -5006,7 +5011,7 @@ layer(pont2.tokens);
5006
5011
  white-space: nowrap;
5007
5012
  height: var(--_pont2-select-trigger-height);
5008
5013
  padding: 0.5rem 0.5rem 0.5rem 0.625rem;
5009
- border: 1px solid var(--_pont2-select-trigger-border-color);
5014
+ border: var(--pont2-sem-border-width) solid var(--_pont2-select-trigger-border-color);
5010
5015
  border-radius: var(--_pont2-select-trigger-radius);
5011
5016
  background-color: var(--_pont2-select-trigger-bg);
5012
5017
  font-size: var(--pont2-sem-text-sm);
@@ -5034,7 +5039,7 @@ layer(pont2.tokens);
5034
5039
  }
5035
5040
  [data-pont2-select-trigger]:disabled {
5036
5041
  cursor: not-allowed;
5037
- opacity: 0.5;
5042
+ opacity: var(--pont2-sem-opacity-disabled);
5038
5043
  }
5039
5044
  [data-pont2-select-trigger] svg {
5040
5045
  pointer-events: none;
@@ -5078,7 +5083,7 @@ layer(pont2.tokens);
5078
5083
  color: var(--_pont2-select-content-fg);
5079
5084
  outline: none;
5080
5085
  --pont2-shadow: var(--_pont2-select-content-shadow);
5081
- --pont2-ring-shadow: 0 0 0 1px var(--_pont2-select-content-border-color);
5086
+ --pont2-ring-shadow: 0 0 0 var(--pont2-sem-border-width) var(--_pont2-select-content-border-color);
5082
5087
  box-shadow: var(--pont2-ring-shadow), var(--pont2-shadow);
5083
5088
  }
5084
5089
  [data-pont2-select-content][data-align-trigger="true"] {
@@ -5130,7 +5135,7 @@ layer(pont2.tokens);
5130
5135
  }
5131
5136
  [data-pont2-select-item][data-disabled] {
5132
5137
  pointer-events: none;
5133
- opacity: 0.5;
5138
+ opacity: var(--pont2-sem-opacity-disabled);
5134
5139
  }
5135
5140
  [data-pont2-select-item] svg {
5136
5141
  pointer-events: none;
@@ -5213,7 +5218,7 @@ layer(pont2.tokens);
5213
5218
  min-width: 0;
5214
5219
  height: var(--_pont2-combobox-input-height);
5215
5220
  align-items: center;
5216
- border: 1px solid var(--_pont2-combobox-input-border-color);
5221
+ border: var(--pont2-sem-border-width) solid var(--_pont2-combobox-input-border-color);
5217
5222
  border-radius: var(--_pont2-combobox-input-radius);
5218
5223
  background-color: var(--_pont2-combobox-input-bg);
5219
5224
  outline: none;
@@ -5264,7 +5269,7 @@ layer(pont2.tokens);
5264
5269
  }
5265
5270
  [data-pont2-combobox-input-control]:disabled {
5266
5271
  cursor: not-allowed;
5267
- opacity: 0.5;
5272
+ opacity: var(--pont2-sem-opacity-disabled);
5268
5273
  }
5269
5274
 
5270
5275
  /* InputGroupAddon align=inline-end: "flex cursor-text items-center justify-center select-none
@@ -5319,7 +5324,7 @@ layer(pont2.tokens);
5319
5324
  color: var(--_pont2-combobox-content-fg);
5320
5325
  outline: none;
5321
5326
  --pont2-shadow: var(--_pont2-combobox-content-shadow);
5322
- --pont2-ring-shadow: 0 0 0 1px var(--_pont2-combobox-content-border-color);
5327
+ --pont2-ring-shadow: 0 0 0 var(--pont2-sem-border-width) var(--_pont2-combobox-content-border-color);
5323
5328
  box-shadow: var(--pont2-ring-shadow), var(--pont2-shadow);
5324
5329
  }
5325
5330
 
@@ -5370,7 +5375,7 @@ layer(pont2.tokens);
5370
5375
  }
5371
5376
  [data-pont2-combobox-item][data-disabled] {
5372
5377
  pointer-events: none;
5373
- opacity: 0.5;
5378
+ opacity: var(--pont2-sem-opacity-disabled);
5374
5379
  }
5375
5380
  [data-pont2-combobox-item] svg {
5376
5381
  pointer-events: none;
@@ -6347,7 +6352,7 @@ layer(pont2.tokens);
6347
6352
  width: var(--_pont2-qr-code-width);
6348
6353
  height: auto;
6349
6354
  border-radius: var(--pont2-sem-radius-md);
6350
- box-shadow: 0 0 0 1px var(--pont2-sem-color-border);
6355
+ box-shadow: 0 0 0 var(--pont2-sem-border-width) var(--pont2-sem-color-border);
6351
6356
  transition: opacity 200ms ease;
6352
6357
  }
6353
6358
  [data-pont2-qr-code][data-obscured] > [data-slot="qr-code-image"] {
@@ -6445,7 +6450,7 @@ layer(pont2.tokens);
6445
6450
  cursor: default;
6446
6451
  }
6447
6452
  [data-pont2-scope-list][data-disabled] [data-slot="scope-list-text"] {
6448
- opacity: 0.5;
6453
+ opacity: var(--pont2-sem-opacity-disabled);
6449
6454
  }
6450
6455
  }
6451
6456
 
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The web fonts a theme may use (docs/11-tokens.md §8, "Fonts").
3
+ *
4
+ * A theme cannot carry `url()`: its values end up in a stylesheet on the
5
+ * customer's login page. So a theme names a family (a fontFamily value such as
6
+ * `"Lora", serif`), and `compileTheme` adds the `@import` for every family it
7
+ * finds **in this catalogue**. The URL always comes from here, never from the
8
+ * theme. A family not in the catalogue is still valid CSS: it renders if the
9
+ * visitor has it installed, else the stack's fallback.
10
+ *
11
+ * The catalogue is copied into the manifest (`tokens.json` `fonts`) by
12
+ * `npm run tokens:pont2`, so a dashboard can list it, and it is part of the
13
+ * manifest fingerprint: changing a URL changes compiled output. Every `css2`
14
+ * spec was checked against fonts.googleapis.com (each must answer 200;
15
+ * requesting a weight or axis a family lacks is an error there).
16
+ *
17
+ * `bundled` families are already imported by pont2's own styles.css
18
+ * (`tokens/ref/typography.css`), so a theme using them adds no import.
19
+ */
20
+ export type FontCategory = "sans" | "serif" | "mono";
21
+ export interface FontEntry {
22
+ /** The CSS family name, as a theme writes it (`"Lora"`). Matched case-insensitively. */
23
+ family: string;
24
+ category: FontCategory;
25
+ /** A complete value for a fontFamily token: the family and its generic fallback. */
26
+ stack: string;
27
+ /** The Google Fonts css2 `family=` parameter: name and axes. */
28
+ css2: string;
29
+ /** Already imported by pont2's styles.css. */
30
+ bundled?: boolean;
31
+ }
32
+ export declare const FONT_CATALOG: readonly FontEntry[];
33
+ /** The stylesheet URL for one catalogue entry. */
34
+ export declare const fontHref: (font: FontEntry) => string;
35
+ /** The family names in a fontFamily value, unquoted (`"Lora", serif` → `["Lora", "serif"]`). */
36
+ export declare function familyNames(value: string): string[];
37
+ /**
38
+ * The catalogue fonts a set of fontFamily values names, in catalogue order,
39
+ * without the bundled ones (their import is already in styles.css).
40
+ */
41
+ export declare function fontsUsed(values: Iterable<string>, catalog?: readonly FontEntry[]): FontEntry[];
@@ -11,10 +11,12 @@
11
11
  * linkTheme(href) → (browser) one <link>: an app loading its published theme
12
12
  * importShadcnTheme(css) → a theme scope from a shadcn theme
13
13
  * defaultManifest → tokens.json: every token, its type, default and scope rules
14
+ * FONT_CATALOG → the web fonts a theme may name (compileTheme imports them)
14
15
  */
15
16
  export { applyTheme, linkTheme, type AppliedTheme, type ApplyOptions } from './apply';
16
17
  export { compileTheme, ThemeError, themeFingerprint } from './compile';
17
18
  export { defaultManifest } from './manifest';
19
+ export { FONT_CATALOG, familyNames, fontHref, fontsUsed, type FontCategory, type FontEntry } from './fonts';
18
20
  export { THEME_SCOPES, TOKEN_ALIASES } from './scopes';
19
21
  export { importShadcnTheme, type ShadcnImport } from './shadcn';
20
22
  export type * from './types';