@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,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
+
51 () {},
|
|
3
4
|
400 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
5
|
function toPrimitive(t, r) {
|
|
5
6
|
if ("object" != typeof t || !t) return t;
|
|
@@ -91,18 +92,12 @@ var __webpack_modules__ = {
|
|
|
91
92
|
c: ()=>createRuntimeFn
|
|
92
93
|
});
|
|
93
94
|
},
|
|
94
|
-
|
|
95
|
-
__webpack_require__
|
|
96
|
-
|
|
97
|
-
kc: ()=>errorText,
|
|
98
|
-
Ij: ()=>fieldControl,
|
|
99
|
-
Pf: ()=>label,
|
|
100
|
-
Zy: ()=>requiredMark
|
|
101
|
-
});
|
|
102
|
-
var createRuntimeFn_62c9670f_esm = __webpack_require__(400);
|
|
95
|
+
318 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
96
|
+
__webpack_require__(51);
|
|
97
|
+
var _vanilla_extract_recipes_createRuntimeFn__rspack_import_1 = __webpack_require__(400);
|
|
103
98
|
var descriptionText = 'sbqkrxd';
|
|
104
99
|
var errorText = 'sbqkrxe';
|
|
105
|
-
var fieldControl = (0,
|
|
100
|
+
var fieldControl = (0, _vanilla_extract_recipes_createRuntimeFn__rspack_import_1.c)({
|
|
106
101
|
defaultClassName: 'sbqkrx0',
|
|
107
102
|
variantClassNames: {
|
|
108
103
|
size: {
|
|
@@ -121,51 +116,212 @@ var __webpack_modules__ = {
|
|
|
121
116
|
});
|
|
122
117
|
var label = 'sbqkrxb';
|
|
123
118
|
var requiredMark = 'sbqkrxc';
|
|
119
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
120
|
+
Ij: ()=>fieldControl,
|
|
121
|
+
Pf: ()=>label,
|
|
122
|
+
Zy: ()=>requiredMark,
|
|
123
|
+
ij: ()=>descriptionText,
|
|
124
|
+
kc: ()=>errorText
|
|
125
|
+
});
|
|
124
126
|
},
|
|
125
|
-
|
|
127
|
+
598 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
126
128
|
var react_jsx_runtime__rspack_import_0 = __webpack_require__(732);
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if (
|
|
132
|
-
|
|
129
|
+
var _radix_ui_react_slot__rspack_import_1 = __webpack_require__(922);
|
|
130
|
+
var react__rspack_import_2 = __webpack_require__(15);
|
|
131
|
+
var _field_css__rspack_import_3 = __webpack_require__(318);
|
|
132
|
+
function _define_property(obj, key, value) {
|
|
133
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
134
|
+
value: value,
|
|
135
|
+
enumerable: true,
|
|
136
|
+
configurable: true,
|
|
137
|
+
writable: true
|
|
138
|
+
});
|
|
139
|
+
else obj[key] = value;
|
|
140
|
+
return obj;
|
|
141
|
+
}
|
|
142
|
+
function _object_spread(target) {
|
|
143
|
+
for(var i = 1; i < arguments.length; i++){
|
|
144
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
145
|
+
var ownKeys = Object.keys(source);
|
|
146
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
147
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
148
|
+
}));
|
|
149
|
+
ownKeys.forEach(function(key) {
|
|
150
|
+
_define_property(target, key, source[key]);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
return target;
|
|
154
|
+
}
|
|
155
|
+
function ownKeys(object, enumerableOnly) {
|
|
156
|
+
var keys = Object.keys(object);
|
|
157
|
+
if (Object.getOwnPropertySymbols) {
|
|
158
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
159
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
160
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
161
|
+
});
|
|
162
|
+
keys.push.apply(keys, symbols);
|
|
163
|
+
}
|
|
164
|
+
return keys;
|
|
165
|
+
}
|
|
166
|
+
function _object_spread_props(target, source) {
|
|
167
|
+
source = null != source ? source : {};
|
|
168
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
169
|
+
else ownKeys(Object(source)).forEach(function(key) {
|
|
170
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
171
|
+
});
|
|
172
|
+
return target;
|
|
173
|
+
}
|
|
174
|
+
function _object_without_properties(source, excluded) {
|
|
175
|
+
if (null == source) return {};
|
|
176
|
+
var target = {}, sourceKeys, key, i;
|
|
177
|
+
if ("u" > typeof Reflect && Reflect.ownKeys) {
|
|
178
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
179
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
180
|
+
key = sourceKeys[i];
|
|
181
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
182
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return target;
|
|
186
|
+
}
|
|
187
|
+
target = _object_without_properties_loose(source, excluded);
|
|
188
|
+
if (Object.getOwnPropertySymbols) {
|
|
189
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
190
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
191
|
+
key = sourceKeys[i];
|
|
192
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
193
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return target;
|
|
198
|
+
}
|
|
199
|
+
function _object_without_properties_loose(source, excluded) {
|
|
200
|
+
if (null == source) return {};
|
|
201
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
202
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
203
|
+
key = sourceKeys[i];
|
|
204
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
205
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return target;
|
|
209
|
+
}
|
|
210
|
+
const FieldContext = /*#__PURE__*/ (0, react__rspack_import_2.createContext)(null);
|
|
211
|
+
const useFieldContext = ()=>(0, react__rspack_import_2.useContext)(FieldContext);
|
|
212
|
+
const useResolvedFieldProps = (props)=>{
|
|
213
|
+
var _ref, _props_id, _ref1, _props_invalid, _props_describedBy;
|
|
214
|
+
const context = useFieldContext();
|
|
215
|
+
const generatedId = (0, react__rspack_import_2.useId)();
|
|
216
|
+
return {
|
|
217
|
+
id: null != (_ref = null != (_props_id = props.id) ? _props_id : null == context ? void 0 : context.id) ? _ref : generatedId,
|
|
218
|
+
invalid: null != (_ref1 = null != (_props_invalid = props.invalid) ? _props_invalid : null == context ? void 0 : context.invalid) ? _ref1 : false,
|
|
219
|
+
describedBy: null != (_props_describedBy = props.describedBy) ? _props_describedBy : null == context ? void 0 : context.describedBy
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
const Field = (_0)=>{
|
|
223
|
+
let { invalid = false, children } = _0, rest = _object_without_properties(_0, [
|
|
224
|
+
"invalid",
|
|
225
|
+
"children"
|
|
226
|
+
]);
|
|
227
|
+
const generatedId = (0, react__rspack_import_2.useId)();
|
|
228
|
+
const descriptionId = `${generatedId}-description`;
|
|
229
|
+
const errorId = `${generatedId}-error`;
|
|
230
|
+
const labelId = `${generatedId}-label`;
|
|
231
|
+
const directChildren = react__rspack_import_2.Children.toArray(children).filter(react__rspack_import_2.isValidElement);
|
|
232
|
+
const describedByIds = directChildren.reduce((ids, child)=>{
|
|
233
|
+
if (child.type === FieldDescription) ids.push(descriptionId);
|
|
234
|
+
if (child.type === FieldError) ids.push(errorId);
|
|
235
|
+
return ids;
|
|
236
|
+
}, []);
|
|
237
|
+
const labelChild = directChildren.find((child)=>child.type === FieldLabel);
|
|
238
|
+
const labelChildText = labelChild && 'string' == typeof labelChild.props.children ? labelChild.props.children : void 0;
|
|
239
|
+
const value = {
|
|
240
|
+
id: generatedId,
|
|
241
|
+
descriptionId,
|
|
242
|
+
errorId,
|
|
243
|
+
describedBy: describedByIds.length > 0 ? describedByIds.join(' ') : void 0,
|
|
244
|
+
invalid,
|
|
245
|
+
labelId: labelChild ? labelId : void 0,
|
|
246
|
+
labelText: labelChildText
|
|
247
|
+
};
|
|
248
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)(FieldContext.Provider, {
|
|
249
|
+
value: value,
|
|
250
|
+
children: /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("div", _object_spread_props(_object_spread({}, rest), {
|
|
251
|
+
children: children
|
|
252
|
+
}))
|
|
253
|
+
});
|
|
133
254
|
};
|
|
134
|
-
|
|
255
|
+
Field.displayName = 'Field';
|
|
256
|
+
const FieldLabel = (_0)=>{
|
|
257
|
+
let { required, htmlFor, id, children } = _0, rest = _object_without_properties(_0, [
|
|
258
|
+
"required",
|
|
259
|
+
"htmlFor",
|
|
260
|
+
"id",
|
|
261
|
+
"children"
|
|
262
|
+
]);
|
|
263
|
+
const context = useFieldContext();
|
|
264
|
+
const resolvedHtmlFor = false === htmlFor ? void 0 : null != htmlFor ? htmlFor : null == context ? void 0 : context.id;
|
|
265
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsxs)("label", _object_spread_props(_object_spread({
|
|
266
|
+
htmlFor: resolvedHtmlFor,
|
|
267
|
+
id: null != id ? id : null == context ? void 0 : context.labelId,
|
|
268
|
+
className: _field_css__rspack_import_3.Pf
|
|
269
|
+
}, rest), {
|
|
135
270
|
children: [
|
|
136
|
-
label ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsxs)("label", {
|
|
137
|
-
htmlFor: disableLabelFor ? void 0 : id,
|
|
138
|
-
id: `${id}-label`,
|
|
139
|
-
className: _field_css__rspack_import_1.Pf,
|
|
140
|
-
children: [
|
|
141
|
-
label,
|
|
142
|
-
required ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("span", {
|
|
143
|
-
className: _field_css__rspack_import_1.Zy,
|
|
144
|
-
"aria-hidden": "true",
|
|
145
|
-
children: "*"
|
|
146
|
-
}) : null
|
|
147
|
-
]
|
|
148
|
-
}) : null,
|
|
149
271
|
children,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
children:
|
|
154
|
-
}) : null,
|
|
155
|
-
error ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", {
|
|
156
|
-
id: `${id}-error`,
|
|
157
|
-
className: _field_css__rspack_import_1.kc,
|
|
158
|
-
role: "alert",
|
|
159
|
-
children: error
|
|
272
|
+
required ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("span", {
|
|
273
|
+
className: _field_css__rspack_import_3.Zy,
|
|
274
|
+
"aria-hidden": "true",
|
|
275
|
+
children: "*"
|
|
160
276
|
}) : null
|
|
161
277
|
]
|
|
162
|
-
});
|
|
163
|
-
|
|
278
|
+
}));
|
|
279
|
+
};
|
|
280
|
+
FieldLabel.displayName = 'FieldLabel';
|
|
281
|
+
const FieldControl = (_0)=>{
|
|
282
|
+
let { children } = _0, rest = _object_without_properties(_0, [
|
|
283
|
+
"children"
|
|
284
|
+
]);
|
|
285
|
+
const context = useFieldContext();
|
|
286
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)(_radix_ui_react_slot__rspack_import_1.Slot, _object_spread_props(_object_spread({
|
|
287
|
+
id: null == context ? void 0 : context.id,
|
|
288
|
+
"aria-describedby": null == context ? void 0 : context.describedBy,
|
|
289
|
+
"aria-invalid": null == context ? void 0 : context.invalid
|
|
290
|
+
}, rest), {
|
|
291
|
+
children: children
|
|
292
|
+
}));
|
|
293
|
+
};
|
|
294
|
+
FieldControl.displayName = 'FieldControl';
|
|
295
|
+
const FieldDescription = (_0)=>{
|
|
296
|
+
let { id } = _0, rest = _object_without_properties(_0, [
|
|
297
|
+
"id"
|
|
298
|
+
]);
|
|
299
|
+
const context = useFieldContext();
|
|
300
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", _object_spread({
|
|
301
|
+
id: null != id ? id : null == context ? void 0 : context.descriptionId,
|
|
302
|
+
className: _field_css__rspack_import_3.ij
|
|
303
|
+
}, rest));
|
|
304
|
+
};
|
|
305
|
+
FieldDescription.displayName = "FieldDescription";
|
|
306
|
+
const FieldError = (_0)=>{
|
|
307
|
+
let { id } = _0, rest = _object_without_properties(_0, [
|
|
308
|
+
"id"
|
|
309
|
+
]);
|
|
310
|
+
const context = useFieldContext();
|
|
311
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", _object_spread({
|
|
312
|
+
id: null != id ? id : null == context ? void 0 : context.errorId,
|
|
313
|
+
className: _field_css__rspack_import_3.kc,
|
|
314
|
+
role: "alert"
|
|
315
|
+
}, rest));
|
|
316
|
+
};
|
|
317
|
+
FieldError.displayName = 'FieldError';
|
|
164
318
|
__webpack_require__.d(__webpack_exports__, {}, {
|
|
165
|
-
|
|
166
|
-
z: describedByIds
|
|
319
|
+
I: useResolvedFieldProps
|
|
167
320
|
});
|
|
168
321
|
},
|
|
322
|
+
922 (module) {
|
|
323
|
+
module.exports = require("@radix-ui/react-slot");
|
|
324
|
+
},
|
|
169
325
|
586 (module) {
|
|
170
326
|
module.exports = require("@vinyasa/icons");
|
|
171
327
|
},
|
|
@@ -229,8 +385,8 @@ var __webpack_exports__ = {};
|
|
|
229
385
|
var jsx_runtime_ = __webpack_require__(732);
|
|
230
386
|
var icons_ = __webpack_require__(586);
|
|
231
387
|
var external_react_ = __webpack_require__(15);
|
|
232
|
-
var
|
|
233
|
-
var
|
|
388
|
+
var field_css = __webpack_require__(318);
|
|
389
|
+
var Field = __webpack_require__(598);
|
|
234
390
|
var createRuntimeFn_62c9670f_esm = __webpack_require__(400);
|
|
235
391
|
var group = (0, createRuntimeFn_62c9670f_esm.c)({
|
|
236
392
|
defaultClassName: '_1wyztbj0',
|
|
@@ -357,93 +513,79 @@ var __webpack_exports__ = {};
|
|
|
357
513
|
let _ref = [
|
|
358
514
|
_0,
|
|
359
515
|
_1
|
|
360
|
-
], [_ref1, ..._rest] = _ref, {
|
|
361
|
-
"label",
|
|
362
|
-
"description",
|
|
363
|
-
"error",
|
|
364
|
-
"required",
|
|
516
|
+
], [_ref1, ..._rest] = _ref, { size, invalid, showSteppers = true, disabled, id: idProp, className, 'aria-describedby': ariaDescribedBy } = _ref1, rest = _object_without_properties(_ref1, [
|
|
365
517
|
"size",
|
|
518
|
+
"invalid",
|
|
366
519
|
"showSteppers",
|
|
367
520
|
"disabled",
|
|
368
521
|
"id",
|
|
369
|
-
"className"
|
|
522
|
+
"className",
|
|
523
|
+
'aria-describedby'
|
|
370
524
|
]), [ref] = _rest;
|
|
371
|
-
const
|
|
372
|
-
|
|
525
|
+
const { id, invalid: isInvalid, describedBy } = (0, Field.I)({
|
|
526
|
+
id: idProp,
|
|
527
|
+
invalid,
|
|
528
|
+
describedBy: ariaDescribedBy
|
|
529
|
+
});
|
|
373
530
|
const innerRef = (0, external_react_.useRef)(null);
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
531
|
+
if (showSteppers) return /*#__PURE__*/ (0, jsx_runtime_.jsxs)("div", {
|
|
532
|
+
className: group({
|
|
533
|
+
size,
|
|
534
|
+
invalid: isInvalid,
|
|
535
|
+
disabled
|
|
536
|
+
}),
|
|
537
|
+
children: [
|
|
538
|
+
/*#__PURE__*/ (0, jsx_runtime_.jsx)("button", {
|
|
539
|
+
type: "button",
|
|
540
|
+
className: `${groupButton({
|
|
541
|
+
size
|
|
542
|
+
})} ${groupButtonLeading}`,
|
|
543
|
+
disabled: disabled,
|
|
544
|
+
tabIndex: -1,
|
|
545
|
+
"aria-label": "Decrement",
|
|
546
|
+
onClick: ()=>{
|
|
547
|
+
step(innerRef.current, 'down');
|
|
548
|
+
},
|
|
549
|
+
children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(icons_.MinusIcon, {})
|
|
386
550
|
}),
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
"aria-invalid": invalid ? true : void 0,
|
|
411
|
-
"aria-describedby": (0, field.z)(id, {
|
|
412
|
-
description,
|
|
413
|
-
error
|
|
414
|
-
})
|
|
415
|
-
}, rest)),
|
|
416
|
-
/*#__PURE__*/ (0, jsx_runtime_.jsx)("button", {
|
|
417
|
-
type: "button",
|
|
418
|
-
className: `${groupButton({
|
|
419
|
-
size
|
|
420
|
-
})} ${groupButtonTrailing}`,
|
|
421
|
-
disabled: disabled,
|
|
422
|
-
tabIndex: -1,
|
|
423
|
-
"aria-label": "Increment",
|
|
424
|
-
onClick: ()=>{
|
|
425
|
-
step(innerRef.current, 'up');
|
|
426
|
-
},
|
|
427
|
-
children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(icons_.PlusIcon, {})
|
|
428
|
-
})
|
|
429
|
-
]
|
|
430
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_.jsx)("input", _object_spread({
|
|
431
|
-
ref: mergeRefs(ref, innerRef),
|
|
432
|
-
id: id,
|
|
433
|
-
type: "number",
|
|
434
|
-
disabled: disabled,
|
|
435
|
-
className: `${(0, field_css.Ij)({
|
|
436
|
-
size,
|
|
437
|
-
invalid
|
|
438
|
-
})} ${null != className ? className : ''}`,
|
|
439
|
-
required: required,
|
|
440
|
-
"aria-invalid": invalid ? true : void 0,
|
|
441
|
-
"aria-describedby": (0, field.z)(id, {
|
|
442
|
-
description,
|
|
443
|
-
error
|
|
551
|
+
/*#__PURE__*/ (0, jsx_runtime_.jsx)("input", _object_spread({
|
|
552
|
+
ref: mergeRefs(ref, innerRef),
|
|
553
|
+
id: id,
|
|
554
|
+
type: "number",
|
|
555
|
+
disabled: disabled,
|
|
556
|
+
className: `${groupInput({
|
|
557
|
+
size
|
|
558
|
+
})} ${null != className ? className : ''}`,
|
|
559
|
+
"aria-invalid": isInvalid,
|
|
560
|
+
"aria-describedby": describedBy
|
|
561
|
+
}, rest)),
|
|
562
|
+
/*#__PURE__*/ (0, jsx_runtime_.jsx)("button", {
|
|
563
|
+
type: "button",
|
|
564
|
+
className: `${groupButton({
|
|
565
|
+
size
|
|
566
|
+
})} ${groupButtonTrailing}`,
|
|
567
|
+
disabled: disabled,
|
|
568
|
+
tabIndex: -1,
|
|
569
|
+
"aria-label": "Increment",
|
|
570
|
+
onClick: ()=>{
|
|
571
|
+
step(innerRef.current, 'up');
|
|
572
|
+
},
|
|
573
|
+
children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(icons_.PlusIcon, {})
|
|
444
574
|
})
|
|
445
|
-
|
|
575
|
+
]
|
|
446
576
|
});
|
|
577
|
+
return /*#__PURE__*/ (0, jsx_runtime_.jsx)("input", _object_spread({
|
|
578
|
+
ref: mergeRefs(ref, innerRef),
|
|
579
|
+
id: id,
|
|
580
|
+
type: "number",
|
|
581
|
+
disabled: disabled,
|
|
582
|
+
className: `${(0, field_css.Ij)({
|
|
583
|
+
size,
|
|
584
|
+
invalid: isInvalid
|
|
585
|
+
})} ${null != className ? className : ''}`,
|
|
586
|
+
"aria-invalid": isInvalid,
|
|
587
|
+
"aria-describedby": describedBy
|
|
588
|
+
}, rest));
|
|
447
589
|
});
|
|
448
590
|
NumberInput.displayName = 'NumberInput';
|
|
449
591
|
const number_input_NumberInput = NumberInput;
|