@ark-ui/react 5.23.0 → 5.24.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/README.md +0 -1
- package/dist/components/accordion/accordion-item.cjs +0 -1
- package/dist/components/accordion/accordion-item.js +0 -1
- package/dist/components/anatomy.cjs +190 -0
- package/dist/components/anatomy.d.cts +44 -0
- package/dist/components/anatomy.d.ts +44 -0
- package/dist/components/anatomy.js +44 -0
- package/dist/components/checkbox/checkbox.anatomy.d.cts +1 -1
- package/dist/components/checkbox/checkbox.anatomy.d.ts +1 -1
- package/dist/components/color-picker/color-picker.anatomy.d.cts +1 -1
- package/dist/components/color-picker/color-picker.anatomy.d.ts +1 -1
- package/dist/components/combobox/combobox-root.cjs +1 -0
- package/dist/components/combobox/combobox-root.js +1 -0
- package/dist/components/combobox/combobox.anatomy.d.cts +1 -1
- package/dist/components/combobox/combobox.anatomy.d.ts +1 -1
- package/dist/components/date-picker/date-picker.anatomy.d.cts +1 -1
- package/dist/components/date-picker/date-picker.anatomy.d.ts +1 -1
- package/dist/components/field/field.anatomy.d.cts +2 -2
- package/dist/components/field/field.anatomy.d.ts +2 -2
- package/dist/components/fieldset/fieldset-legend.cjs +1 -1
- package/dist/components/fieldset/fieldset-legend.d.cts +2 -2
- package/dist/components/fieldset/fieldset-legend.d.ts +2 -2
- package/dist/components/fieldset/fieldset-legend.js +1 -1
- package/dist/components/fieldset/fieldset.anatomy.d.cts +2 -2
- package/dist/components/fieldset/fieldset.anatomy.d.ts +2 -2
- package/dist/components/file-upload/file-upload-item-group.cjs +5 -2
- package/dist/components/file-upload/file-upload-item-group.d.cts +2 -1
- package/dist/components/file-upload/file-upload-item-group.d.ts +2 -1
- package/dist/components/file-upload/file-upload-item-group.js +5 -2
- package/dist/components/file-upload/file-upload-item.cjs +5 -2
- package/dist/components/file-upload/file-upload-item.d.cts +3 -1
- package/dist/components/file-upload/file-upload-item.d.ts +3 -1
- package/dist/components/file-upload/file-upload-item.js +5 -2
- package/dist/components/file-upload/use-file-upload-item-group-props-context.cjs +15 -0
- package/dist/components/file-upload/use-file-upload-item-group-props-context.d.cts +5 -0
- package/dist/components/file-upload/use-file-upload-item-group-props-context.d.ts +5 -0
- package/dist/components/file-upload/use-file-upload-item-group-props-context.js +10 -0
- package/dist/components/frame/frame.cjs +6 -4
- package/dist/components/frame/frame.js +6 -4
- package/dist/components/index.cjs +0 -42
- package/dist/components/index.d.cts +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -19
- package/dist/components/listbox/listbox.anatomy.d.cts +1 -1
- package/dist/components/listbox/listbox.anatomy.d.ts +1 -1
- package/dist/components/segment-group/segment-group.anatomy.d.cts +2 -2
- package/dist/components/segment-group/segment-group.anatomy.d.ts +2 -2
- package/dist/components/tour/tour.anatomy.d.cts +1 -1
- package/dist/components/tour/tour.anatomy.d.ts +1 -1
- package/dist/index.cjs +0 -42
- package/dist/index.js +0 -19
- package/package.json +70 -71
- package/dist/components/time-picker/index.cjs +0 -49
- package/dist/components/time-picker/index.d.cts +0 -19
- package/dist/components/time-picker/index.d.ts +0 -19
- package/dist/components/time-picker/index.js +0 -19
- package/dist/components/time-picker/time-picker-cell.cjs +0 -29
- package/dist/components/time-picker/time-picker-cell.d.cts +0 -13
- package/dist/components/time-picker/time-picker-cell.d.ts +0 -13
- package/dist/components/time-picker/time-picker-cell.js +0 -25
- package/dist/components/time-picker/time-picker-clear-trigger.cjs +0 -19
- package/dist/components/time-picker/time-picker-clear-trigger.d.cts +0 -7
- package/dist/components/time-picker/time-picker-clear-trigger.d.ts +0 -7
- package/dist/components/time-picker/time-picker-clear-trigger.js +0 -15
- package/dist/components/time-picker/time-picker-column.cjs +0 -22
- package/dist/components/time-picker/time-picker-column.d.cts +0 -8
- package/dist/components/time-picker/time-picker-column.d.ts +0 -8
- package/dist/components/time-picker/time-picker-column.js +0 -18
- package/dist/components/time-picker/time-picker-content.cjs +0 -25
- package/dist/components/time-picker/time-picker-content.d.cts +0 -7
- package/dist/components/time-picker/time-picker-content.d.ts +0 -7
- package/dist/components/time-picker/time-picker-content.js +0 -21
- package/dist/components/time-picker/time-picker-context.cjs +0 -10
- package/dist/components/time-picker/time-picker-context.d.cts +0 -6
- package/dist/components/time-picker/time-picker-context.d.ts +0 -6
- package/dist/components/time-picker/time-picker-context.js +0 -6
- package/dist/components/time-picker/time-picker-control.cjs +0 -19
- package/dist/components/time-picker/time-picker-control.d.cts +0 -7
- package/dist/components/time-picker/time-picker-control.d.ts +0 -7
- package/dist/components/time-picker/time-picker-control.js +0 -15
- package/dist/components/time-picker/time-picker-input.cjs +0 -19
- package/dist/components/time-picker/time-picker-input.d.cts +0 -7
- package/dist/components/time-picker/time-picker-input.d.ts +0 -7
- package/dist/components/time-picker/time-picker-input.js +0 -15
- package/dist/components/time-picker/time-picker-label.cjs +0 -19
- package/dist/components/time-picker/time-picker-label.d.cts +0 -7
- package/dist/components/time-picker/time-picker-label.d.ts +0 -7
- package/dist/components/time-picker/time-picker-label.js +0 -15
- package/dist/components/time-picker/time-picker-positioner.cjs +0 -24
- package/dist/components/time-picker/time-picker-positioner.d.cts +0 -7
- package/dist/components/time-picker/time-picker-positioner.d.ts +0 -7
- package/dist/components/time-picker/time-picker-positioner.js +0 -20
- package/dist/components/time-picker/time-picker-root-provider.cjs +0 -25
- package/dist/components/time-picker/time-picker-root-provider.d.cts +0 -13
- package/dist/components/time-picker/time-picker-root-provider.d.ts +0 -13
- package/dist/components/time-picker/time-picker-root-provider.js +0 -21
- package/dist/components/time-picker/time-picker-root.cjs +0 -48
- package/dist/components/time-picker/time-picker-root.d.cts +0 -10
- package/dist/components/time-picker/time-picker-root.d.ts +0 -10
- package/dist/components/time-picker/time-picker-root.js +0 -44
- package/dist/components/time-picker/time-picker-spacer.cjs +0 -19
- package/dist/components/time-picker/time-picker-spacer.d.cts +0 -7
- package/dist/components/time-picker/time-picker-spacer.d.ts +0 -7
- package/dist/components/time-picker/time-picker-spacer.js +0 -15
- package/dist/components/time-picker/time-picker-trigger.cjs +0 -19
- package/dist/components/time-picker/time-picker-trigger.d.cts +0 -7
- package/dist/components/time-picker/time-picker-trigger.d.ts +0 -7
- package/dist/components/time-picker/time-picker-trigger.js +0 -15
- package/dist/components/time-picker/time-picker.anatomy.d.cts +0 -1
- package/dist/components/time-picker/time-picker.anatomy.d.ts +0 -1
- package/dist/components/time-picker/time-picker.cjs +0 -33
- package/dist/components/time-picker/time-picker.d.cts +0 -14
- package/dist/components/time-picker/time-picker.d.ts +0 -14
- package/dist/components/time-picker/time-picker.js +0 -13
- package/dist/components/time-picker/use-time-picker-column-props-context.cjs +0 -15
- package/dist/components/time-picker/use-time-picker-column-props-context.d.cts +0 -6
- package/dist/components/time-picker/use-time-picker-column-props-context.d.ts +0 -6
- package/dist/components/time-picker/use-time-picker-column-props-context.js +0 -10
- package/dist/components/time-picker/use-time-picker-context.cjs +0 -15
- package/dist/components/time-picker/use-time-picker-context.d.cts +0 -5
- package/dist/components/time-picker/use-time-picker-context.d.ts +0 -5
- package/dist/components/time-picker/use-time-picker-context.js +0 -10
- package/dist/components/time-picker/use-time-picker.cjs +0 -46
- package/dist/components/time-picker/use-time-picker.d.cts +0 -8
- package/dist/components/time-picker/use-time-picker.d.ts +0 -8
- package/dist/components/time-picker/use-time-picker.js +0 -23
package/README.md
CHANGED
|
@@ -53,7 +53,6 @@ Ark UI is available for the following JavaScript frameworks:
|
|
|
53
53
|
- [Switch](https://ark-ui.com/react/docs/components/switch)
|
|
54
54
|
- [Tabs](https://ark-ui.com/react/docs/components/tabs)
|
|
55
55
|
- [Tags Input](https://ark-ui.com/react/docs/components/tags-input)
|
|
56
|
-
- [Time Picker](https://ark-ui.com/react/docs/components/time-picker)
|
|
57
56
|
- [Timer](https://ark-ui.com/react/docs/components/timer)
|
|
58
57
|
- [Toast](https://ark-ui.com/react/docs/components/toast)
|
|
59
58
|
- [Toggle Group](https://ark-ui.com/react/docs/components/toggle-group)
|
|
@@ -11,7 +11,6 @@ const useAccordionItemContext = require('./use-accordion-item-context.cjs');
|
|
|
11
11
|
const collapsibleRoot = require('../collapsible/collapsible-root.cjs');
|
|
12
12
|
require('@zag-js/color-picker');
|
|
13
13
|
require('@zag-js/date-picker');
|
|
14
|
-
require('@internationalized/date');
|
|
15
14
|
const createSplitProps = require('../../utils/create-split-props.cjs');
|
|
16
15
|
const renderStrategy = require('../../utils/render-strategy.cjs');
|
|
17
16
|
const useAccordionItemPropsContext = require('./use-accordion-item-props-context.cjs');
|
|
@@ -7,7 +7,6 @@ import { AccordionItemProvider } from './use-accordion-item-context.js';
|
|
|
7
7
|
import { CollapsibleRoot } from '../collapsible/collapsible-root.js';
|
|
8
8
|
import '@zag-js/color-picker';
|
|
9
9
|
import '@zag-js/date-picker';
|
|
10
|
-
import '@internationalized/date';
|
|
11
10
|
import { createSplitProps } from '../../utils/create-split-props.js';
|
|
12
11
|
import { useRenderStrategyPropsContext } from '../../utils/render-strategy.js';
|
|
13
12
|
import { AccordionItemPropsProvider } from './use-accordion-item-props-context.js';
|
|
@@ -3,9 +3,199 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const anatomy = require('@zag-js/anatomy');
|
|
6
|
+
const checkbox_anatomy = require('./checkbox/checkbox.anatomy.cjs');
|
|
7
|
+
const colorPicker_anatomy = require('./color-picker/color-picker.anatomy.cjs');
|
|
8
|
+
const combobox_anatomy = require('./combobox/combobox.anatomy.cjs');
|
|
9
|
+
const datePicker_anatomy = require('./date-picker/date-picker.anatomy.cjs');
|
|
10
|
+
const field_anatomy = require('./field/field.anatomy.cjs');
|
|
11
|
+
const fieldset_anatomy = require('./fieldset/fieldset.anatomy.cjs');
|
|
12
|
+
const listbox_anatomy = require('./listbox/listbox.anatomy.cjs');
|
|
13
|
+
const segmentGroup_anatomy = require('./segment-group/segment-group.anatomy.cjs');
|
|
14
|
+
const toggle_anatomy = require('./toggle/toggle.anatomy.cjs');
|
|
15
|
+
const tour_anatomy = require('./tour/tour.anatomy.cjs');
|
|
16
|
+
const accordion = require('@zag-js/accordion');
|
|
17
|
+
const avatar = require('@zag-js/avatar');
|
|
18
|
+
const carousel = require('@zag-js/carousel');
|
|
19
|
+
const clipboard = require('@zag-js/clipboard');
|
|
20
|
+
const collapsible = require('@zag-js/collapsible');
|
|
21
|
+
const dialog = require('@zag-js/dialog');
|
|
22
|
+
const editable = require('@zag-js/editable');
|
|
23
|
+
const fileUpload = require('@zag-js/file-upload');
|
|
24
|
+
const floatingPanel = require('@zag-js/floating-panel');
|
|
25
|
+
const hoverCard = require('@zag-js/hover-card');
|
|
26
|
+
const menu = require('@zag-js/menu');
|
|
27
|
+
const numberInput = require('@zag-js/number-input');
|
|
28
|
+
const pagination = require('@zag-js/pagination');
|
|
29
|
+
const passwordInput = require('@zag-js/password-input');
|
|
30
|
+
const pinInput = require('@zag-js/pin-input');
|
|
31
|
+
const popover = require('@zag-js/popover');
|
|
32
|
+
const progress = require('@zag-js/progress');
|
|
33
|
+
const qrcode = require('@zag-js/qr-code');
|
|
34
|
+
const radio = require('@zag-js/radio-group');
|
|
35
|
+
const rating = require('@zag-js/rating-group');
|
|
36
|
+
const scrollArea = require('@zag-js/scroll-area');
|
|
37
|
+
const select = require('@zag-js/select');
|
|
38
|
+
const signaturePad = require('@zag-js/signature-pad');
|
|
39
|
+
const slider = require('@zag-js/slider');
|
|
40
|
+
const splitter = require('@zag-js/splitter');
|
|
41
|
+
const steps = require('@zag-js/steps');
|
|
42
|
+
const zagSwitch = require('@zag-js/switch');
|
|
43
|
+
const tabs = require('@zag-js/tabs');
|
|
44
|
+
const tagsInput = require('@zag-js/tags-input');
|
|
45
|
+
const timer = require('@zag-js/timer');
|
|
46
|
+
const toast = require('@zag-js/toast');
|
|
47
|
+
const toggleGroup = require('@zag-js/toggle-group');
|
|
48
|
+
const tooltip = require('@zag-js/tooltip');
|
|
49
|
+
const treeView = require('@zag-js/tree-view');
|
|
6
50
|
|
|
7
51
|
|
|
8
52
|
|
|
53
|
+
exports.checkboxAnatomy = checkbox_anatomy.checkboxAnatomy;
|
|
54
|
+
exports.colorPickerAnatomy = colorPicker_anatomy.colorPickerAnatomy;
|
|
55
|
+
exports.comboboxAnatomy = combobox_anatomy.comboboxAnatomy;
|
|
56
|
+
exports.datePickerAnatomy = datePicker_anatomy.datePickerAnatomy;
|
|
57
|
+
exports.fieldAnatomy = field_anatomy.fieldAnatomy;
|
|
58
|
+
exports.fieldsetAnatomy = fieldset_anatomy.fieldsetAnatomy;
|
|
59
|
+
exports.listboxAnatomy = listbox_anatomy.listboxAnatomy;
|
|
60
|
+
exports.segmentGroupAnatomy = segmentGroup_anatomy.segmentGroupAnatomy;
|
|
61
|
+
exports.toggleAnatomy = toggle_anatomy.toggleAnatomy;
|
|
62
|
+
exports.tourAnatomy = tour_anatomy.tourAnatomy;
|
|
63
|
+
Object.defineProperty(exports, "accordionAnatomy", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: () => accordion.anatomy
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "avatarAnatomy", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: () => avatar.anatomy
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "carouselAnatomy", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: () => carousel.anatomy
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "clipboardAnatomy", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: () => clipboard.anatomy
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "collapsibleAnatomy", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: () => collapsible.anatomy
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, "dialogAnatomy", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: () => dialog.anatomy
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "editableAnatomy", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: () => editable.anatomy
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "fileUploadAnatomy", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: () => fileUpload.anatomy
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(exports, "floatingPanelAnatomy", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: () => floatingPanel.anatomy
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, "hoverCardAnatomy", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: () => hoverCard.anatomy
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "menuAnatomy", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: () => menu.anatomy
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(exports, "numberInputAnatomy", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: () => numberInput.anatomy
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "paginationAnatomy", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: () => pagination.anatomy
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "passwordInputAnatomy", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: () => passwordInput.anatomy
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(exports, "pinInputAnatomy", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: () => pinInput.anatomy
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, "popoverAnatomy", {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: () => popover.anatomy
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "progressAnatomy", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: () => progress.anatomy
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(exports, "qrCodeAnatomy", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: () => qrcode.anatomy
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, "radioGroupAnatomy", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: () => radio.anatomy
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, "ratingGroupAnatomy", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: () => rating.anatomy
|
|
142
|
+
});
|
|
143
|
+
Object.defineProperty(exports, "scrollAreaAnatomy", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: () => scrollArea.anatomy
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(exports, "selectAnatomy", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: () => select.anatomy
|
|
150
|
+
});
|
|
151
|
+
Object.defineProperty(exports, "signaturePadAnatomy", {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: () => signaturePad.anatomy
|
|
154
|
+
});
|
|
155
|
+
Object.defineProperty(exports, "sliderAnatomy", {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: () => slider.anatomy
|
|
158
|
+
});
|
|
159
|
+
Object.defineProperty(exports, "splitterAnatomy", {
|
|
160
|
+
enumerable: true,
|
|
161
|
+
get: () => splitter.anatomy
|
|
162
|
+
});
|
|
163
|
+
Object.defineProperty(exports, "stepsAnatomy", {
|
|
164
|
+
enumerable: true,
|
|
165
|
+
get: () => steps.anatomy
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, "switchAnatomy", {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: () => zagSwitch.anatomy
|
|
170
|
+
});
|
|
171
|
+
Object.defineProperty(exports, "tabsAnatomy", {
|
|
172
|
+
enumerable: true,
|
|
173
|
+
get: () => tabs.anatomy
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(exports, "tagsInputAnatomy", {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: () => tagsInput.anatomy
|
|
178
|
+
});
|
|
179
|
+
Object.defineProperty(exports, "timerAnatomy", {
|
|
180
|
+
enumerable: true,
|
|
181
|
+
get: () => timer.anatomy
|
|
182
|
+
});
|
|
183
|
+
Object.defineProperty(exports, "toastAnatomy", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: () => toast.anatomy
|
|
186
|
+
});
|
|
187
|
+
Object.defineProperty(exports, "toggleGroupAnatomy", {
|
|
188
|
+
enumerable: true,
|
|
189
|
+
get: () => toggleGroup.anatomy
|
|
190
|
+
});
|
|
191
|
+
Object.defineProperty(exports, "tooltipAnatomy", {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
get: () => tooltip.anatomy
|
|
194
|
+
});
|
|
195
|
+
Object.defineProperty(exports, "treeViewAnatomy", {
|
|
196
|
+
enumerable: true,
|
|
197
|
+
get: () => treeView.anatomy
|
|
198
|
+
});
|
|
9
199
|
Object.keys(anatomy).forEach(k => {
|
|
10
200
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
11
201
|
enumerable: true,
|
|
@@ -1 +1,45 @@
|
|
|
1
1
|
export * from '@zag-js/anatomy';
|
|
2
|
+
export { accordionAnatomy } from './accordion/accordion.anatomy';
|
|
3
|
+
export { avatarAnatomy } from './avatar/avatar.anatomy';
|
|
4
|
+
export { carouselAnatomy } from './carousel/carousel.anatomy';
|
|
5
|
+
export { checkboxAnatomy } from './checkbox/checkbox.anatomy';
|
|
6
|
+
export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
7
|
+
export { collapsibleAnatomy } from './collapsible/collapsible.anatomy';
|
|
8
|
+
export { colorPickerAnatomy } from './color-picker/color-picker.anatomy';
|
|
9
|
+
export { comboboxAnatomy } from './combobox/combobox.anatomy';
|
|
10
|
+
export { datePickerAnatomy } from './date-picker/date-picker.anatomy';
|
|
11
|
+
export { dialogAnatomy } from './dialog/dialog.anatomy';
|
|
12
|
+
export { editableAnatomy } from './editable/editable.anatomy';
|
|
13
|
+
export { fieldAnatomy } from './field/field.anatomy';
|
|
14
|
+
export { fieldsetAnatomy } from './fieldset/fieldset.anatomy';
|
|
15
|
+
export { fileUploadAnatomy } from './file-upload/file-upload.anatomy';
|
|
16
|
+
export { floatingPanelAnatomy } from './floating-panel/floating-panel.anatomy';
|
|
17
|
+
export { hoverCardAnatomy } from './hover-card/hover-card.anatomy';
|
|
18
|
+
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
19
|
+
export { menuAnatomy } from './menu/menu.anatomy';
|
|
20
|
+
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
21
|
+
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
|
22
|
+
export { passwordInputAnatomy } from './password-input/password-input.anatomy';
|
|
23
|
+
export { pinInputAnatomy } from './pin-input/pin-input.anatomy';
|
|
24
|
+
export { popoverAnatomy } from './popover/popover.anatomy';
|
|
25
|
+
export { progressAnatomy } from './progress/progress.anatomy';
|
|
26
|
+
export { qrCodeAnatomy } from './qr-code/qr-code.anatomy';
|
|
27
|
+
export { radioGroupAnatomy } from './radio-group/radio-group.anatomy';
|
|
28
|
+
export { ratingGroupAnatomy } from './rating-group/rating-group.anatomy';
|
|
29
|
+
export { scrollAreaAnatomy } from './scroll-area/scroll-area.anatomy';
|
|
30
|
+
export { segmentGroupAnatomy } from './segment-group/segment-group.anatomy';
|
|
31
|
+
export { selectAnatomy } from './select/select.anatomy';
|
|
32
|
+
export { signaturePadAnatomy } from './signature-pad/signature-pad.anatomy';
|
|
33
|
+
export { sliderAnatomy } from './slider/slider.anatomy';
|
|
34
|
+
export { splitterAnatomy } from './splitter/splitter.anatomy';
|
|
35
|
+
export { stepsAnatomy } from './steps/steps.anatomy';
|
|
36
|
+
export { switchAnatomy } from './switch/switch.anatomy';
|
|
37
|
+
export { tabsAnatomy } from './tabs/tabs.anatomy';
|
|
38
|
+
export { tagsInputAnatomy } from './tags-input/tags-input.anatomy';
|
|
39
|
+
export { timerAnatomy } from './timer/timer.anatomy';
|
|
40
|
+
export { toastAnatomy } from './toast/toast.anatomy';
|
|
41
|
+
export { toggleAnatomy } from './toggle/toggle.anatomy';
|
|
42
|
+
export { toggleGroupAnatomy } from './toggle-group/toggle-group.anatomy';
|
|
43
|
+
export { tooltipAnatomy } from './tooltip/tooltip.anatomy';
|
|
44
|
+
export { tourAnatomy } from './tour/tour.anatomy';
|
|
45
|
+
export { treeViewAnatomy } from './tree-view/tree-view.anatomy';
|
|
@@ -1 +1,45 @@
|
|
|
1
1
|
export * from '@zag-js/anatomy';
|
|
2
|
+
export { accordionAnatomy } from './accordion/accordion.anatomy';
|
|
3
|
+
export { avatarAnatomy } from './avatar/avatar.anatomy';
|
|
4
|
+
export { carouselAnatomy } from './carousel/carousel.anatomy';
|
|
5
|
+
export { checkboxAnatomy } from './checkbox/checkbox.anatomy';
|
|
6
|
+
export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
7
|
+
export { collapsibleAnatomy } from './collapsible/collapsible.anatomy';
|
|
8
|
+
export { colorPickerAnatomy } from './color-picker/color-picker.anatomy';
|
|
9
|
+
export { comboboxAnatomy } from './combobox/combobox.anatomy';
|
|
10
|
+
export { datePickerAnatomy } from './date-picker/date-picker.anatomy';
|
|
11
|
+
export { dialogAnatomy } from './dialog/dialog.anatomy';
|
|
12
|
+
export { editableAnatomy } from './editable/editable.anatomy';
|
|
13
|
+
export { fieldAnatomy } from './field/field.anatomy';
|
|
14
|
+
export { fieldsetAnatomy } from './fieldset/fieldset.anatomy';
|
|
15
|
+
export { fileUploadAnatomy } from './file-upload/file-upload.anatomy';
|
|
16
|
+
export { floatingPanelAnatomy } from './floating-panel/floating-panel.anatomy';
|
|
17
|
+
export { hoverCardAnatomy } from './hover-card/hover-card.anatomy';
|
|
18
|
+
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
19
|
+
export { menuAnatomy } from './menu/menu.anatomy';
|
|
20
|
+
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
21
|
+
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
|
22
|
+
export { passwordInputAnatomy } from './password-input/password-input.anatomy';
|
|
23
|
+
export { pinInputAnatomy } from './pin-input/pin-input.anatomy';
|
|
24
|
+
export { popoverAnatomy } from './popover/popover.anatomy';
|
|
25
|
+
export { progressAnatomy } from './progress/progress.anatomy';
|
|
26
|
+
export { qrCodeAnatomy } from './qr-code/qr-code.anatomy';
|
|
27
|
+
export { radioGroupAnatomy } from './radio-group/radio-group.anatomy';
|
|
28
|
+
export { ratingGroupAnatomy } from './rating-group/rating-group.anatomy';
|
|
29
|
+
export { scrollAreaAnatomy } from './scroll-area/scroll-area.anatomy';
|
|
30
|
+
export { segmentGroupAnatomy } from './segment-group/segment-group.anatomy';
|
|
31
|
+
export { selectAnatomy } from './select/select.anatomy';
|
|
32
|
+
export { signaturePadAnatomy } from './signature-pad/signature-pad.anatomy';
|
|
33
|
+
export { sliderAnatomy } from './slider/slider.anatomy';
|
|
34
|
+
export { splitterAnatomy } from './splitter/splitter.anatomy';
|
|
35
|
+
export { stepsAnatomy } from './steps/steps.anatomy';
|
|
36
|
+
export { switchAnatomy } from './switch/switch.anatomy';
|
|
37
|
+
export { tabsAnatomy } from './tabs/tabs.anatomy';
|
|
38
|
+
export { tagsInputAnatomy } from './tags-input/tags-input.anatomy';
|
|
39
|
+
export { timerAnatomy } from './timer/timer.anatomy';
|
|
40
|
+
export { toastAnatomy } from './toast/toast.anatomy';
|
|
41
|
+
export { toggleAnatomy } from './toggle/toggle.anatomy';
|
|
42
|
+
export { toggleGroupAnatomy } from './toggle-group/toggle-group.anatomy';
|
|
43
|
+
export { tooltipAnatomy } from './tooltip/tooltip.anatomy';
|
|
44
|
+
export { tourAnatomy } from './tour/tour.anatomy';
|
|
45
|
+
export { treeViewAnatomy } from './tree-view/tree-view.anatomy';
|
|
@@ -1 +1,45 @@
|
|
|
1
1
|
export * from '@zag-js/anatomy';
|
|
2
|
+
export { checkboxAnatomy } from './checkbox/checkbox.anatomy.js';
|
|
3
|
+
export { colorPickerAnatomy } from './color-picker/color-picker.anatomy.js';
|
|
4
|
+
export { comboboxAnatomy } from './combobox/combobox.anatomy.js';
|
|
5
|
+
export { datePickerAnatomy } from './date-picker/date-picker.anatomy.js';
|
|
6
|
+
export { fieldAnatomy } from './field/field.anatomy.js';
|
|
7
|
+
export { fieldsetAnatomy } from './fieldset/fieldset.anatomy.js';
|
|
8
|
+
export { listboxAnatomy } from './listbox/listbox.anatomy.js';
|
|
9
|
+
export { segmentGroupAnatomy } from './segment-group/segment-group.anatomy.js';
|
|
10
|
+
export { toggleAnatomy } from './toggle/toggle.anatomy.js';
|
|
11
|
+
export { tourAnatomy } from './tour/tour.anatomy.js';
|
|
12
|
+
export { anatomy as accordionAnatomy } from '@zag-js/accordion';
|
|
13
|
+
export { anatomy as avatarAnatomy } from '@zag-js/avatar';
|
|
14
|
+
export { anatomy as carouselAnatomy } from '@zag-js/carousel';
|
|
15
|
+
export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
|
|
16
|
+
export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
|
|
17
|
+
export { anatomy as dialogAnatomy } from '@zag-js/dialog';
|
|
18
|
+
export { anatomy as editableAnatomy } from '@zag-js/editable';
|
|
19
|
+
export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
|
|
20
|
+
export { anatomy as floatingPanelAnatomy } from '@zag-js/floating-panel';
|
|
21
|
+
export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
|
|
22
|
+
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
|
23
|
+
export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
|
|
24
|
+
export { anatomy as paginationAnatomy } from '@zag-js/pagination';
|
|
25
|
+
export { anatomy as passwordInputAnatomy } from '@zag-js/password-input';
|
|
26
|
+
export { anatomy as pinInputAnatomy } from '@zag-js/pin-input';
|
|
27
|
+
export { anatomy as popoverAnatomy } from '@zag-js/popover';
|
|
28
|
+
export { anatomy as progressAnatomy } from '@zag-js/progress';
|
|
29
|
+
export { anatomy as qrCodeAnatomy } from '@zag-js/qr-code';
|
|
30
|
+
export { anatomy as radioGroupAnatomy } from '@zag-js/radio-group';
|
|
31
|
+
export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
|
|
32
|
+
export { anatomy as scrollAreaAnatomy } from '@zag-js/scroll-area';
|
|
33
|
+
export { anatomy as selectAnatomy } from '@zag-js/select';
|
|
34
|
+
export { anatomy as signaturePadAnatomy } from '@zag-js/signature-pad';
|
|
35
|
+
export { anatomy as sliderAnatomy } from '@zag-js/slider';
|
|
36
|
+
export { anatomy as splitterAnatomy } from '@zag-js/splitter';
|
|
37
|
+
export { anatomy as stepsAnatomy } from '@zag-js/steps';
|
|
38
|
+
export { anatomy as switchAnatomy } from '@zag-js/switch';
|
|
39
|
+
export { anatomy as tabsAnatomy } from '@zag-js/tabs';
|
|
40
|
+
export { anatomy as tagsInputAnatomy } from '@zag-js/tags-input';
|
|
41
|
+
export { anatomy as timerAnatomy } from '@zag-js/timer';
|
|
42
|
+
export { anatomy as toastAnatomy } from '@zag-js/toast';
|
|
43
|
+
export { anatomy as toggleGroupAnatomy } from '@zag-js/toggle-group';
|
|
44
|
+
export { anatomy as tooltipAnatomy } from '@zag-js/tooltip';
|
|
45
|
+
export { anatomy as treeViewAnatomy } from '@zag-js/tree-view';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const checkboxAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const checkboxAnatomy: AnatomyInstance<"root" | "label" | "control" | "indicator" | "group">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const checkboxAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const checkboxAnatomy: AnatomyInstance<"root" | "label" | "control" | "indicator" | "group">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const colorPickerAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const colorPickerAnatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "area" | "trigger" | "positioner" | "areaThumb" | "valueText" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect" | "view">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const colorPickerAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const colorPickerAnatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "area" | "trigger" | "positioner" | "areaThumb" | "valueText" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect" | "view">;
|
|
@@ -18,6 +18,7 @@ const ComboboxImpl = (props, ref) => {
|
|
|
18
18
|
const [presenceProps, comboboxProps] = splitPresenceProps.splitPresenceProps(props);
|
|
19
19
|
const [useComboboxProps, localProps] = createSplitProps.createSplitProps()(comboboxProps, [
|
|
20
20
|
"allowCustomValue",
|
|
21
|
+
"alwaysSubmitOnEnter",
|
|
21
22
|
"autoFocus",
|
|
22
23
|
"closeOnSelect",
|
|
23
24
|
"collection",
|
|
@@ -14,6 +14,7 @@ const ComboboxImpl = (props, ref) => {
|
|
|
14
14
|
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
15
15
|
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, [
|
|
16
16
|
"allowCustomValue",
|
|
17
|
+
"alwaysSubmitOnEnter",
|
|
17
18
|
"autoFocus",
|
|
18
19
|
"closeOnSelect",
|
|
19
20
|
"collection",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const comboboxAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const comboboxAnatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "trigger" | "positioner" | "list" | "input" | "item" | "clearTrigger" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "empty">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const comboboxAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const comboboxAnatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "trigger" | "positioner" | "list" | "input" | "item" | "clearTrigger" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "empty">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const datePickerAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const datePickerAnatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "trigger" | "positioner" | "view" | "input" | "clearTrigger" | "table" | "monthSelect" | "nextTrigger" | "presetTrigger" | "prevTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnatomyInstance } from '@zag-js/anatomy';
|
|
2
|
-
export declare const datePickerAnatomy: AnatomyInstance<"
|
|
2
|
+
export declare const datePickerAnatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "trigger" | "positioner" | "view" | "input" | "clearTrigger" | "table" | "monthSelect" | "nextTrigger" | "presetTrigger" | "prevTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect">;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
-
export declare const fieldAnatomy: AnatomyInstance<"
|
|
3
|
-
export declare const parts: Record<"
|
|
2
|
+
export declare const fieldAnatomy: AnatomyInstance<"root" | "label" | "input" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator">;
|
|
3
|
+
export declare const parts: Record<"root" | "label" | "input" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", AnatomyPart>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
-
export declare const fieldAnatomy: AnatomyInstance<"
|
|
3
|
-
export declare const parts: Record<"
|
|
2
|
+
export declare const fieldAnatomy: AnatomyInstance<"root" | "label" | "input" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator">;
|
|
3
|
+
export declare const parts: Record<"root" | "label" | "input" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", AnatomyPart>;
|
|
@@ -12,7 +12,7 @@ const useFieldsetContext = require('./use-fieldset-context.cjs');
|
|
|
12
12
|
const FieldsetLegend = react.forwardRef((props, ref) => {
|
|
13
13
|
const fieldset = useFieldsetContext.useFieldsetContext();
|
|
14
14
|
const mergedProps = react$1.mergeProps(fieldset.getLegendProps(), props);
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.legend, { ...mergedProps, ref });
|
|
16
16
|
});
|
|
17
17
|
FieldsetLegend.displayName = "FieldsetLegend";
|
|
18
18
|
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface FieldsetLegendBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface FieldsetLegendProps extends HTMLProps<'
|
|
5
|
+
export interface FieldsetLegendProps extends HTMLProps<'legend'>, FieldsetLegendBaseProps {
|
|
6
6
|
}
|
|
7
|
-
export declare const FieldsetLegend: ForwardRefExoticComponent<FieldsetLegendProps & RefAttributes<
|
|
7
|
+
export declare const FieldsetLegend: ForwardRefExoticComponent<FieldsetLegendProps & RefAttributes<HTMLLegendElement>>;
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface FieldsetLegendBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface FieldsetLegendProps extends HTMLProps<'
|
|
5
|
+
export interface FieldsetLegendProps extends HTMLProps<'legend'>, FieldsetLegendBaseProps {
|
|
6
6
|
}
|
|
7
|
-
export declare const FieldsetLegend: ForwardRefExoticComponent<FieldsetLegendProps & RefAttributes<
|
|
7
|
+
export declare const FieldsetLegend: ForwardRefExoticComponent<FieldsetLegendProps & RefAttributes<HTMLLegendElement>>;
|
|
@@ -8,7 +8,7 @@ import { useFieldsetContext } from './use-fieldset-context.js';
|
|
|
8
8
|
const FieldsetLegend = forwardRef((props, ref) => {
|
|
9
9
|
const fieldset = useFieldsetContext();
|
|
10
10
|
const mergedProps = mergeProps(fieldset.getLegendProps(), props);
|
|
11
|
-
return /* @__PURE__ */ jsx(ark.
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.legend, { ...mergedProps, ref });
|
|
12
12
|
});
|
|
13
13
|
FieldsetLegend.displayName = "FieldsetLegend";
|
|
14
14
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
-
export declare const fieldsetAnatomy: AnatomyInstance<"
|
|
3
|
-
export declare const parts: Record<"
|
|
2
|
+
export declare const fieldsetAnatomy: AnatomyInstance<"root" | "errorText" | "helperText" | "legend">;
|
|
3
|
+
export declare const parts: Record<"root" | "errorText" | "helperText" | "legend", AnatomyPart>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
-
export declare const fieldsetAnatomy: AnatomyInstance<"
|
|
3
|
-
export declare const parts: Record<"
|
|
2
|
+
export declare const fieldsetAnatomy: AnatomyInstance<"root" | "errorText" | "helperText" | "legend">;
|
|
3
|
+
export declare const parts: Record<"root" | "errorText" | "helperText" | "legend", AnatomyPart>;
|
|
@@ -6,13 +6,16 @@ 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('../../utils/create-split-props.cjs');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
11
|
const useFileUploadContext = require('./use-file-upload-context.cjs');
|
|
12
|
+
const useFileUploadItemGroupPropsContext = require('./use-file-upload-item-group-props-context.cjs');
|
|
11
13
|
|
|
12
14
|
const FileUploadItemGroup = react.forwardRef((props, ref) => {
|
|
15
|
+
const [itemGroupProps, localProps] = createSplitProps.createSplitProps()(props, ["type"]);
|
|
13
16
|
const fileUpload = useFileUploadContext.useFileUploadContext();
|
|
14
|
-
const mergedProps = react$1.mergeProps(fileUpload.getItemGroupProps(),
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.ul, { ...mergedProps, ref });
|
|
17
|
+
const mergedProps = react$1.mergeProps(fileUpload.getItemGroupProps(itemGroupProps), localProps);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useFileUploadItemGroupPropsContext.FileUploadItemGroupPropsProvider, { value: itemGroupProps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.ul, { ...mergedProps, ref }) });
|
|
16
19
|
});
|
|
17
20
|
FileUploadItemGroup.displayName = "FileUploadItemGroup";
|
|
18
21
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ItemGroupProps } from '@zag-js/file-upload';
|
|
1
2
|
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
3
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
-
export interface FileUploadItemGroupBaseProps extends PolymorphicProps {
|
|
4
|
+
export interface FileUploadItemGroupBaseProps extends PolymorphicProps, ItemGroupProps {
|
|
4
5
|
}
|
|
5
6
|
export interface FileUploadItemGroupProps extends HTMLProps<'ul'>, FileUploadItemGroupBaseProps {
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ItemGroupProps } from '@zag-js/file-upload';
|
|
1
2
|
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
3
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
-
export interface FileUploadItemGroupBaseProps extends PolymorphicProps {
|
|
4
|
+
export interface FileUploadItemGroupBaseProps extends PolymorphicProps, ItemGroupProps {
|
|
4
5
|
}
|
|
5
6
|
export interface FileUploadItemGroupProps extends HTMLProps<'ul'>, FileUploadItemGroupBaseProps {
|
|
6
7
|
}
|
|
@@ -2,13 +2,16 @@
|
|
|
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 '../../utils/create-split-props.js';
|
|
5
6
|
import { ark } from '../factory.js';
|
|
6
7
|
import { useFileUploadContext } from './use-file-upload-context.js';
|
|
8
|
+
import { FileUploadItemGroupPropsProvider } from './use-file-upload-item-group-props-context.js';
|
|
7
9
|
|
|
8
10
|
const FileUploadItemGroup = forwardRef((props, ref) => {
|
|
11
|
+
const [itemGroupProps, localProps] = createSplitProps()(props, ["type"]);
|
|
9
12
|
const fileUpload = useFileUploadContext();
|
|
10
|
-
const mergedProps = mergeProps(fileUpload.getItemGroupProps(),
|
|
11
|
-
return /* @__PURE__ */ jsx(ark.ul, { ...mergedProps, ref });
|
|
13
|
+
const mergedProps = mergeProps(fileUpload.getItemGroupProps(itemGroupProps), localProps);
|
|
14
|
+
return /* @__PURE__ */ jsx(FileUploadItemGroupPropsProvider, { value: itemGroupProps, children: /* @__PURE__ */ jsx(ark.ul, { ...mergedProps, ref }) });
|
|
12
15
|
});
|
|
13
16
|
FileUploadItemGroup.displayName = "FileUploadItemGroup";
|
|
14
17
|
|
|
@@ -9,13 +9,16 @@ const react = require('react');
|
|
|
9
9
|
const createSplitProps = require('../../utils/create-split-props.cjs');
|
|
10
10
|
const factory = require('../factory.cjs');
|
|
11
11
|
const useFileUploadContext = require('./use-file-upload-context.cjs');
|
|
12
|
+
const useFileUploadItemGroupPropsContext = require('./use-file-upload-item-group-props-context.cjs');
|
|
12
13
|
const useFileUploadItemPropsContext = require('./use-file-upload-item-props-context.cjs');
|
|
13
14
|
|
|
14
15
|
const FileUploadItem = react.forwardRef((props, ref) => {
|
|
15
16
|
const [itemProps, localProps] = createSplitProps.createSplitProps()(props, ["file"]);
|
|
16
17
|
const fileUpload = useFileUploadContext.useFileUploadContext();
|
|
17
|
-
const
|
|
18
|
-
|
|
18
|
+
const itemGroupProps = useFileUploadItemGroupPropsContext.useFileUploadItemGroupPropsContext();
|
|
19
|
+
const itemPropsWithType = { ...itemProps, type: itemGroupProps.type };
|
|
20
|
+
const mergedProps = react$1.mergeProps(fileUpload.getItemProps(itemPropsWithType), localProps);
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useFileUploadItemPropsContext.FileUploadItemPropsProvider, { value: itemPropsWithType, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.li, { ...mergedProps, ref }) });
|
|
19
22
|
});
|
|
20
23
|
FileUploadItem.displayName = "FileUploadItem";
|
|
21
24
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ItemProps } from '@zag-js/file-upload';
|
|
2
2
|
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
3
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
-
|
|
4
|
+
type ItemBaseProps = Omit<ItemProps, 'type'>;
|
|
5
|
+
export interface FileUploadItemBaseProps extends ItemBaseProps, PolymorphicProps {
|
|
5
6
|
}
|
|
6
7
|
export interface FileUploadItemProps extends HTMLProps<'li'>, FileUploadItemBaseProps {
|
|
7
8
|
}
|
|
8
9
|
export declare const FileUploadItem: ForwardRefExoticComponent<FileUploadItemProps & RefAttributes<HTMLLIElement>>;
|
|
10
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ItemProps } from '@zag-js/file-upload';
|
|
2
2
|
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
3
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
-
|
|
4
|
+
type ItemBaseProps = Omit<ItemProps, 'type'>;
|
|
5
|
+
export interface FileUploadItemBaseProps extends ItemBaseProps, PolymorphicProps {
|
|
5
6
|
}
|
|
6
7
|
export interface FileUploadItemProps extends HTMLProps<'li'>, FileUploadItemBaseProps {
|
|
7
8
|
}
|
|
8
9
|
export declare const FileUploadItem: ForwardRefExoticComponent<FileUploadItemProps & RefAttributes<HTMLLIElement>>;
|
|
10
|
+
export {};
|