@ark-ui/react 0.10.0 → 0.11.0-beta.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 (65) hide show
  1. package/CHANGELOG.md +15 -12
  2. package/carousel/carousel-next-slide-trigger.cjs +2 -2
  3. package/carousel/carousel-next-slide-trigger.mjs +2 -2
  4. package/carousel/carousel-prev-slide-trigger.cjs +2 -2
  5. package/carousel/carousel-prev-slide-trigger.mjs +2 -2
  6. package/carousel/carousel.anatomy.d.ts +2 -2
  7. package/checkbox/checkbox-control.cjs +5 -2
  8. package/checkbox/checkbox-control.mjs +6 -3
  9. package/checkbox/index.cjs +0 -2
  10. package/checkbox/index.d.ts +0 -1
  11. package/checkbox/index.mjs +0 -1
  12. package/color-picker/color-picker.anatomy.d.ts +2 -2
  13. package/combobox/combobox-clear-trigger.cjs +21 -0
  14. package/combobox/combobox-clear-trigger.d.ts +8 -0
  15. package/combobox/combobox-clear-trigger.mjs +17 -0
  16. package/combobox/combobox-option-group-label.cjs +23 -0
  17. package/combobox/combobox-option-group-label.d.ts +10 -0
  18. package/combobox/combobox-option-group-label.mjs +19 -0
  19. package/combobox/combobox-option-group.cjs +23 -0
  20. package/combobox/combobox-option-group.d.ts +10 -0
  21. package/combobox/combobox-option-group.mjs +19 -0
  22. package/combobox/combobox.cjs +2 -0
  23. package/combobox/combobox.d.ts +1 -1
  24. package/combobox/combobox.mjs +2 -0
  25. package/combobox/index.cjs +8 -2
  26. package/combobox/index.d.ts +3 -0
  27. package/combobox/index.mjs +3 -0
  28. package/date-picker/date-picker-positioner.cjs +21 -0
  29. package/date-picker/date-picker-positioner.d.ts +8 -0
  30. package/date-picker/date-picker-positioner.mjs +17 -0
  31. package/date-picker/date-picker.anatomy.d.ts +2 -2
  32. package/date-picker/index.cjs +2 -0
  33. package/date-picker/index.d.ts +1 -0
  34. package/date-picker/index.mjs +1 -0
  35. package/editable/editable.cjs +2 -0
  36. package/editable/editable.d.ts +1 -1
  37. package/editable/editable.mjs +2 -0
  38. package/index.cjs +8 -2
  39. package/index.mjs +4 -1
  40. package/menu/menu.cjs +3 -0
  41. package/menu/menu.mjs +3 -0
  42. package/package.json +41 -41
  43. package/pin-input/pin-input-control.cjs +3 -3
  44. package/pin-input/pin-input-control.mjs +4 -4
  45. package/range-slider/range-slider-thumb.cjs +4 -13
  46. package/range-slider/range-slider-thumb.mjs +5 -14
  47. package/rating-group/rating-group-control.cjs +4 -1
  48. package/rating-group/rating-group-control.mjs +5 -2
  49. package/rating-group/rating-group.cjs +1 -4
  50. package/rating-group/rating-group.d.ts +5 -5
  51. package/rating-group/rating-group.mjs +2 -5
  52. package/select/select-option-group.cjs +3 -2
  53. package/select/select-option-group.d.ts +3 -6
  54. package/select/select-option-group.mjs +3 -2
  55. package/select/select.cjs +2 -0
  56. package/select/select.mjs +2 -0
  57. package/slider/slider-thumb.cjs +4 -12
  58. package/slider/slider-thumb.mjs +5 -13
  59. package/tags-input/tags-input-control.cjs +2 -2
  60. package/tags-input/tags-input-control.mjs +3 -3
  61. package/tags-input/tags-input.cjs +3 -1
  62. package/tags-input/tags-input.mjs +3 -1
  63. package/checkbox/checkbox-input.cjs +0 -19
  64. package/checkbox/checkbox-input.d.ts +0 -8
  65. package/checkbox/checkbox-input.mjs +0 -15
package/index.cjs CHANGED
@@ -28,7 +28,6 @@ const carousel_anatomy = require('./carousel/carousel.anatomy.cjs');
28
28
  const checkbox = require('./checkbox/checkbox.cjs');
29
29
  const checkboxContext = require('./checkbox/checkbox-context.cjs');
30
30
  const checkboxControl = require('./checkbox/checkbox-control.cjs');
