@codefast/ui 0.14.1 → 0.15.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 +34 -0
- package/dist/components/checkbox-cards.js +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/input-number.js +1 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/native-select.js +1 -1
- package/dist/components/radio-cards.js +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/variants/badge.js +1 -1
- package/dist/variants/bubble.js +1 -1
- package/dist/variants/button.js +1 -1
- package/dist/variants/input-group.js +1 -1
- package/package.json +3 -3
- package/src/css/foundation/tokens.css +8 -0
- package/src/css/themes/amber.css +27 -2
- package/src/css/themes/blue.css +27 -2
- package/src/css/themes/cyan.css +27 -2
- package/src/css/themes/emerald.css +27 -2
- package/src/css/themes/fuchsia.css +27 -2
- package/src/css/themes/gray.css +27 -2
- package/src/css/themes/green.css +27 -2
- package/src/css/themes/indigo.css +27 -2
- package/src/css/themes/lime.css +27 -2
- package/src/css/themes/neutral.css +27 -2
- package/src/css/themes/orange.css +27 -2
- package/src/css/themes/pink.css +27 -2
- package/src/css/themes/purple.css +27 -2
- package/src/css/themes/red.css +27 -2
- package/src/css/themes/rose.css +27 -2
- package/src/css/themes/sky.css +27 -2
- package/src/css/themes/slate.css +27 -2
- package/src/css/themes/stone.css +27 -2
- package/src/css/themes/teal.css +27 -2
- package/src/css/themes/violet.css +27 -2
- package/src/css/themes/yellow.css +27 -2
- package/src/css/themes/zinc.css +27 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @codefast/ui
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1158](https://github.com/codefastlabs/codefast/pull/1158) A new `control` token draws the boundary of `Input`, `Textarea`, the `Select` and `NativeSelect` triggers, `InputGroup`,
|
|
8
|
+
`InputNumber`, `InputOTP`, `Checkbox`, `Radio` (and their group and card controls) and the unchecked `Switch` track,
|
|
9
|
+
exposed as `border-control`, `bg-control` and `inset-ring-control`. By default it is the same hairline as `input`, so
|
|
10
|
+
the controls look as they did. When the viewer asks their system for more contrast (`prefers-contrast: more`), it rises
|
|
11
|
+
to WCAG 2.2 AA non-text contrast (SC 1.4.11) in every palette: the palette's neutral hue and chroma at lightness 0.645
|
|
12
|
+
in light, 3.1:1 or more on `background`, `card`, `popover` and `sidebar`, and white at 36% in dark, 3.2:1 or more.
|
|
13
|
+
|
|
14
|
+
`input` keeps its quieter roles: dark field fills, the outline `Button` and `Toggle`, the `CheckboxCards` and
|
|
15
|
+
`RadioCards` borders, the `ButtonGroup` separator. A custom theme should declare `--control`, and its own
|
|
16
|
+
`prefers-contrast: more` value if it wants one; until it does, `control` falls back to `input`.
|
|
17
|
+
|
|
18
|
+
- [#1153](https://github.com/codefastlabs/codefast/pull/1153) Every palette defines `success`, `success-foreground`, `warning` and `warning-foreground` in both schemes, exposed as
|
|
19
|
+
`bg-success`, `text-success-foreground`, `text-warning`, `border-warning` and the rest. Light mode uses a dark green and
|
|
20
|
+
amber with a `*-50` foreground, dark mode a light green and amber with a `*-950` foreground. `success` and `warning`
|
|
21
|
+
clear 4.5:1 as text on `background`, `card` and `popover`, and on their own tint over them at rest and hovered (`/10`
|
|
22
|
+
and `/15` light, `/20` and `/25` dark, the tints the destructive `Button`, `Badge` and `Bubble` use); each foreground
|
|
23
|
+
clears 4.5:1 on its solid fill. A custom theme should declare the four tokens too.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [#1155](https://github.com/codefastlabs/codefast/pull/1155) `destructive` text now clears 4.5:1 on its own tint in every palette. The destructive Button, Badge, Bubble and menu
|
|
28
|
+
items draw `text-destructive` over a tint of the same color, and that tint pulls the fill toward the text: in light it
|
|
29
|
+
measured 3.8–4.0:1 at rest and 3.1–3.3:1 hovered in all 22 palettes; in dark it held at rest on `background` but fell to
|
|
30
|
+
3.9:1 on `neutral`'s popover and 4.5:1 on `stone`'s card and popover, and to 3.3–4.5:1 hovered everywhere. Light
|
|
31
|
+
`destructive` moves from `red-600` to `red-700` and dark from `red-400` to `red-300`, in all 22 palettes, and the hover
|
|
32
|
+
tint of the destructive Button, Badge link and Bubble eases from 20% to 15% in light and from 30% to 25% in dark — a 30%
|
|
33
|
+
hover cannot reach 4.5:1 in dark with any red that still reads as red. A custom theme that sets its own `--destructive`
|
|
34
|
+
should check it the same way: `tests/unit/css/themes.test.ts` holds `destructive` to 4.5:1 as plain text and on each
|
|
35
|
+
tint, over `background`, `card` and `popover`, in both schemes.
|
|
36
|
+
|
|
3
37
|
## 0.14.1
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
|
@@ -13,7 +13,7 @@ function CheckboxCards(props) {
|
|
|
13
13
|
* @since 0.3.16-canary.0
|
|
14
14
|
*/
|
|
15
15
|
function CheckboxCardsItem({ checkboxClassName, children, className, ...props }) {
|
|
16
|
-
return (_jsxs(Label, { className: cn("flex items-start gap-2.5 rounded-lg border border-input p-2.5 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-data-indeterminate:border-primary/30 has-data-indeterminate:bg-primary/5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 dark:has-data-indeterminate:border-primary/20 dark:has-data-indeterminate:bg-primary/10", className), "data-slot": "checkbox-card", children: [_jsx(CheckboxGroupPrimitive.Item, { className: cn("peer relative mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border border-
|
|
16
|
+
return (_jsxs(Label, { className: cn("flex items-start gap-2.5 rounded-lg border border-input p-2.5 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-data-indeterminate:border-primary/30 has-data-indeterminate:bg-primary/5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 dark:has-data-indeterminate:border-primary/20 dark:has-data-indeterminate:bg-primary/10", className), "data-slot": "checkbox-card", children: [_jsx(CheckboxGroupPrimitive.Item, { className: cn("peer relative mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border border-control shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary", checkboxClassName), "data-slot": "checkbox-card-item", ...props, children: _jsxs(CheckboxGroupPrimitive.CheckboxGroupIndicator, { className: "group/checkbox-card-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5", "data-slot": "checkbox-card-indicator", children: [_jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-card-indicator:hidden" }), _jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-card-indicator:block" })] }) }), children] }));
|
|
17
17
|
}
|
|
18
18
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
19
19
|
export { CheckboxCards, CheckboxCardsItem };
|
|
@@ -12,7 +12,7 @@ function CheckboxGroup({ className, ...props }) {
|
|
|
12
12
|
* @since 0.3.16-canary.0
|
|
13
13
|
*/
|
|
14
14
|
function CheckboxGroupItem({ className, ...props }) {
|
|
15
|
-
return (_jsx(CheckboxGroupPrimitive.Item, { className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-
|
|
15
|
+
return (_jsx(CheckboxGroupPrimitive.Item, { className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-control shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary", className), "data-slot": "checkbox-group-item", ...props, children: _jsxs(CheckboxGroupPrimitive.CheckboxGroupIndicator, { className: "group/checkbox-group-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5", "data-slot": "checkbox-group-indicator", children: [_jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-group-indicator:hidden" }), _jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-group-indicator:block" })] }) }));
|
|
16
16
|
}
|
|
17
17
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
18
18
|
export { CheckboxGroup, CheckboxGroupItem };
|
|
@@ -6,7 +6,7 @@ import { cn } from "#lib/utils";
|
|
|
6
6
|
* @since 0.3.16-canary.0
|
|
7
7
|
*/
|
|
8
8
|
function Checkbox({ className, ...props }) {
|
|
9
|
-
return (_jsx(CheckboxPrimitive.Root, { className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-
|
|
9
|
+
return (_jsx(CheckboxPrimitive.Root, { className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-control shadow-xs transition-shadow duration-control ease-snappy outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-indeterminate:bg-primary", className), "data-slot": "checkbox", ...props, children: _jsxs(CheckboxPrimitive.Indicator, { className: "group/checkbox-indicator grid animate-in place-content-center text-current duration-control-indicator ease-spring zoom-in-50 [&>svg]:size-3.5", "data-slot": "checkbox-indicator", children: [_jsx(CheckIcon, { className: "group-data-indeterminate/checkbox-indicator:hidden" }), _jsx(MinusIcon, { className: "hidden group-data-indeterminate/checkbox-indicator:block" })] }) }));
|
|
10
10
|
}
|
|
11
11
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
12
12
|
export { Checkbox };
|
|
@@ -12,7 +12,7 @@ import { buttonVariants } from "#variants/button";
|
|
|
12
12
|
* @since 0.3.16-canary.0
|
|
13
13
|
*/
|
|
14
14
|
function InputNumber({ className, decrementLabel = "Decrement", incrementLabel = "Increment", spinner, ...props }) {
|
|
15
|
-
return (_jsx(InputNumberPrimitive.Root, { className: cn("group/input-number relative flex h-8 w-full min-w-0 items-center overflow-hidden rounded-lg bg-transparent text-base inset-ring inset-ring-
|
|
15
|
+
return (_jsx(InputNumberPrimitive.Root, { className: cn("group/input-number relative flex h-8 w-full min-w-0 items-center overflow-hidden rounded-lg bg-transparent text-base inset-ring inset-ring-control transition-[color,box-shadow] not-has-[input:disabled]:shadow-xs has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-aria-invalid:inset-ring-destructive has-[input:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-offset-2 has-[input:focus-visible]:outline-ring has-[input:focus-visible]:outline-solid md:text-sm dark:bg-input/30 dark:has-aria-invalid:ring-destructive/40 dark:has-aria-invalid:inset-ring-destructive/50 dark:has-[input:disabled]:bg-input/80 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-slot": "input-number", decrementLabel: decrementLabel, incrementLabel: incrementLabel, spinner: spinner ?? _jsx(Spinner, {}), ...props }));
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The editable numeric input.
|
|
@@ -25,7 +25,7 @@ function InputOTPSlot({ className, index, ...props }) {
|
|
|
25
25
|
throw new Error(`InputOTPSlot: no slot at index ${index}`);
|
|
26
26
|
}
|
|
27
27
|
const { char, hasFakeCaret, isActive } = slot;
|
|
28
|
-
return (_jsxs("div", { className: cn("relative flex size-8 items-center justify-center border-y border-e border-
|
|
28
|
+
return (_jsxs("div", { className: cn("relative flex size-8 items-center justify-center border-y border-e border-control text-sm shadow-xs transition-all outline-none first:rounded-s-lg first:border-s last:rounded-e-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:outline-2 data-[active=true]:outline-offset-2 data-[active=true]:outline-ring data-[active=true]:outline-solid data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className), "data-active": isActive, "data-slot": "input-otp-slot", ...props, children: [char, hasFakeCaret ? (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground animation-duration-1000" }) })) : null] }));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* @since 0.3.16-canary.0
|
package/dist/components/input.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cn } from "#lib/utils";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
function Input({ className, type, ...props }) {
|
|
7
|
-
return (_jsx("input", { className: cn("h-8 w-full min-w-0 rounded-lg border border-
|
|
7
|
+
return (_jsx("input", { className: cn("h-8 w-full min-w-0 rounded-lg border border-control bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), "data-slot": "input", type: type, ...props }));
|
|
8
8
|
}
|
|
9
9
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
10
10
|
export { Input };
|
|
@@ -5,7 +5,7 @@ import { cn } from "#lib/utils";
|
|
|
5
5
|
* @since 0.3.16-canary.0
|
|
6
6
|
*/
|
|
7
7
|
function NativeSelect({ className, size = "default", ...props }) {
|
|
8
|
-
return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-size": size, "data-slot": "native-select-wrapper", children: [_jsx("select", { className: "h-8 w-full min-w-0 appearance-none truncate rounded-lg border border-
|
|
8
|
+
return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-size": size, "data-slot": "native-select-wrapper", children: [_jsx("select", { className: "h-8 w-full min-w-0 appearance-none truncate rounded-lg border border-control bg-transparent py-1 ps-2.5 pe-8 text-sm shadow-xs transition-[color,box-shadow] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "data-size": size, "data-slot": "native-select", ...props }), _jsx(ChevronDownIcon, { "aria-hidden": "true", className: "pointer-events-none absolute inset-e-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground select-none", "data-slot": "native-select-icon" })] }));
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @since 0.3.16-canary.0
|
|
@@ -13,7 +13,7 @@ function RadioCards(props) {
|
|
|
13
13
|
* @since 0.3.16-canary.0
|
|
14
14
|
*/
|
|
15
15
|
function RadioCardsItem({ children, className, ...props }) {
|
|
16
|
-
return (_jsxs(Label, { className: "flex items-start gap-2.5 rounded-lg border border-input p-2.5 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "data-slot": "radio-card", children: [_jsx(RadioGroupPrimitive.Item, { className: cn("peer relative mt-0.5 flex aspect-square size-4 shrink-0 rounded-full border border-
|
|
16
|
+
return (_jsxs(Label, { className: "flex items-start gap-2.5 rounded-lg border border-input p-2.5 transition has-focus-visible:border-ring has-disabled:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "data-slot": "radio-card", children: [_jsx(RadioGroupPrimitive.Item, { className: cn("peer relative mt-0.5 flex aspect-square size-4 shrink-0 rounded-full border border-control outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className), "data-slot": "radio-card-item", ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex size-4 items-center justify-center", "data-slot": "radio-card-indicator", children: _jsx("span", { className: "absolute inset-s-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 animate-in rounded-full bg-primary-foreground duration-control-indicator ease-spring zoom-in-50 rtl:translate-x-1/2" }) }) }), children] }));
|
|
17
17
|
}
|
|
18
18
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
19
19
|
export { RadioCards, RadioCardsItem };
|
|
@@ -11,7 +11,7 @@ function RadioGroup({ className, ...props }) {
|
|
|
11
11
|
* @since 0.3.16-canary.0
|
|
12
12
|
*/
|
|
13
13
|
function RadioGroupItem({ className, ...props }) {
|
|
14
|
-
return (_jsx(RadioGroupPrimitive.Item, { className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-
|
|
14
|
+
return (_jsx(RadioGroupPrimitive.Item, { className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-control outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className), "data-slot": "radio-group-item", ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex size-4 items-center justify-center", "data-slot": "radio-group-indicator", children: _jsx("span", { className: "absolute inset-s-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 animate-in rounded-full bg-primary-foreground duration-control-indicator ease-spring zoom-in-50 rtl:translate-x-1/2" }) }) }));
|
|
15
15
|
}
|
|
16
16
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
17
17
|
export { RadioGroup, RadioGroupItem };
|
package/dist/components/radio.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cn } from "#lib/utils";
|
|
|
5
5
|
* @since 0.3.16-canary.0
|
|
6
6
|
*/
|
|
7
7
|
function Radio({ className, onChange, onValueChange, ...props }) {
|
|
8
|
-
return (_jsx("input", { className: cn("peer relative flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border border-
|
|
8
|
+
return (_jsx("input", { className: cn("peer relative flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border border-control bg-background shadow-xs outline-none before:size-2 before:scale-0 before:rounded-full before:bg-primary-foreground before:transition-transform before:duration-control-indicator before:ease-spring after:absolute after:-inset-x-3 after:-inset-y-2 checked:border-primary checked:bg-primary checked:before:scale-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 checked:aria-invalid:bg-destructive dark:not-checked:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), "data-slot": "radio", type: "radio", onChange: composeEventHandlers(onChange, (event) => onValueChange?.(event.currentTarget.value)), ...props }));
|
|
9
9
|
}
|
|
10
10
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
11
11
|
export { Radio };
|
|
@@ -25,7 +25,7 @@ function SelectValue({ ...props }) {
|
|
|
25
25
|
* @since 0.3.16-canary.0
|
|
26
26
|
*/
|
|
27
27
|
function SelectTrigger({ children, className, size = "default", ...props }) {
|
|
28
|
-
return (_jsxs(SelectPrimitive.Trigger, { className: cn("flex w-fit max-w-full min-w-0 items-center justify-between gap-1.5 rounded-lg border border-
|
|
28
|
+
return (_jsxs(SelectPrimitive.Trigger, { className: cn("flex w-fit max-w-full min-w-0 items-center justify-between gap-1.5 rounded-lg border border-control bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:block *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:truncate dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_[data-slot=select-value]_svg]:me-1.5 [&_[data-slot=select-value]_svg]:inline-block [&_[data-slot=select-value]_svg]:align-[-0.125em] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-size": size, "data-slot": "select-trigger", ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* @since 0.3.16-canary.0
|
|
@@ -5,7 +5,7 @@ import { cn } from "#lib/utils";
|
|
|
5
5
|
* @since 0.3.16-canary.0
|
|
6
6
|
*/
|
|
7
7
|
function Switch({ className, size = "default", ...props }) {
|
|
8
|
-
return (_jsx(SwitchPrimitives.Root, { className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all duration-control ease-snappy outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-
|
|
8
|
+
return (_jsx(SwitchPrimitives.Root, { className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all duration-control ease-snappy outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-control dark:data-unchecked:bg-control/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), "data-size": size, "data-slot": "switch", ...props, children: _jsx(SwitchPrimitives.Thumb, { className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform duration-control-indicator ease-spring group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-3.5 group-data-[size=sm]/switch:data-checked:translate-x-2.5 rtl:group-data-[size=default]/switch:data-checked:-translate-x-3.5 rtl:group-data-[size=sm]/switch:data-checked:-translate-x-2.5 dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground", "data-slot": "switch-thumb" }) }));
|
|
9
9
|
}
|
|
10
10
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
11
11
|
export { Switch };
|
|
@@ -4,7 +4,7 @@ import { cn } from "#lib/utils";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
function Textarea({ className, ...props }) {
|
|
7
|
-
return (_jsx("textarea", { className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-
|
|
7
|
+
return (_jsx("textarea", { className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-control bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), "data-slot": "textarea", ...props }));
|
|
8
8
|
}
|
|
9
9
|
// ── Exports ──────────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
10
10
|
export { Textarea };
|
package/dist/variants/badge.js
CHANGED
|
@@ -11,7 +11,7 @@ const badgeVariants = tv({
|
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
13
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary-hover",
|
|
14
|
-
destructive: "bg-destructive/10 text-destructive focus-visible:outline-destructive dark:bg-destructive/20 [a]:hover:bg-destructive/
|
|
14
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:outline-destructive dark:bg-destructive/20 [a]:hover:bg-destructive/15 dark:[a]:hover:bg-destructive/25",
|
|
15
15
|
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
16
16
|
link: "text-primary underline-offset-4 hover:underline",
|
|
17
17
|
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
package/dist/variants/bubble.js
CHANGED
|
@@ -19,7 +19,7 @@ const bubbleVariants = tv({
|
|
|
19
19
|
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
|
|
20
20
|
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
21
21
|
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
22
|
-
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/
|
|
22
|
+
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/15 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/25",
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
});
|
package/dist/variants/button.js
CHANGED
|
@@ -22,7 +22,7 @@ const buttonVariants = tv({
|
|
|
22
22
|
},
|
|
23
23
|
variant: {
|
|
24
24
|
default: "bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
25
|
-
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/
|
|
25
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/15 focus-visible:outline-destructive dark:bg-destructive/20 dark:hover:bg-destructive/25",
|
|
26
26
|
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
27
27
|
link: "text-primary underline-offset-4 hover:underline",
|
|
28
28
|
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
@@ -4,7 +4,7 @@ import { tv } from "#lib/utils";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
const inputGroupVariants = tv({
|
|
7
|
-
base: "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-
|
|
7
|
+
base: "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-control shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:outline-2 has-[[data-slot=input-group-control]:focus-visible]:outline-offset-2 has-[[data-slot=input-group-control]:focus-visible]:outline-ring has-[[data-slot=input-group-control]:focus-visible]:outline-solid in-data-[slot=combobox-content]:has-[[data-slot=input-group-control]:focus-visible]:outline-none has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5",
|
|
8
8
|
});
|
|
9
9
|
// ── Variant: InputGroupAddon ─────────────────────────────────────────────────────────────────────────────────────────
|
|
10
10
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefast/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Core UI components library built with React and Tailwind CSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -473,10 +473,10 @@
|
|
|
473
473
|
"cmdk": "^1.1.1",
|
|
474
474
|
"embla-carousel-react": "^8.6.0",
|
|
475
475
|
"input-otp": "^1.5.0",
|
|
476
|
-
"lucide-react": "^1.
|
|
476
|
+
"lucide-react": "^1.61.0",
|
|
477
477
|
"radix-ui": "^1.8.1",
|
|
478
478
|
"react-hook-form": "^7.90.0",
|
|
479
|
-
"react-resizable-panels": "^4.14.
|
|
479
|
+
"react-resizable-panels": "^4.14.8",
|
|
480
480
|
"recharts": "^3.10.1",
|
|
481
481
|
"sonner": "^2.0.8",
|
|
482
482
|
"tailwind-merge": "^3.7.0",
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
|
|
36
36
|
--color-destructive: var(--destructive);
|
|
37
37
|
|
|
38
|
+
--color-success: var(--success);
|
|
39
|
+
--color-success-foreground: var(--success-foreground);
|
|
40
|
+
|
|
41
|
+
--color-warning: var(--warning);
|
|
42
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
43
|
+
|
|
38
44
|
--color-muted: var(--muted);
|
|
39
45
|
--color-muted-foreground: var(--muted-foreground);
|
|
40
46
|
|
|
@@ -51,6 +57,8 @@
|
|
|
51
57
|
|
|
52
58
|
--color-border: var(--border);
|
|
53
59
|
--color-input: var(--input);
|
|
60
|
+
/* A theme without `control` falls back to `input`, so its form controls keep a border. */
|
|
61
|
+
--color-control: var(--control, var(--input));
|
|
54
62
|
--color-ring: var(--ring);
|
|
55
63
|
|
|
56
64
|
/* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
|
package/src/css/themes/amber.css
CHANGED
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
--secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
19
19
|
--secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
20
20
|
|
|
21
|
-
--destructive: oklch(0.
|
|
21
|
+
--destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
|
|
22
|
+
|
|
23
|
+
--success: oklch(0.48 0.13 150); /* --color-green-800 */
|
|
24
|
+
--success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
|
|
25
|
+
|
|
26
|
+
--warning: oklch(0.5 0.105 70); /* --color-amber-800 */
|
|
27
|
+
--warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
|
|
22
28
|
|
|
23
29
|
--muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
24
30
|
--muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
|
|
@@ -36,6 +42,7 @@
|
|
|
36
42
|
|
|
37
43
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
38
44
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
45
|
+
--control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
39
46
|
--ring: oklch(0.56 0.15 49); /* --color-amber-700 */
|
|
40
47
|
|
|
41
48
|
/* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -70,7 +77,13 @@
|
|
|
70
77
|
--secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
71
78
|
--secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
72
79
|
|
|
73
|
-
--destructive: oklch(0.
|
|
80
|
+
--destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
|
|
81
|
+
|
|
82
|
+
--success: oklch(0.8 0.15 150); /* --color-green-400 */
|
|
83
|
+
--success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
|
|
84
|
+
|
|
85
|
+
--warning: oklch(0.82 0.14 80); /* --color-amber-400 */
|
|
86
|
+
--warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
|
|
74
87
|
|
|
75
88
|
--muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
76
89
|
--muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
|
|
@@ -86,6 +99,7 @@
|
|
|
86
99
|
|
|
87
100
|
--border: oklch(1 0 0 / 10%); /* --color-white */
|
|
88
101
|
--input: oklch(1 0 0 / 15%); /* --color-white */
|
|
102
|
+
--control: oklch(1 0 0 / 15%); /* --color-white */
|
|
89
103
|
--ring: oklch(0.67 0.16 58); /* --color-amber-600 */
|
|
90
104
|
|
|
91
105
|
--sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
@@ -103,3 +117,14 @@
|
|
|
103
117
|
--chart-4: oklch(0.56 0.15 49); /* --color-amber-700 */
|
|
104
118
|
--chart-5: oklch(0.47 0.12 46); /* --color-amber-800 */
|
|
105
119
|
}
|
|
120
|
+
|
|
121
|
+
/* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
|
|
122
|
+
@media (prefers-contrast: more) {
|
|
123
|
+
:root {
|
|
124
|
+
--control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dark {
|
|
128
|
+
--control: oklch(1 0 0 / 36%); /* --color-white */
|
|
129
|
+
}
|
|
130
|
+
}
|
package/src/css/themes/blue.css
CHANGED
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
--secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
19
19
|
--secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
20
20
|
|
|
21
|
-
--destructive: oklch(0.
|
|
21
|
+
--destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
|
|
22
|
+
|
|
23
|
+
--success: oklch(0.48 0.13 150); /* --color-green-800 */
|
|
24
|
+
--success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
|
|
25
|
+
|
|
26
|
+
--warning: oklch(0.5 0.105 70); /* --color-amber-800 */
|
|
27
|
+
--warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
|
|
22
28
|
|
|
23
29
|
--muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
24
30
|
--muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
|
|
@@ -36,6 +42,7 @@
|
|
|
36
42
|
|
|
37
43
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
38
44
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
45
|
+
--control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
39
46
|
--ring: oklch(0.623 0.214 259.815); /* --color-blue-500 */
|
|
40
47
|
|
|
41
48
|
/* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -70,7 +77,13 @@
|
|
|
70
77
|
--secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
71
78
|
--secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
72
79
|
|
|
73
|
-
--destructive: oklch(0.
|
|
80
|
+
--destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
|
|
81
|
+
|
|
82
|
+
--success: oklch(0.8 0.15 150); /* --color-green-400 */
|
|
83
|
+
--success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
|
|
84
|
+
|
|
85
|
+
--warning: oklch(0.82 0.14 80); /* --color-amber-400 */
|
|
86
|
+
--warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
|
|
74
87
|
|
|
75
88
|
--muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
76
89
|
--muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
|
|
@@ -86,6 +99,7 @@
|
|
|
86
99
|
|
|
87
100
|
--border: oklch(1 0 0 / 10%); /* --color-white */
|
|
88
101
|
--input: oklch(1 0 0 / 15%); /* --color-white */
|
|
102
|
+
--control: oklch(1 0 0 / 15%); /* --color-white */
|
|
89
103
|
--ring: oklch(0.556 0 0); /* default ring (dark) */
|
|
90
104
|
|
|
91
105
|
--sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
@@ -103,3 +117,14 @@
|
|
|
103
117
|
--chart-4: oklch(0.488 0.243 264.376); /* --color-blue-700 */
|
|
104
118
|
--chart-5: oklch(0.424 0.199 265.638); /* --color-blue-800 */
|
|
105
119
|
}
|
|
120
|
+
|
|
121
|
+
/* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
|
|
122
|
+
@media (prefers-contrast: more) {
|
|
123
|
+
:root {
|
|
124
|
+
--control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dark {
|
|
128
|
+
--control: oklch(1 0 0 / 36%); /* --color-white */
|
|
129
|
+
}
|
|
130
|
+
}
|
package/src/css/themes/cyan.css
CHANGED
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
--secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
19
19
|
--secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
20
20
|
|
|
21
|
-
--destructive: oklch(0.
|
|
21
|
+
--destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
|
|
22
|
+
|
|
23
|
+
--success: oklch(0.48 0.13 150); /* --color-green-800 */
|
|
24
|
+
--success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
|
|
25
|
+
|
|
26
|
+
--warning: oklch(0.5 0.105 70); /* --color-amber-800 */
|
|
27
|
+
--warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
|
|
22
28
|
|
|
23
29
|
--muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
24
30
|
--muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
|
|
@@ -36,6 +42,7 @@
|
|
|
36
42
|
|
|
37
43
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
38
44
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
45
|
+
--control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
39
46
|
--ring: oklch(0.61 0.11 222); /* --color-cyan-600 */
|
|
40
47
|
|
|
41
48
|
/* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -70,7 +77,13 @@
|
|
|
70
77
|
--secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
71
78
|
--secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
72
79
|
|
|
73
|
-
--destructive: oklch(0.
|
|
80
|
+
--destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
|
|
81
|
+
|
|
82
|
+
--success: oklch(0.8 0.15 150); /* --color-green-400 */
|
|
83
|
+
--success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
|
|
84
|
+
|
|
85
|
+
--warning: oklch(0.82 0.14 80); /* --color-amber-400 */
|
|
86
|
+
--warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
|
|
74
87
|
|
|
75
88
|
--muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
76
89
|
--muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
|
|
@@ -86,6 +99,7 @@
|
|
|
86
99
|
|
|
87
100
|
--border: oklch(1 0 0 / 10%); /* --color-white */
|
|
88
101
|
--input: oklch(1 0 0 / 15%); /* --color-white */
|
|
102
|
+
--control: oklch(1 0 0 / 15%); /* --color-white */
|
|
89
103
|
--ring: oklch(0.61 0.11 222); /* --color-cyan-600 */
|
|
90
104
|
|
|
91
105
|
--sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
@@ -103,3 +117,14 @@
|
|
|
103
117
|
--chart-4: oklch(0.61 0.11 222); /* --color-cyan-600 */
|
|
104
118
|
--chart-5: oklch(0.52 0.09 223); /* --color-cyan-700 */
|
|
105
119
|
}
|
|
120
|
+
|
|
121
|
+
/* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
|
|
122
|
+
@media (prefers-contrast: more) {
|
|
123
|
+
:root {
|
|
124
|
+
--control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dark {
|
|
128
|
+
--control: oklch(1 0 0 / 36%); /* --color-white */
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
--secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
19
19
|
--secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
20
20
|
|
|
21
|
-
--destructive: oklch(0.
|
|
21
|
+
--destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
|
|
22
|
+
|
|
23
|
+
--success: oklch(0.48 0.13 150); /* --color-green-800 */
|
|
24
|
+
--success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
|
|
25
|
+
|
|
26
|
+
--warning: oklch(0.5 0.105 70); /* --color-amber-800 */
|
|
27
|
+
--warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
|
|
22
28
|
|
|
23
29
|
--muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
|
|
24
30
|
--muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
|
|
@@ -36,6 +42,7 @@
|
|
|
36
42
|
|
|
37
43
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
38
44
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
45
|
+
--control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
39
46
|
--ring: oklch(0.6 0.13 163); /* --color-emerald-600 */
|
|
40
47
|
|
|
41
48
|
/* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -70,7 +77,13 @@
|
|
|
70
77
|
--secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
71
78
|
--secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
72
79
|
|
|
73
|
-
--destructive: oklch(0.
|
|
80
|
+
--destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
|
|
81
|
+
|
|
82
|
+
--success: oklch(0.8 0.15 150); /* --color-green-400 */
|
|
83
|
+
--success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
|
|
84
|
+
|
|
85
|
+
--warning: oklch(0.82 0.14 80); /* --color-amber-400 */
|
|
86
|
+
--warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
|
|
74
87
|
|
|
75
88
|
--muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
|
|
76
89
|
--muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
|
|
@@ -86,6 +99,7 @@
|
|
|
86
99
|
|
|
87
100
|
--border: oklch(1 0 0 / 10%); /* --color-white */
|
|
88
101
|
--input: oklch(1 0 0 / 15%); /* --color-white */
|
|
102
|
+
--control: oklch(1 0 0 / 15%); /* --color-white */
|
|
89
103
|
--ring: oklch(0.6 0.13 163); /* --color-emerald-600 */
|
|
90
104
|
|
|
91
105
|
--sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
@@ -103,3 +117,14 @@
|
|
|
103
117
|
--chart-4: oklch(0.6 0.13 163); /* --color-emerald-600 */
|
|
104
118
|
--chart-5: oklch(0.51 0.1 166); /* --color-emerald-700 */
|
|
105
119
|
}
|
|
120
|
+
|
|
121
|
+
/* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
|
|
122
|
+
@media (prefers-contrast: more) {
|
|
123
|
+
:root {
|
|
124
|
+
--control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dark {
|
|
128
|
+
--control: oklch(1 0 0 / 36%); /* --color-white */
|
|
129
|
+
}
|
|
130
|
+
}
|