@classic-homes/theme-react 0.8.1 → 0.8.2
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/dist/index.js +10 -6
- package/dist/index.mjs +10 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -354,10 +354,10 @@ var checkbox = recipe({
|
|
|
354
354
|
defaultVariants: { invalid: false }
|
|
355
355
|
});
|
|
356
356
|
var switchRoot = recipe({
|
|
357
|
-
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-
|
|
357
|
+
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:border-input data-[state=unchecked]:bg-background"
|
|
358
358
|
});
|
|
359
359
|
var switchThumb = recipe({
|
|
360
|
-
base: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg
|
|
360
|
+
base: "pointer-events-none block h-5 w-5 rounded-full ring-0 transition-transform data-[state=checked]:bg-background data-[state=checked]:shadow-lg data-[state=unchecked]:bg-foreground data-[state=checked]:translate-x-[22px] data-[state=unchecked]:translate-x-0.5"
|
|
361
361
|
});
|
|
362
362
|
var tabsList = recipe({
|
|
363
363
|
base: "inline-flex items-center rounded-md bg-muted p-1 text-muted-foreground"
|
|
@@ -365,9 +365,11 @@ var tabsList = recipe({
|
|
|
365
365
|
var tabsTrigger = recipe({
|
|
366
366
|
base: `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ${focusRing}`,
|
|
367
367
|
variants: {
|
|
368
|
+
// Selected is a Heritage Teal fill, not a White pill: White on the Paper
|
|
369
|
+
// track is ~1.1:1, so the current tab was hard to pick out (v2.5).
|
|
368
370
|
active: {
|
|
369
|
-
true: "bg-
|
|
370
|
-
false: "hover:bg-
|
|
371
|
+
true: "bg-primary text-primary-foreground shadow-sm",
|
|
372
|
+
false: "hover:bg-muted-hover hover:text-foreground"
|
|
371
373
|
},
|
|
372
374
|
disabled: { true: "opacity-50 pointer-events-none cursor-not-allowed", false: "" }
|
|
373
375
|
},
|
|
@@ -568,7 +570,7 @@ var segmentedControl = recipe({
|
|
|
568
570
|
defaultVariants: { size: "md" }
|
|
569
571
|
});
|
|
570
572
|
var segmentedControlItem = recipe({
|
|
571
|
-
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background
|
|
573
|
+
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=unchecked]:hover:bg-muted-hover data-[state=unchecked]:hover:text-foreground data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:shadow-sm",
|
|
572
574
|
variants: { size: { md: "h-8", sm: "h-7 px-2.5" } },
|
|
573
575
|
defaultVariants: { size: "md" }
|
|
574
576
|
});
|
|
@@ -6876,7 +6878,9 @@ function Tabs({
|
|
|
6876
6878
|
{
|
|
6877
6879
|
className: cn(
|
|
6878
6880
|
"size-2 shrink-0 rounded-full",
|
|
6879
|
-
|
|
6881
|
+
// The selected tab is a teal fill: a teal dot turns White on it, and a
|
|
6882
|
+
// red one gets a White ring (red on teal is too close)
|
|
6883
|
+
extra.dot === "destructive" ? cn("bg-destructive", active && "ring-2 ring-primary-foreground") : active ? "bg-primary-foreground" : "bg-success"
|
|
6880
6884
|
),
|
|
6881
6885
|
"aria-hidden": "true",
|
|
6882
6886
|
"data-tab-indicator": ""
|
package/dist/index.mjs
CHANGED
|
@@ -197,10 +197,10 @@ var checkbox = recipe({
|
|
|
197
197
|
defaultVariants: { invalid: false }
|
|
198
198
|
});
|
|
199
199
|
var switchRoot = recipe({
|
|
200
|
-
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-
|
|
200
|
+
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:border-input data-[state=unchecked]:bg-background"
|
|
201
201
|
});
|
|
202
202
|
var switchThumb = recipe({
|
|
203
|
-
base: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg
|
|
203
|
+
base: "pointer-events-none block h-5 w-5 rounded-full ring-0 transition-transform data-[state=checked]:bg-background data-[state=checked]:shadow-lg data-[state=unchecked]:bg-foreground data-[state=checked]:translate-x-[22px] data-[state=unchecked]:translate-x-0.5"
|
|
204
204
|
});
|
|
205
205
|
var tabsList = recipe({
|
|
206
206
|
base: "inline-flex items-center rounded-md bg-muted p-1 text-muted-foreground"
|
|
@@ -208,9 +208,11 @@ var tabsList = recipe({
|
|
|
208
208
|
var tabsTrigger = recipe({
|
|
209
209
|
base: `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ${focusRing}`,
|
|
210
210
|
variants: {
|
|
211
|
+
// Selected is a Heritage Teal fill, not a White pill: White on the Paper
|
|
212
|
+
// track is ~1.1:1, so the current tab was hard to pick out (v2.5).
|
|
211
213
|
active: {
|
|
212
|
-
true: "bg-
|
|
213
|
-
false: "hover:bg-
|
|
214
|
+
true: "bg-primary text-primary-foreground shadow-sm",
|
|
215
|
+
false: "hover:bg-muted-hover hover:text-foreground"
|
|
214
216
|
},
|
|
215
217
|
disabled: { true: "opacity-50 pointer-events-none cursor-not-allowed", false: "" }
|
|
216
218
|
},
|
|
@@ -411,7 +413,7 @@ var segmentedControl = recipe({
|
|
|
411
413
|
defaultVariants: { size: "md" }
|
|
412
414
|
});
|
|
413
415
|
var segmentedControlItem = recipe({
|
|
414
|
-
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background
|
|
416
|
+
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=unchecked]:hover:bg-muted-hover data-[state=unchecked]:hover:text-foreground data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:shadow-sm",
|
|
415
417
|
variants: { size: { md: "h-8", sm: "h-7 px-2.5" } },
|
|
416
418
|
defaultVariants: { size: "md" }
|
|
417
419
|
});
|
|
@@ -6751,7 +6753,9 @@ function Tabs({
|
|
|
6751
6753
|
{
|
|
6752
6754
|
className: cn(
|
|
6753
6755
|
"size-2 shrink-0 rounded-full",
|
|
6754
|
-
|
|
6756
|
+
// The selected tab is a teal fill: a teal dot turns White on it, and a
|
|
6757
|
+
// red one gets a White ring (red on teal is too close)
|
|
6758
|
+
extra.dot === "destructive" ? cn("bg-destructive", active && "ring-2 ring-primary-foreground") : active ? "bg-primary-foreground" : "bg-success"
|
|
6755
6759
|
),
|
|
6756
6760
|
"aria-hidden": "true",
|
|
6757
6761
|
"data-tab-indicator": ""
|