@urbicon-ui/blocks 6.19.3 → 6.21.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/dist/components/Calendar/Calendar.svelte +3 -0
- package/dist/components/Calendar/calendar.variants.d.ts +132 -419
- package/dist/components/CommandPalette/commandPalette.variants.d.ts +24 -51
- package/dist/components/CompositionBar/CompositionBar.svelte +6 -1
- package/dist/components/CompositionBar/composition-bar.variants.d.ts +23 -83
- package/dist/components/CompositionBar/composition-bar.variants.js +9 -3
- package/dist/components/EmptyState/emptyState.variants.d.ts +11 -27
- package/dist/components/FileUpload/fileUpload.variants.d.ts +24 -93
- package/dist/components/Guide/GuidePanel.svelte +38 -0
- package/dist/components/Guide/guide.variants.d.ts +69 -124
- package/dist/components/Guide/guide.variants.js +6 -1
- package/dist/components/Planner/planner.variants.d.ts +23 -94
- package/dist/components/Sankey/sankey.variants.d.ts +15 -48
- package/dist/components/SidebarLayout/sidebar-layout.variants.d.ts +10 -38
- package/dist/components/SidebarLayout/sidebar-layout.variants.js +12 -2
- package/dist/components/ThemeSwitcher/themeSwitcher.variants.d.ts +9 -36
- package/dist/i18n/index.d.ts +2 -372
- package/dist/icons/IconProvider.svelte +3 -0
- package/dist/internal/charts/variants.d.ts +18 -31
- package/dist/mint/styles.css +1 -1
- package/dist/primitives/Accordion/Accordion.svelte +14 -0
- package/dist/primitives/Accordion/AccordionItem.svelte +9 -3
- package/dist/primitives/Accordion/accordion.variants.d.ts +12 -43
- package/dist/primitives/Accordion/accordion.variants.js +6 -2
- package/dist/primitives/Accordion/index.d.ts +12 -0
- package/dist/primitives/Alert/alert.variants.d.ts +21 -62
- package/dist/primitives/Avatar/Avatar.svelte +74 -48
- package/dist/primitives/Avatar/avatar.variants.d.ts +34 -128
- package/dist/primitives/Avatar/avatar.variants.js +43 -18
- package/dist/primitives/Avatar/index.d.ts +6 -1
- package/dist/primitives/Badge/badge.variants.d.ts +19 -92
- package/dist/primitives/Badge/badge.variants.js +11 -4
- package/dist/primitives/Breadcrumb/breadcrumb.variants.d.ts +13 -40
- package/dist/primitives/Button/button.variants.d.ts +19 -98
- package/dist/primitives/Button/button.variants.js +13 -9
- package/dist/primitives/ButtonGroup/buttongroup.variants.d.ts +9 -29
- package/dist/primitives/ButtonGroup/buttongroup.variants.js +3 -1
- package/dist/primitives/Card/card.variants.d.ts +14 -81
- package/dist/primitives/Checkbox/checkbox.variants.d.ts +18 -77
- package/dist/primitives/Collapsible/Collapsible.svelte +13 -0
- package/dist/primitives/Collapsible/collapsible.variants.d.ts +11 -40
- package/dist/primitives/Collapsible/collapsible.variants.js +7 -2
- package/dist/primitives/Collapsible/index.d.ts +16 -0
- package/dist/primitives/Combobox/combobox.variants.d.ts +24 -78
- package/dist/primitives/ConfirmDialog/index.d.ts +12 -0
- package/dist/primitives/Dialog/Dialog.svelte +23 -10
- package/dist/primitives/Dialog/dialog.variants.d.ts +15 -54
- package/dist/primitives/Drawer/Drawer.svelte +24 -11
- package/dist/primitives/Drawer/drawer.variants.d.ts +14 -49
- package/dist/primitives/Input/input.variants.d.ts +32 -139
- package/dist/primitives/Input/input.variants.js +12 -10
- package/dist/primitives/JourneyTimeline/journey-timeline.variants.d.ts +55 -197
- package/dist/primitives/JourneyTimeline/journey-timeline.variants.js +4 -1
- package/dist/primitives/Menu/MenuSubmenu.svelte +1 -0
- package/dist/primitives/Menu/menu.variants.d.ts +29 -93
- package/dist/primitives/Pagination/pagination.variants.d.ts +16 -54
- package/dist/primitives/Pagination/pagination.variants.js +16 -14
- package/dist/primitives/Popover/Popover.svelte +1 -1
- package/dist/primitives/Popover/popover.variants.d.ts +4 -2
- package/dist/primitives/Progress/progress.variants.d.ts +19 -83
- package/dist/primitives/Progress/progress.variants.js +2 -1
- package/dist/primitives/RadioGroup/radioGroup.variants.d.ts +28 -109
- package/dist/primitives/SegmentGroup/SegmentGroup.svelte +14 -6
- package/dist/primitives/SegmentGroup/segmentgroup.variants.d.ts +12 -53
- package/dist/primitives/SegmentGroup/segmentgroup.variants.js +10 -10
- package/dist/primitives/Select/Select.svelte +1 -1
- package/dist/primitives/Select/select.variants.d.ts +45 -134
- package/dist/primitives/Select/select.variants.js +6 -4
- package/dist/primitives/Separator/separator.variants.d.ts +4 -2
- package/dist/primitives/Sidebar/Sidebar.svelte +10 -15
- package/dist/primitives/Sidebar/sidebar.variants.d.ts +11 -29
- package/dist/primitives/Skeleton/skeleton.variants.d.ts +9 -36
- package/dist/primitives/Slider/slider.variants.d.ts +37 -136
- package/dist/primitives/Slider/slider.variants.js +8 -5
- package/dist/primitives/Spinner/spinner.variants.d.ts +38 -135
- package/dist/primitives/Stepper/stepper.variants.d.ts +32 -130
- package/dist/primitives/Tab/Tab.svelte +17 -6
- package/dist/primitives/Tab/tab.variants.d.ts +17 -78
- package/dist/primitives/Textarea/textarea.variants.d.ts +27 -112
- package/dist/primitives/Textarea/textarea.variants.js +12 -10
- package/dist/primitives/Toast/Toaster.svelte +16 -3
- package/dist/primitives/Toast/index.d.ts +9 -0
- package/dist/primitives/Toast/toast.variants.d.ts +22 -78
- package/dist/primitives/Toggle/toggle.variants.d.ts +17 -71
- package/dist/primitives/Toolbar/toolbar.variants.d.ts +9 -60
- package/dist/primitives/Tooltip/Tooltip.svelte +11 -0
- package/dist/primitives/Tooltip/index.d.ts +14 -0
- package/dist/primitives/Tooltip/tooltip.variants.d.ts +11 -50
- package/dist/primitives/Tooltip/tooltip.variants.js +7 -1
- package/dist/style/foundation.css +4 -1
- package/dist/style/interaction.css +40 -12
- package/dist/style/semantic.css +2 -2
- package/dist/style/themes/index.css +1 -1
- package/dist/system/attachments/ContextIsolation.svelte +2 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +5 -0
- package/dist/utils/overlay.d.ts +33 -4
- package/dist/utils/overlay.js +61 -18
- package/dist/utils/roving.d.ts +15 -0
- package/dist/utils/roving.js +44 -0
- package/dist/utils/use-floating-panel.svelte.d.ts +4 -1
- package/dist/utils/use-floating-panel.svelte.js +23 -1
- package/dist/utils/variants.d.ts +60 -16
- package/dist/utils/variants.js +424 -123
- package/package.json +9 -6
|
@@ -1,136 +1,40 @@
|
|
|
1
1
|
import { type SlotNames, type VariantProps } from '../../utils/variants.js';
|
|
2
|
-
export declare const avatarVariants: (props?:
|
|
3
|
-
size
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
base: string;
|
|
14
|
-
status: string;
|
|
15
|
-
};
|
|
16
|
-
lg: {
|
|
17
|
-
base: string;
|
|
18
|
-
status: string;
|
|
19
|
-
};
|
|
20
|
-
xl: {
|
|
21
|
-
base: string;
|
|
22
|
-
status: string;
|
|
23
|
-
};
|
|
24
|
-
'2xl': {
|
|
25
|
-
base: string;
|
|
26
|
-
status: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
variant: {
|
|
30
|
-
circle: {
|
|
31
|
-
base: string;
|
|
32
|
-
image: string;
|
|
33
|
-
};
|
|
34
|
-
rounded: {
|
|
35
|
-
base: string;
|
|
36
|
-
image: string;
|
|
37
|
-
};
|
|
38
|
-
square: {
|
|
39
|
-
base: string;
|
|
40
|
-
image: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
intent: {
|
|
44
|
-
primary: {
|
|
45
|
-
base: string;
|
|
46
|
-
};
|
|
47
|
-
secondary: {
|
|
48
|
-
base: string;
|
|
49
|
-
};
|
|
50
|
-
success: {
|
|
51
|
-
base: string;
|
|
52
|
-
};
|
|
53
|
-
warning: {
|
|
54
|
-
base: string;
|
|
55
|
-
};
|
|
56
|
-
danger: {
|
|
57
|
-
base: string;
|
|
58
|
-
};
|
|
59
|
-
neutral: {
|
|
60
|
-
base: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
status: {
|
|
64
|
-
online: {
|
|
65
|
-
status: string;
|
|
66
|
-
};
|
|
67
|
-
offline: {
|
|
68
|
-
status: string;
|
|
69
|
-
};
|
|
70
|
-
away: {
|
|
71
|
-
status: string;
|
|
72
|
-
};
|
|
73
|
-
busy: {
|
|
74
|
-
status: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
statusPosition: {
|
|
78
|
-
'bottom-right': {
|
|
79
|
-
status: string;
|
|
80
|
-
};
|
|
81
|
-
'top-right': {
|
|
82
|
-
status: string;
|
|
83
|
-
};
|
|
84
|
-
'bottom-left': {
|
|
85
|
-
status: string;
|
|
86
|
-
};
|
|
87
|
-
'top-left': {
|
|
88
|
-
status: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
ring: {
|
|
92
|
-
true: {
|
|
93
|
-
base: string;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
ringIntent: {
|
|
97
|
-
primary: {
|
|
98
|
-
base: string;
|
|
99
|
-
};
|
|
100
|
-
secondary: {
|
|
101
|
-
base: string;
|
|
102
|
-
};
|
|
103
|
-
success: {
|
|
104
|
-
base: string;
|
|
105
|
-
};
|
|
106
|
-
warning: {
|
|
107
|
-
base: string;
|
|
108
|
-
};
|
|
109
|
-
danger: {
|
|
110
|
-
base: string;
|
|
111
|
-
};
|
|
112
|
-
neutral: {
|
|
113
|
-
base: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
interactive: {
|
|
117
|
-
true: {
|
|
118
|
-
base: string[];
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
}> | undefined) => {
|
|
2
|
+
export declare const avatarVariants: ((props?: {
|
|
3
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined;
|
|
4
|
+
variant?: "rounded" | "circle" | "square" | undefined;
|
|
5
|
+
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
6
|
+
status?: "offline" | "online" | "away" | "busy" | undefined;
|
|
7
|
+
statusPosition?: "bottom-right" | "top-right" | "bottom-left" | "top-left" | undefined;
|
|
8
|
+
pulse?: boolean | undefined;
|
|
9
|
+
ring?: boolean | undefined;
|
|
10
|
+
ringIntent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
11
|
+
interactive?: boolean | undefined;
|
|
12
|
+
} | undefined) => {
|
|
122
13
|
base: (props?: ({
|
|
123
14
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined;
|
|
124
15
|
variant?: "rounded" | "circle" | "square" | undefined;
|
|
125
16
|
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
126
17
|
status?: "offline" | "online" | "away" | "busy" | undefined;
|
|
127
18
|
statusPosition?: "bottom-right" | "top-right" | "bottom-left" | "top-left" | undefined;
|
|
19
|
+
pulse?: boolean | undefined;
|
|
128
20
|
ring?: boolean | undefined;
|
|
129
21
|
ringIntent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
130
22
|
interactive?: boolean | undefined;
|
|
131
23
|
} & {
|
|
132
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
133
|
-
|
|
24
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
25
|
+
}) | undefined) => string;
|
|
26
|
+
frame: (props?: ({
|
|
27
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined;
|
|
28
|
+
variant?: "rounded" | "circle" | "square" | undefined;
|
|
29
|
+
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
30
|
+
status?: "offline" | "online" | "away" | "busy" | undefined;
|
|
31
|
+
statusPosition?: "bottom-right" | "top-right" | "bottom-left" | "top-left" | undefined;
|
|
32
|
+
pulse?: boolean | undefined;
|
|
33
|
+
ring?: boolean | undefined;
|
|
34
|
+
ringIntent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
35
|
+
interactive?: boolean | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
134
38
|
}) | undefined) => string;
|
|
135
39
|
image: (props?: ({
|
|
136
40
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined;
|
|
@@ -138,12 +42,12 @@ export declare const avatarVariants: (props?: import("../../utils/variants.js").
|
|
|
138
42
|
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
139
43
|
status?: "offline" | "online" | "away" | "busy" | undefined;
|
|
140
44
|
statusPosition?: "bottom-right" | "top-right" | "bottom-left" | "top-left" | undefined;
|
|
45
|
+
pulse?: boolean | undefined;
|
|
141
46
|
ring?: boolean | undefined;
|
|
142
47
|
ringIntent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
143
48
|
interactive?: boolean | undefined;
|
|
144
49
|
} & {
|
|
145
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
146
|
-
className?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
50
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
147
51
|
}) | undefined) => string;
|
|
148
52
|
fallback: (props?: ({
|
|
149
53
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined;
|
|
@@ -151,12 +55,12 @@ export declare const avatarVariants: (props?: import("../../utils/variants.js").
|
|
|
151
55
|
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
152
56
|
status?: "offline" | "online" | "away" | "busy" | undefined;
|
|
153
57
|
statusPosition?: "bottom-right" | "top-right" | "bottom-left" | "top-left" | undefined;
|
|
58
|
+
pulse?: boolean | undefined;
|
|
154
59
|
ring?: boolean | undefined;
|
|
155
60
|
ringIntent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
156
61
|
interactive?: boolean | undefined;
|
|
157
62
|
} & {
|
|
158
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
159
|
-
className?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
63
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
160
64
|
}) | undefined) => string;
|
|
161
65
|
status: (props?: ({
|
|
162
66
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined;
|
|
@@ -164,13 +68,15 @@ export declare const avatarVariants: (props?: import("../../utils/variants.js").
|
|
|
164
68
|
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
165
69
|
status?: "offline" | "online" | "away" | "busy" | undefined;
|
|
166
70
|
statusPosition?: "bottom-right" | "top-right" | "bottom-left" | "top-left" | undefined;
|
|
71
|
+
pulse?: boolean | undefined;
|
|
167
72
|
ring?: boolean | undefined;
|
|
168
73
|
ringIntent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
169
74
|
interactive?: boolean | undefined;
|
|
170
75
|
} & {
|
|
171
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
172
|
-
className?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
76
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
173
77
|
}) | undefined) => string;
|
|
78
|
+
}) & {
|
|
79
|
+
readonly config: import("../../utils/variants.js").TVConfig;
|
|
174
80
|
};
|
|
175
81
|
export type AvatarVariants = VariantProps<typeof avatarVariants>;
|
|
176
82
|
/** Slot names derived from the tv() config — single source of truth for slotClasses. */
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { tv } from '../../utils/variants.js';
|
|
2
2
|
export const avatarVariants = tv({
|
|
3
3
|
slots: {
|
|
4
|
+
// Outer positioning context. Carries sizing, the ring, interactive/mint
|
|
5
|
+
// effects — but NOT `overflow-hidden`, so the status dot (a sibling of
|
|
6
|
+
// `frame`) is never clipped (AVT-1). The radius is mirrored here purely so
|
|
7
|
+
// the ring follows the avatar's shape.
|
|
4
8
|
base: [
|
|
5
|
-
'relative inline-flex
|
|
6
|
-
'
|
|
7
|
-
|
|
9
|
+
'relative inline-flex shrink-0',
|
|
10
|
+
'transition-[color,background-color,border-color,box-shadow,opacity] duration-[var(--blocks-duration-fast)] ease-out'
|
|
11
|
+
],
|
|
12
|
+
// The visible disc. This is the element that clips the image/initials to
|
|
13
|
+
// the avatar shape; the status dot lives outside it so it stays whole.
|
|
14
|
+
frame: [
|
|
15
|
+
'flex items-center justify-center w-full h-full overflow-hidden',
|
|
16
|
+
'font-semibold text-center select-none',
|
|
8
17
|
'bg-surface-interactive text-text-secondary'
|
|
9
18
|
],
|
|
10
19
|
image: ['w-full h-full object-cover'],
|
|
@@ -42,61 +51,68 @@ export const avatarVariants = tv({
|
|
|
42
51
|
// people and stand apart from the commit/modify/contain semantic system —
|
|
43
52
|
// a brand that flattens commit-tier surfaces (e.g. squared pill-buttons)
|
|
44
53
|
// should not also lose circular avatars. The radii below are physical
|
|
45
|
-
// shape tokens, not tier tokens.
|
|
54
|
+
// shape tokens, not tier tokens. `frame` clips the content to the shape;
|
|
55
|
+
// `base` mirrors it so the ring tracks the same silhouette.
|
|
46
56
|
variant: {
|
|
47
57
|
circle: {
|
|
48
58
|
base: 'rounded-full',
|
|
59
|
+
frame: 'rounded-full',
|
|
49
60
|
image: 'rounded-full'
|
|
50
61
|
},
|
|
51
62
|
rounded: {
|
|
52
63
|
// Avatar-specific soft-square. Maps to --radius-xl (foundation scale);
|
|
53
64
|
// brands tune via the foundation token, not via a tier override.
|
|
54
65
|
base: 'rounded-xl',
|
|
66
|
+
frame: 'rounded-xl',
|
|
55
67
|
image: 'rounded-xl'
|
|
56
68
|
},
|
|
57
69
|
square: {
|
|
58
70
|
base: 'rounded-none',
|
|
71
|
+
frame: 'rounded-none',
|
|
59
72
|
image: 'rounded-none'
|
|
60
73
|
}
|
|
61
74
|
},
|
|
62
75
|
intent: {
|
|
63
76
|
primary: {
|
|
64
|
-
|
|
77
|
+
frame: 'bg-primary-subtle text-primary-emphasis'
|
|
65
78
|
},
|
|
66
79
|
secondary: {
|
|
67
|
-
|
|
80
|
+
frame: 'bg-secondary-subtle text-secondary-emphasis'
|
|
68
81
|
},
|
|
69
82
|
success: {
|
|
70
|
-
|
|
83
|
+
frame: 'bg-success-subtle text-success-emphasis'
|
|
71
84
|
},
|
|
72
85
|
warning: {
|
|
73
|
-
|
|
86
|
+
frame: 'bg-warning-subtle text-warning-emphasis'
|
|
74
87
|
},
|
|
75
88
|
danger: {
|
|
76
|
-
|
|
89
|
+
frame: 'bg-danger-subtle text-danger-emphasis'
|
|
77
90
|
},
|
|
78
91
|
neutral: {
|
|
79
|
-
|
|
92
|
+
frame: 'bg-surface-interactive text-text-secondary'
|
|
80
93
|
}
|
|
81
94
|
},
|
|
95
|
+
// Each status also publishes its colour as `--blocks-avatar-pulse-color`
|
|
96
|
+
// so the opt-in `pulse` ring (see Avatar.svelte) radiates in the matching
|
|
97
|
+
// hue without a second colour source.
|
|
82
98
|
status: {
|
|
83
99
|
online: {
|
|
84
|
-
status: 'bg-success'
|
|
100
|
+
status: 'bg-success [--blocks-avatar-pulse-color:var(--color-success)]'
|
|
85
101
|
},
|
|
86
102
|
offline: {
|
|
87
|
-
status: 'bg-text-quaternary'
|
|
103
|
+
status: 'bg-text-quaternary [--blocks-avatar-pulse-color:var(--color-text-quaternary)]'
|
|
88
104
|
},
|
|
89
105
|
away: {
|
|
90
|
-
status: 'bg-warning'
|
|
106
|
+
status: 'bg-warning [--blocks-avatar-pulse-color:var(--color-warning)]'
|
|
91
107
|
},
|
|
92
108
|
busy: {
|
|
93
|
-
status: 'bg-danger'
|
|
109
|
+
status: 'bg-danger [--blocks-avatar-pulse-color:var(--color-danger)]'
|
|
94
110
|
}
|
|
95
111
|
},
|
|
96
|
-
// Status dot is translated out of the avatar's
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
112
|
+
// Status dot is translated out of the avatar's edge so it half-overlaps the
|
|
113
|
+
// corner (AVT-1). Translation magnitude is intentionally fractional — the
|
|
114
|
+
// dot sits half-overlapping the edge, which matches the conventional badge
|
|
115
|
+
// look (Slack, Discord, Linear).
|
|
100
116
|
statusPosition: {
|
|
101
117
|
'bottom-right': {
|
|
102
118
|
status: 'bottom-0 right-0 translate-x-1/4 translate-y-1/4'
|
|
@@ -111,6 +127,14 @@ export const avatarVariants = tv({
|
|
|
111
127
|
status: 'top-0 left-0 -translate-x-1/4 -translate-y-1/4'
|
|
112
128
|
}
|
|
113
129
|
},
|
|
130
|
+
// Opt-in "live" pulse on the status dot — a radar ring that draws the eye to
|
|
131
|
+
// presence changes. Only has a visible effect together with `status`; the
|
|
132
|
+
// animation itself + reduced-motion handling live in Avatar.svelte.
|
|
133
|
+
pulse: {
|
|
134
|
+
true: {
|
|
135
|
+
status: 'blocks-avatar-status-pulse'
|
|
136
|
+
}
|
|
137
|
+
},
|
|
114
138
|
ring: {
|
|
115
139
|
true: {
|
|
116
140
|
base: 'ring-2 ring-offset-2 ring-offset-surface-base'
|
|
@@ -184,6 +208,7 @@ export const avatarVariants = tv({
|
|
|
184
208
|
variant: 'circle',
|
|
185
209
|
intent: 'neutral',
|
|
186
210
|
statusPosition: 'bottom-right',
|
|
211
|
+
pulse: false,
|
|
187
212
|
ring: false,
|
|
188
213
|
ringIntent: 'primary',
|
|
189
214
|
interactive: false
|
|
@@ -17,6 +17,11 @@ import type { AvatarSlots, AvatarVariants } from './avatar.variants.js';
|
|
|
17
17
|
* ```svelte
|
|
18
18
|
* <Avatar name="Jane Smith" randomColor clickable onclick={() => showProfile()} />
|
|
19
19
|
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```svelte
|
|
23
|
+
* <Avatar name="Ada Lovelace" status="online" pulse />
|
|
24
|
+
* ```
|
|
20
25
|
*/
|
|
21
26
|
export interface AvatarProps extends AvatarVariants, Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
22
27
|
/** Image URL. Falls back to initials or `children` when empty or on load error. */
|
|
@@ -43,7 +48,7 @@ export interface AvatarProps extends AvatarVariants, Omit<HTMLAttributes<HTMLDiv
|
|
|
43
48
|
class?: string;
|
|
44
49
|
/** Remove all default tv classes. */
|
|
45
50
|
unstyled?: boolean;
|
|
46
|
-
/** Per-slot class overrides merged with tv styles. Slots: base | image | fallback | status */
|
|
51
|
+
/** Per-slot class overrides merged with tv styles. Slots: base | frame | image | fallback | status */
|
|
47
52
|
slotClasses?: Partial<Record<AvatarSlots, string>>;
|
|
48
53
|
/**
|
|
49
54
|
* Apply a named preset registered via `<BlocksProvider presets={{ Avatar: {...} }}>`.
|
|
@@ -1,89 +1,18 @@
|
|
|
1
1
|
import { type SlotNames, type VariantProps } from '../../utils/variants.js';
|
|
2
2
|
export declare const PLACEMENT_VALUES: readonly ["top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "left", "right"];
|
|
3
|
-
export declare const badgeVariants: (props?:
|
|
4
|
-
tier
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
warning: {};
|
|
17
|
-
danger: {};
|
|
18
|
-
neutral: {};
|
|
19
|
-
};
|
|
20
|
-
variant: {
|
|
21
|
-
filled: {};
|
|
22
|
-
outlined: {
|
|
23
|
-
base: string;
|
|
24
|
-
};
|
|
25
|
-
soft: {
|
|
26
|
-
base: string;
|
|
27
|
-
};
|
|
28
|
-
dot: {
|
|
29
|
-
base: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
size: {
|
|
33
|
-
xs: {
|
|
34
|
-
base: string;
|
|
35
|
-
};
|
|
36
|
-
sm: {
|
|
37
|
-
base: string;
|
|
38
|
-
};
|
|
39
|
-
md: {
|
|
40
|
-
base: string;
|
|
41
|
-
};
|
|
42
|
-
lg: {
|
|
43
|
-
base: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
placement: {
|
|
47
|
-
top: string;
|
|
48
|
-
'top-start': string;
|
|
49
|
-
'top-end': string;
|
|
50
|
-
bottom: string;
|
|
51
|
-
'bottom-start': string;
|
|
52
|
-
'bottom-end': string;
|
|
53
|
-
left: string;
|
|
54
|
-
right: string;
|
|
55
|
-
};
|
|
56
|
-
counter: {
|
|
57
|
-
true: {
|
|
58
|
-
base: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
pulse: {
|
|
62
|
-
true: {
|
|
63
|
-
base: string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
removable: {
|
|
67
|
-
true: {
|
|
68
|
-
base: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
interactive: {
|
|
72
|
-
true: {
|
|
73
|
-
base: string;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
disabled: {
|
|
77
|
-
true: {
|
|
78
|
-
base: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
border: {
|
|
82
|
-
true: {
|
|
83
|
-
base: string;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
}> | undefined) => {
|
|
3
|
+
export declare const badgeVariants: ((props?: {
|
|
4
|
+
tier?: "commit" | "modify" | undefined;
|
|
5
|
+
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
6
|
+
variant?: "dot" | "filled" | "outlined" | "soft" | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
8
|
+
placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | undefined;
|
|
9
|
+
counter?: boolean | undefined;
|
|
10
|
+
pulse?: boolean | undefined;
|
|
11
|
+
removable?: boolean | undefined;
|
|
12
|
+
interactive?: boolean | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
border?: boolean | undefined;
|
|
15
|
+
} | undefined) => {
|
|
87
16
|
base: (props?: ({
|
|
88
17
|
tier?: "commit" | "modify" | undefined;
|
|
89
18
|
intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
@@ -97,8 +26,7 @@ export declare const badgeVariants: (props?: import("../../utils/variants.js").T
|
|
|
97
26
|
disabled?: boolean | undefined;
|
|
98
27
|
border?: boolean | undefined;
|
|
99
28
|
} & {
|
|
100
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
101
|
-
className?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
29
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
102
30
|
}) | undefined) => string;
|
|
103
31
|
content: (props?: ({
|
|
104
32
|
tier?: "commit" | "modify" | undefined;
|
|
@@ -113,8 +41,7 @@ export declare const badgeVariants: (props?: import("../../utils/variants.js").T
|
|
|
113
41
|
disabled?: boolean | undefined;
|
|
114
42
|
border?: boolean | undefined;
|
|
115
43
|
} & {
|
|
116
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
117
|
-
className?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
44
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
118
45
|
}) | undefined) => string;
|
|
119
46
|
removeButton: (props?: ({
|
|
120
47
|
tier?: "commit" | "modify" | undefined;
|
|
@@ -129,8 +56,7 @@ export declare const badgeVariants: (props?: import("../../utils/variants.js").T
|
|
|
129
56
|
disabled?: boolean | undefined;
|
|
130
57
|
border?: boolean | undefined;
|
|
131
58
|
} & {
|
|
132
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
133
|
-
className?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
59
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
134
60
|
}) | undefined) => string;
|
|
135
61
|
removeIcon: (props?: ({
|
|
136
62
|
tier?: "commit" | "modify" | undefined;
|
|
@@ -145,9 +71,10 @@ export declare const badgeVariants: (props?: import("../../utils/variants.js").T
|
|
|
145
71
|
disabled?: boolean | undefined;
|
|
146
72
|
border?: boolean | undefined;
|
|
147
73
|
} & {
|
|
148
|
-
class?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
149
|
-
className?: string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | (string | false | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
74
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
150
75
|
}) | undefined) => string;
|
|
76
|
+
}) & {
|
|
77
|
+
readonly config: import("../../utils/variants.js").TVConfig;
|
|
151
78
|
};
|
|
152
79
|
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
153
80
|
/** Slot names derived from the tv() config — single source of truth for slotClasses. */
|
|
@@ -53,7 +53,9 @@ export const badgeVariants = tv({
|
|
|
53
53
|
base: 'bg-transparent border-2'
|
|
54
54
|
},
|
|
55
55
|
soft: {
|
|
56
|
-
|
|
56
|
+
// No bg here: every intent×soft compound supplies its bg-*-subtle,
|
|
57
|
+
// so an axis-level bg-transparent could never win the fold.
|
|
58
|
+
base: 'border-transparent'
|
|
57
59
|
},
|
|
58
60
|
dot: {
|
|
59
61
|
base: '!p-0 rounded-commit border-none'
|
|
@@ -98,10 +100,11 @@ export const badgeVariants = tv({
|
|
|
98
100
|
base: 'animate-[badge-pulse_2s_cubic-bezier(0.4,0,0.6,1)_infinite]'
|
|
99
101
|
}
|
|
100
102
|
},
|
|
103
|
+
// The removable right-padding lives in compoundVariants (after the
|
|
104
|
+
// counter px-* compounds) — a later px-* shorthand would dominate an
|
|
105
|
+
// axis-level pr-2, and the ✕ button needs its room in counter badges.
|
|
101
106
|
removable: {
|
|
102
|
-
true: {
|
|
103
|
-
base: 'pr-2'
|
|
104
|
-
}
|
|
107
|
+
true: {}
|
|
105
108
|
},
|
|
106
109
|
interactive: {
|
|
107
110
|
true: {
|
|
@@ -131,6 +134,10 @@ export const badgeVariants = tv({
|
|
|
131
134
|
{ counter: true, size: 'sm', class: { base: 'min-w-5 px-1.5' } },
|
|
132
135
|
{ counter: true, size: 'md', class: { base: 'min-w-6 px-1.5' } },
|
|
133
136
|
{ counter: true, size: 'lg', class: { base: 'min-w-7 px-2' } },
|
|
137
|
+
// Removable ✕ needs right-hand room. Placed after the counter compounds
|
|
138
|
+
// so the pr-2 longhand refines their px-* (longhands never get
|
|
139
|
+
// dominance-stripped by an EARLIER shorthand — later sources win).
|
|
140
|
+
{ removable: true, class: { base: 'pr-2' } },
|
|
134
141
|
// Dot size overrides
|
|
135
142
|
{
|
|
136
143
|
variant: 'dot',
|