@ark-ui/react 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +29 -16
- package/color-picker/color-picker.cjs +1 -1
- package/color-picker/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-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 +3 -9
- package/file-upload/file-upload-item-preview.d.ts +6 -1
- package/file-upload/file-upload-item-preview.mjs +4 -10
- package/file-upload/file-upload.cjs +6 -2
- package/file-upload/file-upload.mjs +6 -2
- package/file-upload/index.cjs +7 -5
- package/file-upload/index.d.ts +9 -7
- package/file-upload/index.mjs +7 -5
- package/file-upload/use-file-upload.cjs +2 -1
- package/file-upload/use-file-upload.mjs +2 -1
- package/hover-card/hover-card.cjs +2 -1
- package/hover-card/hover-card.mjs +2 -1
- package/index.cjs +8 -6
- package/index.mjs +4 -3
- 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 +30 -33
- package/number-input/number-input.mjs +30 -33
- package/package.json +62 -55
- 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/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/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
|
@@ -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 HoverCard = (props) => {
|
|
13
14
|
const [presenceProps, { children, ...localProps }] = splitPresenceProps(props);
|
|
14
15
|
const api = useHoverCard(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(HoverCardProvider, { value: api, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presenceApi, children: view }) });
|
|
18
19
|
};
|
package/index.cjs
CHANGED
|
@@ -143,7 +143,7 @@ const fileUploadItem = require('./file-upload/file-upload-item.cjs');
|
|
|
143
143
|
const fileUploadItemDeleteTrigger = require('./file-upload/file-upload-item-delete-trigger.cjs');
|
|
144
144
|
const fileUploadItemGroup = require('./file-upload/file-upload-item-group.cjs');
|
|
145
145
|
const fileUploadItemName = require('./file-upload/file-upload-item-name.cjs');
|
|
146
|
-
const
|
|
146
|
+
const fileUploadItemPreviewImage = require('./file-upload/file-upload-item-preview-image.cjs');
|
|
147
147
|
const fileUploadItemSizeText = require('./file-upload/file-upload-item-size-text.cjs');
|
|
148
148
|
const fileUploadLabel = require('./file-upload/file-upload-label.cjs');
|
|
149
149
|
const fileUploadTrigger = require('./file-upload/file-upload-trigger.cjs');
|
|
@@ -170,7 +170,7 @@ const menuContext = require('./menu/menu-context.cjs');
|
|
|
170
170
|
const numberInputControl = require('./number-input/number-input-control.cjs');
|
|
171
171
|
const numberInputDecrementTrigger = require('./number-input/number-input-decrement-trigger.cjs');
|
|
172
172
|
const numberInputIncrementTrigger = require('./number-input/number-input-increment-trigger.cjs');
|
|
173
|
-
const
|
|
173
|
+
const numberInputInput = require('./number-input/number-input-input.cjs');
|
|
174
174
|
const numberInputLabel = require('./number-input/number-input-label.cjs');
|
|
175
175
|
const numberInputScrubber = require('./number-input/number-input-scrubber.cjs');
|
|
176
176
|
const numberInputContext = require('./number-input/number-input-context.cjs');
|
|
@@ -180,7 +180,7 @@ const paginationNextTrigger = require('./pagination/pagination-next-trigger.cjs'
|
|
|
180
180
|
const paginationPrevTrigger = require('./pagination/pagination-prev-trigger.cjs');
|
|
181
181
|
const paginationContext = require('./pagination/pagination-context.cjs');
|
|
182
182
|
const pinInputControl = require('./pin-input/pin-input-control.cjs');
|
|
183
|
-
const
|
|
183
|
+
const pinInputInput = require('./pin-input/pin-input-input.cjs');
|
|
184
184
|
const pinInputLabel = require('./pin-input/pin-input-label.cjs');
|
|
185
185
|
const pinInputContext = require('./pin-input/pin-input-context.cjs');
|
|
186
186
|
const popoverAnchor = require('./popover/popover-anchor.cjs');
|
|
@@ -265,6 +265,7 @@ const tagsInputItemContext = require('./tags-input/tags-input-item-context.cjs')
|
|
|
265
265
|
const createToaster = require('./toast/create-toaster.cjs');
|
|
266
266
|
const toastCloseTrigger = require('./toast/toast-close-trigger.cjs');
|
|
267
267
|
const toastDescription = require('./toast/toast-description.cjs');
|
|
268
|
+
const toastGroup = require('./toast/toast-group.cjs');
|
|
268
269
|
const toastTitle = require('./toast/toast-title.cjs');
|
|
269
270
|
const toggleGroupItem = require('./toggle-group/toggle-group-item.cjs');
|
|
270
271
|
const toggleGroupContext = require('./toggle-group/toggle-group-context.cjs');
|
|
@@ -419,7 +420,7 @@ exports.FileUploadItem = fileUploadItem.FileUploadItem;
|
|
|
419
420
|
exports.FileUploadItemDeleteTrigger = fileUploadItemDeleteTrigger.FileUploadItemDeleteTrigger;
|
|
420
421
|
exports.FileUploadItemGroup = fileUploadItemGroup.FileUploadItemGroup;
|
|
421
422
|
exports.FileUploadItemName = fileUploadItemName.FileUploadItemName;
|
|
422
|
-
exports.
|
|
423
|
+
exports.FileUploadItemPreviewImage = fileUploadItemPreviewImage.FileUploadItemPreviewImage;
|
|
423
424
|
exports.FileUploadItemSizeText = fileUploadItemSizeText.FileUploadItemSizeText;
|
|
424
425
|
exports.FileUploadLabel = fileUploadLabel.FileUploadLabel;
|
|
425
426
|
exports.FileUploadTrigger = fileUploadTrigger.FileUploadTrigger;
|
|
@@ -446,7 +447,7 @@ exports.useMenuContext = menuContext.useMenuContext;
|
|
|
446
447
|
exports.NumberInputControl = numberInputControl.NumberInputControl;
|
|
447
448
|
exports.NumberInputDecrementTrigger = numberInputDecrementTrigger.NumberInputDecrementTrigger;
|
|
448
449
|
exports.NumberInputIncrementTrigger = numberInputIncrementTrigger.NumberInputIncrementTrigger;
|
|
449
|
-
exports.NumberInputInput =
|
|
450
|
+
exports.NumberInputInput = numberInputInput.NumberInputInput;
|
|
450
451
|
exports.NumberInputLabel = numberInputLabel.NumberInputLabel;
|
|
451
452
|
exports.NumberInputScrubber = numberInputScrubber.NumberInputScrubber;
|
|
452
453
|
exports.useNumberInputContext = numberInputContext.useNumberInputContext;
|
|
@@ -456,7 +457,7 @@ exports.PaginationNextTrigger = paginationNextTrigger.PaginationNextTrigger;
|
|
|
456
457
|
exports.PaginationPrevTrigger = paginationPrevTrigger.PaginationPrevTrigger;
|
|
457
458
|
exports.usePaginationContext = paginationContext.usePaginationContext;
|
|
458
459
|
exports.PinInputControl = pinInputControl.PinInputControl;
|
|
459
|
-
exports.PinInputInput =
|
|
460
|
+
exports.PinInputInput = pinInputInput.PinInputInput;
|
|
460
461
|
exports.PinInputLabel = pinInputLabel.PinInputLabel;
|
|
461
462
|
exports.usePinInputContext = pinInputContext.usePinInputContext;
|
|
462
463
|
exports.PopoverAnchor = popoverAnchor.PopoverAnchor;
|
|
@@ -543,6 +544,7 @@ exports.useTagsInputItemContext = tagsInputItemContext.useTagsInputItemContext;
|
|
|
543
544
|
exports.createToaster = createToaster.createToaster;
|
|
544
545
|
exports.ToastCloseTrigger = toastCloseTrigger.ToastCloseTrigger;
|
|
545
546
|
exports.ToastDescription = toastDescription.ToastDescription;
|
|
547
|
+
exports.ToastGroup = toastGroup.ToastGroup;
|
|
546
548
|
exports.ToastTitle = toastTitle.ToastTitle;
|
|
547
549
|
exports.ToggleGroupItem = toggleGroupItem.ToggleGroupItem;
|
|
548
550
|
exports.useToggleGroupContext = toggleGroupContext.useToggleGroupContext;
|
package/index.mjs
CHANGED
|
@@ -139,7 +139,7 @@ export { FileUploadItem } from './file-upload/file-upload-item.mjs';
|
|
|
139
139
|
export { FileUploadItemDeleteTrigger } from './file-upload/file-upload-item-delete-trigger.mjs';
|
|
140
140
|
export { FileUploadItemGroup } from './file-upload/file-upload-item-group.mjs';
|
|
141
141
|
export { FileUploadItemName } from './file-upload/file-upload-item-name.mjs';
|
|
142
|
-
export {
|
|
142
|
+
export { FileUploadItemPreviewImage } from './file-upload/file-upload-item-preview-image.mjs';
|
|
143
143
|
export { FileUploadItemSizeText } from './file-upload/file-upload-item-size-text.mjs';
|
|
144
144
|
export { FileUploadLabel } from './file-upload/file-upload-label.mjs';
|
|
145
145
|
export { FileUploadTrigger } from './file-upload/file-upload-trigger.mjs';
|
|
@@ -166,7 +166,7 @@ export { useMenuContext } from './menu/menu-context.mjs';
|
|
|
166
166
|
export { NumberInputControl } from './number-input/number-input-control.mjs';
|
|
167
167
|
export { NumberInputDecrementTrigger } from './number-input/number-input-decrement-trigger.mjs';
|
|
168
168
|
export { NumberInputIncrementTrigger } from './number-input/number-input-increment-trigger.mjs';
|
|
169
|
-
export { NumberInputInput } from './number-input/number-input-
|
|
169
|
+
export { NumberInputInput } from './number-input/number-input-input.mjs';
|
|
170
170
|
export { NumberInputLabel } from './number-input/number-input-label.mjs';
|
|
171
171
|
export { NumberInputScrubber } from './number-input/number-input-scrubber.mjs';
|
|
172
172
|
export { useNumberInputContext } from './number-input/number-input-context.mjs';
|
|
@@ -176,7 +176,7 @@ export { PaginationNextTrigger } from './pagination/pagination-next-trigger.mjs'
|
|
|
176
176
|
export { PaginationPrevTrigger } from './pagination/pagination-prev-trigger.mjs';
|
|
177
177
|
export { usePaginationContext } from './pagination/pagination-context.mjs';
|
|
178
178
|
export { PinInputControl } from './pin-input/pin-input-control.mjs';
|
|
179
|
-
export { PinInputInput } from './pin-input/pin-input-
|
|
179
|
+
export { PinInputInput } from './pin-input/pin-input-input.mjs';
|
|
180
180
|
export { PinInputLabel } from './pin-input/pin-input-label.mjs';
|
|
181
181
|
export { usePinInputContext } from './pin-input/pin-input-context.mjs';
|
|
182
182
|
export { PopoverAnchor } from './popover/popover-anchor.mjs';
|
|
@@ -261,6 +261,7 @@ export { useTagsInputItemContext } from './tags-input/tags-input-item-context.mj
|
|
|
261
261
|
export { createToaster } from './toast/create-toaster.mjs';
|
|
262
262
|
export { ToastCloseTrigger } from './toast/toast-close-trigger.mjs';
|
|
263
263
|
export { ToastDescription } from './toast/toast-description.mjs';
|
|
264
|
+
export { ToastGroup } from './toast/toast-group.mjs';
|
|
264
265
|
export { ToastTitle } from './toast/toast-title.mjs';
|
|
265
266
|
export { ToggleGroupItem } from './toggle-group/toggle-group-item.mjs';
|
|
266
267
|
export { useToggleGroupContext } from './toggle-group/toggle-group-context.mjs';
|
package/menu/menu.cjs
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('react');
|
|
7
|
+
const react = require('@zag-js/react');
|
|
8
|
+
const react$1 = require('react');
|
|
8
9
|
const createSplitProps = require('../create-split-props.cjs');
|
|
9
10
|
require('../presence/index.cjs');
|
|
10
11
|
const runIfFn = require('../run-if-fn.cjs');
|
|
@@ -40,7 +41,7 @@ const Menu = (props) => {
|
|
|
40
41
|
const parentApi = menuContext.useMenuContext();
|
|
41
42
|
const parentMachine = menuContext.useMenuMachineContext();
|
|
42
43
|
const { api, machine } = useMenu.useMenu(useMenuProps);
|
|
43
|
-
const presenceApi = usePresence.usePresence({
|
|
44
|
+
const presenceApi = usePresence.usePresence(react.mergeProps({ present: api.isOpen }, presenceProps));
|
|
44
45
|
const view = runIfFn.runIfFn(localProps.children, api);
|
|
45
46
|
useEffectOnce.useEffectOnce(() => {
|
|
46
47
|
if (!parentMachine)
|
|
@@ -48,7 +49,7 @@ const Menu = (props) => {
|
|
|
48
49
|
parentApi.setChild(machine);
|
|
49
50
|
api.setParent(parentMachine);
|
|
50
51
|
});
|
|
51
|
-
const getTriggerItemProps = react.useCallback(
|
|
52
|
+
const getTriggerItemProps = react$1.useCallback(
|
|
52
53
|
() => parentApi.getTriggerItemProps(api),
|
|
53
54
|
[api, parentApi]
|
|
54
55
|
);
|
package/menu/menu.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 { useCallback } from 'react';
|
|
4
5
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
5
6
|
import '../presence/index.mjs';
|
|
@@ -36,7 +37,7 @@ const Menu = (props) => {
|
|
|
36
37
|
const parentApi = useMenuContext();
|
|
37
38
|
const parentMachine = useMenuMachineContext();
|
|
38
39
|
const { api, machine } = useMenu(useMenuProps);
|
|
39
|
-
const presenceApi = usePresence({
|
|
40
|
+
const presenceApi = usePresence(mergeProps({ present: api.isOpen }, presenceProps));
|
|
40
41
|
const view = runIfFn(localProps.children, api);
|
|
41
42
|
useEffectOnce(() => {
|
|
42
43
|
if (!parentMachine)
|
package/number-input/index.cjs
CHANGED
|
@@ -7,8 +7,8 @@ const numberInput = require('./number-input.cjs');
|
|
|
7
7
|
const numberInputContext = require('./number-input-context.cjs');
|
|
8
8
|
const numberInputControl = require('./number-input-control.cjs');
|
|
9
9
|
const numberInputDecrementTrigger = require('./number-input-decrement-trigger.cjs');
|
|
10
|
-
const numberInputField = require('./number-input-field.cjs');
|
|
11
10
|
const numberInputIncrementTrigger = require('./number-input-increment-trigger.cjs');
|
|
11
|
+
const numberInputInput = require('./number-input-input.cjs');
|
|
12
12
|
const numberInputLabel = require('./number-input-label.cjs');
|
|
13
13
|
const numberInputScrubber = require('./number-input-scrubber.cjs');
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ const NumberInput = Object.assign(numberInput.NumberInput, {
|
|
|
16
16
|
Root: numberInput.NumberInput,
|
|
17
17
|
Control: numberInputControl.NumberInputControl,
|
|
18
18
|
DecrementTrigger: numberInputDecrementTrigger.NumberInputDecrementTrigger,
|
|
19
|
-
Input:
|
|
19
|
+
Input: numberInputInput.NumberInputInput,
|
|
20
20
|
IncrementTrigger: numberInputIncrementTrigger.NumberInputIncrementTrigger,
|
|
21
21
|
Label: numberInputLabel.NumberInputLabel,
|
|
22
22
|
Scrubber: numberInputScrubber.NumberInputScrubber
|
|
@@ -25,8 +25,8 @@ const NumberInput = Object.assign(numberInput.NumberInput, {
|
|
|
25
25
|
exports.useNumberInputContext = numberInputContext.useNumberInputContext;
|
|
26
26
|
exports.NumberInputControl = numberInputControl.NumberInputControl;
|
|
27
27
|
exports.NumberInputDecrementTrigger = numberInputDecrementTrigger.NumberInputDecrementTrigger;
|
|
28
|
-
exports.NumberInputInput = numberInputField.NumberInputInput;
|
|
29
28
|
exports.NumberInputIncrementTrigger = numberInputIncrementTrigger.NumberInputIncrementTrigger;
|
|
29
|
+
exports.NumberInputInput = numberInputInput.NumberInputInput;
|
|
30
30
|
exports.NumberInputLabel = numberInputLabel.NumberInputLabel;
|
|
31
31
|
exports.NumberInputScrubber = numberInputScrubber.NumberInputScrubber;
|
|
32
32
|
exports.NumberInput = NumberInput;
|
package/number-input/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { type NumberInputProps } from './number-input';
|
|
|
4
4
|
import { useNumberInputContext, type NumberInputContext } from './number-input-context';
|
|
5
5
|
import { NumberInputControl, type NumberInputControlProps } from './number-input-control';
|
|
6
6
|
import { NumberInputDecrementTrigger, type NumberInputDecrementTriggerProps } from './number-input-decrement-trigger';
|
|
7
|
-
import { NumberInputInput, type NumberInputInputProps } from './number-input-field';
|
|
8
7
|
import { NumberInputIncrementTrigger, type NumberInputIncrementTriggerProps } from './number-input-increment-trigger';
|
|
8
|
+
import { NumberInputInput, type NumberInputInputProps } from './number-input-input';
|
|
9
9
|
import { NumberInputLabel, type NumberInputLabelProps } from './number-input-label';
|
|
10
10
|
import { NumberInputScrubber, type NumberInputScrubberProps } from './number-input-scrubber';
|
|
11
11
|
declare const NumberInput: ForwardRefExoticComponent<NumberInputProps & RefAttributes<HTMLDivElement>> & {
|
package/number-input/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { NumberInput as NumberInput$1 } from './number-input.mjs';
|
|
|
3
3
|
export { useNumberInputContext } from './number-input-context.mjs';
|
|
4
4
|
import { NumberInputControl } from './number-input-control.mjs';
|
|
5
5
|
import { NumberInputDecrementTrigger } from './number-input-decrement-trigger.mjs';
|
|
6
|
-
import { NumberInputInput } from './number-input-field.mjs';
|
|
7
6
|
import { NumberInputIncrementTrigger } from './number-input-increment-trigger.mjs';
|
|
7
|
+
import { NumberInputInput } from './number-input-input.mjs';
|
|
8
8
|
import { NumberInputLabel } from './number-input-label.mjs';
|
|
9
9
|
import { NumberInputScrubber } from './number-input-scrubber.mjs';
|
|
10
10
|
|
|
@@ -13,40 +13,37 @@ const numberInputContext = require('./number-input-context.cjs');
|
|
|
13
13
|
const useNumberInput = require('./use-number-input.cjs');
|
|
14
14
|
|
|
15
15
|
const NumberInput = react.forwardRef((props, ref) => {
|
|
16
|
-
const [useNumberInputProps, { children, ...
|
|
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
|
-
|
|
45
|
-
"value"
|
|
46
|
-
]
|
|
47
|
-
);
|
|
16
|
+
const [useNumberInputProps, { children, ...localProps }] = createSplitProps.createSplitProps()(props, [
|
|
17
|
+
"allowMouseWheel",
|
|
18
|
+
"allowOverflow",
|
|
19
|
+
"clampValueOnBlur",
|
|
20
|
+
"defaultValue",
|
|
21
|
+
"dir",
|
|
22
|
+
"disabled",
|
|
23
|
+
"focusInputOnChange",
|
|
24
|
+
"form",
|
|
25
|
+
"formatOptions",
|
|
26
|
+
"getRootNode",
|
|
27
|
+
"id",
|
|
28
|
+
"ids",
|
|
29
|
+
"inputMode",
|
|
30
|
+
"invalid",
|
|
31
|
+
"locale",
|
|
32
|
+
"max",
|
|
33
|
+
"min",
|
|
34
|
+
"name",
|
|
35
|
+
"onFocusChange",
|
|
36
|
+
"onValueChange",
|
|
37
|
+
"onValueInvalid",
|
|
38
|
+
"pattern",
|
|
39
|
+
"readOnly",
|
|
40
|
+
"spinOnPress",
|
|
41
|
+
"step",
|
|
42
|
+
"translations",
|
|
43
|
+
"value"
|
|
44
|
+
]);
|
|
48
45
|
const api = useNumberInput.useNumberInput(useNumberInputProps);
|
|
49
|
-
const mergedProps = react$1.mergeProps(api.rootProps,
|
|
46
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
50
47
|
const view = runIfFn.runIfFn(children, api);
|
|
51
48
|
return /* @__PURE__ */ jsxRuntime.jsx(numberInputContext.NumberInputProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }) });
|
|
52
49
|
});
|
|
@@ -9,40 +9,37 @@ import { NumberInputProvider } from './number-input-context.mjs';
|
|
|
9
9
|
import { useNumberInput } from './use-number-input.mjs';
|
|
10
10
|
|
|
11
11
|
const NumberInput = forwardRef((props, ref) => {
|
|
12
|
-
const [useNumberInputProps, { children, ...
|
|
13
|
-
|
|
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
|
-
"value"
|
|
42
|
-
]
|
|
43
|
-
);
|
|
12
|
+
const [useNumberInputProps, { children, ...localProps }] = createSplitProps()(props, [
|
|
13
|
+
"allowMouseWheel",
|
|
14
|
+
"allowOverflow",
|
|
15
|
+
"clampValueOnBlur",
|
|
16
|
+
"defaultValue",
|
|
17
|
+
"dir",
|
|
18
|
+
"disabled",
|
|
19
|
+
"focusInputOnChange",
|
|
20
|
+
"form",
|
|
21
|
+
"formatOptions",
|
|
22
|
+
"getRootNode",
|
|
23
|
+
"id",
|
|
24
|
+
"ids",
|
|
25
|
+
"inputMode",
|
|
26
|
+
"invalid",
|
|
27
|
+
"locale",
|
|
28
|
+
"max",
|
|
29
|
+
"min",
|
|
30
|
+
"name",
|
|
31
|
+
"onFocusChange",
|
|
32
|
+
"onValueChange",
|
|
33
|
+
"onValueInvalid",
|
|
34
|
+
"pattern",
|
|
35
|
+
"readOnly",
|
|
36
|
+
"spinOnPress",
|
|
37
|
+
"step",
|
|
38
|
+
"translations",
|
|
39
|
+
"value"
|
|
40
|
+
]);
|
|
44
41
|
const api = useNumberInput(useNumberInputProps);
|
|
45
|
-
const mergedProps = mergeProps(api.rootProps,
|
|
42
|
+
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
46
43
|
const view = runIfFn(children, api);
|
|
47
44
|
return /* @__PURE__ */ jsx(NumberInputProvider, { value: api, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }) });
|
|
48
45
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/react",
|
|
3
|
-
"version": "1.
|
|
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",
|
|
@@ -60,76 +60,78 @@
|
|
|
60
60
|
"release-it": "release-it --config ../../../release-it.json"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@ark-ui/anatomy": "1.
|
|
64
|
-
"@zag-js/accordion": "0.
|
|
65
|
-
"@zag-js/avatar": "0.
|
|
66
|
-
"@zag-js/carousel": "0.
|
|
67
|
-
"@zag-js/checkbox": "0.
|
|
68
|
-
"@zag-js/color-picker": "0.
|
|
69
|
-
"@zag-js/color-utils": "0.
|
|
70
|
-
"@zag-js/combobox": "0.
|
|
71
|
-
"@zag-js/core": "0.
|
|
72
|
-
"@zag-js/date-picker": "0.
|
|
73
|
-
"@zag-js/date-utils": "0.
|
|
74
|
-
"@zag-js/dialog": "0.
|
|
75
|
-
"@zag-js/editable": "0.
|
|
76
|
-
"@zag-js/file-upload": "0.
|
|
77
|
-
"@zag-js/hover-card": "0.
|
|
78
|
-
"@zag-js/menu": "0.
|
|
79
|
-
"@zag-js/number-input": "0.
|
|
80
|
-
"@zag-js/pagination": "0.
|
|
81
|
-
"@zag-js/pin-input": "0.
|
|
82
|
-
"@zag-js/popover": "0.
|
|
83
|
-
"@zag-js/presence": "0.
|
|
84
|
-
"@zag-js/radio-group": "0.
|
|
85
|
-
"@zag-js/rating-group": "0.
|
|
86
|
-
"@zag-js/react": "0.
|
|
87
|
-
"@zag-js/select": "0.
|
|
88
|
-
"@zag-js/slider": "0.
|
|
89
|
-
"@zag-js/splitter": "0.
|
|
90
|
-
"@zag-js/switch": "0.
|
|
91
|
-
"@zag-js/tabs": "0.
|
|
92
|
-
"@zag-js/tags-input": "0.
|
|
93
|
-
"@zag-js/toast": "0.
|
|
94
|
-
"@zag-js/toggle-group": "0.
|
|
95
|
-
"@zag-js/tooltip": "0.
|
|
96
|
-
"@zag-js/types": "0.
|
|
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"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@release-it/keep-a-changelog": "5.0.0",
|
|
100
|
-
"@storybook/addon-a11y": "7.
|
|
101
|
-
"@storybook/addon-essentials": "7.
|
|
102
|
-
"@storybook/addons": "7.
|
|
103
|
-
"@storybook/react": "7.
|
|
104
|
-
"@storybook/react-vite": "7.
|
|
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",
|
|
105
105
|
"@testing-library/dom": "9.3.3",
|
|
106
|
-
"@testing-library/jest-dom": "6.1.
|
|
106
|
+
"@testing-library/jest-dom": "6.1.5",
|
|
107
107
|
"@testing-library/react": "14.1.2",
|
|
108
108
|
"@testing-library/user-event": "14.5.1",
|
|
109
109
|
"@types/jsdom": "21.1.6",
|
|
110
|
-
"@types/react": "18.2.
|
|
111
|
-
"@types/react-dom": "18.2.
|
|
110
|
+
"@types/react": "18.2.42",
|
|
111
|
+
"@types/react-dom": "18.2.17",
|
|
112
112
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
113
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
114
|
-
"@typescript-eslint/parser": "6.
|
|
115
|
-
"@vitejs/plugin-react": "4.2.
|
|
113
|
+
"@typescript-eslint/eslint-plugin": "6.14.0",
|
|
114
|
+
"@typescript-eslint/parser": "6.14.0",
|
|
115
|
+
"@vitejs/plugin-react": "4.2.1",
|
|
116
116
|
"@vitest/coverage-v8": "0.34.6",
|
|
117
|
-
"eslint": "8.
|
|
117
|
+
"eslint": "8.55.0",
|
|
118
|
+
"eslint-plugin-jest-dom": "5.1.0",
|
|
118
119
|
"eslint-plugin-react": "7.33.2",
|
|
119
120
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
121
|
+
"eslint-plugin-testing-library": "6.2.0",
|
|
120
122
|
"globby": "14.0.0",
|
|
121
|
-
"jsdom": "
|
|
122
|
-
"lucide-react": "0.
|
|
123
|
+
"jsdom": "23.0.1",
|
|
124
|
+
"lucide-react": "0.294.0",
|
|
123
125
|
"react": "18.2.0",
|
|
124
126
|
"react-dom": "18.2.0",
|
|
125
127
|
"react-frame-component": "5.2.6",
|
|
126
|
-
"react-hook-form": "7.
|
|
127
|
-
"release-it": "17.0.
|
|
128
|
+
"react-hook-form": "7.49.2",
|
|
129
|
+
"release-it": "17.0.1",
|
|
128
130
|
"resize-observer-polyfill": "1.5.1",
|
|
129
|
-
"storybook": "7.
|
|
130
|
-
"typescript": "5.3.
|
|
131
|
-
"vite": "
|
|
132
|
-
"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",
|
|
133
135
|
"vitest": "0.34.6"
|
|
134
136
|
},
|
|
135
137
|
"peerDependencies": {
|
|
@@ -298,6 +300,11 @@
|
|
|
298
300
|
"import": "./tooltip/index.mjs",
|
|
299
301
|
"require": "./tooltip/index.cjs"
|
|
300
302
|
},
|
|
303
|
+
"./factory": {
|
|
304
|
+
"types": "./factory/factory.d.ts",
|
|
305
|
+
"import": "./factory.mjs",
|
|
306
|
+
"require": "./factory.cjs"
|
|
307
|
+
},
|
|
301
308
|
"./package.json": "./package.json"
|
|
302
309
|
}
|
|
303
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, {
|