@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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,67 @@ 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
|
+
|
|
24
|
+
## [1.1.0] - 2023-11-21
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Added render function to the `NumberInput` component
|
|
29
|
+
- Added `FileUpload` component
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Revised the `ColorPicker` component. Check out the [documentation](https://ark-ui.com/docs/components/color-picker) for more information.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Resolved a problem where the `Dialog.CloseTrigger` was assigned to the wrong `data-part`.
|
|
38
|
+
- Fixed various issues for the `Toast` component that were caused by the API not being wrapped in an `Accessor`.
|
|
39
|
+
|
|
40
|
+
```jsx
|
|
41
|
+
// before
|
|
42
|
+
const [Toaster, toast] = createToaster({
|
|
43
|
+
placement: 'top-end',
|
|
44
|
+
render(toast) {
|
|
45
|
+
return (
|
|
46
|
+
<Toast.Root>
|
|
47
|
+
<Toast.Title>{toast.title}</Toast.Title>
|
|
48
|
+
<Toast.Description>{toast.description}</Toast.Description>
|
|
49
|
+
<Toast.CloseTrigger>Close</Toast.CloseTrigger>
|
|
50
|
+
</Toast.Root>
|
|
51
|
+
)
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// after
|
|
56
|
+
const [Toaster, toast] = createToaster({
|
|
57
|
+
placement: 'top-end',
|
|
58
|
+
render(toast) {
|
|
59
|
+
return (
|
|
60
|
+
<Toast.Root>
|
|
61
|
+
<Toast.Title>{toast().title}</Toast.Title>
|
|
62
|
+
<Toast.Description>{toast().description}</Toast.Description>
|
|
63
|
+
<Toast.CloseTrigger>Close</Toast.CloseTrigger>
|
|
64
|
+
</Toast.Root>
|
|
65
|
+
)
|
|
66
|
+
},
|
|
67
|
+
})
|
|
68
|
+
```
|
|
69
|
+
|
|
9
70
|
## [1.0.1] - 2023-11-10
|
|
10
71
|
|
|
11
72
|
### Fixed
|
|
@@ -200,3 +261,7 @@ With the release of version 1.0.0, we are moving towards a more stable version o
|
|
|
200
261
|
[0.10.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.10.0
|
|
201
262
|
[0.10.1]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.10.1
|
|
202
263
|
[0.11.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/solid@0.11.0
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
```
|
package/README.md
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Welcome to Ark UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ark UI is a headless, open-source UI library with over 30+ components designed for building reusable, scalable Design Systems. It supports a wide range of JavaScript frameworks, offering dedciated packages for each supported framework.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Supported Frameworks
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
7
|
+
Ark UI is available for the following JavaScript frameworks:
|
|
8
|
+
|
|
9
|
+
- **React**: `@ark-ui/react`
|
|
10
|
+
- **Solid**: `@ark-ui/solid`
|
|
11
|
+
- **Vue**: `@ark-ui/vue`
|
|
12
12
|
|
|
13
13
|
## Available Components
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
20
|
-
- [
|
|
21
|
-
- [
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [
|
|
27
|
-
- [
|
|
28
|
-
- [
|
|
29
|
-
- [
|
|
30
|
-
- [
|
|
31
|
-
- [
|
|
32
|
-
- [
|
|
33
|
-
- [
|
|
34
|
-
- [
|
|
35
|
-
- [
|
|
36
|
-
- [
|
|
37
|
-
- [
|
|
38
|
-
- [
|
|
39
|
-
- [
|
|
40
|
-
- [
|
|
41
|
-
- [
|
|
42
|
-
- [
|
|
43
|
-
- [
|
|
44
|
-
- [Tooltip](https://ark-ui.com/docs/solid/components/tooltip)
|
|
15
|
+
- [Accordion](https://ark-ui.com/docs/components/accordion)
|
|
16
|
+
- [Avatar](https://ark-ui.com/docs/components/avatar)
|
|
17
|
+
- [Carousel](https://ark-ui.com/docs/components/carousel)
|
|
18
|
+
- [Checkbox](https://ark-ui.com/docs/components/checkbox)
|
|
19
|
+
- [Color Picker](https://ark-ui.com/docs/components/color-picker)
|
|
20
|
+
- [Combobox](https://ark-ui.com/docs/components/combobox)
|
|
21
|
+
- [Date Picker](https://ark-ui.com/docs/components/date-picker)
|
|
22
|
+
- [Dialog](https://ark-ui.com/docs/components/dialog)
|
|
23
|
+
- [Editable](https://ark-ui.com/docs/components/editable)
|
|
24
|
+
- [File Upload](https://ark-ui.com/docs/components/file-upload)
|
|
25
|
+
- [Hover Card](https://ark-ui.com/docs/components/hover-card)
|
|
26
|
+
- [Menu](https://ark-ui.com/docs/components/menu)
|
|
27
|
+
- [Number Input](https://ark-ui.com/docs/components/number-input)
|
|
28
|
+
- [Pagination](https://ark-ui.com/docs/components/pagination)
|
|
29
|
+
- [Pin Input](https://ark-ui.com/docs/components/pin-input)
|
|
30
|
+
- [Popover](https://ark-ui.com/docs/components/popover)
|
|
31
|
+
- [Radio Group](https://ark-ui.com/docs/components/radio-group)
|
|
32
|
+
- [Range Slider](https://ark-ui.com/docs/components/slider)
|
|
33
|
+
- [Rating Group](https://ark-ui.com/docs/components/rating-group)
|
|
34
|
+
- [Segment Group](https://ark-ui.com/docs/components/segment-group)
|
|
35
|
+
- [Select](https://ark-ui.com/docs/components/select)
|
|
36
|
+
- [Slider](https://ark-ui.com/docs/components/slider)
|
|
37
|
+
- [Splitter](https://ark-ui.com/docs/components/splitter)
|
|
38
|
+
- [Switch](https://ark-ui.com/docs/components/switch)
|
|
39
|
+
- [Tabs](https://ark-ui.com/docs/components/tabs)
|
|
40
|
+
- [Tags Input](https://ark-ui.com/docs/components/tags-input)
|
|
41
|
+
- [Toast](https://ark-ui.com/docs/components/toast)
|
|
42
|
+
- [Toggle Group](https://ark-ui.com/docs/components/toggle-group)
|
|
43
|
+
- [Tooltip](https://ark-ui.com/docs/components/tooltip)
|
|
45
44
|
|
|
46
45
|
## Installation
|
|
47
46
|
|
|
@@ -62,31 +61,34 @@ yarn add @ark-ui/solid
|
|
|
62
61
|
To use a component from `@ark-ui/solid`, import it and include it in your application:
|
|
63
62
|
|
|
64
63
|
```tsx
|
|
65
|
-
import {
|
|
66
|
-
Slider,
|
|
67
|
-
SliderControl,
|
|
68
|
-
SliderLabel,
|
|
69
|
-
SliderOutput,
|
|
70
|
-
SliderRange,
|
|
71
|
-
SliderThumb,
|
|
72
|
-
SliderTrack,
|
|
73
|
-
} from '@ark-ui/solid'
|
|
64
|
+
import { Slider, type SliderProps } from '@ark-ui/solid'
|
|
74
65
|
import { createSignal } from 'solid-js'
|
|
75
66
|
|
|
76
|
-
export const MySlider = () => {
|
|
77
|
-
const [value, setValue] = createSignal(
|
|
67
|
+
export const MySlider = (props: SliderProps) => {
|
|
68
|
+
const [value, setValue] = createSignal([42])
|
|
78
69
|
|
|
79
70
|
return (
|
|
80
|
-
<Slider
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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>
|
|
90
92
|
)
|
|
91
93
|
}
|
|
92
94
|
```
|
|
@@ -95,10 +97,14 @@ export const MySlider = () => {
|
|
|
95
97
|
|
|
96
98
|
For more detailed documentation and examples, please visit the [official documentation](https://ark-ui.com/).
|
|
97
99
|
|
|
100
|
+
## Roadmap
|
|
101
|
+
|
|
102
|
+
You can request, vote for, and check upcoming features on our [roadmap](https://ark-ui.canny.io/).
|
|
103
|
+
|
|
98
104
|
## Contribution
|
|
99
105
|
|
|
100
|
-
We welcome contributions to
|
|
106
|
+
We welcome contributions to Ark UI. Please read our [contributing guidelines](https://github.com/chakra-ui/ark/blob/main/CONTRIBUTING.md) for more information on how to contribute.
|
|
101
107
|
|
|
102
|
-
##
|
|
108
|
+
## License
|
|
103
109
|
|
|
104
110
|
This project is licensed under the terms of the [MIT license](https://github.com/chakra-ui/ark/blob/main/LICENSE).
|