31
- const checkboxInput = require('./checkbox/checkbox-input.cjs');
32
31
  const checkboxLabel = require('./checkbox/checkbox-label.cjs');
33
32
  const colorPicker = require('./color-picker/color-picker.cjs');
34
33
  const colorPickerArea = require('./color-picker/color-picker-area.cjs');
@@ -48,12 +47,15 @@ const colorPickerSwatchContext = require('./color-picker/color-picker-swatch-con
48
47
  const colorPickerSwatchGroup = require('./color-picker/color-picker-swatch-group.cjs');
49
48
  const colorPicker_anatomy = require('./color-picker/color-picker.anatomy.cjs');
50
49
  const combobox = require('./combobox/combobox.cjs');
50
+ const comboboxClearTrigger = require('./combobox/combobox-clear-trigger.cjs');
51
51
  const comboboxContent = require('./combobox/combobox-content.cjs');
52
52
  const comboboxContext = require('./combobox/combobox-context.cjs');
53
53
  const comboboxControl = require('./combobox/combobox-control.cjs');
54
54
  const comboboxInput = require('./combobox/combobox-input.cjs');
55
55
  const comboboxLabel = require('./combobox/combobox-label.cjs');
56
56
  const comboboxOption = require('./combobox/combobox-option.cjs');
57
+ const comboboxOptionGroup = require('./combobox/combobox-option-group.cjs');
58
+ const comboboxOptionGroupLabel = require('./combobox/combobox-option-group-label.cjs');
57
59
  const comboboxPositioner = require('./combobox/combobox-positioner.cjs');
58
60
  const comboboxTrigger = require('./combobox/combobox-trigger.cjs');
59
61
  const datePicker = require('./date-picker/date-picker.cjs');
@@ -72,6 +74,7 @@ const datePickerMonthCell = require('./date-picker/date-picker-month-cell.cjs');
72
74
  const datePickerMonthCellTrigger = require('./date-picker/date-picker-month-cell-trigger.cjs');
73
75
  const datePickerMonthSelect = require('./date-picker/date-picker-month-select.cjs');
74
76
  const datePickerNextTrigger = require('./date-picker/date-picker-next-trigger.cjs');
77
+ const datePickerPositioner = require('./date-picker/date-picker-positioner.cjs');
75
78
  const datePickerPrevTrigger = require('./date-picker/date-picker-prev-trigger.cjs');
76
79
  const datePickerRow = require('./date-picker/date-picker-row.cjs');
77
80
  const datePickerRowGroup = require('./date-picker/date-picker-row-group.cjs');
@@ -311,7 +314,6 @@ exports.carouselAnatomy = carousel_anatomy.carouselAnatomy;
311
314
  exports.Checkbox = checkbox.Checkbox;
312
315
  exports.useCheckboxContext = checkboxContext.useCheckboxContext;
313
316
  exports.CheckboxControl = checkboxControl.CheckboxControl;
314
- exports.CheckboxInput = checkboxInput.CheckboxInput;
315
317
  exports.CheckboxLabel = checkboxLabel.CheckboxLabel;
316
318
  exports.ColorPicker = colorPicker.ColorPicker;
317
319
  exports.ColorPickerArea = colorPickerArea.ColorPickerArea;
@@ -331,12 +333,15 @@ exports.useColorPickerSwatchContext = colorPickerSwatchContext.useColorPickerSwa
331
333
  exports.ColorPickerSwatchGroup = colorPickerSwatchGroup.ColorPickerSwatchGroup;
332
334
  exports.colorPickerAnatomy = colorPicker_anatomy.colorPickerAnatomy;
333
335
  exports.Combobox = combobox.Combobox;
336
+ exports.ComboboxClearTrigger = comboboxClearTrigger.ComboboxClearTrigger;
334
337
  exports.ComboboxContent = comboboxContent.ComboboxContent;
335
338
  exports.useComboboxContext = comboboxContext.useComboboxContext;
336
339
  exports.ComboboxControl = comboboxControl.ComboboxControl;
337
340
  exports.ComboboxInput = comboboxInput.ComboboxInput;
338
341
  exports.ComboboxLabel = comboboxLabel.ComboboxLabel;
339
342
  exports.ComboboxOption = comboboxOption.ComboboxOption;
343
+ exports.ComboboxOptionGroup = comboboxOptionGroup.ComboboxOptionGroup;
344
+ exports.ComboboxOptionGroupLabel = comboboxOptionGroupLabel.ComboboxOptionGroupLabel;
340
345
  exports.ComboboxPositioner = comboboxPositioner.ComboboxPositioner;
341
346
  exports.ComboboxTrigger = comboboxTrigger.ComboboxTrigger;
342
347
  exports.DatePicker = datePicker.DatePicker;
@@ -355,6 +360,7 @@ exports.DatePickerMonthCell = datePickerMonthCell.DatePickerMonthCell;
355
360
  exports.DatePickerMonthCellTrigger = datePickerMonthCellTrigger.DatePickerMonthCellTrigger;
356
361
  exports.DatePickerMonthSelect = datePickerMonthSelect.DatePickerMonthSelect;
357
362
  exports.DatePickerNextTrigger = datePickerNextTrigger.DatePickerNextTrigger;
363
+ exports.DatePickerPositioner = datePickerPositioner.DatePickerPositioner;
358
364
  exports.DatePickerPrevTrigger = datePickerPrevTrigger.DatePickerPrevTrigger;
359
365
  exports.DatePickerRow = datePickerRow.DatePickerRow;
360
366
  exports.DatePickerRowGroup = datePickerRowGroup.DatePickerRowGroup;
package/index.mjs CHANGED
@@ -24,7 +24,6 @@ export { carouselAnatomy } from './carousel/carousel.anatomy.mjs';
24
24
  export { Checkbox } from './checkbox/checkbox.mjs';
25
25
  export { useCheckboxContext } from './checkbox/checkbox-context.mjs';
26
26
  export { CheckboxControl } from './checkbox/checkbox-control.mjs';
27
- export { CheckboxInput } from './checkbox/checkbox-input.mjs';
28
27
  export { CheckboxLabel } from './checkbox/checkbox-label.mjs';
29
28
  export { ColorPicker } from './color-picker/color-picker.mjs';
30
29
  export { ColorPickerArea } from './color-picker/color-picker-area.mjs';
@@ -44,12 +43,15 @@ export { useColorPickerSwatchContext } from './color-picker/color-picker-swatch-
44
43
  export { ColorPickerSwatchGroup } from './color-picker/color-picker-swatch-group.mjs';
45
44
  export { colorPickerAnatomy } from './color-picker/color-picker.anatomy.mjs';
46
45
  export { Combobox } from './combobox/combobox.mjs';
46
+ export { ComboboxClearTrigger } from './combobox/combobox-clear-trigger.mjs';
47
47
  export { ComboboxContent } from './combobox/combobox-content.mjs';
48
48
  export { useComboboxContext } from './combobox/combobox-context.mjs';
49
49
  export { ComboboxControl } from './combobox/combobox-control.mjs';
50
50
  export { ComboboxInput } from './combobox/combobox-input.mjs';
51
51
  export { ComboboxLabel } from './combobox/combobox-label.mjs';
52
52
  export { ComboboxOption } from './combobox/combobox-option.mjs';
53
+ export { ComboboxOptionGroup } from './combobox/combobox-option-group.mjs';
54
+ export { ComboboxOptionGroupLabel } from './combobox/combobox-option-group-label.mjs';
53
55
  export { ComboboxPositioner } from './combobox/combobox-positioner.mjs';
54
56
  export { ComboboxTrigger } from './combobox/combobox-trigger.mjs';
55
57
  export { DatePicker } from './date-picker/date-picker.mjs';
@@ -68,6 +70,7 @@ export { DatePickerMonthCell } from './date-picker/date-picker-month-cell.mjs';
68
70
  export { DatePickerMonthCellTrigger } from './date-picker/date-picker-month-cell-trigger.mjs';
69
71
  export { DatePickerMonthSelect } from './date-picker/date-picker-month-select.mjs';
70
72
  export { DatePickerNextTrigger } from './date-picker/date-picker-next-trigger.mjs';
73
+ export { DatePickerPositioner } from './date-picker/date-picker-positioner.mjs';
71
74
  export { DatePickerPrevTrigger } from './date-picker/date-picker-prev-trigger.mjs';
72
75
  export { DatePickerRow } from './date-picker/date-picker-row.mjs';
73
76
  export { DatePickerRowGroup } from './date-picker/date-picker-row-group.mjs';
package/menu/menu.cjs CHANGED
@@ -23,7 +23,10 @@ const Menu = (props) => {
23
23
  "ids",
24
24
  "loop",
25
25
  "onClose",
26
+ "onFocusOutside",
27
+ "onInteractOutside",
26
28
  "onOpen",
29
+ "onPointerDownOutside",
27
30
  "onSelect",
28
31
  "onValueChange",
29
32
  "positioning",
package/menu/menu.mjs CHANGED
@@ -19,7 +19,10 @@ const Menu = (props) => {
19
19
  "ids",
20
20
  "loop",
21
21
  "onClose",
22
+ "onFocusOutside",
23
+ "onInteractOutside",
22
24
  "onOpen",
25
+ "onPointerDownOutside",
23
26
  "onSelect",
24
27
  "onValueChange",
25
28
  "positioning",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ark-ui/react",
3
- "version": "0.10.0",
3
+ "version": "0.11.0-beta.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",
@@ -60,47 +60,47 @@
60
60
  "release-it": "release-it --config ../../release-it.json"
61
61
  },
62
62
  "dependencies": {
63
- "@zag-js/accordion": "0.13.0",
64
- "@zag-js/anatomy": "0.13.0",
65
- "@zag-js/avatar": "0.13.0",
66
- "@zag-js/carousel": "0.13.0",
67
- "@zag-js/checkbox": "0.13.0",
68
- "@zag-js/color-picker": "0.13.0",
69
- "@zag-js/color-utils": "0.13.0",
70
- "@zag-js/combobox": "0.13.0",
71
- "@zag-js/date-picker": "0.13.0",
72
- "@zag-js/date-utils": "0.13.0",
73
- "@zag-js/dialog": "0.13.0",
74
- "@zag-js/editable": "0.13.0",
75
- "@zag-js/hover-card": "0.13.0",
76
- "@zag-js/menu": "0.13.0",
77
- "@zag-js/number-input": "0.13.0",
78
- "@zag-js/pagination": "0.13.0",
79
- "@zag-js/pin-input": "0.13.0",
80
- "@zag-js/popover": "0.13.0",
81
- "@zag-js/presence": "0.13.0",
82
- "@zag-js/pressable": "0.13.0",
83
- "@zag-js/radio-group": "0.13.0",
84
- "@zag-js/range-slider": "0.13.0",
85
- "@zag-js/rating-group": "0.13.0",
86
- "@zag-js/react": "0.13.0",
87
- "@zag-js/select": "0.13.0",
88
- "@zag-js/slider": "0.13.0",
89
- "@zag-js/splitter": "0.13.0",
90
- "@zag-js/switch": "0.13.0",
91
- "@zag-js/tabs": "0.13.0",
92
- "@zag-js/tags-input": "0.13.0",
93
- "@zag-js/toast": "0.13.0",
94
- "@zag-js/tooltip": "0.13.0",
95
- "@zag-js/types": "0.13.0"
63
+ "@zag-js/accordion": "0.0.0-dev-20230807223338",
64
+ "@zag-js/anatomy": "0.0.0-dev-20230807223338",
65
+ "@zag-js/avatar": "0.0.0-dev-20230807223338",
66
+ "@zag-js/carousel": "0.0.0-dev-20230807223338",
67
+ "@zag-js/checkbox": "0.0.0-dev-20230807223338",
68
+ "@zag-js/color-picker": "0.0.0-dev-20230807223338",
69
+ "@zag-js/color-utils": "0.0.0-dev-20230807223338",
70
+ "@zag-js/combobox": "0.0.0-dev-20230807223338",
71
+ "@zag-js/date-picker": "0.0.0-dev-20230807223338",
72
+ "@zag-js/date-utils": "0.0.0-dev-20230807223338",
73
+ "@zag-js/dialog": "0.0.0-dev-20230807223338",
74
+ "@zag-js/editable": "0.0.0-dev-20230807223338",
75
+ "@zag-js/hover-card": "0.0.0-dev-20230807223338",
76
+ "@zag-js/menu": "0.0.0-dev-20230807223338",
77
+ "@zag-js/number-input": "0.0.0-dev-20230807223338",
78
+ "@zag-js/pagination": "0.0.0-dev-20230807223338",
79
+ "@zag-js/pin-input": "0.0.0-dev-20230807223338",
80
+ "@zag-js/popover": "0.0.0-dev-20230807223338",
81
+ "@zag-js/presence": "0.0.0-dev-20230807223338",
82
+ "@zag-js/pressable": "0.0.0-dev-20230807223338",
83
+ "@zag-js/radio-group": "0.0.0-dev-20230807223338",
84
+ "@zag-js/range-slider": "0.0.0-dev-20230807223338",
85
+ "@zag-js/rating-group": "0.0.0-dev-20230807223338",
86
+ "@zag-js/react": "0.0.0-dev-20230807223338",
87
+ "@zag-js/select": "0.0.0-dev-20230807223338",
88
+ "@zag-js/slider": "0.0.0-dev-20230807223338",
89
+ "@zag-js/splitter": "0.0.0-dev-20230807223338",
90
+ "@zag-js/switch": "0.0.0-dev-20230807223338",
91
+ "@zag-js/tabs": "0.0.0-dev-20230807223338",
92
+ "@zag-js/tags-input": "0.0.0-dev-20230807223338",
93
+ "@zag-js/toast": "0.0.0-dev-20230807223338",
94
+ "@zag-js/tooltip": "0.0.0-dev-20230807223338",
95
+ "@zag-js/types": "0.0.0-dev-20230807223338"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@release-it/keep-a-changelog": "4.0.0",
99
- "@storybook/addon-a11y": "7.2.0",
100
- "@storybook/addon-essentials": "7.2.0",
101
- "@storybook/addons": "7.2.0",
102
- "@storybook/react": "7.2.0",
103
- "@storybook/react-vite": "7.2.0",
99
+ "@storybook/addon-a11y": "7.2.1",
100
+ "@storybook/addon-essentials": "7.2.1",
101
+ "@storybook/addons": "7.2.1",
102
+ "@storybook/react": "7.2.1",
103
+ "@storybook/react-vite": "7.2.1",
104
104
  "@testing-library/dom": "9.3.1",
105
105
  "@testing-library/jest-dom": "5.17.0",
106
106
  "@testing-library/react": "14.0.0",
@@ -123,9 +123,9 @@
123
123
  "react-frame-component": "5.2.6",
124
124
  "release-it": "16.1.3",
125
125
  "resize-observer-polyfill": "1.5.1",
126
- "storybook": "7.2.0",
126
+ "storybook": "7.2.1",
127
127
  "typescript": "5.1.6",
128
- "vite": "4.4.8",
128
+ "vite": "4.4.9",
129
129
  "vite-plugin-dts": "2.3.0",
130
130
  "vitest": "0.34.1"
131
131
  },
@@ -12,9 +12,9 @@ const pinInputContext = require('./pin-input-context.cjs');
12
12
  const PinInputControl = react.forwardRef((props, ref) => {
13
13
  const { controlProps, hiddenInputProps } = pinInputContext.usePinInputContext();
14
14
  const mergedProps = react$1.mergeProps(controlProps, props);
15
- return /* @__PURE__ */ jsxRuntime.jsxs(factory.ark.div, { ...mergedProps, ref, children: [
16
- /* @__PURE__ */ jsxRuntime.jsx("input", { ...hiddenInputProps }),
17
- props.children
15
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16
+ /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: props.children }),
17
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ...hiddenInputProps })
18
18
  ] });
