@pontive/pontkit-core 5.0.0 → 6.0.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/catalog.json +1 -1
- package/dist/custom-elements.json +367 -367
- package/dist/styles.css +90 -116
- package/dist/theme/types.d.ts +1 -1
- package/dist/theme-golden.json +51 -51
- package/dist/theme.mjs +13 -1
- package/dist/theme.mjs.map +1 -1
- package/dist/tokens.json +137 -159
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -757,52 +757,16 @@
|
|
|
757
757
|
|
|
758
758
|
--pont-sem-color-input: var(--pont-ref-color-base-200);
|
|
759
759
|
|
|
760
|
-
/* Interaction roles: what shadcn writes as `dark:` utilities, as tokens, so
|
|
761
|
-
component CSS has no mode rules (docs/11-tokens.md §6).
|
|
762
|
-
control an outline control's surface (outline button)
|
|
763
|
-
control-hover …hovered
|
|
764
|
-
control-border …its border
|
|
765
|
-
field a text field's surface (input)
|
|
766
|
-
surface-hover hovering a transparent surface (ghost button, menu items) */
|
|
767
760
|
--pont-sem-color-control: var(--pont-sem-color-bg);
|
|
768
761
|
--pont-sem-color-control-hover: var(--pont-sem-color-muted);
|
|
769
|
-
--pont-sem-color-control-border: var(--pont-sem-color-
|
|
770
|
-
|
|
771
|
-
--pont-sem-color-
|
|
772
|
-
/* …and more roles from shadcn's `dark:` utilities:
|
|
773
|
-
field-hover a select trigger hovered (no change in light)
|
|
774
|
-
track a switch's unchecked track
|
|
775
|
-
thumb / -checked a switch's thumb, off / on
|
|
776
|
-
segment-fg an inactive segment (tabs trigger)
|
|
777
|
-
segment-active the active segment's fill / -border its border
|
|
778
|
-
primary-subtle a checked choice card's fill / -border its border
|
|
779
|
-
inverse-subtle a chip on an inverted surface (kbd in a tooltip) */
|
|
762
|
+
--pont-sem-color-control-border: var(--pont-sem-color-input);
|
|
763
|
+
|
|
764
|
+
--pont-sem-color-field: var(--pont-ref-color-transparent);
|
|
780
765
|
--pont-sem-color-field-hover: var(--pont-sem-color-field);
|
|
781
|
-
--pont-sem-color-
|
|
782
|
-
|
|
783
|
-
--pont-sem-color-
|
|
784
|
-
--pont-sem-color-
|
|
785
|
-
in oklab,
|
|
786
|
-
var(--pont-sem-color-fg) 60%,
|
|
787
|
-
transparent
|
|
788
|
-
);
|
|
789
|
-
--pont-sem-color-segment-active: var(--pont-sem-color-bg);
|
|
790
|
-
--pont-sem-color-segment-active-border: transparent;
|
|
791
|
-
--pont-sem-color-primary-subtle: color-mix(
|
|
792
|
-
in oklab,
|
|
793
|
-
var(--pont-sem-color-primary) 5%,
|
|
794
|
-
transparent
|
|
795
|
-
);
|
|
796
|
-
--pont-sem-color-primary-subtle-border: color-mix(
|
|
797
|
-
in oklab,
|
|
798
|
-
var(--pont-sem-color-primary) 30%,
|
|
799
|
-
transparent
|
|
800
|
-
);
|
|
801
|
-
--pont-sem-color-inverse-subtle: color-mix(
|
|
802
|
-
in oklab,
|
|
803
|
-
var(--pont-sem-color-bg) 20%,
|
|
804
|
-
transparent
|
|
805
|
-
);
|
|
766
|
+
--pont-sem-color-field-border: var(--pont-sem-color-input);
|
|
767
|
+
|
|
768
|
+
--pont-sem-color-ghost: var(--pont-ref-color-transparent);
|
|
769
|
+
--pont-sem-color-ghost-hover: var(--pont-sem-color-muted);
|
|
806
770
|
|
|
807
771
|
--pont-sem-color-chart-1: var(--pont-ref-color-brand-300);
|
|
808
772
|
--pont-sem-color-chart-2: var(--pont-ref-color-brand-500);
|
|
@@ -1093,57 +1057,32 @@
|
|
|
1093
1057
|
--pont-sem-color-control: color-mix(
|
|
1094
1058
|
in oklab,
|
|
1095
1059
|
var(--pont-sem-color-input) 30%,
|
|
1096
|
-
transparent
|
|
1060
|
+
var(--pont-ref-color-transparent)
|
|
1097
1061
|
);
|
|
1098
1062
|
--pont-sem-color-control-hover: color-mix(
|
|
1099
1063
|
in oklab,
|
|
1100
1064
|
var(--pont-sem-color-input) 50%,
|
|
1101
|
-
transparent
|
|
1065
|
+
var(--pont-ref-color-transparent)
|
|
1102
1066
|
);
|
|
1103
1067
|
--pont-sem-color-control-border: var(--pont-sem-color-input);
|
|
1068
|
+
|
|
1104
1069
|
--pont-sem-color-field: color-mix(
|
|
1105
1070
|
in oklab,
|
|
1106
1071
|
var(--pont-sem-color-input) 30%,
|
|
1107
|
-
transparent
|
|
1108
|
-
);
|
|
1109
|
-
--pont-sem-color-surface-hover: color-mix(
|
|
1110
|
-
in oklab,
|
|
1111
|
-
var(--pont-sem-color-muted) 50%,
|
|
1112
|
-
transparent
|
|
1072
|
+
var(--pont-ref-color-transparent)
|
|
1113
1073
|
);
|
|
1114
1074
|
--pont-sem-color-field-hover: color-mix(
|
|
1115
1075
|
in oklab,
|
|
1116
1076
|
var(--pont-sem-color-input) 50%,
|
|
1117
|
-
transparent
|
|
1118
|
-
);
|
|
1119
|
-
--pont-sem-color-track: color-mix(
|
|
1120
|
-
in oklab,
|
|
1121
|
-
var(--pont-sem-color-input) 80%,
|
|
1122
|
-
transparent
|
|
1123
|
-
);
|
|
1124
|
-
--pont-sem-color-thumb: var(--pont-sem-color-fg);
|
|
1125
|
-
--pont-sem-color-thumb-checked: var(--pont-sem-color-primary-fg);
|
|
1126
|
-
--pont-sem-color-segment-fg: var(--pont-sem-color-muted-fg);
|
|
1127
|
-
--pont-sem-color-segment-active: color-mix(
|
|
1128
|
-
in oklab,
|
|
1129
|
-
var(--pont-sem-color-input) 30%,
|
|
1130
|
-
transparent
|
|
1131
|
-
);
|
|
1132
|
-
--pont-sem-color-segment-active-border: var(--pont-sem-color-input);
|
|
1133
|
-
--pont-sem-color-primary-subtle: color-mix(
|
|
1134
|
-
in oklab,
|
|
1135
|
-
var(--pont-sem-color-primary) 10%,
|
|
1136
|
-
transparent
|
|
1137
|
-
);
|
|
1138
|
-
--pont-sem-color-primary-subtle-border: color-mix(
|
|
1139
|
-
in oklab,
|
|
1140
|
-
var(--pont-sem-color-primary) 20%,
|
|
1141
|
-
transparent
|
|
1077
|
+
var(--pont-ref-color-transparent)
|
|
1142
1078
|
);
|
|
1143
|
-
--pont-sem-color-
|
|
1079
|
+
--pont-sem-color-field-border: var(--pont-sem-color-input);
|
|
1080
|
+
|
|
1081
|
+
--pont-sem-color-ghost: var(--pont-ref-color-transparent);
|
|
1082
|
+
--pont-sem-color-ghost-hover: color-mix(
|
|
1144
1083
|
in oklab,
|
|
1145
|
-
var(--pont-sem-color-
|
|
1146
|
-
transparent
|
|
1084
|
+
var(--pont-sem-color-muted) 50%,
|
|
1085
|
+
var(--pont-ref-color-transparent)
|
|
1147
1086
|
);
|
|
1148
1087
|
}
|
|
1149
1088
|
}
|
|
@@ -2203,7 +2142,7 @@
|
|
|
2203
2142
|
* `--pont-button-*` token (or its default) into a private `--_pont-button-*`
|
|
2204
2143
|
* on the element. Variants only switch privates; the recipe reads privates
|
|
2205
2144
|
* and sem tokens. shadcn's `dark:` rules live in sem tokens
|
|
2206
|
-
* (sem-color-control, -
|
|
2145
|
+
* (sem-color-control, -ghost, -ghost-hover, -destructive-*).
|
|
2207
2146
|
*/
|
|
2208
2147
|
@layer pont.primitives {
|
|
2209
2148
|
/* ------------------------------------------------------------------ */
|
|
@@ -2255,10 +2194,11 @@
|
|
|
2255
2194
|
}
|
|
2256
2195
|
|
|
2257
2196
|
[data-pont-button][data-variant="ghost"] {
|
|
2197
|
+
--_pont-button-bg: var(--pont-sem-color-ghost);
|
|
2258
2198
|
/** @token Text */
|
|
2259
2199
|
--_pont-button-fg: var(--pont-button-ghost-fg, currentcolor);
|
|
2260
2200
|
/** @token Background on hover */
|
|
2261
|
-
--_pont-button-bg-hover: var(--pont-button-ghost-bg-hover, var(--pont-sem-color-
|
|
2201
|
+
--_pont-button-bg-hover: var(--pont-button-ghost-bg-hover, var(--pont-sem-color-ghost-hover));
|
|
2262
2202
|
--_pont-button-fg-hover: var(--pont-sem-color-fg);
|
|
2263
2203
|
}
|
|
2264
2204
|
|
|
@@ -2554,7 +2494,7 @@
|
|
|
2554
2494
|
/** @token Text */
|
|
2555
2495
|
--_pont-input-fg: var(--pont-input-fg, currentcolor);
|
|
2556
2496
|
/** @token Border */
|
|
2557
|
-
--_pont-input-border-color: var(--pont-input-border-color, var(--pont-sem-color-
|
|
2497
|
+
--_pont-input-border-color: var(--pont-input-border-color, var(--pont-sem-color-field-border));
|
|
2558
2498
|
/** @token Corner radius */
|
|
2559
2499
|
--_pont-input-radius: var(--pont-input-radius, var(--pont-ref-radius-md));
|
|
2560
2500
|
/** @token Height */
|
|
@@ -2646,7 +2586,7 @@
|
|
|
2646
2586
|
/** @token Text */
|
|
2647
2587
|
--_pont-textarea-fg: var(--pont-textarea-fg, currentcolor);
|
|
2648
2588
|
/** @token Border */
|
|
2649
|
-
--_pont-textarea-border-color: var(--pont-textarea-border-color, var(--pont-sem-color-
|
|
2589
|
+
--_pont-textarea-border-color: var(--pont-textarea-border-color, var(--pont-sem-color-field-border));
|
|
2650
2590
|
/** @token Corner radius */
|
|
2651
2591
|
--_pont-textarea-radius: var(--pont-textarea-radius, var(--pont-ref-radius-md));
|
|
2652
2592
|
/** @token Placeholder text */
|
|
@@ -2726,7 +2666,7 @@
|
|
|
2726
2666
|
/** @token Background */
|
|
2727
2667
|
--_pont-checkbox-bg: var(--pont-checkbox-bg, var(--pont-sem-color-field));
|
|
2728
2668
|
/** @token Border */
|
|
2729
|
-
--_pont-checkbox-border-color: var(--pont-checkbox-border-color, var(--pont-sem-color-
|
|
2669
|
+
--_pont-checkbox-border-color: var(--pont-checkbox-border-color, var(--pont-sem-color-field-border));
|
|
2730
2670
|
/** @token Corner radius */
|
|
2731
2671
|
--_pont-checkbox-radius: var(--pont-checkbox-radius, 4px);
|
|
2732
2672
|
/** @token Background when checked */
|
|
@@ -2829,7 +2769,7 @@
|
|
|
2829
2769
|
* Tokens (docs/11-tokens.md): `--pont-badge-*`, resolved into privates on the
|
|
2830
2770
|
* element. Variants only switch privates. shadcn's `dark:` rules are sem
|
|
2831
2771
|
* tokens: destructive fill sem-color-destructive-subtle, its focus ring
|
|
2832
|
-
* sem-color-destructive-ring, ghost hover sem-color-
|
|
2772
|
+
* sem-color-destructive-ring, ghost fill / hover sem-color-ghost / -ghost-hover.
|
|
2833
2773
|
*/
|
|
2834
2774
|
@layer pont.primitives {
|
|
2835
2775
|
/* ------------------------------------------------------------------ */
|
|
@@ -2884,10 +2824,10 @@
|
|
|
2884
2824
|
}
|
|
2885
2825
|
|
|
2886
2826
|
[data-pont-badge][data-variant="ghost"] {
|
|
2887
|
-
--_pont-badge-bg:
|
|
2827
|
+
--_pont-badge-bg: var(--pont-sem-color-ghost);
|
|
2888
2828
|
--_pont-badge-fg: currentcolor;
|
|
2889
2829
|
/** @token Background on hover */
|
|
2890
|
-
--_pont-badge-bg-hover: var(--pont-badge-ghost-bg-hover, var(--pont-sem-color-
|
|
2830
|
+
--_pont-badge-bg-hover: var(--pont-badge-ghost-bg-hover, var(--pont-sem-color-ghost-hover));
|
|
2891
2831
|
--_pont-badge-fg-hover: var(--pont-sem-color-muted-fg);
|
|
2892
2832
|
}
|
|
2893
2833
|
|
|
@@ -2979,8 +2919,8 @@
|
|
|
2979
2919
|
* group: "inline-flex items-center" + .cn-kbd-group (gap-1)
|
|
2980
2920
|
*
|
|
2981
2921
|
* Tokens (docs/11-tokens.md): `--pont-kbd-*`. Inside a tooltip the kbd
|
|
2982
|
-
* switches to the inverted colours
|
|
2983
|
-
*
|
|
2922
|
+
* switches to the inverted colours (`--pont-kbd-tooltip-bg`, with a dark
|
|
2923
|
+
* default for shadcn's `dark:` fill; docs/11-tokens.md §6).
|
|
2984
2924
|
*/
|
|
2985
2925
|
@layer pont.primitives {
|
|
2986
2926
|
/* ------------------------------------------------------------------ */
|
|
@@ -3002,10 +2942,17 @@
|
|
|
3002
2942
|
|
|
3003
2943
|
/* in-data-[slot=tooltip-content]: the inverted tooltip colours */
|
|
3004
2944
|
[data-slot="tooltip-content"] :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) {
|
|
3005
|
-
|
|
2945
|
+
/** @token Background in a tooltip */
|
|
2946
|
+
--_pont-kbd-bg: var(--pont-kbd-tooltip-bg, color-mix(in oklab, var(--pont-sem-color-bg) 20%, transparent));
|
|
3006
2947
|
--_pont-kbd-fg: var(--pont-sem-color-bg);
|
|
3007
2948
|
}
|
|
3008
2949
|
|
|
2950
|
+
/* dark default: shadcn's dark:in-data-[slot=tooltip-content]:bg-background/10 */
|
|
2951
|
+
:where(.dark, [data-theme="dark"]) [data-slot="tooltip-content"] :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]),
|
|
2952
|
+
[data-slot="tooltip-content"] :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]):where(.dark, [data-theme="dark"]) {
|
|
2953
|
+
--_pont-kbd-bg: var(--pont-kbd-tooltip-bg, color-mix(in oklab, var(--pont-sem-color-bg) 10%, transparent));
|
|
2954
|
+
}
|
|
2955
|
+
|
|
3009
2956
|
/* ------------------------------------------------------------------ */
|
|
3010
2957
|
/* Recipe */
|
|
3011
2958
|
/* ------------------------------------------------------------------ */
|
|
@@ -3462,7 +3409,7 @@
|
|
|
3462
3409
|
/** @token Text cell weight */
|
|
3463
3410
|
--_pont-button-group-text-font-weight: var(--pont-button-group-text-font-weight, var(--pont-ref-typography-weight-medium));
|
|
3464
3411
|
/** @token Separator colour */
|
|
3465
|
-
--_pont-button-group-separator-bg: var(--pont-button-group-separator-bg, var(--pont-sem-color-
|
|
3412
|
+
--_pont-button-group-separator-bg: var(--pont-button-group-separator-bg, var(--pont-sem-color-control-border));
|
|
3466
3413
|
}
|
|
3467
3414
|
|
|
3468
3415
|
/* ------------------------------------------------------------------ */
|
|
@@ -3532,7 +3479,7 @@
|
|
|
3532
3479
|
:is(pont-prim-button-group-separator, [data-pont-button-group-separator]) {
|
|
3533
3480
|
position: relative;
|
|
3534
3481
|
align-self: stretch;
|
|
3535
|
-
background-color: var(--_pont-button-group-separator-bg, var(--pont-sem-color-
|
|
3482
|
+
background-color: var(--_pont-button-group-separator-bg, var(--pont-sem-color-control-border));
|
|
3536
3483
|
}
|
|
3537
3484
|
[data-pont-button-group-separator][data-orientation="vertical"] {
|
|
3538
3485
|
height: var(--pont-sem-dimension-size);
|
|
@@ -3891,8 +3838,8 @@
|
|
|
3891
3838
|
*
|
|
3892
3839
|
* Tokens (docs/11-tokens.md): `--pont-field-*`, resolved on every part that
|
|
3893
3840
|
* reads one (set, group, field, label, description, error), so each part can
|
|
3894
|
-
* also be themed on its own. The choice card's checked fill and border
|
|
3895
|
-
* (shadcn's `dark:` rules
|
|
3841
|
+
* also be themed on its own. The choice card's checked fill and border have
|
|
3842
|
+
* dark defaults (shadcn's `dark:` rules; the dark rule below, 11 §6).
|
|
3896
3843
|
*/
|
|
3897
3844
|
@layer pont.primitives {
|
|
3898
3845
|
:is([data-pont-field-set], pont-prim-field-group, [data-pont-field-group], pont-prim-field, [data-pont-field],
|
|
@@ -3917,9 +3864,20 @@
|
|
|
3917
3864
|
/** @token Background on hover */
|
|
3918
3865
|
--_pont-field-choice-bg-hover: var(--pont-field-choice-bg-hover, color-mix(in oklab, var(--pont-sem-color-muted) 50%, transparent));
|
|
3919
3866
|
/** @token Background when checked */
|
|
3920
|
-
--_pont-field-choice-bg-checked: var(--pont-field-choice-bg-checked, var(--pont-sem-color-primary
|
|
3867
|
+
--_pont-field-choice-bg-checked: var(--pont-field-choice-bg-checked, color-mix(in oklab, var(--pont-sem-color-primary) 5%, transparent));
|
|
3921
3868
|
/** @token Border when checked */
|
|
3922
|
-
--_pont-field-choice-border-color-checked: var(--pont-field-choice-border-color-checked, var(--pont-sem-color-primary
|
|
3869
|
+
--_pont-field-choice-border-color-checked: var(--pont-field-choice-border-color-checked, color-mix(in oklab, var(--pont-sem-color-primary) 30%, transparent));
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
/* dark defaults: shadcn's dark:has-data-checked:bg-primary/10 and border-primary/20 */
|
|
3873
|
+
:where(.dark, [data-theme="dark"]) :is([data-pont-field-set], pont-prim-field-group, [data-pont-field-group], pont-prim-field, [data-pont-field],
|
|
3874
|
+
[data-pont-field-label], pont-prim-field-description, [data-pont-field-description],
|
|
3875
|
+
pont-prim-field-error, [data-pont-field-error]),
|
|
3876
|
+
:is([data-pont-field-set], pont-prim-field-group, [data-pont-field-group], pont-prim-field, [data-pont-field],
|
|
3877
|
+
[data-pont-field-label], pont-prim-field-description, [data-pont-field-description],
|
|
3878
|
+
pont-prim-field-error, [data-pont-field-error]):where(.dark, [data-theme="dark"]) {
|
|
3879
|
+
--_pont-field-choice-bg-checked: var(--pont-field-choice-bg-checked, color-mix(in oklab, var(--pont-sem-color-primary) 10%, transparent));
|
|
3880
|
+
--_pont-field-choice-border-color-checked: var(--pont-field-choice-border-color-checked, color-mix(in oklab, var(--pont-sem-color-primary) 20%, transparent));
|
|
3923
3881
|
}
|
|
3924
3882
|
|
|
3925
3883
|
/* ---------------- FieldSet / FieldLegend (native) ---------------- */
|
|
@@ -4199,7 +4157,7 @@
|
|
|
4199
4157
|
/** @token Background */
|
|
4200
4158
|
--_pont-input-group-bg: var(--pont-input-group-bg, var(--pont-input-bg, var(--pont-sem-color-field)));
|
|
4201
4159
|
/** @token Border */
|
|
4202
|
-
--_pont-input-group-border-color: var(--pont-input-group-border-color, var(--pont-input-border-color, var(--pont-sem-color-
|
|
4160
|
+
--_pont-input-group-border-color: var(--pont-input-group-border-color, var(--pont-input-border-color, var(--pont-sem-color-field-border)));
|
|
4203
4161
|
/** @token Corner radius */
|
|
4204
4162
|
--_pont-input-group-radius: var(--pont-input-group-radius, var(--pont-input-radius, var(--pont-ref-radius-md)));
|
|
4205
4163
|
/** @token Height */
|
|
@@ -4661,7 +4619,7 @@
|
|
|
4661
4619
|
/** @token Background on hover */
|
|
4662
4620
|
--_pont-native-select-bg-hover: var(--pont-native-select-bg-hover, var(--pont-native-select-bg, var(--pont-sem-color-field-hover)));
|
|
4663
4621
|
/** @token Border */
|
|
4664
|
-
--_pont-native-select-border-color: var(--pont-native-select-border-color, var(--pont-sem-color-
|
|
4622
|
+
--_pont-native-select-border-color: var(--pont-native-select-border-color, var(--pont-sem-color-field-border));
|
|
4665
4623
|
/** @token Corner radius */
|
|
4666
4624
|
--_pont-native-select-radius: var(--pont-native-select-radius, var(--pont-ref-radius-md));
|
|
4667
4625
|
/** @token Height */
|
|
@@ -5009,7 +4967,7 @@
|
|
|
5009
4967
|
/** @token Background */
|
|
5010
4968
|
--_pont-input-otp-slot-bg: var(--pont-input-otp-slot-bg, var(--pont-sem-color-field));
|
|
5011
4969
|
/** @token Border */
|
|
5012
|
-
--_pont-input-otp-slot-border-color: var(--pont-input-otp-slot-border-color, var(--pont-sem-color-
|
|
4970
|
+
--_pont-input-otp-slot-border-color: var(--pont-input-otp-slot-border-color, var(--pont-sem-color-field-border));
|
|
5013
4971
|
/** @token Width */
|
|
5014
4972
|
--_pont-input-otp-slot-width: var(--pont-input-otp-slot-width, 2.25rem);
|
|
5015
4973
|
/** @token Height */
|
|
@@ -5249,7 +5207,7 @@
|
|
|
5249
5207
|
/** @token Background */
|
|
5250
5208
|
--_pont-radio-group-item-bg: var(--pont-radio-group-item-bg, var(--pont-sem-color-field));
|
|
5251
5209
|
/** @token Border */
|
|
5252
|
-
--_pont-radio-group-item-border-color: var(--pont-radio-group-item-border-color, var(--pont-sem-color-
|
|
5210
|
+
--_pont-radio-group-item-border-color: var(--pont-radio-group-item-border-color, var(--pont-sem-color-field-border));
|
|
5253
5211
|
/** @token Background when checked */
|
|
5254
5212
|
--_pont-radio-group-item-bg-checked: var(--pont-radio-group-item-bg-checked, var(--pont-sem-color-primary));
|
|
5255
5213
|
/** @token Border when checked */
|
|
@@ -5498,20 +5456,28 @@
|
|
|
5498
5456
|
* the root, so size rules select `[data-size] > thumb` (shadcn's group/switch).
|
|
5499
5457
|
*
|
|
5500
5458
|
* Tokens (docs/11-tokens.md): `--pont-switch-*`, resolved on the root and
|
|
5501
|
-
* inherited by the thumb. shadcn's `dark:`
|
|
5502
|
-
*
|
|
5503
|
-
* invalid border/ring sem-color-border-invalid / sem-color-ring-invalid.
|
|
5459
|
+
* inherited by the thumb. shadcn's `dark:` track and thumb colours are the
|
|
5460
|
+
* tokens' dark defaults (the dark rule below; docs/11-tokens.md §6); the
|
|
5461
|
+
* invalid border/ring are sem-color-border-invalid / sem-color-ring-invalid.
|
|
5504
5462
|
*/
|
|
5505
5463
|
@layer pont.primitives {
|
|
5506
5464
|
:is(pont-prim-switch, pont-switch, [data-pont-switch]) {
|
|
5507
5465
|
/** @token Track */
|
|
5508
|
-
--_pont-switch-bg: var(--pont-switch-bg, var(--pont-sem-color-
|
|
5466
|
+
--_pont-switch-bg: var(--pont-switch-bg, var(--pont-sem-color-control-border));
|
|
5509
5467
|
/** @token Track when checked */
|
|
5510
5468
|
--_pont-switch-bg-checked: var(--pont-switch-bg-checked, var(--pont-sem-color-primary));
|
|
5511
5469
|
/** @token Thumb */
|
|
5512
|
-
--_pont-switch-thumb-bg: var(--pont-switch-thumb-bg, var(--pont-sem-color-
|
|
5470
|
+
--_pont-switch-thumb-bg: var(--pont-switch-thumb-bg, var(--pont-sem-color-bg));
|
|
5513
5471
|
/** @token Thumb when checked */
|
|
5514
|
-
--_pont-switch-thumb-bg-checked: var(--pont-switch-thumb-bg-checked, var(--pont-sem-color-
|
|
5472
|
+
--_pont-switch-thumb-bg-checked: var(--pont-switch-thumb-bg-checked, var(--pont-sem-color-bg));
|
|
5473
|
+
}
|
|
5474
|
+
|
|
5475
|
+
/* dark defaults: shadcn's dark:bg-input/80, dark:bg-foreground, dark:data-checked:bg-primary-foreground */
|
|
5476
|
+
:where(.dark, [data-theme="dark"]) :is(pont-prim-switch, pont-switch, [data-pont-switch]),
|
|
5477
|
+
:is(pont-prim-switch, pont-switch, [data-pont-switch]):where(.dark, [data-theme="dark"]) {
|
|
5478
|
+
--_pont-switch-bg: var(--pont-switch-bg, color-mix(in oklab, var(--pont-sem-color-control-border) 80%, transparent));
|
|
5479
|
+
--_pont-switch-thumb-bg: var(--pont-switch-thumb-bg, var(--pont-sem-color-fg));
|
|
5480
|
+
--_pont-switch-thumb-bg-checked: var(--pont-switch-thumb-bg-checked, var(--pont-sem-color-primary-fg));
|
|
5515
5481
|
}
|
|
5516
5482
|
|
|
5517
5483
|
:is(pont-prim-switch, pont-switch, [data-pont-switch]) {
|
|
@@ -5620,8 +5586,8 @@
|
|
|
5620
5586
|
*
|
|
5621
5587
|
* Tokens (docs/11-tokens.md): `--pont-tabs-*`, resolved on the list and
|
|
5622
5588
|
* inherited by its triggers; the line variant switches privates. shadcn's
|
|
5623
|
-
* `dark:` rules
|
|
5624
|
-
*
|
|
5589
|
+
* `dark:` rules (inactive text, the active trigger's fill and border) are the
|
|
5590
|
+
* tokens' dark defaults (the dark rule below; docs/11-tokens.md §6).
|
|
5625
5591
|
*/
|
|
5626
5592
|
@layer pont.primitives {
|
|
5627
5593
|
/* ------------------------------------------------------------------ */
|
|
@@ -5640,19 +5606,27 @@
|
|
|
5640
5606
|
/** @token Tab label weight */
|
|
5641
5607
|
--_pont-tabs-trigger-font-weight: var(--pont-tabs-trigger-font-weight, var(--pont-ref-typography-weight-medium));
|
|
5642
5608
|
/** @token Tab text */
|
|
5643
|
-
--_pont-tabs-trigger-fg: var(--pont-tabs-trigger-fg, var(--pont-sem-color-
|
|
5609
|
+
--_pont-tabs-trigger-fg: var(--pont-tabs-trigger-fg, color-mix(in oklab, var(--pont-sem-color-fg) 60%, transparent));
|
|
5644
5610
|
/** @token Tab text on hover */
|
|
5645
5611
|
--_pont-tabs-trigger-fg-hover: var(--pont-tabs-trigger-fg-hover, var(--pont-sem-color-fg));
|
|
5646
5612
|
/** @token Active tab background */
|
|
5647
|
-
--_pont-tabs-trigger-bg-active: var(--pont-tabs-trigger-bg-active, var(--pont-sem-color-
|
|
5613
|
+
--_pont-tabs-trigger-bg-active: var(--pont-tabs-trigger-bg-active, var(--pont-sem-color-bg));
|
|
5648
5614
|
/** @token Active tab text */
|
|
5649
5615
|
--_pont-tabs-trigger-fg-active: var(--pont-tabs-trigger-fg-active, var(--pont-sem-color-fg));
|
|
5650
5616
|
/** @token Active tab border */
|
|
5651
|
-
--_pont-tabs-trigger-border-color-active: var(--pont-tabs-trigger-border-color-active,
|
|
5617
|
+
--_pont-tabs-trigger-border-color-active: var(--pont-tabs-trigger-border-color-active, transparent);
|
|
5652
5618
|
/** @token Line indicator */
|
|
5653
5619
|
--_pont-tabs-indicator-bg: var(--pont-tabs-indicator-bg, var(--pont-sem-color-fg));
|
|
5654
5620
|
}
|
|
5655
5621
|
|
|
5622
|
+
/* dark defaults: shadcn's dark:text-muted-foreground, dark:data-active:bg-input/30 and border-input */
|
|
5623
|
+
:where(.dark, [data-theme="dark"]) :is(pont-prim-tabs-list, [data-pont-tabs-list]),
|
|
5624
|
+
:is(pont-prim-tabs-list, [data-pont-tabs-list]):where(.dark, [data-theme="dark"]) {
|
|
5625
|
+
--_pont-tabs-trigger-fg: var(--pont-tabs-trigger-fg, var(--pont-sem-color-muted-fg));
|
|
5626
|
+
--_pont-tabs-trigger-bg-active: var(--pont-tabs-trigger-bg-active, color-mix(in oklab, var(--pont-sem-color-control-border) 30%, transparent));
|
|
5627
|
+
--_pont-tabs-trigger-border-color-active: var(--pont-tabs-trigger-border-color-active, var(--pont-sem-color-control-border));
|
|
5628
|
+
}
|
|
5629
|
+
|
|
5656
5630
|
/* line variant: no list fill, the active tab is marked by the indicator only */
|
|
5657
5631
|
[data-pont-tabs-list][data-variant="line"] {
|
|
5658
5632
|
--_pont-tabs-list-bg: transparent;
|
|
@@ -5708,7 +5682,7 @@
|
|
|
5708
5682
|
white-space: nowrap;
|
|
5709
5683
|
border: var(--pont-sem-border-width) solid transparent;
|
|
5710
5684
|
border-radius: var(--_pont-tabs-trigger-radius, var(--pont-ref-radius-md));
|
|
5711
|
-
color: var(--_pont-tabs-trigger-fg
|
|
5685
|
+
color: var(--_pont-tabs-trigger-fg);
|
|
5712
5686
|
font-size: var(--pont-ref-typography-size-sm);
|
|
5713
5687
|
line-height: var(--pont-ref-typography-leading-of-sm);
|
|
5714
5688
|
font-weight: var(--_pont-tabs-trigger-font-weight, var(--pont-ref-typography-weight-medium));
|
|
@@ -5748,8 +5722,8 @@
|
|
|
5748
5722
|
|
|
5749
5723
|
/* data-active */
|
|
5750
5724
|
[data-pont-tabs-trigger][data-active] {
|
|
5751
|
-
border-color: var(--_pont-tabs-trigger-border-color-active
|
|
5752
|
-
background-color: var(--_pont-tabs-trigger-bg-active
|
|
5725
|
+
border-color: var(--_pont-tabs-trigger-border-color-active);
|
|
5726
|
+
background-color: var(--_pont-tabs-trigger-bg-active);
|
|
5753
5727
|
color: var(--_pont-tabs-trigger-fg-active, var(--pont-sem-color-fg));
|
|
5754
5728
|
}
|
|
5755
5729
|
[data-pont-tabs-list]:not([data-variant="line"]) > [data-pont-tabs-trigger][data-active] {
|
|
@@ -6222,7 +6196,7 @@
|
|
|
6222
6196
|
/** @token Background on hover */
|
|
6223
6197
|
--_pont-select-trigger-bg-hover: var(--pont-select-trigger-bg-hover, var(--pont-select-trigger-bg, var(--pont-sem-color-field-hover)));
|
|
6224
6198
|
/** @token Border */
|
|
6225
|
-
--_pont-select-trigger-border-color: var(--pont-select-trigger-border-color, var(--pont-sem-color-
|
|
6199
|
+
--_pont-select-trigger-border-color: var(--pont-select-trigger-border-color, var(--pont-sem-color-field-border));
|
|
6226
6200
|
/** @token Corner radius */
|
|
6227
6201
|
--_pont-select-trigger-radius: var(--pont-select-trigger-radius, var(--pont-ref-radius-md));
|
|
6228
6202
|
/** @token Height */
|
|
@@ -6442,7 +6416,7 @@
|
|
|
6442
6416
|
/** @token Background */
|
|
6443
6417
|
--_pont-combobox-input-bg: var(--pont-combobox-input-bg, var(--pont-input-group-bg, var(--pont-input-bg, var(--pont-sem-color-field))));
|
|
6444
6418
|
/** @token Border */
|
|
6445
|
-
--_pont-combobox-input-border-color: var(--pont-combobox-input-border-color, var(--pont-input-group-border-color, var(--pont-input-border-color, var(--pont-sem-color-
|
|
6419
|
+
--_pont-combobox-input-border-color: var(--pont-combobox-input-border-color, var(--pont-input-group-border-color, var(--pont-input-border-color, var(--pont-sem-color-field-border))));
|
|
6446
6420
|
/** @token Corner radius */
|
|
6447
6421
|
--_pont-combobox-input-radius: var(--pont-combobox-input-radius, var(--pont-input-group-radius, var(--pont-input-radius, var(--pont-ref-radius-md))));
|
|
6448
6422
|
/** @token Height */
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface TokenDef {
|
|
|
19
19
|
type: TokenType;
|
|
20
20
|
/** The default: the declared value (ref/sem) or the fallback (component), as CSS. */
|
|
21
21
|
value: string;
|
|
22
|
-
/** The dark-mode default, when pont declares one
|
|
22
|
+
/** The dark-mode default, when pont declares one: sem colours, and component tokens with a dark rule (docs/11-tokens.md §6). */
|
|
23
23
|
dark?: string;
|
|
24
24
|
/** Tokens `value` reads (without the prefix). */
|
|
25
25
|
refs?: string[];
|