@sewadah/selaras 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -7
- package/dist/module.json +1 -1
- package/dist/module.mjs +31 -15
- package/dist/runtime/components/Autocomplete.vue +3 -1
- package/dist/runtime/components/Badge.d.vue.ts +1 -1
- package/dist/runtime/components/Badge.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.d.vue.ts +69 -0
- package/dist/runtime/components/Calendar.vue +163 -0
- package/dist/runtime/components/Calendar.vue.d.ts +69 -0
- package/dist/runtime/components/Callout.vue +12 -1
- package/dist/runtime/components/CodeGroup.vue +13 -3
- package/dist/runtime/components/CodeTree.d.vue.ts +2 -0
- package/dist/runtime/components/CodeTree.vue +52 -1
- package/dist/runtime/components/CodeTree.vue.d.ts +2 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +8 -0
- package/dist/runtime/components/ColorPicker.vue +66 -45
- package/dist/runtime/components/ColorPicker.vue.d.ts +8 -0
- package/dist/runtime/components/Column.js +1 -1
- package/dist/runtime/components/CommandPalette.d.vue.ts +3 -1
- package/dist/runtime/components/CommandPalette.vue +5 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +3 -1
- package/dist/runtime/components/ContentNavigation.d.vue.ts +8 -1
- package/dist/runtime/components/ContentNavigation.vue +9 -2
- package/dist/runtime/components/ContentNavigation.vue.d.ts +8 -1
- package/dist/runtime/components/ContentToc.vue +14 -7
- package/dist/runtime/components/ContextMenu.d.vue.ts +8 -1
- package/dist/runtime/components/ContextMenu.vue +16 -4
- package/dist/runtime/components/ContextMenu.vue.d.ts +8 -1
- package/dist/runtime/components/DatePicker.d.vue.ts +10 -3
- package/dist/runtime/components/DatePicker.vue +24 -16
- package/dist/runtime/components/DatePicker.vue.d.ts +10 -3
- package/dist/runtime/components/Dropdown.d.vue.ts +33 -6
- package/dist/runtime/components/Dropdown.vue +143 -11
- package/dist/runtime/components/Dropdown.vue.d.ts +33 -6
- package/dist/runtime/components/FileTree.d.vue.ts +2 -0
- package/dist/runtime/components/FileTree.vue +8 -4
- package/dist/runtime/components/FileTree.vue.d.ts +2 -0
- package/dist/runtime/components/FileUpload.vue +1 -1
- package/dist/runtime/components/FormField.d.vue.ts +4 -0
- package/dist/runtime/components/FormField.vue +19 -4
- package/dist/runtime/components/FormField.vue.d.ts +4 -0
- package/dist/runtime/components/Input.vue +3 -2
- package/dist/runtime/components/Kbd.vue +12 -2
- package/dist/runtime/components/NavigationMenu.d.vue.ts +10 -10
- package/dist/runtime/components/NavigationMenu.vue +13 -7
- package/dist/runtime/components/NavigationMenu.vue.d.ts +10 -10
- package/dist/runtime/components/NavigationMenuAccordionItem.vue +5 -1
- package/dist/runtime/components/NavigationMenuFlyoutList.vue +7 -4
- package/dist/runtime/components/PinInput.vue +1 -1
- package/dist/runtime/components/Popover.d.vue.ts +8 -2
- package/dist/runtime/components/Popover.vue +9 -4
- package/dist/runtime/components/Popover.vue.d.ts +8 -2
- package/dist/runtime/components/ProsePre.d.vue.ts +6 -2
- package/dist/runtime/components/ProsePre.vue +11 -4
- package/dist/runtime/components/ProsePre.vue.d.ts +6 -2
- package/dist/runtime/components/Select.vue +3 -1
- package/dist/runtime/components/SplitterPanel.d.vue.ts +2 -2
- package/dist/runtime/components/SplitterPanel.vue.d.ts +2 -2
- package/dist/runtime/components/Table.vue +95 -26
- package/dist/runtime/components/Tabs.d.vue.ts +44 -4
- package/dist/runtime/components/Tabs.vue +171 -18
- package/dist/runtime/components/Tabs.vue.d.ts +44 -4
- package/dist/runtime/components/Textarea.vue +3 -2
- package/dist/runtime/components/Timeline.d.vue.ts +19 -0
- package/dist/runtime/components/Timeline.vue +99 -0
- package/dist/runtime/components/Timeline.vue.d.ts +19 -0
- package/dist/runtime/components/Toast.d.vue.ts +10 -1
- package/dist/runtime/components/Toast.vue +94 -8
- package/dist/runtime/components/Toast.vue.d.ts +10 -1
- package/dist/runtime/components/Tooltip.d.vue.ts +8 -2
- package/dist/runtime/components/Tooltip.vue +9 -4
- package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
- package/dist/runtime/composables/use-form-field.d.ts +1 -0
- package/dist/runtime/composables/use-table.d.ts +3 -0
- package/dist/runtime/composables/use-table.js +10 -4
- package/dist/runtime/composables/use-toast.js +5 -1
- package/dist/runtime/default-colors.css +1 -1
- package/dist/runtime/directives/hotkey.d.ts +13 -0
- package/dist/runtime/directives/hotkey.js +107 -0
- package/dist/runtime/directives/index.d.ts +2 -0
- package/dist/runtime/directives/index.js +2 -0
- package/dist/runtime/directives/mask.d.ts +30 -0
- package/dist/runtime/directives/mask.js +165 -0
- package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +29 -25
- package/dist/runtime/internal/ComboboxSelectBase.vue +104 -20
- package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +29 -25
- package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +16 -11
- package/dist/runtime/internal/ComboboxSelectBody.vue +49 -10
- package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +16 -11
- package/dist/runtime/internal/DatePickerCalendarBody.vue +1 -1
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +1 -1
- package/dist/runtime/internal/ShortcutHint.d.vue.ts +6 -0
- package/dist/runtime/internal/ShortcutHint.vue +13 -0
- package/dist/runtime/internal/ShortcutHint.vue.d.ts +6 -0
- package/dist/runtime/internal/ToastItemRenderer.d.vue.ts +9 -1
- package/dist/runtime/internal/ToastItemRenderer.vue +55 -8
- package/dist/runtime/internal/ToastItemRenderer.vue.d.ts +9 -1
- package/dist/runtime/internal/combobox-select.js +2 -1
- package/dist/runtime/internal/programmatic-services.d.ts +2 -0
- package/dist/runtime/internal/programmatic-services.js +8 -0
- package/dist/runtime/internal/toast-stack.d.ts +36 -0
- package/dist/runtime/internal/toast-stack.js +36 -0
- package/dist/runtime/structural.css +1 -1
- package/dist/runtime/table.d.ts +1 -1
- package/dist/runtime/theme/alert-dialog.js +1 -1
- package/dist/runtime/theme/avatar.js +7 -7
- package/dist/runtime/theme/badge.js +2 -2
- package/dist/runtime/theme/calendar.d.ts +86 -0
- package/dist/runtime/theme/calendar.js +19 -0
- package/dist/runtime/theme/callout.d.ts +0 -12
- package/dist/runtime/theme/callout.js +8 -8
- package/dist/runtime/theme/checkbox.js +1 -1
- package/dist/runtime/theme/code-tree.js +1 -1
- package/dist/runtime/theme/command-palette.js +1 -1
- package/dist/runtime/theme/content-navigation.d.ts +3 -0
- package/dist/runtime/theme/content-navigation.js +1 -0
- package/dist/runtime/theme/date-picker.js +1 -1
- package/dist/runtime/theme/drawer.js +1 -1
- package/dist/runtime/theme/dropdown.d.ts +21 -0
- package/dist/runtime/theme/dropdown.js +15 -2
- package/dist/runtime/theme/file-tree.js +1 -1
- package/dist/runtime/theme/file-upload.js +2 -2
- package/dist/runtime/theme/form-field.d.ts +18 -0
- package/dist/runtime/theme/form-field.js +6 -1
- package/dist/runtime/theme/icon.js +1 -1
- package/dist/runtime/theme/input-number.js +1 -1
- package/dist/runtime/theme/input.js +1 -1
- package/dist/runtime/theme/modal.js +1 -1
- package/dist/runtime/theme/pin-input.js +1 -1
- package/dist/runtime/theme/progress.js +2 -2
- package/dist/runtime/theme/prose.d.ts +6 -0
- package/dist/runtime/theme/prose.js +2 -0
- package/dist/runtime/theme/radio-group.js +4 -4
- package/dist/runtime/theme/rating.js +1 -1
- package/dist/runtime/theme/select.js +2 -2
- package/dist/runtime/theme/separator.js +1 -1
- package/dist/runtime/theme/slideover.js +1 -1
- package/dist/runtime/theme/slider.js +2 -2
- package/dist/runtime/theme/splitter-resize-handle.js +1 -1
- package/dist/runtime/theme/switch.js +1 -1
- package/dist/runtime/theme/table.d.ts +27 -0
- package/dist/runtime/theme/table.js +11 -2
- package/dist/runtime/theme/tabs.d.ts +87 -3
- package/dist/runtime/theme/tabs.js +46 -22
- package/dist/runtime/theme/textarea.js +1 -1
- package/dist/runtime/theme/timeline.d.ts +251 -0
- package/dist/runtime/theme/timeline.js +84 -0
- package/dist/runtime/theme/toast.d.ts +92 -0
- package/dist/runtime/theme/toast.js +29 -7
- package/dist/runtime/theme-config.d.ts +12 -1
- package/dist/runtime/types/index.d.ts +6 -1
- package/dist/runtime/utils/arrow.d.ts +21 -0
- package/dist/runtime/utils/arrow.js +10 -0
- package/dist/runtime/utils/color-registry.d.ts +3 -1
- package/dist/runtime/utils/color-registry.js +4 -0
- package/dist/runtime/utils/file-icons.d.ts +8 -0
- package/dist/runtime/utils/file-icons.js +133 -0
- package/dist/runtime/utils/functional-tokens.d.ts +1 -1
- package/dist/runtime/utils/functional-tokens.js +1 -1
- package/dist/runtime/utils/icons.d.ts +2 -0
- package/dist/runtime/utils/icons.js +2 -0
- package/dist/runtime/utils/messages.d.ts +6 -0
- package/dist/runtime/utils/messages.js +6 -0
- package/dist/runtime/utils/navigation-menu.d.ts +10 -0
- package/dist/runtime/utils/navigation-menu.js +3 -0
- package/dist/runtime/utils/overlay.d.ts +17 -0
- package/dist/runtime/utils/overlay.js +7 -0
- package/dist/runtime/utils/seed-colors.d.ts +2 -1
- package/dist/runtime/utils/seed-colors.js +24 -16
- package/dist/runtime/utils/select-contracts.d.ts +7 -1
- package/dist/runtime/utils/table-columns.js +1 -1
- package/dist/runtime/utils/table-contracts.d.ts +9 -1
- package/dist/runtime/utils/timeline-contracts.d.ts +42 -0
- package/dist/runtime/utils/timeline-contracts.js +0 -0
- package/dist/tokens/default-colors.tokens.json +100 -100
- package/package.json +21 -9
|
@@ -9,8 +9,8 @@ export const badgeTheme = tv({
|
|
|
9
9
|
leadingIcon: "shrink-0",
|
|
10
10
|
label: "truncate",
|
|
11
11
|
trailingIcon: "shrink-0",
|
|
12
|
-
// Standalone dots
|
|
13
|
-
dot: "shrink-0 rounded-full bg-[var(--_selaras-color-
|
|
12
|
+
// Standalone dots are unpaired graphics; inline dots use the pill foreground.
|
|
13
|
+
dot: "shrink-0 rounded-full bg-[var(--_selaras-color-indicator)]"
|
|
14
14
|
},
|
|
15
15
|
variants: {
|
|
16
16
|
color: {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export declare const calendarTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
4
|
+
root?: import("tailwind-variants").ClassValue;
|
|
5
|
+
header?: import("tailwind-variants").ClassValue;
|
|
6
|
+
footer?: import("tailwind-variants").ClassValue;
|
|
7
|
+
heading?: import("tailwind-variants").ClassValue;
|
|
8
|
+
grids?: import("tailwind-variants").ClassValue;
|
|
9
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
10
|
+
gridHead?: import("tailwind-variants").ClassValue;
|
|
11
|
+
headCell?: import("tailwind-variants").ClassValue;
|
|
12
|
+
cell?: import("tailwind-variants").ClassValue;
|
|
13
|
+
dayButton?: import("tailwind-variants").ClassValue;
|
|
14
|
+
dayDetails?: import("tailwind-variants").ClassValue;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
[x: string]: {
|
|
19
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
20
|
+
root?: import("tailwind-variants").ClassValue;
|
|
21
|
+
header?: import("tailwind-variants").ClassValue;
|
|
22
|
+
footer?: import("tailwind-variants").ClassValue;
|
|
23
|
+
heading?: import("tailwind-variants").ClassValue;
|
|
24
|
+
grids?: import("tailwind-variants").ClassValue;
|
|
25
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
26
|
+
gridHead?: import("tailwind-variants").ClassValue;
|
|
27
|
+
headCell?: import("tailwind-variants").ClassValue;
|
|
28
|
+
cell?: import("tailwind-variants").ClassValue;
|
|
29
|
+
dayButton?: import("tailwind-variants").ClassValue;
|
|
30
|
+
dayDetails?: import("tailwind-variants").ClassValue;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
} | {}, {
|
|
34
|
+
root: string;
|
|
35
|
+
header: string;
|
|
36
|
+
heading: string;
|
|
37
|
+
grids: string;
|
|
38
|
+
grid: string;
|
|
39
|
+
gridHead: string;
|
|
40
|
+
headCell: string;
|
|
41
|
+
cell: string;
|
|
42
|
+
dayButton: string;
|
|
43
|
+
dayDetails: string;
|
|
44
|
+
footer: string;
|
|
45
|
+
}, undefined, {
|
|
46
|
+
[key: string]: {
|
|
47
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
48
|
+
root?: import("tailwind-variants").ClassValue;
|
|
49
|
+
header?: import("tailwind-variants").ClassValue;
|
|
50
|
+
footer?: import("tailwind-variants").ClassValue;
|
|
51
|
+
heading?: import("tailwind-variants").ClassValue;
|
|
52
|
+
grids?: import("tailwind-variants").ClassValue;
|
|
53
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
54
|
+
gridHead?: import("tailwind-variants").ClassValue;
|
|
55
|
+
headCell?: import("tailwind-variants").ClassValue;
|
|
56
|
+
cell?: import("tailwind-variants").ClassValue;
|
|
57
|
+
dayButton?: import("tailwind-variants").ClassValue;
|
|
58
|
+
dayDetails?: import("tailwind-variants").ClassValue;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
} | {}, {
|
|
62
|
+
root: string;
|
|
63
|
+
header: string;
|
|
64
|
+
heading: string;
|
|
65
|
+
grids: string;
|
|
66
|
+
grid: string;
|
|
67
|
+
gridHead: string;
|
|
68
|
+
headCell: string;
|
|
69
|
+
cell: string;
|
|
70
|
+
dayButton: string;
|
|
71
|
+
dayDetails: string;
|
|
72
|
+
footer: string;
|
|
73
|
+
}, import("tailwind-variants").TVReturnTypeLike<unknown, {
|
|
74
|
+
root: string;
|
|
75
|
+
header: string;
|
|
76
|
+
heading: string;
|
|
77
|
+
grids: string;
|
|
78
|
+
grid: string;
|
|
79
|
+
gridHead: string;
|
|
80
|
+
headCell: string;
|
|
81
|
+
cell: string;
|
|
82
|
+
dayButton: string;
|
|
83
|
+
dayDetails: string;
|
|
84
|
+
footer: string;
|
|
85
|
+
}>>;
|
|
86
|
+
export type CalendarThemeSlots = keyof (typeof calendarTheme)['slots'];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export const calendarTheme = tv({
|
|
3
|
+
slots: {
|
|
4
|
+
root: "inline-block",
|
|
5
|
+
header: "mb-2 flex items-center justify-between gap-2",
|
|
6
|
+
heading: "text-sm font-medium text-[var(--selaras-resolved-text-default)]",
|
|
7
|
+
grids: "flex flex-col gap-4 sm:flex-row",
|
|
8
|
+
// Give each month an intrinsic compact width. A percentage width here
|
|
9
|
+
// expands the inline-block root to its entire container. The fixed table
|
|
10
|
+
// layout keeps all seven columns equal even with day-details content.
|
|
11
|
+
grid: "w-72 table-fixed border-collapse",
|
|
12
|
+
gridHead: "",
|
|
13
|
+
headCell: "w-[14.285714%] h-8 text-xs font-medium text-[var(--selaras-resolved-text-muted)]",
|
|
14
|
+
cell: "p-0.5 text-center align-top",
|
|
15
|
+
dayButton: "relative data-[today]:font-semibold data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:left-1/2 data-[today]:after:size-1 data-[today]:after:-translate-x-1/2 data-[today]:after:rounded-full data-[today]:after:bg-[var(--_selaras-color-fill)] data-[outside-view]:opacity-40 data-[unavailable]:opacity-40 data-[unavailable]:line-through",
|
|
16
|
+
dayDetails: "min-w-0",
|
|
17
|
+
footer: "mt-3"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
export declare const calloutTheme: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
type: {
|
|
3
3
|
note: {
|
|
4
|
-
root: string;
|
|
5
4
|
icon: string;
|
|
6
5
|
};
|
|
7
6
|
tip: {
|
|
8
|
-
root: string;
|
|
9
7
|
icon: string;
|
|
10
8
|
};
|
|
11
9
|
warning: {
|
|
12
|
-
root: string;
|
|
13
10
|
icon: string;
|
|
14
11
|
};
|
|
15
12
|
danger: {
|
|
16
|
-
root: string;
|
|
17
13
|
icon: string;
|
|
18
14
|
};
|
|
19
15
|
};
|
|
@@ -25,19 +21,15 @@ export declare const calloutTheme: import("tailwind-variants").TVReturnType<{
|
|
|
25
21
|
}, undefined, {
|
|
26
22
|
type: {
|
|
27
23
|
note: {
|
|
28
|
-
root: string;
|
|
29
24
|
icon: string;
|
|
30
25
|
};
|
|
31
26
|
tip: {
|
|
32
|
-
root: string;
|
|
33
27
|
icon: string;
|
|
34
28
|
};
|
|
35
29
|
warning: {
|
|
36
|
-
root: string;
|
|
37
30
|
icon: string;
|
|
38
31
|
};
|
|
39
32
|
danger: {
|
|
40
|
-
root: string;
|
|
41
33
|
icon: string;
|
|
42
34
|
};
|
|
43
35
|
};
|
|
@@ -49,19 +41,15 @@ export declare const calloutTheme: import("tailwind-variants").TVReturnType<{
|
|
|
49
41
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
50
42
|
type: {
|
|
51
43
|
note: {
|
|
52
|
-
root: string;
|
|
53
44
|
icon: string;
|
|
54
45
|
};
|
|
55
46
|
tip: {
|
|
56
|
-
root: string;
|
|
57
47
|
icon: string;
|
|
58
48
|
};
|
|
59
49
|
warning: {
|
|
60
|
-
root: string;
|
|
61
50
|
icon: string;
|
|
62
51
|
};
|
|
63
52
|
danger: {
|
|
64
|
-
root: string;
|
|
65
53
|
icon: string;
|
|
66
54
|
};
|
|
67
55
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const calloutTheme = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
root: "flex gap-3 rounded-[var(--selaras-resolved-radius-md)]
|
|
4
|
+
// Match Alert's soft surface by default. A masked pseudo-element draws
|
|
5
|
+
// the striped accent over the edge on hover or focus within without
|
|
6
|
+
// changing the box's size or the content's padding.
|
|
7
|
+
root: "relative flex items-start gap-3 rounded-[var(--selaras-resolved-radius-md)] bg-[var(--_selaras-color-subtle)] p-4 before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:bg-[repeating-linear-gradient(135deg,var(--_selaras-color-border)_0_2px,transparent_2px_4px)] before:p-0.5 before:opacity-0 before:transition-opacity before:content-[''] hover:before:opacity-100 focus-within:before:opacity-100",
|
|
8
8
|
icon: "mt-0.5 size-5 shrink-0",
|
|
9
9
|
content: "min-w-0 flex-1 text-sm text-[var(--selaras-resolved-text-muted)] [&>:first-child]:mt-0 [&>:last-child]:mb-0",
|
|
10
10
|
title: "font-medium text-[var(--selaras-resolved-text-default)]"
|
|
11
11
|
},
|
|
12
12
|
variants: {
|
|
13
13
|
type: {
|
|
14
|
-
note: {
|
|
15
|
-
tip: {
|
|
16
|
-
warning: {
|
|
17
|
-
danger: {
|
|
14
|
+
note: { icon: "text-[var(--_selaras-color-text)]" },
|
|
15
|
+
tip: { icon: "text-[var(--_selaras-color-text)]" },
|
|
16
|
+
warning: { icon: "text-[var(--_selaras-color-text)]" },
|
|
17
|
+
danger: { icon: "text-[var(--_selaras-color-text)]" }
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: {
|
|
@@ -82,7 +82,7 @@ export const checkboxTheme = tv({
|
|
|
82
82
|
// requested, not whichever variant happens to compose later. See
|
|
83
83
|
// RadioGroup's own theme file, which already has this order right.
|
|
84
84
|
invalid: {
|
|
85
|
-
true: { box: "ring-[var(--_selaras-color-
|
|
85
|
+
true: { box: "ring-[var(--_selaras-color-border)] data-[state=checked]:ring-[var(--_selaras-color-border)] data-[state=indeterminate]:ring-[var(--_selaras-color-border)]" }
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
defaultVariants: {
|
|
@@ -5,7 +5,7 @@ export const codeTreeTheme = tv({
|
|
|
5
5
|
// FileTree's own root box (border/bg/padding) is stripped via its :ui
|
|
6
6
|
// override below - this wrapper provides that framing instead, so the
|
|
7
7
|
// two panels read as one split view rather than a box inside a box.
|
|
8
|
-
tree: "w-56 shrink-0 overflow-auto border-e border-[var(--selaras-resolved-border-default)] p-2",
|
|
8
|
+
tree: "w-56 shrink-0 overflow-auto border-e border-[var(--selaras-resolved-border-default)] bg-[var(--selaras-resolved-surface-elevated)] p-2",
|
|
9
9
|
content: "min-w-0 flex-1 overflow-auto p-4",
|
|
10
10
|
pre: "whitespace-pre font-mono text-sm text-[var(--selaras-resolved-text-default)]",
|
|
11
11
|
empty: "flex flex-1 items-center justify-center p-4 text-center text-sm text-[var(--selaras-resolved-text-muted)]"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const commandPaletteTheme = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
4
|
+
overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)] backdrop-blur-[2px] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
5
5
|
// Top-anchored (not vertically centered like Modal) - the conventional
|
|
6
6
|
// command-palette position, and it means the dialog doesn't visibly
|
|
7
7
|
// jump up and down as the result list grows/shrinks while typing.
|
|
@@ -20,6 +20,7 @@ export declare const contentNavigationTheme: import("tailwind-variants").TVRetur
|
|
|
20
20
|
linkActive: string;
|
|
21
21
|
trigger: string;
|
|
22
22
|
icon: string;
|
|
23
|
+
badge: string;
|
|
23
24
|
chevron: string;
|
|
24
25
|
content: string;
|
|
25
26
|
}, undefined, {
|
|
@@ -44,6 +45,7 @@ export declare const contentNavigationTheme: import("tailwind-variants").TVRetur
|
|
|
44
45
|
linkActive: string;
|
|
45
46
|
trigger: string;
|
|
46
47
|
icon: string;
|
|
48
|
+
badge: string;
|
|
47
49
|
chevron: string;
|
|
48
50
|
content: string;
|
|
49
51
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
@@ -68,6 +70,7 @@ export declare const contentNavigationTheme: import("tailwind-variants").TVRetur
|
|
|
68
70
|
linkActive: string;
|
|
69
71
|
trigger: string;
|
|
70
72
|
icon: string;
|
|
73
|
+
badge: string;
|
|
71
74
|
chevron: string;
|
|
72
75
|
content: string;
|
|
73
76
|
}>>;
|
|
@@ -12,6 +12,7 @@ export const contentNavigationTheme = tv({
|
|
|
12
12
|
// A separate slot from label - this styles the icon a link/group-header
|
|
13
13
|
// shows before its title, not the title text itself.
|
|
14
14
|
icon: "size-4 shrink-0 text-[var(--selaras-resolved-text-muted)]",
|
|
15
|
+
badge: "ms-auto inline-flex shrink-0 items-center rounded-full bg-[var(--selaras-resolved-surface-elevated)] px-2 py-0.5 text-xs font-medium text-[var(--selaras-resolved-text-muted)]",
|
|
15
16
|
chevron: "size-4 shrink-0 text-[var(--selaras-resolved-text-muted)] transition-transform group-data-[state=open]:rotate-180",
|
|
16
17
|
// `ps-4` (16px) reserves the gutter each child's own trunk segment
|
|
17
18
|
// and elbow (on the `item` slot above) reach back into - the trunk
|
|
@@ -59,7 +59,7 @@ export const datePickerTheme = tv({
|
|
|
59
59
|
lg: { field: "h-11 px-3.5 text-base" }
|
|
60
60
|
},
|
|
61
61
|
invalid: {
|
|
62
|
-
true: { field: "ring-[var(--_selaras-color-
|
|
62
|
+
true: { field: "ring-[var(--_selaras-color-border)] hover:ring-[var(--_selaras-color-border)] focus-within:ring-[var(--_selaras-color-focus)]" }
|
|
63
63
|
},
|
|
64
64
|
// Range mode's day cells butt up against each other with no horizontal
|
|
65
65
|
// gap, so a highlighted run of days reads as one continuous connected
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const drawerTheme = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)]",
|
|
4
|
+
overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)] backdrop-blur-[2px]",
|
|
5
5
|
content: "fixed z-[var(--selaras-resolved-z-modal)] flex flex-col bg-[var(--selaras-resolved-surface-default)] shadow-[var(--selaras-resolved-shadow-lg)] focus:outline-none",
|
|
6
6
|
// A small rounded grip bar - purely visual, signals "draggable" the
|
|
7
7
|
// same way a real bottom sheet's handle does. Centered via the
|
|
@@ -5,12 +5,19 @@ export declare const dropdownTheme: import("tailwind-variants").TVReturnType<{
|
|
|
5
5
|
icon: string;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
+
mobile: {
|
|
9
|
+
true: {
|
|
10
|
+
item: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
}, {
|
|
9
14
|
content: string;
|
|
10
15
|
item: string;
|
|
11
16
|
icon: string;
|
|
12
17
|
separator: string;
|
|
13
18
|
arrow: string;
|
|
19
|
+
mobileList: string;
|
|
20
|
+
mobileGroup: string;
|
|
14
21
|
}, undefined, {
|
|
15
22
|
destructive: {
|
|
16
23
|
true: {
|
|
@@ -18,12 +25,19 @@ export declare const dropdownTheme: import("tailwind-variants").TVReturnType<{
|
|
|
18
25
|
icon: string;
|
|
19
26
|
};
|
|
20
27
|
};
|
|
28
|
+
mobile: {
|
|
29
|
+
true: {
|
|
30
|
+
item: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
21
33
|
}, {
|
|
22
34
|
content: string;
|
|
23
35
|
item: string;
|
|
24
36
|
icon: string;
|
|
25
37
|
separator: string;
|
|
26
38
|
arrow: string;
|
|
39
|
+
mobileList: string;
|
|
40
|
+
mobileGroup: string;
|
|
27
41
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
28
42
|
destructive: {
|
|
29
43
|
true: {
|
|
@@ -31,11 +45,18 @@ export declare const dropdownTheme: import("tailwind-variants").TVReturnType<{
|
|
|
31
45
|
icon: string;
|
|
32
46
|
};
|
|
33
47
|
};
|
|
48
|
+
mobile: {
|
|
49
|
+
true: {
|
|
50
|
+
item: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
34
53
|
}, {
|
|
35
54
|
content: string;
|
|
36
55
|
item: string;
|
|
37
56
|
icon: string;
|
|
38
57
|
separator: string;
|
|
39
58
|
arrow: string;
|
|
59
|
+
mobileList: string;
|
|
60
|
+
mobileGroup: string;
|
|
40
61
|
}>>;
|
|
41
62
|
export type DropdownThemeSlots = keyof (typeof dropdownTheme)['slots'];
|
|
@@ -5,7 +5,10 @@ export const dropdownTheme = tv({
|
|
|
5
5
|
item: "flex items-center gap-2 rounded-[var(--selaras-resolved-radius-sm)] px-2 py-1.5 text-sm text-[var(--selaras-resolved-text-default)] cursor-pointer select-none outline-none data-[highlighted]:bg-[var(--selaras-resolved-surface-elevated)] data-[disabled]:opacity-50 data-[disabled]:pointer-events-none",
|
|
6
6
|
icon: "size-4 shrink-0 text-[var(--selaras-resolved-text-muted)]",
|
|
7
7
|
separator: "-mx-1 my-1 h-px bg-[var(--selaras-resolved-border-default)]",
|
|
8
|
-
arrow: "fill-[var(--selaras-resolved-surface-default)] stroke-[var(--selaras-resolved-border-default)] stroke-1"
|
|
8
|
+
arrow: "fill-[var(--selaras-resolved-surface-default)] stroke-[var(--selaras-resolved-border-default)] stroke-1",
|
|
9
|
+
// The adaptive small-screen dialog's scrolling list and each item group in it.
|
|
10
|
+
mobileList: "max-h-[calc(100dvh-8rem)] overflow-y-auto p-2",
|
|
11
|
+
mobileGroup: "flex flex-col gap-1"
|
|
9
12
|
},
|
|
10
13
|
variants: {
|
|
11
14
|
// For a delete/remove-style action - deliberately just this one flag
|
|
@@ -16,6 +19,16 @@ export const dropdownTheme = tv({
|
|
|
16
19
|
item: "text-[var(--selaras-resolved-color-danger-text)] data-[highlighted]:bg-[var(--selaras-resolved-color-danger-subtle-hover)] data-[highlighted]:text-[var(--selaras-resolved-color-danger-on-subtle)]",
|
|
17
20
|
icon: "text-current"
|
|
18
21
|
}
|
|
22
|
+
},
|
|
23
|
+
// Items in the adaptive dialog: larger touch targets, and real hover/focus
|
|
24
|
+
// states, since they aren't menu items with a highlighted state.
|
|
25
|
+
mobile: {
|
|
26
|
+
true: {
|
|
27
|
+
item: "min-h-11 w-full gap-3 px-3 py-2 text-start text-base transition-colors hover:bg-[var(--selaras-resolved-surface-elevated)] focus-visible:bg-[var(--selaras-resolved-surface-elevated)] focus-visible:ring-2 focus-visible:ring-[var(--selaras-resolved-color-primary-fill)] disabled:pointer-events-none disabled:opacity-50"
|
|
28
|
+
}
|
|
19
29
|
}
|
|
20
|
-
}
|
|
30
|
+
},
|
|
31
|
+
compoundVariants: [
|
|
32
|
+
{ mobile: true, destructive: true, class: { item: "hover:bg-[var(--selaras-resolved-color-danger-subtle-hover)] hover:text-[var(--selaras-resolved-color-danger-on-subtle)]" } }
|
|
33
|
+
]
|
|
21
34
|
});
|
|
@@ -18,7 +18,7 @@ export const fileTreeTheme = tv({
|
|
|
18
18
|
},
|
|
19
19
|
variants: {
|
|
20
20
|
selected: {
|
|
21
|
-
true: { row: "bg-[var(--_selaras-color-subtle)] text-[var(--_selaras-color-text)] hover:bg-[var(--_selaras-color-subtle)] hover:text-[var(--_selaras-color-text)]" }
|
|
21
|
+
true: { row: "bg-[var(--_selaras-color-subtle)] font-medium text-[var(--_selaras-color-text)] hover:bg-[var(--_selaras-color-subtle)] hover:text-[var(--_selaras-color-text)]" }
|
|
22
22
|
},
|
|
23
23
|
color: {
|
|
24
24
|
primary: "",
|
|
@@ -7,7 +7,7 @@ export const fileUploadTheme = tv({
|
|
|
7
7
|
// instead of needing hand-rolled keydown handling. dragging (a
|
|
8
8
|
// component-set data attribute, not a native one) recolors it
|
|
9
9
|
// toward `color` - see the color variant below.
|
|
10
|
-
dropzone: "flex w-full flex-col items-center justify-center gap-2 rounded-[var(--selaras-resolved-radius-md)] border-2 border-dashed border-[var(--selaras-resolved-border-default)] p-6 text-center transition-colors hover:border-[var(--selaras-resolved-border-hover)] hover:bg-[var(--selaras-resolved-surface-elevated)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--_selaras-color-focus)] data-[dragging]:border-[var(--_selaras-color-
|
|
10
|
+
dropzone: "flex w-full flex-col items-center justify-center gap-2 rounded-[var(--selaras-resolved-radius-md)] border-2 border-dashed border-[var(--selaras-resolved-border-default)] p-6 text-center transition-colors hover:border-[var(--selaras-resolved-border-hover)] hover:bg-[var(--selaras-resolved-surface-elevated)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--_selaras-color-focus)] data-[dragging]:border-[var(--_selaras-color-border)] data-[dragging]:bg-[var(--_selaras-color-subtle)] disabled:opacity-50 disabled:pointer-events-none",
|
|
11
11
|
icon: "text-[var(--_selaras-color-fill)]",
|
|
12
12
|
label: "font-medium text-[var(--selaras-resolved-text-default)]",
|
|
13
13
|
description: "text-[var(--selaras-resolved-text-muted)]",
|
|
@@ -54,7 +54,7 @@ export const fileUploadTheme = tv({
|
|
|
54
54
|
// override win over color's - matches Input's own documented
|
|
55
55
|
// reasoning for this order.
|
|
56
56
|
invalid: {
|
|
57
|
-
true: { dropzone: "border-[var(--_selaras-color-
|
|
57
|
+
true: { dropzone: "border-[var(--_selaras-color-border)] focus-visible:ring-[var(--_selaras-color-focus)]" }
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
defaultVariants: {
|
|
@@ -19,6 +19,12 @@ export declare const formFieldTheme: import("tailwind-variants").TVReturnType<{
|
|
|
19
19
|
container: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
labelMode: {
|
|
23
|
+
static: {};
|
|
24
|
+
floating: {
|
|
25
|
+
container: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
22
28
|
}, {
|
|
23
29
|
root: string;
|
|
24
30
|
body: string;
|
|
@@ -50,6 +56,12 @@ export declare const formFieldTheme: import("tailwind-variants").TVReturnType<{
|
|
|
50
56
|
container: string;
|
|
51
57
|
};
|
|
52
58
|
};
|
|
59
|
+
labelMode: {
|
|
60
|
+
static: {};
|
|
61
|
+
floating: {
|
|
62
|
+
container: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
53
65
|
}, {
|
|
54
66
|
root: string;
|
|
55
67
|
body: string;
|
|
@@ -81,6 +93,12 @@ export declare const formFieldTheme: import("tailwind-variants").TVReturnType<{
|
|
|
81
93
|
container: string;
|
|
82
94
|
};
|
|
83
95
|
};
|
|
96
|
+
labelMode: {
|
|
97
|
+
static: {};
|
|
98
|
+
floating: {
|
|
99
|
+
container: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
84
102
|
}, {
|
|
85
103
|
root: string;
|
|
86
104
|
body: string;
|
|
@@ -28,10 +28,15 @@ export const formFieldTheme = tv({
|
|
|
28
28
|
orientation: {
|
|
29
29
|
vertical: {},
|
|
30
30
|
horizontal: { body: "flex-row items-start gap-3", header: "shrink-0", container: "flex-1 min-w-0" }
|
|
31
|
+
},
|
|
32
|
+
labelMode: {
|
|
33
|
+
static: {},
|
|
34
|
+
floating: { container: "relative" }
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
defaultVariants: {
|
|
34
38
|
size: "md",
|
|
35
|
-
orientation: "vertical"
|
|
39
|
+
orientation: "vertical",
|
|
40
|
+
labelMode: "static"
|
|
36
41
|
}
|
|
37
42
|
});
|
|
@@ -27,7 +27,7 @@ export const iconTheme = tv({
|
|
|
27
27
|
// role with no finite built-in branch, while leaving uncolored icons free
|
|
28
28
|
// to inherit currentColor.
|
|
29
29
|
colored: {
|
|
30
|
-
true: { base: "text-[var(--_selaras-color-
|
|
30
|
+
true: { base: "text-[var(--_selaras-color-indicator)]" }
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
compoundVariants: [
|
|
@@ -66,7 +66,7 @@ export const inputNumberTheme = tv({
|
|
|
66
66
|
// focus-within:ring override win over color's - see input.ts for why
|
|
67
67
|
// declaration order (not runtime call order) is what decides this.
|
|
68
68
|
invalid: {
|
|
69
|
-
true: { root: "ring-[var(--_selaras-color-
|
|
69
|
+
true: { root: "ring-[var(--_selaras-color-border)] hover:ring-[var(--_selaras-color-border)] focus-within:ring-[var(--_selaras-color-focus)]" }
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
defaultVariants: {
|
|
@@ -54,7 +54,7 @@ export const inputTheme = tv({
|
|
|
54
54
|
// Checkbox/Switch fix for why declaration order (not runtime call
|
|
55
55
|
// order) is what decides this.
|
|
56
56
|
invalid: {
|
|
57
|
-
true: { base: "ring-[var(--_selaras-color-
|
|
57
|
+
true: { base: "ring-[var(--_selaras-color-border)] hover:ring-[var(--_selaras-color-border)] focus:ring-[var(--_selaras-color-focus)]" }
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
compoundVariants: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const modalTheme = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)]",
|
|
4
|
+
overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)] backdrop-blur-[2px]",
|
|
5
5
|
// flex flex-col + the header/footer's own shrink-0 (native to a flex
|
|
6
6
|
// child, no extra class needed) let a tall body scroll internally via
|
|
7
7
|
// its own overflow-y-auto below, capped to the viewport height so a
|
|
@@ -32,7 +32,7 @@ export const pinInputTheme = tv({
|
|
|
32
32
|
// focus:ring override win over color's - matches Input's own
|
|
33
33
|
// documented reasoning for this order.
|
|
34
34
|
invalid: {
|
|
35
|
-
true: { input: "ring-[var(--_selaras-color-
|
|
35
|
+
true: { input: "ring-[var(--_selaras-color-border)] hover:ring-[var(--_selaras-color-border)] focus:ring-[var(--_selaras-color-focus)]" }
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
defaultVariants: {
|
|
@@ -3,7 +3,7 @@ export const progressTheme = tv({
|
|
|
3
3
|
slots: {
|
|
4
4
|
// Linear
|
|
5
5
|
root: "relative w-full overflow-hidden rounded-full bg-[var(--selaras-resolved-surface-elevated)]",
|
|
6
|
-
indicator: "h-full rounded-full bg-[var(--_selaras-color-
|
|
6
|
+
indicator: "h-full rounded-full bg-[var(--_selaras-color-indicator)]",
|
|
7
7
|
// Circular - a relative wrapper (for the centered label overlay) around
|
|
8
8
|
// an SVG pair: a static background track circle plus an animated
|
|
9
9
|
// foreground arc whose stroke-dasharray/dashoffset (computed in the
|
|
@@ -11,7 +11,7 @@ export const progressTheme = tv({
|
|
|
11
11
|
circleRoot: "relative inline-flex items-center justify-center",
|
|
12
12
|
circleWrapper: "",
|
|
13
13
|
circleTrack: "stroke-[var(--selaras-resolved-surface-elevated)]",
|
|
14
|
-
circleIndicator: "stroke-[var(--_selaras-color-
|
|
14
|
+
circleIndicator: "stroke-[var(--_selaras-color-indicator)]",
|
|
15
15
|
label: "absolute inset-0 flex items-center justify-center text-xs font-medium text-[var(--selaras-resolved-text-default)]"
|
|
16
16
|
},
|
|
17
17
|
variants: {
|
|
@@ -18,6 +18,8 @@ export declare const proseTheme: import("tailwind-variants").TVReturnType<{
|
|
|
18
18
|
headingAnchor: string;
|
|
19
19
|
preWrapper: string;
|
|
20
20
|
preHeader: string;
|
|
21
|
+
preLabel: string;
|
|
22
|
+
preIcon: string;
|
|
21
23
|
preFilename: string;
|
|
22
24
|
preCopyButton: string;
|
|
23
25
|
pre: string;
|
|
@@ -41,6 +43,8 @@ export declare const proseTheme: import("tailwind-variants").TVReturnType<{
|
|
|
41
43
|
headingAnchor: string;
|
|
42
44
|
preWrapper: string;
|
|
43
45
|
preHeader: string;
|
|
46
|
+
preLabel: string;
|
|
47
|
+
preIcon: string;
|
|
44
48
|
preFilename: string;
|
|
45
49
|
preCopyButton: string;
|
|
46
50
|
pre: string;
|
|
@@ -64,6 +68,8 @@ export declare const proseTheme: import("tailwind-variants").TVReturnType<{
|
|
|
64
68
|
headingAnchor: string;
|
|
65
69
|
preWrapper: string;
|
|
66
70
|
preHeader: string;
|
|
71
|
+
preLabel: string;
|
|
72
|
+
preIcon: string;
|
|
67
73
|
preFilename: string;
|
|
68
74
|
preCopyButton: string;
|
|
69
75
|
pre: string;
|
|
@@ -10,6 +10,8 @@ export const proseTheme = tv({
|
|
|
10
10
|
headingAnchor: "no-underline hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--_selaras-color-focus)]",
|
|
11
11
|
preWrapper: "overflow-hidden rounded-[var(--selaras-resolved-radius-md)] ring-1 ring-[var(--selaras-resolved-border-default)]",
|
|
12
12
|
preHeader: "flex items-center justify-between gap-2 border-b border-[var(--selaras-resolved-border-default)] bg-[var(--selaras-resolved-surface-elevated)] px-3 py-1.5",
|
|
13
|
+
preLabel: "flex min-w-0 items-center gap-2",
|
|
14
|
+
preIcon: "size-4",
|
|
13
15
|
preFilename: "font-mono text-xs text-[var(--selaras-resolved-text-muted)]",
|
|
14
16
|
preCopyButton: "shrink-0",
|
|
15
17
|
pre: "overflow-x-auto bg-[var(--selaras-resolved-surface-elevated)] p-4 font-mono text-sm leading-relaxed"
|
|
@@ -47,7 +47,7 @@ export const radioGroupTheme = tv({
|
|
|
47
47
|
// rendered visibly jagged at normal (non-zoomed) browser scale; the
|
|
48
48
|
// fractional width needs the arbitrary-value form since Tailwind's
|
|
49
49
|
// named ring scale only has integer steps.
|
|
50
|
-
item: "relative isolate flex shrink-0 items-center justify-center rounded-full ring-[1.5px] ring-inset ring-[var(--selaras-resolved-border-default)] transition-colors before:absolute before:-z-10 before:[transform:scale(0)] before:rounded-full before:bg-[var(--selaras-resolved-border-hover)] before:opacity-35 before:transition-transform before:duration-200 before:content-[''] hover:before:[transform:scale(1)] focus-visible:outline-none focus-visible:before:[transform:scale(1)] data-[state=checked]:ring-[var(--_selaras-color-
|
|
50
|
+
item: "relative isolate flex shrink-0 items-center justify-center rounded-full ring-[1.5px] ring-inset ring-[var(--selaras-resolved-border-default)] transition-colors before:absolute before:-z-10 before:[transform:scale(0)] before:rounded-full before:bg-[var(--selaras-resolved-border-hover)] before:opacity-35 before:transition-transform before:duration-200 before:content-[''] hover:before:[transform:scale(1)] focus-visible:outline-none focus-visible:before:[transform:scale(1)] data-[state=checked]:ring-[var(--_selaras-color-indicator)] data-[state=checked]:before:bg-[var(--_selaras-color-fill-hover)]",
|
|
51
51
|
// force-mount (see RadioGroup.vue) keeps this in the DOM for every
|
|
52
52
|
// item regardless of checked state, so switching the selection scales
|
|
53
53
|
// the old dot out and the new one in instead of an abrupt pop -
|
|
@@ -56,7 +56,7 @@ export const radioGroupTheme = tv({
|
|
|
56
56
|
// detects them via computed animation-name), not plain CSS
|
|
57
57
|
// transitions, so a transition-only version without force-mount would
|
|
58
58
|
// just vanish instantly.
|
|
59
|
-
indicator: "rounded-full bg-[var(--_selaras-color-
|
|
59
|
+
indicator: "rounded-full bg-[var(--_selaras-color-indicator)] [transform:scale(0)] transition-transform duration-200 data-[state=checked]:[transform:scale(1)]",
|
|
60
60
|
label: "select-none text-[var(--selaras-resolved-text-default)]",
|
|
61
61
|
description: "block select-none text-[var(--selaras-resolved-text-muted)]",
|
|
62
62
|
// Only rendered when an item has a description (wrapping the label and
|
|
@@ -112,12 +112,12 @@ export const radioGroupTheme = tv({
|
|
|
112
112
|
// otherwise win the ring color back whenever an already-invalid group
|
|
113
113
|
// has something selected.
|
|
114
114
|
invalid: {
|
|
115
|
-
true: { item: "ring-[var(--_selaras-color-
|
|
115
|
+
true: { item: "ring-[var(--_selaras-color-border)] data-[state=checked]:ring-[var(--_selaras-color-indicator)]" }
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
compoundVariants: [
|
|
119
119
|
// The card variant's own checked-state highlight, following `color`.
|
|
120
|
-
{ variant: "card", class: { itemWrapper: "has-[[data-state=checked]]:border-[var(--_selaras-color-
|
|
120
|
+
{ variant: "card", class: { itemWrapper: "has-[[data-state=checked]]:border-[var(--_selaras-color-border)] has-[[data-state=checked]]:bg-[var(--_selaras-color-subtle)]" } }
|
|
121
121
|
],
|
|
122
122
|
defaultVariants: {
|
|
123
123
|
size: "md",
|
|
@@ -47,7 +47,7 @@ export const ratingTheme = tv({
|
|
|
47
47
|
// backdrop through it, reading as "not filled" with no shape swap
|
|
48
48
|
// needed - recolored once its own indicator's data-state flips to
|
|
49
49
|
// active.
|
|
50
|
-
fillIcon: "text-transparent transition-colors group-data-[state=active]/step:text-[var(--_selaras-color-
|
|
50
|
+
fillIcon: "text-transparent transition-colors group-data-[state=active]/step:text-[var(--_selaras-color-indicator)]"
|
|
51
51
|
},
|
|
52
52
|
variants: {
|
|
53
53
|
orientation: {
|
|
@@ -44,7 +44,7 @@ export const selectTheme = tv({
|
|
|
44
44
|
viewport: "max-h-72 overflow-y-auto p-1",
|
|
45
45
|
group: "px-2 pt-2 pb-1 text-xs font-medium text-[var(--selaras-resolved-text-muted)]",
|
|
46
46
|
item: "relative flex items-center gap-2 rounded-[var(--selaras-resolved-radius-sm)] py-1.5 ps-2 pe-8 text-sm text-[var(--selaras-resolved-text-default)] outline-none cursor-pointer select-none data-[highlighted]:bg-[var(--selaras-resolved-surface-elevated)] data-[disabled]:opacity-50 data-[disabled]:pointer-events-none",
|
|
47
|
-
itemIndicator: "absolute end-2 flex items-center text-[var(--_selaras-color-
|
|
47
|
+
itemIndicator: "absolute end-2 flex items-center text-[var(--_selaras-color-indicator)]",
|
|
48
48
|
empty: "px-2 py-6 text-center text-sm text-[var(--selaras-resolved-text-muted)]",
|
|
49
49
|
arrow: "fill-[var(--selaras-resolved-surface-default)] stroke-[var(--selaras-resolved-border-default)] stroke-1"
|
|
50
50
|
},
|
|
@@ -72,7 +72,7 @@ export const selectTheme = tv({
|
|
|
72
72
|
// overrides win over color's - see input.ts for why declaration order
|
|
73
73
|
// (not runtime call order) is what decides this.
|
|
74
74
|
invalid: {
|
|
75
|
-
true: { trigger: "ring-[var(--_selaras-color-
|
|
75
|
+
true: { trigger: "ring-[var(--_selaras-color-border)] hover:ring-[var(--_selaras-color-border)] focus:ring-[var(--_selaras-color-focus)] focus-within:ring-[var(--_selaras-color-focus)] data-[state=open]:ring-[var(--_selaras-color-focus)]" }
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
defaultVariants: {
|