19
19
  });
20
20
  PinInputControl.displayName = "PinInputControl";
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.mjs';
@@ -8,9 +8,9 @@ import { usePinInputContext } from './pin-input-context.mjs';
8
8
  const PinInputControl = forwardRef((props, ref) => {
9
9
  const { controlProps, hiddenInputProps } = usePinInputContext();
10
10
  const mergedProps = mergeProps(controlProps, props);
11
- return /* @__PURE__ */ jsxs(ark.div, { ...mergedProps, ref, children: [
12
- /* @__PURE__ */ jsx("input", { ...hiddenInputProps }),
13
- props.children
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: props.children }),
13
+ /* @__PURE__ */ jsx("input", { ...hiddenInputProps })
14
14
  ] });
15
15
  });
16
16
  PinInputControl.displayName = "PinInputControl";
@@ -11,22 +11,13 @@ const rangeSliderContext = require('./range-slider-context.cjs');
11
11
 
12
12
  const RangeSliderThumb = react.forwardRef((props, ref) => {
13
13
  const { index, ...divProps } = props;
14
- const { getThumbProps } = rangeSliderContext.useRangeSliderContext();
14
+ const { getThumbProps, getHiddenInputProps } = rangeSliderContext.useRangeSliderContext();
15
15
  const mergedProps = react$1.mergeProps(getThumbProps(index), divProps);
16
- return /* @__PURE__ */ jsxRuntime.jsxs(factory.ark.div, { ...mergedProps, ref, children: [
17
- /* @__PURE__ */ jsxRuntime.jsx(RangeSliderHiddenInput, { index }),
18
- props.children
16
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17
+ /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: props.children }),
18
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ...getHiddenInputProps(index) })
19
19
  ] });
