@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/esm/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import * as combobox from '@zag-js/combobox';
|
|
|
12
12
|
import * as datePicker from '@zag-js/date-picker';
|
|
13
13
|
import * as dialog from '@zag-js/dialog';
|
|
14
14
|
import * as editable from '@zag-js/editable';
|
|
15
|
+
import * as fileUpload from '@zag-js/file-upload';
|
|
15
16
|
import * as hoverCard from '@zag-js/hover-card';
|
|
16
17
|
import * as menu from '@zag-js/menu';
|
|
17
18
|
import * as numberInput from '@zag-js/number-input';
|
|
@@ -486,7 +487,7 @@ const [EnvironmentProvider, useEnvironmentContext] = createContext({
|
|
|
486
487
|
strict: false
|
|
487
488
|
});
|
|
488
489
|
|
|
489
|
-
const _tmpl$$
|
|
490
|
+
const _tmpl$$c = /*#__PURE__*/template(`<span hidden>`);
|
|
490
491
|
const Environment$1 = props => {
|
|
491
492
|
// eslint-disable-next-line prefer-const
|
|
492
493
|
let spanRef = undefined;
|
|
@@ -497,7 +498,7 @@ const Environment$1 = props => {
|
|
|
497
498
|
},
|
|
498
499
|
get children() {
|
|
499
500
|
return [memo(() => props.children), memo(() => memo(() => !!!props.value)() && (() => {
|
|
500
|
-
const _el$ = _tmpl$$
|
|
501
|
+
const _el$ = _tmpl$$c();
|
|
501
502
|
const _ref$ = spanRef;
|
|
502
503
|
typeof _ref$ === "function" ? use(_ref$, _el$) : spanRef = _el$;
|
|
503
504
|
return _el$;
|
|
@@ -792,12 +793,12 @@ const Checkbox$1 = props => {
|
|
|
792
793
|
});
|
|
793
794
|
};
|
|
794
795
|
|
|
795
|
-
const _tmpl$$
|
|
796
|
+
const _tmpl$$b = /*#__PURE__*/template(`<input>`);
|
|
796
797
|
const CheckboxControl = props => {
|
|
797
798
|
const api = useCheckboxContext();
|
|
798
799
|
const mergedProps = mergeProps$2(() => api().controlProps, props);
|
|
799
800
|
return [createComponent(ark.div, mergedProps), (() => {
|
|
800
|
-
const _el$ = _tmpl$$
|
|
801
|
+
const _el$ = _tmpl$$b();
|
|
801
802
|
spread$1(_el$, mergeProps$1(() => api().hiddenInputProps), false, false);
|
|
802
803
|
return _el$;
|
|
803
804
|
})()];
|
|
@@ -841,10 +842,10 @@ const useColorPicker = props => {
|
|
|
841
842
|
return createMemo(() => colorPicker.connect(state, send, normalizeProps));
|
|
842
843
|
};
|
|
843
844
|
|
|
844
|
-
const _tmpl$$
|
|
845
|
+
const _tmpl$$a = /*#__PURE__*/template(`<input>`);
|
|
845
846
|
const ColorPicker$1 = props => {
|
|
846
847
|
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
847
|
-
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['
|
|
848
|
+
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']);
|
|
848
849
|
const api = useColorPicker(useColorPickerProps);
|
|
849
850
|
const apiPresence = usePresence(mergeProps$2(presenceProps, () => ({
|
|
850
851
|
present: api().isOpen
|
|
@@ -864,7 +865,7 @@ const ColorPicker$1 = props => {
|
|
|
864
865
|
}));
|
|
865
866
|
}
|
|
866
867
|
}), (() => {
|
|
867
|
-
const _el$ = _tmpl$$
|
|
868
|
+
const _el$ = _tmpl$$a();
|
|
868
869
|
spread$1(_el$, mergeProps$1(() => api().hiddenInputProps), false, false);
|
|
869
870
|
return _el$;
|
|
870
871
|
})()];
|
|
@@ -967,6 +968,32 @@ const ColorPickerEyeDropperTrigger = props => {
|
|
|
967
968
|
return createComponent(ark.button, mergedProps);
|
|
968
969
|
};
|
|
969
970
|
|
|
971
|
+
const ColorPickerFormatSelect = props => {
|
|
972
|
+
const api = useColorPickerContext();
|
|
973
|
+
const mergedProps = mergeProps$2(() => api().formatSelectProps, props);
|
|
974
|
+
return createComponent(ark.select, mergeProps$1(mergedProps, {
|
|
975
|
+
get children() {
|
|
976
|
+
return createComponent(Index, {
|
|
977
|
+
each: ['rgba', 'hsla', 'hsba'],
|
|
978
|
+
children: format => createComponent(ark.option, {
|
|
979
|
+
get value() {
|
|
980
|
+
return format();
|
|
981
|
+
},
|
|
982
|
+
get children() {
|
|
983
|
+
return format();
|
|
984
|
+
}
|
|
985
|
+
})
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
}));
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
const ColorPickerFormatTrigger = props => {
|
|
992
|
+
const api = useColorPickerContext();
|
|
993
|
+
const mergedProps = mergeProps$2(() => api().formatTriggerProps, props);
|
|
994
|
+
return createComponent(ark.button, mergedProps);
|
|
995
|
+
};
|
|
996
|
+
|
|
970
997
|
const ColorPickerLabel = props => {
|
|
971
998
|
const api = useColorPickerContext();
|
|
972
999
|
const mergedProps = mergeProps$2(() => api().labelProps, props);
|
|
@@ -987,11 +1014,21 @@ const ColorPickerPositioner = props => {
|
|
|
987
1014
|
});
|
|
988
1015
|
};
|
|
989
1016
|
|
|
1017
|
+
const [ColorPickerSwatchProvider, useColorPickerSwatchContext] = createContext({
|
|
1018
|
+
hookName: 'useColorPickerSwatchContext',
|
|
1019
|
+
providerName: '<ColorPickerSwatchProvider />'
|
|
1020
|
+
});
|
|
1021
|
+
|
|
990
1022
|
const ColorPickerSwatch = props => {
|
|
991
|
-
const [
|
|
1023
|
+
const [swatchProps, localProps] = createSplitProps()(props, ['respectAlpha', 'value']);
|
|
992
1024
|
const api = useColorPickerContext();
|
|
993
|
-
const mergedProps = mergeProps$2(() => api().getSwatchProps(
|
|
994
|
-
return createComponent(
|
|
1025
|
+
const mergedProps = mergeProps$2(() => api().getSwatchProps(swatchProps), localProps);
|
|
1026
|
+
return createComponent(ColorPickerSwatchProvider, {
|
|
1027
|
+
value: swatchProps,
|
|
1028
|
+
get children() {
|
|
1029
|
+
return createComponent(ark.div, mergedProps);
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
995
1032
|
};
|
|
996
1033
|
|
|
997
1034
|
const ColorPickerSwatchGroup = props => {
|
|
@@ -1000,8 +1037,15 @@ const ColorPickerSwatchGroup = props => {
|
|
|
1000
1037
|
return createComponent(ark.div, mergedProps);
|
|
1001
1038
|
};
|
|
1002
1039
|
|
|
1040
|
+
const ColorPickerSwatchIndicator = props => {
|
|
1041
|
+
const api = useColorPickerContext();
|
|
1042
|
+
const swatchProps = useColorPickerSwatchContext();
|
|
1043
|
+
const mergedProps = mergeProps$2(() => api().getSwatchIndicatorProps(swatchProps), props);
|
|
1044
|
+
return createComponent(ark.div, mergedProps);
|
|
1045
|
+
};
|
|
1046
|
+
|
|
1003
1047
|
const ColorPickerSwatchTrigger = props => {
|
|
1004
|
-
const [triggerProps, localProps] = createSplitProps()(props, ['value']);
|
|
1048
|
+
const [triggerProps, localProps] = createSplitProps()(props, ['value', 'disabled']);
|
|
1005
1049
|
const api = useColorPickerContext();
|
|
1006
1050
|
const mergedProps = mergeProps$2(() => api().getSwatchTriggerProps(triggerProps), localProps);
|
|
1007
1051
|
return createComponent(ark.button, mergedProps);
|
|
@@ -1061,10 +1105,13 @@ const ColorPicker = Object.assign(ColorPicker$1, {
|
|
|
1061
1105
|
Content: ColorPickerContent,
|
|
1062
1106
|
Control: ColorPickerControl,
|
|
1063
1107
|
EyeDropperTrigger: ColorPickerEyeDropperTrigger,
|
|
1108
|
+
FormatTrigger: ColorPickerFormatTrigger,
|
|
1109
|
+
FormatSelect: ColorPickerFormatSelect,
|
|
1064
1110
|
Label: ColorPickerLabel,
|
|
1065
1111
|
Positioner: ColorPickerPositioner,
|
|
1066
1112
|
Swatch: ColorPickerSwatch,
|
|
1067
1113
|
SwatchGroup: ColorPickerSwatchGroup,
|
|
1114
|
+
SwatchIndicator: ColorPickerSwatchIndicator,
|
|
1068
1115
|
SwatchTrigger: ColorPickerSwatchTrigger,
|
|
1069
1116
|
TransparencyGrid: ColorPickerTransparencyGrid,
|
|
1070
1117
|
Trigger: ColorPickerTrigger,
|
|
@@ -1267,7 +1314,7 @@ const useDatePicker = props => {
|
|
|
1267
1314
|
|
|
1268
1315
|
const DatePicker$1 = props => {
|
|
1269
1316
|
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
1270
|
-
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, ['closeOnSelect', 'dir', 'disabled', 'fixedWeeks', 'focusedValue', 'format', 'getRootNode', 'id', 'ids', 'isDateUnavailable', 'isDateUnavailable', 'locale', 'max', '
|
|
1317
|
+
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']);
|
|
1271
1318
|
const api = useDatePicker(useDatePickerProps);
|
|
1272
1319
|
const apiPresence = usePresence(mergeProps$2(presenceProps, () => ({
|
|
1273
1320
|
present: api().isOpen
|
|
@@ -1329,14 +1376,14 @@ const DatePickerLabel = props => {
|
|
|
1329
1376
|
return createComponent(ark.label, mergedProps);
|
|
1330
1377
|
};
|
|
1331
1378
|
|
|
1332
|
-
const _tmpl$$
|
|
1379
|
+
const _tmpl$$9 = /*#__PURE__*/template(`<option>`);
|
|
1333
1380
|
const DatePickerMonthSelect = props => {
|
|
1334
1381
|
const api = useDatePickerContext();
|
|
1335
1382
|
const mergedProps = mergeProps$2(() => api().monthSelectProps, props);
|
|
1336
1383
|
return createComponent(ark.select, mergeProps$1(mergedProps, {
|
|
1337
1384
|
get children() {
|
|
1338
1385
|
return api().getMonths().map(month => (() => {
|
|
1339
|
-
const _el$ = _tmpl$$
|
|
1386
|
+
const _el$ = _tmpl$$9();
|
|
1340
1387
|
insert(_el$, () => month.label);
|
|
1341
1388
|
effect(() => _el$.value = month.value);
|
|
1342
1389
|
return _el$;
|
|
@@ -1519,7 +1566,7 @@ const DatePickerViewTrigger = props => {
|
|
|
1519
1566
|
return createComponent(ark.button, mergedProps);
|
|
1520
1567
|
};
|
|
1521
1568
|
|
|
1522
|
-
const _tmpl$$
|
|
1569
|
+
const _tmpl$$8 = /*#__PURE__*/template(`<option>`);
|
|
1523
1570
|
const DatePickerYearSelect = props => {
|
|
1524
1571
|
const api = useDatePickerContext();
|
|
1525
1572
|
const mergedProps = mergeProps$2(() => api().yearSelectProps, props);
|
|
@@ -1529,7 +1576,7 @@ const DatePickerYearSelect = props => {
|
|
|
1529
1576
|
from: 1_000,
|
|
1530
1577
|
to: 4_000
|
|
1531
1578
|
}).map(year => (() => {
|
|
1532
|
-
const _el$ = _tmpl$$
|
|
1579
|
+
const _el$ = _tmpl$$8();
|
|
1533
1580
|
_el$.value = year;
|
|
1534
1581
|
insert(_el$, year);
|
|
1535
1582
|
return _el$;
|
|
@@ -1633,7 +1680,7 @@ const DialogBackdrop = props => {
|
|
|
1633
1680
|
|
|
1634
1681
|
const DialogCloseTrigger = props => {
|
|
1635
1682
|
const dialog = useDialogContext();
|
|
1636
|
-
const mergedProps = mergeProps$2(() => dialog().
|
|
1683
|
+
const mergedProps = mergeProps$2(() => dialog().closeTriggerProps, props);
|
|
1637
1684
|
return createComponent(ark.button, mergedProps);
|
|
1638
1685
|
};
|
|
1639
1686
|
|
|
@@ -1717,13 +1764,12 @@ const useEditable = props => {
|
|
|
1717
1764
|
};
|
|
1718
1765
|
|
|
1719
1766
|
const Editable$1 = props => {
|
|
1720
|
-
const [useEditableProps,
|
|
1721
|
-
const
|
|
1722
|
-
const
|
|
1723
|
-
const
|
|
1724
|
-
const getChildren = () => runIfFn(childrenProps.children, editable);
|
|
1767
|
+
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']);
|
|
1768
|
+
const api = useEditable(useEditableProps);
|
|
1769
|
+
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
1770
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1725
1771
|
return createComponent(EditableProvider, {
|
|
1726
|
-
value:
|
|
1772
|
+
value: api,
|
|
1727
1773
|
get children() {
|
|
1728
1774
|
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
1729
1775
|
get children() {
|
|
@@ -1735,50 +1781,50 @@ const Editable$1 = props => {
|
|
|
1735
1781
|
};
|
|
1736
1782
|
|
|
1737
1783
|
const EditableArea = props => {
|
|
1738
|
-
const
|
|
1739
|
-
const mergedProps = mergeProps$2(() =>
|
|
1784
|
+
const api = useEditableContext();
|
|
1785
|
+
const mergedProps = mergeProps$2(() => api().areaProps, props);
|
|
1740
1786
|
return createComponent(ark.div, mergedProps);
|
|
1741
1787
|
};
|
|
1742
1788
|
|
|
1743
1789
|
const EditableCancelTrigger = props => {
|
|
1744
|
-
const
|
|
1745
|
-
const mergedProps = mergeProps$2(() =>
|
|
1790
|
+
const api = useEditableContext();
|
|
1791
|
+
const mergedProps = mergeProps$2(() => api().cancelTriggerProps, props);
|
|
1746
1792
|
return createComponent(ark.button, mergedProps);
|
|
1747
1793
|
};
|
|
1748
1794
|
|
|
1749
1795
|
const EditableControl = props => {
|
|
1750
|
-
const
|
|
1751
|
-
const mergedProps = mergeProps$2(() =>
|
|
1796
|
+
const api = useEditableContext();
|
|
1797
|
+
const mergedProps = mergeProps$2(() => api().controlProps, props);
|
|
1752
1798
|
return createComponent(ark.div, mergedProps);
|
|
1753
1799
|
};
|
|
1754
1800
|
|
|
1755
1801
|
const EditableEditTrigger = props => {
|
|
1756
|
-
const
|
|
1757
|
-
const mergedProps = mergeProps$2(() =>
|
|
1802
|
+
const api = useEditableContext();
|
|
1803
|
+
const mergedProps = mergeProps$2(() => api().editTriggerProps, props);
|
|
1758
1804
|
return createComponent(ark.button, mergedProps);
|
|
1759
1805
|
};
|
|
1760
1806
|
|
|
1761
1807
|
const EditableInput = props => {
|
|
1762
|
-
const
|
|
1763
|
-
const mergedProps = mergeProps$2(() =>
|
|
1808
|
+
const api = useEditableContext();
|
|
1809
|
+
const mergedProps = mergeProps$2(() => api().inputProps, props);
|
|
1764
1810
|
return createComponent(ark.input, mergedProps);
|
|
1765
1811
|
};
|
|
1766
1812
|
|
|
1767
1813
|
const EditableLabel = props => {
|
|
1768
|
-
const
|
|
1769
|
-
const mergedProps = mergeProps$2(() =>
|
|
1814
|
+
const api = useEditableContext();
|
|
1815
|
+
const mergedProps = mergeProps$2(() => api().labelProps, props);
|
|
1770
1816
|
return createComponent(ark.label, mergedProps);
|
|
1771
1817
|
};
|
|
1772
1818
|
|
|
1773
1819
|
const EditablePreview = props => {
|
|
1774
|
-
const
|
|
1775
|
-
const mergedProps = mergeProps$2(() =>
|
|
1820
|
+
const api = useEditableContext();
|
|
1821
|
+
const mergedProps = mergeProps$2(() => api().previewProps, props);
|
|
1776
1822
|
return createComponent(ark.span, mergedProps);
|
|
1777
1823
|
};
|
|
1778
1824
|
|
|
1779
1825
|
const EditableSubmitTrigger = props => {
|
|
1780
|
-
const
|
|
1781
|
-
const mergedProps = mergeProps$2(() =>
|
|
1826
|
+
const api = useEditableContext();
|
|
1827
|
+
const mergedProps = mergeProps$2(() => api().submitTriggerProps, props);
|
|
1782
1828
|
return createComponent(ark.button, mergedProps);
|
|
1783
1829
|
};
|
|
1784
1830
|
|
|
@@ -1794,6 +1840,161 @@ const Editable = Object.assign(Editable$1, {
|
|
|
1794
1840
|
SubmitTrigger: EditableSubmitTrigger
|
|
1795
1841
|
});
|
|
1796
1842
|
|
|
1843
|
+
const [FileUploadProvider, useFileUploadContext] = createContext({
|
|
1844
|
+
hookName: 'useFileUploadContext',
|
|
1845
|
+
providerName: '<FileUploadProvider />'
|
|
1846
|
+
});
|
|
1847
|
+
|
|
1848
|
+
const useFileUpload = props => {
|
|
1849
|
+
const getRootNode = useEnvironmentContext();
|
|
1850
|
+
const context = mergeProps$2({
|
|
1851
|
+
id: createUniqueId(),
|
|
1852
|
+
getRootNode
|
|
1853
|
+
}, props);
|
|
1854
|
+
const [state, send] = useMachine(fileUpload.machine(context), {
|
|
1855
|
+
context
|
|
1856
|
+
});
|
|
1857
|
+
return createMemo(() => fileUpload.connect(state, send, normalizeProps));
|
|
1858
|
+
};
|
|
1859
|
+
|
|
1860
|
+
const FileUpload$1 = props => {
|
|
1861
|
+
const [fileUploadProps, localProps] = createSplitProps()(props, ['accept', 'allowDrop', 'dir', 'disabled', 'files', 'getRootNode', 'id', 'ids', 'locale', 'maxFiles', 'maxFileSize', 'minFileSize', 'name', 'onFileAccept', 'onFileReject', 'onFilesChange', 'translations', 'validate']);
|
|
1862
|
+
const api = useFileUpload(fileUploadProps);
|
|
1863
|
+
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
1864
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1865
|
+
return createComponent(FileUploadProvider, {
|
|
1866
|
+
value: api,
|
|
1867
|
+
get children() {
|
|
1868
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
1869
|
+
get children() {
|
|
1870
|
+
return getChildren();
|
|
1871
|
+
}
|
|
1872
|
+
}));
|
|
1873
|
+
}
|
|
1874
|
+
});
|
|
1875
|
+
};
|
|
1876
|
+
|
|
1877
|
+
const _tmpl$$7 = /*#__PURE__*/template(`<input>`);
|
|
1878
|
+
const FileUploadDropzone = props => {
|
|
1879
|
+
const api = useFileUploadContext();
|
|
1880
|
+
const mergedProps = mergeProps$2(() => api().dropzoneProps, props);
|
|
1881
|
+
return [createComponent(ark.div, mergedProps), (() => {
|
|
1882
|
+
const _el$ = _tmpl$$7();
|
|
1883
|
+
spread$1(_el$, mergeProps$1(() => api().hiddenInputProps), false, false);
|
|
1884
|
+
return _el$;
|
|
1885
|
+
})()];
|
|
1886
|
+
};
|
|
1887
|
+
|
|
1888
|
+
const [FileUploadItemProvider, useFileUploadItemContext] = createContext({
|
|
1889
|
+
hookName: 'useFileUploadItemContext',
|
|
1890
|
+
providerName: '<FileUploadItemProvider />'
|
|
1891
|
+
});
|
|
1892
|
+
|
|
1893
|
+
const FileUploadItem = props => {
|
|
1894
|
+
const [itemProps, localProps] = createSplitProps()(props, ['file']);
|
|
1895
|
+
const api = useFileUploadContext();
|
|
1896
|
+
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
|
|
1897
|
+
const getChildren = () => runIfFn(localProps.children);
|
|
1898
|
+
return createComponent(FileUploadItemProvider, {
|
|
1899
|
+
value: itemProps,
|
|
1900
|
+
get children() {
|
|
1901
|
+
return createComponent(ark.li, mergeProps$1(mergedProps, {
|
|
1902
|
+
get children() {
|
|
1903
|
+
return getChildren();
|
|
1904
|
+
}
|
|
1905
|
+
}));
|
|
1906
|
+
}
|
|
1907
|
+
});
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1910
|
+
const FileUploadItemDeleteTrigger = props => {
|
|
1911
|
+
const api = useFileUploadContext();
|
|
1912
|
+
const item = useFileUploadItemContext();
|
|
1913
|
+
const mergedProps = mergeProps$2(() => api().getItemDeleteTriggerProps(item), props);
|
|
1914
|
+
return createComponent(ark.button, mergedProps);
|
|
1915
|
+
};
|
|
1916
|
+
|
|
1917
|
+
const FileUploadItemGroup = props => {
|
|
1918
|
+
const api = useFileUploadContext();
|
|
1919
|
+
const mergedProps = mergeProps$2(() => api().itemGroupProps, props);
|
|
1920
|
+
const getChildren = () => runIfFn(props.children, () => api().files);
|
|
1921
|
+
return createComponent(ark.ul, mergeProps$1(mergedProps, {
|
|
1922
|
+
get children() {
|
|
1923
|
+
return getChildren();
|
|
1924
|
+
}
|
|
1925
|
+
}));
|
|
1926
|
+
};
|
|
1927
|
+
|
|
1928
|
+
const FileUploadItemName = props => {
|
|
1929
|
+
const api = useFileUploadContext();
|
|
1930
|
+
const item = useFileUploadItemContext();
|
|
1931
|
+
const mergedProps = mergeProps$2(() => api().getItemNameProps(item), props);
|
|
1932
|
+
const getChildren = children(() => props.children);
|
|
1933
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
1934
|
+
get children() {
|
|
1935
|
+
return getChildren() || item.file.name;
|
|
1936
|
+
}
|
|
1937
|
+
}));
|
|
1938
|
+
};
|
|
1939
|
+
|
|
1940
|
+
const FileUploadItemPreview = props => {
|
|
1941
|
+
const api = useFileUploadContext();
|
|
1942
|
+
const item = useFileUploadItemContext();
|
|
1943
|
+
const mergedProps = mergeProps$2(() => api().getItemPreviewProps(item), props);
|
|
1944
|
+
if (!item.file.type.match(props.type ?? '.*')) return null;
|
|
1945
|
+
return createComponent(ark.div, mergedProps);
|
|
1946
|
+
};
|
|
1947
|
+
|
|
1948
|
+
const FileUploadItemPreviewImage = props => {
|
|
1949
|
+
const api = useFileUploadContext();
|
|
1950
|
+
const item = useFileUploadItemContext();
|
|
1951
|
+
const [url, setUrl] = createSignal('');
|
|
1952
|
+
api().createFileUrl(item.file, url => setUrl(url));
|
|
1953
|
+
const mergedProps = mergeProps$2(api().getItemPreviewImageProps({
|
|
1954
|
+
...item,
|
|
1955
|
+
url: url()
|
|
1956
|
+
}), props);
|
|
1957
|
+
return createComponent(ark.img, mergedProps);
|
|
1958
|
+
};
|
|
1959
|
+
|
|
1960
|
+
const FileUploadItemSizeText = props => {
|
|
1961
|
+
const api = useFileUploadContext();
|
|
1962
|
+
const item = useFileUploadItemContext();
|
|
1963
|
+
const mergedProps = mergeProps$2(() => api().getItemSizeTextProps(item), props);
|
|
1964
|
+
const getChildren = children(() => props.children);
|
|
1965
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
1966
|
+
get children() {
|
|
1967
|
+
return getChildren() || api().getFileSize(item.file);
|
|
1968
|
+
}
|
|
1969
|
+
}));
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1972
|
+
const FileUploadLabel = props => {
|
|
1973
|
+
const api = useFileUploadContext();
|
|
1974
|
+
const mergedProps = mergeProps$2(() => api().labelProps, props);
|
|
1975
|
+
return createComponent(ark.label, mergedProps);
|
|
1976
|
+
};
|
|
1977
|
+
|
|
1978
|
+
const FileUploadTrigger = props => {
|
|
1979
|
+
const api = useFileUploadContext();
|
|
1980
|
+
const mergedProps = mergeProps$2(() => api().triggerProps, props);
|
|
1981
|
+
return createComponent(ark.button, mergedProps);
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1984
|
+
const FileUpload = Object.assign(FileUpload$1, {
|
|
1985
|
+
Root: FileUpload$1,
|
|
1986
|
+
Dropzone: FileUploadDropzone,
|
|
1987
|
+
Item: FileUploadItem,
|
|
1988
|
+
ItemDeleteTrigger: FileUploadItemDeleteTrigger,
|
|
1989
|
+
ItemGroup: FileUploadItemGroup,
|
|
1990
|
+
ItemName: FileUploadItemName,
|
|
1991
|
+
ItemPreview: FileUploadItemPreview,
|
|
1992
|
+
ItemPreviewImage: FileUploadItemPreviewImage,
|
|
1993
|
+
ItemSizeText: FileUploadItemSizeText,
|
|
1994
|
+
Label: FileUploadLabel,
|
|
1995
|
+
Trigger: FileUploadTrigger
|
|
1996
|
+
});
|
|
1997
|
+
|
|
1797
1998
|
const [HoverCardProvider, useHoverCardContext] = createContext({
|
|
1798
1999
|
hookName: 'useHoverCardContext',
|
|
1799
2000
|
providerName: '<HoverCardProvider />'
|
|
@@ -2102,10 +2303,15 @@ const NumberInput$1 = props => {
|
|
|
2102
2303
|
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']);
|
|
2103
2304
|
const api = useNumberInput(useNumberInputProps);
|
|
2104
2305
|
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2306
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2105
2307
|
return createComponent(NumberInputProvider, {
|
|
2106
2308
|
value: api,
|
|
2107
2309
|
get children() {
|
|
2108
|
-
return createComponent(ark.div, mergedProps
|
|
2310
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
2311
|
+
get children() {
|
|
2312
|
+
return getChildren();
|
|
2313
|
+
}
|
|
2314
|
+
}));
|
|
2109
2315
|
}
|
|
2110
2316
|
});
|
|
2111
2317
|
};
|
|
@@ -2122,18 +2328,18 @@ const NumberInputDecrementTrigger = props => {
|
|
|
2122
2328
|
return createComponent(ark.button, mergedProps);
|
|
2123
2329
|
};
|
|
2124
2330
|
|
|
2125
|
-
const NumberInputInput = props => {
|
|
2126
|
-
const api = useNumberInputContext();
|
|
2127
|
-
const mergedProps = mergeProps$2(() => api().inputProps, props);
|
|
2128
|
-
return createComponent(ark.input, mergedProps);
|
|
2129
|
-
};
|
|
2130
|
-
|
|
2131
2331
|
const NumberInputIncrementTrigger = props => {
|
|
2132
2332
|
const api = useNumberInputContext();
|
|
2133
2333
|
const mergedProps = mergeProps$2(() => api().incrementTriggerProps, props);
|
|
2134
2334
|
return createComponent(ark.button, mergedProps);
|
|
2135
2335
|
};
|
|
2136
2336
|
|
|
2337
|
+
const NumberInputInput = props => {
|
|
2338
|
+
const api = useNumberInputContext();
|
|
2339
|
+
const mergedProps = mergeProps$2(() => api().inputProps, props);
|
|
2340
|
+
return createComponent(ark.input, mergedProps);
|
|
2341
|
+
};
|
|
2342
|
+
|
|
2137
2343
|
const NumberInputLabel = props => {
|
|
2138
2344
|
const api = useNumberInputContext();
|
|
2139
2345
|
const mergedProps = mergeProps$2(() => api().labelProps, props);
|
|
@@ -2174,11 +2380,10 @@ const usePagination = props => {
|
|
|
2174
2380
|
};
|
|
2175
2381
|
|
|
2176
2382
|
const Pagination$1 = props => {
|
|
2177
|
-
const [paginationParams,
|
|
2178
|
-
const [childrenProps, localProps] = splitProps(restProps, ['children']);
|
|
2383
|
+
const [paginationParams, localProps] = createSplitProps()(props, ['count', 'dir', 'getRootNode', 'id', 'ids', 'onPageChange', 'page', 'pageSize', 'siblingCount', 'translations', 'type']);
|
|
2179
2384
|
const api = usePagination(paginationParams);
|
|
2180
|
-
const getChildren = () => runIfFn(childrenProps.children, api);
|
|
2181
2385
|
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2386
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2182
2387
|
return createComponent(PaginationProvider, {
|
|
2183
2388
|
value: api,
|
|
2184
2389
|
get children() {
|
|
@@ -2192,9 +2397,9 @@ const Pagination$1 = props => {
|
|
|
2192
2397
|
};
|
|
2193
2398
|
|
|
2194
2399
|
const PaginationEllipsis = props => {
|
|
2195
|
-
const [ellipsisProps,
|
|
2400
|
+
const [ellipsisProps, localProps] = createSplitProps()(props, ['index']);
|
|
2196
2401
|
const api = usePaginationContext();
|
|
2197
|
-
const mergedProps = mergeProps$2(() => api().getEllipsisProps(ellipsisProps),
|
|
2402
|
+
const mergedProps = mergeProps$2(() => api().getEllipsisProps(ellipsisProps), localProps);
|
|
2198
2403
|
return createComponent(ark.div, mergedProps);
|
|
2199
2404
|
};
|
|
2200
2405
|
|
|
@@ -2244,8 +2449,8 @@ const usePinInput = props => {
|
|
|
2244
2449
|
|
|
2245
2450
|
const _tmpl$$6 = /*#__PURE__*/template(`<input>`);
|
|
2246
2451
|
const PinInput$1 = props => {
|
|
2247
|
-
const [
|
|
2248
|
-
const api = usePinInput(
|
|
2452
|
+
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']);
|
|
2453
|
+
const api = usePinInput(usePinInputProps);
|
|
2249
2454
|
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2250
2455
|
return createComponent(PinInputProvider, {
|
|
2251
2456
|
value: api,
|
|
@@ -2453,19 +2658,25 @@ const RadioGroupIndicator = props => {
|
|
|
2453
2658
|
return createComponent(ark.div, mergedProps);
|
|
2454
2659
|
};
|
|
2455
2660
|
|
|
2456
|
-
const [
|
|
2661
|
+
const [RadioGroupItemProvider, useRadioGroupItemContext] = createContext({
|
|
2457
2662
|
hookName: 'useRadioGroupItemContext',
|
|
2458
|
-
providerName: '<
|
|
2663
|
+
providerName: '<RadioGroupItemProvider />'
|
|
2459
2664
|
});
|
|
2460
2665
|
|
|
2461
2666
|
const RadioGroupItem = props => {
|
|
2462
|
-
const [itemProps,
|
|
2667
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2463
2668
|
const api = useRadioGroupContext();
|
|
2464
|
-
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps),
|
|
2465
|
-
|
|
2669
|
+
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
|
|
2670
|
+
const itemState = api().getItemState(itemProps);
|
|
2671
|
+
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2672
|
+
return createComponent(RadioGroupItemProvider, {
|
|
2466
2673
|
value: itemProps,
|
|
2467
2674
|
get children() {
|
|
2468
|
-
return createComponent(ark.label, mergedProps
|
|
2675
|
+
return createComponent(ark.label, mergeProps$1(mergedProps, {
|
|
2676
|
+
get children() {
|
|
2677
|
+
return getChildren();
|
|
2678
|
+
}
|
|
2679
|
+
}));
|
|
2469
2680
|
}
|
|
2470
2681
|
});
|
|
2471
2682
|
};
|
|
@@ -2522,8 +2733,8 @@ const useRatingGroup = props => {
|
|
|
2522
2733
|
};
|
|
2523
2734
|
|
|
2524
2735
|
const RatingGroup$1 = props => {
|
|
2525
|
-
const [
|
|
2526
|
-
const api = useRatingGroup(
|
|
2736
|
+
const [useRatingProps, localProps] = createSplitProps()(props, ['allowHalf', 'autoFocus', 'count', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'name', 'onHoverChange', 'onValueChange', 'readOnly', 'translations', 'value']);
|
|
2737
|
+
const api = useRatingGroup(useRatingProps);
|
|
2527
2738
|
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2528
2739
|
return createComponent(RatingGroupProvider, {
|
|
2529
2740
|
value: api,
|
|
@@ -2536,8 +2747,8 @@ const RatingGroup$1 = props => {
|
|
|
2536
2747
|
const _tmpl$$4 = /*#__PURE__*/template(`<input>`);
|
|
2537
2748
|
const RatingGroupControl = props => {
|
|
2538
2749
|
const api = useRatingGroupContext();
|
|
2539
|
-
const getChildren = () => runIfFn(props.children, api);
|
|
2540
2750
|
const mergedProps = mergeProps$2(() => api().controlProps, props);
|
|
2751
|
+
const getChildren = () => runIfFn(props.children, api);
|
|
2541
2752
|
return [createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
2542
2753
|
get children() {
|
|
2543
2754
|
return getChildren();
|
|
@@ -2557,11 +2768,11 @@ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext({
|
|
|
2557
2768
|
const RatingGroupItem = props => {
|
|
2558
2769
|
const [itemProps, localProps] = createSplitProps()(props, ['index']);
|
|
2559
2770
|
const api = useRatingGroupContext();
|
|
2771
|
+
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
|
|
2560
2772
|
const itemState = createMemo(() => api().getItemState(itemProps));
|
|
2561
2773
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2562
|
-
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
|
|
2563
2774
|
return createComponent(RatingGroupItemProvider, {
|
|
2564
|
-
value:
|
|
2775
|
+
value: itemProps,
|
|
2565
2776
|
get children() {
|
|
2566
2777
|
return createComponent(ark.span, mergeProps$1(mergedProps, {
|
|
2567
2778
|
get children() {
|
|
@@ -2620,19 +2831,25 @@ const SegmentGroupIndicator = props => {
|
|
|
2620
2831
|
return createComponent(ark.div, mergedProps);
|
|
2621
2832
|
};
|
|
2622
2833
|
|
|
2623
|
-
const [
|
|
2834
|
+
const [SegmentGroupItemProvider, useSegmentGroupItemContext] = createContext({
|
|
2624
2835
|
hookName: 'useSegmentGroupItemContext',
|
|
2625
|
-
providerName: '<
|
|
2836
|
+
providerName: '<SegmentGroupItemProvider />'
|
|
2626
2837
|
});
|
|
2627
2838
|
|
|
2628
2839
|
const SegmentGroupItem = props => {
|
|
2629
|
-
const [itemProps,
|
|
2840
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2630
2841
|
const api = useSegmentGroupContext();
|
|
2631
|
-
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), segmentGroupAnatomy.build().item.attrs,
|
|
2632
|
-
|
|
2842
|
+
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), segmentGroupAnatomy.build().item.attrs, localProps);
|
|
2843
|
+
const itemState = api().getItemState(itemProps);
|
|
2844
|
+
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2845
|
+
return createComponent(SegmentGroupItemProvider, {
|
|
2633
2846
|
value: itemProps,
|
|
2634
2847
|
get children() {
|
|
2635
|
-
return createComponent(ark.label, mergedProps
|
|
2848
|
+
return createComponent(ark.label, mergeProps$1(mergedProps, {
|
|
2849
|
+
get children() {
|
|
2850
|
+
return getChildren();
|
|
2851
|
+
}
|
|
2852
|
+
}));
|
|
2636
2853
|
}
|
|
2637
2854
|
});
|
|
2638
2855
|
};
|
|
@@ -2696,16 +2913,16 @@ const Select$1 = props => {
|
|
|
2696
2913
|
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
2697
2914
|
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']);
|
|
2698
2915
|
const api = useSelect(useSelectProps);
|
|
2699
|
-
const
|
|
2916
|
+
const presenceApi = usePresence(mergeProps$2(() => ({
|
|
2700
2917
|
present: api().isOpen
|
|
2701
|
-
})));
|
|
2918
|
+
}), presenceProps));
|
|
2702
2919
|
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2703
2920
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2704
2921
|
return createComponent(SelectProvider, {
|
|
2705
2922
|
value: api,
|
|
2706
2923
|
get children() {
|
|
2707
2924
|
return createComponent(PresenceProvider, {
|
|
2708
|
-
value:
|
|
2925
|
+
value: presenceApi,
|
|
2709
2926
|
get children() {
|
|
2710
2927
|
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
2711
2928
|
get children() {
|
|
@@ -2763,7 +2980,7 @@ const SelectControl = props => {
|
|
|
2763
2980
|
|
|
2764
2981
|
const SelectIndicator = props => {
|
|
2765
2982
|
const api = useSelectContext();
|
|
2766
|
-
const mergedProps = mergeProps$2(() => api().
|
|
2983
|
+
const mergedProps = mergeProps$2(() => api().indicatorProps, props);
|
|
2767
2984
|
return createComponent(ark.div, mergedProps);
|
|
2768
2985
|
};
|
|
2769
2986
|
|
|
@@ -2790,9 +3007,9 @@ const SelectItem = props => {
|
|
|
2790
3007
|
};
|
|
2791
3008
|
|
|
2792
3009
|
const SelectItemGroup = props => {
|
|
2793
|
-
const [
|
|
3010
|
+
const [itemGroupProps, localProps] = createSplitProps()(props, ['id']);
|
|
2794
3011
|
const api = useSelectContext();
|
|
2795
|
-
const mergedProps = mergeProps$2(() => api().getItemGroupProps(
|
|
3012
|
+
const mergedProps = mergeProps$2(() => api().getItemGroupProps(itemGroupProps), localProps);
|
|
2796
3013
|
return createComponent(ark.div, mergedProps);
|
|
2797
3014
|
};
|
|
2798
3015
|
|
|
@@ -3045,9 +3262,9 @@ const useSwitch = props => {
|
|
|
3045
3262
|
};
|
|
3046
3263
|
|
|
3047
3264
|
const Switch$1 = props => {
|
|
3048
|
-
const [switchProps,
|
|
3265
|
+
const [switchProps, localProps] = createSplitProps()(props, ['checked', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'label', 'name', 'onCheckedChange', 'required', 'value']);
|
|
3049
3266
|
const api = useSwitch(switchProps);
|
|
3050
|
-
const mergedProps = mergeProps$2(() => api().rootProps,
|
|
3267
|
+
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
3051
3268
|
const getChildren = () => runIfFn(props.children, api);
|
|
3052
3269
|
return createComponent(SwitchProvider, {
|
|
3053
3270
|
value: api,
|
|
@@ -3073,14 +3290,14 @@ const SwitchControl = props => {
|
|
|
3073
3290
|
};
|
|
3074
3291
|
|
|
3075
3292
|
const SwitchLabel = props => {
|
|
3076
|
-
const
|
|
3077
|
-
const mergedProps = mergeProps$2(() =>
|
|
3293
|
+
const api = useSwitchContext();
|
|
3294
|
+
const mergedProps = mergeProps$2(() => api().labelProps, props);
|
|
3078
3295
|
return createComponent(ark.span, mergedProps);
|
|
3079
3296
|
};
|
|
3080
3297
|
|
|
3081
3298
|
const SwitchThumb = props => {
|
|
3082
|
-
const
|
|
3083
|
-
const mergedProps = mergeProps$2(() =>
|
|
3299
|
+
const api = useSwitchContext();
|
|
3300
|
+
const mergedProps = mergeProps$2(() => api().thumbProps, props);
|
|
3084
3301
|
return createComponent(ark.span, mergedProps);
|
|
3085
3302
|
};
|
|
3086
3303
|
|
|
@@ -3299,19 +3516,18 @@ const [ToastProvider, useToastContext] = createContext({
|
|
|
3299
3516
|
providerName: '<ToastProvider />'
|
|
3300
3517
|
});
|
|
3301
3518
|
|
|
3519
|
+
const ToastGroup = props => {
|
|
3520
|
+
return createComponent(ark.ol, props);
|
|
3521
|
+
};
|
|
3522
|
+
|
|
3302
3523
|
const createToaster = props => {
|
|
3303
|
-
const {
|
|
3304
|
-
placement,
|
|
3305
|
-
...rest
|
|
3306
|
-
} = props;
|
|
3307
3524
|
const service = toast.group.machine({
|
|
3308
3525
|
id: '1',
|
|
3309
|
-
|
|
3310
|
-
...rest
|
|
3526
|
+
...props
|
|
3311
3527
|
}).start();
|
|
3312
3528
|
const [state, send] = useActor(service);
|
|
3313
3529
|
const api = createMemo(() => toast.group.connect(state, send, normalizeProps));
|
|
3314
|
-
const Toaster =
|
|
3530
|
+
const Toaster = toasterProps => {
|
|
3315
3531
|
const getRootNode = useEnvironmentContext();
|
|
3316
3532
|
createEffect(() => {
|
|
3317
3533
|
service.setContext({
|
|
@@ -3320,13 +3536,13 @@ const createToaster = props => {
|
|
|
3320
3536
|
onCleanup(() => service.stop());
|
|
3321
3537
|
});
|
|
3322
3538
|
const mergedProps = mergeProps$2(() => api().getGroupProps({
|
|
3323
|
-
placement
|
|
3324
|
-
}),
|
|
3325
|
-
return createComponent(
|
|
3539
|
+
placement: props.placement
|
|
3540
|
+
}), toasterProps);
|
|
3541
|
+
return createComponent(ToastGroup, mergeProps$1(mergedProps, {
|
|
3326
3542
|
get children() {
|
|
3327
3543
|
return createComponent(Index, {
|
|
3328
3544
|
get each() {
|
|
3329
|
-
return api().toastsByPlacement[placement];
|
|
3545
|
+
return api().toastsByPlacement[props.placement];
|
|
3330
3546
|
},
|
|
3331
3547
|
children: toast => createComponent(ToastProviderFactory, {
|
|
3332
3548
|
get service() {
|
|
@@ -3341,11 +3557,9 @@ const createToaster = props => {
|
|
|
3341
3557
|
};
|
|
3342
3558
|
const ToastProviderFactory = props => {
|
|
3343
3559
|
const [state, send] = useActor(props.service);
|
|
3344
|
-
const api = toast.connect(state, send, normalizeProps);
|
|
3560
|
+
const api = createMemo(() => toast.connect(state, send, normalizeProps));
|
|
3345
3561
|
return createComponent(ToastProvider, {
|
|
3346
|
-
|
|
3347
|
-
return createMemo(() => api);
|
|
3348
|
-
},
|
|
3562
|
+
value: api,
|
|
3349
3563
|
get children() {
|
|
3350
3564
|
return state.context.render?.(api);
|
|
3351
3565
|
}
|
|
@@ -3378,9 +3592,10 @@ const ToastTitle = props => {
|
|
|
3378
3592
|
|
|
3379
3593
|
const Toast = Object.assign(Toast$1, {
|
|
3380
3594
|
Root: Toast$1,
|
|
3381
|
-
|
|
3595
|
+
CloseTrigger: ToastCloseTrigger,
|
|
3382
3596
|
Description: ToastDescription,
|
|
3383
|
-
|
|
3597
|
+
Group: ToastGroup,
|
|
3598
|
+
Title: ToastTitle
|
|
3384
3599
|
});
|
|
3385
3600
|
|
|
3386
3601
|
const [ToggleGroupProvider, useToggleGroupContext] = createContext({
|
|
@@ -3517,5 +3732,5 @@ const Tooltip = Object.assign(Tooltip$1, {
|
|
|
3517
3732
|
Trigger: TooltipTrigger
|
|
3518
3733
|
});
|
|
3519
3734
|
|
|
3520
|
-
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, Avatar, AvatarFallback, AvatarImage, Carousel, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselViewport, Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel, ColorPicker, ColorPickerArea, ColorPickerAreaBackground, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSlider, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerContent, ColorPickerControl, ColorPickerEyeDropperTrigger, ColorPickerLabel, ColorPickerPositioner, ColorPickerSwatch, ColorPickerSwatchGroup, ColorPickerSwatchTrigger, ColorPickerTransparencyGrid, ColorPickerTrigger, ColorPickerValueText, Combobox, ComboboxClearTrigger, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxPositioner, ComboboxTrigger, DatePicker, DatePickerClearTrigger, DatePickerContent, DatePickerControl, DatePickerInput, DatePickerLabel, DatePickerMonthSelect, DatePickerNextTrigger, DatePickerPositioner, DatePickerPrevTrigger, DatePickerRangeText, DatePickerTable, DatePickerTableBody, DatePickerTableCell, DatePickerTableCellTrigger, DatePickerTableHead, DatePickerTableHeader, DatePickerTableRow, DatePickerTrigger, DatePickerView, DatePickerViewControl, DatePickerViewTrigger, DatePickerYearSelect, Dialog, DialogBackdrop, DialogCloseTrigger, DialogContent, DialogDescription, DialogPositioner, DialogTitle, DialogTrigger, Editable, EditableArea, EditableCancelTrigger, EditableControl, EditableEditTrigger, EditableInput, EditableLabel, EditablePreview, EditableSubmitTrigger, Environment, HoverCard, HoverCardArrow, HoverCardArrowTip, HoverCardContent, HoverCardPositioner, HoverCardTrigger, Menu, MenuArrow, MenuArrowTip, MenuContent, MenuContextTrigger, MenuItem, MenuItemGroup, MenuItemGroupLabel, MenuOptionItem, MenuPositioner, MenuSeparator, MenuTrigger, MenuTriggerItem, NumberInput, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputScrubber, Pagination, PaginationEllipsis, PaginationItem, PaginationNextTrigger, PaginationPrevTrigger, PinInput, PinInputControl, PinInputInput, PinInputLabel, Popover, PopoverAnchor, PopoverArrow, PopoverArrowTip, PopoverCloseTrigger, PopoverContent, PopoverDescription, PopoverIndicator, PopoverPositioner, PopoverTitle, PopoverTrigger, Presence, PresencePropsProvider, PresenceProvider, RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemText, RadioGroupLabel, RatingGroup, RatingGroupControl, RatingGroupItem, RatingGroupLabel, SegmentGroup, SegmentGroupIndicator, SegmentGroupItem, SegmentGroupItemControl, SegmentGroupItemText, SegmentGroupLabel, Select, SelectClearTrigger, SelectContent, SelectControl, SelectIndicator, SelectItem, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectTrigger, SelectValueText, Slider, SliderControl, SliderLabel, SliderMarker, SliderMarkerGroup, SliderRange, SliderThumb, SliderTrack, SliderValueText, Splitter, SplitterPanel, SplitterResizeTrigger, Switch, SwitchControl, SwitchLabel, SwitchThumb, TabContent, TabIndicator, TabList, TabTrigger, Tabs, TagsInput, TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemInput, TagsInputItemText, TagsInputLabel, Toast, ToastCloseTrigger, ToastDescription, ToastTitle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipArrowTip, TooltipContent, TooltipPositioner, TooltipTrigger, ark, createToaster, splitPresenceProps, useAccordionContext, useAccordionItemContext, useAvatarContext, useCarouselContext, useCheckboxContext, useColorPickerAreaContext, useColorPickerChannelSliderContext, useColorPickerContext, useComboboxContext, useDatePickerContext, useDatePickerTableCellContext, useDatePickerTableContext, useDatePickerViewContext, useDialogContext, useEditableContext, useEnvironmentContext, useHoverCardContext, useMenuContext, useNumberInputContext, usePaginationContext, usePinInputContext, usePopoverContext, usePresence, usePresenceContext, usePresencePropsContext, useRadioGroupContext, useRadioGroupItemContext, useRatingGroupContext, useRatingGroupItemContext, useSegmentGroupContext, useSegmentGroupItemContext, useSelectContext, useSelectItemContext, useSliderContext, useSplitterContext, useSwitchContext, useTabsContext, useTagsInputContext, useTagsInputItemContext, useToggleGroupContext, useTooltipContext };
|
|
3735
|
+
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, Avatar, AvatarFallback, AvatarImage, Carousel, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselViewport, Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel, ColorPicker, ColorPickerArea, ColorPickerAreaBackground, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSlider, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerContent, ColorPickerControl, ColorPickerEyeDropperTrigger, ColorPickerFormatSelect, ColorPickerFormatTrigger, ColorPickerLabel, ColorPickerPositioner, ColorPickerSwatch, ColorPickerSwatchGroup, ColorPickerSwatchIndicator, ColorPickerSwatchTrigger, ColorPickerTransparencyGrid, ColorPickerTrigger, ColorPickerValueText, ColorPickerView, Combobox, ComboboxClearTrigger, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxPositioner, ComboboxTrigger, DatePicker, DatePickerClearTrigger, DatePickerContent, DatePickerControl, DatePickerInput, DatePickerLabel, DatePickerMonthSelect, DatePickerNextTrigger, DatePickerPositioner, DatePickerPrevTrigger, DatePickerRangeText, DatePickerTable, DatePickerTableBody, DatePickerTableCell, DatePickerTableCellTrigger, DatePickerTableHead, DatePickerTableHeader, DatePickerTableRow, DatePickerTrigger, DatePickerView, DatePickerViewControl, DatePickerViewTrigger, DatePickerYearSelect, Dialog, DialogBackdrop, DialogCloseTrigger, DialogContent, DialogDescription, DialogPositioner, DialogTitle, DialogTrigger, Editable, EditableArea, EditableCancelTrigger, EditableControl, EditableEditTrigger, EditableInput, EditableLabel, EditablePreview, EditableSubmitTrigger, Environment, FileUpload, FileUploadDropzone, FileUploadItem, FileUploadItemDeleteTrigger, FileUploadItemGroup, FileUploadItemName, FileUploadItemPreviewImage, FileUploadItemSizeText, FileUploadLabel, FileUploadTrigger, HoverCard, HoverCardArrow, HoverCardArrowTip, HoverCardContent, HoverCardPositioner, HoverCardTrigger, Menu, MenuArrow, MenuArrowTip, MenuContent, MenuContextTrigger, MenuItem, MenuItemGroup, MenuItemGroupLabel, MenuOptionItem, MenuPositioner, MenuSeparator, MenuTrigger, MenuTriggerItem, NumberInput, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputScrubber, Pagination, PaginationEllipsis, PaginationItem, PaginationNextTrigger, PaginationPrevTrigger, PinInput, PinInputControl, PinInputInput, PinInputLabel, Popover, PopoverAnchor, PopoverArrow, PopoverArrowTip, PopoverCloseTrigger, PopoverContent, PopoverDescription, PopoverIndicator, PopoverPositioner, PopoverTitle, PopoverTrigger, Presence, PresencePropsProvider, PresenceProvider, RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemText, RadioGroupLabel, RatingGroup, RatingGroupControl, RatingGroupItem, RatingGroupLabel, SegmentGroup, SegmentGroupIndicator, SegmentGroupItem, SegmentGroupItemControl, SegmentGroupItemText, SegmentGroupLabel, Select, SelectClearTrigger, SelectContent, SelectControl, SelectIndicator, SelectItem, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectTrigger, SelectValueText, Slider, SliderControl, SliderLabel, SliderMarker, SliderMarkerGroup, SliderRange, SliderThumb, SliderTrack, SliderValueText, Splitter, SplitterPanel, SplitterResizeTrigger, Switch, SwitchControl, SwitchLabel, SwitchThumb, TabContent, TabIndicator, TabList, TabTrigger, Tabs, TagsInput, TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemInput, TagsInputItemText, TagsInputLabel, Toast, ToastCloseTrigger, ToastDescription, ToastGroup, ToastTitle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipArrowTip, TooltipContent, TooltipPositioner, TooltipTrigger, ark, createToaster, splitPresenceProps, useAccordionContext, useAccordionItemContext, useAvatarContext, useCarouselContext, useCheckboxContext, useColorPickerAreaContext, useColorPickerChannelSliderContext, useColorPickerContext, useComboboxContext, useDatePickerContext, useDatePickerTableCellContext, useDatePickerTableContext, useDatePickerViewContext, useDialogContext, useEditableContext, useEnvironmentContext, useFileUploadContext, useHoverCardContext, useMenuContext, useNumberInputContext, usePaginationContext, usePinInputContext, usePopoverContext, usePresence, usePresenceContext, usePresencePropsContext, useRadioGroupContext, useRadioGroupItemContext, useRatingGroupContext, useRatingGroupItemContext, useSegmentGroupContext, useSegmentGroupItemContext, useSelectContext, useSelectItemContext, useSliderContext, useSplitterContext, useSwitchContext, useTabsContext, useTagsInputContext, useTagsInputItemContext, useToggleGroupContext, useTooltipContext };
|
|
3521
3736
|
//# sourceMappingURL=index.js.map
|