@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.
Files changed (104) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +67 -61
  3. package/cjs/index.js +331 -99
  4. package/cjs/index.js.map +1 -1
  5. package/esm/index.js +315 -100
  6. package/esm/index.js.map +1 -1
  7. package/package.json +55 -50
  8. package/source/color-picker/color-picker-format-select.jsx +13 -0
  9. package/source/color-picker/color-picker-format-trigger.jsx +8 -0
  10. package/source/color-picker/color-picker-swatch-context.js +5 -0
  11. package/source/color-picker/color-picker-swatch-indicator.jsx +10 -0
  12. package/source/color-picker/color-picker-swatch-trigger.jsx +4 -1
  13. package/source/color-picker/color-picker-swatch.jsx +6 -3
  14. package/source/color-picker/color-picker.jsx +3 -1
  15. package/source/color-picker/index.js +7 -1
  16. package/source/date-picker/date-picker.jsx +1 -1
  17. package/source/dialog/dialog-close-trigger.jsx +1 -1
  18. package/source/editable/editable-area.jsx +2 -2
  19. package/source/editable/editable-cancel-trigger.jsx +2 -2
  20. package/source/editable/editable-control.jsx +2 -2
  21. package/source/editable/editable-edit-trigger.jsx +2 -2
  22. package/source/editable/editable-input.jsx +2 -2
  23. package/source/editable/editable-label.jsx +2 -2
  24. package/source/editable/editable-preview.jsx +2 -2
  25. package/source/editable/editable-submit-trigger.jsx +2 -2
  26. package/source/editable/editable.jsx +5 -7
  27. package/source/file-upload/file-upload-context.js +5 -0
  28. package/source/file-upload/file-upload-dropzone.jsx +11 -0
  29. package/source/file-upload/file-upload-item-context.js +5 -0
  30. package/source/file-upload/file-upload-item-delete-trigger.jsx +10 -0
  31. package/source/file-upload/file-upload-item-group.jsx +10 -0
  32. package/source/file-upload/file-upload-item-name.jsx +12 -0
  33. package/source/file-upload/file-upload-item-preview-image.jsx +13 -0
  34. package/source/file-upload/file-upload-item-preview.jsx +12 -0
  35. package/source/file-upload/file-upload-item-size-text.jsx +12 -0
  36. package/source/file-upload/file-upload-item.jsx +15 -0
  37. package/source/file-upload/file-upload-label.jsx +8 -0
  38. package/source/file-upload/file-upload-trigger.jsx +8 -0
  39. package/source/file-upload/file-upload.jsx +34 -0
  40. package/source/file-upload/index.js +26 -0
  41. package/source/file-upload/use-file-upload.js +10 -0
  42. package/source/index.jsx +1 -0
  43. package/source/number-input/index.js +1 -1
  44. package/source/number-input/number-input.jsx +4 -2
  45. package/source/pagination/pagination-ellipsis.jsx +2 -2
  46. package/source/pagination/pagination.jsx +2 -4
  47. package/source/pin-input/index.js +1 -1
  48. package/source/pin-input/pin-input.jsx +2 -2
  49. package/source/radio-group/radio-group-item-context.js +2 -2
  50. package/source/radio-group/radio-group-item.jsx +9 -6
  51. package/source/rating-group/rating-group-control.jsx +1 -1
  52. package/source/rating-group/rating-group-item.jsx +2 -2
  53. package/source/rating-group/rating-group.jsx +2 -2
  54. package/source/segment-group/segment-group-item-context.js +2 -2
  55. package/source/segment-group/segment-group-item.jsx +9 -6
  56. package/source/select/select-indicator.jsx +1 -1
  57. package/source/select/select-item-group.jsx +2 -2
  58. package/source/select/select.jsx +2 -2
  59. package/source/switch/switch-label.jsx +2 -2
  60. package/source/switch/switch-thumb.jsx +2 -2
  61. package/source/switch/switch.jsx +2 -2
  62. package/source/toast/create-toaster.jsx +9 -10
  63. package/source/toast/index.js +5 -3
  64. package/source/toast/toast-group.jsx +4 -0
  65. package/types/color-picker/color-picker-format-select.d.ts +4 -0
  66. package/types/color-picker/color-picker-format-trigger.d.ts +4 -0
  67. package/types/color-picker/color-picker-swatch-context.d.ts +4 -0
  68. package/types/color-picker/color-picker-swatch-indicator.d.ts +4 -0
  69. package/types/color-picker/color-picker-swatch-trigger.d.ts +1 -5
  70. package/types/color-picker/color-picker-transparency-grid.d.ts +2 -5
  71. package/types/color-picker/index.d.ts +10 -3
  72. package/types/color-picker/use-color-picker.d.ts +3 -0
  73. package/types/file-upload/file-upload-context.d.ts +4 -0
  74. package/types/file-upload/file-upload-dropzone.d.ts +4 -0
  75. package/types/file-upload/file-upload-item-context.d.ts +4 -0
  76. package/types/file-upload/file-upload-item-delete-trigger.d.ts +4 -0
  77. package/types/file-upload/file-upload-item-group.d.ts +8 -0
  78. package/types/file-upload/file-upload-item-name.d.ts +4 -0
  79. package/types/file-upload/file-upload-item-preview-image.d.ts +4 -0
  80. package/types/file-upload/file-upload-item-preview.d.ts +9 -0
  81. package/types/file-upload/file-upload-item-size-text.d.ts +4 -0
  82. package/types/file-upload/file-upload-item.d.ts +6 -0
  83. package/types/file-upload/file-upload-label.d.ts +4 -0
  84. package/types/file-upload/file-upload-trigger.d.ts +4 -0
  85. package/types/file-upload/file-upload.d.ts +9 -0
  86. package/types/file-upload/index.d.ts +27 -0
  87. package/types/file-upload/use-file-upload.d.ts +9 -0
  88. package/types/index.d.ts +1 -0
  89. package/types/number-input/index.d.ts +1 -1
  90. package/types/number-input/number-input.d.ts +6 -3
  91. package/types/pin-input/index.d.ts +1 -1
  92. package/types/radio-group/radio-group-item-context.d.ts +1 -1
  93. package/types/radio-group/radio-group-item.d.ts +6 -3
  94. package/types/rating-group/rating-group-item-context.d.ts +2 -3
  95. package/types/segment-group/segment-group-item-context.d.ts +3 -14
  96. package/types/segment-group/segment-group-item.d.ts +6 -2
  97. package/types/toast/create-toaster.d.ts +3 -2
  98. package/types/toast/index.d.ts +6 -4
  99. package/types/toast/toast-context.d.ts +7 -2
  100. package/types/toast/toast-group.d.ts +4 -0
  101. /package/source/number-input/{number-input-field.jsx → number-input-input.jsx} +0 -0
  102. /package/source/pin-input/{pin-input-field.jsx → pin-input-input.jsx} +0 -0
  103. /package/types/number-input/{number-input-field.d.ts → number-input-input.d.ts} +0 -0
  104. /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
