@ark-ui/solid 1.1.0 → 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 +16 -1
- package/README.md +24 -21
- package/cjs/index.js +104 -84
- package/cjs/index.js.map +1 -1
- package/esm/index.js +103 -84
- package/esm/index.js.map +1 -1
- package/package.json +51 -49
- package/source/date-picker/date-picker.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-item-preview-image.jsx +13 -0
- package/source/file-upload/file-upload-item-preview.jsx +3 -10
- package/source/file-upload/file-upload.jsx +5 -1
- package/source/file-upload/index.js +7 -5
- package/source/number-input/index.js +1 -1
- 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 +3 -3
- package/source/toast/index.js +5 -3
- package/source/toast/toast-group.jsx +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 +6 -1
- package/types/file-upload/index.d.ts +9 -7
- package/types/number-input/index.d.ts +1 -1
- 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/index.d.ts +6 -4
- 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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@ description: All notable changes to this project will be documented in this file
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.2.0] - 2023-12-13
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added the `ToastGroup` component.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Revised the `FileUpload` component. Check out the [documentation](https://ark-ui.com/docs/components/file-upload) for more information.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Resolved a problem where `Select.Indicator` was assigned to the wrong `data-part`.
|
|
22
|
+
- Fixed an issue where keyboard interactions within a submenu would bubble up to the parent `Menu`.
|
|
23
|
+
|
|
9
24
|
## [1.1.0] - 2023-11-21
|
|
10
25
|
|
|
11
26
|
### Added
|
|
@@ -13,7 +28,7 @@ description: All notable changes to this project will be documented in this file
|
|
|
13
28
|
- Added render function to the `NumberInput` component
|
|
14
29
|
- Added `FileUpload` component
|
|
15
30
|
|
|
16
|
-
|
|
31
|
+
### Changed
|
|
17
32
|
|
|
18
33
|
- Revised the `ColorPicker` component. Check out the [documentation](https://ark-ui.com/docs/components/color-picker) for more information.
|
|
19
34
|
|
package/README.md
CHANGED
|
@@ -61,31 +61,34 @@ yarn add @ark-ui/solid
|
|
|
61
61
|
To use a component from `@ark-ui/solid`, import it and include it in your application:
|
|
62
62
|
|
|
63
63
|
```tsx
|
|
64
|
-
import {
|
|
65
|
-
Slider,
|
|
66
|
-
SliderControl,
|
|
67
|
-
SliderLabel,
|
|
68
|
-
SliderOutput,
|
|
69
|
-
SliderRange,
|
|
70
|
-
SliderThumb,
|
|
71
|
-
SliderTrack,
|
|
72
|
-
} from '@ark-ui/solid'
|
|
64
|
+
import { Slider, type SliderProps } from '@ark-ui/solid'
|
|
73
65
|
import { createSignal } from 'solid-js'
|
|
74
66
|
|
|
75
|
-
export const MySlider = () => {
|
|
76
|
-
const [value, setValue] = createSignal(
|
|
67
|
+
export const MySlider = (props: SliderProps) => {
|
|
68
|
+
const [value, setValue] = createSignal([42])
|
|
77
69
|
|
|
78
70
|
return (
|
|
79
|
-
<Slider
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
71
|
+
<Slider.Root
|
|
72
|
+
min={0}
|
|
73
|
+
max={100}
|
|
74
|
+
value={value()}
|
|
75
|
+
onValueChange={(e) => setValue(e.value)}
|
|
76
|
+
{...props}
|
|
77
|
+
>
|
|
78
|
+
<Slider.Label>Label</Slider.Label>
|
|
79
|
+
<Slider.ValueText />
|
|
80
|
+
<Slider.Control>
|
|
81
|
+
<Slider.Track>
|
|
82
|
+
<Slider.Range />
|
|
83
|
+
</Slider.Track>
|
|
84
|
+
<Slider.Thumb index={0} />
|
|
85
|
+
</Slider.Control>
|
|
86
|
+
<Slider.MarkerGroup>
|
|
87
|
+
<Slider.Marker value={25}>25</Slider.Marker>
|
|
88
|
+
<Slider.Marker value={50}>50</Slider.Marker>
|
|
89
|
+
<Slider.Marker value={75}>75</Slider.Marker>
|
|
90
|
+
</Slider.MarkerGroup>
|
|
91
|
+
</Slider.Root>
|
|
89
92
|
)
|
|
90
93
|
}
|
|
91
94
|
```
|
package/cjs/index.js
CHANGED
|
@@ -1362,7 +1362,7 @@ const useDatePicker = props => {
|
|
|
1362
1362
|
|
|
1363
1363
|
const DatePicker$1 = props => {
|
|
1364
1364
|
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
1365
|
-
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']);
|
|
1366
1366
|
const api = useDatePicker(useDatePickerProps);
|
|
1367
1367
|
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1368
1368
|
present: api().isOpen
|
|
@@ -1812,13 +1812,12 @@ const useEditable = props => {
|
|
|
1812
1812
|
};
|
|
1813
1813
|
|
|
1814
1814
|
const Editable$1 = props => {
|
|
1815
|
-
const [useEditableProps,
|
|
1816
|
-
const
|
|
1817
|
-
const
|
|
1818
|
-
const
|
|
1819
|
-
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);
|
|
1820
1819
|
return web.createComponent(EditableProvider, {
|
|
1821
|
-
value:
|
|
1820
|
+
value: api,
|
|
1822
1821
|
get children() {
|
|
1823
1822
|
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1824
1823
|
get children() {
|
|
@@ -1830,50 +1829,50 @@ const Editable$1 = props => {
|
|
|
1830
1829
|
};
|
|
1831
1830
|
|
|
1832
1831
|
const EditableArea = props => {
|
|
1833
|
-
const
|
|
1834
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1832
|
+
const api = useEditableContext();
|
|
1833
|
+
const mergedProps = solid.mergeProps(() => api().areaProps, props);
|
|
1835
1834
|
return web.createComponent(ark.div, mergedProps);
|
|
1836
1835
|
};
|
|
1837
1836
|
|
|
1838
1837
|
const EditableCancelTrigger = props => {
|
|
1839
|
-
const
|
|
1840
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1838
|
+
const api = useEditableContext();
|
|
1839
|
+
const mergedProps = solid.mergeProps(() => api().cancelTriggerProps, props);
|
|
1841
1840
|
return web.createComponent(ark.button, mergedProps);
|
|
1842
1841
|
};
|
|
1843
1842
|
|
|
1844
1843
|
const EditableControl = props => {
|
|
1845
|
-
const
|
|
1846
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1844
|
+
const api = useEditableContext();
|
|
1845
|
+
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
1847
1846
|
return web.createComponent(ark.div, mergedProps);
|
|
1848
1847
|
};
|
|
1849
1848
|
|
|
1850
1849
|
const EditableEditTrigger = props => {
|
|
1851
|
-
const
|
|
1852
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1850
|
+
const api = useEditableContext();
|
|
1851
|
+
const mergedProps = solid.mergeProps(() => api().editTriggerProps, props);
|
|
1853
1852
|
return web.createComponent(ark.button, mergedProps);
|
|
1854
1853
|
};
|
|
1855
1854
|
|
|
1856
1855
|
const EditableInput = props => {
|
|
1857
|
-
const
|
|
1858
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1856
|
+
const api = useEditableContext();
|
|
1857
|
+
const mergedProps = solid.mergeProps(() => api().inputProps, props);
|
|
1859
1858
|
return web.createComponent(ark.input, mergedProps);
|
|
1860
1859
|
};
|
|
1861
1860
|
|
|
1862
1861
|
const EditableLabel = props => {
|
|
1863
|
-
const
|
|
1864
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1862
|
+
const api = useEditableContext();
|
|
1863
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
1865
1864
|
return web.createComponent(ark.label, mergedProps);
|
|
1866
1865
|
};
|
|
1867
1866
|
|
|
1868
1867
|
const EditablePreview = props => {
|
|
1869
|
-
const
|
|
1870
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1868
|
+
const api = useEditableContext();
|
|
1869
|
+
const mergedProps = solid.mergeProps(() => api().previewProps, props);
|
|
1871
1870
|
return web.createComponent(ark.span, mergedProps);
|
|
1872
1871
|
};
|
|
1873
1872
|
|
|
1874
1873
|
const EditableSubmitTrigger = props => {
|
|
1875
|
-
const
|
|
1876
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1874
|
+
const api = useEditableContext();
|
|
1875
|
+
const mergedProps = solid.mergeProps(() => api().submitTriggerProps, props);
|
|
1877
1876
|
return web.createComponent(ark.button, mergedProps);
|
|
1878
1877
|
};
|
|
1879
1878
|
|
|
@@ -1907,7 +1906,7 @@ const useFileUpload = props => {
|
|
|
1907
1906
|
};
|
|
1908
1907
|
|
|
1909
1908
|
const FileUpload$1 = props => {
|
|
1910
|
-
const [fileUploadProps, localProps] = createSplitProps()(props, ['accept', 'allowDrop', 'dir', 'disabled', 'files', 'getRootNode', 'id', '
|
|
1909
|
+
const [fileUploadProps, localProps] = createSplitProps()(props, ['accept', 'allowDrop', 'dir', 'disabled', 'files', 'getRootNode', 'id', 'ids', 'locale', 'maxFiles', 'maxFileSize', 'minFileSize', 'name', 'onFileAccept', 'onFileReject', 'onFilesChange', 'translations', 'validate']);
|
|
1911
1910
|
const api = useFileUpload(fileUploadProps);
|
|
1912
1911
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1913
1912
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
@@ -1987,20 +1986,23 @@ const FileUploadItemName = props => {
|
|
|
1987
1986
|
};
|
|
1988
1987
|
|
|
1989
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 => {
|
|
1990
1997
|
const api = useFileUploadContext();
|
|
1991
1998
|
const item = useFileUploadItemContext();
|
|
1992
1999
|
const [url, setUrl] = solidJs.createSignal('');
|
|
1993
2000
|
api().createFileUrl(item.file, url => setUrl(url));
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
return web.createComponent(ark.img, mergedProps);
|
|
2000
|
-
} catch (e) {
|
|
2001
|
-
// TODO We could render a fallback component
|
|
2002
|
-
return null;
|
|
2003
|
-
}
|
|
2001
|
+
const mergedProps = solid.mergeProps(api().getItemPreviewImageProps({
|
|
2002
|
+
...item,
|
|
2003
|
+
url: url()
|
|
2004
|
+
}), props);
|
|
2005
|
+
return web.createComponent(ark.img, mergedProps);
|
|
2004
2006
|
};
|
|
2005
2007
|
|
|
2006
2008
|
const FileUploadItemSizeText = props => {
|
|
@@ -2030,14 +2032,15 @@ const FileUploadTrigger = props => {
|
|
|
2030
2032
|
const FileUpload = Object.assign(FileUpload$1, {
|
|
2031
2033
|
Root: FileUpload$1,
|
|
2032
2034
|
Dropzone: FileUploadDropzone,
|
|
2033
|
-
Label: FileUploadLabel,
|
|
2034
|
-
Trigger: FileUploadTrigger,
|
|
2035
|
-
ItemGroup: FileUploadItemGroup,
|
|
2036
2035
|
Item: FileUploadItem,
|
|
2036
|
+
ItemDeleteTrigger: FileUploadItemDeleteTrigger,
|
|
2037
|
+
ItemGroup: FileUploadItemGroup,
|
|
2037
2038
|
ItemName: FileUploadItemName,
|
|
2038
2039
|
ItemPreview: FileUploadItemPreview,
|
|
2040
|
+
ItemPreviewImage: FileUploadItemPreviewImage,
|
|
2039
2041
|
ItemSizeText: FileUploadItemSizeText,
|
|
2040
|
-
|
|
2042
|
+
Label: FileUploadLabel,
|
|
2043
|
+
Trigger: FileUploadTrigger
|
|
2041
2044
|
});
|
|
2042
2045
|
|
|
2043
2046
|
const [HoverCardProvider, useHoverCardContext] = createContext({
|
|
@@ -2373,18 +2376,18 @@ const NumberInputDecrementTrigger = props => {
|
|
|
2373
2376
|
return web.createComponent(ark.button, mergedProps);
|
|
2374
2377
|
};
|
|
2375
2378
|
|
|
2376
|
-
const NumberInputInput = props => {
|
|
2377
|
-
const api = useNumberInputContext();
|
|
2378
|
-
const mergedProps = solid.mergeProps(() => api().inputProps, props);
|
|
2379
|
-
return web.createComponent(ark.input, mergedProps);
|
|
2380
|
-
};
|
|
2381
|
-
|
|
2382
2379
|
const NumberInputIncrementTrigger = props => {
|
|
2383
2380
|
const api = useNumberInputContext();
|
|
2384
2381
|
const mergedProps = solid.mergeProps(() => api().incrementTriggerProps, props);
|
|
2385
2382
|
return web.createComponent(ark.button, mergedProps);
|
|
2386
2383
|
};
|
|
2387
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
|
+
|
|
2388
2391
|
const NumberInputLabel = props => {
|
|
2389
2392
|
const api = useNumberInputContext();
|
|
2390
2393
|
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
@@ -2425,11 +2428,10 @@ const usePagination = props => {
|
|
|
2425
2428
|
};
|
|
2426
2429
|
|
|
2427
2430
|
const Pagination$1 = props => {
|
|
2428
|
-
const [paginationParams,
|
|
2429
|
-
const [childrenProps, localProps] = solidJs.splitProps(restProps, ['children']);
|
|
2431
|
+
const [paginationParams, localProps] = createSplitProps()(props, ['count', 'dir', 'getRootNode', 'id', 'ids', 'onPageChange', 'page', 'pageSize', 'siblingCount', 'translations', 'type']);
|
|
2430
2432
|
const api = usePagination(paginationParams);
|
|
2431
|
-
const getChildren = () => runIfFn(childrenProps.children, api);
|
|
2432
2433
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2434
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2433
2435
|
return web.createComponent(PaginationProvider, {
|
|
2434
2436
|
value: api,
|
|
2435
2437
|
get children() {
|
|
@@ -2443,9 +2445,9 @@ const Pagination$1 = props => {
|
|
|
2443
2445
|
};
|
|
2444
2446
|
|
|
2445
2447
|
const PaginationEllipsis = props => {
|
|
2446
|
-
const [ellipsisProps,
|
|
2448
|
+
const [ellipsisProps, localProps] = createSplitProps()(props, ['index']);
|
|
2447
2449
|
const api = usePaginationContext();
|
|
2448
|
-
const mergedProps = solid.mergeProps(() => api().getEllipsisProps(ellipsisProps),
|
|
2450
|
+
const mergedProps = solid.mergeProps(() => api().getEllipsisProps(ellipsisProps), localProps);
|
|
2449
2451
|
return web.createComponent(ark.div, mergedProps);
|
|
2450
2452
|
};
|
|
2451
2453
|
|
|
@@ -2495,8 +2497,8 @@ const usePinInput = props => {
|
|
|
2495
2497
|
|
|
2496
2498
|
const _tmpl$$6 = /*#__PURE__*/web.template(`<input>`);
|
|
2497
2499
|
const PinInput$1 = props => {
|
|
2498
|
-
const [
|
|
2499
|
-
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);
|
|
2500
2502
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2501
2503
|
return web.createComponent(PinInputProvider, {
|
|
2502
2504
|
value: api,
|
|
@@ -2704,19 +2706,25 @@ const RadioGroupIndicator = props => {
|
|
|
2704
2706
|
return web.createComponent(ark.div, mergedProps);
|
|
2705
2707
|
};
|
|
2706
2708
|
|
|
2707
|
-
const [
|
|
2709
|
+
const [RadioGroupItemProvider, useRadioGroupItemContext] = createContext({
|
|
2708
2710
|
hookName: 'useRadioGroupItemContext',
|
|
2709
|
-
providerName: '<
|
|
2711
|
+
providerName: '<RadioGroupItemProvider />'
|
|
2710
2712
|
});
|
|
2711
2713
|
|
|
2712
2714
|
const RadioGroupItem = props => {
|
|
2713
|
-
const [itemProps,
|
|
2715
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2714
2716
|
const api = useRadioGroupContext();
|
|
2715
|
-
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps),
|
|
2716
|
-
|
|
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, {
|
|
2717
2721
|
value: itemProps,
|
|
2718
2722
|
get children() {
|
|
2719
|
-
return web.createComponent(ark.label, mergedProps
|
|
2723
|
+
return web.createComponent(ark.label, web.mergeProps(mergedProps, {
|
|
2724
|
+
get children() {
|
|
2725
|
+
return getChildren();
|
|
2726
|
+
}
|
|
2727
|
+
}));
|
|
2720
2728
|
}
|
|
2721
2729
|
});
|
|
2722
2730
|
};
|
|
@@ -2773,8 +2781,8 @@ const useRatingGroup = props => {
|
|
|
2773
2781
|
};
|
|
2774
2782
|
|
|
2775
2783
|
const RatingGroup$1 = props => {
|
|
2776
|
-
const [
|
|
2777
|
-
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);
|
|
2778
2786
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2779
2787
|
return web.createComponent(RatingGroupProvider, {
|
|
2780
2788
|
value: api,
|
|
@@ -2787,8 +2795,8 @@ const RatingGroup$1 = props => {
|
|
|
2787
2795
|
const _tmpl$$4 = /*#__PURE__*/web.template(`<input>`);
|
|
2788
2796
|
const RatingGroupControl = props => {
|
|
2789
2797
|
const api = useRatingGroupContext();
|
|
2790
|
-
const getChildren = () => runIfFn(props.children, api);
|
|
2791
2798
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
2799
|
+
const getChildren = () => runIfFn(props.children, api);
|
|
2792
2800
|
return [web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2793
2801
|
get children() {
|
|
2794
2802
|
return getChildren();
|
|
@@ -2808,11 +2816,11 @@ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext({
|
|
|
2808
2816
|
const RatingGroupItem = props => {
|
|
2809
2817
|
const [itemProps, localProps] = createSplitProps()(props, ['index']);
|
|
2810
2818
|
const api = useRatingGroupContext();
|
|
2819
|
+
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
2811
2820
|
const itemState = solidJs.createMemo(() => api().getItemState(itemProps));
|
|
2812
2821
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2813
|
-
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
2814
2822
|
return web.createComponent(RatingGroupItemProvider, {
|
|
2815
|
-
value:
|
|
2823
|
+
value: itemProps,
|
|
2816
2824
|
get children() {
|
|
2817
2825
|
return web.createComponent(ark.span, web.mergeProps(mergedProps, {
|
|
2818
2826
|
get children() {
|
|
@@ -2871,19 +2879,25 @@ const SegmentGroupIndicator = props => {
|
|
|
2871
2879
|
return web.createComponent(ark.div, mergedProps);
|
|
2872
2880
|
};
|
|
2873
2881
|
|
|
2874
|
-
const [
|
|
2882
|
+
const [SegmentGroupItemProvider, useSegmentGroupItemContext] = createContext({
|
|
2875
2883
|
hookName: 'useSegmentGroupItemContext',
|
|
2876
|
-
providerName: '<
|
|
2884
|
+
providerName: '<SegmentGroupItemProvider />'
|
|
2877
2885
|
});
|
|
2878
2886
|
|
|
2879
2887
|
const SegmentGroupItem = props => {
|
|
2880
|
-
const [itemProps,
|
|
2888
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2881
2889
|
const api = useSegmentGroupContext();
|
|
2882
|
-
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), anatomy.segmentGroupAnatomy.build().item.attrs,
|
|
2883
|
-
|
|
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, {
|
|
2884
2894
|
value: itemProps,
|
|
2885
2895
|
get children() {
|
|
2886
|
-
return web.createComponent(ark.label, mergedProps
|
|
2896
|
+
return web.createComponent(ark.label, web.mergeProps(mergedProps, {
|
|
2897
|
+
get children() {
|
|
2898
|
+
return getChildren();
|
|
2899
|
+
}
|
|
2900
|
+
}));
|
|
2887
2901
|
}
|
|
2888
2902
|
});
|
|
2889
2903
|
};
|
|
@@ -2947,16 +2961,16 @@ const Select$1 = props => {
|
|
|
2947
2961
|
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
2948
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']);
|
|
2949
2963
|
const api = useSelect(useSelectProps);
|
|
2950
|
-
const
|
|
2964
|
+
const presenceApi = usePresence(solid.mergeProps(() => ({
|
|
2951
2965
|
present: api().isOpen
|
|
2952
|
-
})));
|
|
2966
|
+
}), presenceProps));
|
|
2953
2967
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2954
2968
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2955
2969
|
return web.createComponent(SelectProvider, {
|
|
2956
2970
|
value: api,
|
|
2957
2971
|
get children() {
|
|
2958
2972
|
return web.createComponent(PresenceProvider, {
|
|
2959
|
-
value:
|
|
2973
|
+
value: presenceApi,
|
|
2960
2974
|
get children() {
|
|
2961
2975
|
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2962
2976
|
get children() {
|
|
@@ -3014,7 +3028,7 @@ const SelectControl = props => {
|
|
|
3014
3028
|
|
|
3015
3029
|
const SelectIndicator = props => {
|
|
3016
3030
|
const api = useSelectContext();
|
|
3017
|
-
const mergedProps = solid.mergeProps(() => api().
|
|
3031
|
+
const mergedProps = solid.mergeProps(() => api().indicatorProps, props);
|
|
3018
3032
|
return web.createComponent(ark.div, mergedProps);
|
|
3019
3033
|
};
|
|
3020
3034
|
|
|
@@ -3041,9 +3055,9 @@ const SelectItem = props => {
|
|
|
3041
3055
|
};
|
|
3042
3056
|
|
|
3043
3057
|
const SelectItemGroup = props => {
|
|
3044
|
-
const [
|
|
3058
|
+
const [itemGroupProps, localProps] = createSplitProps()(props, ['id']);
|
|
3045
3059
|
const api = useSelectContext();
|
|
3046
|
-
const mergedProps = solid.mergeProps(() => api().getItemGroupProps(
|
|
3060
|
+
const mergedProps = solid.mergeProps(() => api().getItemGroupProps(itemGroupProps), localProps);
|
|
3047
3061
|
return web.createComponent(ark.div, mergedProps);
|
|
3048
3062
|
};
|
|
3049
3063
|
|
|
@@ -3296,9 +3310,9 @@ const useSwitch = props => {
|
|
|
3296
3310
|
};
|
|
3297
3311
|
|
|
3298
3312
|
const Switch$1 = props => {
|
|
3299
|
-
const [switchProps,
|
|
3313
|
+
const [switchProps, localProps] = createSplitProps()(props, ['checked', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'label', 'name', 'onCheckedChange', 'required', 'value']);
|
|
3300
3314
|
const api = useSwitch(switchProps);
|
|
3301
|
-
const mergedProps = solid.mergeProps(() => api().rootProps,
|
|
3315
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
3302
3316
|
const getChildren = () => runIfFn(props.children, api);
|
|
3303
3317
|
return web.createComponent(SwitchProvider, {
|
|
3304
3318
|
value: api,
|
|
@@ -3324,14 +3338,14 @@ const SwitchControl = props => {
|
|
|
3324
3338
|
};
|
|
3325
3339
|
|
|
3326
3340
|
const SwitchLabel = props => {
|
|
3327
|
-
const
|
|
3328
|
-
const mergedProps = solid.mergeProps(() =>
|
|
3341
|
+
const api = useSwitchContext();
|
|
3342
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
3329
3343
|
return web.createComponent(ark.span, mergedProps);
|
|
3330
3344
|
};
|
|
3331
3345
|
|
|
3332
3346
|
const SwitchThumb = props => {
|
|
3333
|
-
const
|
|
3334
|
-
const mergedProps = solid.mergeProps(() =>
|
|
3347
|
+
const api = useSwitchContext();
|
|
3348
|
+
const mergedProps = solid.mergeProps(() => api().thumbProps, props);
|
|
3335
3349
|
return web.createComponent(ark.span, mergedProps);
|
|
3336
3350
|
};
|
|
3337
3351
|
|
|
@@ -3550,6 +3564,10 @@ const [ToastProvider, useToastContext] = createContext({
|
|
|
3550
3564
|
providerName: '<ToastProvider />'
|
|
3551
3565
|
});
|
|
3552
3566
|
|
|
3567
|
+
const ToastGroup = props => {
|
|
3568
|
+
return web.createComponent(ark.ol, props);
|
|
3569
|
+
};
|
|
3570
|
+
|
|
3553
3571
|
const createToaster = props => {
|
|
3554
3572
|
const service = toast__namespace.group.machine({
|
|
3555
3573
|
id: '1',
|
|
@@ -3568,7 +3586,7 @@ const createToaster = props => {
|
|
|
3568
3586
|
const mergedProps = solid.mergeProps(() => api().getGroupProps({
|
|
3569
3587
|
placement: props.placement
|
|
3570
3588
|
}), toasterProps);
|
|
3571
|
-
return web.createComponent(
|
|
3589
|
+
return web.createComponent(ToastGroup, web.mergeProps(mergedProps, {
|
|
3572
3590
|
get children() {
|
|
3573
3591
|
return web.createComponent(solidJs.Index, {
|
|
3574
3592
|
get each() {
|
|
@@ -3622,9 +3640,10 @@ const ToastTitle = props => {
|
|
|
3622
3640
|
|
|
3623
3641
|
const Toast = Object.assign(Toast$1, {
|
|
3624
3642
|
Root: Toast$1,
|
|
3625
|
-
|
|
3643
|
+
CloseTrigger: ToastCloseTrigger,
|
|
3626
3644
|
Description: ToastDescription,
|
|
3627
|
-
|
|
3645
|
+
Group: ToastGroup,
|
|
3646
|
+
Title: ToastTitle
|
|
3628
3647
|
});
|
|
3629
3648
|
|
|
3630
3649
|
const [ToggleGroupProvider, useToggleGroupContext] = createContext({
|
|
@@ -3865,7 +3884,7 @@ exports.FileUploadItem = FileUploadItem;
|
|
|
3865
3884
|
exports.FileUploadItemDeleteTrigger = FileUploadItemDeleteTrigger;
|
|
3866
3885
|
exports.FileUploadItemGroup = FileUploadItemGroup;
|
|
3867
3886
|
exports.FileUploadItemName = FileUploadItemName;
|
|
3868
|
-
exports.
|
|
3887
|
+
exports.FileUploadItemPreviewImage = FileUploadItemPreviewImage;
|
|
3869
3888
|
exports.FileUploadItemSizeText = FileUploadItemSizeText;
|
|
3870
3889
|
exports.FileUploadLabel = FileUploadLabel;
|
|
3871
3890
|
exports.FileUploadTrigger = FileUploadTrigger;
|
|
@@ -3980,6 +3999,7 @@ exports.TagsInputLabel = TagsInputLabel;
|
|
|
3980
3999
|
exports.Toast = Toast;
|
|
3981
4000
|
exports.ToastCloseTrigger = ToastCloseTrigger;
|
|
3982
4001
|
exports.ToastDescription = ToastDescription;
|
|
4002
|
+
exports.ToastGroup = ToastGroup;
|
|
3983
4003
|
exports.ToastTitle = ToastTitle;
|
|
3984
4004
|
exports.ToggleGroup = ToggleGroup;
|
|
3985
4005
|
exports.ToggleGroupItem = ToggleGroupItem;
|