20
20
  });
21
21
  RangeSliderThumb.displayName = "RangeSliderThumb";
22
- const RangeSliderHiddenInput = react.forwardRef(
23
- (props, ref) => {
24
- const { index, ...inputProps } = props;
25
- const { getHiddenInputProps } = rangeSliderContext.useRangeSliderContext();
26
- const mergedProps = react$1.mergeProps(getHiddenInputProps(index), inputProps);
27
- return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...mergedProps, ref });
28
- }
29
- );
30
- RangeSliderHiddenInput.displayName = "RangeSliderHiddenInput";
31
22
 
32
23
  exports.RangeSliderThumb = RangeSliderThumb;
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.mjs';
@@ -7,22 +7,13 @@ import { useRangeSliderContext } from './range-slider-context.mjs';
7
7
 
8
8
  const RangeSliderThumb = forwardRef((props, ref) => {
9
9
  const { index, ...divProps } = props;
10
- const { getThumbProps } = useRangeSliderContext();
10
+ const { getThumbProps, getHiddenInputProps } = useRangeSliderContext();
11
11
  const mergedProps = mergeProps(getThumbProps(index), divProps);
12
- return /* @__PURE__ */ jsxs(ark.div, { ...mergedProps, ref, children: [
13
- /* @__PURE__ */ jsx(RangeSliderHiddenInput, { index }),
14
- props.children
12
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
13
+ /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: props.children }),
14
+ /* @__PURE__ */ jsx("input", { ...getHiddenInputProps(index) })
15
15
  ] });
