@ark-ui/vue 5.23.0 → 5.24.1
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-content.vue.cjs +0 -1
- package/dist/components/accordion/accordion-item-content.vue.js +0 -1
- package/dist/components/anatomy.cjs +195 -0
- package/dist/components/anatomy.d.cts +45 -0
- package/dist/components/anatomy.d.ts +45 -0
- package/dist/components/anatomy.js +45 -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.vue.cjs +2 -0
- package/dist/components/combobox/combobox-root.vue.js +2 -0
- package/dist/components/combobox/combobox.anatomy.d.cts +1 -1
- package/dist/components/combobox/combobox.anatomy.d.ts +1 -1
- package/dist/components/combobox/combobox.types.d.cts +6 -0
- package/dist/components/combobox/combobox.types.d.ts +6 -0
- 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/factory.cjs +7 -6
- package/dist/components/factory.js +7 -6
- 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.vue.cjs +1 -1
- package/dist/components/fieldset/fieldset-legend.vue.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.vue.cjs +9 -3
- package/dist/components/file-upload/file-upload-item-group.vue.d.cts +2 -1
- package/dist/components/file-upload/file-upload-item-group.vue.d.ts +2 -1
- package/dist/components/file-upload/file-upload-item-group.vue.js +10 -4
- package/dist/components/file-upload/file-upload-item-preview-image.vue.cjs +1 -1
- package/dist/components/file-upload/file-upload-item-preview-image.vue.js +1 -1
- package/dist/components/file-upload/file-upload-item.vue.cjs +7 -3
- package/dist/components/file-upload/file-upload-item.vue.d.cts +1 -1
- package/dist/components/file-upload/file-upload-item.vue.d.ts +1 -1
- package/dist/components/file-upload/file-upload-item.vue.js +8 -4
- package/dist/components/file-upload/use-file-upload-item-group-props-context.cjs +10 -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 +5 -0
- package/dist/components/file-upload/use-file-upload-item-props-context.d.cts +2 -1
- package/dist/components/file-upload/use-file-upload-item-props-context.d.ts +2 -1
- package/dist/components/frame/frame.vue.cjs +6 -4
- package/dist/components/frame/frame.vue.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/json-tree-view/json-tree-view-node.vue.cjs +2 -2
- package/dist/components/json-tree-view/json-tree-view-node.vue.js +2 -2
- package/dist/components/json-tree-view/json-tree-view-tree.vue.cjs +2 -2
- package/dist/components/json-tree-view/json-tree-view-tree.vue.js +2 -2
- package/dist/components/json-tree-view/json-tree-view-value-node.vue.cjs +2 -2
- package/dist/components/json-tree-view/json-tree-view-value-node.vue.js +2 -2
- 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/tabs/tabs.types.d.cts +2 -2
- package/dist/components/tabs/tabs.types.d.ts +2 -2
- package/dist/components/toast/toaster.vue.cjs +2 -2
- package/dist/components/toast/toaster.vue.js +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 +68 -69
- 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.vue.cjs +0 -40
- package/dist/components/time-picker/time-picker-cell.vue.d.cts +0 -23
- package/dist/components/time-picker/time-picker-cell.vue.d.ts +0 -23
- package/dist/components/time-picker/time-picker-cell.vue.js +0 -36
- package/dist/components/time-picker/time-picker-cell.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-cell.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-clear-trigger.vue.cjs +0 -29
- package/dist/components/time-picker/time-picker-clear-trigger.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-clear-trigger.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-clear-trigger.vue.js +0 -25
- package/dist/components/time-picker/time-picker-clear-trigger.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-clear-trigger.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-column.vue.cjs +0 -33
- package/dist/components/time-picker/time-picker-column.vue.d.cts +0 -20
- package/dist/components/time-picker/time-picker-column.vue.d.ts +0 -20
- package/dist/components/time-picker/time-picker-column.vue.js +0 -29
- package/dist/components/time-picker/time-picker-column.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-column.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-content.vue.cjs +0 -33
- package/dist/components/time-picker/time-picker-content.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-content.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-content.vue.js +0 -29
- package/dist/components/time-picker/time-picker-content.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-content.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-context.vue.cjs +0 -18
- package/dist/components/time-picker/time-picker-context.vue.d.cts +0 -17
- package/dist/components/time-picker/time-picker-context.vue.d.ts +0 -17
- package/dist/components/time-picker/time-picker-context.vue.js +0 -14
- package/dist/components/time-picker/time-picker-context.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-context.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-control.vue.cjs +0 -29
- package/dist/components/time-picker/time-picker-control.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-control.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-control.vue.js +0 -25
- package/dist/components/time-picker/time-picker-control.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-control.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-input.vue.cjs +0 -29
- package/dist/components/time-picker/time-picker-input.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-input.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-input.vue.js +0 -25
- package/dist/components/time-picker/time-picker-input.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-input.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-label.vue.cjs +0 -29
- package/dist/components/time-picker/time-picker-label.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-label.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-label.vue.js +0 -25
- package/dist/components/time-picker/time-picker-label.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-label.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-positioner.vue.cjs +0 -40
- package/dist/components/time-picker/time-picker-positioner.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-positioner.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-positioner.vue.js +0 -36
- package/dist/components/time-picker/time-picker-positioner.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-positioner.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-root-provider.vue.cjs +0 -36
- package/dist/components/time-picker/time-picker-root-provider.vue.d.cts +0 -24
- package/dist/components/time-picker/time-picker-root-provider.vue.d.ts +0 -24
- package/dist/components/time-picker/time-picker-root-provider.vue.js +0 -32
- package/dist/components/time-picker/time-picker-root-provider.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-root-provider.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-root.vue.cjs +0 -62
- package/dist/components/time-picker/time-picker-root.vue.d.cts +0 -44
- package/dist/components/time-picker/time-picker-root.vue.d.ts +0 -44
- package/dist/components/time-picker/time-picker-root.vue.js +0 -58
- package/dist/components/time-picker/time-picker-root.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-root.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-spacer.vue.cjs +0 -29
- package/dist/components/time-picker/time-picker-spacer.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-spacer.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-spacer.vue.js +0 -25
- package/dist/components/time-picker/time-picker-spacer.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-spacer.vue2.js +0 -5
- package/dist/components/time-picker/time-picker-trigger.vue.cjs +0 -29
- package/dist/components/time-picker/time-picker-trigger.vue.d.cts +0 -19
- package/dist/components/time-picker/time-picker-trigger.vue.d.ts +0 -19
- package/dist/components/time-picker/time-picker-trigger.vue.js +0 -25
- package/dist/components/time-picker/time-picker-trigger.vue2.cjs +0 -9
- package/dist/components/time-picker/time-picker-trigger.vue2.js +0 -5
- 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/time-picker.types.d.cts +0 -106
- package/dist/components/time-picker/time-picker.types.d.ts +0 -106
- package/dist/components/time-picker/use-time-picker-column-props-context.cjs +0 -10
- package/dist/components/time-picker/use-time-picker-column-props-context.d.cts +0 -5
- package/dist/components/time-picker/use-time-picker-column-props-context.d.ts +0 -5
- package/dist/components/time-picker/use-time-picker-column-props-context.js +0 -5
- package/dist/components/time-picker/use-time-picker-context.cjs +0 -10
- package/dist/components/time-picker/use-time-picker-context.d.cts +0 -4
- package/dist/components/time-picker/use-time-picker-context.d.ts +0 -4
- package/dist/components/time-picker/use-time-picker-context.js +0 -5
- package/dist/components/time-picker/use-time-picker.cjs +0 -64
- package/dist/components/time-picker/use-time-picker.d.cts +0 -14
- package/dist/components/time-picker/use-time-picker.d.ts +0 -14
- package/dist/components/time-picker/use-time-picker.js +0 -41
package/README.md
CHANGED
|
@@ -52,7 +52,6 @@ Ark UI is available for the following JavaScript frameworks:
|
|
|
52
52
|
- [Switch](https://ark-ui.com/vue/docs/components/switch)
|
|
53
53
|
- [Tabs](https://ark-ui.com/vue/docs/components/tabs)
|
|
54
54
|
- [Tags Input](https://ark-ui.com/vue/docs/components/tags-input)
|
|
55
|
-
- [Time Picker](https://ark-ui.com/vue/docs/components/time-picker)
|
|
56
55
|
- [Toast](https://ark-ui.com/vue/docs/components/toast)
|
|
57
56
|
- [Toggle Group](https://ark-ui.com/vue/docs/components/toggle-group)
|
|
58
57
|
- [Tooltip](https://ark-ui.com/vue/docs/components/tooltip)
|
|
@@ -7,7 +7,6 @@ const useAccordionContext = require('./use-accordion-context.cjs');
|
|
|
7
7
|
const collapsible = require('../collapsible/collapsible.cjs');
|
|
8
8
|
require('@zag-js/color-picker');
|
|
9
9
|
require('@zag-js/date-picker');
|
|
10
|
-
require('@internationalized/date');
|
|
11
10
|
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
|
|
12
11
|
const createSplitProps = require('../create-split-props.cjs');
|
|
13
12
|
const useAccordionItemPropsContext = require('./use-accordion-item-props-context.cjs');
|
|
@@ -3,7 +3,6 @@ import { useAccordionContext } from './use-accordion-context.js';
|
|
|
3
3
|
import * as collapsible from '../collapsible/collapsible.js';
|
|
4
4
|
import '@zag-js/color-picker';
|
|
5
5
|
import '@zag-js/date-picker';
|
|
6
|
-
import '@internationalized/date';
|
|
7
6
|
import { useForwardExpose } from '../../utils/use-forward-expose.js';
|
|
8
7
|
import { createSplitProps } from '../create-split-props.js';
|
|
9
8
|
import { useAccordionItemPropsContext } from './use-accordion-item-props-context.js';
|
|
@@ -3,9 +3,204 @@
|
|
|
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 angleSlider = require('@zag-js/angle-slider');
|
|
18
|
+
const avatar = require('@zag-js/avatar');
|
|
19
|
+
const carousel = require('@zag-js/carousel');
|
|
20
|
+
const clipboard = require('@zag-js/clipboard');
|
|
21
|
+
const collapsible = require('@zag-js/collapsible');
|
|
22
|
+
const dialog = require('@zag-js/dialog');
|
|
23
|
+
const editable = require('@zag-js/editable');
|
|
24
|
+
const fileUpload = require('@zag-js/file-upload');
|
|
25
|
+
const floatingPanel = require('@zag-js/floating-panel');
|
|
26
|
+
const hoverCard = require('@zag-js/hover-card');
|
|
27
|
+
const menu = require('@zag-js/menu');
|
|
28
|
+
const numberInput = require('@zag-js/number-input');
|
|
29
|
+
const pagination = require('@zag-js/pagination');
|
|
30
|
+
const passwordInput = require('@zag-js/password-input');
|
|
31
|
+
const pinInput = require('@zag-js/pin-input');
|
|
32
|
+
const popover = require('@zag-js/popover');
|
|
33
|
+
const progress = require('@zag-js/progress');
|
|
34
|
+
const qrcode = require('@zag-js/qr-code');
|
|
35
|
+
const radioGroup = require('@zag-js/radio-group');
|
|
36
|
+
const ratingGroup = require('@zag-js/rating-group');
|
|
37
|
+
const scrollArea = require('@zag-js/scroll-area');
|
|
38
|
+
const select = require('@zag-js/select');
|
|
39
|
+
const signaturepad = require('@zag-js/signature-pad');
|
|
40
|
+
const slider = require('@zag-js/slider');
|
|
41
|
+
const splitter = require('@zag-js/splitter');
|
|
42
|
+
const steps = require('@zag-js/steps');
|
|
43
|
+
const zagSwitch = require('@zag-js/switch');
|
|
44
|
+
const tabs = require('@zag-js/tabs');
|
|
45
|
+
const tagsInput = require('@zag-js/tags-input');
|
|
46
|
+
const timer = require('@zag-js/timer');
|
|
47
|
+
const toast = require('@zag-js/toast');
|
|
48
|
+
const toggleGroup = require('@zag-js/toggle-group');
|
|
49
|
+
const tooltip = require('@zag-js/tooltip');
|
|
50
|
+
const treeView = require('@zag-js/tree-view');
|
|
6
51
|
|
|
7
52
|
|
|
8
53
|
|
|
54
|
+
exports.checkboxAnatomy = checkbox_anatomy.checkboxAnatomy;
|
|
55
|
+
exports.colorPickerAnatomy = colorPicker_anatomy.colorPickerAnatomy;
|
|
56
|
+
exports.comboboxAnatomy = combobox_anatomy.comboboxAnatomy;
|
|
57
|
+
exports.datePickerAnatomy = datePicker_anatomy.datePickerAnatomy;
|
|
58
|
+
exports.fieldAnatomy = field_anatomy.fieldAnatomy;
|
|
59
|
+
exports.fieldsetAnatomy = fieldset_anatomy.fieldsetAnatomy;
|
|
60
|
+
exports.listboxAnatomy = listbox_anatomy.listboxAnatomy;
|
|
61
|
+
exports.segmentGroupAnatomy = segmentGroup_anatomy.segmentGroupAnatomy;
|
|
62
|
+
exports.toggleAnatomy = toggle_anatomy.toggleAnatomy;
|
|
63
|
+
exports.tourAnatomy = tour_anatomy.tourAnatomy;
|
|
64
|
+
Object.defineProperty(exports, "accordionAnatomy", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: () => accordion.anatomy
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "angleSliderAnatomy", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: () => angleSlider.anatomy
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "avatarAnatomy", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: () => avatar.anatomy
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "carouselAnatomy", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: () => carousel.anatomy
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "clipboardAnatomy", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: () => clipboard.anatomy
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "collapsibleAnatomy", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: () => collapsible.anatomy
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "dialogAnatomy", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: () => dialog.anatomy
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "editableAnatomy", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: () => editable.anatomy
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "fileUploadAnatomy", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: () => fileUpload.anatomy
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "floatingPanelAnatomy", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: () => floatingPanel.anatomy
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "hoverCardAnatomy", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: () => hoverCard.anatomy
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "menuAnatomy", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: () => menu.anatomy
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, "numberInputAnatomy", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: () => numberInput.anatomy
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "paginationAnatomy", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: () => pagination.anatomy
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "passwordInputAnatomy", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: () => passwordInput.anatomy
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, "pinInputAnatomy", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: () => pinInput.anatomy
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "popoverAnatomy", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: () => popover.anatomy
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "progressAnatomy", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: () => progress.anatomy
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "qrCodeAnatomy", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: () => qrcode.anatomy
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "radioGroupAnatomy", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: () => radioGroup.anatomy
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "ratingGroupAnatomy", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: () => ratingGroup.anatomy
|
|
147
|
+
});
|
|
148
|
+
Object.defineProperty(exports, "scrollAreaAnatomy", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: () => scrollArea.anatomy
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "selectAnatomy", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: () => select.anatomy
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "signaturePadAnatomy", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: () => signaturepad.anatomy
|
|
159
|
+
});
|
|
160
|
+
Object.defineProperty(exports, "sliderAnatomy", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: () => slider.anatomy
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, "splitterAnatomy", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: () => splitter.anatomy
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "stepsAnatomy", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: () => steps.anatomy
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(exports, "switchAnatomy", {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: () => zagSwitch.anatomy
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, "tabsAnatomy", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: () => tabs.anatomy
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "tagsInputAnatomy", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: () => tagsInput.anatomy
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "timerAnatomy", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: () => timer.anatomy
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, "toastAnatomy", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: () => toast.anatomy
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "toggleGroupAnatomy", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: () => toggleGroup.anatomy
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(exports, "tooltipAnatomy", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: () => tooltip.anatomy
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, "treeViewAnatomy", {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: () => treeView.anatomy
|
|
203
|
+
});
|
|
9
204
|
Object.keys(anatomy).forEach(k => {
|
|
10
205
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
11
206
|
enumerable: true,
|
|
@@ -1 +1,46 @@
|
|
|
1
1
|
export * from '@zag-js/anatomy';
|
|
2
|
+
export { accordionAnatomy } from './accordion/accordion.anatomy';
|
|
3
|
+
export { angleSliderAnatomy } from './angle-slider/angle-slider.anatomy';
|
|
4
|
+
export { avatarAnatomy } from './avatar/avatar.anatomy';
|
|
5
|
+
export { carouselAnatomy } from './carousel/carousel.anatomy';
|
|
6
|
+
export { checkboxAnatomy } from './checkbox/checkbox.anatomy';
|
|
7
|
+
export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
8
|
+
export { collapsibleAnatomy } from './collapsible/collapsible.anatomy';
|
|
9
|
+
export { colorPickerAnatomy } from './color-picker/color-picker.anatomy';
|
|
10
|
+
export { comboboxAnatomy } from './combobox/combobox.anatomy';
|
|
11
|
+
export { datePickerAnatomy } from './date-picker/date-picker.anatomy';
|
|
12
|
+
export { dialogAnatomy } from './dialog/dialog.anatomy';
|
|
13
|
+
export { editableAnatomy } from './editable/editable.anatomy';
|
|
14
|
+
export { fieldAnatomy } from './field/field.anatomy';
|
|
15
|
+
export { fieldsetAnatomy } from './fieldset/fieldset.anatomy';
|
|
16
|
+
export { fileUploadAnatomy } from './file-upload/file-upload.anatomy';
|
|
17
|
+
export { floatingPanelAnatomy } from './floating-panel/floating-panel.anatomy';
|
|
18
|
+
export { hoverCardAnatomy } from './hover-card/hover-card.anatomy';
|
|
19
|
+
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
20
|
+
export { menuAnatomy } from './menu/menu.anatomy';
|
|
21
|
+
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
22
|
+
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
|
23
|
+
export { passwordInputAnatomy } from './password-input/password-input.anatomy';
|
|
24
|
+
export { pinInputAnatomy } from './pin-input/pin-input.anatomy';
|
|
25
|
+
export { popoverAnatomy } from './popover/popover.anatomy';
|
|
26
|
+
export { progressAnatomy } from './progress/progress.anatomy';
|
|
27
|
+
export { qrCodeAnatomy } from './qr-code/qr-code.anatomy';
|
|
28
|
+
export { radioGroupAnatomy } from './radio-group/radio-group.anatomy';
|
|
29
|
+
export { ratingGroupAnatomy } from './rating-group/rating-group.anatomy';
|
|
30
|
+
export { scrollAreaAnatomy } from './scroll-area/scroll-area.anatomy';
|
|
31
|
+
export { segmentGroupAnatomy } from './segment-group/segment-group.anatomy';
|
|
32
|
+
export { selectAnatomy } from './select/select.anatomy';
|
|
33
|
+
export { signaturePadAnatomy } from './signature-pad/signature-pad.anatomy';
|
|
34
|
+
export { sliderAnatomy } from './slider/slider.anatomy';
|
|
35
|
+
export { splitterAnatomy } from './splitter/splitter.anatomy';
|
|
36
|
+
export { stepsAnatomy } from './steps/steps.anatomy';
|
|
37
|
+
export { switchAnatomy } from './switch/switch.anatomy';
|
|
38
|
+
export { tabsAnatomy } from './tabs/tabs.anatomy';
|
|
39
|
+
export { tagsInputAnatomy } from './tags-input/tags-input.anatomy';
|
|
40
|
+
export { timerAnatomy } from './timer/timer.anatomy';
|
|
41
|
+
export { toastAnatomy } from './toast/toast.anatomy';
|
|
42
|
+
export { toggleAnatomy } from './toggle/toggle.anatomy';
|
|
43
|
+
export { toggleGroupAnatomy } from './toggle-group/toggle-group.anatomy';
|
|
44
|
+
export { tooltipAnatomy } from './tooltip/tooltip.anatomy';
|
|
45
|
+
export { tourAnatomy } from './tour/tour.anatomy';
|
|
46
|
+
export { treeViewAnatomy } from './tree-view/tree-view.anatomy';
|
|
@@ -1 +1,46 @@
|
|
|
1
1
|
export * from '@zag-js/anatomy';
|
|
2
|
+
export { accordionAnatomy } from './accordion/accordion.anatomy';
|
|
3
|
+
export { angleSliderAnatomy } from './angle-slider/angle-slider.anatomy';
|
|
4
|
+
export { avatarAnatomy } from './avatar/avatar.anatomy';
|
|
5
|
+
export { carouselAnatomy } from './carousel/carousel.anatomy';
|
|
6
|
+
export { checkboxAnatomy } from './checkbox/checkbox.anatomy';
|
|
7
|
+
export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
8
|
+
export { collapsibleAnatomy } from './collapsible/collapsible.anatomy';
|
|
9
|
+
export { colorPickerAnatomy } from './color-picker/color-picker.anatomy';
|
|
10
|
+
export { comboboxAnatomy } from './combobox/combobox.anatomy';
|
|
11
|
+
export { datePickerAnatomy } from './date-picker/date-picker.anatomy';
|
|
12
|
+
export { dialogAnatomy } from './dialog/dialog.anatomy';
|
|
13
|
+
export { editableAnatomy } from './editable/editable.anatomy';
|
|
14
|
+
export { fieldAnatomy } from './field/field.anatomy';
|
|
15
|
+
export { fieldsetAnatomy } from './fieldset/fieldset.anatomy';
|
|
16
|
+
export { fileUploadAnatomy } from './file-upload/file-upload.anatomy';
|
|
17
|
+
export { floatingPanelAnatomy } from './floating-panel/floating-panel.anatomy';
|
|
18
|
+
export { hoverCardAnatomy } from './hover-card/hover-card.anatomy';
|
|
19
|
+
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
20
|
+
export { menuAnatomy } from './menu/menu.anatomy';
|
|
21
|
+
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
22
|
+
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
|
23
|
+
export { passwordInputAnatomy } from './password-input/password-input.anatomy';
|
|
24
|
+
export { pinInputAnatomy } from './pin-input/pin-input.anatomy';
|
|
25
|
+
export { popoverAnatomy } from './popover/popover.anatomy';
|
|
26
|
+
export { progressAnatomy } from './progress/progress.anatomy';
|
|
27
|
+
export { qrCodeAnatomy } from './qr-code/qr-code.anatomy';
|
|
28
|
+
export { radioGroupAnatomy } from './radio-group/radio-group.anatomy';
|
|
29
|
+
export { ratingGroupAnatomy } from './rating-group/rating-group.anatomy';
|
|
30
|
+
export { scrollAreaAnatomy } from './scroll-area/scroll-area.anatomy';
|
|
31
|
+
export { segmentGroupAnatomy } from './segment-group/segment-group.anatomy';
|
|
32
|
+
export { selectAnatomy } from './select/select.anatomy';
|
|
33
|
+
export { signaturePadAnatomy } from './signature-pad/signature-pad.anatomy';
|
|
34
|
+
export { sliderAnatomy } from './slider/slider.anatomy';
|
|
35
|
+
export { splitterAnatomy } from './splitter/splitter.anatomy';
|
|
36
|
+
export { stepsAnatomy } from './steps/steps.anatomy';
|
|
37
|
+
export { switchAnatomy } from './switch/switch.anatomy';
|
|
38
|
+
export { tabsAnatomy } from './tabs/tabs.anatomy';
|
|
39
|
+
export { tagsInputAnatomy } from './tags-input/tags-input.anatomy';
|
|
40
|
+
export { timerAnatomy } from './timer/timer.anatomy';
|
|
41
|
+
export { toastAnatomy } from './toast/toast.anatomy';
|
|
42
|
+
export { toggleAnatomy } from './toggle/toggle.anatomy';
|
|
43
|
+
export { toggleGroupAnatomy } from './toggle-group/toggle-group.anatomy';
|
|
44
|
+
export { tooltipAnatomy } from './tooltip/tooltip.anatomy';
|
|
45
|
+
export { tourAnatomy } from './tour/tour.anatomy';
|
|
46
|
+
export { treeViewAnatomy } from './tree-view/tree-view.anatomy';
|
|
@@ -1 +1,46 @@
|
|
|
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 angleSliderAnatomy } from '@zag-js/angle-slider';
|
|
14
|
+
export { anatomy as avatarAnatomy } from '@zag-js/avatar';
|
|
15
|
+
export { anatomy as carouselAnatomy } from '@zag-js/carousel';
|
|
16
|
+
export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
|
|
17
|
+
export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
|
|
18
|
+
export { anatomy as dialogAnatomy } from '@zag-js/dialog';
|
|
19
|
+
export { anatomy as editableAnatomy } from '@zag-js/editable';
|
|
20
|
+
export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
|
|
21
|
+
export { anatomy as floatingPanelAnatomy } from '@zag-js/floating-panel';
|
|
22
|
+
export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
|
|
23
|
+
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
|
24
|
+
export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
|
|
25
|
+
export { anatomy as paginationAnatomy } from '@zag-js/pagination';
|
|
26
|
+
export { anatomy as passwordInputAnatomy } from '@zag-js/password-input';
|
|
27
|
+
export { anatomy as pinInputAnatomy } from '@zag-js/pin-input';
|
|
28
|
+
export { anatomy as popoverAnatomy } from '@zag-js/popover';
|
|
29
|
+
export { anatomy as progressAnatomy } from '@zag-js/progress';
|
|
30
|
+
export { anatomy as qrCodeAnatomy } from '@zag-js/qr-code';
|
|
31
|
+
export { anatomy as radioGroupAnatomy } from '@zag-js/radio-group';
|
|
32
|
+
export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
|
|
33
|
+
export { anatomy as scrollAreaAnatomy } from '@zag-js/scroll-area';
|
|
34
|
+
export { anatomy as selectAnatomy } from '@zag-js/select';
|
|
35
|
+
export { anatomy as signaturePadAnatomy } from '@zag-js/signature-pad';
|
|
36
|
+
export { anatomy as sliderAnatomy } from '@zag-js/slider';
|
|
37
|
+
export { anatomy as splitterAnatomy } from '@zag-js/splitter';
|
|
38
|
+
export { anatomy as stepsAnatomy } from '@zag-js/steps';
|
|
39
|
+
export { anatomy as switchAnatomy } from '@zag-js/switch';
|
|
40
|
+
export { anatomy as tabsAnatomy } from '@zag-js/tabs';
|
|
41
|
+
export { anatomy as tagsInputAnatomy } from '@zag-js/tags-input';
|
|
42
|
+
export { anatomy as timerAnatomy } from '@zag-js/timer';
|
|
43
|
+
export { anatomy as toastAnatomy } from '@zag-js/toast';
|
|
44
|
+
export { anatomy as toggleGroupAnatomy } from '@zag-js/toggle-group';
|
|
45
|
+
export { anatomy as tooltipAnatomy } from '@zag-js/tooltip';
|
|
46
|
+
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">;
|
|
@@ -13,6 +13,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
13
13
|
__name: "combobox-root",
|
|
14
14
|
props: /* @__PURE__ */ vue.mergeDefaults({
|
|
15
15
|
allowCustomValue: { type: Boolean },
|
|
16
|
+
alwaysSubmitOnEnter: { type: Boolean },
|
|
16
17
|
autoFocus: { type: Boolean },
|
|
17
18
|
closeOnSelect: { type: Boolean },
|
|
18
19
|
collection: {},
|
|
@@ -51,6 +52,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
52
|
asChild: { type: Boolean }
|
|
52
53
|
}, {
|
|
53
54
|
allowCustomValue: void 0,
|
|
55
|
+
alwaysSubmitOnEnter: void 0,
|
|
54
56
|
autoFocus: void 0,
|
|
55
57
|
closeOnSelect: void 0,
|
|
56
58
|
composite: void 0,
|
|
@@ -9,6 +9,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
__name: "combobox-root",
|
|
10
10
|
props: /* @__PURE__ */ mergeDefaults({
|
|
11
11
|
allowCustomValue: { type: Boolean },
|
|
12
|
+
alwaysSubmitOnEnter: { type: Boolean },
|
|
12
13
|
autoFocus: { type: Boolean },
|
|
13
14
|
closeOnSelect: { type: Boolean },
|
|
14
15
|
collection: {},
|
|
@@ -47,6 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
48
|
asChild: { type: Boolean }
|
|
48
49
|
}, {
|
|
49
50
|
allowCustomValue: void 0,
|
|
51
|
+
alwaysSubmitOnEnter: void 0,
|
|
50
52
|
autoFocus: void 0,
|
|
51
53
|
closeOnSelect: void 0,
|
|
52
54
|
composite: void 0,
|
|
@@ -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">;
|
|
@@ -5,6 +5,12 @@ export interface RootProps<T extends CollectionItem> {
|
|
|
5
5
|
* Whether to allow typing custom values in the input
|
|
6
6
|
*/
|
|
7
7
|
allowCustomValue?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to allow bypassing the default two-step behavior (Enter to close combobox, then Enter to submit form)
|
|
10
|
+
* and instead submit the form immediately on Enter press. This is useful for single-field autocomplete forms
|
|
11
|
+
* where Enter should submit the form directly.
|
|
12
|
+
*/
|
|
13
|
+
alwaysSubmitOnEnter?: boolean;
|
|
8
14
|
/**
|
|
9
15
|
* Whether to autofocus the input on mount
|
|
10
16
|
*/
|
|
@@ -5,6 +5,12 @@ export interface RootProps<T extends CollectionItem> {
|
|
|
5
5
|
* Whether to allow typing custom values in the input
|
|
6
6
|
*/
|
|
7
7
|
allowCustomValue?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to allow bypassing the default two-step behavior (Enter to close combobox, then Enter to submit form)
|
|
10
|
+
* and instead submit the form immediately on Enter press. This is useful for single-field autocomplete forms
|
|
11
|
+
* where Enter should submit the form directly.
|
|
12
|
+
*/
|
|
13
|
+
alwaysSubmitOnEnter?: boolean;
|
|
8
14
|
/**
|
|
9
15
|
* Whether to autofocus the input on mount
|
|
10
16
|
*/
|
|
@@ -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">;
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const vue = require('vue');
|
|
6
6
|
const dynamic = require('../utils/dynamic.cjs');
|
|
7
7
|
|
|
8
|
+
const SELF_CLOSING_TAGS = "br, hr, img, input, area, textarea".split(", ");
|
|
9
|
+
const isSelfClosingTag = (tag) => typeof tag === "string" && SELF_CLOSING_TAGS.includes(tag);
|
|
8
10
|
const withAsChild = (component) => {
|
|
9
11
|
return vue.defineComponent({
|
|
10
12
|
name: "Polymorphic",
|
|
@@ -16,8 +18,8 @@ const withAsChild = (component) => {
|
|
|
16
18
|
}
|
|
17
19
|
},
|
|
18
20
|
setup(props, { attrs, slots }) {
|
|
19
|
-
if (!props.asChild) return () => vue.h(component,
|
|
20
|
-
return () => vue.h(dynamic.Dynamic, attrs,
|
|
21
|
+
if (!props.asChild) return () => vue.h(component, attrs, isSelfClosingTag(component) ? void 0 : slots.default?.());
|
|
22
|
+
return () => vue.h(dynamic.Dynamic, attrs, slots);
|
|
21
23
|
}
|
|
22
24
|
});
|
|
23
25
|
};
|
|
@@ -28,11 +30,10 @@ function jsxFactory() {
|
|
|
28
30
|
return withAsChild(argArray[0]);
|
|
29
31
|
},
|
|
30
32
|
get(_, element) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
cache.set(asElement, withAsChild(asElement));
|
|
33
|
+
if (!cache.has(element)) {
|
|
34
|
+
cache.set(element, withAsChild(element));
|
|
34
35
|
}
|
|
35
|
-
return cache.get(
|
|
36
|
+
return cache.get(element);
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
return factory;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
2
|
import { Dynamic } from '../utils/dynamic.js';
|
|
3
3
|
|
|
4
|
+
const SELF_CLOSING_TAGS = "br, hr, img, input, area, textarea".split(", ");
|
|
5
|
+
const isSelfClosingTag = (tag) => typeof tag === "string" && SELF_CLOSING_TAGS.includes(tag);
|
|
4
6
|
const withAsChild = (component) => {
|
|
5
7
|
return defineComponent({
|
|
6
8
|
name: "Polymorphic",
|
|
@@ -12,8 +14,8 @@ const withAsChild = (component) => {
|
|
|
12
14
|
}
|
|
13
15
|
},
|
|
14
16
|
setup(props, { attrs, slots }) {
|
|
15
|
-
if (!props.asChild) return () => h(component,
|
|
16
|
-
return () => h(Dynamic, attrs,
|
|
17
|
+
if (!props.asChild) return () => h(component, attrs, isSelfClosingTag(component) ? void 0 : slots.default?.());
|
|
18
|
+
return () => h(Dynamic, attrs, slots);
|
|
17
19
|
}
|
|
18
20
|
});
|
|
19
21
|
};
|
|
@@ -24,11 +26,10 @@ function jsxFactory() {
|
|
|
24
26
|
return withAsChild(argArray[0]);
|
|
25
27
|
},
|
|
26
28
|
get(_, element) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
cache.set(asElement, withAsChild(asElement));
|
|
29
|
+
if (!cache.has(element)) {
|
|
30
|
+
cache.set(element, withAsChild(element));
|
|
30
31
|
}
|
|
31
|
-
return cache.get(
|
|
32
|
+
return cache.get(element);
|
|
32
33
|
}
|
|
33
34
|
});
|
|
34
35
|
return factory;
|
|
@@ -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>;
|
|
@@ -16,7 +16,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
16
16
|
const fieldset = useFieldsetContext.useFieldsetContext();
|
|
17
17
|
useForwardExpose.useForwardExpose();
|
|
18
18
|
return (_ctx, _cache) => {
|
|
19
|
-
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).
|
|
19
|
+
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).legend, vue.mergeProps(vue.unref(fieldset).getLegendProps(), { "as-child": _ctx.asChild }), {
|
|
20
20
|
default: vue.withCtx(() => [
|
|
21
21
|
vue.renderSlot(_ctx.$slots, "default")
|
|
22
22
|
]),
|
|
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
const fieldset = useFieldsetContext();
|
|
13
13
|
useForwardExpose();
|
|
14
14
|
return (_ctx, _cache) => {
|
|
15
|
-
return openBlock(), createBlock(unref(ark).
|
|
15
|
+
return openBlock(), createBlock(unref(ark).legend, mergeProps(unref(fieldset).getLegendProps(), { "as-child": _ctx.asChild }), {
|
|
16
16
|
default: withCtx(() => [
|
|
17
17
|
renderSlot(_ctx.$slots, "default")
|
|
18
18
|
]),
|
|
@@ -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>;
|