@ark-ui/solid 3.0.0-2 → 3.0.0-3
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/index.js +215 -169
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +210 -172
- package/dist/esm/index.js.map +1 -1
- package/dist/source/components/accordion/use-accordion.js +2 -2
- package/dist/source/components/avatar/use-avatar.js +2 -2
- package/dist/source/components/carousel/use-carousel.js +2 -2
- package/dist/source/components/checkbox/checkbox-control.jsx +3 -6
- package/dist/source/components/checkbox/checkbox-hidden-input.jsx +8 -0
- package/dist/source/components/checkbox/checkbox-indicator.jsx +5 -3
- package/dist/source/components/checkbox/checkbox-root.jsx +3 -3
- package/dist/source/components/checkbox/checkbox.js +1 -0
- package/dist/source/components/checkbox/index.js +1 -0
- package/dist/source/components/checkbox/use-checkbox.js +2 -2
- package/dist/source/components/clipboard/use-clipboard.js +2 -2
- package/dist/source/components/collapsible/use-collapsible.js +2 -2
- package/dist/source/components/color-picker/color-picker-hidden-input.jsx +8 -0
- package/dist/source/components/color-picker/color-picker-root.jsx +0 -1
- package/dist/source/components/color-picker/color-picker.js +1 -0
- package/dist/source/components/color-picker/index.js +1 -0
- package/dist/source/components/color-picker/use-color-picker.js +2 -2
- package/dist/source/components/combobox/use-combobox.js +2 -2
- package/dist/source/components/date-picker/use-date-picker.js +2 -2
- package/dist/source/components/dialog/use-dialog.js +2 -2
- package/dist/source/components/editable/use-editable.js +2 -2
- package/dist/source/components/file-upload/file-upload-dropzone.jsx +1 -4
- package/dist/source/components/file-upload/file-upload-hidden-input.jsx +8 -0
- package/dist/source/components/file-upload/file-upload.js +1 -0
- package/dist/source/components/file-upload/index.js +1 -0
- package/dist/source/components/file-upload/use-file-upload.js +2 -2
- package/dist/source/components/hover-card/use-hover-card.js +2 -2
- package/dist/source/components/menu/use-menu.js +2 -2
- package/dist/source/components/number-input/use-number-input.js +2 -2
- package/dist/source/components/pagination/use-pagination.js +2 -2
- package/dist/source/components/pin-input/index.js +1 -0
- package/dist/source/components/pin-input/pin-input-hidden-input.jsx +8 -0
- package/dist/source/components/pin-input/pin-input-root.jsx +3 -4
- package/dist/source/components/pin-input/pin-input.js +1 -0
- package/dist/source/components/pin-input/use-pin-input.js +2 -2
- package/dist/source/components/popover/use-popover.js +2 -2
- package/dist/source/components/progress/use-progress.js +2 -2
- package/dist/source/components/radio-group/use-radio-group.js +2 -2
- package/dist/source/components/rating-group/index.js +1 -0
- package/dist/source/components/rating-group/rating-group-control.jsx +3 -6
- package/dist/source/components/rating-group/rating-group-hidden-input.jsx +8 -0
- package/dist/source/components/rating-group/rating-group.js +1 -0
- package/dist/source/components/rating-group/use-rating-group.js +2 -2
- package/dist/source/components/segment-group/use-segment-group.js +2 -2
- package/dist/source/components/select/index.js +1 -0
- package/dist/source/components/select/select-control.jsx +1 -13
- package/dist/source/components/select/select-hidden-select.jsx +17 -0
- package/dist/source/components/select/select.js +1 -0
- package/dist/source/components/select/use-select.js +2 -2
- package/dist/source/components/slider/use-slider.js +2 -2
- package/dist/source/components/splitter/use-splitter.js +2 -2
- package/dist/source/components/switch/index.js +1 -0
- package/dist/source/components/switch/switch-control.jsx +1 -4
- package/dist/source/components/switch/switch-hidden-input.jsx +8 -0
- package/dist/source/components/switch/switch.js +1 -0
- package/dist/source/components/switch/use-switch.js +2 -2
- package/dist/source/components/tabs/use-tabs.js +2 -2
- package/dist/source/components/tags-input/index.js +1 -0
- package/dist/source/components/tags-input/tags-input-hidden-input.jsx +8 -0
- package/dist/source/components/tags-input/tags-input-root.jsx +0 -1
- package/dist/source/components/tags-input/tags-input.js +1 -0
- package/dist/source/components/tags-input/use-tags-input.js +2 -2
- package/dist/source/components/toggle-group/use-toggle-group.js +2 -2
- package/dist/source/components/tooltip/use-tooltip.js +2 -2
- package/dist/source/components/tree-view/use-tree-view.js +2 -2
- package/dist/source/providers/environment/environment.jsx +14 -6
- package/dist/source/providers/environment/index.js +2 -3
- package/dist/source/providers/environment/use-environment-context.js +5 -0
- package/dist/source/providers/locale/locale-provider.jsx +2 -2
- package/dist/source/utils/run-if-fn.js +4 -0
- package/dist/types/components/checkbox/checkbox-hidden-input.d.ts +4 -0
- package/dist/types/components/checkbox/checkbox-indicator.d.ts +6 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -0
- package/dist/types/components/checkbox/index.d.ts +2 -1
- package/dist/types/components/color-picker/color-picker-hidden-input.d.ts +4 -0
- package/dist/types/components/color-picker/color-picker.d.ts +1 -0
- package/dist/types/components/color-picker/index.d.ts +2 -1
- package/dist/types/components/file-upload/file-upload-hidden-input.d.ts +4 -0
- package/dist/types/components/file-upload/file-upload.d.ts +1 -0
- package/dist/types/components/file-upload/index.d.ts +1 -0
- package/dist/types/components/pin-input/index.d.ts +1 -0
- package/dist/types/components/pin-input/pin-input-hidden-input.d.ts +4 -0
- package/dist/types/components/pin-input/pin-input.d.ts +1 -0
- package/dist/types/components/rating-group/index.d.ts +1 -0
- package/dist/types/components/rating-group/rating-group-hidden-input.d.ts +4 -0
- package/dist/types/components/rating-group/rating-group.d.ts +1 -0
- package/dist/types/components/select/index.d.ts +1 -0
- package/dist/types/components/select/select-hidden-select.d.ts +4 -0
- package/dist/types/components/select/select.d.ts +1 -0
- package/dist/types/components/switch/index.d.ts +2 -1
- package/dist/types/components/switch/switch-hidden-input.d.ts +4 -0
- package/dist/types/components/switch/switch.d.ts +1 -0
- package/dist/types/components/tags-input/index.d.ts +1 -0
- package/dist/types/components/tags-input/tags-input-hidden-input.d.ts +4 -0
- package/dist/types/components/tags-input/tags-input.d.ts +1 -0
- package/dist/types/providers/environment/environment.d.ts +2 -1
- package/dist/types/providers/environment/index.d.ts +2 -4
- package/dist/types/providers/environment/use-environment-context.d.ts +18 -3
- package/dist/types/utils/run-if-fn.d.ts +2 -0
- package/package.json +6 -5
package/dist/cjs/index.js
CHANGED
|
@@ -37,6 +37,7 @@ var toast$1 = require('@zag-js/toast');
|
|
|
37
37
|
var toggleGroup$1 = require('@zag-js/toggle-group');
|
|
38
38
|
var tooltip$1 = require('@zag-js/tooltip');
|
|
39
39
|
var treeView$1 = require('@zag-js/tree-view');
|
|
40
|
+
var domQuery = require('@zag-js/dom-query');
|
|
40
41
|
|
|
41
42
|
function _interopNamespaceDefault(e) {
|
|
42
43
|
var n = Object.create(null);
|
|
@@ -191,28 +192,42 @@ const CollapsibleContent = props => {
|
|
|
191
192
|
|
|
192
193
|
const CollapsibleContext = props => props.children(useCollapsibleContext());
|
|
193
194
|
|
|
195
|
+
const isFunction = value => typeof value === 'function';
|
|
196
|
+
const runIfFn = (valueOrFn, ...args) => isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;
|
|
197
|
+
|
|
194
198
|
const [EnvironmentProvider, useEnvironmentContext] = createContext({
|
|
195
199
|
hookName: 'useEnvironmentContext',
|
|
196
200
|
providerName: '<EnvironmentProvider />',
|
|
197
|
-
strict: false
|
|
201
|
+
strict: false,
|
|
202
|
+
defaultValue: () => ({
|
|
203
|
+
getRootNode: () => document,
|
|
204
|
+
getDocument: () => document,
|
|
205
|
+
getWindow: () => window
|
|
206
|
+
})
|
|
198
207
|
});
|
|
199
208
|
|
|
200
|
-
var _tmpl$$
|
|
209
|
+
var _tmpl$$6 = /*#__PURE__*/web.template(`<span hidden>`);
|
|
201
210
|
const Environment = props => {
|
|
202
|
-
const spanRef =
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
211
|
+
const [spanRef, setSpanRef] = solidJs.createSignal();
|
|
212
|
+
const getRootNode = () => runIfFn(props.value) ?? spanRef()?.ownerDocument ?? document;
|
|
213
|
+
const environment = solidJs.createMemo(() => ({
|
|
214
|
+
getRootNode,
|
|
215
|
+
getDocument: () => domQuery.getDocument(getRootNode()),
|
|
216
|
+
getWindow: () => domQuery.getWindow(getRootNode())
|
|
217
|
+
}));
|
|
206
218
|
return web.createComponent(EnvironmentProvider, {
|
|
207
|
-
|
|
208
|
-
return currentEnv();
|
|
209
|
-
},
|
|
219
|
+
value: environment,
|
|
210
220
|
get children() {
|
|
211
|
-
return [web.memo(() => props.children), web.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
221
|
+
return [web.memo(() => props.children), web.createComponent(solidJs.Show, {
|
|
222
|
+
get when() {
|
|
223
|
+
return !props.value;
|
|
224
|
+
},
|
|
225
|
+
get children() {
|
|
226
|
+
var _el$ = _tmpl$$6();
|
|
227
|
+
web.use(setSpanRef, _el$);
|
|
228
|
+
return _el$;
|
|
229
|
+
}
|
|
230
|
+
})];
|
|
216
231
|
}
|
|
217
232
|
});
|
|
218
233
|
};
|
|
@@ -230,11 +245,11 @@ const [LocaleContextProvider, useLocaleContext] = createContext({
|
|
|
230
245
|
const LocaleProvider = props => {
|
|
231
246
|
const [localeProps, restProps] = solidJs.splitProps(props, ['locale', 'defaultLocale']);
|
|
232
247
|
const [locale, setLocale] = solidJs.createSignal(localeProps.defaultLocale || localeProps.locale || 'en-US');
|
|
233
|
-
const
|
|
248
|
+
const environment = useEnvironmentContext();
|
|
234
249
|
solidJs.createEffect(() => {
|
|
235
250
|
const cleanup = i18nUtils.trackLocale({
|
|
236
251
|
locale: localeProps.locale,
|
|
237
|
-
getRootNode,
|
|
252
|
+
getRootNode: environment().getRootNode,
|
|
238
253
|
onLocaleChange(locale) {
|
|
239
254
|
setLocale(locale.locale);
|
|
240
255
|
}
|
|
@@ -255,12 +270,12 @@ const LocaleProvider = props => {
|
|
|
255
270
|
|
|
256
271
|
const useCollapsible = props => {
|
|
257
272
|
const locale = useLocaleContext();
|
|
258
|
-
const
|
|
273
|
+
const environment = useEnvironmentContext();
|
|
259
274
|
const [renderStrategyProps, collapsibleProps] = splitRenderStrategyProps(props);
|
|
260
275
|
const context = solid.mergeProps({
|
|
261
276
|
id: solidJs.createUniqueId(),
|
|
262
277
|
dir: locale().dir,
|
|
263
|
-
getRootNode,
|
|
278
|
+
getRootNode: environment().getRootNode,
|
|
264
279
|
'open.controlled': props.open !== undefined
|
|
265
280
|
}, collapsibleProps);
|
|
266
281
|
const [state, send] = solid.useMachine(collapsible__namespace.machine(context), {
|
|
@@ -375,11 +390,11 @@ const AccordionItemTrigger = props => {
|
|
|
375
390
|
|
|
376
391
|
const useAccordion = props => {
|
|
377
392
|
const locale = useLocaleContext();
|
|
378
|
-
const
|
|
393
|
+
const environment = useEnvironmentContext();
|
|
379
394
|
const context = solidJs.mergeProps({
|
|
380
395
|
id: solidJs.createUniqueId(),
|
|
381
396
|
dir: locale().dir,
|
|
382
|
-
getRootNode
|
|
397
|
+
getRootNode: environment().getRootNode
|
|
383
398
|
}, props);
|
|
384
399
|
const [state, send] = solid.useMachine(accordion__namespace.machine(context), {
|
|
385
400
|
context
|
|
@@ -437,11 +452,11 @@ const AvatarImage = props => {
|
|
|
437
452
|
|
|
438
453
|
const useAvatar = props => {
|
|
439
454
|
const locale = useLocaleContext();
|
|
440
|
-
const
|
|
455
|
+
const environment = useEnvironmentContext();
|
|
441
456
|
const context = solid.mergeProps({
|
|
442
457
|
id: solidJs.createUniqueId(),
|
|
443
458
|
dir: locale().dir,
|
|
444
|
-
getRootNode
|
|
459
|
+
getRootNode: environment().getRootNode
|
|
445
460
|
}, props);
|
|
446
461
|
const [state, send] = solid.useMachine(avatar__namespace.machine(context), {
|
|
447
462
|
context
|
|
@@ -521,11 +536,11 @@ const CarouselPrevTrigger = props => {
|
|
|
521
536
|
|
|
522
537
|
const useCarousel = props => {
|
|
523
538
|
const locale = useLocaleContext();
|
|
524
|
-
const
|
|
539
|
+
const environment = useEnvironmentContext();
|
|
525
540
|
const context = solid.mergeProps({
|
|
526
541
|
id: solidJs.createUniqueId(),
|
|
527
542
|
dir: locale().dir,
|
|
528
|
-
getRootNode
|
|
543
|
+
getRootNode: environment().getRootNode
|
|
529
544
|
}, props);
|
|
530
545
|
const [state, send] = solid.useMachine(carousel__namespace.machine(context), {
|
|
531
546
|
context
|
|
@@ -572,21 +587,27 @@ const [CheckboxProvider, useCheckboxContext] = createContext({
|
|
|
572
587
|
|
|
573
588
|
const CheckboxContext = props => props.children(useCheckboxContext());
|
|
574
589
|
|
|
575
|
-
var _tmpl$$c = /*#__PURE__*/web.template(`<input>`);
|
|
576
590
|
const CheckboxControl = props => {
|
|
577
|
-
const
|
|
578
|
-
const mergedProps = solid.mergeProps(() =>
|
|
579
|
-
return
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
591
|
+
const checkbox = useCheckboxContext();
|
|
592
|
+
const mergedProps = solid.mergeProps(() => checkbox().controlProps, props);
|
|
593
|
+
return web.createComponent(ark.div, mergedProps);
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
const CheckboxHiddenInput = props => {
|
|
597
|
+
const checkbox = useCheckboxContext();
|
|
598
|
+
const mergedProps = solid.mergeProps(() => checkbox().hiddenInputProps, props);
|
|
599
|
+
return web.createComponent(ark.input, mergedProps);
|
|
584
600
|
};
|
|
585
601
|
|
|
586
602
|
const CheckboxIndicator = props => {
|
|
587
|
-
const
|
|
588
|
-
const
|
|
589
|
-
|
|
603
|
+
const [indicatorProps, localProps] = createSplitProps()(props, ['indeterminate']);
|
|
604
|
+
const checkbox = useCheckboxContext();
|
|
605
|
+
const mergedProps = solid.mergeProps(() => checkbox().indicatorProps, localProps);
|
|
606
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
607
|
+
get hidden() {
|
|
608
|
+
return !(indicatorProps.indeterminate ? checkbox().indeterminate : checkbox().checked);
|
|
609
|
+
}
|
|
610
|
+
}));
|
|
590
611
|
};
|
|
591
612
|
|
|
592
613
|
const CheckboxLabel = props => {
|
|
@@ -597,11 +618,11 @@ const CheckboxLabel = props => {
|
|
|
597
618
|
|
|
598
619
|
const useCheckbox = props => {
|
|
599
620
|
const locale = useLocaleContext();
|
|
600
|
-
const
|
|
621
|
+
const environment = useEnvironmentContext();
|
|
601
622
|
const context = solid.mergeProps({
|
|
602
623
|
id: solidJs.createUniqueId(),
|
|
603
624
|
dir: locale().dir,
|
|
604
|
-
getRootNode
|
|
625
|
+
getRootNode: environment().getRootNode
|
|
605
626
|
}, props);
|
|
606
627
|
const [state, send] = solid.useMachine(checkbox__namespace.machine(context), {
|
|
607
628
|
context
|
|
@@ -611,10 +632,10 @@ const useCheckbox = props => {
|
|
|
611
632
|
|
|
612
633
|
const CheckboxRoot = props => {
|
|
613
634
|
const [useCheckboxProps, labelprops] = createSplitProps()(props, ['checked', 'disabled', 'form', 'id', 'ids', 'invalid', 'name', 'onCheckedChange', 'readOnly', 'required', 'value']);
|
|
614
|
-
const
|
|
615
|
-
const mergedProps = solid.mergeProps(() =>
|
|
635
|
+
const checkbox = useCheckbox(useCheckboxProps);
|
|
636
|
+
const mergedProps = solid.mergeProps(() => checkbox().rootProps, labelprops);
|
|
616
637
|
return web.createComponent(CheckboxProvider, {
|
|
617
|
-
value:
|
|
638
|
+
value: checkbox,
|
|
618
639
|
get children() {
|
|
619
640
|
return web.createComponent(ark.label, mergedProps);
|
|
620
641
|
}
|
|
@@ -625,6 +646,7 @@ var checkbox = /*#__PURE__*/Object.freeze({
|
|
|
625
646
|
__proto__: null,
|
|
626
647
|
Context: CheckboxContext,
|
|
627
648
|
Control: CheckboxControl,
|
|
649
|
+
HiddenInput: CheckboxHiddenInput,
|
|
628
650
|
Indicator: CheckboxIndicator,
|
|
629
651
|
Label: CheckboxLabel,
|
|
630
652
|
Root: CheckboxRoot
|
|
@@ -681,10 +703,10 @@ const ClipboardLabel = props => {
|
|
|
681
703
|
};
|
|
682
704
|
|
|
683
705
|
const useClipboard = props => {
|
|
684
|
-
const
|
|
706
|
+
const environment = useEnvironmentContext();
|
|
685
707
|
const context = solid.mergeProps({
|
|
686
708
|
id: solidJs.createUniqueId(),
|
|
687
|
-
getRootNode
|
|
709
|
+
getRootNode: environment().getRootNode
|
|
688
710
|
}, props);
|
|
689
711
|
const [state, send] = solid.useMachine(clipboard__namespace.machine(context), {
|
|
690
712
|
context
|
|
@@ -895,6 +917,12 @@ const ColorPickerFormatTrigger = props => {
|
|
|
895
917
|
return web.createComponent(ark.button, mergedProps);
|
|
896
918
|
};
|
|
897
919
|
|
|
920
|
+
const ColorPickerHiddenInput = props => {
|
|
921
|
+
const colorPicker = useColorPickerContext();
|
|
922
|
+
const mergedProps = solid.mergeProps(() => colorPicker().hiddenInputProps, props);
|
|
923
|
+
return web.createComponent(ark.input, mergedProps);
|
|
924
|
+
};
|
|
925
|
+
|
|
898
926
|
const ColorPickerLabel = props => {
|
|
899
927
|
const api = useColorPickerContext();
|
|
900
928
|
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
@@ -918,11 +946,11 @@ const ColorPickerPositioner = props => {
|
|
|
918
946
|
const useColorPicker = props => {
|
|
919
947
|
const [local, rest] = solidJs.splitProps(props, ['value']);
|
|
920
948
|
const locale = useLocaleContext();
|
|
921
|
-
const
|
|
949
|
+
const environment = useEnvironmentContext();
|
|
922
950
|
const context = solid.mergeProps(() => ({
|
|
923
951
|
id: solidJs.createUniqueId(),
|
|
924
952
|
dir: locale().dir,
|
|
925
|
-
getRootNode,
|
|
953
|
+
getRootNode: environment().getRootNode,
|
|
926
954
|
'open.controlled': props.open !== undefined,
|
|
927
955
|
value: local.value ? colorPicker__namespace.parse(local.value) : undefined
|
|
928
956
|
}), rest);
|
|
@@ -932,7 +960,6 @@ const useColorPicker = props => {
|
|
|
932
960
|
return solidJs.createMemo(() => colorPicker__namespace.connect(state, send, solid.normalizeProps));
|
|
933
961
|
};
|
|
934
962
|
|
|
935
|
-
var _tmpl$$b = /*#__PURE__*/web.template(`<input>`);
|
|
936
963
|
const ColorPickerRoot = props => {
|
|
937
964
|
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
938
965
|
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['closeOnSelect', 'disabled', 'format', 'id', 'ids', 'initialFocusEl', 'name', 'name', 'onFocusOutside', 'onFormatChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'onValueChangeEnd', 'open', 'positioning', 'readOnly', 'value']);
|
|
@@ -944,16 +971,12 @@ const ColorPickerRoot = props => {
|
|
|
944
971
|
return web.createComponent(ColorPickerProvider, {
|
|
945
972
|
value: api,
|
|
946
973
|
get children() {
|
|
947
|
-
return
|
|
974
|
+
return web.createComponent(PresenceProvider, {
|
|
948
975
|
value: apiPresence,
|
|
949
976
|
get children() {
|
|
950
977
|
return web.createComponent(ark.div, mergedProps);
|
|
951
978
|
}
|
|
952
|
-
})
|
|
953
|
-
var _el$ = _tmpl$$b();
|
|
954
|
-
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
955
|
-
return _el$;
|
|
956
|
-
})()];
|
|
979
|
+
});
|
|
957
980
|
}
|
|
958
981
|
});
|
|
959
982
|
};
|
|
@@ -1052,6 +1075,7 @@ var colorPicker = /*#__PURE__*/Object.freeze({
|
|
|
1052
1075
|
EyeDropperTrigger: ColorPickerEyeDropperTrigger,
|
|
1053
1076
|
FormatSelect: ColorPickerFormatSelect,
|
|
1054
1077
|
FormatTrigger: ColorPickerFormatTrigger,
|
|
1078
|
+
HiddenInput: ColorPickerHiddenInput,
|
|
1055
1079
|
Label: ColorPickerLabel,
|
|
1056
1080
|
Positioner: ColorPickerPositioner,
|
|
1057
1081
|
Root: ColorPickerRoot,
|
|
@@ -1202,11 +1226,11 @@ const useCombobox = props => {
|
|
|
1202
1226
|
const [collectionOptions, rest] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
1203
1227
|
const collection = () => combobox__namespace.collection(collectionOptions);
|
|
1204
1228
|
const locale = useLocaleContext();
|
|
1205
|
-
const
|
|
1229
|
+
const environment = useEnvironmentContext();
|
|
1206
1230
|
const context = solid.mergeProps({
|
|
1207
1231
|
id: solidJs.createUniqueId(),
|
|
1208
1232
|
dir: locale().dir,
|
|
1209
|
-
getRootNode,
|
|
1233
|
+
getRootNode: environment().getRootNode,
|
|
1210
1234
|
'open.controlled': props.open !== undefined,
|
|
1211
1235
|
collection: collection()
|
|
1212
1236
|
}, rest);
|
|
@@ -1308,14 +1332,14 @@ const DatePickerLabel = props => {
|
|
|
1308
1332
|
return web.createComponent(ark.label, mergedProps);
|
|
1309
1333
|
};
|
|
1310
1334
|
|
|
1311
|
-
var _tmpl$$
|
|
1335
|
+
var _tmpl$$5 = /*#__PURE__*/web.template(`<option>`);
|
|
1312
1336
|
const DatePickerMonthSelect = props => {
|
|
1313
1337
|
const api = useDatePickerContext();
|
|
1314
1338
|
const mergedProps = solid.mergeProps(() => api().monthSelectProps, props);
|
|
1315
1339
|
return web.createComponent(ark.select, web.mergeProps(mergedProps, {
|
|
1316
1340
|
get children() {
|
|
1317
1341
|
return api().getMonths().map(month => (() => {
|
|
1318
|
-
var _el$ = _tmpl$$
|
|
1342
|
+
var _el$ = _tmpl$$5();
|
|
1319
1343
|
web.insert(_el$, () => month.label);
|
|
1320
1344
|
web.effect(() => _el$.value = month.value);
|
|
1321
1345
|
return _el$;
|
|
@@ -1376,12 +1400,12 @@ const DatePickerRangeText = props => {
|
|
|
1376
1400
|
|
|
1377
1401
|
const useDatePicker = props => {
|
|
1378
1402
|
const locale = useLocaleContext();
|
|
1379
|
-
const
|
|
1403
|
+
const environment = useEnvironmentContext();
|
|
1380
1404
|
const [localProps, restProps] = solidJs.splitProps(props, ['value', 'focusedValue', 'min', 'max']);
|
|
1381
1405
|
const context = solid.mergeProps(() => ({
|
|
1382
1406
|
id: solidJs.createUniqueId(),
|
|
1383
1407
|
dir: locale().dir,
|
|
1384
|
-
getRootNode,
|
|
1408
|
+
getRootNode: environment().getRootNode,
|
|
1385
1409
|
'open.controlled': props.open !== undefined,
|
|
1386
1410
|
focusedValue: localProps.focusedValue ? datePicker__namespace.parse(localProps.focusedValue) : undefined,
|
|
1387
1411
|
value: localProps.value ? datePicker__namespace.parse(localProps.value) : undefined,
|
|
@@ -1542,7 +1566,7 @@ const DatePickerViewTrigger = props => {
|
|
|
1542
1566
|
return web.createComponent(ark.button, mergedProps);
|
|
1543
1567
|
};
|
|
1544
1568
|
|
|
1545
|
-
var _tmpl$$
|
|
1569
|
+
var _tmpl$$4 = /*#__PURE__*/web.template(`<option>`);
|
|
1546
1570
|
const DatePickerYearSelect = props => {
|
|
1547
1571
|
const api = useDatePickerContext();
|
|
1548
1572
|
const mergedProps = solid.mergeProps(() => api().yearSelectProps, props);
|
|
@@ -1552,7 +1576,7 @@ const DatePickerYearSelect = props => {
|
|
|
1552
1576
|
from: 1_000,
|
|
1553
1577
|
to: 4_000
|
|
1554
1578
|
}).map(year => (() => {
|
|
1555
|
-
var _el$ = _tmpl$$
|
|
1579
|
+
var _el$ = _tmpl$$4();
|
|
1556
1580
|
_el$.value = year;
|
|
1557
1581
|
web.insert(_el$, year);
|
|
1558
1582
|
return _el$;
|
|
@@ -1663,11 +1687,11 @@ const DialogPositioner = props => {
|
|
|
1663
1687
|
|
|
1664
1688
|
const useDialog = props => {
|
|
1665
1689
|
const locale = useLocaleContext();
|
|
1666
|
-
const
|
|
1690
|
+
const environment = useEnvironmentContext();
|
|
1667
1691
|
const context = solid.mergeProps({
|
|
1668
1692
|
id: solidJs.createUniqueId(),
|
|
1669
1693
|
dir: locale().dir,
|
|
1670
|
-
getRootNode,
|
|
1694
|
+
getRootNode: environment().getRootNode,
|
|
1671
1695
|
'open.controlled': props.open !== undefined
|
|
1672
1696
|
}, props);
|
|
1673
1697
|
const [state, send] = solid.useMachine(dialog__namespace.machine(context), {
|
|
@@ -1781,11 +1805,11 @@ const EditablePreview = props => {
|
|
|
1781
1805
|
|
|
1782
1806
|
const useEditable = props => {
|
|
1783
1807
|
const locale = useLocaleContext();
|
|
1784
|
-
const
|
|
1808
|
+
const environment = useEnvironmentContext();
|
|
1785
1809
|
const context = solid.mergeProps({
|
|
1786
1810
|
id: solidJs.createUniqueId(),
|
|
1787
1811
|
dir: locale().dir,
|
|
1788
|
-
getRootNode
|
|
1812
|
+
getRootNode: environment().getRootNode
|
|
1789
1813
|
}, props);
|
|
1790
1814
|
const [state, send] = solid.useMachine(editable__namespace.machine(context), {
|
|
1791
1815
|
context
|
|
@@ -1832,15 +1856,10 @@ const [FileUploadProvider, useFileUploadContext] = createContext({
|
|
|
1832
1856
|
|
|
1833
1857
|
const FileUploadContext = props => props.children(useFileUploadContext());
|
|
1834
1858
|
|
|
1835
|
-
var _tmpl$$8 = /*#__PURE__*/web.template(`<input>`);
|
|
1836
1859
|
const FileUploadDropzone = props => {
|
|
1837
1860
|
const fileUpload = useFileUploadContext();
|
|
1838
1861
|
const mergedProps = solid.mergeProps(() => fileUpload().dropzoneProps, props);
|
|
1839
|
-
return
|
|
1840
|
-
var _el$ = _tmpl$$8();
|
|
1841
|
-
web.spread(_el$, web.mergeProps(() => fileUpload().hiddenInputProps), false, false);
|
|
1842
|
-
return _el$;
|
|
1843
|
-
})()];
|
|
1862
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1844
1863
|
};
|
|
1845
1864
|
|
|
1846
1865
|
const [FileUploadItemPropsProvider, useFileUploadItemPropsContext] = createContext({
|
|
@@ -1923,11 +1942,11 @@ const FileUploadLabel = props => {
|
|
|
1923
1942
|
|
|
1924
1943
|
const useFileUpload = props => {
|
|
1925
1944
|
const locale = useLocaleContext();
|
|
1926
|
-
const
|
|
1945
|
+
const environment = useEnvironmentContext();
|
|
1927
1946
|
const context = solid.mergeProps({
|
|
1928
1947
|
id: solidJs.createUniqueId(),
|
|
1929
1948
|
dir: locale().dir,
|
|
1930
|
-
getRootNode
|
|
1949
|
+
getRootNode: environment().getRootNode
|
|
1931
1950
|
}, props);
|
|
1932
1951
|
const [state, send] = solid.useMachine(fileUpload__namespace.machine(context), {
|
|
1933
1952
|
context
|
|
@@ -1953,10 +1972,17 @@ const FileUploadTrigger = props => {
|
|
|
1953
1972
|
return web.createComponent(ark.button, mergedProps);
|
|
1954
1973
|
};
|
|
1955
1974
|
|
|
1975
|
+
const FileUploadHiddenInput = props => {
|
|
1976
|
+
const fileUpload = useFileUploadContext();
|
|
1977
|
+
const mergedProps = solid.mergeProps(() => fileUpload().hiddenInputProps, props);
|
|
1978
|
+
return web.createComponent(ark.input, mergedProps);
|
|
1979
|
+
};
|
|
1980
|
+
|
|
1956
1981
|
var fileUpload = /*#__PURE__*/Object.freeze({
|
|
1957
1982
|
__proto__: null,
|
|
1958
1983
|
Context: FileUploadContext,
|
|
1959
1984
|
Dropzone: FileUploadDropzone,
|
|
1985
|
+
HiddenInput: FileUploadHiddenInput,
|
|
1960
1986
|
Item: FileUploadItem,
|
|
1961
1987
|
ItemDeleteTrigger: FileUploadItemDeleteTrigger,
|
|
1962
1988
|
ItemGroup: FileUploadItemGroup,
|
|
@@ -2038,11 +2064,11 @@ const HoverCardPositioner = props => {
|
|
|
2038
2064
|
|
|
2039
2065
|
const useHoverCard = props => {
|
|
2040
2066
|
const locale = useLocaleContext();
|
|
2041
|
-
const
|
|
2067
|
+
const environment = useEnvironmentContext();
|
|
2042
2068
|
const context = solid.mergeProps({
|
|
2043
2069
|
id: solidJs.createUniqueId(),
|
|
2044
2070
|
dir: locale().dir,
|
|
2045
|
-
getRootNode,
|
|
2071
|
+
getRootNode: environment().getRootNode,
|
|
2046
2072
|
'open.controlled': props.open !== undefined
|
|
2047
2073
|
}, props);
|
|
2048
2074
|
const [state, send] = solid.useMachine(hoverCard__namespace.machine(context), {
|
|
@@ -2280,11 +2306,11 @@ const MenuRadioItemGroup = props => {
|
|
|
2280
2306
|
|
|
2281
2307
|
const useMenu = props => {
|
|
2282
2308
|
const locale = useLocaleContext();
|
|
2283
|
-
const
|
|
2309
|
+
const environment = useEnvironmentContext();
|
|
2284
2310
|
const context = solid.mergeProps({
|
|
2285
2311
|
id: solidJs.createUniqueId(),
|
|
2286
2312
|
dir: locale().dir,
|
|
2287
|
-
getRootNode,
|
|
2313
|
+
getRootNode: environment().getRootNode,
|
|
2288
2314
|
'open.controlled': props.open !== undefined
|
|
2289
2315
|
}, props);
|
|
2290
2316
|
const [state, send, machine] = solid.useMachine(menu__namespace.machine(context), {
|
|
@@ -2435,11 +2461,11 @@ const NumberInputLabel = props => {
|
|
|
2435
2461
|
|
|
2436
2462
|
const useNumberInput = props => {
|
|
2437
2463
|
const locale = useLocaleContext();
|
|
2438
|
-
const
|
|
2464
|
+
const environment = useEnvironmentContext();
|
|
2439
2465
|
const context = solid.mergeProps({
|
|
2440
2466
|
id: solidJs.createUniqueId(),
|
|
2441
2467
|
dir: locale().dir,
|
|
2442
|
-
getRootNode
|
|
2468
|
+
getRootNode: environment().getRootNode
|
|
2443
2469
|
}, props);
|
|
2444
2470
|
const [state, send] = solid.useMachine(numberInput__namespace.machine(context), {
|
|
2445
2471
|
context
|
|
@@ -2512,11 +2538,11 @@ const PaginationPrevTrigger = props => {
|
|
|
2512
2538
|
|
|
2513
2539
|
const usePagination = props => {
|
|
2514
2540
|
const locale = useLocaleContext();
|
|
2515
|
-
const
|
|
2541
|
+
const environment = useEnvironmentContext();
|
|
2516
2542
|
const context = solid.mergeProps({
|
|
2517
2543
|
id: solidJs.createUniqueId(),
|
|
2518
2544
|
dir: locale().dir,
|
|
2519
|
-
getRootNode
|
|
2545
|
+
getRootNode: environment().getRootNode
|
|
2520
2546
|
}, props);
|
|
2521
2547
|
const [state, send] = solid.useMachine(pagination__namespace.machine(context), {
|
|
2522
2548
|
context
|
|
@@ -2574,11 +2600,11 @@ const PinInputLabel = props => {
|
|
|
2574
2600
|
|
|
2575
2601
|
const usePinInput = props => {
|
|
2576
2602
|
const locale = useLocaleContext();
|
|
2577
|
-
const
|
|
2603
|
+
const environment = useEnvironmentContext();
|
|
2578
2604
|
const context = solid.mergeProps({
|
|
2579
2605
|
id: solidJs.createUniqueId(),
|
|
2580
2606
|
dir: locale().dir,
|
|
2581
|
-
getRootNode
|
|
2607
|
+
getRootNode: environment().getRootNode
|
|
2582
2608
|
}, props);
|
|
2583
2609
|
const [state, send] = solid.useMachine(pinInput__namespace.machine(context), {
|
|
2584
2610
|
context
|
|
@@ -2586,27 +2612,29 @@ const usePinInput = props => {
|
|
|
2586
2612
|
return solidJs.createMemo(() => pinInput__namespace.connect(state, send, solid.normalizeProps));
|
|
2587
2613
|
};
|
|
2588
2614
|
|
|
2589
|
-
var _tmpl$$7 = /*#__PURE__*/web.template(`<input>`);
|
|
2590
2615
|
const PinInputRoot = props => {
|
|
2591
2616
|
const [usePinInputProps, localProps] = createSplitProps()(props, ['autoFocus', 'blurOnComplete', 'disabled', 'form', 'id', 'ids', 'invalid', 'mask', 'name', 'onValueChange', 'onValueComplete', 'onValueInvalid', 'otp', 'pattern', 'placeholder', 'selectOnFocus', 'translations', 'type', 'value']);
|
|
2592
|
-
const
|
|
2593
|
-
const mergedProps = solid.mergeProps(() =>
|
|
2617
|
+
const pinInput = usePinInput(usePinInputProps);
|
|
2618
|
+
const mergedProps = solid.mergeProps(() => pinInput().rootProps, localProps);
|
|
2594
2619
|
return web.createComponent(PinInputProvider, {
|
|
2595
|
-
value:
|
|
2620
|
+
value: pinInput,
|
|
2596
2621
|
get children() {
|
|
2597
|
-
return
|
|
2598
|
-
var _el$ = _tmpl$$7();
|
|
2599
|
-
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
2600
|
-
return _el$;
|
|
2601
|
-
})()];
|
|
2622
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2602
2623
|
}
|
|
2603
2624
|
});
|
|
2604
2625
|
};
|
|
2605
2626
|
|
|
2627
|
+
const PinInputHiddenInput = props => {
|
|
2628
|
+
const pinInput = usePinInputContext();
|
|
2629
|
+
const mergedProps = solid.mergeProps(() => pinInput().hiddenInputProps, props);
|
|
2630
|
+
return web.createComponent(ark.input, mergedProps);
|
|
2631
|
+
};
|
|
2632
|
+
|
|
2606
2633
|
var pinInput = /*#__PURE__*/Object.freeze({
|
|
2607
2634
|
__proto__: null,
|
|
2608
2635
|
Context: PinInputContext,
|
|
2609
2636
|
Control: PinInputControl,
|
|
2637
|
+
HiddenInput: PinInputHiddenInput,
|
|
2610
2638
|
Input: PinInputInput,
|
|
2611
2639
|
Label: PinInputLabel,
|
|
2612
2640
|
Root: PinInputRoot
|
|
@@ -2685,11 +2713,11 @@ const PopoverPositioner = props => {
|
|
|
2685
2713
|
|
|
2686
2714
|
const usePopover = props => {
|
|
2687
2715
|
const locale = useLocaleContext();
|
|
2688
|
-
const
|
|
2716
|
+
const environment = useEnvironmentContext();
|
|
2689
2717
|
const context = solid.mergeProps({
|
|
2690
2718
|
id: solidJs.createUniqueId(),
|
|
2691
2719
|
dir: locale().dir,
|
|
2692
|
-
getRootNode,
|
|
2720
|
+
getRootNode: environment().getRootNode,
|
|
2693
2721
|
'open.controlled': props.open !== undefined
|
|
2694
2722
|
}, props);
|
|
2695
2723
|
const [state, send] = solid.useMachine(popover__namespace.machine(context), {
|
|
@@ -2788,11 +2816,11 @@ const ProgressRange = props => {
|
|
|
2788
2816
|
|
|
2789
2817
|
const useProgress = props => {
|
|
2790
2818
|
const locale = useLocaleContext();
|
|
2791
|
-
const
|
|
2819
|
+
const environment = useEnvironmentContext();
|
|
2792
2820
|
const context = solid.mergeProps({
|
|
2793
2821
|
id: solidJs.createUniqueId(),
|
|
2794
2822
|
dir: locale().dir,
|
|
2795
|
-
getRootNode
|
|
2823
|
+
getRootNode: environment().getRootNode
|
|
2796
2824
|
}, props);
|
|
2797
2825
|
const [state, send] = solid.useMachine(progress__namespace.machine(context), {
|
|
2798
2826
|
context
|
|
@@ -2892,13 +2920,13 @@ const RadioGroupItem = props => {
|
|
|
2892
2920
|
|
|
2893
2921
|
const RadioGroupItemContext = props => props.children(useRadioGroupItemContext());
|
|
2894
2922
|
|
|
2895
|
-
var _tmpl$$
|
|
2923
|
+
var _tmpl$$3 = /*#__PURE__*/web.template(`<input>`);
|
|
2896
2924
|
const RadioGroupItemControl = props => {
|
|
2897
2925
|
const radioGroup = useRadioGroupContext();
|
|
2898
2926
|
const itemProps = useRadioGroupItemPropsContext();
|
|
2899
2927
|
const mergedProps = solid.mergeProps(() => radioGroup().getItemControlProps(itemProps), props);
|
|
2900
2928
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2901
|
-
var _el$ = _tmpl$$
|
|
2929
|
+
var _el$ = _tmpl$$3();
|
|
2902
2930
|
web.spread(_el$, web.mergeProps(() => radioGroup().getItemHiddenInputProps(itemProps)), false, false);
|
|
2903
2931
|
return _el$;
|
|
2904
2932
|
})()];
|
|
@@ -2919,11 +2947,11 @@ const RadioGroupLabel = props => {
|
|
|
2919
2947
|
|
|
2920
2948
|
const useRadioGroup = props => {
|
|
2921
2949
|
const locale = useLocaleContext();
|
|
2922
|
-
const
|
|
2950
|
+
const environment = useEnvironmentContext();
|
|
2923
2951
|
const context = solid.mergeProps({
|
|
2924
2952
|
id: solidJs.createUniqueId(),
|
|
2925
2953
|
dir: locale().dir,
|
|
2926
|
-
getRootNode
|
|
2954
|
+
getRootNode: environment().getRootNode
|
|
2927
2955
|
}, props);
|
|
2928
2956
|
const [state, send] = solid.useMachine(radio__namespace.machine(context), {
|
|
2929
2957
|
context
|
|
@@ -2962,15 +2990,10 @@ const [RatingGroupProvider, useRatingGroupContext] = createContext({
|
|
|
2962
2990
|
|
|
2963
2991
|
const RatingGroupContext = props => props.children(useRatingGroupContext());
|
|
2964
2992
|
|
|
2965
|
-
var _tmpl$$5 = /*#__PURE__*/web.template(`<input>`);
|
|
2966
2993
|
const RatingGroupControl = props => {
|
|
2967
|
-
const
|
|
2968
|
-
const mergedProps = solid.mergeProps(() =>
|
|
2969
|
-
return
|
|
2970
|
-
var _el$ = _tmpl$$5();
|
|
2971
|
-
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
2972
|
-
return _el$;
|
|
2973
|
-
})()];
|
|
2994
|
+
const ratingGroup = useRatingGroupContext();
|
|
2995
|
+
const mergedProps = solid.mergeProps(() => ratingGroup().controlProps, props);
|
|
2996
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2974
2997
|
};
|
|
2975
2998
|
|
|
2976
2999
|
const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext({
|
|
@@ -3001,11 +3024,11 @@ const RatingGroupLabel = props => {
|
|
|
3001
3024
|
|
|
3002
3025
|
const useRatingGroup = props => {
|
|
3003
3026
|
const locale = useLocaleContext();
|
|
3004
|
-
const
|
|
3027
|
+
const environment = useEnvironmentContext();
|
|
3005
3028
|
const context = solid.mergeProps({
|
|
3006
3029
|
id: solidJs.createUniqueId(),
|
|
3007
3030
|
dir: locale().dir,
|
|
3008
|
-
getRootNode
|
|
3031
|
+
getRootNode: environment().getRootNode
|
|
3009
3032
|
}, props);
|
|
3010
3033
|
const [state, send] = solid.useMachine(rating__namespace.machine(context), {
|
|
3011
3034
|
context
|
|
@@ -3025,10 +3048,17 @@ const RatingGroupRoot = props => {
|
|
|
3025
3048
|
});
|
|
3026
3049
|
};
|
|
3027
3050
|
|
|
3051
|
+
const RatingGroupHiddenInput = props => {
|
|
3052
|
+
const ratingGroup = useRatingGroupContext();
|
|
3053
|
+
const mergedProps = solid.mergeProps(() => ratingGroup().hiddenInputProps, props);
|
|
3054
|
+
return web.createComponent(ark.input, mergedProps);
|
|
3055
|
+
};
|
|
3056
|
+
|
|
3028
3057
|
var ratingGroup = /*#__PURE__*/Object.freeze({
|
|
3029
3058
|
__proto__: null,
|
|
3030
3059
|
Context: RatingGroupContext,
|
|
3031
3060
|
Control: RatingGroupControl,
|
|
3061
|
+
HiddenInput: RatingGroupHiddenInput,
|
|
3032
3062
|
Item: RatingGroupItem,
|
|
3033
3063
|
ItemContext: RatingGroupItemContext,
|
|
3034
3064
|
Label: RatingGroupLabel,
|
|
@@ -3078,13 +3108,13 @@ const SegmentGroupItem = props => {
|
|
|
3078
3108
|
|
|
3079
3109
|
const SegmentGroupItemContext = props => props.children(useSegmentGroupItemContext());
|
|
3080
3110
|
|
|
3081
|
-
var _tmpl$$
|
|
3111
|
+
var _tmpl$$2 = /*#__PURE__*/web.template(`<input>`);
|
|
3082
3112
|
const SegmentGroupItemControl = props => {
|
|
3083
3113
|
const segmentGroup = useSegmentGroupContext();
|
|
3084
3114
|
const itemProps = useSegmentGroupItemPropsContext();
|
|
3085
3115
|
const mergedProps = solid.mergeProps(() => segmentGroup().getItemControlProps(itemProps), anatomy.segmentGroupAnatomy.build().itemControl.attrs, props);
|
|
3086
3116
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
3087
|
-
var _el$ = _tmpl$$
|
|
3117
|
+
var _el$ = _tmpl$$2();
|
|
3088
3118
|
web.spread(_el$, web.mergeProps(() => segmentGroup().getItemHiddenInputProps(itemProps)), false, false);
|
|
3089
3119
|
return _el$;
|
|
3090
3120
|
})()];
|
|
@@ -3105,11 +3135,11 @@ const SegmentGroupLabel = props => {
|
|
|
3105
3135
|
|
|
3106
3136
|
const useSegmentGroup = props => {
|
|
3107
3137
|
const locale = useLocaleContext();
|
|
3108
|
-
const
|
|
3138
|
+
const environment = useEnvironmentContext();
|
|
3109
3139
|
const context = solid.mergeProps({
|
|
3110
3140
|
id: solidJs.createUniqueId(),
|
|
3111
3141
|
dir: locale().dir,
|
|
3112
|
-
getRootNode
|
|
3142
|
+
getRootNode: environment().getRootNode
|
|
3113
3143
|
}, props);
|
|
3114
3144
|
const [state, send] = solid.useMachine(radio__namespace.machine(context), {
|
|
3115
3145
|
context
|
|
@@ -3169,37 +3199,40 @@ const SelectContent = props => {
|
|
|
3169
3199
|
|
|
3170
3200
|
const SelectContext = props => props.children(useSelectContext());
|
|
3171
3201
|
|
|
3172
|
-
var _tmpl$$3 = /*#__PURE__*/web.template(`<option value="">`),
|
|
3173
|
-
_tmpl$2 = /*#__PURE__*/web.template(`<select>`),
|
|
3174
|
-
_tmpl$3 = /*#__PURE__*/web.template(`<option>`);
|
|
3175
3202
|
const SelectControl = props => {
|
|
3203
|
+
const select = useSelectContext();
|
|
3204
|
+
const mergedProps = solid.mergeProps(() => select().controlProps, props);
|
|
3205
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3206
|
+
};
|
|
3207
|
+
|
|
3208
|
+
var _tmpl$$1 = /*#__PURE__*/web.template(`<option value="">`),
|
|
3209
|
+
_tmpl$2 = /*#__PURE__*/web.template(`<option>`);
|
|
3210
|
+
const SelectHiddenSelect = props => {
|
|
3176
3211
|
const select = useSelectContext();
|
|
3177
3212
|
const mergedProps = solid.mergeProps(() => select().controlProps, props);
|
|
3178
3213
|
const isValueEmpty = solidJs.createMemo(() => select().value.length === 0);
|
|
3179
|
-
return
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
return _el$;
|
|
3202
|
-
})()];
|
|
3214
|
+
return web.createComponent(ark.select, web.mergeProps(mergedProps, {
|
|
3215
|
+
get children() {
|
|
3216
|
+
return [web.createComponent(solidJs.Show, {
|
|
3217
|
+
get when() {
|
|
3218
|
+
return isValueEmpty();
|
|
3219
|
+
},
|
|
3220
|
+
get children() {
|
|
3221
|
+
return _tmpl$$1();
|
|
3222
|
+
}
|
|
3223
|
+
}), web.createComponent(solidJs.Index, {
|
|
3224
|
+
get each() {
|
|
3225
|
+
return select().collection.toArray();
|
|
3226
|
+
},
|
|
3227
|
+
children: option => (() => {
|
|
3228
|
+
var _el$2 = _tmpl$2();
|
|
3229
|
+
web.insert(_el$2, () => option().label);
|
|
3230
|
+
web.effect(() => _el$2.value = option().value);
|
|
3231
|
+
return _el$2;
|
|
3232
|
+
})()
|
|
3233
|
+
})];
|
|
3234
|
+
}
|
|
3235
|
+
}));
|
|
3203
3236
|
};
|
|
3204
3237
|
|
|
3205
3238
|
const SelectIndicator = props => {
|
|
@@ -3305,11 +3338,11 @@ const useSelect = props => {
|
|
|
3305
3338
|
const [collectionOptions, rest] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
3306
3339
|
const collection = () => select__namespace.collection(collectionOptions);
|
|
3307
3340
|
const locale = useLocaleContext();
|
|
3308
|
-
const
|
|
3341
|
+
const environment = useEnvironmentContext();
|
|
3309
3342
|
const context = solid.mergeProps({
|
|
3310
3343
|
id: solidJs.createUniqueId(),
|
|
3311
3344
|
dir: locale().dir,
|
|
3312
|
-
getRootNode,
|
|
3345
|
+
getRootNode: environment().getRootNode,
|
|
3313
3346
|
collection: collection(),
|
|
3314
3347
|
'open.controlled': props.open !== undefined
|
|
3315
3348
|
}, rest);
|
|
@@ -3362,6 +3395,7 @@ var select = /*#__PURE__*/Object.freeze({
|
|
|
3362
3395
|
Content: SelectContent,
|
|
3363
3396
|
Context: SelectContext,
|
|
3364
3397
|
Control: SelectControl,
|
|
3398
|
+
HiddenSelect: SelectHiddenSelect,
|
|
3365
3399
|
Indicator: SelectIndicator,
|
|
3366
3400
|
Item: SelectItem,
|
|
3367
3401
|
ItemContext: SelectItemContext,
|
|
@@ -3416,11 +3450,11 @@ const SliderRange = props => {
|
|
|
3416
3450
|
|
|
3417
3451
|
const useSlider = props => {
|
|
3418
3452
|
const locale = useLocaleContext();
|
|
3419
|
-
const
|
|
3453
|
+
const environment = useEnvironmentContext();
|
|
3420
3454
|
const context = solid.mergeProps({
|
|
3421
3455
|
id: solidJs.createUniqueId(),
|
|
3422
3456
|
dir: locale().dir,
|
|
3423
|
-
getRootNode
|
|
3457
|
+
getRootNode: environment().getRootNode
|
|
3424
3458
|
}, props);
|
|
3425
3459
|
const [state, send] = solid.useMachine(slider__namespace.machine(context), {
|
|
3426
3460
|
context
|
|
@@ -3500,11 +3534,11 @@ const SplitterResizeTrigger = props => {
|
|
|
3500
3534
|
|
|
3501
3535
|
const useSplitter = props => {
|
|
3502
3536
|
const locale = useLocaleContext();
|
|
3503
|
-
const
|
|
3537
|
+
const environment = useEnvironmentContext();
|
|
3504
3538
|
const context = solid.mergeProps({
|
|
3505
3539
|
id: solidJs.createUniqueId(),
|
|
3506
3540
|
dir: locale().dir,
|
|
3507
|
-
getRootNode
|
|
3541
|
+
getRootNode: environment().getRootNode
|
|
3508
3542
|
}, props);
|
|
3509
3543
|
const [state, send] = solid.useMachine(splitter__namespace.machine(context), {
|
|
3510
3544
|
context
|
|
@@ -3539,15 +3573,16 @@ const [SwitchProvider, useSwitchContext] = createContext({
|
|
|
3539
3573
|
|
|
3540
3574
|
const SwitchContext = props => props.children(useSwitchContext());
|
|
3541
3575
|
|
|
3542
|
-
var _tmpl$$2 = /*#__PURE__*/web.template(`<input>`);
|
|
3543
3576
|
const SwitchControl = props => {
|
|
3544
3577
|
const api = useSwitchContext();
|
|
3545
3578
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
3546
|
-
return
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3579
|
+
return web.createComponent(ark.span, mergedProps);
|
|
3580
|
+
};
|
|
3581
|
+
|
|
3582
|
+
const SwitchHiddenInput = props => {
|
|
3583
|
+
const api = useSwitchContext();
|
|
3584
|
+
const mergedProps = solid.mergeProps(() => api().hiddenInputProps, props);
|
|
3585
|
+
return web.createComponent(ark.input, mergedProps);
|
|
3551
3586
|
};
|
|
3552
3587
|
|
|
3553
3588
|
const SwitchLabel = props => {
|
|
@@ -3558,11 +3593,11 @@ const SwitchLabel = props => {
|
|
|
3558
3593
|
|
|
3559
3594
|
const useSwitch = props => {
|
|
3560
3595
|
const locale = useLocaleContext();
|
|
3561
|
-
const
|
|
3596
|
+
const environment = useEnvironmentContext();
|
|
3562
3597
|
const context = solid.mergeProps({
|
|
3563
3598
|
id: solidJs.createUniqueId(),
|
|
3564
3599
|
dir: locale().dir,
|
|
3565
|
-
getRootNode
|
|
3600
|
+
getRootNode: environment().getRootNode
|
|
3566
3601
|
}, props);
|
|
3567
3602
|
const [state, send] = solid.useMachine(zagSwitch__namespace.machine(context), {
|
|
3568
3603
|
context
|
|
@@ -3592,6 +3627,7 @@ var _switch = /*#__PURE__*/Object.freeze({
|
|
|
3592
3627
|
__proto__: null,
|
|
3593
3628
|
Context: SwitchContext,
|
|
3594
3629
|
Control: SwitchControl,
|
|
3630
|
+
HiddenInput: SwitchHiddenInput,
|
|
3595
3631
|
Label: SwitchLabel,
|
|
3596
3632
|
Root: SwitchRoot,
|
|
3597
3633
|
Thumb: SwitchThumb
|
|
@@ -3648,11 +3684,11 @@ const TabsContext = props => props.children(useTabsContext());
|
|
|
3648
3684
|
|
|
3649
3685
|
const useTabs = props => {
|
|
3650
3686
|
const locale = useLocaleContext();
|
|
3651
|
-
const
|
|
3687
|
+
const environment = useEnvironmentContext();
|
|
3652
3688
|
const context = solid.mergeProps({
|
|
3653
3689
|
id: solidJs.createUniqueId(),
|
|
3654
3690
|
dir: locale().dir,
|
|
3655
|
-
getRootNode
|
|
3691
|
+
getRootNode: environment().getRootNode
|
|
3656
3692
|
}, props);
|
|
3657
3693
|
const [state, send] = solid.useMachine(tabs__namespace.machine(context), {
|
|
3658
3694
|
context
|
|
@@ -3757,6 +3793,12 @@ const TagsInputItemInput = props => {
|
|
|
3757
3793
|
return web.createComponent(ark.input, mergedProps);
|
|
3758
3794
|
};
|
|
3759
3795
|
|
|
3796
|
+
const TagsInputHiddenInput = props => {
|
|
3797
|
+
const tagsInput = useTagsInputContext();
|
|
3798
|
+
const mergedProps = solid.mergeProps(() => tagsInput().hiddenInputProps, props);
|
|
3799
|
+
return web.createComponent(ark.input, mergedProps);
|
|
3800
|
+
};
|
|
3801
|
+
|
|
3760
3802
|
const TagsInputItemPreview = props => {
|
|
3761
3803
|
const api = useTagsInputContext();
|
|
3762
3804
|
const itemProps = useTagsInputItemPropsContext();
|
|
@@ -3779,11 +3821,11 @@ const TagsInputLabel = props => {
|
|
|
3779
3821
|
|
|
3780
3822
|
const useTagsInput = props => {
|
|
3781
3823
|
const locale = useLocaleContext();
|
|
3782
|
-
const
|
|
3824
|
+
const environment = useEnvironmentContext();
|
|
3783
3825
|
const context = solid.mergeProps({
|
|
3784
3826
|
id: solidJs.createUniqueId(),
|
|
3785
3827
|
dir: locale().dir,
|
|
3786
|
-
getRootNode
|
|
3828
|
+
getRootNode: environment().getRootNode
|
|
3787
3829
|
}, props);
|
|
3788
3830
|
const [state, send] = solid.useMachine(tagsInput__namespace.machine(context), {
|
|
3789
3831
|
context
|
|
@@ -3791,7 +3833,6 @@ const useTagsInput = props => {
|
|
|
3791
3833
|
return solidJs.createMemo(() => tagsInput__namespace.connect(state, send, solid.normalizeProps));
|
|
3792
3834
|
};
|
|
3793
3835
|
|
|
3794
|
-
var _tmpl$$1 = /*#__PURE__*/web.template(`<input>`);
|
|
3795
3836
|
const TagsInputRoot = props => {
|
|
3796
3837
|
const [useTagsInputProps, localProps] = createSplitProps()(props, ['addOnPaste', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'disabled', 'editable', 'form', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onFocusOutside', 'onHighlightChange', 'onInputValueChange', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueInvalid', 'readOnly', 'translations', 'validate', 'value']);
|
|
3797
3838
|
const api = useTagsInput(useTagsInputProps);
|
|
@@ -3799,11 +3840,7 @@ const TagsInputRoot = props => {
|
|
|
3799
3840
|
return web.createComponent(TagsInputProvider, {
|
|
3800
3841
|
value: api,
|
|
3801
3842
|
get children() {
|
|
3802
|
-
return
|
|
3803
|
-
var _el$ = _tmpl$$1();
|
|
3804
|
-
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
3805
|
-
return _el$;
|
|
3806
|
-
})()];
|
|
3843
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3807
3844
|
}
|
|
3808
3845
|
});
|
|
3809
3846
|
};
|
|
@@ -3813,6 +3850,7 @@ var tagsInput = /*#__PURE__*/Object.freeze({
|
|
|
3813
3850
|
ClearTrigger: TagsInputClearTrigger,
|
|
3814
3851
|
Context: TagsInputContext,
|
|
3815
3852
|
Control: TagsInputControl,
|
|
3853
|
+
HiddenInput: TagsInputHiddenInput,
|
|
3816
3854
|
Input: TagsInputInput,
|
|
3817
3855
|
Item: TagsInputItem,
|
|
3818
3856
|
ItemContext: TagsInputItemContext,
|
|
@@ -3943,11 +3981,11 @@ const ToggleGroupItem = props => {
|
|
|
3943
3981
|
|
|
3944
3982
|
const useToggleGroup = props => {
|
|
3945
3983
|
const locale = useLocaleContext();
|
|
3946
|
-
const
|
|
3984
|
+
const environment = useEnvironmentContext();
|
|
3947
3985
|
const context = solid.mergeProps({
|
|
3948
3986
|
id: solidJs.createUniqueId(),
|
|
3949
3987
|
dir: locale().dir,
|
|
3950
|
-
getRootNode
|
|
3988
|
+
getRootNode: environment().getRootNode
|
|
3951
3989
|
}, props);
|
|
3952
3990
|
const [state, send] = solid.useMachine(toggleGroup__namespace.machine(context), {
|
|
3953
3991
|
context
|
|
@@ -4023,11 +4061,11 @@ const TooltipPositioner = props => {
|
|
|
4023
4061
|
|
|
4024
4062
|
const useTooltip = props => {
|
|
4025
4063
|
const locale = useLocaleContext();
|
|
4026
|
-
const
|
|
4064
|
+
const environment = useEnvironmentContext();
|
|
4027
4065
|
const context = solid.mergeProps({
|
|
4028
4066
|
id: solidJs.createUniqueId(),
|
|
4029
4067
|
dir: locale().dir,
|
|
4030
|
-
getRootNode,
|
|
4068
|
+
getRootNode: environment().getRootNode,
|
|
4031
4069
|
'open.controlled': props.open !== undefined
|
|
4032
4070
|
}, props);
|
|
4033
4071
|
const [state, send] = solid.useMachine(tooltip__namespace.machine(context), {
|
|
@@ -4202,11 +4240,11 @@ const TreeViewLabel = props => {
|
|
|
4202
4240
|
|
|
4203
4241
|
const useTreeView = props => {
|
|
4204
4242
|
const locale = useLocaleContext();
|
|
4205
|
-
const
|
|
4243
|
+
const environment = useEnvironmentContext();
|
|
4206
4244
|
const context = solid.mergeProps({
|
|
4207
4245
|
id: solidJs.createUniqueId(),
|
|
4208
4246
|
dir: locale().dir,
|
|
4209
|
-
getRootNode
|
|
4247
|
+
getRootNode: environment().getRootNode
|
|
4210
4248
|
}, props);
|
|
4211
4249
|
const [state, send] = solid.useMachine(treeView__namespace.machine(context), {
|
|
4212
4250
|
context
|
|
@@ -4282,6 +4320,7 @@ exports.CarouselViewport = CarouselViewport;
|
|
|
4282
4320
|
exports.Checkbox = checkbox;
|
|
4283
4321
|
exports.CheckboxContext = CheckboxContext;
|
|
4284
4322
|
exports.CheckboxControl = CheckboxControl;
|
|
4323
|
+
exports.CheckboxHiddenInput = CheckboxHiddenInput;
|
|
4285
4324
|
exports.CheckboxIndicator = CheckboxIndicator;
|
|
4286
4325
|
exports.CheckboxLabel = CheckboxLabel;
|
|
4287
4326
|
exports.CheckboxRoot = CheckboxRoot;
|
|
@@ -4312,6 +4351,7 @@ exports.ColorPickerControl = ColorPickerControl;
|
|
|
4312
4351
|
exports.ColorPickerEyeDropperTrigger = ColorPickerEyeDropperTrigger;
|
|
4313
4352
|
exports.ColorPickerFormatSelect = ColorPickerFormatSelect;
|
|
4314
4353
|
exports.ColorPickerFormatTrigger = ColorPickerFormatTrigger;
|
|
4354
|
+
exports.ColorPickerHiddenInput = ColorPickerHiddenInput;
|
|
4315
4355
|
exports.ColorPickerLabel = ColorPickerLabel;
|
|
4316
4356
|
exports.ColorPickerPositioner = ColorPickerPositioner;
|
|
4317
4357
|
exports.ColorPickerRoot = ColorPickerRoot;
|
|
@@ -4390,6 +4430,7 @@ exports.Environment = Environment;
|
|
|
4390
4430
|
exports.FileUpload = fileUpload;
|
|
4391
4431
|
exports.FileUploadContext = FileUploadContext;
|
|
4392
4432
|
exports.FileUploadDropzone = FileUploadDropzone;
|
|
4433
|
+
exports.FileUploadHiddenInput = FileUploadHiddenInput;
|
|
4393
4434
|
exports.FileUploadItem = FileUploadItem;
|
|
4394
4435
|
exports.FileUploadItemDeleteTrigger = FileUploadItemDeleteTrigger;
|
|
4395
4436
|
exports.FileUploadItemGroup = FileUploadItemGroup;
|
|
@@ -4452,6 +4493,7 @@ exports.PaginationRoot = PaginationRoot;
|
|
|
4452
4493
|
exports.PinInput = pinInput;
|
|
4453
4494
|
exports.PinInputContext = PinInputContext;
|
|
4454
4495
|
exports.PinInputControl = PinInputControl;
|
|
4496
|
+
exports.PinInputHiddenInput = PinInputHiddenInput;
|
|
4455
4497
|
exports.PinInputInput = PinInputInput;
|
|
4456
4498
|
exports.PinInputLabel = PinInputLabel;
|
|
4457
4499
|
exports.PinInputRoot = PinInputRoot;
|
|
@@ -4493,6 +4535,7 @@ exports.RadioGroupRoot = RadioGroupRoot;
|
|
|
4493
4535
|
exports.RatingGroup = ratingGroup;
|
|
4494
4536
|
exports.RatingGroupContext = RatingGroupContext;
|
|
4495
4537
|
exports.RatingGroupControl = RatingGroupControl;
|
|
4538
|
+
exports.RatingGroupHiddenInput = RatingGroupHiddenInput;
|
|
4496
4539
|
exports.RatingGroupItem = RatingGroupItem;
|
|
4497
4540
|
exports.RatingGroupItemContext = RatingGroupItemContext;
|
|
4498
4541
|
exports.RatingGroupLabel = RatingGroupLabel;
|
|
@@ -4511,6 +4554,7 @@ exports.SelectClearTrigger = SelectClearTrigger;
|
|
|
4511
4554
|
exports.SelectContent = SelectContent;
|
|
4512
4555
|
exports.SelectContext = SelectContext;
|
|
4513
4556
|
exports.SelectControl = SelectControl;
|
|
4557
|
+
exports.SelectHiddenSelect = SelectHiddenSelect;
|
|
4514
4558
|
exports.SelectIndicator = SelectIndicator;
|
|
4515
4559
|
exports.SelectItem = SelectItem;
|
|
4516
4560
|
exports.SelectItemContext = SelectItemContext;
|
|
@@ -4542,6 +4586,7 @@ exports.SplitterRoot = SplitterRoot;
|
|
|
4542
4586
|
exports.Switch = _switch;
|
|
4543
4587
|
exports.SwitchContext = SwitchContext;
|
|
4544
4588
|
exports.SwitchControl = SwitchControl;
|
|
4589
|
+
exports.SwitchHiddenInput = SwitchHiddenInput;
|
|
4545
4590
|
exports.SwitchLabel = SwitchLabel;
|
|
4546
4591
|
exports.SwitchRoot = SwitchRoot;
|
|
4547
4592
|
exports.SwitchThumb = SwitchThumb;
|
|
@@ -4556,6 +4601,7 @@ exports.TagsInput = tagsInput;
|
|
|
4556
4601
|
exports.TagsInputClearTrigger = TagsInputClearTrigger;
|
|
4557
4602
|
exports.TagsInputContext = TagsInputContext;
|
|
4558
4603
|
exports.TagsInputControl = TagsInputControl;
|
|
4604
|
+
exports.TagsInputHiddenInput = TagsInputHiddenInput;
|
|
4559
4605
|
exports.TagsInputInput = TagsInputInput;
|
|
4560
4606
|
exports.TagsInputItem = TagsInputItem;
|
|
4561
4607
|
exports.TagsInputItemContext = TagsInputItemContext;
|