16
16
  });
17
17
  RangeSliderThumb.displayName = "RangeSliderThumb";
18
- const RangeSliderHiddenInput = forwardRef(
19
- (props, ref) => {
20
- const { index, ...inputProps } = props;
21
- const { getHiddenInputProps } = useRangeSliderContext();
22
- const mergedProps = mergeProps(getHiddenInputProps(index), inputProps);
23
- return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });
24
- }
25
- );
26
- RangeSliderHiddenInput.displayName = "RangeSliderHiddenInput";
27
18
 
28
19
  export { RangeSliderThumb };
@@ -16,7 +16,10 @@ const RatingGroupControl = react.forwardRef(
16
16
  const ratingGroup = ratingGroupContext.useRatingGroupContext();
17
17
  const mergedProps = react$1.mergeProps(ratingGroup.controlProps, divProps);
18
18
  const view = runIfFn.runIfFn(children, ratingGroup);
19
- return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view });
19
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
20
+ /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }),
21
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ...ratingGroup.hiddenInputProps })
22
+ ] });
20
23
  }
21
24
  );
22
25
  RatingGroupControl.displayName = "RatingGroupControl";
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx } from 'react/jsx-runtime';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.mjs';
@@ -12,7 +12,10 @@ const RatingGroupControl = forwardRef(
12
12
  const ratingGroup = useRatingGroupContext();
13
13
  const mergedProps = mergeProps(ratingGroup.controlProps, divProps);
14
14
  const view = runIfFn(children, ratingGroup);
15
- return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view });
15
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16
+ /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }),
17
+ /* @__PURE__ */ jsx("input", { ...ratingGroup.hiddenInputProps })
18
+ ] });
16
19
  }