- # @ark-ui/solid
1
+ # Welcome to Ark UI
2
2
 
3
- `@ark-ui/solid` is an open-source UI component library designed to make building high-quality, accessible web applications easier. The library focuses on providing low-level UI components with an emphasis on accessibility, customization, and developer experience.
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
- ## Key Features
5
+ ## Supported Frameworks
6
6
 
7
- - **Accessible**: Components in Ark UI are designed with accessibility in mind, adhering to WAI-ARIA design patterns and handling implementation details such as aria and role attributes, focus management, and keyboard navigation.
8
- - **Headless**: Components are shipped without styles, giving developers full control over styling.
9
- - **Customizable**: The open component architecture allows for customization and customization, providing granular access to each component part.
10
- - **Powered by state machines**: Predictable, simplified, and robust component behavior.
11
- - **Developer Experience**: The library provides a fully-typed API with a consistent and predictable experience.
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
- At the moment, `@ark-ui/solid`offers the following components:
16
-
17
- - [Accordion](https://ark-ui.com/docs/solid/components/accordion)
18
- - [Avatar](https://ark-ui.com/docs/solid/components/avatar)
19
- - [Carousel](https://ark-ui.com/docs/solid/components/carousel)
20
- - [Checkbox](https://ark-ui.com/docs/solid/components/checkbox)
21
- - [Color Picker](https://ark-ui.com/docs/solid/components/color-picker)
22
- - [Combobox](https://ark-ui.com/docs/solid/components/combobox)
23
- - [Date Picker](https://ark-ui.com/docs/solid/components/date-picker)
24
- - [Dialog](https://ark-ui.com/docs/solid/components/dialog)
25
- - [Editable](https://ark-ui.com/docs/solid/components/editable)
26
- - [Hover Card](https://ark-ui.com/docs/solid/components/hover-card)
27
- - [Menu](https://ark-ui.com/docs/solid/components/menu)
28
- - [Number Input](https://ark-ui.com/docs/solid/components/number-input)
29
- - [Pagination](https://ark-ui.com/docs/solid/components/pagination)
30
- - [Pin Input](https://ark-ui.com/docs/solid/components/pin-input)
31
- - [Popover](https://ark-ui.com/docs/solid/components/popover)
32
- - [Pressable](https://ark-ui.com/docs/solid/components/pressable)
33
- - [Radio Group](https://ark-ui.com/docs/solid/components/radio-group)
34
- - [Range Slider](https://ark-ui.com/docs/solid/components/range-slider)
35
- - [Rating Group](https://ark-ui.com/docs/solid/components/rating-group)
36
- - [Segment Group](https://ark-ui.com/docs/solid/components/segment-group)
37
- - [Select](https://ark-ui.com/docs/solid/components/select)
38
- - [Slider](https://ark-ui.com/docs/solid/components/slider)
39
- - [Splitter](https://ark-ui.com/docs/solid/components/splitter)
40
- - [Switch](https://ark-ui.com/docs/solid/components/switch)
41
- - [Tabs](https://ark-ui.com/docs/solid/components/tabs)
42
- - [Tags Input](https://ark-ui.com/docs/solid/components/tags-input)
43
- - [Toast](https://ark-ui.com/docs/solid/components/toast)
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(30)
67
+ export const MySlider = (props: SliderProps) => {
68
+ const [value, setValue] = createSignal([42])
78
69
 
79
70
  return (
80
- <Slider min={-50} max={50} value={value()} onChange={(e) => setValue(e.value)}>
81
- <SliderLabel>Label</SliderLabel>
82
- <SliderOutput>{value}</SliderOutput>
83
- <SliderControl>
84
- <SliderTrack>
85
- <SliderRange />
86
- </SliderTrack>
87
- <SliderThumb />
88
- </SliderControl>
89
- </Slider>
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 `@ark-ui/solid`. Please read our [contributing guidelines](https://github.com/chakra-ui/ark/blob/main/CONTRIBUTING.md) for more information on how to contribute.
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
- ## Licence
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).