@spark-ui/components 10.22.1 → 11.0.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/package.json +5 -5
- package/dist/DialogTrigger-woU7vsJi.d.ts +0 -142
- package/dist/Input-N8AWWSmt.d.ts +0 -41
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +0 -20
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +0 -19
- package/dist/accordion/index.d.ts +0 -73
- package/dist/accordion/index.js +0 -325
- package/dist/accordion/index.js.map +0 -1
- package/dist/alert-dialog/index.d.ts +0 -119
- package/dist/alert-dialog/index.js +0 -1554
- package/dist/alert-dialog/index.js.map +0 -1
- package/dist/avatar/index.d.ts +0 -66
- package/dist/avatar/index.js +0 -1303
- package/dist/avatar/index.js.map +0 -1
- package/dist/badge/index.d.ts +0 -47
- package/dist/badge/index.js +0 -122
- package/dist/badge/index.js.map +0 -1
- package/dist/breadcrumb/index.d.ts +0 -64
- package/dist/breadcrumb/index.js +0 -327
- package/dist/breadcrumb/index.js.map +0 -1
- package/dist/button/index.d.ts +0 -41
- package/dist/button/index.js +0 -935
- package/dist/button/index.js.map +0 -1
- package/dist/card/index.d.ts +0 -61
- package/dist/card/index.js +0 -502
- package/dist/card/index.js.map +0 -1
- package/dist/carousel/index.d.ts +0 -261
- package/dist/carousel/index.js +0 -1801
- package/dist/carousel/index.js.map +0 -1
- package/dist/checkbox/index.d.ts +0 -120
- package/dist/checkbox/index.js +0 -511
- package/dist/checkbox/index.js.map +0 -1
- package/dist/chip/index.d.ts +0 -97
- package/dist/chip/index.js +0 -908
- package/dist/chip/index.js.map +0 -1
- package/dist/collapsible/index.d.ts +0 -43
- package/dist/collapsible/index.js +0 -109
- package/dist/collapsible/index.js.map +0 -1
- package/dist/combobox/index.d.ts +0 -287
- package/dist/combobox/index.js +0 -2588
- package/dist/combobox/index.js.map +0 -1
- package/dist/dialog/index.d.ts +0 -33
- package/dist/dialog/index.js +0 -1389
- package/dist/dialog/index.js.map +0 -1
- package/dist/divider/index.d.ts +0 -61
- package/dist/divider/index.js +0 -224
- package/dist/divider/index.js.map +0 -1
- package/dist/drawer/index.d.ts +0 -152
- package/dist/drawer/index.js +0 -1400
- package/dist/drawer/index.js.map +0 -1
- package/dist/dropdown/index.d.ts +0 -233
- package/dist/dropdown/index.js +0 -2051
- package/dist/dropdown/index.js.map +0 -1
- package/dist/form-field/index.d.ts +0 -186
- package/dist/form-field/index.js +0 -553
- package/dist/form-field/index.js.map +0 -1
- package/dist/icon/index.d.ts +0 -28
- package/dist/icon/index.js +0 -127
- package/dist/icon/index.js.map +0 -1
- package/dist/icon-button/index.d.ts +0 -16
- package/dist/icon-button/index.js +0 -980
- package/dist/icon-button/index.js.map +0 -1
- package/dist/input/index.d.ts +0 -78
- package/dist/input/index.js +0 -724
- package/dist/input/index.js.map +0 -1
- package/dist/kbd/index.d.ts +0 -9
- package/dist/kbd/index.js +0 -47
- package/dist/kbd/index.js.map +0 -1
- package/dist/label/index.d.ts +0 -11
- package/dist/label/index.js +0 -78
- package/dist/label/index.js.map +0 -1
- package/dist/link-box/index.d.ts +0 -34
- package/dist/link-box/index.js +0 -92
- package/dist/link-box/index.js.map +0 -1
- package/dist/pagination/index.d.ts +0 -143
- package/dist/pagination/index.js +0 -1353
- package/dist/pagination/index.js.map +0 -1
- package/dist/popover/index.d.ts +0 -93
- package/dist/popover/index.js +0 -1339
- package/dist/popover/index.js.map +0 -1
- package/dist/portal/index.d.ts +0 -13
- package/dist/portal/index.js +0 -37
- package/dist/portal/index.js.map +0 -1
- package/dist/progress/index.d.ts +0 -48
- package/dist/progress/index.js +0 -223
- package/dist/progress/index.js.map +0 -1
- package/dist/progress-tracker/index.d.ts +0 -80
- package/dist/progress-tracker/index.js +0 -571
- package/dist/progress-tracker/index.js.map +0 -1
- package/dist/radio-group/index.d.ts +0 -100
- package/dist/radio-group/index.js +0 -318
- package/dist/radio-group/index.js.map +0 -1
- package/dist/rating/index.d.ts +0 -78
- package/dist/rating/index.js +0 -363
- package/dist/rating/index.js.map +0 -1
- package/dist/scrolling-list/index.d.ts +0 -118
- package/dist/scrolling-list/index.js +0 -1426
- package/dist/scrolling-list/index.js.map +0 -1
- package/dist/segmented-gauge/index.d.ts +0 -100
- package/dist/segmented-gauge/index.js +0 -277
- package/dist/segmented-gauge/index.js.map +0 -1
- package/dist/select/index.d.ts +0 -167
- package/dist/select/index.js +0 -581
- package/dist/select/index.js.map +0 -1
- package/dist/skeleton/index.d.ts +0 -67
- package/dist/skeleton/index.js +0 -206
- package/dist/skeleton/index.js.map +0 -1
- package/dist/slider/index.d.ts +0 -97
- package/dist/slider/index.js +0 -220
- package/dist/slider/index.js.map +0 -1
- package/dist/slot/index.d.ts +0 -16
- package/dist/slot/index.js +0 -51
- package/dist/slot/index.js.map +0 -1
- package/dist/snackbar/index.d.ts +0 -158
- package/dist/snackbar/index.js +0 -1756
- package/dist/snackbar/index.js.map +0 -1
- package/dist/spinner/index.d.ts +0 -21
- package/dist/spinner/index.js +0 -139
- package/dist/spinner/index.js.map +0 -1
- package/dist/stepper/index.d.ts +0 -81
- package/dist/stepper/index.js +0 -1847
- package/dist/stepper/index.js.map +0 -1
- package/dist/switch/index.d.ts +0 -64
- package/dist/switch/index.js +0 -327
- package/dist/switch/index.js.map +0 -1
- package/dist/tabs/index.d.ts +0 -103
- package/dist/tabs/index.js +0 -1376
- package/dist/tabs/index.js.map +0 -1
- package/dist/tag/index.d.ts +0 -29
- package/dist/tag/index.js +0 -283
- package/dist/tag/index.js.map +0 -1
- package/dist/text-link/index.d.ts +0 -20
- package/dist/text-link/index.js +0 -100
- package/dist/text-link/index.js.map +0 -1
- package/dist/textarea/index.d.ts +0 -57
- package/dist/textarea/index.js +0 -797
- package/dist/textarea/index.js.map +0 -1
- package/dist/toast/index.d.ts +0 -56
- package/dist/toast/index.js +0 -1412
- package/dist/toast/index.js.map +0 -1
- package/dist/visually-hidden/index.d.ts +0 -16
- package/dist/visually-hidden/index.js +0 -67
- package/dist/visually-hidden/index.js.map +0 -1
package/dist/select/index.js
DELETED
|
@@ -1,581 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/select/index.ts
|
|
21
|
-
var select_exports = {};
|
|
22
|
-
__export(select_exports, {
|
|
23
|
-
Select: () => Select2,
|
|
24
|
-
SelectProvider: () => SelectProvider,
|
|
25
|
-
useSelectContext: () => useSelectContext
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(select_exports);
|
|
28
|
-
|
|
29
|
-
// src/select/SelectContext.tsx
|
|
30
|
-
var import_form_field = require("@spark-ui/components/form-field");
|
|
31
|
-
var import_use_combined_state = require("@spark-ui/hooks/use-combined-state");
|
|
32
|
-
var import_react2 = require("react");
|
|
33
|
-
|
|
34
|
-
// src/select/utils.ts
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
var findElement = (children) => (name) => {
|
|
37
|
-
const validChildren = import_react.Children.toArray(children).filter(import_react.isValidElement);
|
|
38
|
-
return validChildren.find((child) => {
|
|
39
|
-
return getElementDisplayName(child)?.includes(name);
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
var getElementDisplayName = (element) => {
|
|
43
|
-
return element ? element.type.displayName : "";
|
|
44
|
-
};
|
|
45
|
-
var getOrderedItems = (children, result = []) => {
|
|
46
|
-
import_react.Children.forEach(children, (child) => {
|
|
47
|
-
if (!(0, import_react.isValidElement)(child)) return;
|
|
48
|
-
if (getElementDisplayName(child) === "Select.Item" || getElementDisplayName(child) === "Select.Placeholder") {
|
|
49
|
-
const childProps = child.props;
|
|
50
|
-
result.push({
|
|
51
|
-
value: childProps.value,
|
|
52
|
-
disabled: !!childProps.disabled,
|
|
53
|
-
text: childProps.children
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
if (child.props.children) {
|
|
57
|
-
getOrderedItems(child.props.children, result);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
return result;
|
|
61
|
-
};
|
|
62
|
-
var getItemsFromChildren = (children) => {
|
|
63
|
-
const newMap = /* @__PURE__ */ new Map();
|
|
64
|
-
getOrderedItems(children).forEach((itemData) => {
|
|
65
|
-
newMap.set(itemData.value, itemData);
|
|
66
|
-
});
|
|
67
|
-
return newMap;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
// src/select/SelectContext.tsx
|
|
71
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
72
|
-
var SelectContext = (0, import_react2.createContext)(null);
|
|
73
|
-
var ID_PREFIX = ":select";
|
|
74
|
-
var SelectProvider = ({
|
|
75
|
-
children,
|
|
76
|
-
defaultValue,
|
|
77
|
-
value: valueProp,
|
|
78
|
-
onValueChange,
|
|
79
|
-
disabled: disabledProp = false,
|
|
80
|
-
readOnly: readOnlyProp = false,
|
|
81
|
-
state: stateProp,
|
|
82
|
-
itemsComponent,
|
|
83
|
-
name: nameProp,
|
|
84
|
-
required: requiredProp
|
|
85
|
-
}) => {
|
|
86
|
-
const [value, setValue] = (0, import_use_combined_state.useCombinedState)(valueProp, defaultValue, onValueChange);
|
|
87
|
-
const [placeholder, setPlaceholder] = (0, import_react2.useState)(void 0);
|
|
88
|
-
const [itemsMap, setItemsMap] = (0, import_react2.useState)(getItemsFromChildren(itemsComponent));
|
|
89
|
-
const [ariaLabel, setAriaLabel] = (0, import_react2.useState)();
|
|
90
|
-
const firstItem = itemsMap.entries().next()?.value?.[1];
|
|
91
|
-
const selectedItem = typeof value === "string" ? itemsMap.get(value) : firstItem;
|
|
92
|
-
const isControlled = valueProp != null;
|
|
93
|
-
const field = (0, import_form_field.useFormFieldControl)();
|
|
94
|
-
const state = field.state || stateProp;
|
|
95
|
-
const internalFieldID = `${ID_PREFIX}-field-${(0, import_react2.useId)()}`;
|
|
96
|
-
const fieldId = field.id || internalFieldID;
|
|
97
|
-
const fieldLabelId = field.labelId;
|
|
98
|
-
const disabled = field.disabled ?? disabledProp;
|
|
99
|
-
const readOnly = field.readOnly ?? readOnlyProp;
|
|
100
|
-
const name = field.name ?? nameProp;
|
|
101
|
-
const required = !!(field.isRequired ?? requiredProp);
|
|
102
|
-
(0, import_react2.useEffect)(() => {
|
|
103
|
-
const newMap = getItemsFromChildren(itemsComponent);
|
|
104
|
-
const previousItems = [...itemsMap.values()];
|
|
105
|
-
const newItems = [...newMap.values()];
|
|
106
|
-
const hasItemsChanges = previousItems.length !== newItems.length || previousItems.some((item, index) => {
|
|
107
|
-
const hasUpdatedValue = item.value !== newItems[index]?.value;
|
|
108
|
-
const hasUpdatedText = item.text !== newItems[index]?.text;
|
|
109
|
-
return hasUpdatedValue || hasUpdatedText;
|
|
110
|
-
});
|
|
111
|
-
if (hasItemsChanges) {
|
|
112
|
-
setItemsMap(newMap);
|
|
113
|
-
}
|
|
114
|
-
}, [children]);
|
|
115
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
|
-
SelectContext.Provider,
|
|
117
|
-
{
|
|
118
|
-
value: {
|
|
119
|
-
disabled,
|
|
120
|
-
readOnly,
|
|
121
|
-
itemsMap,
|
|
122
|
-
state,
|
|
123
|
-
itemsComponent,
|
|
124
|
-
selectedItem,
|
|
125
|
-
setValue,
|
|
126
|
-
isControlled,
|
|
127
|
-
onValueChange,
|
|
128
|
-
ariaLabel,
|
|
129
|
-
setAriaLabel,
|
|
130
|
-
fieldId,
|
|
131
|
-
fieldLabelId,
|
|
132
|
-
name,
|
|
133
|
-
required,
|
|
134
|
-
placeholder,
|
|
135
|
-
setPlaceholder
|
|
136
|
-
},
|
|
137
|
-
children
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
};
|
|
141
|
-
var useSelectContext = () => {
|
|
142
|
-
const context = (0, import_react2.useContext)(SelectContext);
|
|
143
|
-
if (!context) {
|
|
144
|
-
throw Error("useSelectContext must be used within a Select provider");
|
|
145
|
-
}
|
|
146
|
-
return context;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// src/select/Select.tsx
|
|
150
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
151
|
-
var Select = ({ children, ...props }) => {
|
|
152
|
-
const finder = findElement(children);
|
|
153
|
-
const trigger = finder("Trigger");
|
|
154
|
-
const items = finder("Items");
|
|
155
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectProvider, { ...props, itemsComponent: items, children: trigger });
|
|
156
|
-
};
|
|
157
|
-
Select.displayName = "Select";
|
|
158
|
-
|
|
159
|
-
// src/select/SelectGroup.tsx
|
|
160
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
161
|
-
|
|
162
|
-
// src/select/SelectItemsGroupContext.tsx
|
|
163
|
-
var import_react3 = require("react");
|
|
164
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
165
|
-
var SelectGroupContext = (0, import_react3.createContext)(null);
|
|
166
|
-
var SelectGroupProvider = ({ children }) => {
|
|
167
|
-
const [groupLabel, setGroupLabel] = (0, import_react3.useState)("");
|
|
168
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectGroupContext.Provider, { value: { groupLabel, setGroupLabel }, children });
|
|
169
|
-
};
|
|
170
|
-
var useSelectGroupContext = () => {
|
|
171
|
-
const context = (0, import_react3.useContext)(SelectGroupContext);
|
|
172
|
-
if (!context) {
|
|
173
|
-
throw Error("useSelectGroupContext must be used within a SelectGroup provider");
|
|
174
|
-
}
|
|
175
|
-
return context;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
// src/select/SelectGroup.tsx
|
|
179
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
180
|
-
var Group = ({ children, ref: forwardedRef, ...props }) => {
|
|
181
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectGroupProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(GroupContent, { ref: forwardedRef, ...props, children }) });
|
|
182
|
-
};
|
|
183
|
-
var GroupContent = ({ children, className, ref: forwardedRef }) => {
|
|
184
|
-
const { groupLabel } = useSelectGroupContext();
|
|
185
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
186
|
-
"optgroup",
|
|
187
|
-
{
|
|
188
|
-
"data-spark-component": "select-group",
|
|
189
|
-
ref: forwardedRef,
|
|
190
|
-
className: (0, import_class_variance_authority.cx)(className),
|
|
191
|
-
label: groupLabel,
|
|
192
|
-
children
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
};
|
|
196
|
-
Group.displayName = "Select.Group";
|
|
197
|
-
|
|
198
|
-
// src/select/SelectItem.tsx
|
|
199
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
200
|
-
var Item = ({ disabled = false, value, children, ref: forwardedRef }) => {
|
|
201
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
202
|
-
"option",
|
|
203
|
-
{
|
|
204
|
-
"data-spark-component": "select-item",
|
|
205
|
-
ref: forwardedRef,
|
|
206
|
-
value,
|
|
207
|
-
disabled,
|
|
208
|
-
children
|
|
209
|
-
},
|
|
210
|
-
value
|
|
211
|
-
);
|
|
212
|
-
};
|
|
213
|
-
Item.displayName = "Select.Item";
|
|
214
|
-
|
|
215
|
-
// src/select/SelectItems.tsx
|
|
216
|
-
var import_class_variance_authority2 = require("class-variance-authority");
|
|
217
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
218
|
-
var styles = (0, import_class_variance_authority2.cva)(
|
|
219
|
-
[
|
|
220
|
-
"absolute left-0 top-0 size-full rounded-lg opacity-0",
|
|
221
|
-
"min-h-sz-44",
|
|
222
|
-
// outline styles
|
|
223
|
-
"ring-1 outline-hidden ring-inset focus:ring-2"
|
|
224
|
-
],
|
|
225
|
-
{
|
|
226
|
-
variants: {
|
|
227
|
-
state: {
|
|
228
|
-
undefined: "ring-outline focus:ring-outline-high",
|
|
229
|
-
error: "ring-error",
|
|
230
|
-
alert: "ring-alert",
|
|
231
|
-
success: "ring-success"
|
|
232
|
-
},
|
|
233
|
-
disabled: {
|
|
234
|
-
true: "cursor-not-allowed"
|
|
235
|
-
},
|
|
236
|
-
readOnly: {
|
|
237
|
-
true: "cursor-default"
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
compoundVariants: [
|
|
241
|
-
{
|
|
242
|
-
disabled: false,
|
|
243
|
-
state: void 0,
|
|
244
|
-
class: "hover:ring-outline-high"
|
|
245
|
-
}
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
var Items = ({
|
|
250
|
-
children,
|
|
251
|
-
className,
|
|
252
|
-
ref,
|
|
253
|
-
...rest
|
|
254
|
-
}) => {
|
|
255
|
-
const {
|
|
256
|
-
state,
|
|
257
|
-
disabled,
|
|
258
|
-
readOnly,
|
|
259
|
-
ariaLabel,
|
|
260
|
-
fieldLabelId,
|
|
261
|
-
isControlled,
|
|
262
|
-
onValueChange,
|
|
263
|
-
selectedItem,
|
|
264
|
-
setValue,
|
|
265
|
-
name,
|
|
266
|
-
required,
|
|
267
|
-
fieldId
|
|
268
|
-
} = useSelectContext();
|
|
269
|
-
const handleChange = (event) => {
|
|
270
|
-
if (isControlled) {
|
|
271
|
-
event.preventDefault();
|
|
272
|
-
onValueChange?.(event.target.value);
|
|
273
|
-
} else {
|
|
274
|
-
setValue(event.target.value);
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
278
|
-
"select",
|
|
279
|
-
{
|
|
280
|
-
"data-spark-component": "select-items",
|
|
281
|
-
ref,
|
|
282
|
-
disabled: disabled || readOnly,
|
|
283
|
-
name,
|
|
284
|
-
required,
|
|
285
|
-
"aria-labelledby": fieldLabelId,
|
|
286
|
-
...ariaLabel && { "aria-label": ariaLabel },
|
|
287
|
-
className: styles({ className, state, disabled, readOnly }),
|
|
288
|
-
value: selectedItem?.value,
|
|
289
|
-
onChange: handleChange,
|
|
290
|
-
id: fieldId,
|
|
291
|
-
...rest,
|
|
292
|
-
children
|
|
293
|
-
}
|
|
294
|
-
);
|
|
295
|
-
};
|
|
296
|
-
Items.displayName = "Select.Items";
|
|
297
|
-
|
|
298
|
-
// src/select/SelectLabel.tsx
|
|
299
|
-
var import_react4 = require("react");
|
|
300
|
-
var Label = ({ children }) => {
|
|
301
|
-
const { setGroupLabel } = useSelectGroupContext();
|
|
302
|
-
(0, import_react4.useEffect)(() => {
|
|
303
|
-
setGroupLabel(children);
|
|
304
|
-
}, [children]);
|
|
305
|
-
return null;
|
|
306
|
-
};
|
|
307
|
-
Label.displayName = "Select.Label";
|
|
308
|
-
|
|
309
|
-
// src/icon/Icon.tsx
|
|
310
|
-
var import_react6 = require("react");
|
|
311
|
-
|
|
312
|
-
// src/slot/Slot.tsx
|
|
313
|
-
var import_radix_ui = require("radix-ui");
|
|
314
|
-
var import_react5 = require("react");
|
|
315
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
316
|
-
var Slottable = import_radix_ui.Slot.Slottable;
|
|
317
|
-
var Slot = ({ ref, ...props }) => {
|
|
318
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
// src/visually-hidden/VisuallyHidden.tsx
|
|
322
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
323
|
-
var VisuallyHidden = ({ asChild = false, ref, ...props }) => {
|
|
324
|
-
const Component = asChild ? Slot : "span";
|
|
325
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
326
|
-
Component,
|
|
327
|
-
{
|
|
328
|
-
...props,
|
|
329
|
-
ref,
|
|
330
|
-
style: {
|
|
331
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
332
|
-
position: "absolute",
|
|
333
|
-
border: 0,
|
|
334
|
-
width: 1,
|
|
335
|
-
height: 1,
|
|
336
|
-
padding: 0,
|
|
337
|
-
margin: -1,
|
|
338
|
-
overflow: "hidden",
|
|
339
|
-
clip: "rect(0, 0, 0, 0)",
|
|
340
|
-
whiteSpace: "nowrap",
|
|
341
|
-
wordWrap: "normal",
|
|
342
|
-
...props.style
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
);
|
|
346
|
-
};
|
|
347
|
-
VisuallyHidden.displayName = "VisuallyHidden";
|
|
348
|
-
|
|
349
|
-
// src/icon/Icon.styles.tsx
|
|
350
|
-
var import_internal_utils = require("@spark-ui/internal-utils");
|
|
351
|
-
var import_class_variance_authority3 = require("class-variance-authority");
|
|
352
|
-
var iconStyles = (0, import_class_variance_authority3.cva)(["fill-current shrink-0"], {
|
|
353
|
-
variants: {
|
|
354
|
-
/**
|
|
355
|
-
* Color scheme of the icon.
|
|
356
|
-
*/
|
|
357
|
-
intent: (0, import_internal_utils.makeVariants)({
|
|
358
|
-
current: ["text-current"],
|
|
359
|
-
main: ["text-main"],
|
|
360
|
-
support: ["text-support"],
|
|
361
|
-
accent: ["text-accent"],
|
|
362
|
-
basic: ["text-basic"],
|
|
363
|
-
success: ["text-success"],
|
|
364
|
-
alert: ["text-alert"],
|
|
365
|
-
error: ["text-error"],
|
|
366
|
-
info: ["text-info"],
|
|
367
|
-
neutral: ["text-neutral"]
|
|
368
|
-
}),
|
|
369
|
-
/**
|
|
370
|
-
* Sets the size of the icon.
|
|
371
|
-
*/
|
|
372
|
-
size: (0, import_internal_utils.makeVariants)({
|
|
373
|
-
current: ["u-current-font-size"],
|
|
374
|
-
sm: ["w-sz-16", "h-sz-16"],
|
|
375
|
-
md: ["w-sz-24", "h-sz-24"],
|
|
376
|
-
lg: ["w-sz-32", "h-sz-32"],
|
|
377
|
-
xl: ["w-sz-40", "h-sz-40"]
|
|
378
|
-
})
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
|
|
382
|
-
// src/icon/Icon.tsx
|
|
383
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
384
|
-
var Icon = ({
|
|
385
|
-
label,
|
|
386
|
-
className,
|
|
387
|
-
size = "current",
|
|
388
|
-
intent = "current",
|
|
389
|
-
children,
|
|
390
|
-
...others
|
|
391
|
-
}) => {
|
|
392
|
-
const child = import_react6.Children.only(children);
|
|
393
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
394
|
-
(0, import_react6.cloneElement)(child, {
|
|
395
|
-
className: iconStyles({ className, size, intent }),
|
|
396
|
-
"data-spark-component": "icon",
|
|
397
|
-
"aria-hidden": "true",
|
|
398
|
-
focusable: "false",
|
|
399
|
-
...others
|
|
400
|
-
}),
|
|
401
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(VisuallyHidden, { children: label })
|
|
402
|
-
] });
|
|
403
|
-
};
|
|
404
|
-
Icon.displayName = "Icon";
|
|
405
|
-
|
|
406
|
-
// src/select/SelectLeadingIcon.tsx
|
|
407
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
408
|
-
var LeadingIcon = ({ children }) => {
|
|
409
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { size: "sm", className: "shrink-0", children });
|
|
410
|
-
};
|
|
411
|
-
LeadingIcon.displayName = "Select.LeadingIcon";
|
|
412
|
-
|
|
413
|
-
// src/select/SelectPlaceholder.tsx
|
|
414
|
-
var import_react7 = require("react");
|
|
415
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
416
|
-
var Placeholder = ({
|
|
417
|
-
disabled = false,
|
|
418
|
-
children,
|
|
419
|
-
ref: forwardedRef
|
|
420
|
-
}) => {
|
|
421
|
-
const { setPlaceholder } = useSelectContext();
|
|
422
|
-
(0, import_react7.useEffect)(() => {
|
|
423
|
-
setPlaceholder(children);
|
|
424
|
-
}, [children]);
|
|
425
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
426
|
-
"option",
|
|
427
|
-
{
|
|
428
|
-
"data-spark-component": "select-placeholder",
|
|
429
|
-
ref: forwardedRef,
|
|
430
|
-
value: "",
|
|
431
|
-
disabled,
|
|
432
|
-
children
|
|
433
|
-
},
|
|
434
|
-
"placeholder"
|
|
435
|
-
);
|
|
436
|
-
};
|
|
437
|
-
Placeholder.displayName = "Select.Placeholder";
|
|
438
|
-
|
|
439
|
-
// src/select/SelectTrigger.tsx
|
|
440
|
-
var import_ArrowHorizontalDown = require("@spark-ui/icons/ArrowHorizontalDown");
|
|
441
|
-
var import_react8 = require("react");
|
|
442
|
-
|
|
443
|
-
// src/select/SelectTrigger.styles.tsx
|
|
444
|
-
var import_class_variance_authority4 = require("class-variance-authority");
|
|
445
|
-
var styles2 = (0, import_class_variance_authority4.cva)(
|
|
446
|
-
[
|
|
447
|
-
"relative flex w-full items-center justify-between",
|
|
448
|
-
"min-h-sz-44 rounded-lg px-lg",
|
|
449
|
-
"text-body-1",
|
|
450
|
-
// outline styles
|
|
451
|
-
"ring-1 outline-hidden ring-inset focus-within:ring-focus"
|
|
452
|
-
],
|
|
453
|
-
{
|
|
454
|
-
variants: {
|
|
455
|
-
state: {
|
|
456
|
-
undefined: "ring-outline",
|
|
457
|
-
error: "ring-error",
|
|
458
|
-
alert: "ring-alert",
|
|
459
|
-
success: "ring-success"
|
|
460
|
-
},
|
|
461
|
-
disabled: {
|
|
462
|
-
false: "focus-within:ring-2"
|
|
463
|
-
},
|
|
464
|
-
readOnly: {
|
|
465
|
-
true: ""
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
compoundVariants: [
|
|
469
|
-
{
|
|
470
|
-
readOnly: false,
|
|
471
|
-
disabled: false,
|
|
472
|
-
class: "bg-surface text-on-surface"
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
readOnly: true,
|
|
476
|
-
class: "bg-on-surface/dim-5 text-on-surface cursor-default"
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
disabled: true,
|
|
480
|
-
class: ["bg-on-surface/dim-5 text-on-surface/dim-3", "cursor-not-allowed"]
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
disabled: false,
|
|
484
|
-
state: void 0,
|
|
485
|
-
class: "default:hover:ring-outline-high"
|
|
486
|
-
}
|
|
487
|
-
]
|
|
488
|
-
}
|
|
489
|
-
);
|
|
490
|
-
|
|
491
|
-
// src/select/SelectTrigger.tsx
|
|
492
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
493
|
-
var Trigger = ({
|
|
494
|
-
"aria-label": ariaLabel,
|
|
495
|
-
children,
|
|
496
|
-
className,
|
|
497
|
-
ref: forwardedRef
|
|
498
|
-
}) => {
|
|
499
|
-
const { disabled, readOnly, state, setAriaLabel, itemsComponent } = useSelectContext();
|
|
500
|
-
(0, import_react8.useEffect)(() => {
|
|
501
|
-
if (ariaLabel) {
|
|
502
|
-
setAriaLabel(ariaLabel);
|
|
503
|
-
}
|
|
504
|
-
}, [ariaLabel]);
|
|
505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
506
|
-
"div",
|
|
507
|
-
{
|
|
508
|
-
"data-spark-component": "select-trigger",
|
|
509
|
-
ref: forwardedRef,
|
|
510
|
-
className: styles2({ className, state, disabled, readOnly }),
|
|
511
|
-
children: [
|
|
512
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "gap-md flex items-center justify-start", children }),
|
|
513
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { className: "ml-md shrink-0", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ArrowHorizontalDown.ArrowHorizontalDown, {}) }),
|
|
514
|
-
itemsComponent
|
|
515
|
-
]
|
|
516
|
-
}
|
|
517
|
-
);
|
|
518
|
-
};
|
|
519
|
-
Trigger.displayName = "Select.Trigger";
|
|
520
|
-
|
|
521
|
-
// src/select/SelectValue.tsx
|
|
522
|
-
var import_class_variance_authority5 = require("class-variance-authority");
|
|
523
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
524
|
-
var Value = ({
|
|
525
|
-
children,
|
|
526
|
-
className,
|
|
527
|
-
placeholder: customPlaceholder,
|
|
528
|
-
ref: forwardedRef
|
|
529
|
-
}) => {
|
|
530
|
-
const { selectedItem, placeholder, disabled } = useSelectContext();
|
|
531
|
-
const isPlaceholderSelected = selectedItem?.value == null;
|
|
532
|
-
const valuePlaceholder = customPlaceholder || placeholder;
|
|
533
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
534
|
-
"span",
|
|
535
|
-
{
|
|
536
|
-
role: "presentation",
|
|
537
|
-
"data-spark-component": "select-value",
|
|
538
|
-
ref: forwardedRef,
|
|
539
|
-
className: (0, import_class_variance_authority5.cx)("flex shrink items-center text-left", className),
|
|
540
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
541
|
-
"span",
|
|
542
|
-
{
|
|
543
|
-
className: (0, import_class_variance_authority5.cx)(
|
|
544
|
-
"line-clamp-1 flex-1 overflow-hidden break-all text-ellipsis",
|
|
545
|
-
isPlaceholderSelected && !disabled && "text-on-surface/dim-1"
|
|
546
|
-
),
|
|
547
|
-
children: isPlaceholderSelected ? valuePlaceholder : children || selectedItem?.text
|
|
548
|
-
}
|
|
549
|
-
)
|
|
550
|
-
}
|
|
551
|
-
);
|
|
552
|
-
};
|
|
553
|
-
Value.displayName = "Select.Value";
|
|
554
|
-
|
|
555
|
-
// src/select/index.ts
|
|
556
|
-
var Select2 = Object.assign(Select, {
|
|
557
|
-
Group,
|
|
558
|
-
Item,
|
|
559
|
-
Items,
|
|
560
|
-
Placeholder,
|
|
561
|
-
Label,
|
|
562
|
-
Trigger,
|
|
563
|
-
Value,
|
|
564
|
-
LeadingIcon
|
|
565
|
-
});
|
|
566
|
-
Select2.displayName = "Select";
|
|
567
|
-
Group.displayName = "Select.Group";
|
|
568
|
-
Items.displayName = "Select.Items";
|
|
569
|
-
Item.displayName = "Select.Item";
|
|
570
|
-
Placeholder.displayName = "Select.Placeholder";
|
|
571
|
-
Label.displayName = "Select.Label";
|
|
572
|
-
Trigger.displayName = "Select.Trigger";
|
|
573
|
-
Value.displayName = "Select.Value";
|
|
574
|
-
LeadingIcon.displayName = "Select.LeadingIcon";
|
|
575
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
576
|
-
0 && (module.exports = {
|
|
577
|
-
Select,
|
|
578
|
-
SelectProvider,
|
|
579
|
-
useSelectContext
|
|
580
|
-
});
|
|
581
|
-
//# sourceMappingURL=index.js.map
|
package/dist/select/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/select/index.ts","../../src/select/SelectContext.tsx","../../src/select/utils.ts","../../src/select/Select.tsx","../../src/select/SelectGroup.tsx","../../src/select/SelectItemsGroupContext.tsx","../../src/select/SelectItem.tsx","../../src/select/SelectItems.tsx","../../src/select/SelectLabel.tsx","../../src/icon/Icon.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.tsx","../../src/icon/Icon.styles.tsx","../../src/select/SelectLeadingIcon.tsx","../../src/select/SelectPlaceholder.tsx","../../src/select/SelectTrigger.tsx","../../src/select/SelectTrigger.styles.tsx","../../src/select/SelectValue.tsx"],"sourcesContent":["import { Select as Root } from './Select'\nimport { SelectProvider, useSelectContext } from './SelectContext'\nimport { Group } from './SelectGroup'\nimport { Item } from './SelectItem'\nimport { Items } from './SelectItems'\nimport { Label } from './SelectLabel'\nimport { LeadingIcon } from './SelectLeadingIcon'\nimport { Placeholder } from './SelectPlaceholder'\nimport { Trigger } from './SelectTrigger'\nimport { Value } from './SelectValue'\n\nexport { useSelectContext, SelectProvider }\n\nexport const Select: typeof Root & {\n Group: typeof Group\n Item: typeof Item\n Items: typeof Items\n Placeholder: typeof Placeholder\n Label: typeof Label\n Trigger: typeof Trigger\n Value: typeof Value\n LeadingIcon: typeof LeadingIcon\n} = Object.assign(Root, {\n Group,\n Item,\n Items,\n Placeholder,\n Label,\n Trigger,\n Value,\n LeadingIcon,\n})\n\nSelect.displayName = 'Select'\nGroup.displayName = 'Select.Group'\nItems.displayName = 'Select.Items'\nItem.displayName = 'Select.Item'\nPlaceholder.displayName = 'Select.Placeholder'\nLabel.displayName = 'Select.Label'\nTrigger.displayName = 'Select.Trigger'\nValue.displayName = 'Select.Value'\nLeadingIcon.displayName = 'Select.LeadingIcon'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useCombinedState } from '@spark-ui/hooks/use-combined-state'\nimport {\n createContext,\n Dispatch,\n PropsWithChildren,\n ReactElement,\n SetStateAction,\n useContext,\n useEffect,\n useId,\n useState,\n} from 'react'\n\nimport { type ItemsMap, SelectItem } from './types'\nimport { getItemsFromChildren } from './utils'\n\nexport interface SelectContextState {\n itemsMap: ItemsMap\n disabled: boolean\n readOnly: boolean\n state?: 'error' | 'alert' | 'success'\n itemsComponent: ReactElement | undefined\n selectedItem: SelectItem | undefined\n setValue: (value: string) => void\n isControlled: boolean\n onValueChange?: (value: string) => void\n ariaLabel: string | undefined\n setAriaLabel: Dispatch<SetStateAction<string | undefined>>\n fieldId: string\n fieldLabelId: string | undefined\n name: string | undefined\n required: boolean\n placeholder: string | undefined\n setPlaceholder: Dispatch<SetStateAction<string | undefined>>\n}\n\nexport type SelectContextProps = PropsWithChildren<{\n /**\n * Use `state` prop to assign a specific state to the select, choosing from: `error`, `alert` and `success`. By doing so, the outline styles will be updated.\n */\n state?: 'error' | 'alert' | 'success'\n /**\n * When true, prevents the user from interacting with the select.\n */\n disabled?: boolean\n /**\n * Sets the select as interactive or not.\n */\n readOnly?: boolean\n /**\n * The value of the select when initially rendered. Use when you do not need to control the state of the select.\n */\n defaultValue?: string\n /**\n * The controlled value of the select. Should be used in conjunction with `onValueChange`.\n */\n value?: string\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string) => void\n\n itemsComponent: ReactElement | undefined\n /**\n * This attribute is used to specify the name of the control.\n * If wrapped with a FormField with a name, will be inherited from it.\n */\n name?: string\n /**\n * A Boolean attribute indicating that an option with a non-empty string value must be selected.\n */\n required?: boolean\n}>\n\nconst SelectContext = createContext<SelectContextState | null>(null)\n\nconst ID_PREFIX = ':select'\n\nexport const SelectProvider = ({\n children,\n defaultValue,\n value: valueProp,\n onValueChange,\n disabled: disabledProp = false,\n readOnly: readOnlyProp = false,\n state: stateProp,\n itemsComponent,\n name: nameProp,\n required: requiredProp,\n}: SelectContextProps) => {\n const [value, setValue] = useCombinedState(valueProp, defaultValue, onValueChange)\n const [placeholder, setPlaceholder] = useState<string | undefined>(undefined)\n const [itemsMap, setItemsMap] = useState<ItemsMap>(getItemsFromChildren(itemsComponent))\n const [ariaLabel, setAriaLabel] = useState<string>()\n\n // Computed state\n const firstItem = itemsMap.entries().next()?.value?.[1]\n const selectedItem = typeof value === 'string' ? itemsMap.get(value) : firstItem\n const isControlled = valueProp != null\n\n // Derivated from FormField context\n const field = useFormFieldControl()\n const state = field.state || stateProp\n\n const internalFieldID = `${ID_PREFIX}-field-${useId()}`\n const fieldId = field.id || internalFieldID\n const fieldLabelId = field.labelId\n const disabled = field.disabled ?? disabledProp\n const readOnly = field.readOnly ?? readOnlyProp\n const name = field.name ?? nameProp\n const required = !!(field.isRequired ?? requiredProp)\n\n /**\n * Indices in a Map are set when an element is added to the Map.\n * If for some reason, in the Select:\n * - items order changes\n * - items are added\n * - items are removed\n *\n * The Map must be rebuilt from the new children in order to preserve logical indices.\n *\n */\n useEffect(() => {\n const newMap = getItemsFromChildren(itemsComponent)\n\n const previousItems = [...itemsMap.values()]\n const newItems = [...newMap.values()]\n\n const hasItemsChanges =\n previousItems.length !== newItems.length ||\n previousItems.some((item, index) => {\n const hasUpdatedValue = item.value !== newItems[index]?.value\n const hasUpdatedText = item.text !== newItems[index]?.text\n\n return hasUpdatedValue || hasUpdatedText\n })\n\n if (hasItemsChanges) {\n setItemsMap(newMap)\n }\n }, [children])\n\n return (\n <SelectContext.Provider\n value={{\n disabled,\n readOnly,\n itemsMap,\n state,\n itemsComponent,\n selectedItem,\n setValue,\n isControlled,\n onValueChange,\n ariaLabel,\n setAriaLabel,\n fieldId,\n fieldLabelId,\n name,\n required,\n placeholder,\n setPlaceholder,\n }}\n >\n {children}\n </SelectContext.Provider>\n )\n}\n\nexport const useSelectContext = () => {\n const context = useContext(SelectContext)\n\n if (!context) {\n throw Error('useSelectContext must be used within a Select provider')\n }\n\n return context\n}\n","import { Children, type FC, isValidElement, type ReactElement, type ReactNode } from 'react'\n\nimport { type ItemProps } from './SelectItem'\nimport { type ItemsMap, type SelectItem } from './types'\n\nexport const findElement = (children: ReactNode) => (name: string) => {\n const validChildren = Children.toArray(children).filter(isValidElement)\n\n return validChildren.find(child => {\n return getElementDisplayName(child)?.includes(name)\n })\n}\n\nconst getElementDisplayName = (element?: ReactElement) => {\n return element ? (element.type as FC & { displayName?: string }).displayName : ''\n}\n\nconst getOrderedItems = (children: ReactNode, result: SelectItem[] = []): SelectItem[] => {\n Children.forEach(children, child => {\n if (!isValidElement(child)) return\n\n if (\n getElementDisplayName(child) === 'Select.Item' ||\n getElementDisplayName(child) === 'Select.Placeholder'\n ) {\n const childProps = child.props as ItemProps\n result.push({\n value: childProps.value,\n disabled: !!childProps.disabled,\n text: childProps.children,\n })\n }\n\n if ((child.props as { children: ReactNode }).children) {\n getOrderedItems((child.props as { children: ReactNode }).children, result)\n }\n })\n\n return result\n}\n\nexport const getItemsFromChildren = (children: ReactNode): ItemsMap => {\n const newMap: ItemsMap = new Map()\n\n getOrderedItems(children).forEach(itemData => {\n newMap.set(itemData.value, itemData)\n })\n\n return newMap\n}\n","import { type SelectContextProps, SelectProvider } from './SelectContext'\nimport { findElement } from './utils'\n\nexport type SelectProps = Omit<SelectContextProps, 'itemsComponent'>\n\nexport const Select = ({ children, ...props }: SelectProps) => {\n const finder = findElement(children)\n const trigger = finder('Trigger')\n const items = finder('Items')\n\n return (\n <SelectProvider {...props} itemsComponent={items}>\n {trigger}\n </SelectProvider>\n )\n}\n\nSelect.displayName = 'Select'\n","import { cx } from 'class-variance-authority'\nimport { ReactNode, type Ref } from 'react'\n\nimport { SelectGroupProvider, useSelectGroupContext } from './SelectItemsGroupContext'\n\ninterface GroupProps {\n children: ReactNode\n className?: string\n ref?: Ref<HTMLOptGroupElement>\n}\n\nexport const Group = ({ children, ref: forwardedRef, ...props }: GroupProps) => {\n return (\n <SelectGroupProvider>\n <GroupContent ref={forwardedRef} {...props}>\n {children}\n </GroupContent>\n </SelectGroupProvider>\n )\n}\n\nconst GroupContent = ({ children, className, ref: forwardedRef }: GroupProps) => {\n const { groupLabel } = useSelectGroupContext()\n\n return (\n <optgroup\n data-spark-component=\"select-group\"\n ref={forwardedRef}\n className={cx(className)}\n label={groupLabel}\n >\n {children}\n </optgroup>\n )\n}\n\nGroup.displayName = 'Select.Group'\n","import { createContext, type PropsWithChildren, useContext, useState } from 'react'\n\nexport interface SelectContextState {\n groupLabel: string\n setGroupLabel: (label: string) => void\n}\n\ntype SelectContextProps = PropsWithChildren\n\nconst SelectGroupContext = createContext<SelectContextState | null>(null)\n\nexport const SelectGroupProvider = ({ children }: SelectContextProps) => {\n const [groupLabel, setGroupLabel] = useState('')\n\n return (\n <SelectGroupContext.Provider value={{ groupLabel, setGroupLabel }}>\n {children}\n </SelectGroupContext.Provider>\n )\n}\n\nexport const useSelectGroupContext = () => {\n const context = useContext(SelectGroupContext)\n\n if (!context) {\n throw Error('useSelectGroupContext must be used within a SelectGroup provider')\n }\n\n return context\n}\n","import { type Ref } from 'react'\n\nexport interface ItemProps {\n disabled?: boolean\n value: string\n children: string\n ref?: Ref<HTMLOptionElement>\n}\n\nexport const Item = ({ disabled = false, value, children, ref: forwardedRef }: ItemProps) => {\n return (\n <option\n data-spark-component=\"select-item\"\n ref={forwardedRef}\n key={value}\n value={value}\n disabled={disabled}\n // label\n >\n {children}\n </option>\n )\n}\n\nItem.displayName = 'Select.Item'\n","import { cva } from 'class-variance-authority'\nimport { ChangeEvent, ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { useSelectContext } from './SelectContext'\n\nexport const styles = cva(\n [\n 'absolute left-0 top-0 size-full rounded-lg opacity-0',\n 'min-h-sz-44',\n // outline styles\n 'ring-1 outline-hidden ring-inset focus:ring-2',\n ],\n {\n variants: {\n state: {\n undefined: 'ring-outline focus:ring-outline-high',\n error: 'ring-error',\n alert: 'ring-alert',\n success: 'ring-success',\n },\n disabled: {\n true: 'cursor-not-allowed',\n },\n readOnly: {\n true: 'cursor-default',\n },\n },\n compoundVariants: [\n {\n disabled: false,\n state: undefined,\n class: 'hover:ring-outline-high',\n },\n ],\n }\n)\n\nexport const Items = ({\n children,\n className,\n ref,\n ...rest\n}: PropsWithChildren<ComponentPropsWithRef<'select'>>) => {\n const {\n state,\n disabled,\n readOnly,\n ariaLabel,\n fieldLabelId,\n isControlled,\n onValueChange,\n selectedItem,\n setValue,\n name,\n required,\n fieldId,\n } = useSelectContext()\n\n const handleChange = (event: ChangeEvent<HTMLSelectElement>) => {\n if (isControlled) {\n event.preventDefault()\n onValueChange?.(event.target.value)\n } else {\n setValue(event.target.value)\n }\n }\n\n return (\n <select\n data-spark-component=\"select-items\"\n ref={ref}\n disabled={disabled || readOnly}\n name={name}\n required={required}\n aria-labelledby={fieldLabelId}\n {...(ariaLabel && { 'aria-label': ariaLabel })}\n className={styles({ className, state, disabled, readOnly })}\n value={selectedItem?.value}\n onChange={handleChange}\n id={fieldId}\n {...rest}\n >\n {children}\n </select>\n )\n}\n\nItems.displayName = 'Select.Items'\n","import { useEffect } from 'react'\n\nimport { useSelectGroupContext } from './SelectItemsGroupContext'\n\ninterface LabelProps {\n children: string\n}\n\nexport const Label = ({ children }: LabelProps) => {\n const { setGroupLabel } = useSelectGroupContext()\n\n useEffect(() => {\n setGroupLabel(children)\n }, [children])\n\n return null\n}\n\nLabel.displayName = 'Select.Label'\n","import { Children, cloneElement, ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { iconStyles, IconVariantsProps } from './Icon.styles'\n\nexport interface IconProps extends IconVariantsProps, ComponentPropsWithoutRef<'svg'> {\n /**\n * The svg icon that will be wrapped\n */\n children: ReactNode\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label?: string\n}\n\nexport const Icon = ({\n label,\n className,\n size = 'current',\n intent = 'current',\n children,\n ...others\n}: IconProps) => {\n const child = Children.only(children)\n\n return (\n <>\n {cloneElement(child as ReactElement<Record<string, any>>, {\n className: iconStyles({ className, size, intent }),\n 'data-spark-component': 'icon',\n 'aria-hidden': 'true',\n focusable: 'false',\n ...others,\n })}\n\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </>\n )\n}\n\nIcon.displayName = 'Icon'\n","import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n","import { HTMLAttributes, PropsWithChildren, Ref } from 'react'\n\nimport { Slot } from '../slot'\n\nexport type VisuallyHiddenProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLElement>\n}\n\nexport const VisuallyHidden = ({ asChild = false, ref, ...props }: VisuallyHiddenProps) => {\n const Component = asChild ? Slot : 'span'\n\n return (\n <Component\n {...props}\n ref={ref}\n style={{\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n ...props.style,\n }}\n />\n )\n}\n\nVisuallyHidden.displayName = 'VisuallyHidden'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const iconStyles = cva(['fill-current shrink-0'], {\n variants: {\n /**\n * Color scheme of the icon.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['text-current'],\n main: ['text-main'],\n support: ['text-support'],\n accent: ['text-accent'],\n basic: ['text-basic'],\n success: ['text-success'],\n alert: ['text-alert'],\n error: ['text-error'],\n info: ['text-info'],\n neutral: ['text-neutral'],\n }),\n /**\n * Sets the size of the icon.\n */\n size: makeVariants<'size', ['current', 'sm', 'md', 'lg', 'xl']>({\n current: ['u-current-font-size'],\n sm: ['w-sz-16', 'h-sz-16'],\n md: ['w-sz-24', 'h-sz-24'],\n lg: ['w-sz-32', 'h-sz-32'],\n xl: ['w-sz-40', 'h-sz-40'],\n }),\n },\n})\n\nexport type IconVariantsProps = VariantProps<typeof iconStyles>\n","import { ReactElement } from 'react'\n\nimport { Icon } from '../icon'\n\nexport const LeadingIcon = ({ children }: { children: ReactElement }) => {\n return (\n <Icon size={'sm'} className=\"shrink-0\">\n {children}\n </Icon>\n )\n}\n\nLeadingIcon.displayName = 'Select.LeadingIcon'\n","import { type Ref, useEffect } from 'react'\n\nimport { useSelectContext } from './SelectContext'\n\nexport interface PlaceholderProps {\n disabled?: boolean\n children: string\n ref?: Ref<HTMLOptionElement>\n}\n\nexport const Placeholder = ({\n disabled = false,\n children,\n ref: forwardedRef,\n}: PlaceholderProps) => {\n const { setPlaceholder } = useSelectContext()\n\n useEffect(() => {\n setPlaceholder(children)\n }, [children])\n\n return (\n <option\n data-spark-component=\"select-placeholder\"\n ref={forwardedRef}\n key=\"placeholder\"\n value=\"\"\n disabled={disabled}\n >\n {children}\n </option>\n )\n}\n\nPlaceholder.displayName = 'Select.Placeholder'\n","import { ArrowHorizontalDown } from '@spark-ui/icons/ArrowHorizontalDown'\nimport { ReactNode, type Ref, useEffect } from 'react'\n\nimport { Icon } from '../icon'\nimport { useSelectContext } from './SelectContext'\nimport { styles } from './SelectTrigger.styles'\n\ninterface TriggerProps {\n 'aria-label'?: string\n children: ReactNode\n className?: string\n ref?: Ref<HTMLDivElement>\n}\n\n/**\n * This trigger acts as a fake button for the `select` tag.\n * It is not interactive.\n */\nexport const Trigger = ({\n 'aria-label': ariaLabel,\n children,\n className,\n ref: forwardedRef,\n}: TriggerProps) => {\n const { disabled, readOnly, state, setAriaLabel, itemsComponent } = useSelectContext()\n\n useEffect(() => {\n if (ariaLabel) {\n setAriaLabel(ariaLabel)\n }\n }, [ariaLabel])\n\n return (\n <div\n data-spark-component=\"select-trigger\"\n ref={forwardedRef}\n className={styles({ className, state, disabled, readOnly })}\n >\n <span className=\"gap-md flex items-center justify-start\">{children}</span>\n\n <Icon className=\"ml-md shrink-0\" size=\"sm\">\n <ArrowHorizontalDown />\n </Icon>\n\n {itemsComponent}\n </div>\n )\n}\n\nTrigger.displayName = 'Select.Trigger'\n","import { cva } from 'class-variance-authority'\n\nexport const styles = cva(\n [\n 'relative flex w-full items-center justify-between',\n 'min-h-sz-44 rounded-lg px-lg',\n 'text-body-1',\n // outline styles\n 'ring-1 outline-hidden ring-inset focus-within:ring-focus',\n ],\n {\n variants: {\n state: {\n undefined: 'ring-outline',\n error: 'ring-error',\n alert: 'ring-alert',\n success: 'ring-success',\n },\n disabled: {\n false: 'focus-within:ring-2',\n },\n readOnly: {\n true: '',\n },\n },\n compoundVariants: [\n {\n readOnly: false,\n disabled: false,\n class: 'bg-surface text-on-surface',\n },\n {\n readOnly: true,\n class: 'bg-on-surface/dim-5 text-on-surface cursor-default',\n },\n {\n disabled: true,\n class: ['bg-on-surface/dim-5 text-on-surface/dim-3', 'cursor-not-allowed'],\n },\n {\n disabled: false,\n state: undefined,\n class: 'default:hover:ring-outline-high',\n },\n ],\n }\n)\n","import { cx } from 'class-variance-authority'\nimport { ReactNode, type Ref } from 'react'\n\nimport { useSelectContext } from './SelectContext'\n\nexport interface ValueProps {\n children?: ReactNode\n className?: string\n /**\n * Optional placeholder value for the trigger.\n * If not specified, the value inside `Select.Placeholder` item will be used.\n */\n placeholder?: string\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const Value = ({\n children,\n className,\n placeholder: customPlaceholder,\n ref: forwardedRef,\n}: ValueProps) => {\n const { selectedItem, placeholder, disabled } = useSelectContext()\n\n const isPlaceholderSelected = selectedItem?.value == null\n const valuePlaceholder = customPlaceholder || placeholder\n\n return (\n <span\n role=\"presentation\"\n data-spark-component=\"select-value\"\n ref={forwardedRef}\n className={cx('flex shrink items-center text-left', className)}\n >\n <span\n className={cx(\n 'line-clamp-1 flex-1 overflow-hidden break-all text-ellipsis',\n isPlaceholderSelected && !disabled && 'text-on-surface/dim-1'\n )}\n >\n {isPlaceholderSelected ? valuePlaceholder : children || selectedItem?.text}\n </span>\n </span>\n )\n}\n\nValue.displayName = 'Select.Value'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,wBAAoC;AACpC,gCAAiC;AACjC,IAAAC,gBAUO;;;ACZP,mBAAqF;AAK9E,IAAM,cAAc,CAAC,aAAwB,CAAC,SAAiB;AACpE,QAAM,gBAAgB,sBAAS,QAAQ,QAAQ,EAAE,OAAO,2BAAc;AAEtE,SAAO,cAAc,KAAK,WAAS;AACjC,WAAO,sBAAsB,KAAK,GAAG,SAAS,IAAI;AAAA,EACpD,CAAC;AACH;AAEA,IAAM,wBAAwB,CAAC,YAA2B;AACxD,SAAO,UAAW,QAAQ,KAAuC,cAAc;AACjF;AAEA,IAAM,kBAAkB,CAAC,UAAqB,SAAuB,CAAC,MAAoB;AACxF,wBAAS,QAAQ,UAAU,WAAS;AAClC,QAAI,KAAC,6BAAe,KAAK,EAAG;AAE5B,QACE,sBAAsB,KAAK,MAAM,iBACjC,sBAAsB,KAAK,MAAM,sBACjC;AACA,YAAM,aAAa,MAAM;AACzB,aAAO,KAAK;AAAA,QACV,OAAO,WAAW;AAAA,QAClB,UAAU,CAAC,CAAC,WAAW;AAAA,QACvB,MAAM,WAAW;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,QAAK,MAAM,MAAkC,UAAU;AACrD,sBAAiB,MAAM,MAAkC,UAAU,MAAM;AAAA,IAC3E;AAAA,EACF,CAAC;AAED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,IAAAC,mCAAmB;AAkCb,IAAAC,uBAAA;AAlBC,IAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,KAAK;AACP,MAAkB;AAChB,QAAM,EAAE,cAAc,aAAa,SAAS,IAAI,iBAAiB;AAEjE,QAAM,wBAAwB,cAAc,SAAS;AACrD,QAAM,mBAAmB,qBAAqB;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,wBAAqB;AAAA,MACrB,KAAK;AAAA,MACL,eAAW,qCAAG,sCAAsC,SAAS;AAAA,MAE7D;AAAA,QAAC;AAAA;AAAA,UACC,eAAW;AAAA,YACT;AAAA,YACA,yBAAyB,CAAC,YAAY;AAAA,UACxC;AAAA,UAEC,kCAAwB,mBAAmB,YAAY,cAAc;AAAA;AAAA,MACxE;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,cAAc;;;AjBjCb,IAAMC,UAST,OAAO,OAAO,QAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,QAAO,cAAc;AACrB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,KAAK,cAAc;AACnB,YAAY,cAAc;AAC1B,MAAM,cAAc;AACpB,QAAQ,cAAc;AACtB,MAAM,cAAc;AACpB,YAAY,cAAc;","names":["Select","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_react","import_react","import_react","import_jsx_runtime","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_class_variance_authority","styles","import_jsx_runtime","styles","import_class_variance_authority","import_jsx_runtime","Select"]}
|