17
20
  );
18
21
  RatingGroupControl.displayName = "RatingGroupControl";
@@ -32,10 +32,7 @@ const RatingGroup = react.forwardRef((props, ref) => {
32
32
  ]);
33
33
  const ratingGroup = useRatingGroup.useRatingGroup(useRatingProps);
34
34
  const mergedProps = react$1.mergeProps(ratingGroup.rootProps, inputProps);
35
- return /* @__PURE__ */ jsxRuntime.jsx(ratingGroupContext.RatingGroupProvider, { value: ratingGroup, children: /* @__PURE__ */ jsxRuntime.jsxs(factory.ark.div, { ...mergedProps, children: [
36
- /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...ratingGroup.hiddenInputProps, ref }),
37
- props.children
38
- ] }) });
35
+ return /* @__PURE__ */ jsxRuntime.jsx(ratingGroupContext.RatingGroupProvider, { value: ratingGroup, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: props.children }) });
39
36
  });
40
37
  RatingGroup.displayName = "RatingGroup";
41
38
 
@@ -1,13 +1,13 @@
1
1
  import type { Context } from '@zag-js/rating-group';
2
- import type { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
+ import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
3
3
  import { ark } from '../factory';
4
4
  import { type Assign } from '../types';
5
5
  import { type UseRatingGroupProps } from './use-rating-group';
6
- export type RatingGroupProps = Assign<ComponentPropsWithoutRef<typeof ark.input>, UseRatingGroupProps>;
7
- export declare const RatingGroup: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
8
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
6
+ export type RatingGroupProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, UseRatingGroupProps>;
7
+ export declare const RatingGroup: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
+ ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
9
9
  } & {
10
10
  asChild?: boolean | undefined;
11
11
  }, "ref">, "name" | "value" | "form" | "id" | "max" | "onChange" | "defaultValue" | "autoFocus" | "dir" | "disabled" | "readOnly" | "getRootNode" | "ids" | "translations" | "allowHalf" | "onHover"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
