@ark-ui/solid 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/README.md +67 -61
- package/cjs/index.js +331 -99
- package/cjs/index.js.map +1 -1
- package/esm/index.js +315 -100
- package/esm/index.js.map +1 -1
- package/package.json +55 -50
- package/source/color-picker/color-picker-format-select.jsx +13 -0
- package/source/color-picker/color-picker-format-trigger.jsx +8 -0
- package/source/color-picker/color-picker-swatch-context.js +5 -0
- package/source/color-picker/color-picker-swatch-indicator.jsx +10 -0
- package/source/color-picker/color-picker-swatch-trigger.jsx +4 -1
- package/source/color-picker/color-picker-swatch.jsx +6 -3
- package/source/color-picker/color-picker.jsx +3 -1
- package/source/color-picker/index.js +7 -1
- package/source/date-picker/date-picker.jsx +1 -1
- package/source/dialog/dialog-close-trigger.jsx +1 -1
- package/source/editable/editable-area.jsx +2 -2
- package/source/editable/editable-cancel-trigger.jsx +2 -2
- package/source/editable/editable-control.jsx +2 -2
- package/source/editable/editable-edit-trigger.jsx +2 -2
- package/source/editable/editable-input.jsx +2 -2
- package/source/editable/editable-label.jsx +2 -2
- package/source/editable/editable-preview.jsx +2 -2
- package/source/editable/editable-submit-trigger.jsx +2 -2
- package/source/editable/editable.jsx +5 -7
- package/source/file-upload/file-upload-context.js +5 -0
- package/source/file-upload/file-upload-dropzone.jsx +11 -0
- package/source/file-upload/file-upload-item-context.js +5 -0
- package/source/file-upload/file-upload-item-delete-trigger.jsx +10 -0
- package/source/file-upload/file-upload-item-group.jsx +10 -0
- package/source/file-upload/file-upload-item-name.jsx +12 -0
- package/source/file-upload/file-upload-item-preview-image.jsx +13 -0
- package/source/file-upload/file-upload-item-preview.jsx +12 -0
- package/source/file-upload/file-upload-item-size-text.jsx +12 -0
- package/source/file-upload/file-upload-item.jsx +15 -0
- package/source/file-upload/file-upload-label.jsx +8 -0
- package/source/file-upload/file-upload-trigger.jsx +8 -0
- package/source/file-upload/file-upload.jsx +34 -0
- package/source/file-upload/index.js +26 -0
- package/source/file-upload/use-file-upload.js +10 -0
- package/source/index.jsx +1 -0
- package/source/number-input/index.js +1 -1
- package/source/number-input/number-input.jsx +4 -2
- package/source/pagination/pagination-ellipsis.jsx +2 -2
- package/source/pagination/pagination.jsx +2 -4
- package/source/pin-input/index.js +1 -1
- package/source/pin-input/pin-input.jsx +2 -2
- package/source/radio-group/radio-group-item-context.js +2 -2
- package/source/radio-group/radio-group-item.jsx +9 -6
- package/source/rating-group/rating-group-control.jsx +1 -1
- package/source/rating-group/rating-group-item.jsx +2 -2
- package/source/rating-group/rating-group.jsx +2 -2
- package/source/segment-group/segment-group-item-context.js +2 -2
- package/source/segment-group/segment-group-item.jsx +9 -6
- package/source/select/select-indicator.jsx +1 -1
- package/source/select/select-item-group.jsx +2 -2
- package/source/select/select.jsx +2 -2
- package/source/switch/switch-label.jsx +2 -2
- package/source/switch/switch-thumb.jsx +2 -2
- package/source/switch/switch.jsx +2 -2
- package/source/toast/create-toaster.jsx +9 -10
- package/source/toast/index.js +5 -3
- package/source/toast/toast-group.jsx +4 -0
- package/types/color-picker/color-picker-format-select.d.ts +4 -0
- package/types/color-picker/color-picker-format-trigger.d.ts +4 -0
- package/types/color-picker/color-picker-swatch-context.d.ts +4 -0
- package/types/color-picker/color-picker-swatch-indicator.d.ts +4 -0
- package/types/color-picker/color-picker-swatch-trigger.d.ts +1 -5
- package/types/color-picker/color-picker-transparency-grid.d.ts +2 -5
- package/types/color-picker/index.d.ts +10 -3
- package/types/color-picker/use-color-picker.d.ts +3 -0
- package/types/file-upload/file-upload-context.d.ts +4 -0
- package/types/file-upload/file-upload-dropzone.d.ts +4 -0
- package/types/file-upload/file-upload-item-context.d.ts +4 -0
- package/types/file-upload/file-upload-item-delete-trigger.d.ts +4 -0
- package/types/file-upload/file-upload-item-group.d.ts +8 -0
- package/types/file-upload/file-upload-item-name.d.ts +4 -0
- package/types/file-upload/file-upload-item-preview-image.d.ts +4 -0
- package/types/file-upload/file-upload-item-preview.d.ts +9 -0
- package/types/file-upload/file-upload-item-size-text.d.ts +4 -0
- package/types/file-upload/file-upload-item.d.ts +6 -0
- package/types/file-upload/file-upload-label.d.ts +4 -0
- package/types/file-upload/file-upload-trigger.d.ts +4 -0
- package/types/file-upload/file-upload.d.ts +9 -0
- package/types/file-upload/index.d.ts +27 -0
- package/types/file-upload/use-file-upload.d.ts +9 -0
- package/types/index.d.ts +1 -0
- package/types/number-input/index.d.ts +1 -1
- package/types/number-input/number-input.d.ts +6 -3
- package/types/pin-input/index.d.ts +1 -1
- package/types/radio-group/radio-group-item-context.d.ts +1 -1
- package/types/radio-group/radio-group-item.d.ts +6 -3
- package/types/rating-group/rating-group-item-context.d.ts +2 -3
- package/types/segment-group/segment-group-item-context.d.ts +3 -14
- package/types/segment-group/segment-group-item.d.ts +6 -2
- package/types/toast/create-toaster.d.ts +3 -2
- package/types/toast/index.d.ts +6 -4
- package/types/toast/toast-context.d.ts +7 -2
- package/types/toast/toast-group.d.ts +4 -0
- /package/source/number-input/{number-input-field.jsx → number-input-input.jsx} +0 -0
- /package/source/pin-input/{pin-input-field.jsx → pin-input-input.jsx} +0 -0
- /package/types/number-input/{number-input-field.d.ts → number-input-input.d.ts} +0 -0
- /package/types/pin-input/{pin-input-field.d.ts → pin-input-input.d.ts} +0 -0
package/cjs/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var combobox = require('@zag-js/combobox');
|
|
|
14
14
|
var datePicker = require('@zag-js/date-picker');
|
|
15
15
|
var dialog = require('@zag-js/dialog');
|
|
16
16
|
var editable = require('@zag-js/editable');
|
|
17
|
+
var fileUpload = require('@zag-js/file-upload');
|
|
17
18
|
var hoverCard = require('@zag-js/hover-card');
|
|
18
19
|
var menu = require('@zag-js/menu');
|
|
19
20
|
var numberInput = require('@zag-js/number-input');
|
|
@@ -59,6 +60,7 @@ var combobox__namespace = /*#__PURE__*/_interopNamespaceDefault(combobox);
|
|
|
59
60
|
var datePicker__namespace = /*#__PURE__*/_interopNamespaceDefault(datePicker);
|
|
60
61
|
var dialog__namespace = /*#__PURE__*/_interopNamespaceDefault(dialog);
|
|
61
62
|
var editable__namespace = /*#__PURE__*/_interopNamespaceDefault(editable);
|
|
63
|
+
var fileUpload__namespace = /*#__PURE__*/_interopNamespaceDefault(fileUpload);
|
|
62
64
|
var hoverCard__namespace = /*#__PURE__*/_interopNamespaceDefault(hoverCard);
|
|
63
65
|
var menu__namespace = /*#__PURE__*/_interopNamespaceDefault(menu);
|
|
64
66
|
var numberInput__namespace = /*#__PURE__*/_interopNamespaceDefault(numberInput);
|
|
@@ -533,7 +535,7 @@ const [EnvironmentProvider, useEnvironmentContext] = createContext({
|
|
|
533
535
|
strict: false
|
|
534
536
|
});
|
|
535
537
|
|
|
536
|
-
const _tmpl$$
|
|
538
|
+
const _tmpl$$c = /*#__PURE__*/web.template(`<span hidden>`);
|
|
537
539
|
const Environment$1 = props => {
|
|
538
540
|
// eslint-disable-next-line prefer-const
|
|
539
541
|
let spanRef = undefined;
|
|
@@ -544,7 +546,7 @@ const Environment$1 = props => {
|
|
|
544
546
|
},
|
|
545
547
|
get children() {
|
|
546
548
|
return [web.memo(() => props.children), web.memo(() => web.memo(() => !!!props.value)() && (() => {
|
|
547
|
-
const _el$ = _tmpl$$
|
|
549
|
+
const _el$ = _tmpl$$c();
|
|
548
550
|
const _ref$ = spanRef;
|
|
549
551
|
typeof _ref$ === "function" ? web.use(_ref$, _el$) : spanRef = _el$;
|
|
550
552
|
return _el$;
|
|
@@ -839,12 +841,12 @@ const Checkbox$1 = props => {
|
|
|
839
841
|
});
|
|
840
842
|
};
|
|
841
843
|
|
|
842
|
-
const _tmpl$$
|
|
844
|
+
const _tmpl$$b = /*#__PURE__*/web.template(`<input>`);
|
|
843
845
|
const CheckboxControl = props => {
|
|
844
846
|
const api = useCheckboxContext();
|
|
845
847
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
846
848
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
847
|
-
const _el$ = _tmpl$$
|
|
849
|
+
const _el$ = _tmpl$$b();
|
|
848
850
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
849
851
|
return _el$;
|
|
850
852
|
})()];
|
|
@@ -888,10 +890,10 @@ const useColorPicker = props => {
|
|
|
888
890
|
return solidJs.createMemo(() => colorPicker__namespace.connect(state, send, solid.normalizeProps));
|
|
889
891
|
};
|
|
890
892
|
|
|
891
|
-
const _tmpl$$
|
|
893
|
+
const _tmpl$$a = /*#__PURE__*/web.template(`<input>`);
|
|
892
894
|
const ColorPicker$1 = props => {
|
|
893
895
|
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
894
|
-
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['
|
|
896
|
+
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['closeOnSelect', 'dir', 'disabled', 'format', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'name', 'name', 'onFocusOutside', 'onFormatChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'onValueChangeEnd', 'open', 'positioning', 'readOnly', 'value']);
|
|
895
897
|
const api = useColorPicker(useColorPickerProps);
|
|
896
898
|
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
897
899
|
present: api().isOpen
|
|
@@ -911,7 +913,7 @@ const ColorPicker$1 = props => {
|
|
|
911
913
|
}));
|
|
912
914
|
}
|
|
913
915
|
}), (() => {
|
|
914
|
-
const _el$ = _tmpl$$
|
|
916
|
+
const _el$ = _tmpl$$a();
|
|
915
917
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
916
918
|
return _el$;
|
|
917
919
|
})()];
|
|
@@ -1014,6 +1016,32 @@ const ColorPickerEyeDropperTrigger = props => {
|
|
|
1014
1016
|
return web.createComponent(ark.button, mergedProps);
|
|
1015
1017
|
};
|
|
1016
1018
|
|
|
1019
|
+
const ColorPickerFormatSelect = props => {
|
|
1020
|
+
const api = useColorPickerContext();
|
|
1021
|
+
const mergedProps = solid.mergeProps(() => api().formatSelectProps, props);
|
|
1022
|
+
return web.createComponent(ark.select, web.mergeProps(mergedProps, {
|
|
1023
|
+
get children() {
|
|
1024
|
+
return web.createComponent(solidJs.Index, {
|
|
1025
|
+
each: ['rgba', 'hsla', 'hsba'],
|
|
1026
|
+
children: format => web.createComponent(ark.option, {
|
|
1027
|
+
get value() {
|
|
1028
|
+
return format();
|
|
1029
|
+
},
|
|
1030
|
+
get children() {
|
|
1031
|
+
return format();
|
|
1032
|
+
}
|
|
1033
|
+
})
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
}));
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
const ColorPickerFormatTrigger = props => {
|
|
1040
|
+
const api = useColorPickerContext();
|
|
1041
|
+
const mergedProps = solid.mergeProps(() => api().formatTriggerProps, props);
|
|
1042
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1017
1045
|
const ColorPickerLabel = props => {
|
|
1018
1046
|
const api = useColorPickerContext();
|
|
1019
1047
|
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
@@ -1034,11 +1062,21 @@ const ColorPickerPositioner = props => {
|
|
|
1034
1062
|
});
|
|
1035
1063
|
};
|
|
1036
1064
|
|
|
1065
|
+
const [ColorPickerSwatchProvider, useColorPickerSwatchContext] = createContext({
|
|
1066
|
+
hookName: 'useColorPickerSwatchContext',
|
|
1067
|
+
providerName: '<ColorPickerSwatchProvider />'
|
|
1068
|
+
});
|
|
1069
|
+
|
|
1037
1070
|
const ColorPickerSwatch = props => {
|
|
1038
|
-
const [
|
|
1071
|
+
const [swatchProps, localProps] = createSplitProps()(props, ['respectAlpha', 'value']);
|
|
1039
1072
|
const api = useColorPickerContext();
|
|
1040
|
-
const mergedProps = solid.mergeProps(() => api().getSwatchProps(
|
|
1041
|
-
return web.createComponent(
|
|
1073
|
+
const mergedProps = solid.mergeProps(() => api().getSwatchProps(swatchProps), localProps);
|
|
1074
|
+
return web.createComponent(ColorPickerSwatchProvider, {
|
|
1075
|
+
value: swatchProps,
|
|
1076
|
+
get children() {
|
|
1077
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1078
|
+
}
|
|
1079
|
+
});
|
|
1042
1080
|
};
|
|
1043
1081
|
|
|
1044
1082
|
const ColorPickerSwatchGroup = props => {
|
|
@@ -1047,8 +1085,15 @@ const ColorPickerSwatchGroup = props => {
|
|
|
1047
1085
|
return web.createComponent(ark.div, mergedProps);
|
|
1048
1086
|
};
|
|
1049
1087
|
|
|
1088
|
+
const ColorPickerSwatchIndicator = props => {
|
|
1089
|
+
const api = useColorPickerContext();
|
|
1090
|
+
const swatchProps = useColorPickerSwatchContext();
|
|
1091
|
+
const mergedProps = solid.mergeProps(() => api().getSwatchIndicatorProps(swatchProps), props);
|
|
1092
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1050
1095
|
const ColorPickerSwatchTrigger = props => {
|
|
1051
|
-
const [triggerProps, localProps] = createSplitProps()(props, ['value']);
|
|
1096
|
+
const [triggerProps, localProps] = createSplitProps()(props, ['value', 'disabled']);
|
|
1052
1097
|
const api = useColorPickerContext();
|
|
1053
1098
|
const mergedProps = solid.mergeProps(() => api().getSwatchTriggerProps(triggerProps), localProps);
|
|
1054
1099
|
return web.createComponent(ark.button, mergedProps);
|
|
@@ -1108,10 +1153,13 @@ const ColorPicker = Object.assign(ColorPicker$1, {
|
|
|
1108
1153
|
Content: ColorPickerContent,
|
|
1109
1154
|
Control: ColorPickerControl,
|
|
1110
1155
|
EyeDropperTrigger: ColorPickerEyeDropperTrigger,
|
|
1156
|
+
FormatTrigger: ColorPickerFormatTrigger,
|
|
1157
|
+
FormatSelect: ColorPickerFormatSelect,
|
|
1111
1158
|
Label: ColorPickerLabel,
|
|
1112
1159
|
Positioner: ColorPickerPositioner,
|
|
1113
1160
|
Swatch: ColorPickerSwatch,
|
|
1114
1161
|
SwatchGroup: ColorPickerSwatchGroup,
|
|
1162
|
+
SwatchIndicator: ColorPickerSwatchIndicator,
|
|
1115
1163
|
SwatchTrigger: ColorPickerSwatchTrigger,
|
|
1116
1164
|
TransparencyGrid: ColorPickerTransparencyGrid,
|
|
1117
1165
|
Trigger: ColorPickerTrigger,
|
|
@@ -1314,7 +1362,7 @@ const useDatePicker = props => {
|
|
|
1314
1362
|
|
|
1315
1363
|
const DatePicker$1 = props => {
|
|
1316
1364
|
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
1317
|
-
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, ['closeOnSelect', 'dir', 'disabled', 'fixedWeeks', 'focusedValue', 'format', 'getRootNode', 'id', 'ids', 'isDateUnavailable', 'isDateUnavailable', 'locale', 'max', '
|
|
1365
|
+
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, ['closeOnSelect', 'dir', 'disabled', 'fixedWeeks', 'focusedValue', 'format', 'getRootNode', 'id', 'ids', 'isDateUnavailable', 'isDateUnavailable', 'locale', 'max', 'min', 'modal', 'name', 'numOfMonths', 'onFocusChange', 'onOpenChange', 'onValueChange', 'onViewChange', 'open', 'parse', 'positioning', 'readOnly', 'selectionMode', 'startOfWeek', 'timeZone', 'translations', 'value', 'view']);
|
|
1318
1366
|
const api = useDatePicker(useDatePickerProps);
|
|
1319
1367
|
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1320
1368
|
present: api().isOpen
|
|
@@ -1376,14 +1424,14 @@ const DatePickerLabel = props => {
|
|
|
1376
1424
|
return web.createComponent(ark.label, mergedProps);
|
|
1377
1425
|
};
|
|
1378
1426
|
|
|
1379
|
-
const _tmpl$$
|
|
1427
|
+
const _tmpl$$9 = /*#__PURE__*/web.template(`<option>`);
|
|
1380
1428
|
const DatePickerMonthSelect = props => {
|
|
1381
1429
|
const api = useDatePickerContext();
|
|
1382
1430
|
const mergedProps = solid.mergeProps(() => api().monthSelectProps, props);
|
|
1383
1431
|
return web.createComponent(ark.select, web.mergeProps(mergedProps, {
|
|
1384
1432
|
get children() {
|
|
1385
1433
|
return api().getMonths().map(month => (() => {
|
|
1386
|
-
const _el$ = _tmpl$$
|
|
1434
|
+
const _el$ = _tmpl$$9();
|
|
1387
1435
|
web.insert(_el$, () => month.label);
|
|
1388
1436
|
web.effect(() => _el$.value = month.value);
|
|
1389
1437
|
return _el$;
|
|
@@ -1566,7 +1614,7 @@ const DatePickerViewTrigger = props => {
|
|
|
1566
1614
|
return web.createComponent(ark.button, mergedProps);
|
|
1567
1615
|
};
|
|
1568
1616
|
|
|
1569
|
-
const _tmpl$$
|
|
1617
|
+
const _tmpl$$8 = /*#__PURE__*/web.template(`<option>`);
|
|
1570
1618
|
const DatePickerYearSelect = props => {
|
|
1571
1619
|
const api = useDatePickerContext();
|
|
1572
1620
|
const mergedProps = solid.mergeProps(() => api().yearSelectProps, props);
|
|
@@ -1576,7 +1624,7 @@ const DatePickerYearSelect = props => {
|
|
|
1576
1624
|
from: 1_000,
|
|
1577
1625
|
to: 4_000
|
|
1578
1626
|
}).map(year => (() => {
|
|
1579
|
-
const _el$ = _tmpl$$
|
|
1627
|
+
const _el$ = _tmpl$$8();
|
|
1580
1628
|
_el$.value = year;
|
|
1581
1629
|
web.insert(_el$, year);
|
|
1582
1630
|
return _el$;
|
|
@@ -1680,7 +1728,7 @@ const DialogBackdrop = props => {
|
|
|
1680
1728
|
|
|
1681
1729
|
const DialogCloseTrigger = props => {
|
|
1682
1730
|
const dialog = useDialogContext();
|
|
1683
|
-
const mergedProps = solid.mergeProps(() => dialog().
|
|
1731
|
+
const mergedProps = solid.mergeProps(() => dialog().closeTriggerProps, props);
|
|
1684
1732
|
return web.createComponent(ark.button, mergedProps);
|
|
1685
1733
|
};
|
|
1686
1734
|
|
|
@@ -1764,13 +1812,12 @@ const useEditable = props => {
|
|
|
1764
1812
|
};
|
|
1765
1813
|
|
|
1766
1814
|
const Editable$1 = props => {
|
|
1767
|
-
const [useEditableProps,
|
|
1768
|
-
const
|
|
1769
|
-
const
|
|
1770
|
-
const
|
|
1771
|
-
const getChildren = () => runIfFn(childrenProps.children, editable);
|
|
1815
|
+
const [useEditableProps, localProps] = createSplitProps()(props, ['activationMode', 'autoResize', 'dir', 'disabled', 'finalFocusEl', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'maxLength', 'name', 'onEdit', 'onFocusOutside', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueCommit', 'onValueRevert', 'placeholder', 'readOnly', 'selectOnFocus', 'startWithEditView', 'submitMode', 'translations', 'value']);
|
|
1816
|
+
const api = useEditable(useEditableProps);
|
|
1817
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1818
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1772
1819
|
return web.createComponent(EditableProvider, {
|
|
1773
|
-
value:
|
|
1820
|
+
value: api,
|
|
1774
1821
|
get children() {
|
|
1775
1822
|
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1776
1823
|
get children() {
|
|
@@ -1782,50 +1829,50 @@ const Editable$1 = props => {
|
|
|
1782
1829
|
};
|
|
1783
1830
|
|
|
1784
1831
|
const EditableArea = props => {
|
|
1785
|
-
const
|
|
1786
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1832
|
+
const api = useEditableContext();
|
|
1833
|
+
const mergedProps = solid.mergeProps(() => api().areaProps, props);
|
|
1787
1834
|
return web.createComponent(ark.div, mergedProps);
|
|
1788
1835
|
};
|
|
1789
1836
|
|
|
1790
1837
|
const EditableCancelTrigger = props => {
|
|
1791
|
-
const
|
|
1792
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1838
|
+
const api = useEditableContext();
|
|
1839
|
+
const mergedProps = solid.mergeProps(() => api().cancelTriggerProps, props);
|
|
1793
1840
|
return web.createComponent(ark.button, mergedProps);
|
|
1794
1841
|
};
|
|
1795
1842
|
|
|
1796
1843
|
const EditableControl = props => {
|
|
1797
|
-
const
|
|
1798
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1844
|
+
const api = useEditableContext();
|
|
1845
|
+
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
1799
1846
|
return web.createComponent(ark.div, mergedProps);
|
|
1800
1847
|
};
|
|
1801
1848
|
|
|
1802
1849
|
const EditableEditTrigger = props => {
|
|
1803
|
-
const
|
|
1804
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1850
|
+
const api = useEditableContext();
|
|
1851
|
+
const mergedProps = solid.mergeProps(() => api().editTriggerProps, props);
|
|
1805
1852
|
return web.createComponent(ark.button, mergedProps);
|
|
1806
1853
|
};
|
|
1807
1854
|
|
|
1808
1855
|
const EditableInput = props => {
|
|
1809
|
-
const
|
|
1810
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1856
|
+
const api = useEditableContext();
|
|
1857
|
+
const mergedProps = solid.mergeProps(() => api().inputProps, props);
|
|
1811
1858
|
return web.createComponent(ark.input, mergedProps);
|
|
1812
1859
|
};
|
|
1813
1860
|
|
|
1814
1861
|
const EditableLabel = props => {
|
|
1815
|
-
const
|
|
1816
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1862
|
+
const api = useEditableContext();
|
|
1863
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
1817
1864
|
return web.createComponent(ark.label, mergedProps);
|
|
1818
1865
|
};
|
|
1819
1866
|
|
|
1820
1867
|
const EditablePreview = props => {
|
|
1821
|
-
const
|
|
1822
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1868
|
+
const api = useEditableContext();
|
|
1869
|
+
const mergedProps = solid.mergeProps(() => api().previewProps, props);
|
|
1823
1870
|
return web.createComponent(ark.span, mergedProps);
|
|
1824
1871
|
};
|
|
1825
1872
|
|
|
1826
1873
|
const EditableSubmitTrigger = props => {
|
|
1827
|
-
const
|
|
1828
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1874
|
+
const api = useEditableContext();
|
|
1875
|
+
const mergedProps = solid.mergeProps(() => api().submitTriggerProps, props);
|
|
1829
1876
|
return web.createComponent(ark.button, mergedProps);
|
|
1830
1877
|
};
|
|
1831
1878
|
|
|
@@ -1841,6 +1888,161 @@ const Editable = Object.assign(Editable$1, {
|
|
|
1841
1888
|
SubmitTrigger: EditableSubmitTrigger
|
|
1842
1889
|
});
|
|
1843
1890
|
|
|
1891
|
+
const [FileUploadProvider, useFileUploadContext] = createContext({
|
|
1892
|
+
hookName: 'useFileUploadContext',
|
|
1893
|
+
providerName: '<FileUploadProvider />'
|
|
1894
|
+
});
|
|
1895
|
+
|
|
1896
|
+
const useFileUpload = props => {
|
|
1897
|
+
const getRootNode = useEnvironmentContext();
|
|
1898
|
+
const context = solid.mergeProps({
|
|
1899
|
+
id: solidJs.createUniqueId(),
|
|
1900
|
+
getRootNode
|
|
1901
|
+
}, props);
|
|
1902
|
+
const [state, send] = solid.useMachine(fileUpload__namespace.machine(context), {
|
|
1903
|
+
context
|
|
1904
|
+
});
|
|
1905
|
+
return solidJs.createMemo(() => fileUpload__namespace.connect(state, send, solid.normalizeProps));
|
|
1906
|
+
};
|
|
1907
|
+
|
|
1908
|
+
const FileUpload$1 = props => {
|
|
1909
|
+
const [fileUploadProps, localProps] = createSplitProps()(props, ['accept', 'allowDrop', 'dir', 'disabled', 'files', 'getRootNode', 'id', 'ids', 'locale', 'maxFiles', 'maxFileSize', 'minFileSize', 'name', 'onFileAccept', 'onFileReject', 'onFilesChange', 'translations', 'validate']);
|
|
1910
|
+
const api = useFileUpload(fileUploadProps);
|
|
1911
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1912
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1913
|
+
return web.createComponent(FileUploadProvider, {
|
|
1914
|
+
value: api,
|
|
1915
|
+
get children() {
|
|
1916
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1917
|
+
get children() {
|
|
1918
|
+
return getChildren();
|
|
1919
|
+
}
|
|
1920
|
+
}));
|
|
1921
|
+
}
|
|
1922
|
+
});
|
|
1923
|
+
};
|
|
1924
|
+
|
|
1925
|
+
const _tmpl$$7 = /*#__PURE__*/web.template(`<input>`);
|
|
1926
|
+
const FileUploadDropzone = props => {
|
|
1927
|
+
const api = useFileUploadContext();
|
|
1928
|
+
const mergedProps = solid.mergeProps(() => api().dropzoneProps, props);
|
|
1929
|
+
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
1930
|
+
const _el$ = _tmpl$$7();
|
|
1931
|
+
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
1932
|
+
return _el$;
|
|
1933
|
+
})()];
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
const [FileUploadItemProvider, useFileUploadItemContext] = createContext({
|
|
1937
|
+
hookName: 'useFileUploadItemContext',
|
|
1938
|
+
providerName: '<FileUploadItemProvider />'
|
|
1939
|
+
});
|
|
1940
|
+
|
|
1941
|
+
const FileUploadItem = props => {
|
|
1942
|
+
const [itemProps, localProps] = createSplitProps()(props, ['file']);
|
|
1943
|
+
const api = useFileUploadContext();
|
|
1944
|
+
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
1945
|
+
const getChildren = () => runIfFn(localProps.children);
|
|
1946
|
+
return web.createComponent(FileUploadItemProvider, {
|
|
1947
|
+
value: itemProps,
|
|
1948
|
+
get children() {
|
|
1949
|
+
return web.createComponent(ark.li, web.mergeProps(mergedProps, {
|
|
1950
|
+
get children() {
|
|
1951
|
+
return getChildren();
|
|
1952
|
+
}
|
|
1953
|
+
}));
|
|
1954
|
+
}
|
|
1955
|
+
});
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
const FileUploadItemDeleteTrigger = props => {
|
|
1959
|
+
const api = useFileUploadContext();
|
|
1960
|
+
const item = useFileUploadItemContext();
|
|
1961
|
+
const mergedProps = solid.mergeProps(() => api().getItemDeleteTriggerProps(item), props);
|
|
1962
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1963
|
+
};
|
|
1964
|
+
|
|
1965
|
+
const FileUploadItemGroup = props => {
|
|
1966
|
+
const api = useFileUploadContext();
|
|
1967
|
+
const mergedProps = solid.mergeProps(() => api().itemGroupProps, props);
|
|
1968
|
+
const getChildren = () => runIfFn(props.children, () => api().files);
|
|
1969
|
+
return web.createComponent(ark.ul, web.mergeProps(mergedProps, {
|
|
1970
|
+
get children() {
|
|
1971
|
+
return getChildren();
|
|
1972
|
+
}
|
|
1973
|
+
}));
|
|
1974
|
+
};
|
|
1975
|
+
|
|
1976
|
+
const FileUploadItemName = props => {
|
|
1977
|
+
const api = useFileUploadContext();
|
|
1978
|
+
const item = useFileUploadItemContext();
|
|
1979
|
+
const mergedProps = solid.mergeProps(() => api().getItemNameProps(item), props);
|
|
1980
|
+
const getChildren = solidJs.children(() => props.children);
|
|
1981
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1982
|
+
get children() {
|
|
1983
|
+
return getChildren() || item.file.name;
|
|
1984
|
+
}
|
|
1985
|
+
}));
|
|
1986
|
+
};
|
|
1987
|
+
|
|
1988
|
+
const FileUploadItemPreview = props => {
|
|
1989
|
+
const api = useFileUploadContext();
|
|
1990
|
+
const item = useFileUploadItemContext();
|
|
1991
|
+
const mergedProps = solid.mergeProps(() => api().getItemPreviewProps(item), props);
|
|
1992
|
+
if (!item.file.type.match(props.type ?? '.*')) return null;
|
|
1993
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1994
|
+
};
|
|
1995
|
+
|
|
1996
|
+
const FileUploadItemPreviewImage = props => {
|
|
1997
|
+
const api = useFileUploadContext();
|
|
1998
|
+
const item = useFileUploadItemContext();
|
|
1999
|
+
const [url, setUrl] = solidJs.createSignal('');
|
|
2000
|
+
api().createFileUrl(item.file, url => setUrl(url));
|
|
2001
|
+
const mergedProps = solid.mergeProps(api().getItemPreviewImageProps({
|
|
2002
|
+
...item,
|
|
2003
|
+
url: url()
|
|
2004
|
+
}), props);
|
|
2005
|
+
return web.createComponent(ark.img, mergedProps);
|
|
2006
|
+
};
|
|
2007
|
+
|
|
2008
|
+
const FileUploadItemSizeText = props => {
|
|
2009
|
+
const api = useFileUploadContext();
|
|
2010
|
+
const item = useFileUploadItemContext();
|
|
2011
|
+
const mergedProps = solid.mergeProps(() => api().getItemSizeTextProps(item), props);
|
|
2012
|
+
const getChildren = solidJs.children(() => props.children);
|
|
2013
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2014
|
+
get children() {
|
|
2015
|
+
return getChildren() || api().getFileSize(item.file);
|
|
2016
|
+
}
|
|
2017
|
+
}));
|
|
2018
|
+
};
|
|
2019
|
+
|
|
2020
|
+
const FileUploadLabel = props => {
|
|
2021
|
+
const api = useFileUploadContext();
|
|
2022
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
2023
|
+
return web.createComponent(ark.label, mergedProps);
|
|
2024
|
+
};
|
|
2025
|
+
|
|
2026
|
+
const FileUploadTrigger = props => {
|
|
2027
|
+
const api = useFileUploadContext();
|
|
2028
|
+
const mergedProps = solid.mergeProps(() => api().triggerProps, props);
|
|
2029
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2030
|
+
};
|
|
2031
|
+
|
|
2032
|
+
const FileUpload = Object.assign(FileUpload$1, {
|
|
2033
|
+
Root: FileUpload$1,
|
|
2034
|
+
Dropzone: FileUploadDropzone,
|
|
2035
|
+
Item: FileUploadItem,
|
|
2036
|
+
ItemDeleteTrigger: FileUploadItemDeleteTrigger,
|
|
2037
|
+
ItemGroup: FileUploadItemGroup,
|
|
2038
|
+
ItemName: FileUploadItemName,
|
|
2039
|
+
ItemPreview: FileUploadItemPreview,
|
|
2040
|
+
ItemPreviewImage: FileUploadItemPreviewImage,
|
|
2041
|
+
ItemSizeText: FileUploadItemSizeText,
|
|
2042
|
+
Label: FileUploadLabel,
|
|
2043
|
+
Trigger: FileUploadTrigger
|
|
2044
|
+
});
|
|
2045
|
+
|
|
1844
2046
|
const [HoverCardProvider, useHoverCardContext] = createContext({
|
|
1845
2047
|
hookName: 'useHoverCardContext',
|
|
1846
2048
|
providerName: '<HoverCardProvider />'
|
|
@@ -2149,10 +2351,15 @@ const NumberInput$1 = props => {
|
|
|
2149
2351
|
const [useNumberInputProps, localProps] = createSplitProps()(props, ['allowMouseWheel', 'allowOverflow', 'clampValueOnBlur', 'dir', 'disabled', 'focusInputOnChange', 'form', 'formatOptions', 'getRootNode', 'id', 'ids', 'inputMode', 'invalid', 'locale', 'max', 'min', 'name', 'onFocusChange', 'onValueChange', 'onValueInvalid', 'pattern', 'readOnly', 'spinOnPress', 'step', 'translations', 'value']);
|
|
2150
2352
|
const api = useNumberInput(useNumberInputProps);
|
|
2151
2353
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2354
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2152
2355
|
return web.createComponent(NumberInputProvider, {
|
|
2153
2356
|
value: api,
|
|
2154
2357
|
get children() {
|
|
2155
|
-
return web.createComponent(ark.div, mergedProps
|
|
2358
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2359
|
+
get children() {
|
|
2360
|
+
return getChildren();
|
|
2361
|
+
}
|
|
2362
|
+
}));
|
|
2156
2363
|
}
|
|
2157
2364
|
});
|
|
2158
2365
|
};
|
|
@@ -2169,18 +2376,18 @@ const NumberInputDecrementTrigger = props => {
|
|
|
2169
2376
|
return web.createComponent(ark.button, mergedProps);
|
|
2170
2377
|
};
|
|
2171
2378
|
|
|
2172
|
-
const NumberInputInput = props => {
|
|
2173
|
-
const api = useNumberInputContext();
|
|
2174
|
-
const mergedProps = solid.mergeProps(() => api().inputProps, props);
|
|
2175
|
-
return web.createComponent(ark.input, mergedProps);
|
|
2176
|
-
};
|
|
2177
|
-
|
|
2178
2379
|
const NumberInputIncrementTrigger = props => {
|
|
2179
2380
|
const api = useNumberInputContext();
|
|
2180
2381
|
const mergedProps = solid.mergeProps(() => api().incrementTriggerProps, props);
|
|
2181
2382
|
return web.createComponent(ark.button, mergedProps);
|
|
2182
2383
|
};
|
|
2183
2384
|
|
|
2385
|
+
const NumberInputInput = props => {
|
|
2386
|
+
const api = useNumberInputContext();
|
|
2387
|
+
const mergedProps = solid.mergeProps(() => api().inputProps, props);
|
|
2388
|
+
return web.createComponent(ark.input, mergedProps);
|
|
2389
|
+
};
|
|
2390
|
+
|
|
2184
2391
|
const NumberInputLabel = props => {
|
|
2185
2392
|
const api = useNumberInputContext();
|
|
2186
2393
|
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
@@ -2221,11 +2428,10 @@ const usePagination = props => {
|
|
|
2221
2428
|
};
|
|
2222
2429
|
|
|
2223
2430
|
const Pagination$1 = props => {
|
|
2224
|
-
const [paginationParams,
|
|
2225
|
-
const [childrenProps, localProps] = solidJs.splitProps(restProps, ['children']);
|
|
2431
|
+
const [paginationParams, localProps] = createSplitProps()(props, ['count', 'dir', 'getRootNode', 'id', 'ids', 'onPageChange', 'page', 'pageSize', 'siblingCount', 'translations', 'type']);
|
|
2226
2432
|
const api = usePagination(paginationParams);
|
|
2227
|
-
const getChildren = () => runIfFn(childrenProps.children, api);
|
|
2228
2433
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2434
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2229
2435
|
return web.createComponent(PaginationProvider, {
|
|
2230
2436
|
value: api,
|
|
2231
2437
|
get children() {
|
|
@@ -2239,9 +2445,9 @@ const Pagination$1 = props => {
|
|
|
2239
2445
|
};
|
|
2240
2446
|
|
|
2241
2447
|
const PaginationEllipsis = props => {
|
|
2242
|
-
const [ellipsisProps,
|
|
2448
|
+
const [ellipsisProps, localProps] = createSplitProps()(props, ['index']);
|
|
2243
2449
|
const api = usePaginationContext();
|
|
2244
|
-
const mergedProps = solid.mergeProps(() => api().getEllipsisProps(ellipsisProps),
|
|
2450
|
+
const mergedProps = solid.mergeProps(() => api().getEllipsisProps(ellipsisProps), localProps);
|
|
2245
2451
|
return web.createComponent(ark.div, mergedProps);
|
|
2246
2452
|
};
|
|
2247
2453
|
|
|
@@ -2291,8 +2497,8 @@ const usePinInput = props => {
|
|
|
2291
2497
|
|
|
2292
2498
|
const _tmpl$$6 = /*#__PURE__*/web.template(`<input>`);
|
|
2293
2499
|
const PinInput$1 = props => {
|
|
2294
|
-
const [
|
|
2295
|
-
const api = usePinInput(
|
|
2500
|
+
const [usePinInputProps, localProps] = createSplitProps()(props, ['autoFocus', 'blurOnComplete', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'mask', 'name', 'onValueChange', 'onValueComplete', 'onValueInvalid', 'otp', 'pattern', 'placeholder', 'selectOnFocus', 'translations', 'type', 'value']);
|
|
2501
|
+
const api = usePinInput(usePinInputProps);
|
|
2296
2502
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2297
2503
|
return web.createComponent(PinInputProvider, {
|
|
2298
2504
|
value: api,
|
|
@@ -2500,19 +2706,25 @@ const RadioGroupIndicator = props => {
|
|
|
2500
2706
|
return web.createComponent(ark.div, mergedProps);
|
|
2501
2707
|
};
|
|
2502
2708
|
|
|
2503
|
-
const [
|
|
2709
|
+
const [RadioGroupItemProvider, useRadioGroupItemContext] = createContext({
|
|
2504
2710
|
hookName: 'useRadioGroupItemContext',
|
|
2505
|
-
providerName: '<
|
|
2711
|
+
providerName: '<RadioGroupItemProvider />'
|
|
2506
2712
|
});
|
|
2507
2713
|
|
|
2508
2714
|
const RadioGroupItem = props => {
|
|
2509
|
-
const [itemProps,
|
|
2715
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2510
2716
|
const api = useRadioGroupContext();
|
|
2511
|
-
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps),
|
|
2512
|
-
|
|
2717
|
+
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
2718
|
+
const itemState = api().getItemState(itemProps);
|
|
2719
|
+
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2720
|
+
return web.createComponent(RadioGroupItemProvider, {
|
|
2513
2721
|
value: itemProps,
|
|
2514
2722
|
get children() {
|
|
2515
|
-
return web.createComponent(ark.label, mergedProps
|
|
2723
|
+
return web.createComponent(ark.label, web.mergeProps(mergedProps, {
|
|
2724
|
+
get children() {
|
|
2725
|
+
return getChildren();
|
|
2726
|
+
}
|
|
2727
|
+
}));
|
|
2516
2728
|
}
|
|
2517
2729
|
});
|
|
2518
2730
|
};
|
|
@@ -2569,8 +2781,8 @@ const useRatingGroup = props => {
|
|
|
2569
2781
|
};
|
|
2570
2782
|
|
|
2571
2783
|
const RatingGroup$1 = props => {
|
|
2572
|
-
const [
|
|
2573
|
-
const api = useRatingGroup(
|
|
2784
|
+
const [useRatingProps, localProps] = createSplitProps()(props, ['allowHalf', 'autoFocus', 'count', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'name', 'onHoverChange', 'onValueChange', 'readOnly', 'translations', 'value']);
|
|
2785
|
+
const api = useRatingGroup(useRatingProps);
|
|
2574
2786
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2575
2787
|
return web.createComponent(RatingGroupProvider, {
|
|
2576
2788
|
value: api,
|
|
@@ -2583,8 +2795,8 @@ const RatingGroup$1 = props => {
|
|
|
2583
2795
|
const _tmpl$$4 = /*#__PURE__*/web.template(`<input>`);
|
|
2584
2796
|
const RatingGroupControl = props => {
|
|
2585
2797
|
const api = useRatingGroupContext();
|
|
2586
|
-
const getChildren = () => runIfFn(props.children, api);
|
|
2587
2798
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
2799
|
+
const getChildren = () => runIfFn(props.children, api);
|
|
2588
2800
|
return [web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2589
2801
|
get children() {
|
|
2590
2802
|
return getChildren();
|
|
@@ -2604,11 +2816,11 @@ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext({
|
|
|
2604
2816
|
const RatingGroupItem = props => {
|
|
2605
2817
|
const [itemProps, localProps] = createSplitProps()(props, ['index']);
|
|
2606
2818
|
const api = useRatingGroupContext();
|
|
2819
|
+
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
2607
2820
|
const itemState = solidJs.createMemo(() => api().getItemState(itemProps));
|
|
2608
2821
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2609
|
-
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
2610
2822
|
return web.createComponent(RatingGroupItemProvider, {
|
|
2611
|
-
value:
|
|
2823
|
+
value: itemProps,
|
|
2612
2824
|
get children() {
|
|
2613
2825
|
return web.createComponent(ark.span, web.mergeProps(mergedProps, {
|
|
2614
2826
|
get children() {
|
|
@@ -2667,19 +2879,25 @@ const SegmentGroupIndicator = props => {
|
|
|
2667
2879
|
return web.createComponent(ark.div, mergedProps);
|
|
2668
2880
|
};
|
|
2669
2881
|
|
|
2670
|
-
const [
|
|
2882
|
+
const [SegmentGroupItemProvider, useSegmentGroupItemContext] = createContext({
|
|
2671
2883
|
hookName: 'useSegmentGroupItemContext',
|
|
2672
|
-
providerName: '<
|
|
2884
|
+
providerName: '<SegmentGroupItemProvider />'
|
|
2673
2885
|
});
|
|
2674
2886
|
|
|
2675
2887
|
const SegmentGroupItem = props => {
|
|
2676
|
-
const [itemProps,
|
|
2888
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2677
2889
|
const api = useSegmentGroupContext();
|
|
2678
|
-
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), anatomy.segmentGroupAnatomy.build().item.attrs,
|
|
2679
|
-
|
|
2890
|
+
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), anatomy.segmentGroupAnatomy.build().item.attrs, localProps);
|
|
2891
|
+
const itemState = api().getItemState(itemProps);
|
|
2892
|
+
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2893
|
+
return web.createComponent(SegmentGroupItemProvider, {
|
|
2680
2894
|
value: itemProps,
|
|
2681
2895
|
get children() {
|
|
2682
|
-
return web.createComponent(ark.label, mergedProps
|
|
2896
|
+
return web.createComponent(ark.label, web.mergeProps(mergedProps, {
|
|
2897
|
+
get children() {
|
|
2898
|
+
return getChildren();
|
|
2899
|
+
}
|
|
2900
|
+
}));
|
|
2683
2901
|
}
|
|
2684
2902
|
});
|
|
2685
2903
|
};
|
|
@@ -2743,16 +2961,16 @@ const Select$1 = props => {
|
|
|
2743
2961
|
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
2744
2962
|
const [useSelectProps, localProps] = createSplitProps()(selectProps, ['closeOnSelect', 'dir', 'disabled', 'form', 'getRootNode', 'highlightedValue', 'id', 'ids', 'invalid', 'isItemDisabled', 'items', 'itemToString', 'itemToValue', 'loop', 'multiple', 'name', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'open', 'positioning', 'readOnly', 'selectOnBlur', 'value']);
|
|
2745
2963
|
const api = useSelect(useSelectProps);
|
|
2746
|
-
const
|
|
2964
|
+
const presenceApi = usePresence(solid.mergeProps(() => ({
|
|
2747
2965
|
present: api().isOpen
|
|
2748
|
-
})));
|
|
2966
|
+
}), presenceProps));
|
|
2749
2967
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2750
2968
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2751
2969
|
return web.createComponent(SelectProvider, {
|
|
2752
2970
|
value: api,
|
|
2753
2971
|
get children() {
|
|
2754
2972
|
return web.createComponent(PresenceProvider, {
|
|
2755
|
-
value:
|
|
2973
|
+
value: presenceApi,
|
|
2756
2974
|
get children() {
|
|
2757
2975
|
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2758
2976
|
get children() {
|
|
@@ -2810,7 +3028,7 @@ const SelectControl = props => {
|
|
|
2810
3028
|
|
|
2811
3029
|
const SelectIndicator = props => {
|
|
2812
3030
|
const api = useSelectContext();
|
|
2813
|
-
const mergedProps = solid.mergeProps(() => api().
|
|
3031
|
+
const mergedProps = solid.mergeProps(() => api().indicatorProps, props);
|
|
2814
3032
|
return web.createComponent(ark.div, mergedProps);
|
|
2815
3033
|
};
|
|
2816
3034
|
|
|
@@ -2837,9 +3055,9 @@ const SelectItem = props => {
|
|
|
2837
3055
|
};
|
|
2838
3056
|
|
|
2839
3057
|
const SelectItemGroup = props => {
|
|
2840
|
-
const [
|
|
3058
|
+
const [itemGroupProps, localProps] = createSplitProps()(props, ['id']);
|
|
2841
3059
|
const api = useSelectContext();
|
|
2842
|
-
const mergedProps = solid.mergeProps(() => api().getItemGroupProps(
|
|
3060
|
+
const mergedProps = solid.mergeProps(() => api().getItemGroupProps(itemGroupProps), localProps);
|
|
2843
3061
|
return web.createComponent(ark.div, mergedProps);
|
|
2844
3062
|
};
|
|
2845
3063
|
|
|
@@ -3092,9 +3310,9 @@ const useSwitch = props => {
|
|
|
3092
3310
|
};
|
|
3093
3311
|
|
|
3094
3312
|
const Switch$1 = props => {
|
|
3095
|
-
const [switchProps,
|
|
3313
|
+
const [switchProps, localProps] = createSplitProps()(props, ['checked', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'label', 'name', 'onCheckedChange', 'required', 'value']);
|
|
3096
3314
|
const api = useSwitch(switchProps);
|
|
3097
|
-
const mergedProps = solid.mergeProps(() => api().rootProps,
|
|
3315
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
3098
3316
|
const getChildren = () => runIfFn(props.children, api);
|
|
3099
3317
|
return web.createComponent(SwitchProvider, {
|
|
3100
3318
|
value: api,
|
|
@@ -3120,14 +3338,14 @@ const SwitchControl = props => {
|
|
|
3120
3338
|
};
|
|
3121
3339
|
|
|
3122
3340
|
const SwitchLabel = props => {
|
|
3123
|
-
const
|
|
3124
|
-
const mergedProps = solid.mergeProps(() =>
|
|
3341
|
+
const api = useSwitchContext();
|
|
3342
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
3125
3343
|
return web.createComponent(ark.span, mergedProps);
|
|
3126
3344
|
};
|
|
3127
3345
|
|
|
3128
3346
|
const SwitchThumb = props => {
|
|
3129
|
-
const
|
|
3130
|
-
const mergedProps = solid.mergeProps(() =>
|
|
3347
|
+
const api = useSwitchContext();
|
|
3348
|
+
const mergedProps = solid.mergeProps(() => api().thumbProps, props);
|
|
3131
3349
|
return web.createComponent(ark.span, mergedProps);
|
|
3132
3350
|
};
|
|
3133
3351
|
|
|
@@ -3346,19 +3564,18 @@ const [ToastProvider, useToastContext] = createContext({
|
|
|
3346
3564
|
providerName: '<ToastProvider />'
|
|
3347
3565
|
});
|
|
3348
3566
|
|
|
3567
|
+
const ToastGroup = props => {
|
|
3568
|
+
return web.createComponent(ark.ol, props);
|
|
3569
|
+
};
|
|
3570
|
+
|
|
3349
3571
|
const createToaster = props => {
|
|
3350
|
-
const {
|
|
3351
|
-
placement,
|
|
3352
|
-
...rest
|
|
3353
|
-
} = props;
|
|
3354
3572
|
const service = toast__namespace.group.machine({
|
|
3355
3573
|
id: '1',
|
|
3356
|
-
|
|
3357
|
-
...rest
|
|
3574
|
+
...props
|
|
3358
3575
|
}).start();
|
|
3359
3576
|
const [state, send] = solid.useActor(service);
|
|
3360
3577
|
const api = solidJs.createMemo(() => toast__namespace.group.connect(state, send, solid.normalizeProps));
|
|
3361
|
-
const Toaster =
|
|
3578
|
+
const Toaster = toasterProps => {
|
|
3362
3579
|
const getRootNode = useEnvironmentContext();
|
|
3363
3580
|
solidJs.createEffect(() => {
|
|
3364
3581
|
service.setContext({
|
|
@@ -3367,13 +3584,13 @@ const createToaster = props => {
|
|
|
3367
3584
|
solidJs.onCleanup(() => service.stop());
|
|
3368
3585
|
});
|
|
3369
3586
|
const mergedProps = solid.mergeProps(() => api().getGroupProps({
|
|
3370
|
-
placement
|
|
3371
|
-
}),
|
|
3372
|
-
return web.createComponent(
|
|
3587
|
+
placement: props.placement
|
|
3588
|
+
}), toasterProps);
|
|
3589
|
+
return web.createComponent(ToastGroup, web.mergeProps(mergedProps, {
|
|
3373
3590
|
get children() {
|
|
3374
3591
|
return web.createComponent(solidJs.Index, {
|
|
3375
3592
|
get each() {
|
|
3376
|
-
return api().toastsByPlacement[placement];
|
|
3593
|
+
return api().toastsByPlacement[props.placement];
|
|
3377
3594
|
},
|
|
3378
3595
|
children: toast => web.createComponent(ToastProviderFactory, {
|
|
3379
3596
|
get service() {
|
|
@@ -3388,11 +3605,9 @@ const createToaster = props => {
|
|
|
3388
3605
|
};
|
|
3389
3606
|
const ToastProviderFactory = props => {
|
|
3390
3607
|
const [state, send] = solid.useActor(props.service);
|
|
3391
|
-
const api = toast__namespace.connect(state, send, solid.normalizeProps);
|
|
3608
|
+
const api = solidJs.createMemo(() => toast__namespace.connect(state, send, solid.normalizeProps));
|
|
3392
3609
|
return web.createComponent(ToastProvider, {
|
|
3393
|
-
|
|
3394
|
-
return solidJs.createMemo(() => api);
|
|
3395
|
-
},
|
|
3610
|
+
value: api,
|
|
3396
3611
|
get children() {
|
|
3397
3612
|
return state.context.render?.(api);
|
|
3398
3613
|
}
|
|
@@ -3425,9 +3640,10 @@ const ToastTitle = props => {
|
|
|
3425
3640
|
|
|
3426
3641
|
const Toast = Object.assign(Toast$1, {
|
|
3427
3642
|
Root: Toast$1,
|
|
3428
|
-
|
|
3643
|
+
CloseTrigger: ToastCloseTrigger,
|
|
3429
3644
|
Description: ToastDescription,
|
|
3430
|
-
|
|
3645
|
+
Group: ToastGroup,
|
|
3646
|
+
Title: ToastTitle
|
|
3431
3647
|
});
|
|
3432
3648
|
|
|
3433
3649
|
const [ToggleGroupProvider, useToggleGroupContext] = createContext({
|
|
@@ -3596,14 +3812,18 @@ exports.ColorPickerChannelSliderTrack = ColorPickerChannelSliderTrack;
|
|
|
3596
3812
|
exports.ColorPickerContent = ColorPickerContent;
|
|
3597
3813
|
exports.ColorPickerControl = ColorPickerControl;
|
|
3598
3814
|
exports.ColorPickerEyeDropperTrigger = ColorPickerEyeDropperTrigger;
|
|
3815
|
+
exports.ColorPickerFormatSelect = ColorPickerFormatSelect;
|
|
3816
|
+
exports.ColorPickerFormatTrigger = ColorPickerFormatTrigger;
|
|
3599
3817
|
exports.ColorPickerLabel = ColorPickerLabel;
|
|
3600
3818
|
exports.ColorPickerPositioner = ColorPickerPositioner;
|
|
3601
3819
|
exports.ColorPickerSwatch = ColorPickerSwatch;
|
|
3602
3820
|
exports.ColorPickerSwatchGroup = ColorPickerSwatchGroup;
|
|
3821
|
+
exports.ColorPickerSwatchIndicator = ColorPickerSwatchIndicator;
|
|
3603
3822
|
exports.ColorPickerSwatchTrigger = ColorPickerSwatchTrigger;
|
|
3604
3823
|
exports.ColorPickerTransparencyGrid = ColorPickerTransparencyGrid;
|
|
3605
3824
|
exports.ColorPickerTrigger = ColorPickerTrigger;
|
|
3606
3825
|
exports.ColorPickerValueText = ColorPickerValueText;
|
|
3826
|
+
exports.ColorPickerView = ColorPickerView;
|
|
3607
3827
|
exports.Combobox = Combobox;
|
|
3608
3828
|
exports.ComboboxClearTrigger = ComboboxClearTrigger;
|
|
3609
3829
|
exports.ComboboxContent = ComboboxContent;
|
|
@@ -3658,6 +3878,16 @@ exports.EditableLabel = EditableLabel;
|
|
|
3658
3878
|
exports.EditablePreview = EditablePreview;
|
|
3659
3879
|
exports.EditableSubmitTrigger = EditableSubmitTrigger;
|
|
3660
3880
|
exports.Environment = Environment;
|
|
3881
|
+
exports.FileUpload = FileUpload;
|
|
3882
|
+
exports.FileUploadDropzone = FileUploadDropzone;
|
|
3883
|
+
exports.FileUploadItem = FileUploadItem;
|
|
3884
|
+
exports.FileUploadItemDeleteTrigger = FileUploadItemDeleteTrigger;
|
|
3885
|
+
exports.FileUploadItemGroup = FileUploadItemGroup;
|
|
3886
|
+
exports.FileUploadItemName = FileUploadItemName;
|
|
3887
|
+
exports.FileUploadItemPreviewImage = FileUploadItemPreviewImage;
|
|
3888
|
+
exports.FileUploadItemSizeText = FileUploadItemSizeText;
|
|
3889
|
+
exports.FileUploadLabel = FileUploadLabel;
|
|
3890
|
+
exports.FileUploadTrigger = FileUploadTrigger;
|
|
3661
3891
|
exports.HoverCard = HoverCard;
|
|
3662
3892
|
exports.HoverCardArrow = HoverCardArrow;
|
|
3663
3893
|
exports.HoverCardArrowTip = HoverCardArrowTip;
|
|
@@ -3769,6 +3999,7 @@ exports.TagsInputLabel = TagsInputLabel;
|
|
|
3769
3999
|
exports.Toast = Toast;
|
|
3770
4000
|
exports.ToastCloseTrigger = ToastCloseTrigger;
|
|
3771
4001
|
exports.ToastDescription = ToastDescription;
|
|
4002
|
+
exports.ToastGroup = ToastGroup;
|
|
3772
4003
|
exports.ToastTitle = ToastTitle;
|
|
3773
4004
|
exports.ToggleGroup = ToggleGroup;
|
|
3774
4005
|
exports.ToggleGroupItem = ToggleGroupItem;
|
|
@@ -3797,6 +4028,7 @@ exports.useDatePickerViewContext = useDatePickerViewContext;
|
|
|
3797
4028
|
exports.useDialogContext = useDialogContext;
|
|
3798
4029
|
exports.useEditableContext = useEditableContext;
|
|
3799
4030
|
exports.useEnvironmentContext = useEnvironmentContext;
|
|
4031
|
+
exports.useFileUploadContext = useFileUploadContext;
|
|
3800
4032
|
exports.useHoverCardContext = useHoverCardContext;
|
|
3801
4033
|
exports.useMenuContext = useMenuContext;
|
|
3802
4034
|
exports.useNumberInputContext = useNumberInputContext;
|