@xingxingmofashu/ui 0.2.0 → 0.3.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/README.md +17 -6
- package/dist/components/accordion.d.ts +5 -5
- package/dist/components/accordion.mjs +2 -2
- package/dist/components/alert-dialog.d.ts +3 -1
- package/dist/components/alert-dialog.mjs +3 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/card.d.ts +1 -1
- package/dist/components/checkbox-group.d.ts +8 -8
- package/dist/components/checkbox-group.mjs +3 -3
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/dialog.d.ts +3 -1
- package/dist/components/dialog.mjs +3 -1
- package/dist/components/drawer.d.ts +4 -2
- package/dist/components/drawer.mjs +3 -1
- package/dist/components/field.d.ts +1 -1
- package/dist/components/fieldset.d.ts +1 -1
- package/dist/components/form.d.ts +1 -1
- package/dist/components/input.d.ts +3 -1
- package/dist/components/input.mjs +3 -1
- package/dist/components/menu.d.ts +10 -8
- package/dist/components/menu.mjs +6 -4
- package/dist/components/popover.d.ts +3 -1
- package/dist/components/popover.mjs +3 -1
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/radio-group.d.ts +3 -3
- package/dist/components/radio-group.mjs +2 -2
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/select.d.ts +25 -13
- package/dist/components/select.mjs +130 -118
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.mjs +22 -69
- package/dist/components/tabs.d.ts +9 -9
- package/dist/components/tabs.mjs +4 -4
- package/dist/components/toggle-group.d.ts +3 -3
- package/dist/components/toggle.d.ts +2 -2
- package/dist/components/tooltip.d.ts +3 -1
- package/dist/components/tooltip.mjs +3 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/theme/accordion.mjs +4 -1
- package/dist/theme/select.d.ts +2 -0
- package/dist/theme/select.mjs +2 -0
- package/dist/theme/switch.d.ts +5 -5
- package/dist/theme/switch.mjs +23 -49
- package/package.json +2 -3
|
@@ -15,9 +15,7 @@ function Select({
|
|
|
15
15
|
label,
|
|
16
16
|
description,
|
|
17
17
|
placeholder,
|
|
18
|
-
|
|
19
|
-
defaultValue,
|
|
20
|
-
onValueChange,
|
|
18
|
+
renderValue,
|
|
21
19
|
side,
|
|
22
20
|
align,
|
|
23
21
|
sideOffset = 6,
|
|
@@ -28,6 +26,7 @@ function Select({
|
|
|
28
26
|
"aria-label": ariaLabel,
|
|
29
27
|
"aria-labelledby": ariaLabelledBy,
|
|
30
28
|
"aria-describedby": ariaDescribedBy,
|
|
29
|
+
style,
|
|
31
30
|
...props
|
|
32
31
|
}) {
|
|
33
32
|
const styles = theme({ size });
|
|
@@ -42,156 +41,169 @@ function Select({
|
|
|
42
41
|
...ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : {},
|
|
43
42
|
...describedBy ? { "aria-describedby": describedBy } : {}
|
|
44
43
|
};
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const flatItems = items.flatMap(
|
|
45
|
+
(entry) => "items" in entry ? entry.items : [entry]
|
|
46
|
+
);
|
|
47
|
+
function renderItem(item, key) {
|
|
48
|
+
return /* @__PURE__ */ React.createElement(
|
|
49
|
+
UISelect.Item,
|
|
50
|
+
{
|
|
51
|
+
key,
|
|
52
|
+
value: item.value,
|
|
53
|
+
disabled: item.disabled,
|
|
54
|
+
label: item.textValue ?? (typeof item.label === "string" ? item.label : void 0),
|
|
55
|
+
"data-slot": "item",
|
|
56
|
+
className: cn(styles.item(), ui?.item)
|
|
57
|
+
},
|
|
58
|
+
/* @__PURE__ */ React.createElement(
|
|
59
|
+
UISelect.ItemIndicator,
|
|
60
|
+
{
|
|
61
|
+
keepMounted: true,
|
|
62
|
+
"data-slot": "item-indicator",
|
|
63
|
+
className: cn(styles.itemIndicator(), ui?.itemIndicator)
|
|
64
|
+
},
|
|
65
|
+
/* @__PURE__ */ React.createElement(CheckIcon, null)
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ React.createElement(
|
|
68
|
+
UISelect.ItemText,
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "item-text",
|
|
71
|
+
className: cn(styles.itemText(), ui?.itemText)
|
|
72
|
+
},
|
|
73
|
+
item.label
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ React.createElement(UISelect.Root, { ...props, items: flatItems, disabled: fieldsetDisabled }, /* @__PURE__ */ React.createElement(
|
|
78
|
+
"div",
|
|
47
79
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
onValueChange,
|
|
53
|
-
disabled: fieldsetDisabled
|
|
80
|
+
"data-slot": "root",
|
|
81
|
+
"data-disabled": fieldsetDisabled || void 0,
|
|
82
|
+
className: cn(styles.root(), ui?.root, className),
|
|
83
|
+
style
|
|
54
84
|
},
|
|
85
|
+
label ? /* @__PURE__ */ React.createElement(
|
|
86
|
+
UISelect.Label,
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "label",
|
|
89
|
+
className: cn(styles.label(), ui?.label)
|
|
90
|
+
},
|
|
91
|
+
label
|
|
92
|
+
) : null,
|
|
55
93
|
/* @__PURE__ */ React.createElement(
|
|
56
|
-
|
|
94
|
+
UISelect.Trigger,
|
|
57
95
|
{
|
|
58
|
-
"data-slot": "
|
|
59
|
-
|
|
60
|
-
|
|
96
|
+
"data-slot": "trigger",
|
|
97
|
+
...triggerAriaProps,
|
|
98
|
+
disabled: fieldsetDisabled,
|
|
99
|
+
className: cn(styles.trigger(), ui?.trigger)
|
|
61
100
|
},
|
|
62
|
-
label ? /* @__PURE__ */ React.createElement(
|
|
63
|
-
UISelect.Label,
|
|
64
|
-
{
|
|
65
|
-
"data-slot": "label",
|
|
66
|
-
className: cn(styles.label(), ui?.label)
|
|
67
|
-
},
|
|
68
|
-
label
|
|
69
|
-
) : null,
|
|
70
101
|
/* @__PURE__ */ React.createElement(
|
|
71
|
-
|
|
102
|
+
"span",
|
|
72
103
|
{
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
className: cn(styles.trigger(), ui?.trigger)
|
|
104
|
+
"aria-hidden": "true",
|
|
105
|
+
"data-slot": "glass",
|
|
106
|
+
className: cn(styles.glass(), ui?.glass)
|
|
77
107
|
},
|
|
78
108
|
/* @__PURE__ */ React.createElement(
|
|
79
109
|
"span",
|
|
80
110
|
{
|
|
81
111
|
"aria-hidden": "true",
|
|
82
|
-
"data-slot": "
|
|
83
|
-
className: cn(styles.
|
|
84
|
-
},
|
|
85
|
-
/* @__PURE__ */ React.createElement(
|
|
86
|
-
"span",
|
|
87
|
-
{
|
|
88
|
-
"aria-hidden": "true",
|
|
89
|
-
"data-slot": "overlay",
|
|
90
|
-
className: cn(styles.overlay(), ui?.overlay)
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
),
|
|
94
|
-
/* @__PURE__ */ React.createElement(
|
|
95
|
-
UISelect.Value,
|
|
96
|
-
{
|
|
97
|
-
"data-slot": "value",
|
|
98
|
-
placeholder,
|
|
99
|
-
className: cn(styles.value(), ui?.value)
|
|
112
|
+
"data-slot": "overlay",
|
|
113
|
+
className: cn(styles.overlay(), ui?.overlay)
|
|
100
114
|
}
|
|
101
|
-
),
|
|
102
|
-
/* @__PURE__ */ React.createElement(
|
|
103
|
-
UISelect.Icon,
|
|
104
|
-
{
|
|
105
|
-
"data-slot": "icon",
|
|
106
|
-
className: cn(styles.icon(), ui?.icon)
|
|
107
|
-
},
|
|
108
|
-
/* @__PURE__ */ React.createElement(ChevronDownIcon, null)
|
|
109
115
|
)
|
|
110
116
|
),
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
/* @__PURE__ */ React.createElement(
|
|
118
|
+
UISelect.Value,
|
|
113
119
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
className: cn(styles.
|
|
120
|
+
"data-slot": "value",
|
|
121
|
+
placeholder,
|
|
122
|
+
className: cn(styles.value(), ui?.value)
|
|
117
123
|
},
|
|
118
|
-
|
|
119
|
-
)
|
|
124
|
+
renderValue
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ React.createElement(
|
|
127
|
+
UISelect.Icon,
|
|
128
|
+
{
|
|
129
|
+
"data-slot": "icon",
|
|
130
|
+
className: cn(styles.icon(), ui?.icon)
|
|
131
|
+
},
|
|
132
|
+
/* @__PURE__ */ React.createElement(ChevronDownIcon, null)
|
|
133
|
+
)
|
|
120
134
|
),
|
|
121
|
-
|
|
122
|
-
|
|
135
|
+
description ? /* @__PURE__ */ React.createElement(
|
|
136
|
+
"span",
|
|
137
|
+
{
|
|
138
|
+
id: descriptionId,
|
|
139
|
+
"data-slot": "description",
|
|
140
|
+
className: cn(styles.description(), ui?.description)
|
|
141
|
+
},
|
|
142
|
+
description
|
|
143
|
+
) : null
|
|
144
|
+
), /* @__PURE__ */ React.createElement(UISelect.Portal, null, /* @__PURE__ */ React.createElement(
|
|
145
|
+
UISelect.Positioner,
|
|
146
|
+
{
|
|
147
|
+
"data-slot": "positioner",
|
|
148
|
+
side,
|
|
149
|
+
align,
|
|
150
|
+
sideOffset,
|
|
151
|
+
alignOffset,
|
|
152
|
+
collisionPadding,
|
|
153
|
+
alignItemWithTrigger,
|
|
154
|
+
className: cn(styles.positioner(), ui?.positioner)
|
|
155
|
+
},
|
|
156
|
+
/* @__PURE__ */ React.createElement(
|
|
157
|
+
UISelect.Popup,
|
|
123
158
|
{
|
|
124
|
-
"data-slot": "
|
|
125
|
-
|
|
126
|
-
align,
|
|
127
|
-
sideOffset,
|
|
128
|
-
alignOffset,
|
|
129
|
-
collisionPadding,
|
|
130
|
-
alignItemWithTrigger,
|
|
131
|
-
className: cn(styles.positioner(), ui?.positioner)
|
|
159
|
+
"data-slot": "popup",
|
|
160
|
+
className: cn(styles.popup(), ui?.popup)
|
|
132
161
|
},
|
|
133
162
|
/* @__PURE__ */ React.createElement(
|
|
134
|
-
|
|
163
|
+
"span",
|
|
135
164
|
{
|
|
136
|
-
"
|
|
137
|
-
|
|
165
|
+
"aria-hidden": "true",
|
|
166
|
+
"data-slot": "popup-glass",
|
|
167
|
+
className: cn(styles.popupGlass(), ui?.popupGlass)
|
|
138
168
|
},
|
|
139
169
|
/* @__PURE__ */ React.createElement(
|
|
140
170
|
"span",
|
|
141
171
|
{
|
|
142
172
|
"aria-hidden": "true",
|
|
143
|
-
"data-slot": "popup-
|
|
144
|
-
className: cn(styles.
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{
|
|
158
|
-
"data-slot": "list",
|
|
159
|
-
className: cn(styles.list(), ui?.list)
|
|
160
|
-
},
|
|
161
|
-
items.map((item) => /* @__PURE__ */ React.createElement(
|
|
162
|
-
UISelect.Item,
|
|
173
|
+
"data-slot": "popup-overlay",
|
|
174
|
+
className: cn(styles.popupOverlay(), ui?.popupOverlay)
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ React.createElement(
|
|
179
|
+
UISelect.List,
|
|
180
|
+
{
|
|
181
|
+
"data-slot": "list",
|
|
182
|
+
className: cn(styles.list(), ui?.list)
|
|
183
|
+
},
|
|
184
|
+
items.map(
|
|
185
|
+
(entry, index) => "items" in entry ? /* @__PURE__ */ React.createElement(
|
|
186
|
+
UISelect.Group,
|
|
163
187
|
{
|
|
164
|
-
key:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
label: item.textValue ?? (typeof item.label === "string" ? item.label : void 0),
|
|
168
|
-
"data-slot": "item",
|
|
169
|
-
className: cn(styles.item(), ui?.item)
|
|
188
|
+
key: `group-${index}`,
|
|
189
|
+
"data-slot": "group",
|
|
190
|
+
className: cn(styles.group(), ui?.group)
|
|
170
191
|
},
|
|
171
192
|
/* @__PURE__ */ React.createElement(
|
|
172
|
-
UISelect.
|
|
193
|
+
UISelect.GroupLabel,
|
|
173
194
|
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
className: cn(
|
|
177
|
-
styles.itemIndicator(),
|
|
178
|
-
ui?.itemIndicator
|
|
179
|
-
)
|
|
195
|
+
"data-slot": "group-label",
|
|
196
|
+
className: cn(styles.groupLabel(), ui?.groupLabel)
|
|
180
197
|
},
|
|
181
|
-
|
|
198
|
+
entry.label
|
|
182
199
|
),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
{
|
|
186
|
-
"data-slot": "item-text",
|
|
187
|
-
className: cn(styles.itemText(), ui?.itemText)
|
|
188
|
-
},
|
|
189
|
-
item.label
|
|
200
|
+
entry.items.map(
|
|
201
|
+
(item, itemIndex) => renderItem(item, itemIndex)
|
|
190
202
|
)
|
|
191
|
-
))
|
|
203
|
+
) : renderItem(entry, index)
|
|
192
204
|
)
|
|
193
205
|
)
|
|
194
|
-
)
|
|
195
|
-
);
|
|
206
|
+
)
|
|
207
|
+
)));
|
|
196
208
|
}
|
|
197
209
|
export { Select };
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { type ComponentConfig } from "../internal/tv";
|
|
4
4
|
import theme from "../theme/slider";
|
|
5
5
|
type Slider = ComponentConfig<typeof theme>;
|
|
6
|
-
type SliderProps<Value extends number | readonly number[] = number> = Omit<UISlider.Root.Props<Value>, "children" | "
|
|
6
|
+
type SliderProps<Value extends number | readonly number[] = number | readonly number[]> = Omit<UISlider.Root.Props<Value>, "children" | "className"> & Pick<UISlider.Thumb.Props, "getAriaLabel" | "getAriaValueText"> & {
|
|
7
7
|
/** Tailwind classes merged into the root. */
|
|
8
8
|
className?: string;
|
|
9
9
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
@@ -14,6 +14,6 @@ type SliderProps<Value extends number | readonly number[] = number> = Omit<UISli
|
|
|
14
14
|
* both are forwarded from the root to every thumb. `aria-describedby` is also
|
|
15
15
|
* forwarded so supporting copy is announced with each thumb.
|
|
16
16
|
*/
|
|
17
|
-
declare function Slider<Value extends number | readonly number[]
|
|
17
|
+
declare function Slider<Value extends number | readonly number[]>({ className, ui, value, defaultValue, disabled, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, getAriaLabel, getAriaValueText, ...props }: SliderProps<Value>): React.JSX.Element;
|
|
18
18
|
export { Slider };
|
|
19
19
|
export type { SliderProps };
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/switch";
|
|
6
6
|
type Switch = ComponentConfig<typeof theme>;
|
|
7
|
-
interface SwitchProps extends Omit<UISwitch.Root.Props, "className" | "children" | "
|
|
7
|
+
interface SwitchProps extends Omit<UISwitch.Root.Props, "className" | "children" | "ref">, VariantProps<typeof theme> {
|
|
8
8
|
/** Ref to the rendered root element. */
|
|
9
9
|
ref?: React.Ref<HTMLElement>;
|
|
10
10
|
/** Tailwind classes merged into the Base UI switch root. */
|
|
@@ -5,48 +5,6 @@ import * as React from "react";
|
|
|
5
5
|
import { mergeIds } from "../internal/aria.mjs";
|
|
6
6
|
import { useFieldsetDisabled } from "../internal/fieldset.mjs";
|
|
7
7
|
import theme from "../theme/switch.mjs";
|
|
8
|
-
function LiquidGlassFilter({ id }) {
|
|
9
|
-
return /* @__PURE__ */ React.createElement("svg", { "aria-hidden": "true", focusable: "false", "data-layer": "filter" }, /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("filter", { id: `${id}-goo` }, /* @__PURE__ */ React.createElement(
|
|
10
|
-
"feGaussianBlur",
|
|
11
|
-
{
|
|
12
|
-
in: "SourceGraphic",
|
|
13
|
-
stdDeviation: "2",
|
|
14
|
-
result: "blur"
|
|
15
|
-
}
|
|
16
|
-
), /* @__PURE__ */ React.createElement(
|
|
17
|
-
"feColorMatrix",
|
|
18
|
-
{
|
|
19
|
-
in: "blur",
|
|
20
|
-
values: "1 0 0 0 0\n 0 1 0 0 0\n 0 0 1 0 0\n 0 0 0 16 -10",
|
|
21
|
-
type: "matrix",
|
|
22
|
-
result: "matrix"
|
|
23
|
-
}
|
|
24
|
-
), /* @__PURE__ */ React.createElement("feComposite", { in: "matrix", operator: "atop", result: "goo" })), /* @__PURE__ */ React.createElement(
|
|
25
|
-
"filter",
|
|
26
|
-
{
|
|
27
|
-
id: `${id}-remove-black`,
|
|
28
|
-
colorInterpolationFilters: "sRGB"
|
|
29
|
-
},
|
|
30
|
-
/* @__PURE__ */ React.createElement(
|
|
31
|
-
"feColorMatrix",
|
|
32
|
-
{
|
|
33
|
-
type: "matrix",
|
|
34
|
-
values: "1 0 0 0 0\n 0 1 0 0 0\n 0 0 1 0 0\n -255 -255 -255 0 1",
|
|
35
|
-
result: "black-pixels"
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
/* @__PURE__ */ React.createElement(
|
|
39
|
-
"feMorphology",
|
|
40
|
-
{
|
|
41
|
-
in: "black-pixels",
|
|
42
|
-
operator: "dilate",
|
|
43
|
-
radius: "0.5",
|
|
44
|
-
result: "smoothed"
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
/* @__PURE__ */ React.createElement("feComposite", { in: "SourceGraphic", in2: "smoothed", operator: "out" })
|
|
48
|
-
)));
|
|
49
|
-
}
|
|
50
8
|
function Switch({
|
|
51
9
|
className,
|
|
52
10
|
ui,
|
|
@@ -63,24 +21,32 @@ function Switch({
|
|
|
63
21
|
}) {
|
|
64
22
|
const styles = theme({ size });
|
|
65
23
|
const fieldsetDisabled = useFieldsetDisabled(disabled);
|
|
66
|
-
const filterId = React.useId();
|
|
67
24
|
const labelId = React.useId();
|
|
68
25
|
const descriptionId = React.useId();
|
|
26
|
+
const [animating, setAnimating] = React.useState(false);
|
|
27
|
+
const animationTimer = React.useRef(void 0);
|
|
69
28
|
const hasName = Boolean(label || ariaLabel || ariaLabelledBy);
|
|
70
29
|
const labelledBy = ariaLabelledBy || (label && !ariaLabel ? labelId : void 0);
|
|
71
30
|
const describedBy = mergeIds(
|
|
72
31
|
ariaDescribedBy,
|
|
73
32
|
description && hasName ? descriptionId : void 0
|
|
74
33
|
);
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
34
|
+
const stopAnimating = () => {
|
|
35
|
+
clearTimeout(animationTimer.current);
|
|
36
|
+
setAnimating(false);
|
|
78
37
|
};
|
|
79
|
-
|
|
38
|
+
React.useEffect(
|
|
39
|
+
() => () => {
|
|
40
|
+
clearTimeout(animationTimer.current);
|
|
41
|
+
},
|
|
42
|
+
[]
|
|
43
|
+
);
|
|
80
44
|
const handleCheckedChange = (checked, details) => {
|
|
81
45
|
onCheckedChange?.(checked, details);
|
|
82
46
|
if (!details.isCanceled) {
|
|
83
47
|
setAnimating(true);
|
|
48
|
+
clearTimeout(animationTimer.current);
|
|
49
|
+
animationTimer.current = setTimeout(stopAnimating, 300);
|
|
84
50
|
}
|
|
85
51
|
};
|
|
86
52
|
const handleThumbTransitionEnd = (event) => {
|
|
@@ -88,7 +54,7 @@ function Switch({
|
|
|
88
54
|
return;
|
|
89
55
|
}
|
|
90
56
|
if (event.propertyName === "translate" || event.propertyName === "scale") {
|
|
91
|
-
|
|
57
|
+
stopAnimating();
|
|
92
58
|
}
|
|
93
59
|
};
|
|
94
60
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -111,28 +77,15 @@ function Switch({
|
|
|
111
77
|
"data-slot": "container",
|
|
112
78
|
className: cn(styles.container(), ui?.container)
|
|
113
79
|
},
|
|
114
|
-
/* @__PURE__ */ React.createElement(
|
|
115
|
-
|
|
80
|
+
/* @__PURE__ */ React.createElement("span", { "data-slot": "base", className: cn(styles.base(), ui?.base) }, /* @__PURE__ */ React.createElement(
|
|
81
|
+
UISwitch.Thumb,
|
|
116
82
|
{
|
|
117
|
-
"data-slot": "
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/* @__PURE__ */ React.createElement(
|
|
124
|
-
UISwitch.Thumb,
|
|
125
|
-
{
|
|
126
|
-
"data-slot": "thumb",
|
|
127
|
-
"aria-hidden": "true",
|
|
128
|
-
onTransitionEnd: handleThumbTransitionEnd,
|
|
129
|
-
className: cn(styles.thumb(), ui?.thumb)
|
|
130
|
-
},
|
|
131
|
-
/* @__PURE__ */ React.createElement("span", { "aria-hidden": "true", "data-layer": "glass-rim" }),
|
|
132
|
-
/* @__PURE__ */ React.createElement("span", { "data-layer": "glass-lens" }, /* @__PURE__ */ React.createElement("span", { "data-layer": "goo" }, /* @__PURE__ */ React.createElement("span", { "data-layer": "inner-glow" }), /* @__PURE__ */ React.createElement("span", { "data-layer": "fill" }))),
|
|
133
|
-
/* @__PURE__ */ React.createElement("span", { "data-layer": "cover" })
|
|
134
|
-
)
|
|
135
|
-
)
|
|
83
|
+
"data-slot": "thumb",
|
|
84
|
+
"aria-hidden": "true",
|
|
85
|
+
onTransitionEnd: handleThumbTransitionEnd,
|
|
86
|
+
className: cn(styles.thumb(), ui?.thumb)
|
|
87
|
+
}
|
|
88
|
+
))
|
|
136
89
|
),
|
|
137
90
|
label || description ? /* @__PURE__ */ React.createElement(
|
|
138
91
|
"span",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Tabs as UITabs } from "@base-ui/react/tabs";
|
|
1
|
+
import { Tabs as UITabs, type TabsTabValue } from "@base-ui/react/tabs";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { type VariantProps } from "tailwind-variants";
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/tabs";
|
|
6
6
|
type Tabs = ComponentConfig<typeof theme>;
|
|
7
7
|
/** One tab and its related panel. */
|
|
8
|
-
type TabsItemProps
|
|
8
|
+
type TabsItemProps = Omit<UITabs.Tab.Props, "children" | "className" | "content" | "value"> & {
|
|
9
9
|
/** Value that identifies the tab and its panel. */
|
|
10
|
-
value:
|
|
10
|
+
value: TabsTabValue;
|
|
11
11
|
/** Visible label inside the tab. */
|
|
12
12
|
label?: React.ReactNode;
|
|
13
13
|
/** Decorative icon rendered before the label. */
|
|
@@ -21,15 +21,15 @@ type TabsItemProps<Value extends string = string> = Omit<UITabs.Tab.Props, "chil
|
|
|
21
21
|
/** Tailwind classes for this item's internal slots, keyed by `data-slot`. */
|
|
22
22
|
ui?: Partial<Pick<Tabs["slots"], "tab" | "icon" | "label" | "panel" | "panelContent">>;
|
|
23
23
|
};
|
|
24
|
-
type TabsProps
|
|
24
|
+
type TabsProps = Omit<UITabs.Root.Props, "children" | "className" | "value" | "defaultValue" | "onValueChange"> & Pick<UITabs.List.Props, "activateOnFocus" | "loopFocus"> & VariantProps<typeof theme> & {
|
|
25
25
|
/** Tabs and panels rendered by the component. */
|
|
26
|
-
items: readonly TabsItemProps
|
|
26
|
+
items: readonly TabsItemProps[];
|
|
27
27
|
/** Controlled active value. Use `null` to render no active tab. */
|
|
28
|
-
value?:
|
|
28
|
+
value?: TabsTabValue;
|
|
29
29
|
/** Initial active value when uncontrolled. */
|
|
30
|
-
defaultValue?:
|
|
30
|
+
defaultValue?: TabsTabValue;
|
|
31
31
|
/** Called when the active value changes. */
|
|
32
|
-
onValueChange?: (value:
|
|
32
|
+
onValueChange?: (value: TabsTabValue, details: UITabs.Root.ChangeEventDetails) => void;
|
|
33
33
|
/** Disables every tab. */
|
|
34
34
|
disabled?: boolean;
|
|
35
35
|
/** Tailwind classes merged into the root. */
|
|
@@ -37,6 +37,6 @@ type TabsProps<Value extends string = string> = Omit<UITabs.Root.Props, "childre
|
|
|
37
37
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
38
38
|
ui?: Tabs["slots"];
|
|
39
39
|
};
|
|
40
|
-
declare function Tabs
|
|
40
|
+
declare function Tabs({ className, ui, size, items, value, defaultValue, onValueChange, activateOnFocus, loopFocus, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: TabsProps): React.JSX.Element;
|
|
41
41
|
export { Tabs };
|
|
42
42
|
export type { TabsItemProps, TabsProps };
|
package/dist/components/tabs.mjs
CHANGED
|
@@ -67,10 +67,10 @@ function Tabs({
|
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
69
|
items.map(
|
|
70
|
-
({ content: _content, keepMounted: _keepMounted, ui: itemUi, ...item }) => /* @__PURE__ */ React.createElement(
|
|
70
|
+
({ content: _content, keepMounted: _keepMounted, ui: itemUi, ...item }, index) => /* @__PURE__ */ React.createElement(
|
|
71
71
|
TabsItem,
|
|
72
72
|
{
|
|
73
|
-
key:
|
|
73
|
+
key: index,
|
|
74
74
|
...item,
|
|
75
75
|
disabled: disabled || item.disabled,
|
|
76
76
|
ui: {
|
|
@@ -82,10 +82,10 @@ function Tabs({
|
|
|
82
82
|
)
|
|
83
83
|
)
|
|
84
84
|
),
|
|
85
|
-
/* @__PURE__ */ React.createElement("div", { "data-slot": "panels", className: cn(styles.panels(), ui?.panels) }, items.map((item) => /* @__PURE__ */ React.createElement(
|
|
85
|
+
/* @__PURE__ */ React.createElement("div", { "data-slot": "panels", className: cn(styles.panels(), ui?.panels) }, items.map((item, index) => /* @__PURE__ */ React.createElement(
|
|
86
86
|
UITabs.Panel,
|
|
87
87
|
{
|
|
88
|
-
key:
|
|
88
|
+
key: index,
|
|
89
89
|
value: item.value,
|
|
90
90
|
keepMounted: item.keepMounted,
|
|
91
91
|
"data-slot": "panel",
|
|
@@ -6,7 +6,7 @@ import { type ComponentConfig } from "../internal/tv";
|
|
|
6
6
|
import theme from "../theme/toggle-group";
|
|
7
7
|
type ToggleGroup = ComponentConfig<typeof theme>;
|
|
8
8
|
/** One option managed by the toggle group. */
|
|
9
|
-
type ToggleGroupItemProps<Value extends string
|
|
9
|
+
type ToggleGroupItemProps<Value extends string> = Omit<UIToggle.Props<Value>, "className" | "children" | "value" | "pressed" | "defaultPressed"> & {
|
|
10
10
|
/** Value that identifies the option in the group value. */
|
|
11
11
|
value: Value;
|
|
12
12
|
/** Visible content inside the item. */
|
|
@@ -18,7 +18,7 @@ type ToggleGroupItemProps<Value extends string = string> = Omit<UIToggle.Props<V
|
|
|
18
18
|
/** Tailwind classes for this item's internal slots, keyed by `data-slot`. */
|
|
19
19
|
ui?: Partial<Pick<ToggleGroup["slots"], "item" | "content" | "icon" | "label">>;
|
|
20
20
|
};
|
|
21
|
-
type ToggleGroupProps<Value extends string
|
|
21
|
+
type ToggleGroupProps<Value extends string> = Omit<UIToggleGroup.Props<Value>, "className" | "children"> & VariantProps<typeof theme> & {
|
|
22
22
|
/** Options rendered by the toggle group. */
|
|
23
23
|
items: readonly ToggleGroupItemProps<Value>[];
|
|
24
24
|
/** Tailwind classes merged into the group root. */
|
|
@@ -26,6 +26,6 @@ type ToggleGroupProps<Value extends string = string> = Omit<UIToggleGroup.Props<
|
|
|
26
26
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
27
27
|
ui?: ToggleGroup["slots"];
|
|
28
28
|
};
|
|
29
|
-
declare function ToggleGroup<Value extends string
|
|
29
|
+
declare function ToggleGroup<Value extends string>({ className, ui, size, items, disabled, ...props }: ToggleGroupProps<Value>): React.JSX.Element;
|
|
30
30
|
export { ToggleGroup };
|
|
31
31
|
export type { ToggleGroupItemProps, ToggleGroupProps };
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/toggle";
|
|
6
6
|
type Toggle = ComponentConfig<typeof theme>;
|
|
7
|
-
type ToggleProps<Value extends string
|
|
7
|
+
type ToggleProps<Value extends string> = Omit<UIToggle.Props<Value>, "className" | "children" | "ref"> & Omit<VariantProps<typeof theme>, "iconOnly"> & {
|
|
8
8
|
/** Ref to the rendered root element. */
|
|
9
9
|
ref?: React.Ref<HTMLButtonElement>;
|
|
10
10
|
/** Tailwind classes merged into the toggle root. */
|
|
@@ -16,6 +16,6 @@ type ToggleProps<Value extends string = string> = Omit<UIToggle.Props<Value>, "c
|
|
|
16
16
|
/** Icon rendered before the label. */
|
|
17
17
|
icon?: React.ReactNode;
|
|
18
18
|
};
|
|
19
|
-
declare function Toggle<Value extends string
|
|
19
|
+
declare function Toggle<Value extends string>({ className, ui, icon, label, size, disabled, ...props }: ToggleProps<Value>): React.JSX.Element;
|
|
20
20
|
export { Toggle };
|
|
21
21
|
export type { ToggleProps };
|
|
@@ -12,9 +12,11 @@ type TooltipProps = Omit<UITooltip.Root.Props, "children"> & Pick<UITooltip.Trig
|
|
|
12
12
|
arrow?: boolean;
|
|
13
13
|
/** Tailwind classes merged into the tooltip popup. */
|
|
14
14
|
className?: string;
|
|
15
|
+
/** Inline styles merged into the tooltip popup. */
|
|
16
|
+
style?: React.CSSProperties;
|
|
15
17
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
16
18
|
ui?: Tooltip["slots"];
|
|
17
19
|
};
|
|
18
|
-
declare function Tooltip({ trigger, children, arrow, delay, closeDelay, side, align, sideOffset, alignOffset, collisionPadding, className, ui, ...props }: TooltipProps): React.JSX.Element;
|
|
20
|
+
declare function Tooltip({ trigger, children, arrow, delay, closeDelay, side, align, sideOffset, alignOffset, collisionPadding, className, style, ui, ...props }: TooltipProps): React.JSX.Element;
|
|
19
21
|
export { Tooltip };
|
|
20
22
|
export type { TooltipProps };
|
|
@@ -15,6 +15,7 @@ function Tooltip({
|
|
|
15
15
|
alignOffset,
|
|
16
16
|
collisionPadding,
|
|
17
17
|
className,
|
|
18
|
+
style,
|
|
18
19
|
ui,
|
|
19
20
|
...props
|
|
20
21
|
}) {
|
|
@@ -41,7 +42,8 @@ function Tooltip({
|
|
|
41
42
|
UITooltip.Popup,
|
|
42
43
|
{
|
|
43
44
|
"data-slot": "popup",
|
|
44
|
-
className: cn(styles.popup(), ui?.popup, className)
|
|
45
|
+
className: cn(styles.popup(), ui?.popup, className),
|
|
46
|
+
style
|
|
45
47
|
},
|
|
46
48
|
/* @__PURE__ */ React.createElement(
|
|
47
49
|
"span",
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "./keyframes.css";@source "./**/*.mjs";@source "./**/*.{ts,tsx}";@custom-variant ui-light (&:where(.light, .light *, [data-theme="light"], [data-theme="light"] *));@custom-variant ui-dark (&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *));@layer theme{:host,:root{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-overlay-surface:hsla(0,0%,100%,.64);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}.dark,[data-theme=dark]{color-scheme:dark;--ui-ink:#f5f5f5;--ui-ink-active:#fff;--ui-surface:#141414;--ui-glass-surface:hsla(0,0%,8%,.62);--ui-glass-overlay-surface:hsla(0,0%,8%,.76);--ui-glass-border:hsla(0,0%,100%,.2);--ui-glass-focus:hsla(0,0%,100%,.7);--ui-glass-inner-border:hsla(0,0%,100%,.4);--ui-glass-rim:hsla(0,0%,100%,.25);--ui-glass-highlight:hsla(0,0%,100%,.45);--ui-glass-tone:brightness(0.95);--ui-glass-contrast:1;--ui-drop-shadow-label:drop-shadow(0 25px 3px rgba(0,0,0,.45));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.35),inset 0 -2px 1px -1px hsla(0,0%,100%,.35),inset 0 6px 1px -6px hsla(0,0%,100%,.2),inset 0 -6px 1px -6px hsla(0,0%,100%,.2),inset 0 0 0 1px hsla(0,0%,100%,.14),inset 0 0 2px rgba(0,0,0,.9),0 4px 8px rgba(0,0,0,.35)}.light,[data-theme=light]{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-overlay-surface:hsla(0,0%,100%,.64);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}:host,:root{--ui-glass-blur:4px;--ui-glass-saturate:150%;--ui-glass-chip-blur:8px;--ui-glass-inner-inset:8px;--ui-glass-inner-offset:1px;--ui-glass-inner-blur:8px;--ui-glass-highlight-blur:7px;--ui-glass-rim-inset:9px;--ui-glass-rim-blur:1px}}@theme inline{--color-ui-ink:var(--ui-ink);--color-ui-ink-active:var(--ui-ink-active);--color-ui-surface:var(--ui-surface);--color-ui-glass-surface:var(--ui-glass-surface);--color-ui-glass-overlay-surface:var(--ui-glass-overlay-surface);--color-ui-glass-border:var(--ui-glass-border);--color-ui-glass-focus:var(--ui-glass-focus);--color-ui-glass-inner-border:var(--ui-glass-inner-border);--color-ui-glass-rim:var(--ui-glass-rim);--color-ui-glass-highlight:var(--ui-glass-highlight)}@layer components{.ui-glass{backdrop-filter:blur(var(--ui-glass-blur,4px)) saturate(var(--ui-glass-saturate,150%));background-color:var(--ui-glass-surface);border:1px double var(--ui-glass-border);box-shadow:var(--ui-shadow-glass);filter:var(--ui-glass-tone,brightness(.98)) contrast(var(--ui-glass-contrast,1.05));position:relative}.ui-glass-overlay{background-color:var(--ui-glass-overlay-surface)}.ui-glass-inner:before{border:1px solid var(--ui-glass-inner-border);bottom:calc(var(--ui-glass-inner-inset, 8px) - var(--ui-glass-inner-offset, 1px));filter:blur(var(--ui-glass-inner-blur,8px));left:var(--ui-glass-inner-inset,8px);right:var(--ui-glass-inner-inset,8px);top:calc(var(--ui-glass-inner-inset, 8px) + var(--ui-glass-inner-offset, 1px));z-index:1}.ui-glass-highlight:after,.ui-glass-inner:before{border-radius:inherit;content:"";pointer-events:none;position:absolute}.ui-glass-highlight:after{background:linear-gradient(45deg,var(--ui-glass-highlight) 0,transparent var(--ui-glass-glare-stop),transparent calc(100% - var(--ui-glass-glare-stop)),var(--ui-glass-highlight) 100%);filter:blur(var(--ui-glass-highlight-blur,7px));inset:0;z-index:3}.ui-glass-rim{border:1px solid var(--ui-glass-rim);border-radius:inherit;filter:blur(var(--ui-glass-rim-blur,1px));
|
|
1
|
+
@import "./keyframes.css";@source "./**/*.mjs";@source "./**/*.{ts,tsx}";@custom-variant ui-light (&:where(.light, .light *, [data-theme="light"], [data-theme="light"] *));@custom-variant ui-dark (&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *));@layer theme{:host,:root{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-overlay-surface:hsla(0,0%,100%,.64);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}.dark,[data-theme=dark]{color-scheme:dark;--ui-ink:#f5f5f5;--ui-ink-active:#fff;--ui-surface:#141414;--ui-glass-surface:hsla(0,0%,8%,.62);--ui-glass-overlay-surface:hsla(0,0%,8%,.76);--ui-glass-border:hsla(0,0%,100%,.2);--ui-glass-focus:hsla(0,0%,100%,.7);--ui-glass-inner-border:hsla(0,0%,100%,.4);--ui-glass-rim:hsla(0,0%,100%,.25);--ui-glass-highlight:hsla(0,0%,100%,.45);--ui-glass-tone:brightness(0.95);--ui-glass-contrast:1;--ui-drop-shadow-label:drop-shadow(0 25px 3px rgba(0,0,0,.45));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.35),inset 0 -2px 1px -1px hsla(0,0%,100%,.35),inset 0 6px 1px -6px hsla(0,0%,100%,.2),inset 0 -6px 1px -6px hsla(0,0%,100%,.2),inset 0 0 0 1px hsla(0,0%,100%,.14),inset 0 0 2px rgba(0,0,0,.9),0 4px 8px rgba(0,0,0,.35)}.light,[data-theme=light]{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-overlay-surface:hsla(0,0%,100%,.64);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}:host,:root{--ui-glass-blur:4px;--ui-glass-saturate:150%;--ui-glass-chip-blur:8px;--ui-glass-inner-inset:8px;--ui-glass-inner-offset:1px;--ui-glass-inner-blur:8px;--ui-glass-highlight-blur:7px;--ui-glass-rim-inset:9px;--ui-glass-rim-blur:1px}}@theme inline{--color-ui-ink:var(--ui-ink);--color-ui-ink-active:var(--ui-ink-active);--color-ui-surface:var(--ui-surface);--color-ui-glass-surface:var(--ui-glass-surface);--color-ui-glass-overlay-surface:var(--ui-glass-overlay-surface);--color-ui-glass-border:var(--ui-glass-border);--color-ui-glass-focus:var(--ui-glass-focus);--color-ui-glass-inner-border:var(--ui-glass-inner-border);--color-ui-glass-rim:var(--ui-glass-rim);--color-ui-glass-highlight:var(--ui-glass-highlight)}@layer components{.ui-glass{backdrop-filter:blur(var(--ui-glass-blur,4px)) saturate(var(--ui-glass-saturate,150%));background-color:var(--ui-glass-surface);border:1px double var(--ui-glass-border);box-shadow:var(--ui-shadow-glass);filter:var(--ui-glass-tone,brightness(.98)) contrast(var(--ui-glass-contrast,1.05));position:relative}.ui-glass-overlay{background-color:var(--ui-glass-overlay-surface)}.ui-glass-inner:before{border:1px solid var(--ui-glass-inner-border);bottom:calc(var(--ui-glass-inner-inset, 8px) - var(--ui-glass-inner-offset, 1px));filter:blur(var(--ui-glass-inner-blur,8px));left:var(--ui-glass-inner-inset,8px);right:var(--ui-glass-inner-inset,8px);top:calc(var(--ui-glass-inner-inset, 8px) + var(--ui-glass-inner-offset, 1px));z-index:1}.ui-glass-highlight:after,.ui-glass-inner:before{border-radius:inherit;content:"";pointer-events:none;position:absolute}.ui-glass-highlight:after{background:linear-gradient(45deg,var(--ui-glass-highlight) 0,transparent var(--ui-glass-glare-stop),transparent calc(100% - var(--ui-glass-glare-stop)),var(--ui-glass-highlight) 100%);filter:blur(var(--ui-glass-highlight-blur,7px));inset:0;z-index:3}.ui-glass-rim{border:1px solid var(--ui-glass-rim);border-radius:inherit;filter:blur(var(--ui-glass-rim-blur,1px));inset:calc(var(--ui-glass-rim-inset, 9px)/2);pointer-events:none;position:absolute;z-index:2}.ui-glass-chip{backdrop-filter:blur(var(--ui-glass-chip-blur,8px)) saturate(var(--ui-glass-saturate,150%));background-color:var(--ui-glass-surface);border:1px solid var(--ui-glass-border);box-shadow:inset 0 1px 0 var(--ui-glass-highlight)}}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { Popover, type PopoverProps } from "./components/popover";
|
|
|
15
15
|
export { Progress, type ProgressProps } from "./components/progress";
|
|
16
16
|
export { RadioGroup, type RadioGroupItemProps, type RadioGroupProps, } from "./components/radio-group";
|
|
17
17
|
export { ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, } from "./components/scroll-area";
|
|
18
|
-
export { Select, type SelectItemProps, type SelectProps, } from "./components/select";
|
|
18
|
+
export { Select, type SelectEntry, type SelectItemGroupProps, type SelectItemProps, type SelectProps, } from "./components/select";
|
|
19
19
|
export { Slider, type SliderProps } from "./components/slider";
|
|
20
20
|
export { Switch, type SwitchProps } from "./components/switch";
|
|
21
21
|
export { Tabs, type TabsItemProps, type TabsProps } from "./components/tabs";
|