12
12
  defaultValue?: number | undefined;
13
- } & RefAttributes<HTMLInputElement>>;
13
+ } & RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { createSplitProps } from '../create-split-props.mjs';
@@ -28,10 +28,7 @@ const RatingGroup = forwardRef((props, ref) => {
28
28
  ]);
29
29
  const ratingGroup = useRatingGroup(useRatingProps);
30
30
  const mergedProps = mergeProps(ratingGroup.rootProps, inputProps);
31
- return /* @__PURE__ */ jsx(RatingGroupProvider, { value: ratingGroup, children: /* @__PURE__ */ jsxs(ark.div, { ...mergedProps, children: [
32
- /* @__PURE__ */ jsx(ark.input, { ...ratingGroup.hiddenInputProps, ref }),
33
- props.children
34
- ] }) });
31
+ return /* @__PURE__ */ jsx(RatingGroupProvider, { value: ratingGroup, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: props.children }) });
35
32
  });
36
33
  RatingGroup.displayName = "RatingGroup";
37
34
 
@@ -6,14 +6,15 @@ 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 selectContext = require('./select-context.cjs');
11
12
 
12
13
  const SelectOptionGroup = react.forwardRef(
13
14
  (props, ref) => {
14
- const { id, ...divProps } = props;
15
+ const [optionProps, localProps] = createSplitProps.createSplitProps()(props, ["id"]);
15
16
  const { getOptionGroupProps } = selectContext.useSelectContext();
16
- const mergedProps = react$1.mergeProps(getOptionGroupProps({ id }), divProps);
17
+ const mergedProps = react$1.mergeProps(getOptionGroupProps(optionProps), localProps);
17
18
  return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
18
19
  }
19
20
  );
@@ -1,13 +1,10 @@
1
+ import type { OptionGroupProps } from '@zag-js/select';
1
2
  import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
3
  import { ark } from '../factory';
3
4
  import type { Assign } from '../types';
4
- export type SelectOptionGroupProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, {
5
- id: string;
6
- }>;
5
+ export type SelectOptionGroupProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, OptionGroupProps>;
7
6
  export declare const SelectOptionGroup: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
7
  ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
9
8
  } & {
10
9
  asChild?: boolean | undefined;
11
- }, "ref">, "id"> & {
12
- id: string;
13
- } & RefAttributes<HTMLDivElement>>;
10
+ }, "ref">, "id"> & OptionGroupProps & RefAttributes<HTMLDivElement>>;
@@ -2,14 +2,15 @@
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 { useSelectContext } from './select-context.mjs';
7
8
 
8
9
  const SelectOptionGroup = forwardRef(
9
10
  (props, ref) => {
10
- const { id, ...divProps } = props;
11
+ const [optionProps, localProps] = createSplitProps()(props, ["id"]);
11
12
  const { getOptionGroupProps } = useSelectContext();
12
- const mergedProps = mergeProps(getOptionGroupProps({ id }), divProps);
13
+ const mergedProps = mergeProps(getOptionGroupProps(optionProps), localProps);
13
14
  return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
14
15
  }
15
16
  );
package/select/select.cjs CHANGED
@@ -26,9 +26,11 @@ const Select = (props) => {
26
26
  "name",
27
27
  "onChange",
28
28
  "onClose",
29
+ "onFocusOutside",
29
30
  "onHighlight",
30
31
  "onInteractOutside",
31
32
  "onOpen",
33
+ "onPointerDownOutside",
32
34
  "positioning",
33
35
  "readOnly",
34
36
  "selectedOption",
package/select/select.mjs CHANGED
@@ -22,9 +22,11 @@ const Select = (props) => {
22
22
  "name",
23
23
  "onChange",
24
24
  "onClose",
25
+ "onFocusOutside",
25
26
  "onHighlight",
26
27
  "onInteractOutside",
27
28
  "onOpen",
29
+ "onPointerDownOutside",
28
30
  "positioning",
29
31
  "readOnly",
30
32
  "selectedOption",
@@ -10,21 +10,13 @@ const factory = require('../factory.cjs');
10
10
  const sliderContext = require('./slider-context.cjs');
11
11
 
12
12
  const SliderThumb = react.forwardRef((props, ref) => {
13
- const { thumbProps } = sliderContext.useSliderContext();
13
+ const { thumbProps, hiddenInputProps } = sliderContext.useSliderContext();
14
14
  const mergedProps = react$1.mergeProps(thumbProps, props);
15
- return /* @__PURE__ */ jsxRuntime.jsxs(factory.ark.div, { ...mergedProps, ref, children: [
16
- /* @__PURE__ */ jsxRuntime.jsx(SliderHiddenInput, {}),
17
- props.children
15
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16
+ /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: props.children }),
17
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ...hiddenInputProps })
18
18
  ] });
