@vinyasa/form 1.0.22 → 1.0.23
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/cjs/autocomplete.cjs +709 -309
- package/dist/cjs/autocomplete.css +1 -1
- package/dist/cjs/checkbox.cjs +399 -244
- package/dist/cjs/checkbox.css +5 -1
- package/dist/cjs/color-picker.cjs +478 -325
- package/dist/cjs/color-picker.css +1 -1
- package/dist/cjs/combobox.cjs +574 -359
- package/dist/cjs/combobox.css +1 -1
- package/dist/cjs/date-picker.cjs +522 -322
- package/dist/cjs/date-picker.css +1 -1
- package/dist/cjs/dropzone.cjs +562 -391
- package/dist/cjs/dropzone.css +1 -1
- package/dist/cjs/field.cjs +353 -0
- package/dist/cjs/field.css +139 -0
- package/dist/cjs/file-upload.cjs +667 -380
- package/dist/cjs/file-upload.css +44 -1
- package/dist/cjs/index.cjs +3066 -2546
- package/dist/cjs/index.css +9 -1
- package/dist/cjs/input.cjs +220 -74
- package/dist/cjs/input.css +1 -1
- package/dist/cjs/multi-select.cjs +756 -400
- package/dist/cjs/multi-select.css +1 -1
- package/dist/cjs/number-input.cjs +267 -125
- package/dist/cjs/number-input.css +1 -1
- package/dist/cjs/otp-input.cjs +232 -85
- package/dist/cjs/otp-input.css +1 -1
- package/dist/cjs/password-input.cjs +239 -93
- package/dist/cjs/password-input.css +1 -1
- package/dist/cjs/radio-group.cjs +388 -246
- package/dist/cjs/radio-group.css +1 -1
- package/dist/cjs/range-slider.cjs +106 -62
- package/dist/cjs/rich-text-editor.cjs +549 -517
- package/dist/cjs/rich-text-editor.css +1 -1
- package/dist/cjs/search-input.cjs +244 -98
- package/dist/cjs/search-input.css +1 -1
- package/dist/cjs/select.cjs +485 -353
- package/dist/cjs/select.css +1 -1
- package/dist/cjs/slider.cjs +129 -155
- package/dist/cjs/switch.cjs +376 -239
- package/dist/cjs/switch.css +5 -1
- package/dist/cjs/tags-input.cjs +264 -113
- package/dist/cjs/tags-input.css +1 -1
- package/dist/cjs/textarea.cjs +225 -79
- package/dist/cjs/textarea.css +1 -1
- package/dist/cjs/time-picker.cjs +546 -371
- package/dist/cjs/time-picker.css +1 -1
- package/dist/cjs/toggle-button.cjs +18 -15
- package/dist/esm/{switch.css → 1485.css} +4 -0
- package/dist/esm/1485.js +28 -0
- package/dist/esm/{2995.css → 2315.css} +1 -1
- package/dist/esm/{2995.js → 2315.js} +96 -4
- package/dist/esm/2692.js +114 -0
- package/dist/esm/27.js +23 -27
- package/dist/esm/345.js +81 -0
- package/dist/esm/5074.js +66 -0
- package/dist/esm/5333.js +72 -0
- package/dist/esm/6982.js +35 -0
- package/dist/esm/7580.js +34 -0
- package/dist/esm/7678.js +101 -0
- package/dist/esm/7800.js +131 -0
- package/dist/esm/8479.js +115 -0
- package/dist/esm/{checkbox.css → 9167.css} +4 -0
- package/dist/esm/9167.js +30 -0
- package/dist/esm/9545.js +118 -0
- package/dist/esm/{2942.css → 9559.css} +43 -0
- package/dist/esm/9559.js +179 -0
- package/dist/esm/autocomplete.js +2 -95
- package/dist/esm/checkbox.js +1 -38
- package/dist/esm/color-picker.js +1 -130
- package/dist/esm/combobox.js +1 -126
- package/dist/esm/components/autocomplete/Autocomplete.d.ts +26 -16
- package/dist/esm/components/autocomplete/index.d.ts +1 -3
- package/dist/esm/components/checkbox/Checkbox.d.ts +12 -4
- package/dist/esm/components/checkbox/index.d.ts +1 -3
- package/dist/esm/components/color-picker/ColorPicker.d.ts +28 -21
- package/dist/esm/components/color-picker/index.d.ts +1 -3
- package/dist/esm/components/combobox/Combobox.d.ts +55 -29
- package/dist/esm/components/combobox/index.d.ts +1 -3
- package/dist/esm/components/date-picker/DatePicker.d.ts +28 -24
- package/dist/esm/components/date-picker/index.d.ts +1 -3
- package/dist/esm/components/dropzone/Dropzone.d.ts +52 -9
- package/dist/esm/components/dropzone/index.d.ts +1 -3
- package/dist/esm/components/field/Field.d.ts +106 -0
- package/dist/esm/components/field/index.d.ts +1 -0
- package/dist/esm/components/file-upload/FileUpload.d.ts +11 -18
- package/dist/esm/components/file-upload/index.d.ts +1 -3
- package/dist/esm/components/icon-button/IconButton.d.ts +1 -1
- package/dist/esm/components/input/Input.d.ts +3 -5
- package/dist/esm/components/multi-select/MultiSelect.d.ts +37 -30
- package/dist/esm/components/multi-select/index.d.ts +1 -3
- package/dist/esm/components/number-input/NumberInput.d.ts +3 -5
- package/dist/esm/components/otp-input/OtpInput.d.ts +2 -4
- package/dist/esm/components/password-input/PasswordInput.d.ts +3 -5
- package/dist/esm/components/radio-group/RadioGroup.d.ts +18 -10
- package/dist/esm/components/radio-group/index.d.ts +1 -3
- package/dist/esm/components/range-slider/RangeSlider.d.ts +1 -1
- package/dist/esm/components/rich-text-editor/RichTextEditor.d.ts +44 -7
- package/dist/esm/components/rich-text-editor/index.d.ts +1 -3
- package/dist/esm/components/search-input/SearchInput.d.ts +3 -5
- package/dist/esm/components/select/Select.d.ts +36 -23
- package/dist/esm/components/select/index.d.ts +1 -3
- package/dist/esm/components/slider/Slider.d.ts +17 -10
- package/dist/esm/components/slider/index.d.ts +1 -3
- package/dist/esm/components/switch/Switch.d.ts +10 -5
- package/dist/esm/components/switch/index.d.ts +1 -3
- package/dist/esm/components/tags-input/TagsInput.d.ts +3 -5
- package/dist/esm/components/textarea/Textarea.d.ts +3 -5
- package/dist/esm/components/time-picker/TimePicker.d.ts +31 -23
- package/dist/esm/components/time-picker/index.d.ts +1 -3
- package/dist/esm/date-picker.js +1 -118
- package/dist/esm/dropzone.js +1 -137
- package/dist/esm/field.d.ts +2 -24
- package/dist/esm/field.js +1 -0
- package/dist/esm/file-upload.js +2 -123
- package/dist/esm/index.d.ts +15 -14
- package/dist/esm/index.js +15 -14
- package/dist/esm/input.js +16 -25
- package/dist/esm/multi-select.js +2 -164
- package/dist/esm/number-input.js +65 -78
- package/dist/esm/otp-input.js +31 -38
- package/dist/esm/password-input.js +32 -41
- package/dist/esm/radio-group.js +1 -44
- package/dist/esm/range-slider.js +15 -8
- package/dist/esm/rich-text-editor.js +1 -212
- package/dist/esm/search-input.js +35 -44
- package/dist/esm/select.js +1 -87
- package/dist/esm/slider.js +1 -4
- package/dist/esm/switch.js +1 -36
- package/dist/esm/tags-input.js +51 -59
- package/dist/esm/textarea.js +22 -31
- package/dist/esm/time-picker.js +1 -137
- package/package.json +18 -9
- package/dist/esm/2942.js +0 -13
- package/dist/esm/4557.js +0 -39
- package/dist/esm/dropzone.css +0 -43
- /package/dist/esm/{date-picker.css → 2692.css} +0 -0
- /package/dist/esm/{select.css → 5333.css} +0 -0
- /package/dist/esm/{radio-group.css → 7580.css} +0 -0
- /package/dist/esm/{color-picker.css → 7678.css} +0 -0
- /package/dist/esm/{rich-text-editor.css → 9545.css} +0 -0
|
@@ -1,215 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
400 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
|
-
function toPrimitive(t, r) {
|
|
5
|
-
if ("object" != typeof t || !t) return t;
|
|
6
|
-
var e = t[Symbol.toPrimitive];
|
|
7
|
-
if (void 0 !== e) {
|
|
8
|
-
var i = e.call(t, r || "default");
|
|
9
|
-
if ("object" != typeof i) return i;
|
|
10
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
11
|
-
}
|
|
12
|
-
return ("string" === r ? String : Number)(t);
|
|
13
|
-
}
|
|
14
|
-
function toPropertyKey(t) {
|
|
15
|
-
var i = toPrimitive(t, "string");
|
|
16
|
-
return "symbol" == typeof i ? i : String(i);
|
|
17
|
-
}
|
|
18
|
-
function _defineProperty(obj, key, value) {
|
|
19
|
-
key = toPropertyKey(key);
|
|
20
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
21
|
-
value: value,
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true,
|
|
24
|
-
writable: true
|
|
25
|
-
});
|
|
26
|
-
else obj[key] = value;
|
|
27
|
-
return obj;
|
|
28
|
-
}
|
|
29
|
-
function ownKeys(e, r) {
|
|
30
|
-
var t = Object.keys(e);
|
|
31
|
-
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
33
|
-
r && (o = o.filter(function(r) {
|
|
34
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
35
|
-
})), t.push.apply(t, o);
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
}
|
|
39
|
-
function _objectSpread2(e) {
|
|
40
|
-
for(var r = 1; r < arguments.length; r++){
|
|
41
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
42
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
43
|
-
_defineProperty(e, r, t[r]);
|
|
44
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
45
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return e;
|
|
49
|
-
}
|
|
50
|
-
function mapValues(input, fn) {
|
|
51
|
-
var result = {};
|
|
52
|
-
for(var _key in input)result[_key] = fn(input[_key], _key);
|
|
53
|
-
return result;
|
|
54
|
-
}
|
|
55
|
-
var shouldApplyCompound = (compoundCheck, selections, defaultVariants)=>{
|
|
56
|
-
for (var key of Object.keys(compoundCheck)){
|
|
57
|
-
var _selections$key;
|
|
58
|
-
if (compoundCheck[key] !== (null != (_selections$key = selections[key]) ? _selections$key : defaultVariants[key])) return false;
|
|
59
|
-
}
|
|
60
|
-
return true;
|
|
61
|
-
};
|
|
62
|
-
var createRuntimeFn = (config)=>{
|
|
63
|
-
var runtimeFn = (options)=>{
|
|
64
|
-
var className = config.defaultClassName;
|
|
65
|
-
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
66
|
-
for(var variantName in selections){
|
|
67
|
-
var _selections$variantNa;
|
|
68
|
-
var variantSelection = null != (_selections$variantNa = selections[variantName]) ? _selections$variantNa : config.defaultVariants[variantName];
|
|
69
|
-
if (null != variantSelection) {
|
|
70
|
-
var selection = variantSelection;
|
|
71
|
-
if ('boolean' == typeof selection) selection = true === selection ? 'true' : 'false';
|
|
72
|
-
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
73
|
-
if (selectionClassName) className += ' ' + selectionClassName;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
for (var [compoundCheck, compoundClassName] of config.compoundVariants)if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += ' ' + compoundClassName;
|
|
77
|
-
return className;
|
|
78
|
-
};
|
|
79
|
-
runtimeFn.variants = ()=>Object.keys(config.variantClassNames);
|
|
80
|
-
runtimeFn.classNames = {
|
|
81
|
-
get base () {
|
|
82
|
-
return config.defaultClassName.split(' ')[0];
|
|
83
|
-
},
|
|
84
|
-
get variants () {
|
|
85
|
-
return mapValues(config.variantClassNames, (classNames)=>mapValues(classNames, (className)=>className.split(' ')[0]));
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
return runtimeFn;
|
|
89
|
-
};
|
|
90
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
91
|
-
c: ()=>createRuntimeFn
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
|
-
891 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
95
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
96
|
-
ij: ()=>descriptionText,
|
|
97
|
-
kc: ()=>errorText,
|
|
98
|
-
Ij: ()=>fieldControl,
|
|
99
|
-
Pf: ()=>label,
|
|
100
|
-
Zy: ()=>requiredMark
|
|
101
|
-
});
|
|
102
|
-
var createRuntimeFn_62c9670f_esm = __webpack_require__(400);
|
|
103
|
-
var descriptionText = 'sbqkrxd';
|
|
104
|
-
var errorText = 'sbqkrxe';
|
|
105
|
-
var fieldControl = (0, createRuntimeFn_62c9670f_esm.c)({
|
|
106
|
-
defaultClassName: 'sbqkrx0',
|
|
107
|
-
variantClassNames: {
|
|
108
|
-
size: {
|
|
109
|
-
sm: 'sbqkrx1',
|
|
110
|
-
md: 'sbqkrx2',
|
|
111
|
-
lg: 'sbqkrx3'
|
|
112
|
-
},
|
|
113
|
-
invalid: {
|
|
114
|
-
true: 'sbqkrx4'
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
defaultVariants: {
|
|
118
|
-
size: 'md'
|
|
119
|
-
},
|
|
120
|
-
compoundVariants: []
|
|
121
|
-
});
|
|
122
|
-
var label = 'sbqkrxb';
|
|
123
|
-
var requiredMark = 'sbqkrxc';
|
|
124
|
-
},
|
|
125
|
-
629 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
126
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
127
|
-
Qs: ()=>content,
|
|
128
|
-
Ie: ()=>empty,
|
|
129
|
-
AS: ()=>item,
|
|
130
|
-
p_: ()=>list
|
|
131
|
-
});
|
|
132
|
-
var content = '_1u69cbs0';
|
|
133
|
-
var empty = '_1u69cbs4';
|
|
134
|
-
var item = '_1u69cbs2';
|
|
135
|
-
var list = '_1u69cbs1';
|
|
136
|
-
},
|
|
137
|
-
140 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
138
|
-
var react_jsx_runtime__rspack_import_0 = __webpack_require__(732);
|
|
139
|
-
var _field_css__rspack_import_1 = __webpack_require__(891);
|
|
140
|
-
const describedByIds = (id, { description, error })=>{
|
|
141
|
-
const ids = [];
|
|
142
|
-
if (description) ids.push(`${id}-description`);
|
|
143
|
-
if (error) ids.push(`${id}-error`);
|
|
144
|
-
return ids.length > 0 ? ids.join(' ') : void 0;
|
|
145
|
-
};
|
|
146
|
-
const FieldChrome = ({ id, label, description, error, required, children, disableLabelFor = false })=>/*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsxs)("div", {
|
|
147
|
-
children: [
|
|
148
|
-
label ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsxs)("label", {
|
|
149
|
-
htmlFor: disableLabelFor ? void 0 : id,
|
|
150
|
-
id: `${id}-label`,
|
|
151
|
-
className: _field_css__rspack_import_1.Pf,
|
|
152
|
-
children: [
|
|
153
|
-
label,
|
|
154
|
-
required ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("span", {
|
|
155
|
-
className: _field_css__rspack_import_1.Zy,
|
|
156
|
-
"aria-hidden": "true",
|
|
157
|
-
children: "*"
|
|
158
|
-
}) : null
|
|
159
|
-
]
|
|
160
|
-
}) : null,
|
|
161
|
-
children,
|
|
162
|
-
description ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", {
|
|
163
|
-
id: `${id}-description`,
|
|
164
|
-
className: _field_css__rspack_import_1.ij,
|
|
165
|
-
children: description
|
|
166
|
-
}) : null,
|
|
167
|
-
error ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", {
|
|
168
|
-
id: `${id}-error`,
|
|
169
|
-
className: _field_css__rspack_import_1.kc,
|
|
170
|
-
role: "alert",
|
|
171
|
-
children: error
|
|
172
|
-
}) : null
|
|
173
|
-
]
|
|
174
|
-
});
|
|
175
|
-
const __rspack_default_export = FieldChrome;
|
|
176
|
-
__webpack_require__.d(__webpack_exports__, {}, {
|
|
177
|
-
A: __rspack_default_export,
|
|
178
|
-
z: describedByIds
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
283 (module) {
|
|
182
|
-
module.exports = require("@radix-ui/react-popover");
|
|
183
|
-
},
|
|
184
|
-
817 (module) {
|
|
185
|
-
module.exports = require("cmdk");
|
|
186
|
-
},
|
|
187
|
-
15 (module) {
|
|
188
|
-
module.exports = require("react");
|
|
189
|
-
},
|
|
190
|
-
732 (module) {
|
|
191
|
-
module.exports = require("react/jsx-runtime");
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
var __webpack_module_cache__ = {};
|
|
195
|
-
function __webpack_require__(moduleId) {
|
|
196
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
197
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
198
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
199
|
-
exports: {}
|
|
200
|
-
};
|
|
201
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
202
|
-
return module.exports;
|
|
203
|
-
}
|
|
204
|
-
(()=>{
|
|
205
|
-
__webpack_require__.n = (module)=>{
|
|
206
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
207
|
-
__webpack_require__.d(getter, {
|
|
208
|
-
a: getter
|
|
209
|
-
});
|
|
210
|
-
return getter;
|
|
211
|
-
};
|
|
212
|
-
})();
|
|
2
|
+
var __webpack_require__ = {};
|
|
213
3
|
(()=>{
|
|
214
4
|
__webpack_require__.d = (exports1, getters, values)=>{
|
|
215
5
|
var define = (defs, kind)=>{
|
|
@@ -236,108 +26,718 @@ function __webpack_require__(moduleId) {
|
|
|
236
26
|
};
|
|
237
27
|
})();
|
|
238
28
|
var __webpack_exports__ = {};
|
|
239
|
-
(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
Autocomplete: ()=>Autocomplete,
|
|
32
|
+
AutocompleteContent: ()=>AutocompleteContent,
|
|
33
|
+
AutocompleteEmpty: ()=>ComboboxEmpty,
|
|
34
|
+
AutocompleteInput: ()=>AutocompleteInput,
|
|
35
|
+
AutocompleteItem: ()=>AutocompleteItem,
|
|
36
|
+
AutocompleteList: ()=>ComboboxList
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
const react_popover_namespaceObject = require("@radix-ui/react-popover");
|
|
40
|
+
const external_cmdk_namespaceObject = require("cmdk");
|
|
41
|
+
const external_react_namespaceObject = require("react");
|
|
42
|
+
function toPrimitive(t, r) {
|
|
43
|
+
if ("object" != typeof t || !t) return t;
|
|
44
|
+
var e = t[Symbol.toPrimitive];
|
|
45
|
+
if (void 0 !== e) {
|
|
46
|
+
var i = e.call(t, r || "default");
|
|
47
|
+
if ("object" != typeof i) return i;
|
|
48
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
49
|
+
}
|
|
50
|
+
return ("string" === r ? String : Number)(t);
|
|
51
|
+
}
|
|
52
|
+
function toPropertyKey(t) {
|
|
53
|
+
var i = toPrimitive(t, "string");
|
|
54
|
+
return "symbol" == typeof i ? i : String(i);
|
|
55
|
+
}
|
|
56
|
+
function _defineProperty(obj, key, value) {
|
|
57
|
+
key = toPropertyKey(key);
|
|
58
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
59
|
+
value: value,
|
|
60
|
+
enumerable: true,
|
|
61
|
+
configurable: true,
|
|
62
|
+
writable: true
|
|
243
63
|
});
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
label: label,
|
|
265
|
-
description: description,
|
|
266
|
-
error: error,
|
|
267
|
-
required: required,
|
|
268
|
-
disableLabelFor: true,
|
|
269
|
-
children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(external_cmdk_.Command, {
|
|
270
|
-
loop: true,
|
|
271
|
-
shouldFilter: true,
|
|
272
|
-
label: 'string' == typeof label ? label : void 0,
|
|
273
|
-
children: /*#__PURE__*/ (0, jsx_runtime_.jsxs)(react_popover_.Root, {
|
|
274
|
-
open: open,
|
|
275
|
-
onOpenChange: setOpen,
|
|
276
|
-
children: [
|
|
277
|
-
/*#__PURE__*/ (0, jsx_runtime_.jsx)(react_popover_.Trigger, {
|
|
278
|
-
asChild: true,
|
|
279
|
-
children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(external_cmdk_.Command.Input, {
|
|
280
|
-
id: id,
|
|
281
|
-
value: currentValue,
|
|
282
|
-
onClick: (event)=>{
|
|
283
|
-
event.preventDefault();
|
|
284
|
-
},
|
|
285
|
-
onValueChange: (next)=>{
|
|
286
|
-
setValue(next);
|
|
287
|
-
setOpen(true);
|
|
288
|
-
},
|
|
289
|
-
onFocus: ()=>{
|
|
290
|
-
setOpen(true);
|
|
291
|
-
},
|
|
292
|
-
placeholder: placeholder,
|
|
293
|
-
className: (0, field_css.Ij)({
|
|
294
|
-
size,
|
|
295
|
-
invalid: Boolean(error)
|
|
296
|
-
}),
|
|
297
|
-
"aria-describedby": (0, field.z)(id, {
|
|
298
|
-
description,
|
|
299
|
-
error
|
|
300
|
-
})
|
|
301
|
-
})
|
|
302
|
-
}),
|
|
303
|
-
/*#__PURE__*/ (0, jsx_runtime_.jsx)(react_popover_.Content, {
|
|
304
|
-
className: selectPopover_css.Qs,
|
|
305
|
-
align: "start",
|
|
306
|
-
sideOffset: 4,
|
|
307
|
-
onOpenAutoFocus: (event)=>{
|
|
308
|
-
event.preventDefault();
|
|
309
|
-
},
|
|
310
|
-
children: /*#__PURE__*/ (0, jsx_runtime_.jsxs)(external_cmdk_.Command.List, {
|
|
311
|
-
className: selectPopover_css.p_,
|
|
312
|
-
children: [
|
|
313
|
-
/*#__PURE__*/ (0, jsx_runtime_.jsx)(external_cmdk_.Command.Empty, {
|
|
314
|
-
className: selectPopover_css.Ie,
|
|
315
|
-
children: emptyMessage
|
|
316
|
-
}),
|
|
317
|
-
suggestions.map((suggestion)=>/*#__PURE__*/ (0, jsx_runtime_.jsx)(external_cmdk_.Command.Item, {
|
|
318
|
-
value: suggestion,
|
|
319
|
-
onSelect: ()=>{
|
|
320
|
-
setValue(suggestion);
|
|
321
|
-
setOpen(false);
|
|
322
|
-
},
|
|
323
|
-
className: selectPopover_css.AS,
|
|
324
|
-
children: suggestion
|
|
325
|
-
}, suggestion))
|
|
326
|
-
]
|
|
327
|
-
})
|
|
328
|
-
})
|
|
329
|
-
]
|
|
330
|
-
})
|
|
331
|
-
})
|
|
64
|
+
else obj[key] = value;
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
function createRuntimeFn_62c9670f_esm_ownKeys(e, r) {
|
|
68
|
+
var t = Object.keys(e);
|
|
69
|
+
if (Object.getOwnPropertySymbols) {
|
|
70
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
71
|
+
r && (o = o.filter(function(r) {
|
|
72
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
73
|
+
})), t.push.apply(t, o);
|
|
74
|
+
}
|
|
75
|
+
return t;
|
|
76
|
+
}
|
|
77
|
+
function _objectSpread2(e) {
|
|
78
|
+
for(var r = 1; r < arguments.length; r++){
|
|
79
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
80
|
+
r % 2 ? createRuntimeFn_62c9670f_esm_ownKeys(Object(t), !0).forEach(function(r) {
|
|
81
|
+
_defineProperty(e, r, t[r]);
|
|
82
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : createRuntimeFn_62c9670f_esm_ownKeys(Object(t)).forEach(function(r) {
|
|
83
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
332
84
|
});
|
|
85
|
+
}
|
|
86
|
+
return e;
|
|
87
|
+
}
|
|
88
|
+
function mapValues(input, fn) {
|
|
89
|
+
var result = {};
|
|
90
|
+
for(var _key in input)result[_key] = fn(input[_key], _key);
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
var shouldApplyCompound = (compoundCheck, selections, defaultVariants)=>{
|
|
94
|
+
for (var key of Object.keys(compoundCheck)){
|
|
95
|
+
var _selections$key;
|
|
96
|
+
if (compoundCheck[key] !== (null != (_selections$key = selections[key]) ? _selections$key : defaultVariants[key])) return false;
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
};
|
|
100
|
+
var createRuntimeFn = (config)=>{
|
|
101
|
+
var runtimeFn = (options)=>{
|
|
102
|
+
var className = config.defaultClassName;
|
|
103
|
+
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
104
|
+
for(var variantName in selections){
|
|
105
|
+
var _selections$variantNa;
|
|
106
|
+
var variantSelection = null != (_selections$variantNa = selections[variantName]) ? _selections$variantNa : config.defaultVariants[variantName];
|
|
107
|
+
if (null != variantSelection) {
|
|
108
|
+
var selection = variantSelection;
|
|
109
|
+
if ('boolean' == typeof selection) selection = true === selection ? 'true' : 'false';
|
|
110
|
+
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
111
|
+
if (selectionClassName) className += ' ' + selectionClassName;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
for (var [compoundCheck, compoundClassName] of config.compoundVariants)if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += ' ' + compoundClassName;
|
|
115
|
+
return className;
|
|
333
116
|
};
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
117
|
+
runtimeFn.variants = ()=>Object.keys(config.variantClassNames);
|
|
118
|
+
runtimeFn.classNames = {
|
|
119
|
+
get base () {
|
|
120
|
+
return config.defaultClassName.split(' ')[0];
|
|
121
|
+
},
|
|
122
|
+
get variants () {
|
|
123
|
+
return mapValues(config.variantClassNames, (classNames)=>mapValues(classNames, (className)=>className.split(' ')[0]));
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
return runtimeFn;
|
|
127
|
+
};
|
|
128
|
+
var descriptionText = 'sbqkrxd';
|
|
129
|
+
var errorText = 'sbqkrxe';
|
|
130
|
+
var fieldControl = createRuntimeFn({
|
|
131
|
+
defaultClassName: 'sbqkrx0',
|
|
132
|
+
variantClassNames: {
|
|
133
|
+
size: {
|
|
134
|
+
sm: 'sbqkrx1',
|
|
135
|
+
md: 'sbqkrx2',
|
|
136
|
+
lg: 'sbqkrx3'
|
|
137
|
+
},
|
|
138
|
+
invalid: {
|
|
139
|
+
true: 'sbqkrx4'
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
defaultVariants: {
|
|
143
|
+
size: 'md'
|
|
144
|
+
},
|
|
145
|
+
compoundVariants: []
|
|
146
|
+
});
|
|
147
|
+
var label = 'sbqkrxb';
|
|
148
|
+
var requiredMark = 'sbqkrxc';
|
|
149
|
+
var content = '_1u69cbs0';
|
|
150
|
+
var empty = '_1u69cbs4';
|
|
151
|
+
var item = '_1u69cbs2';
|
|
152
|
+
var itemIndicator = '_1u69cbs3';
|
|
153
|
+
var list = '_1u69cbs1';
|
|
154
|
+
var searchIcon = '_1u69cbsa';
|
|
155
|
+
var searchInput = '_1u69cbsb';
|
|
156
|
+
var searchWrapper = '_1u69cbs9';
|
|
157
|
+
var trigger = '_1u69cbs6';
|
|
158
|
+
var triggerIcon = '_1u69cbs7';
|
|
159
|
+
var triggerText = '_1u69cbs8';
|
|
160
|
+
const icons_namespaceObject = require("@vinyasa/icons");
|
|
161
|
+
const react_slot_namespaceObject = require("@radix-ui/react-slot");
|
|
162
|
+
function _define_property(obj, key, value) {
|
|
163
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
164
|
+
value: value,
|
|
165
|
+
enumerable: true,
|
|
166
|
+
configurable: true,
|
|
167
|
+
writable: true
|
|
168
|
+
});
|
|
169
|
+
else obj[key] = value;
|
|
170
|
+
return obj;
|
|
171
|
+
}
|
|
172
|
+
function _object_spread(target) {
|
|
173
|
+
for(var i = 1; i < arguments.length; i++){
|
|
174
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
175
|
+
var ownKeys = Object.keys(source);
|
|
176
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
177
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
178
|
+
}));
|
|
179
|
+
ownKeys.forEach(function(key) {
|
|
180
|
+
_define_property(target, key, source[key]);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
return target;
|
|
184
|
+
}
|
|
185
|
+
function Field_ownKeys(object, enumerableOnly) {
|
|
186
|
+
var keys = Object.keys(object);
|
|
187
|
+
if (Object.getOwnPropertySymbols) {
|
|
188
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
189
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
190
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
191
|
+
});
|
|
192
|
+
keys.push.apply(keys, symbols);
|
|
193
|
+
}
|
|
194
|
+
return keys;
|
|
195
|
+
}
|
|
196
|
+
function _object_spread_props(target, source) {
|
|
197
|
+
source = null != source ? source : {};
|
|
198
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
199
|
+
else Field_ownKeys(Object(source)).forEach(function(key) {
|
|
200
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
201
|
+
});
|
|
202
|
+
return target;
|
|
203
|
+
}
|
|
204
|
+
function _object_without_properties(source, excluded) {
|
|
205
|
+
if (null == source) return {};
|
|
206
|
+
var target = {}, sourceKeys, key, i;
|
|
207
|
+
if ("u" > typeof Reflect && Reflect.ownKeys) {
|
|
208
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
209
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
210
|
+
key = sourceKeys[i];
|
|
211
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
212
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return target;
|
|
216
|
+
}
|
|
217
|
+
target = _object_without_properties_loose(source, excluded);
|
|
218
|
+
if (Object.getOwnPropertySymbols) {
|
|
219
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
220
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
221
|
+
key = sourceKeys[i];
|
|
222
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
223
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return target;
|
|
228
|
+
}
|
|
229
|
+
function _object_without_properties_loose(source, excluded) {
|
|
230
|
+
if (null == source) return {};
|
|
231
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
232
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
233
|
+
key = sourceKeys[i];
|
|
234
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
235
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return target;
|
|
239
|
+
}
|
|
240
|
+
const FieldContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
|
|
241
|
+
const useFieldContext = ()=>(0, external_react_namespaceObject.useContext)(FieldContext);
|
|
242
|
+
const useResolvedFieldProps = (props)=>{
|
|
243
|
+
var _ref, _props_id, _ref1, _props_invalid, _props_describedBy;
|
|
244
|
+
const context = useFieldContext();
|
|
245
|
+
const generatedId = (0, external_react_namespaceObject.useId)();
|
|
246
|
+
return {
|
|
247
|
+
id: null != (_ref = null != (_props_id = props.id) ? _props_id : null == context ? void 0 : context.id) ? _ref : generatedId,
|
|
248
|
+
invalid: null != (_ref1 = null != (_props_invalid = props.invalid) ? _props_invalid : null == context ? void 0 : context.invalid) ? _ref1 : false,
|
|
249
|
+
describedBy: null != (_props_describedBy = props.describedBy) ? _props_describedBy : null == context ? void 0 : context.describedBy
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
const Field = (_0)=>{
|
|
253
|
+
let { invalid = false, children } = _0, rest = _object_without_properties(_0, [
|
|
254
|
+
"invalid",
|
|
255
|
+
"children"
|
|
256
|
+
]);
|
|
257
|
+
const generatedId = (0, external_react_namespaceObject.useId)();
|
|
258
|
+
const descriptionId = `${generatedId}-description`;
|
|
259
|
+
const errorId = `${generatedId}-error`;
|
|
260
|
+
const labelId = `${generatedId}-label`;
|
|
261
|
+
const directChildren = external_react_namespaceObject.Children.toArray(children).filter(external_react_namespaceObject.isValidElement);
|
|
262
|
+
const describedByIds = directChildren.reduce((ids, child)=>{
|
|
263
|
+
if (child.type === FieldDescription) ids.push(descriptionId);
|
|
264
|
+
if (child.type === FieldError) ids.push(errorId);
|
|
265
|
+
return ids;
|
|
266
|
+
}, []);
|
|
267
|
+
const labelChild = directChildren.find((child)=>child.type === FieldLabel);
|
|
268
|
+
const labelChildText = labelChild && 'string' == typeof labelChild.props.children ? labelChild.props.children : void 0;
|
|
269
|
+
const value = {
|
|
270
|
+
id: generatedId,
|
|
271
|
+
descriptionId,
|
|
272
|
+
errorId,
|
|
273
|
+
describedBy: describedByIds.length > 0 ? describedByIds.join(' ') : void 0,
|
|
274
|
+
invalid,
|
|
275
|
+
labelId: labelChild ? labelId : void 0,
|
|
276
|
+
labelText: labelChildText
|
|
277
|
+
};
|
|
278
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FieldContext.Provider, {
|
|
279
|
+
value: value,
|
|
280
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", _object_spread_props(_object_spread({}, rest), {
|
|
281
|
+
children: children
|
|
282
|
+
}))
|
|
283
|
+
});
|
|
284
|
+
};
|
|
285
|
+
Field.displayName = 'Field';
|
|
286
|
+
const FieldLabel = (_0)=>{
|
|
287
|
+
let { required, htmlFor, id, children } = _0, rest = _object_without_properties(_0, [
|
|
288
|
+
"required",
|
|
289
|
+
"htmlFor",
|
|
290
|
+
"id",
|
|
291
|
+
"children"
|
|
292
|
+
]);
|
|
293
|
+
const context = useFieldContext();
|
|
294
|
+
const resolvedHtmlFor = false === htmlFor ? void 0 : null != htmlFor ? htmlFor : null == context ? void 0 : context.id;
|
|
295
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("label", _object_spread_props(_object_spread({
|
|
296
|
+
htmlFor: resolvedHtmlFor,
|
|
297
|
+
id: null != id ? id : null == context ? void 0 : context.labelId,
|
|
298
|
+
className: label
|
|
299
|
+
}, rest), {
|
|
300
|
+
children: [
|
|
301
|
+
children,
|
|
302
|
+
required ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
303
|
+
className: requiredMark,
|
|
304
|
+
"aria-hidden": "true",
|
|
305
|
+
children: "*"
|
|
306
|
+
}) : null
|
|
307
|
+
]
|
|
308
|
+
}));
|
|
309
|
+
};
|
|
310
|
+
FieldLabel.displayName = 'FieldLabel';
|
|
311
|
+
const FieldControl = (_0)=>{
|
|
312
|
+
let { children } = _0, rest = _object_without_properties(_0, [
|
|
313
|
+
"children"
|
|
314
|
+
]);
|
|
315
|
+
const context = useFieldContext();
|
|
316
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_slot_namespaceObject.Slot, _object_spread_props(_object_spread({
|
|
317
|
+
id: null == context ? void 0 : context.id,
|
|
318
|
+
"aria-describedby": null == context ? void 0 : context.describedBy,
|
|
319
|
+
"aria-invalid": null == context ? void 0 : context.invalid
|
|
320
|
+
}, rest), {
|
|
321
|
+
children: children
|
|
322
|
+
}));
|
|
323
|
+
};
|
|
324
|
+
FieldControl.displayName = 'FieldControl';
|
|
325
|
+
const FieldDescription = (_0)=>{
|
|
326
|
+
let { id } = _0, rest = _object_without_properties(_0, [
|
|
327
|
+
"id"
|
|
328
|
+
]);
|
|
329
|
+
const context = useFieldContext();
|
|
330
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", _object_spread({
|
|
331
|
+
id: null != id ? id : null == context ? void 0 : context.descriptionId,
|
|
332
|
+
className: descriptionText
|
|
333
|
+
}, rest));
|
|
334
|
+
};
|
|
335
|
+
FieldDescription.displayName = "FieldDescription";
|
|
336
|
+
const FieldError = (_0)=>{
|
|
337
|
+
let { id } = _0, rest = _object_without_properties(_0, [
|
|
338
|
+
"id"
|
|
339
|
+
]);
|
|
340
|
+
const context = useFieldContext();
|
|
341
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", _object_spread({
|
|
342
|
+
id: null != id ? id : null == context ? void 0 : context.errorId,
|
|
343
|
+
className: errorText,
|
|
344
|
+
role: "alert"
|
|
345
|
+
}, rest));
|
|
346
|
+
};
|
|
347
|
+
FieldError.displayName = 'FieldError';
|
|
348
|
+
function Combobox_define_property(obj, key, value) {
|
|
349
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
350
|
+
value: value,
|
|
351
|
+
enumerable: true,
|
|
352
|
+
configurable: true,
|
|
353
|
+
writable: true
|
|
354
|
+
});
|
|
355
|
+
else obj[key] = value;
|
|
356
|
+
return obj;
|
|
357
|
+
}
|
|
358
|
+
function Combobox_object_spread(target) {
|
|
359
|
+
for(var i = 1; i < arguments.length; i++){
|
|
360
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
361
|
+
var ownKeys = Object.keys(source);
|
|
362
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
363
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
364
|
+
}));
|
|
365
|
+
ownKeys.forEach(function(key) {
|
|
366
|
+
Combobox_define_property(target, key, source[key]);
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
return target;
|
|
370
|
+
}
|
|
371
|
+
function Combobox_ownKeys(object, enumerableOnly) {
|
|
372
|
+
var keys = Object.keys(object);
|
|
373
|
+
if (Object.getOwnPropertySymbols) {
|
|
374
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
375
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
376
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
377
|
+
});
|
|
378
|
+
keys.push.apply(keys, symbols);
|
|
379
|
+
}
|
|
380
|
+
return keys;
|
|
381
|
+
}
|
|
382
|
+
function Combobox_object_spread_props(target, source) {
|
|
383
|
+
source = null != source ? source : {};
|
|
384
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
385
|
+
else Combobox_ownKeys(Object(source)).forEach(function(key) {
|
|
386
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
387
|
+
});
|
|
388
|
+
return target;
|
|
389
|
+
}
|
|
390
|
+
function Combobox_object_without_properties(source, excluded) {
|
|
391
|
+
if (null == source) return {};
|
|
392
|
+
var target = {}, sourceKeys, key, i;
|
|
393
|
+
if ("u" > typeof Reflect && Reflect.ownKeys) {
|
|
394
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
395
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
396
|
+
key = sourceKeys[i];
|
|
397
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
398
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return target;
|
|
402
|
+
}
|
|
403
|
+
target = Combobox_object_without_properties_loose(source, excluded);
|
|
404
|
+
if (Object.getOwnPropertySymbols) {
|
|
405
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
406
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
407
|
+
key = sourceKeys[i];
|
|
408
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
409
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return target;
|
|
414
|
+
}
|
|
415
|
+
function Combobox_object_without_properties_loose(source, excluded) {
|
|
416
|
+
if (null == source) return {};
|
|
417
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
418
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
419
|
+
key = sourceKeys[i];
|
|
420
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
421
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return target;
|
|
425
|
+
}
|
|
426
|
+
const ComboboxOpenContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
|
|
427
|
+
const Combobox = (_0)=>{
|
|
428
|
+
let { open, defaultOpen, onOpenChange, children } = _0, rest = Combobox_object_without_properties(_0, [
|
|
429
|
+
"open",
|
|
430
|
+
"defaultOpen",
|
|
431
|
+
"onOpenChange",
|
|
432
|
+
"children"
|
|
433
|
+
]);
|
|
434
|
+
const [internalOpen, setInternalOpen] = (0, external_react_namespaceObject.useState)(null != defaultOpen ? defaultOpen : false);
|
|
435
|
+
const isControlled = void 0 !== open;
|
|
436
|
+
const currentOpen = isControlled ? open : internalOpen;
|
|
437
|
+
const handleOpenChange = (next)=>{
|
|
438
|
+
if (!isControlled) setInternalOpen(next);
|
|
439
|
+
null == onOpenChange || onOpenChange(next);
|
|
440
|
+
};
|
|
441
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ComboboxOpenContext.Provider, {
|
|
442
|
+
value: handleOpenChange,
|
|
443
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Root, Combobox_object_spread_props(Combobox_object_spread({
|
|
444
|
+
open: currentOpen,
|
|
445
|
+
onOpenChange: handleOpenChange
|
|
446
|
+
}, rest), {
|
|
447
|
+
children: children
|
|
448
|
+
}))
|
|
449
|
+
});
|
|
450
|
+
};
|
|
451
|
+
Combobox.displayName = 'Combobox';
|
|
452
|
+
const ComboboxTrigger = (_0)=>{
|
|
453
|
+
let { invalid, size, id: idProp, className } = _0, rest = Combobox_object_without_properties(_0, [
|
|
454
|
+
"invalid",
|
|
455
|
+
"size",
|
|
456
|
+
"id",
|
|
457
|
+
"className"
|
|
458
|
+
]);
|
|
459
|
+
const { id, invalid: isInvalid, describedBy } = useResolvedFieldProps({
|
|
460
|
+
id: idProp,
|
|
461
|
+
invalid
|
|
462
|
+
});
|
|
463
|
+
const base = `${fieldControl({
|
|
464
|
+
size,
|
|
465
|
+
invalid: isInvalid
|
|
466
|
+
})} ${trigger}`;
|
|
467
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Trigger, Combobox_object_spread({
|
|
468
|
+
id: id,
|
|
469
|
+
className: className ? `${base} ${className}` : base,
|
|
470
|
+
"aria-invalid": isInvalid,
|
|
471
|
+
"aria-describedby": describedBy
|
|
472
|
+
}, rest));
|
|
473
|
+
};
|
|
474
|
+
ComboboxTrigger.displayName = 'ComboboxTrigger';
|
|
475
|
+
const ComboboxValue = (_0)=>{
|
|
476
|
+
let { className } = _0, rest = Combobox_object_without_properties(_0, [
|
|
477
|
+
"className"
|
|
478
|
+
]);
|
|
479
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Combobox_object_spread({
|
|
480
|
+
className: className ? `${triggerText} ${className}` : triggerText
|
|
481
|
+
}, rest));
|
|
482
|
+
};
|
|
483
|
+
ComboboxValue.displayName = 'ComboboxValue';
|
|
484
|
+
const ComboboxIcon = (_0)=>{
|
|
485
|
+
let { className, children } = _0, rest = Combobox_object_without_properties(_0, [
|
|
486
|
+
"className",
|
|
487
|
+
"children"
|
|
488
|
+
]);
|
|
489
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Combobox_object_spread_props(Combobox_object_spread({
|
|
490
|
+
className: className ? `${triggerIcon} ${className}` : triggerIcon,
|
|
491
|
+
"aria-hidden": "true"
|
|
492
|
+
}, rest), {
|
|
493
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ChevronDownIcon, {})
|
|
494
|
+
}));
|
|
495
|
+
};
|
|
496
|
+
ComboboxIcon.displayName = 'ComboboxIcon';
|
|
497
|
+
const ComboboxContent = (_0)=>{
|
|
498
|
+
let { className, children } = _0, rest = Combobox_object_without_properties(_0, [
|
|
499
|
+
"className",
|
|
500
|
+
"children"
|
|
501
|
+
]);
|
|
502
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Content, Combobox_object_spread_props(Combobox_object_spread({
|
|
503
|
+
className: className ? `${content} ${className}` : content,
|
|
504
|
+
align: "start",
|
|
505
|
+
sideOffset: 4
|
|
506
|
+
}, rest), {
|
|
507
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command, {
|
|
508
|
+
loop: true,
|
|
509
|
+
label: "Search options",
|
|
510
|
+
children: children
|
|
511
|
+
})
|
|
512
|
+
}));
|
|
513
|
+
};
|
|
514
|
+
ComboboxContent.displayName = 'ComboboxContent';
|
|
515
|
+
const ComboboxInput = (_0)=>{
|
|
516
|
+
let { className } = _0, rest = Combobox_object_without_properties(_0, [
|
|
517
|
+
"className"
|
|
518
|
+
]);
|
|
519
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
520
|
+
className: searchWrapper,
|
|
521
|
+
children: [
|
|
522
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
523
|
+
className: searchIcon,
|
|
524
|
+
"aria-hidden": "true",
|
|
525
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.SearchIcon, {})
|
|
526
|
+
}),
|
|
527
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Input, Combobox_object_spread({
|
|
528
|
+
autoFocus: true,
|
|
529
|
+
placeholder: "Search…",
|
|
530
|
+
className: className ? `${searchInput} ${className}` : searchInput
|
|
531
|
+
}, rest))
|
|
532
|
+
]
|
|
533
|
+
});
|
|
534
|
+
};
|
|
535
|
+
ComboboxInput.displayName = 'ComboboxInput';
|
|
536
|
+
const ComboboxList = (_0)=>{
|
|
537
|
+
let { className } = _0, rest = Combobox_object_without_properties(_0, [
|
|
538
|
+
"className"
|
|
539
|
+
]);
|
|
540
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.List, Combobox_object_spread({
|
|
541
|
+
className: className ? `${list} ${className}` : list
|
|
542
|
+
}, rest));
|
|
543
|
+
};
|
|
544
|
+
ComboboxList.displayName = 'ComboboxList';
|
|
545
|
+
const ComboboxItem = (_0)=>{
|
|
546
|
+
let { className, onSelect } = _0, rest = Combobox_object_without_properties(_0, [
|
|
547
|
+
"className",
|
|
548
|
+
"onSelect"
|
|
549
|
+
]);
|
|
550
|
+
const setOpen = (0, external_react_namespaceObject.useContext)(ComboboxOpenContext);
|
|
551
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Item, Combobox_object_spread({
|
|
552
|
+
className: className ? `${item} ${className}` : item,
|
|
553
|
+
onSelect: (value)=>{
|
|
554
|
+
null == onSelect || onSelect(value);
|
|
555
|
+
null == setOpen || setOpen(false);
|
|
556
|
+
}
|
|
557
|
+
}, rest));
|
|
558
|
+
};
|
|
559
|
+
ComboboxItem.displayName = 'ComboboxItem';
|
|
560
|
+
const ComboboxItemIndicator = (_0)=>{
|
|
561
|
+
let { className, children } = _0, rest = Combobox_object_without_properties(_0, [
|
|
562
|
+
"className",
|
|
563
|
+
"children"
|
|
564
|
+
]);
|
|
565
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Combobox_object_spread_props(Combobox_object_spread({
|
|
566
|
+
className: className ? `${itemIndicator} ${className}` : itemIndicator
|
|
567
|
+
}, rest), {
|
|
568
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CheckIcon, {})
|
|
569
|
+
}));
|
|
570
|
+
};
|
|
571
|
+
ComboboxItemIndicator.displayName = 'ComboboxItemIndicator';
|
|
572
|
+
const ComboboxEmpty = (_0)=>{
|
|
573
|
+
let { className } = _0, rest = Combobox_object_without_properties(_0, [
|
|
574
|
+
"className"
|
|
575
|
+
]);
|
|
576
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Empty, Combobox_object_spread({
|
|
577
|
+
className: className ? `${empty} ${className}` : empty
|
|
578
|
+
}, rest));
|
|
579
|
+
};
|
|
580
|
+
ComboboxEmpty.displayName = 'ComboboxEmpty';
|
|
581
|
+
function Autocomplete_define_property(obj, key, value) {
|
|
582
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
583
|
+
value: value,
|
|
584
|
+
enumerable: true,
|
|
585
|
+
configurable: true,
|
|
586
|
+
writable: true
|
|
587
|
+
});
|
|
588
|
+
else obj[key] = value;
|
|
589
|
+
return obj;
|
|
590
|
+
}
|
|
591
|
+
function Autocomplete_object_spread(target) {
|
|
592
|
+
for(var i = 1; i < arguments.length; i++){
|
|
593
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
594
|
+
var ownKeys = Object.keys(source);
|
|
595
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
596
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
597
|
+
}));
|
|
598
|
+
ownKeys.forEach(function(key) {
|
|
599
|
+
Autocomplete_define_property(target, key, source[key]);
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
return target;
|
|
603
|
+
}
|
|
604
|
+
function Autocomplete_object_without_properties(source, excluded) {
|
|
605
|
+
if (null == source) return {};
|
|
606
|
+
var target = {}, sourceKeys, key, i;
|
|
607
|
+
if ("u" > typeof Reflect && Reflect.ownKeys) {
|
|
608
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
609
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
610
|
+
key = sourceKeys[i];
|
|
611
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
612
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
return target;
|
|
616
|
+
}
|
|
617
|
+
target = Autocomplete_object_without_properties_loose(source, excluded);
|
|
618
|
+
if (Object.getOwnPropertySymbols) {
|
|
619
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
620
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
621
|
+
key = sourceKeys[i];
|
|
622
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
623
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return target;
|
|
628
|
+
}
|
|
629
|
+
function Autocomplete_object_without_properties_loose(source, excluded) {
|
|
630
|
+
if (null == source) return {};
|
|
631
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
632
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
633
|
+
key = sourceKeys[i];
|
|
634
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
635
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return target;
|
|
639
|
+
}
|
|
640
|
+
const AutocompleteOpenContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
|
|
641
|
+
const Autocomplete = ({ children })=>{
|
|
642
|
+
var _useFieldContext;
|
|
643
|
+
const [open, setOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
644
|
+
const labelText = null == (_useFieldContext = useFieldContext()) ? void 0 : _useFieldContext.labelText;
|
|
645
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command, {
|
|
646
|
+
loop: true,
|
|
647
|
+
shouldFilter: true,
|
|
648
|
+
label: labelText,
|
|
649
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AutocompleteOpenContext.Provider, {
|
|
650
|
+
value: setOpen,
|
|
651
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Root, {
|
|
652
|
+
open: open,
|
|
653
|
+
onOpenChange: setOpen,
|
|
654
|
+
children: children
|
|
655
|
+
})
|
|
656
|
+
})
|
|
657
|
+
});
|
|
658
|
+
};
|
|
659
|
+
Autocomplete.displayName = 'Autocomplete';
|
|
660
|
+
const AutocompleteInput = (_0)=>{
|
|
661
|
+
let { invalid, size, className, onClick, onFocus } = _0, rest = Autocomplete_object_without_properties(_0, [
|
|
662
|
+
"invalid",
|
|
663
|
+
"size",
|
|
664
|
+
"className",
|
|
665
|
+
"onClick",
|
|
666
|
+
"onFocus"
|
|
667
|
+
]);
|
|
668
|
+
const { invalid: isInvalid, describedBy } = useResolvedFieldProps({
|
|
669
|
+
invalid
|
|
670
|
+
});
|
|
671
|
+
const setOpen = (0, external_react_namespaceObject.useContext)(AutocompleteOpenContext);
|
|
672
|
+
const classes = fieldControl({
|
|
673
|
+
size,
|
|
674
|
+
invalid: isInvalid
|
|
675
|
+
});
|
|
676
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Trigger, {
|
|
677
|
+
asChild: true,
|
|
678
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Input, Autocomplete_object_spread({
|
|
679
|
+
onClick: (event)=>{
|
|
680
|
+
event.preventDefault();
|
|
681
|
+
null == onClick || onClick(event);
|
|
682
|
+
},
|
|
683
|
+
onFocus: (event)=>{
|
|
684
|
+
null == setOpen || setOpen(true);
|
|
685
|
+
null == onFocus || onFocus(event);
|
|
686
|
+
},
|
|
687
|
+
"aria-invalid": isInvalid,
|
|
688
|
+
"aria-describedby": describedBy,
|
|
689
|
+
className: className ? `${classes} ${className}` : classes
|
|
690
|
+
}, rest))
|
|
691
|
+
});
|
|
692
|
+
};
|
|
693
|
+
AutocompleteInput.displayName = 'AutocompleteInput';
|
|
694
|
+
const AutocompleteContent = (_0)=>{
|
|
695
|
+
let { className, onOpenAutoFocus, onCloseAutoFocus } = _0, rest = Autocomplete_object_without_properties(_0, [
|
|
696
|
+
"className",
|
|
697
|
+
"onOpenAutoFocus",
|
|
698
|
+
"onCloseAutoFocus"
|
|
699
|
+
]);
|
|
700
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Content, Autocomplete_object_spread({
|
|
701
|
+
className: className ? `${content} ${className}` : content,
|
|
702
|
+
align: "start",
|
|
703
|
+
sideOffset: 4,
|
|
704
|
+
onOpenAutoFocus: (event)=>{
|
|
705
|
+
event.preventDefault();
|
|
706
|
+
null == onOpenAutoFocus || onOpenAutoFocus(event);
|
|
707
|
+
},
|
|
708
|
+
onCloseAutoFocus: (event)=>{
|
|
709
|
+
event.preventDefault();
|
|
710
|
+
null == onCloseAutoFocus || onCloseAutoFocus(event);
|
|
711
|
+
}
|
|
712
|
+
}, rest));
|
|
713
|
+
};
|
|
714
|
+
AutocompleteContent.displayName = 'AutocompleteContent';
|
|
715
|
+
const AutocompleteItem = (_0)=>{
|
|
716
|
+
let { onSelect } = _0, rest = Autocomplete_object_without_properties(_0, [
|
|
717
|
+
"onSelect"
|
|
718
|
+
]);
|
|
719
|
+
const setOpen = (0, external_react_namespaceObject.useContext)(AutocompleteOpenContext);
|
|
720
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ComboboxItem, Autocomplete_object_spread({
|
|
721
|
+
onSelect: (value)=>{
|
|
722
|
+
null == onSelect || onSelect(value);
|
|
723
|
+
null == setOpen || setOpen(false);
|
|
724
|
+
}
|
|
725
|
+
}, rest));
|
|
726
|
+
};
|
|
727
|
+
AutocompleteItem.displayName = 'AutocompleteItem';
|
|
728
|
+
exports.Autocomplete = __webpack_exports__.Autocomplete;
|
|
729
|
+
exports.AutocompleteContent = __webpack_exports__.AutocompleteContent;
|
|
730
|
+
exports.AutocompleteEmpty = __webpack_exports__.AutocompleteEmpty;
|
|
731
|
+
exports.AutocompleteInput = __webpack_exports__.AutocompleteInput;
|
|
732
|
+
exports.AutocompleteItem = __webpack_exports__.AutocompleteItem;
|
|
733
|
+
exports.AutocompleteList = __webpack_exports__.AutocompleteList;
|
|
339
734
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
340
|
-
"
|
|
735
|
+
"Autocomplete",
|
|
736
|
+
"AutocompleteContent",
|
|
737
|
+
"AutocompleteEmpty",
|
|
738
|
+
"AutocompleteInput",
|
|
739
|
+
"AutocompleteItem",
|
|
740
|
+
"AutocompleteList"
|
|
341
741
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
342
742
|
Object.defineProperty(exports, '__esModule', {
|
|
343
743
|
value: true
|