@ark-ui/react 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 +34 -0
- package/README.md +67 -61
- package/accordion/accordion.stories.d.ts +0 -1
- package/color-picker/color-picker-format-select.cjs +21 -0
- package/color-picker/color-picker-format-select.d.ts +6 -0
- package/color-picker/color-picker-format-select.mjs +17 -0
- package/color-picker/color-picker-format-trigger.cjs +19 -0
- package/color-picker/color-picker-format-trigger.d.ts +6 -0
- package/color-picker/color-picker-format-trigger.mjs +15 -0
- package/color-picker/color-picker-swatch-context.cjs +15 -0
- package/color-picker/color-picker-swatch-context.d.ts +6 -0
- package/color-picker/color-picker-swatch-context.mjs +10 -0
- package/color-picker/color-picker-swatch-indicator.cjs +21 -0
- package/color-picker/color-picker-swatch-indicator.d.ts +6 -0
- package/color-picker/color-picker-swatch-indicator.mjs +17 -0
- package/color-picker/color-picker-swatch-trigger.cjs +4 -1
- package/color-picker/color-picker-swatch-trigger.d.ts +1 -5
- package/color-picker/color-picker-swatch-trigger.mjs +4 -1
- package/color-picker/color-picker-swatch.cjs +4 -3
- package/color-picker/color-picker-swatch.mjs +4 -3
- package/color-picker/color-picker-transparency-grid.d.ts +2 -5
- package/color-picker/color-picker.cjs +4 -2
- package/color-picker/color-picker.mjs +4 -2
- package/color-picker/index.cjs +10 -0
- package/color-picker/index.d.ts +10 -3
- package/color-picker/index.mjs +7 -1
- package/color-picker/use-color-picker.cjs +1 -1
- package/color-picker/use-color-picker.d.ts +4 -1
- package/color-picker/use-color-picker.mjs +1 -1
- package/combobox/combobox.cjs +1 -1
- package/combobox/combobox.d.ts +1 -1
- package/combobox/combobox.mjs +1 -1
- package/date-picker/date-picker.cjs +2 -2
- package/date-picker/date-picker.mjs +2 -2
- package/date-picker/date-picker.stories.d.ts +1 -0
- package/dialog/dialog-backdrop.cjs +1 -1
- package/dialog/dialog-backdrop.mjs +1 -1
- package/dialog/dialog.cjs +2 -1
- package/dialog/dialog.mjs +2 -1
- package/editable/editable.cjs +2 -2
- package/editable/editable.mjs +2 -2
- package/factory.cjs +1 -2
- package/factory.d.ts +1 -1
- package/factory.mjs +2 -3
- package/factory.test.d.ts +1 -0
- package/file-upload/file-upload-context.cjs +15 -0
- package/file-upload/file-upload-context.d.ts +6 -0
- package/file-upload/file-upload-context.mjs +10 -0
- package/file-upload/file-upload-dropzone.cjs +24 -0
- package/file-upload/file-upload-dropzone.d.ts +6 -0
- package/file-upload/file-upload-dropzone.mjs +20 -0
- package/file-upload/file-upload-item-context.cjs +15 -0
- package/file-upload/file-upload-item-context.d.ts +6 -0
- package/file-upload/file-upload-item-context.mjs +10 -0
- package/file-upload/file-upload-item-delete-trigger.cjs +21 -0
- package/file-upload/file-upload-item-delete-trigger.d.ts +6 -0
- package/file-upload/file-upload-item-delete-trigger.mjs +17 -0
- package/file-upload/file-upload-item-group.cjs +24 -0
- package/file-upload/file-upload-item-group.d.ts +8 -0
- package/file-upload/file-upload-item-group.mjs +20 -0
- package/file-upload/file-upload-item-name.cjs +24 -0
- package/file-upload/file-upload-item-name.d.ts +6 -0
- package/file-upload/file-upload-item-name.mjs +20 -0
- package/file-upload/file-upload-item-preview-image.cjs +25 -0
- package/file-upload/file-upload-item-preview-image.d.ts +6 -0
- package/file-upload/file-upload-item-preview-image.mjs +21 -0
- package/file-upload/file-upload-item-preview.cjs +25 -0
- package/file-upload/file-upload-item-preview.d.ts +11 -0
- package/file-upload/file-upload-item-preview.mjs +21 -0
- package/file-upload/file-upload-item-size-text.cjs +24 -0
- package/file-upload/file-upload-item-size-text.d.ts +6 -0
- package/file-upload/file-upload-item-size-text.mjs +20 -0
- package/file-upload/file-upload-item.cjs +24 -0
- package/file-upload/file-upload-item.d.ts +8 -0
- package/file-upload/file-upload-item.mjs +20 -0
- package/file-upload/file-upload-label.cjs +19 -0
- package/file-upload/file-upload-label.d.ts +6 -0
- package/file-upload/file-upload-label.mjs +15 -0
- package/file-upload/file-upload-trigger.cjs +21 -0
- package/file-upload/file-upload-trigger.d.ts +6 -0
- package/file-upload/file-upload-trigger.mjs +17 -0
- package/file-upload/file-upload.cjs +46 -0
- package/file-upload/file-upload.d.ts +9 -0
- package/file-upload/file-upload.mjs +42 -0
- package/file-upload/file-upload.stories.d.ts +7 -0
- package/file-upload/file-upload.test.d.ts +1 -0
- package/file-upload/index.cjs +43 -0
- package/file-upload/index.d.ts +29 -0
- package/file-upload/index.mjs +29 -0
- package/file-upload/use-file-upload.cjs +48 -0
- package/file-upload/use-file-upload.d.ts +8 -0
- package/file-upload/use-file-upload.mjs +25 -0
- package/hover-card/hover-card.cjs +2 -1
- package/hover-card/hover-card.mjs +2 -1
- package/index.cjs +74 -42
- package/index.d.ts +1 -0
- package/index.mjs +18 -2
- package/menu/menu.cjs +4 -3
- package/menu/menu.mjs +2 -1
- package/number-input/index.cjs +3 -3
- package/number-input/index.d.ts +1 -1
- package/number-input/index.mjs +1 -1
- package/number-input/number-input.cjs +5 -3
- package/number-input/number-input.d.ts +5 -4
- package/number-input/number-input.mjs +5 -3
- package/number-input/number-input.stories.d.ts +1 -0
- package/package.json +72 -57
- package/pagination/pagination-item.cjs +1 -1
- package/pagination/pagination-item.mjs +1 -1
- package/pagination/pagination.cjs +2 -2
- package/pagination/pagination.mjs +2 -2
- package/pin-input/index.cjs +3 -3
- package/pin-input/index.d.ts +1 -1
- package/pin-input/index.mjs +1 -1
- package/pin-input/pin-input.cjs +2 -2
- package/pin-input/pin-input.mjs +2 -2
- package/popover/popover.cjs +2 -1
- package/popover/popover.mjs +2 -1
- package/portal.cjs +2 -1
- package/portal.d.ts +2 -2
- package/portal.mjs +2 -1
- package/radio-group/radio-group-indicator.cjs +1 -2
- package/radio-group/radio-group-indicator.mjs +1 -2
- package/radio-group/radio-group-item.d.ts +1 -1
- package/radio-group/radio-group.cjs +2 -2
- package/radio-group/radio-group.mjs +2 -2
- package/radio-group/radio-group.stories.d.ts +1 -1
- package/rating-group/rating-group-control.cjs +2 -2
- package/rating-group/rating-group-control.mjs +2 -2
- package/rating-group/rating-group-item-context.d.ts +2 -2
- package/rating-group/rating-group-item.cjs +5 -4
- package/rating-group/rating-group-item.mjs +5 -4
- package/rating-group/rating-group.cjs +2 -2
- package/rating-group/rating-group.mjs +2 -2
- package/rating-group/use-rating-group.cjs +4 -4
- package/rating-group/use-rating-group.d.ts +4 -4
- package/rating-group/use-rating-group.mjs +3 -3
- package/segment-group/segment-group-indicator.cjs +2 -2
- package/segment-group/segment-group-indicator.mjs +2 -2
- package/segment-group/segment-group-item-context.d.ts +1 -13
- package/segment-group/segment-group-item-control.cjs +2 -2
- package/segment-group/segment-group-item-control.mjs +2 -2
- package/segment-group/segment-group-item-text.cjs +2 -2
- package/segment-group/segment-group-item-text.mjs +2 -2
- package/segment-group/segment-group-item.cjs +3 -3
- package/segment-group/segment-group-item.d.ts +3 -2
- package/segment-group/segment-group-item.mjs +3 -3
- package/segment-group/segment-group-label.cjs +2 -2
- package/segment-group/segment-group-label.mjs +2 -2
- package/segment-group/segment-group.cjs +4 -4
- package/segment-group/segment-group.mjs +4 -4
- package/select/select-item-group.cjs +2 -2
- package/select/select-item-group.mjs +2 -2
- package/select/select.cjs +1 -1
- package/select/select.d.ts +1 -1
- package/select/select.mjs +1 -1
- package/select/select.stories.d.ts +1 -0
- package/slider/slider.stories.d.ts +1 -1
- package/switch/switch.cjs +2 -2
- package/switch/switch.mjs +2 -2
- package/toast/create-toaster.cjs +2 -2
- package/toast/create-toaster.d.ts +1 -1
- package/toast/create-toaster.mjs +2 -2
- package/toast/index.cjs +5 -2
- package/toast/index.d.ts +6 -4
- package/toast/index.mjs +5 -3
- package/toast/toast-group.cjs +15 -0
- package/toast/toast-group.d.ts +6 -0
- package/toast/toast-group.mjs +11 -0
- package/tooltip/tooltip.cjs +2 -1
- package/tooltip/tooltip.mjs +2 -1
- package/use-is-server.cjs +16 -0
- package/use-is-server.d.ts +1 -0
- package/use-is-server.mjs +12 -0
- package/segment-group/segment-group.anatomy.cjs +0 -10
- package/segment-group/segment-group.anatomy.d.ts +0 -2
- package/segment-group/segment-group.anatomy.mjs +0 -6
- /package/number-input/{number-input-field.cjs → number-input-input.cjs} +0 -0
- /package/number-input/{number-input-field.d.ts → number-input-input.d.ts} +0 -0
- /package/number-input/{number-input-field.mjs → number-input-input.mjs} +0 -0
- /package/pin-input/{pin-input-field.cjs → pin-input-input.cjs} +0 -0
- /package/pin-input/{pin-input-field.d.ts → pin-input-input.d.ts} +0 -0
- /package/pin-input/{pin-input-field.mjs → pin-input-input.mjs} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accordion",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"dialog",
|
|
14
14
|
"editable",
|
|
15
15
|
"environment",
|
|
16
|
+
"file upload",
|
|
16
17
|
"hover card",
|
|
17
18
|
"menu",
|
|
18
19
|
"number input",
|
|
@@ -59,74 +60,78 @@
|
|
|
59
60
|
"release-it": "release-it --config ../../../release-it.json"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
|
-
"@ark-ui/anatomy": "1.
|
|
63
|
-
"@zag-js/accordion": "0.
|
|
64
|
-
"@zag-js/avatar": "0.
|
|
65
|
-
"@zag-js/carousel": "0.
|
|
66
|
-
"@zag-js/checkbox": "0.
|
|
67
|
-
"@zag-js/color-picker": "0.
|
|
68
|
-
"@zag-js/color-utils": "0.
|
|
69
|
-
"@zag-js/combobox": "0.
|
|
70
|
-
"@zag-js/core": "0.
|
|
71
|
-
"@zag-js/date-picker": "0.
|
|
72
|
-
"@zag-js/date-utils": "0.
|
|
73
|
-
"@zag-js/dialog": "0.
|
|
74
|
-
"@zag-js/editable": "0.
|
|
75
|
-
"@zag-js/
|
|
76
|
-
"@zag-js/
|
|
77
|
-
"@zag-js/
|
|
78
|
-
"@zag-js/
|
|
79
|
-
"@zag-js/
|
|
80
|
-
"@zag-js/
|
|
81
|
-
"@zag-js/
|
|
82
|
-
"@zag-js/
|
|
83
|
-
"@zag-js/
|
|
84
|
-
"@zag-js/
|
|
85
|
-
"@zag-js/
|
|
86
|
-
"@zag-js/
|
|
87
|
-
"@zag-js/
|
|
88
|
-
"@zag-js/
|
|
89
|
-
"@zag-js/
|
|
90
|
-
"@zag-js/
|
|
91
|
-
"@zag-js/
|
|
92
|
-
"@zag-js/
|
|
93
|
-
"@zag-js/
|
|
94
|
-
"@zag-js/
|
|
63
|
+
"@ark-ui/anatomy": "1.2.0",
|
|
64
|
+
"@zag-js/accordion": "0.31.1",
|
|
65
|
+
"@zag-js/avatar": "0.31.1",
|
|
66
|
+
"@zag-js/carousel": "0.31.1",
|
|
67
|
+
"@zag-js/checkbox": "0.31.1",
|
|
68
|
+
"@zag-js/color-picker": "0.31.1",
|
|
69
|
+
"@zag-js/color-utils": "0.31.1",
|
|
70
|
+
"@zag-js/combobox": "0.31.1",
|
|
71
|
+
"@zag-js/core": "0.31.1",
|
|
72
|
+
"@zag-js/date-picker": "0.31.1",
|
|
73
|
+
"@zag-js/date-utils": "0.31.1",
|
|
74
|
+
"@zag-js/dialog": "0.31.1",
|
|
75
|
+
"@zag-js/editable": "0.31.1",
|
|
76
|
+
"@zag-js/file-upload": "0.31.1",
|
|
77
|
+
"@zag-js/hover-card": "0.31.1",
|
|
78
|
+
"@zag-js/menu": "0.31.1",
|
|
79
|
+
"@zag-js/number-input": "0.31.1",
|
|
80
|
+
"@zag-js/pagination": "0.31.1",
|
|
81
|
+
"@zag-js/pin-input": "0.31.1",
|
|
82
|
+
"@zag-js/popover": "0.31.1",
|
|
83
|
+
"@zag-js/presence": "0.31.1",
|
|
84
|
+
"@zag-js/radio-group": "0.31.1",
|
|
85
|
+
"@zag-js/rating-group": "0.31.1",
|
|
86
|
+
"@zag-js/react": "0.31.1",
|
|
87
|
+
"@zag-js/select": "0.31.1",
|
|
88
|
+
"@zag-js/slider": "0.31.1",
|
|
89
|
+
"@zag-js/splitter": "0.31.1",
|
|
90
|
+
"@zag-js/switch": "0.31.1",
|
|
91
|
+
"@zag-js/tabs": "0.31.1",
|
|
92
|
+
"@zag-js/tags-input": "0.31.1",
|
|
93
|
+
"@zag-js/toast": "0.31.1",
|
|
94
|
+
"@zag-js/toggle-group": "0.31.1",
|
|
95
|
+
"@zag-js/tooltip": "0.31.1",
|
|
96
|
+
"@zag-js/types": "0.31.1"
|
|
95
97
|
},
|
|
96
98
|
"devDependencies": {
|
|
97
|
-
"@release-it/keep-a-changelog": "
|
|
98
|
-
"@storybook/addon-a11y": "7.
|
|
99
|
-
"@storybook/addon-essentials": "7.
|
|
100
|
-
"@storybook/addons": "7.
|
|
101
|
-
"@storybook/react": "7.
|
|
102
|
-
"@storybook/react-vite": "7.
|
|
99
|
+
"@release-it/keep-a-changelog": "5.0.0",
|
|
100
|
+
"@storybook/addon-a11y": "7.6.4",
|
|
101
|
+
"@storybook/addon-essentials": "7.6.4",
|
|
102
|
+
"@storybook/addons": "7.6.4",
|
|
103
|
+
"@storybook/react": "7.6.4",
|
|
104
|
+
"@storybook/react-vite": "7.6.4",
|
|
103
105
|
"@testing-library/dom": "9.3.3",
|
|
104
|
-
"@testing-library/jest-dom": "6.1.
|
|
105
|
-
"@testing-library/react": "14.1.
|
|
106
|
+
"@testing-library/jest-dom": "6.1.5",
|
|
107
|
+
"@testing-library/react": "14.1.2",
|
|
106
108
|
"@testing-library/user-event": "14.5.1",
|
|
107
|
-
"@types/jsdom": "21.1.
|
|
108
|
-
"@types/react": "18.2.
|
|
109
|
-
"@types/react-dom": "18.2.
|
|
109
|
+
"@types/jsdom": "21.1.6",
|
|
110
|
+
"@types/react": "18.2.42",
|
|
111
|
+
"@types/react-dom": "18.2.17",
|
|
110
112
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
111
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
112
|
-
"@typescript-eslint/parser": "6.
|
|
113
|
-
"@vitejs/plugin-react": "4.
|
|
113
|
+
"@typescript-eslint/eslint-plugin": "6.14.0",
|
|
114
|
+
"@typescript-eslint/parser": "6.14.0",
|
|
115
|
+
"@vitejs/plugin-react": "4.2.1",
|
|
114
116
|
"@vitest/coverage-v8": "0.34.6",
|
|
115
|
-
"eslint": "8.
|
|
117
|
+
"eslint": "8.55.0",
|
|
118
|
+
"eslint-plugin-jest-dom": "5.1.0",
|
|
116
119
|
"eslint-plugin-react": "7.33.2",
|
|
117
120
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
+
"eslint-plugin-testing-library": "6.2.0",
|
|
122
|
+
"globby": "14.0.0",
|
|
123
|
+
"jsdom": "23.0.1",
|
|
124
|
+
"lucide-react": "0.294.0",
|
|
121
125
|
"react": "18.2.0",
|
|
122
126
|
"react-dom": "18.2.0",
|
|
123
127
|
"react-frame-component": "5.2.6",
|
|
124
|
-
"
|
|
128
|
+
"react-hook-form": "7.49.2",
|
|
129
|
+
"release-it": "17.0.1",
|
|
125
130
|
"resize-observer-polyfill": "1.5.1",
|
|
126
|
-
"storybook": "7.
|
|
127
|
-
"typescript": "5.
|
|
128
|
-
"vite": "
|
|
129
|
-
"vite-plugin-dts": "3.6.
|
|
131
|
+
"storybook": "7.6.4",
|
|
132
|
+
"typescript": "5.3.3",
|
|
133
|
+
"vite": "5.0.8",
|
|
134
|
+
"vite-plugin-dts": "3.6.4",
|
|
130
135
|
"vitest": "0.34.6"
|
|
131
136
|
},
|
|
132
137
|
"peerDependencies": {
|
|
@@ -195,6 +200,11 @@
|
|
|
195
200
|
"import": "./environment/index.mjs",
|
|
196
201
|
"require": "./environment/index.cjs"
|
|
197
202
|
},
|
|
203
|
+
"./file-upload": {
|
|
204
|
+
"types": "./file-upload/index.d.ts",
|
|
205
|
+
"import": "./file-upload/index.mjs",
|
|
206
|
+
"require": "./file-upload/index.cjs"
|
|
207
|
+
},
|
|
198
208
|
"./hover-card": {
|
|
199
209
|
"types": "./hover-card/index.d.ts",
|
|
200
210
|
"import": "./hover-card/index.mjs",
|
|
@@ -290,6 +300,11 @@
|
|
|
290
300
|
"import": "./tooltip/index.mjs",
|
|
291
301
|
"require": "./tooltip/index.cjs"
|
|
292
302
|
},
|
|
303
|
+
"./factory": {
|
|
304
|
+
"types": "./factory/factory.d.ts",
|
|
305
|
+
"import": "./factory.mjs",
|
|
306
|
+
"require": "./factory.cjs"
|
|
307
|
+
},
|
|
293
308
|
"./package.json": "./package.json"
|
|
294
309
|
}
|
|
295
310
|
}
|
|
@@ -11,7 +11,7 @@ const factory = require('../factory.cjs');
|
|
|
11
11
|
const paginationContext = require('./pagination-context.cjs');
|
|
12
12
|
|
|
13
13
|
const PaginationItem = react.forwardRef((props, ref) => {
|
|
14
|
-
const [itemProps, localProps] = createSplitProps.createSplitProps()(props, ["
|
|
14
|
+
const [itemProps, localProps] = createSplitProps.createSplitProps()(props, ["value", "type"]);
|
|
15
15
|
const api = paginationContext.usePaginationContext();
|
|
16
16
|
const mergedProps = react$1.mergeProps(api.getItemProps(itemProps), localProps);
|
|
17
17
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
@@ -7,7 +7,7 @@ import { ark } from '../factory.mjs';
|
|
|
7
7
|
import { usePaginationContext } from './pagination-context.mjs';
|
|
8
8
|
|
|
9
9
|
const PaginationItem = forwardRef((props, ref) => {
|
|
10
|
-
const [itemProps, localProps] = createSplitProps()(props, ["
|
|
10
|
+
const [itemProps, localProps] = createSplitProps()(props, ["value", "type"]);
|
|
11
11
|
const api = usePaginationContext();
|
|
12
12
|
const mergedProps = mergeProps(api.getItemProps(itemProps), localProps);
|
|
13
13
|
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
@@ -13,7 +13,7 @@ const paginationContext = require('./pagination-context.cjs');
|
|
|
13
13
|
const usePagination = require('./use-pagination.cjs');
|
|
14
14
|
|
|
15
15
|
const Pagination = react.forwardRef((props, ref) => {
|
|
16
|
-
const [paginationProps, { children, ...
|
|
16
|
+
const [paginationProps, { children, ...localProps }] = createSplitProps.createSplitProps()(
|
|
17
17
|
props,
|
|
18
18
|
[
|
|
19
19
|
"count",
|
|
@@ -31,8 +31,8 @@ const Pagination = react.forwardRef((props, ref) => {
|
|
|
31
31
|
]
|
|
32
32
|
);
|
|
33
33
|
const api = usePagination.usePagination(paginationProps);
|
|
34
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
34
35
|
const view = runIfFn.runIfFn(children, api);
|
|
35
|
-
const mergedProps = react$1.mergeProps(api.rootProps, navProps);
|
|
36
36
|
return /* @__PURE__ */ jsxRuntime.jsx(paginationContext.PaginationProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.nav, { ...mergedProps, ref, children: view }) });
|
|
37
37
|
});
|
|
38
38
|
Pagination.displayName = "Pagination";
|
|
@@ -9,7 +9,7 @@ import { PaginationProvider } from './pagination-context.mjs';
|
|
|
9
9
|
import { usePagination } from './use-pagination.mjs';
|
|
10
10
|
|
|
11
11
|
const Pagination = forwardRef((props, ref) => {
|
|
12
|
-
const [paginationProps, { children, ...
|
|
12
|
+
const [paginationProps, { children, ...localProps }] = createSplitProps()(
|
|
13
13
|
props,
|
|
14
14
|
[
|
|
15
15
|
"count",
|
|
@@ -27,8 +27,8 @@ const Pagination = forwardRef((props, ref) => {
|
|
|
27
27
|
]
|
|
28
28
|
);
|
|
29
29
|
const api = usePagination(paginationProps);
|
|
30
|
+
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
30
31
|
const view = runIfFn(children, api);
|
|
31
|
-
const mergedProps = mergeProps(api.rootProps, navProps);
|
|
32
32
|
return /* @__PURE__ */ jsx(PaginationProvider, { value: api, children: /* @__PURE__ */ jsx(ark.nav, { ...mergedProps, ref, children: view }) });
|
|
33
33
|
});
|
|
34
34
|
Pagination.displayName = "Pagination";
|
package/pin-input/index.cjs
CHANGED
|
@@ -6,18 +6,18 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6
6
|
const pinInput = require('./pin-input.cjs');
|
|
7
7
|
const pinInputContext = require('./pin-input-context.cjs');
|
|
8
8
|
const pinInputControl = require('./pin-input-control.cjs');
|
|
9
|
-
const
|
|
9
|
+
const pinInputInput = require('./pin-input-input.cjs');
|
|
10
10
|
const pinInputLabel = require('./pin-input-label.cjs');
|
|
11
11
|
|
|
12
12
|
const PinInput = Object.assign(pinInput.PinInput, {
|
|
13
13
|
Root: pinInput.PinInput,
|
|
14
14
|
Control: pinInputControl.PinInputControl,
|
|
15
|
-
Input:
|
|
15
|
+
Input: pinInputInput.PinInputInput,
|
|
16
16
|
Label: pinInputLabel.PinInputLabel
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
exports.usePinInputContext = pinInputContext.usePinInputContext;
|
|
20
20
|
exports.PinInputControl = pinInputControl.PinInputControl;
|
|
21
|
-
exports.PinInputInput =
|
|
21
|
+
exports.PinInputInput = pinInputInput.PinInputInput;
|
|
22
22
|
exports.PinInputLabel = pinInputLabel.PinInputLabel;
|
|
23
23
|
exports.PinInput = PinInput;
|
package/pin-input/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
|
3
3
|
import { type PinInputProps } from './pin-input';
|
|
4
4
|
import { usePinInputContext, type PinInputContext } from './pin-input-context';
|
|
5
5
|
import { PinInputControl, type PinInputControlProps } from './pin-input-control';
|
|
6
|
-
import { PinInputInput, type PinInputInputProps } from './pin-input-
|
|
6
|
+
import { PinInputInput, type PinInputInputProps } from './pin-input-input';
|
|
7
7
|
import { PinInputLabel, type PinInputLabelProps } from './pin-input-label';
|
|
8
8
|
declare const PinInput: ForwardRefExoticComponent<PinInputProps & RefAttributes<HTMLDivElement>> & {
|
|
9
9
|
Root: ForwardRefExoticComponent<PinInputProps & RefAttributes<HTMLDivElement>>;
|
package/pin-input/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { PinInput as PinInput$1 } from './pin-input.mjs';
|
|
3
3
|
export { usePinInputContext } from './pin-input-context.mjs';
|
|
4
4
|
import { PinInputControl } from './pin-input-control.mjs';
|
|
5
|
-
import { PinInputInput } from './pin-input-
|
|
5
|
+
import { PinInputInput } from './pin-input-input.mjs';
|
|
6
6
|
import { PinInputLabel } from './pin-input-label.mjs';
|
|
7
7
|
|
|
8
8
|
const PinInput = Object.assign(PinInput$1, {
|
package/pin-input/pin-input.cjs
CHANGED
|
@@ -12,7 +12,7 @@ const pinInputContext = require('./pin-input-context.cjs');
|
|
|
12
12
|
const usePinInput = require('./use-pin-input.cjs');
|
|
13
13
|
|
|
14
14
|
const PinInput = react.forwardRef((props, ref) => {
|
|
15
|
-
const [usePinInputProps,
|
|
15
|
+
const [usePinInputProps, localProps] = createSplitProps.createSplitProps()(props, [
|
|
16
16
|
"autoFocus",
|
|
17
17
|
"blurOnComplete",
|
|
18
18
|
"defaultValue",
|
|
@@ -37,7 +37,7 @@ const PinInput = react.forwardRef((props, ref) => {
|
|
|
37
37
|
"value"
|
|
38
38
|
]);
|
|
39
39
|
const api = usePinInput.usePinInput(usePinInputProps);
|
|
40
|
-
const mergedProps = react$1.mergeProps(api.rootProps,
|
|
40
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
41
41
|
return /* @__PURE__ */ jsxRuntime.jsxs(pinInputContext.PinInputProvider, { value: api, children: [
|
|
42
42
|
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }),
|
|
43
43
|
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.hiddenInputProps })
|
package/pin-input/pin-input.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { PinInputProvider } from './pin-input-context.mjs';
|
|
|
8
8
|
import { usePinInput } from './use-pin-input.mjs';
|
|
9
9
|
|
|
10
10
|
const PinInput = forwardRef((props, ref) => {
|
|
11
|
-
const [usePinInputProps,
|
|
11
|
+
const [usePinInputProps, localProps] = createSplitProps()(props, [
|
|
12
12
|
"autoFocus",
|
|
13
13
|
"blurOnComplete",
|
|
14
14
|
"defaultValue",
|
|
@@ -33,7 +33,7 @@ const PinInput = forwardRef((props, ref) => {
|
|
|
33
33
|
"value"
|
|
34
34
|
]);
|
|
35
35
|
const api = usePinInput(usePinInputProps);
|
|
36
|
-
const mergedProps = mergeProps(api.rootProps,
|
|
36
|
+
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
37
37
|
return /* @__PURE__ */ jsxs(PinInputProvider, { value: api, children: [
|
|
38
38
|
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }),
|
|
39
39
|
/* @__PURE__ */ jsx("input", { ...api.hiddenInputProps })
|
package/popover/popover.cjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react = require('@zag-js/react');
|
|
7
8
|
require('react');
|
|
8
9
|
require('../presence/index.cjs');
|
|
9
10
|
const splitPresenceProps = require('../presence/split-presence-props.cjs');
|
|
@@ -16,7 +17,7 @@ const presenceContext = require('../presence/presence-context.cjs');
|
|
|
16
17
|
const Popover = (props) => {
|
|
17
18
|
const [presenceProps, { children, ...localProps }] = splitPresenceProps.splitPresenceProps(props);
|
|
18
19
|
const api = usePopover.usePopover(localProps);
|
|
19
|
-
const presenceApi = usePresence.usePresence({
|
|
20
|
+
const presenceApi = usePresence.usePresence(react.mergeProps({ present: api.isOpen }, presenceProps));
|
|
20
21
|
const view = runIfFn.runIfFn(children, api);
|
|
21
22
|
return /* @__PURE__ */ jsxRuntime.jsx(popoverContext.PopoverProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(presenceContext.PresenceProvider, { value: presenceApi, children: view }) });
|
|
22
23
|
};
|
package/popover/popover.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
3
4
|
import 'react';
|
|
4
5
|
import '../presence/index.mjs';
|
|
5
6
|
import { splitPresenceProps } from '../presence/split-presence-props.mjs';
|
|
@@ -12,7 +13,7 @@ import { PresenceProvider } from '../presence/presence-context.mjs';
|
|
|
12
13
|
const Popover = (props) => {
|
|
13
14
|
const [presenceProps, { children, ...localProps }] = splitPresenceProps(props);
|
|
14
15
|
const api = usePopover(localProps);
|
|
15
|
-
const presenceApi = usePresence({
|
|
16
|
+
const presenceApi = usePresence(mergeProps({ present: api.isOpen }, presenceProps));
|
|
16
17
|
const view = runIfFn(children, api);
|
|
17
18
|
return /* @__PURE__ */ jsx(PopoverProvider, { value: api, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presenceApi, children: view }) });
|
|
18
19
|
};
|
package/portal.cjs
CHANGED
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6
6
|
const react = require('react');
|
|
7
7
|
const reactDom = require('react-dom');
|
|
8
8
|
require('./environment/index.cjs');
|
|
9
|
+
const useIsServer = require('./use-is-server.cjs');
|
|
9
10
|
const environmentContext = require('./environment/environment-context.cjs');
|
|
10
11
|
|
|
11
|
-
const isServer = typeof window === "undefined";
|
|
12
12
|
const Portal = (props) => {
|
|
13
13
|
const { children, container, disabled } = props;
|
|
14
|
+
const isServer = useIsServer.useIsServer();
|
|
14
15
|
const getRootNode = environmentContext.useEnvironmentContext();
|
|
15
16
|
if (isServer || disabled)
|
|
16
17
|
return children;
|
package/portal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode, type
|
|
1
|
+
import { type PropsWithChildren, type ReactNode, type ReactPortal, type RefObject } from 'react';
|
|
2
2
|
export interface PortalProps {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
container?: RefObject<HTMLElement>;
|
|
5
5
|
}
|
|
6
|
-
export declare const Portal: (props: PropsWithChildren<PortalProps>) => ReactNode;
|
|
6
|
+
export declare const Portal: (props: PropsWithChildren<PortalProps>) => ReactPortal[] | ReactNode | null | undefined;
|
package/portal.mjs
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import { Children } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import './environment/index.mjs';
|
|
5
|
+
import { useIsServer } from './use-is-server.mjs';
|
|
5
6
|
import { useEnvironmentContext } from './environment/environment-context.mjs';
|
|
6
7
|
|
|
7
|
-
const isServer = typeof window === "undefined";
|
|
8
8
|
const Portal = (props) => {
|
|
9
9
|
const { children, container, disabled } = props;
|
|
10
|
+
const isServer = useIsServer();
|
|
10
11
|
const getRootNode = useEnvironmentContext();
|
|
11
12
|
if (isServer || disabled)
|
|
12
13
|
return children;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const anatomy = require('@ark-ui/anatomy');
|
|
8
7
|
const react$1 = require('@zag-js/react');
|
|
9
8
|
const react = require('react');
|
|
10
9
|
const factory = require('../factory.cjs');
|
|
@@ -14,7 +13,7 @@ const RadioGroupIndicator = react.forwardRef(
|
|
|
14
13
|
(props, ref) => {
|
|
15
14
|
const api = radioGroupContext.useRadioGroupContext();
|
|
16
15
|
const mergedProps = react$1.mergeProps(api.indicatorProps, props);
|
|
17
|
-
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps,
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
18
17
|
}
|
|
19
18
|
);
|
|
20
19
|
RadioGroupIndicator.displayName = "RadioGroupIndicator";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { radioGroupAnatomy } from '@ark-ui/anatomy';
|
|
4
3
|
import { mergeProps } from '@zag-js/react';
|
|
5
4
|
import { forwardRef } from 'react';
|
|
6
5
|
import { ark } from '../factory.mjs';
|
|
@@ -10,7 +9,7 @@ const RadioGroupIndicator = forwardRef(
|
|
|
10
9
|
(props, ref) => {
|
|
11
10
|
const api = useRadioGroupContext();
|
|
12
11
|
const mergedProps = mergeProps(api.indicatorProps, props);
|
|
13
|
-
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps,
|
|
12
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
14
13
|
}
|
|
15
14
|
);
|
|
16
15
|
RadioGroupIndicator.displayName = "RadioGroupIndicator";
|
|
@@ -3,7 +3,7 @@ import { ForwardRefExoticComponent, RefAttributes, type ReactNode } from 'react'
|
|
|
3
3
|
import { type HTMLArkProps } from '../factory';
|
|
4
4
|
import type { Assign } from '../types';
|
|
5
5
|
export interface RadioGroupItemProps extends Assign<HTMLArkProps<'label'>, {
|
|
6
|
-
children?:
|
|
6
|
+
children?: ((state: ItemState) => ReactNode) | ReactNode;
|
|
7
7
|
}>, ItemProps {
|
|
8
8
|
}
|
|
9
9
|
export declare const RadioGroupItem: ForwardRefExoticComponent<RadioGroupItemProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -12,7 +12,7 @@ const radioGroupContext = require('./radio-group-context.cjs');
|
|
|
12
12
|
const useRadioGroup = require('./use-radio-group.cjs');
|
|
13
13
|
|
|
14
14
|
const RadioGroup = react.forwardRef((props, ref) => {
|
|
15
|
-
const [useRadioGroupProps,
|
|
15
|
+
const [useRadioGroupProps, localProps] = createSplitProps.createSplitProps()(props, [
|
|
16
16
|
"defaultValue",
|
|
17
17
|
"dir",
|
|
18
18
|
"disabled",
|
|
@@ -26,7 +26,7 @@ const RadioGroup = react.forwardRef((props, ref) => {
|
|
|
26
26
|
"value"
|
|
27
27
|
]);
|
|
28
28
|
const api = useRadioGroup.useRadioGroup(useRadioGroupProps);
|
|
29
|
-
const mergedProps = react$1.mergeProps(api.rootProps,
|
|
29
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
30
30
|
return /* @__PURE__ */ jsxRuntime.jsx(radioGroupContext.RadioGroupProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
|
|
31
31
|
});
|
|
32
32
|
RadioGroup.displayName = "RadioGroup";
|
|
@@ -8,7 +8,7 @@ import { RadioGroupProvider } from './radio-group-context.mjs';
|
|
|
8
8
|
import { useRadioGroup } from './use-radio-group.mjs';
|
|
9
9
|
|
|
10
10
|
const RadioGroup = forwardRef((props, ref) => {
|
|
11
|
-
const [useRadioGroupProps,
|
|
11
|
+
const [useRadioGroupProps, localProps] = createSplitProps()(props, [
|
|
12
12
|
"defaultValue",
|
|
13
13
|
"dir",
|
|
14
14
|
"disabled",
|
|
@@ -22,7 +22,7 @@ const RadioGroup = forwardRef((props, ref) => {
|
|
|
22
22
|
"value"
|
|
23
23
|
]);
|
|
24
24
|
const api = useRadioGroup(useRadioGroupProps);
|
|
25
|
-
const mergedProps = mergeProps(api.rootProps,
|
|
25
|
+
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
26
26
|
return /* @__PURE__ */ jsx(RadioGroupProvider, { value: api, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
27
27
|
});
|
|
28
28
|
RadioGroup.displayName = "RadioGroup";
|
|
@@ -7,4 +7,4 @@ export default meta;
|
|
|
7
7
|
export declare const Basic: () => JSX.Element;
|
|
8
8
|
export declare const Disabled: () => JSX.Element;
|
|
9
9
|
export declare const InitialValue: () => JSX.Element;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const OnEvent: () => JSX.Element;
|
|
@@ -12,9 +12,9 @@ const ratingGroupContext = require('./rating-group-context.cjs');
|
|
|
12
12
|
|
|
13
13
|
const RatingGroupControl = react.forwardRef(
|
|
14
14
|
(props, ref) => {
|
|
15
|
-
const { children, ...
|
|
15
|
+
const { children, ...localProps } = props;
|
|
16
16
|
const api = ratingGroupContext.useRatingGroupContext();
|
|
17
|
-
const mergedProps = react$1.mergeProps(api.controlProps,
|
|
17
|
+
const mergedProps = react$1.mergeProps(api.controlProps, localProps);
|
|
18
18
|
const view = runIfFn.runIfFn(children, api);
|
|
19
19
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20
20
|
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }),
|
|
@@ -8,9 +8,9 @@ import { useRatingGroupContext } from './rating-group-context.mjs';
|
|
|
8
8
|
|
|
9
9
|
const RatingGroupControl = forwardRef(
|
|
10
10
|
(props, ref) => {
|
|
11
|
-
const { children, ...
|
|
11
|
+
const { children, ...localProps } = props;
|
|
12
12
|
const api = useRatingGroupContext();
|
|
13
|
-
const mergedProps = mergeProps(api.controlProps,
|
|
13
|
+
const mergedProps = mergeProps(api.controlProps, localProps);
|
|
14
14
|
const view = runIfFn(children, api);
|
|
15
15
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16
16
|
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Provider } from 'react';
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
-
import { type
|
|
4
|
-
export interface RatingGroupItemContext extends
|
|
3
|
+
import { type ItemProps } from '@zag-js/rating-group';
|
|
4
|
+
export interface RatingGroupItemContext extends ItemProps {
|
|
5
5
|
}
|
|
6
6
|
export declare const RatingGroupItemProvider: Provider<RatingGroupItemContext>, useRatingGroupItemContext: () => RatingGroupItemContext;
|
|
@@ -6,18 +6,19 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
const react$1 = require('@zag-js/react');
|
|
8
8
|
const react = require('react');
|
|
9
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
11
|
const runIfFn = require('../run-if-fn.cjs');
|
|
11
12
|
const ratingGroupContext = require('./rating-group-context.cjs');
|
|
12
13
|
const ratingGroupItemContext = require('./rating-group-item-context.cjs');
|
|
13
14
|
|
|
14
15
|
const RatingGroupItem = react.forwardRef((props, ref) => {
|
|
15
|
-
const { children,
|
|
16
|
+
const [itemProps, { children, ...localProps }] = createSplitProps.createSplitProps()(props, ["index"]);
|
|
16
17
|
const api = ratingGroupContext.useRatingGroupContext();
|
|
17
|
-
const
|
|
18
|
-
const
|
|
18
|
+
const mergedProps = react$1.mergeProps(api.getItemProps(itemProps), localProps);
|
|
19
|
+
const itemState = api.getItemState(itemProps);
|
|
19
20
|
const view = runIfFn.runIfFn(children, itemState);
|
|
20
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ratingGroupItemContext.RatingGroupItemProvider, { value:
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ratingGroupItemContext.RatingGroupItemProvider, { value: itemProps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ref, children: view }) });
|
|
21
22
|
});
|
|
22
23
|
RatingGroupItem.displayName = "RatingGroupItem";
|
|
23
24
|
|
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
5
6
|
import { ark } from '../factory.mjs';
|
|
6
7
|
import { runIfFn } from '../run-if-fn.mjs';
|
|
7
8
|
import { useRatingGroupContext } from './rating-group-context.mjs';
|
|
8
9
|
import { RatingGroupItemProvider } from './rating-group-item-context.mjs';
|
|
9
10
|
|
|
10
11
|
const RatingGroupItem = forwardRef((props, ref) => {
|
|
11
|
-
const { children,
|
|
12
|
+
const [itemProps, { children, ...localProps }] = createSplitProps()(props, ["index"]);
|
|
12
13
|
const api = useRatingGroupContext();
|
|
13
|
-
const
|
|
14
|
-
const
|
|
14
|
+
const mergedProps = mergeProps(api.getItemProps(itemProps), localProps);
|
|
15
|
+
const itemState = api.getItemState(itemProps);
|
|
15
16
|
const view = runIfFn(children, itemState);
|
|
16
|
-
return /* @__PURE__ */ jsx(RatingGroupItemProvider, { value:
|
|
17
|
+
return /* @__PURE__ */ jsx(RatingGroupItemProvider, { value: itemProps, children: /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: view }) });
|
|
17
18
|
});
|
|
18
19
|
RatingGroupItem.displayName = "RatingGroupItem";
|
|
19
20
|
|
|
@@ -12,7 +12,7 @@ const ratingGroupContext = require('./rating-group-context.cjs');
|
|
|
12
12
|
const useRatingGroup = require('./use-rating-group.cjs');
|
|
13
13
|
|
|
14
14
|
const RatingGroup = react.forwardRef((props, ref) => {
|
|
15
|
-
const [useRatingProps,
|
|
15
|
+
const [useRatingProps, localProps] = createSplitProps.createSplitProps()(props, [
|
|
16
16
|
"allowHalf",
|
|
17
17
|
"autoFocus",
|
|
18
18
|
"count",
|
|
@@ -31,7 +31,7 @@ const RatingGroup = react.forwardRef((props, ref) => {
|
|
|
31
31
|
"value"
|
|
32
32
|
]);
|
|
33
33
|
const api = useRatingGroup.useRatingGroup(useRatingProps);
|
|
34
|
-
const mergedProps = react$1.mergeProps(api.rootProps,
|
|
34
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
35
35
|
return /* @__PURE__ */ jsxRuntime.jsx(ratingGroupContext.RatingGroupProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) });
|
|
36
36
|
});
|
|
37
37
|
RatingGroup.displayName = "RatingGroup";
|
|
@@ -8,7 +8,7 @@ import { RatingGroupProvider } from './rating-group-context.mjs';
|
|
|
8
8
|
import { useRatingGroup } from './use-rating-group.mjs';
|
|
9
9
|
|
|
10
10
|
const RatingGroup = forwardRef((props, ref) => {
|
|
11
|
-
const [useRatingProps,
|
|
11
|
+
const [useRatingProps, localProps] = createSplitProps()(props, [
|
|
12
12
|
"allowHalf",
|
|
13
13
|
"autoFocus",
|
|
14
14
|
"count",
|
|
@@ -27,7 +27,7 @@ const RatingGroup = forwardRef((props, ref) => {
|
|
|
27
27
|
"value"
|
|
28
28
|
]);
|
|
29
29
|
const api = useRatingGroup(useRatingProps);
|
|
30
|
-
const mergedProps = mergeProps(api.rootProps,
|
|
30
|
+
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
31
31
|
return /* @__PURE__ */ jsx(RatingGroupProvider, { value: api, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
32
32
|
});
|
|
33
33
|
RatingGroup.displayName = "RatingGroup";
|