19
19
  });
20
20
  SliderThumb.displayName = "SliderThumb";
21
- const SliderHiddenInput = react.forwardRef(
22
- (props, ref) => {
23
- const { hiddenInputProps } = sliderContext.useSliderContext();
24
- const mergedProps = react$1.mergeProps(hiddenInputProps, props);
25
- return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...mergedProps, ref });
26
- }
27
- );
28
- SliderHiddenInput.displayName = "SliderHiddenInput";
29
21
 
30
22
  exports.SliderThumb = SliderThumb;
@@ -1,26 +1,18 @@
1
1
  'use client';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.mjs';
6
6
  import { useSliderContext } from './slider-context.mjs';
7
7
 
8
8
  const SliderThumb = forwardRef((props, ref) => {
9
- const { thumbProps } = useSliderContext();
9
+ const { thumbProps, hiddenInputProps } = useSliderContext();
10
10
  const mergedProps = mergeProps(thumbProps, props);
11
- return /* @__PURE__ */ jsxs(ark.div, { ...mergedProps, ref, children: [
12
- /* @__PURE__ */ jsx(SliderHiddenInput, {}),
13
- props.children
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: props.children }),
13
+ /* @__PURE__ */ jsx("input", { ...hiddenInputProps })
14
14
  ] });
15
15
  });
16
16
  SliderThumb.displayName = "SliderThumb";
17
- const SliderHiddenInput = forwardRef(
18
- (props, ref) => {
19
- const { hiddenInputProps } = useSliderContext();
20
- const mergedProps = mergeProps(hiddenInputProps, props);
21
- return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });
22
- }
23
- );
24
- SliderHiddenInput.displayName = "SliderHiddenInput";
25
17
 
26
18
  export { SliderThumb };
@@ -12,8 +12,8 @@ const tagsInputContext = require('./tags-input-context.cjs');
12
12
  const TagsInputControl = react.forwardRef((props, ref) => {
13
13
  const { controlProps, hiddenInputProps } = tagsInputContext.useTagsInputContext();
14
14
  const mergedProps = react$1.mergeProps(controlProps, props);
15
- return /* @__PURE__ */ jsxRuntime.jsxs(factory.ark.div, { ...mergedProps, ref, children: [
16
- props.children,
15
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16
+ /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: props.children }),
17
17
  /* @__PURE__ */ jsxRuntime.jsx("input", { ...hiddenInputProps })
18
18
  ] });
19
19
  });
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.mjs';
@@ -8,8 +8,8 @@ import { useTagsInputContext } from './tags-input-context.mjs';
8
8
  const TagsInputControl = forwardRef((props, ref) => {
9
9
  const { controlProps, hiddenInputProps } = useTagsInputContext();
10
10
  const mergedProps = mergeProps(controlProps, props);
11
- return /* @__PURE__ */ jsxs(ark.div, { ...mergedProps, ref, children: [
12
- props.children,
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: props.children }),
13
13
  /* @__PURE__ */ jsx("input", { ...hiddenInputProps })
14
14
  ] });
15
15
  });
@@ -35,9 +35,11 @@ const TagsInput = react.forwardRef((props, ref) => {
35
35
  "maxLength",
36
36
  "name",
37
37
  "onChange",
38
+ "onFocusOutside",
38
39
  "onHighlight",
39
- "onInvalid",
40
40
  "onInteractOutside",
41
+ "onInvalid",
42
+ "onPointerDownOutside",
41
43
  "onTagUpdate",
42
44
  "readOnly",
43
45
  "translations",
@@ -31,9 +31,11 @@ const TagsInput = forwardRef((props, ref) => {
31
31
  "maxLength",
32
32
  "name",
33
33
  "onChange",
34
+ "onFocusOutside",
34
35
  "onHighlight",
35
- "onInvalid",
36
36
  "onInteractOutside",
37
+ "onInvalid",
38
+ "onPointerDownOutside",
37
39
  "onTagUpdate",
38
40
  "readOnly",
39
41
  "translations",