@wirekyt/vue 0.0.1 → 0.0.3
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/dist/accordion.cjs +273 -0
- package/dist/accordion.d.cts +195 -0
- package/dist/accordion.d.ts +195 -0
- package/dist/accordion.js +250 -0
- package/dist/angle-slider.cjs +268 -0
- package/dist/angle-slider.d.cts +228 -0
- package/dist/angle-slider.d.ts +228 -0
- package/dist/angle-slider.js +244 -0
- package/dist/avatar.cjs +145 -0
- package/dist/avatar.d.cts +114 -0
- package/dist/avatar.d.ts +114 -0
- package/dist/avatar.js +126 -0
- package/dist/boolean-BCaEpMxQ.js +6 -0
- package/dist/boolean-Dyu9-5Wp.cjs +11 -0
- package/dist/carousel.cjs +342 -0
- package/dist/carousel.d.cts +303 -0
- package/dist/carousel.d.ts +303 -0
- package/dist/carousel.js +320 -0
- package/dist/checkbox.cjs +345 -0
- package/dist/checkbox.d.cts +272 -0
- package/dist/checkbox.d.ts +272 -0
- package/dist/checkbox.js +324 -0
- package/dist/clean-props--1kqQE0Y.js +8 -0
- package/dist/clean-props-MyKqus13.cjs +13 -0
- package/dist/client-only.cjs +17 -0
- package/dist/client-only.d.cts +18 -0
- package/dist/client-only.d.ts +18 -0
- package/dist/client-only.js +16 -0
- package/dist/clipboard.cjs +229 -0
- package/dist/clipboard.d.cts +203 -0
- package/dist/clipboard.d.ts +203 -0
- package/dist/clipboard.js +206 -0
- package/dist/collapsible-BnUr4dTo.cjs +232 -0
- package/dist/collapsible-jvqnRz16.js +179 -0
- package/dist/collapsible.cjs +23 -0
- package/dist/collapsible.d.cts +161 -0
- package/dist/collapsible.d.ts +161 -0
- package/dist/collapsible.js +2 -0
- package/dist/collection-B0onOyyK.cjs +254 -0
- package/dist/collection-Dg6EtML_.js +211 -0
- package/dist/collection.cjs +9 -0
- package/dist/collection.d.cts +2 -0
- package/dist/collection.d.ts +2 -0
- package/dist/collection.js +2 -0
- package/dist/color-picker.cjs +804 -0
- package/dist/color-picker.d.cts +605 -0
- package/dist/color-picker.d.ts +605 -0
- package/dist/color-picker.js +759 -0
- package/dist/combobox.cjs +552 -0
- package/dist/combobox.d.cts +442 -0
- package/dist/combobox.d.ts +442 -0
- package/dist/combobox.js +521 -0
- package/dist/create-split-props-BBxrD7TV.js +10 -0
- package/dist/create-split-props-Jx-IEwdk.cjs +15 -0
- package/dist/date-input.cjs +293 -0
- package/dist/date-input.d.cts +212 -0
- package/dist/date-input.d.ts +212 -0
- package/dist/date-input.js +270 -0
- package/dist/date-picker.cjs +821 -0
- package/dist/date-picker.d.cts +637 -0
- package/dist/date-picker.d.ts +637 -0
- package/dist/date-picker.js +776 -0
- package/dist/dialog.cjs +333 -0
- package/dist/dialog.d.cts +272 -0
- package/dist/dialog.d.ts +272 -0
- package/dist/dialog.js +308 -0
- package/dist/download-trigger.cjs +65 -0
- package/dist/download-trigger.d.cts +34 -0
- package/dist/download-trigger.d.ts +34 -0
- package/dist/download-trigger.js +63 -0
- package/dist/drawer.cjs +448 -0
- package/dist/drawer.d.cts +346 -0
- package/dist/drawer.d.ts +346 -0
- package/dist/drawer.js +415 -0
- package/dist/editable.cjs +331 -0
- package/dist/editable.d.cts +285 -0
- package/dist/editable.d.ts +285 -0
- package/dist/editable.js +306 -0
- package/dist/factory-8Ao0DEy3.js +34 -0
- package/dist/factory-BNwuanv4.d.cts +21 -0
- package/dist/factory-BNwuanv4.d.ts +21 -0
- package/dist/factory-JL7MPjkk.cjs +45 -0
- package/dist/field-C3pLqz1S.js +435 -0
- package/dist/field-DRz-v4rB.cjs +524 -0
- package/dist/field.cjs +22 -0
- package/dist/field.d.cts +344 -0
- package/dist/field.d.ts +344 -0
- package/dist/field.js +2 -0
- package/dist/fieldset-ByP_r1Uq.js +216 -0
- package/dist/fieldset-C5aj6Ims.cjs +275 -0
- package/dist/fieldset.cjs +17 -0
- package/dist/fieldset.d.cts +159 -0
- package/dist/fieldset.d.ts +159 -0
- package/dist/fieldset.js +2 -0
- package/dist/file-upload.cjs +421 -0
- package/dist/file-upload.d.cts +327 -0
- package/dist/file-upload.d.ts +327 -0
- package/dist/file-upload.js +392 -0
- package/dist/floating-panel.cjs +412 -0
- package/dist/floating-panel.d.cts +337 -0
- package/dist/floating-panel.d.ts +337 -0
- package/dist/floating-panel.js +383 -0
- package/dist/focus-trap.cjs +79 -0
- package/dist/focus-trap.d.cts +46 -0
- package/dist/focus-trap.d.ts +46 -0
- package/dist/focus-trap.js +78 -0
- package/dist/format.cjs +116 -0
- package/dist/format.d.cts +46 -0
- package/dist/format.d.ts +46 -0
- package/dist/format.js +106 -0
- package/dist/frame.cjs +93 -0
- package/dist/frame.d.cts +37 -0
- package/dist/frame.d.ts +37 -0
- package/dist/frame.js +92 -0
- package/dist/highlight.cjs +44 -0
- package/dist/highlight.d.cts +32 -0
- package/dist/highlight.d.ts +32 -0
- package/dist/highlight.js +42 -0
- package/dist/hover-card.cjs +269 -0
- package/dist/hover-card.d.cts +202 -0
- package/dist/hover-card.d.ts +202 -0
- package/dist/hover-card.js +246 -0
- package/dist/image-cropper.cjs +252 -0
- package/dist/image-cropper.d.cts +207 -0
- package/dist/image-cropper.d.ts +207 -0
- package/dist/image-cropper.js +235 -0
- package/dist/index-B-o8jLyV.d.cts +31 -0
- package/dist/index-BSoF1D-v.d.ts +31 -0
- package/dist/index-BTNfeIXf.d.ts +104 -0
- package/dist/index-C8zR9eg3.d.ts +444 -0
- package/dist/index-Cc4qS0rQ.d.cts +38 -0
- package/dist/index-Cc4qS0rQ.d.ts +38 -0
- package/dist/index-DaLvr6SW.d.ts +37 -0
- package/dist/index-Di84rFjS.d.cts +444 -0
- package/dist/index-Dpm1wGVS.d.cts +74 -0
- package/dist/index-Zc9P69Ka.d.cts +104 -0
- package/dist/index-kCBQJqpU.d.ts +74 -0
- package/dist/index-vIbTjrJ-.d.cts +37 -0
- package/dist/index.cjs +43 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/json-tree-view.cjs +346 -0
- package/dist/json-tree-view.d.cts +86 -0
- package/dist/json-tree-view.d.ts +86 -0
- package/dist/json-tree-view.js +336 -0
- package/dist/listbox.cjs +386 -0
- package/dist/listbox.d.cts +323 -0
- package/dist/listbox.d.ts +323 -0
- package/dist/listbox.js +361 -0
- package/dist/marquee.cjs +256 -0
- package/dist/marquee.d.cts +208 -0
- package/dist/marquee.d.ts +208 -0
- package/dist/marquee.js +235 -0
- package/dist/menu.cjs +650 -0
- package/dist/menu.d.cts +501 -0
- package/dist/menu.d.ts +501 -0
- package/dist/menu.js +613 -0
- package/dist/navigation-menu.cjs +408 -0
- package/dist/navigation-menu.d.cts +271 -0
- package/dist/navigation-menu.d.ts +271 -0
- package/dist/navigation-menu.js +380 -0
- package/dist/number-input.cjs +298 -0
- package/dist/number-input.d.cts +253 -0
- package/dist/number-input.d.ts +253 -0
- package/dist/number-input.js +274 -0
- package/dist/pagination.cjs +249 -0
- package/dist/pagination.d.cts +209 -0
- package/dist/pagination.d.ts +209 -0
- package/dist/pagination.js +226 -0
- package/dist/password-input.cjs +232 -0
- package/dist/password-input.d.cts +208 -0
- package/dist/password-input.d.ts +208 -0
- package/dist/password-input.js +210 -0
- package/dist/pin-input.cjs +245 -0
- package/dist/pin-input.d.cts +199 -0
- package/dist/pin-input.d.ts +199 -0
- package/dist/pin-input.js +224 -0
- package/dist/popover.cjs +377 -0
- package/dist/popover.d.cts +324 -0
- package/dist/popover.d.ts +324 -0
- package/dist/popover.js +349 -0
- package/dist/presence-DD3l4Tgb.cjs +60 -0
- package/dist/presence-jaHZaD_O.js +43 -0
- package/dist/presence.cjs +7 -0
- package/dist/presence.d.cts +3 -0
- package/dist/presence.d.ts +3 -0
- package/dist/presence.js +3 -0
- package/dist/progress.cjs +270 -0
- package/dist/progress.d.cts +229 -0
- package/dist/progress.d.ts +229 -0
- package/dist/progress.js +245 -0
- package/dist/providers-5QhcwgSd.cjs +190 -0
- package/dist/providers-C3XQH-uu.js +119 -0
- package/dist/qr-code.cjs +195 -0
- package/dist/qr-code.d.cts +157 -0
- package/dist/qr-code.d.ts +157 -0
- package/dist/qr-code.js +174 -0
- package/dist/radio-group.cjs +274 -0
- package/dist/radio-group.d.cts +230 -0
- package/dist/radio-group.d.ts +230 -0
- package/dist/radio-group.js +249 -0
- package/dist/rating-group.cjs +243 -0
- package/dist/rating-group.d.cts +200 -0
- package/dist/rating-group.d.ts +200 -0
- package/dist/rating-group.js +220 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/rolldown-runtime-DakpK96I.cjs +43 -0
- package/dist/scroll-area.cjs +206 -0
- package/dist/scroll-area.d.cts +169 -0
- package/dist/scroll-area.d.ts +169 -0
- package/dist/scroll-area.js +184 -0
- package/dist/segment-group.cjs +318 -0
- package/dist/segment-group.d.cts +229 -0
- package/dist/segment-group.d.ts +229 -0
- package/dist/segment-group.js +298 -0
- package/dist/select.cjs +560 -0
- package/dist/select.d.cts +430 -0
- package/dist/select.d.ts +430 -0
- package/dist/select.js +523 -0
- package/dist/signature-pad.cjs +260 -0
- package/dist/signature-pad.d.cts +200 -0
- package/dist/signature-pad.d.ts +200 -0
- package/dist/signature-pad.js +237 -0
- package/dist/slider.cjs +350 -0
- package/dist/slider.d.cts +299 -0
- package/dist/slider.d.ts +299 -0
- package/dist/slider.js +323 -0
- package/dist/splitter.cjs +225 -0
- package/dist/splitter.d.cts +166 -0
- package/dist/splitter.d.ts +166 -0
- package/dist/splitter.js +198 -0
- package/dist/steps.cjs +348 -0
- package/dist/steps.d.cts +289 -0
- package/dist/steps.d.ts +289 -0
- package/dist/steps.js +319 -0
- package/dist/swap.cjs +154 -0
- package/dist/swap.d.cts +98 -0
- package/dist/swap.d.ts +98 -0
- package/dist/swap.js +141 -0
- package/dist/switch.cjs +213 -0
- package/dist/switch.d.cts +177 -0
- package/dist/switch.d.ts +177 -0
- package/dist/switch.js +192 -0
- package/dist/tabs.cjs +240 -0
- package/dist/tabs.d.cts +179 -0
- package/dist/tabs.d.ts +179 -0
- package/dist/tabs.js +218 -0
- package/dist/tags-input.cjs +405 -0
- package/dist/tags-input.d.cts +340 -0
- package/dist/tags-input.d.ts +340 -0
- package/dist/tags-input.js +376 -0
- package/dist/timer.cjs +221 -0
- package/dist/timer.d.cts +176 -0
- package/dist/timer.d.ts +176 -0
- package/dist/timer.js +199 -0
- package/dist/toast.cjs +211 -0
- package/dist/toast.d.cts +157 -0
- package/dist/toast.d.ts +157 -0
- package/dist/toast.js +189 -0
- package/dist/toggle-group.cjs +150 -0
- package/dist/toggle-group.d.cts +122 -0
- package/dist/toggle-group.d.ts +122 -0
- package/dist/toggle-group.js +132 -0
- package/dist/toggle.cjs +107 -0
- package/dist/toggle.d.cts +98 -0
- package/dist/toggle.d.ts +98 -0
- package/dist/toggle.js +94 -0
- package/dist/tooltip.cjs +265 -0
- package/dist/tooltip.d.cts +204 -0
- package/dist/tooltip.d.ts +204 -0
- package/dist/tooltip.js +242 -0
- package/dist/tour.cjs +418 -0
- package/dist/tour.d.cts +304 -0
- package/dist/tour.d.ts +304 -0
- package/dist/tour.js +374 -0
- package/dist/tree-view-DnTVwhew.cjs +651 -0
- package/dist/tree-view-goUH3_RC.js +508 -0
- package/dist/tree-view.cjs +41 -0
- package/dist/tree-view.d.cts +3 -0
- package/dist/tree-view.d.ts +3 -0
- package/dist/tree-view.js +3 -0
- package/dist/types-rSRkzyd6.d.cts +13 -0
- package/dist/types-rSRkzyd6.d.ts +13 -0
- package/dist/use-presence-BSp_dR-C.d.cts +22 -0
- package/dist/use-presence-CtEY6ZT8.cjs +49 -0
- package/dist/use-presence-DkGU_j9h.d.ts +22 -0
- package/dist/use-presence-oNdFU2c2.js +42 -0
- package/dist/utils-D95V66v9.js +548 -0
- package/dist/utils-XrBZd2Yk.cjs +625 -0
- package/package.json +277 -6
|
@@ -0,0 +1,821 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
|
|
3
|
+
const require_utils = require("./utils-XrBZd2Yk.cjs");
|
|
4
|
+
const require_providers = require("./providers-5QhcwgSd.cjs");
|
|
5
|
+
const require_clean_props = require("./clean-props-MyKqus13.cjs");
|
|
6
|
+
const require_factory = require("./factory-JL7MPjkk.cjs");
|
|
7
|
+
const require_presence = require("./presence-DD3l4Tgb.cjs");
|
|
8
|
+
const require_use_presence = require("./use-presence-CtEY6ZT8.cjs");
|
|
9
|
+
let vue = require("vue");
|
|
10
|
+
let _wirekyt_dom_utils = require("@wirekyt/dom/utils");
|
|
11
|
+
let _wirekyt_dom_machines_date_picker = require("@wirekyt/dom/machines/date-picker");
|
|
12
|
+
_wirekyt_dom_machines_date_picker = require_rolldown_runtime.__toESM(_wirekyt_dom_machines_date_picker, 1);
|
|
13
|
+
let _wirekyt_dom = require("@wirekyt/dom");
|
|
14
|
+
//#region src/components/date-picker/use-context.ts
|
|
15
|
+
const [DatePickerProvider, useDatePickerContext] = require_utils.createContext("DatePickerContext");
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/date-picker/clear-trigger.vue
|
|
18
|
+
const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
19
|
+
__name: "clear-trigger",
|
|
20
|
+
props: { asChild: { type: Boolean } },
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const datePicker = useDatePickerContext();
|
|
23
|
+
require_utils.useForwardExpose();
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(datePicker).getClearTriggerProps(), { "as-child": __props.asChild }), {
|
|
26
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
27
|
+
_: 3
|
|
28
|
+
}, 16, ["as-child"]);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/date-picker/content.vue
|
|
34
|
+
const _sfc_main$1 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
35
|
+
__name: "content",
|
|
36
|
+
props: { asChild: { type: Boolean } },
|
|
37
|
+
setup(__props) {
|
|
38
|
+
const datePicker = useDatePickerContext();
|
|
39
|
+
const presence = require_presence.usePresenceContext();
|
|
40
|
+
const mergedProps = (0, vue.computed)(() => (0, _wirekyt_dom.mergeProps)(datePicker.value.getContentProps(), presence.value.presenceProps));
|
|
41
|
+
require_utils.useForwardExpose();
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return !(0, vue.unref)(presence).unmounted ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ key: 0 }, mergedProps.value, { "as-child": __props.asChild }), {
|
|
44
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
45
|
+
_: 3
|
|
46
|
+
}, 16, ["as-child"])) : (0, vue.createCommentVNode)("v-if", true);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/date-picker/context.vue
|
|
52
|
+
const _sfc_main$2 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
53
|
+
__name: "context",
|
|
54
|
+
setup(__props) {
|
|
55
|
+
const datePicker = useDatePickerContext();
|
|
56
|
+
return (_ctx, _cache) => {
|
|
57
|
+
return (0, vue.renderSlot)(_ctx.$slots, "default", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(datePicker))));
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/components/date-picker/control.vue
|
|
63
|
+
const _sfc_main$3 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
64
|
+
__name: "control",
|
|
65
|
+
props: { asChild: { type: Boolean } },
|
|
66
|
+
setup(__props) {
|
|
67
|
+
const datePicker = useDatePickerContext();
|
|
68
|
+
require_utils.useForwardExpose();
|
|
69
|
+
return (_ctx, _cache) => {
|
|
70
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(datePicker).getControlProps(), { "as-child": __props.asChild }), {
|
|
71
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
72
|
+
_: 3
|
|
73
|
+
}, 16, ["as-child"]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/date-picker/input.vue
|
|
79
|
+
const _sfc_main$4 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
80
|
+
__name: "input",
|
|
81
|
+
props: {
|
|
82
|
+
index: {},
|
|
83
|
+
fixOnBlur: { type: Boolean },
|
|
84
|
+
asChild: { type: Boolean }
|
|
85
|
+
},
|
|
86
|
+
setup(__props) {
|
|
87
|
+
const props = __props;
|
|
88
|
+
const datePicker = useDatePickerContext();
|
|
89
|
+
require_utils.useForwardExpose();
|
|
90
|
+
return (_ctx, _cache) => {
|
|
91
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).input, (0, vue.mergeProps)((0, vue.unref)(datePicker).getInputProps(props), { "as-child": __props.asChild }), {
|
|
92
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 16, ["as-child"]);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/components/date-picker/label.vue
|
|
100
|
+
const _sfc_main$5 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
101
|
+
__name: "label",
|
|
102
|
+
props: { asChild: { type: Boolean } },
|
|
103
|
+
setup(__props) {
|
|
104
|
+
const datePicker = useDatePickerContext();
|
|
105
|
+
require_utils.useForwardExpose();
|
|
106
|
+
return (_ctx, _cache) => {
|
|
107
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).label, (0, vue.mergeProps)((0, vue.unref)(datePicker).getLabelProps(), { "as-child": __props.asChild }), {
|
|
108
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
109
|
+
_: 3
|
|
110
|
+
}, 16, ["as-child"]);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/components/date-picker/month-select.vue
|
|
116
|
+
const _hoisted_1$1 = ["value"];
|
|
117
|
+
const _sfc_main$6 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
118
|
+
__name: "month-select",
|
|
119
|
+
props: { asChild: { type: Boolean } },
|
|
120
|
+
setup(__props) {
|
|
121
|
+
const datePicker = useDatePickerContext();
|
|
122
|
+
require_utils.useForwardExpose();
|
|
123
|
+
return (_ctx, _cache) => {
|
|
124
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).select, (0, vue.mergeProps)((0, vue.unref)(datePicker).getMonthSelectProps(), { "as-child": __props.asChild }), {
|
|
125
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)((0, vue.unref)(datePicker).getMonths(), (month) => {
|
|
126
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
|
|
127
|
+
key: month.value,
|
|
128
|
+
value: month.value
|
|
129
|
+
}, (0, vue.toDisplayString)(month.label), 9, _hoisted_1$1);
|
|
130
|
+
}), 128))]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 16, ["as-child"]);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/components/date-picker/use-view-props-context.ts
|
|
138
|
+
const DEFAULT_VIEW_PROPS_CONTEXT = { view: "day" };
|
|
139
|
+
const [DatePickerViewPropsProvider, useDatePickerViewPropsContext] = require_utils.createContext("DatePickerViewPropsContext");
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/components/date-picker/next-trigger.vue
|
|
142
|
+
const _sfc_main$7 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
143
|
+
__name: "next-trigger",
|
|
144
|
+
props: { asChild: { type: Boolean } },
|
|
145
|
+
setup(__props) {
|
|
146
|
+
const datePicker = useDatePickerContext();
|
|
147
|
+
const viewProps = useDatePickerViewPropsContext(DEFAULT_VIEW_PROPS_CONTEXT);
|
|
148
|
+
require_utils.useForwardExpose();
|
|
149
|
+
return (_ctx, _cache) => {
|
|
150
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(datePicker).getNextTriggerProps((0, vue.unref)(viewProps)), { "as-child": __props.asChild }), {
|
|
151
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
152
|
+
_: 3
|
|
153
|
+
}, 16, ["as-child"]);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/components/date-picker/positioner.vue
|
|
159
|
+
const _sfc_main$8 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
160
|
+
__name: "positioner",
|
|
161
|
+
props: { asChild: { type: Boolean } },
|
|
162
|
+
setup(__props) {
|
|
163
|
+
const datePicker = useDatePickerContext();
|
|
164
|
+
const presence = require_presence.usePresenceContext();
|
|
165
|
+
require_utils.useForwardExpose();
|
|
166
|
+
return (_ctx, _cache) => {
|
|
167
|
+
return !(0, vue.unref)(presence).unmounted ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(datePicker).getPositionerProps(), { "as-child": __props.asChild }), {
|
|
168
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
169
|
+
_: 3
|
|
170
|
+
}, 16, ["as-child"])) : (0, vue.createCommentVNode)("v-if", true);
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/components/date-picker/preset-trigger.vue
|
|
176
|
+
const _sfc_main$9 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
177
|
+
__name: "preset-trigger",
|
|
178
|
+
props: {
|
|
179
|
+
value: {},
|
|
180
|
+
asChild: { type: Boolean }
|
|
181
|
+
},
|
|
182
|
+
setup(__props) {
|
|
183
|
+
const props = __props;
|
|
184
|
+
const datePicker = useDatePickerContext();
|
|
185
|
+
require_utils.useForwardExpose();
|
|
186
|
+
return (_ctx, _cache) => {
|
|
187
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(datePicker).getPresetTriggerProps(props), { "as-child": __props.asChild }), {
|
|
188
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
189
|
+
_: 3
|
|
190
|
+
}, 16, ["as-child"]);
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/components/date-picker/prev-trigger.vue
|
|
196
|
+
const _sfc_main$10 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
197
|
+
__name: "prev-trigger",
|
|
198
|
+
props: { asChild: { type: Boolean } },
|
|
199
|
+
setup(__props) {
|
|
200
|
+
const datePicker = useDatePickerContext();
|
|
201
|
+
const viewProps = useDatePickerViewPropsContext(DEFAULT_VIEW_PROPS_CONTEXT);
|
|
202
|
+
require_utils.useForwardExpose();
|
|
203
|
+
return (_ctx, _cache) => {
|
|
204
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(datePicker).getPrevTriggerProps((0, vue.unref)(viewProps)), { "as-child": __props.asChild }), {
|
|
205
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
206
|
+
_: 3
|
|
207
|
+
}, 16, ["as-child"]);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/components/date-picker/range-text.vue
|
|
213
|
+
const _sfc_main$11 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
214
|
+
__name: "range-text",
|
|
215
|
+
props: { asChild: { type: Boolean } },
|
|
216
|
+
setup(__props) {
|
|
217
|
+
const datePicker = useDatePickerContext();
|
|
218
|
+
const visibleRangeText = (0, vue.computed)(() => {
|
|
219
|
+
const { start, end } = datePicker.value.visibleRangeText;
|
|
220
|
+
return (0, _wirekyt_dom_utils.uniq)([start, end]).filter(Boolean).join(" - ");
|
|
221
|
+
});
|
|
222
|
+
require_utils.useForwardExpose();
|
|
223
|
+
return (_ctx, _cache) => {
|
|
224
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(datePicker).getRangeTextProps(), { "as-child": __props.asChild }), {
|
|
225
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(visibleRangeText.value), 1)]),
|
|
226
|
+
_: 1
|
|
227
|
+
}, 16, ["as-child"]);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region src/components/date-picker/anatomy.ts
|
|
233
|
+
const datePickerAnatomy = _wirekyt_dom_machines_date_picker.anatomy.extendWith("view", "valueText");
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/components/date-picker/value-text.vue
|
|
236
|
+
const _sfc_main$22 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
237
|
+
__name: "value-text",
|
|
238
|
+
props: {
|
|
239
|
+
placeholder: {},
|
|
240
|
+
separator: { default: ", " },
|
|
241
|
+
asChild: { type: Boolean }
|
|
242
|
+
},
|
|
243
|
+
setup(__props) {
|
|
244
|
+
const props = __props;
|
|
245
|
+
const datePicker = useDatePickerContext();
|
|
246
|
+
const hasValue = (0, vue.computed)(() => datePicker.value.value.length > 0);
|
|
247
|
+
const displayValue = (0, vue.computed)(() => {
|
|
248
|
+
if (!hasValue.value) return props.placeholder;
|
|
249
|
+
return datePicker.value.valueAsString.join(props.separator);
|
|
250
|
+
});
|
|
251
|
+
const getRenderProps = (value, index) => ({
|
|
252
|
+
value,
|
|
253
|
+
index,
|
|
254
|
+
valueAsString: datePicker.value.valueAsString[index],
|
|
255
|
+
remove: () => {
|
|
256
|
+
datePicker.value.setValue(datePicker.value.value.filter((_, i) => i !== index));
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
require_utils.useForwardExpose();
|
|
260
|
+
return (_ctx, _cache) => {
|
|
261
|
+
return _ctx.$slots.default ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [hasValue.value ? ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, (0, vue.renderList)((0, vue.unref)(datePicker).value, (value, index) => {
|
|
262
|
+
return (0, vue.renderSlot)(_ctx.$slots, "default", (0, vue.mergeProps)({ ref_for: true }, getRenderProps(value, index)), void 0, void 0, index);
|
|
263
|
+
}), 128)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)(__props.placeholder), 1)], 64))], 64)) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).span, (0, vue.mergeProps)({ key: 1 }, (0, vue.unref)(datePickerAnatomy).build().valueText.attrs, { "as-child": __props.asChild }), {
|
|
264
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(displayValue.value), 1)]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 16, ["as-child"]));
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/components/date-picker/root-provider.vue
|
|
272
|
+
const _sfc_main$13 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
273
|
+
__name: "root-provider",
|
|
274
|
+
props: {
|
|
275
|
+
value: {},
|
|
276
|
+
lazyMount: { type: Boolean },
|
|
277
|
+
unmountOnExit: { type: Boolean },
|
|
278
|
+
asChild: { type: Boolean }
|
|
279
|
+
},
|
|
280
|
+
emits: ["exitComplete"],
|
|
281
|
+
setup(__props, { emit: __emit }) {
|
|
282
|
+
const props = __props;
|
|
283
|
+
const emits = __emit;
|
|
284
|
+
const datePicker = (0, vue.computed)(() => props.value);
|
|
285
|
+
const presence = require_use_presence.usePresence((0, vue.computed)(() => ({
|
|
286
|
+
present: datePicker.value.open,
|
|
287
|
+
lazyMount: props.lazyMount,
|
|
288
|
+
unmountOnExit: props.unmountOnExit
|
|
289
|
+
})), emits);
|
|
290
|
+
DatePickerProvider(datePicker);
|
|
291
|
+
require_presence.PresenceProvider(presence);
|
|
292
|
+
require_utils.RenderStrategyPropsProvider((0, vue.computed)(() => ({
|
|
293
|
+
lazyMount: props.lazyMount,
|
|
294
|
+
unmountOnExit: props.unmountOnExit
|
|
295
|
+
})));
|
|
296
|
+
require_utils.useForwardExpose();
|
|
297
|
+
return (_ctx, _cache) => {
|
|
298
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)(datePicker.value.getRootProps(), { "as-child": __props.asChild }), {
|
|
299
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
300
|
+
_: 3
|
|
301
|
+
}, 16, ["as-child"]);
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/components/date-picker/use-date-picker.ts
|
|
307
|
+
const useDatePicker = (props = {}, emit) => {
|
|
308
|
+
const id = (0, vue.useId)();
|
|
309
|
+
const env = require_providers.useEnvironmentContext(require_providers.DEFAULT_ENVIRONMENT);
|
|
310
|
+
const locale = require_providers.useLocaleContext(require_providers.DEFAULT_LOCALE);
|
|
311
|
+
const context = (0, vue.computed)(() => {
|
|
312
|
+
const localeProps = (0, vue.toValue)(props);
|
|
313
|
+
return {
|
|
314
|
+
id,
|
|
315
|
+
dir: locale.value.dir,
|
|
316
|
+
locale: locale.value.locale,
|
|
317
|
+
value: localeProps.modelValue,
|
|
318
|
+
getRootNode: env?.value.getRootNode,
|
|
319
|
+
...require_clean_props.cleanProps(localeProps),
|
|
320
|
+
onFocusChange: (details) => {
|
|
321
|
+
emit?.("focusChange", details);
|
|
322
|
+
emit?.("update:focusedValue", details.focusedValue);
|
|
323
|
+
localeProps.onFocusChange?.(details);
|
|
324
|
+
},
|
|
325
|
+
onViewChange: (details) => {
|
|
326
|
+
emit?.("viewChange", details);
|
|
327
|
+
emit?.("update:view", details.view);
|
|
328
|
+
localeProps.onViewChange?.(details);
|
|
329
|
+
},
|
|
330
|
+
onOpenChange: (details) => {
|
|
331
|
+
emit?.("openChange", details);
|
|
332
|
+
emit?.("update:open", details.open);
|
|
333
|
+
localeProps.onOpenChange?.(details);
|
|
334
|
+
},
|
|
335
|
+
onValueChange: (details) => {
|
|
336
|
+
emit?.("valueChange", details);
|
|
337
|
+
emit?.("update:modelValue", details.value);
|
|
338
|
+
localeProps.onValueChange?.(details);
|
|
339
|
+
},
|
|
340
|
+
onVisibleRangeChange: (details) => {
|
|
341
|
+
emit?.("visibleRangeChange", details);
|
|
342
|
+
localeProps.onVisibleRangeChange?.(details);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
});
|
|
346
|
+
const service = require_utils.useMachine(_wirekyt_dom_machines_date_picker.machine, context);
|
|
347
|
+
return (0, vue.computed)(() => _wirekyt_dom_machines_date_picker.connect(service, require_utils.normalizeProps));
|
|
348
|
+
};
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/components/date-picker/root.vue
|
|
351
|
+
const _sfc_main$12 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
352
|
+
__name: "root",
|
|
353
|
+
props: /*@__PURE__*/ (0, vue.mergeDefaults)({
|
|
354
|
+
closeOnSelect: { type: Boolean },
|
|
355
|
+
createCalendar: { type: Function },
|
|
356
|
+
defaultFocusedValue: {},
|
|
357
|
+
defaultOpen: { type: Boolean },
|
|
358
|
+
defaultValue: {},
|
|
359
|
+
defaultView: {},
|
|
360
|
+
disabled: { type: Boolean },
|
|
361
|
+
fixedWeeks: { type: Boolean },
|
|
362
|
+
focusedValue: {},
|
|
363
|
+
format: { type: Function },
|
|
364
|
+
id: {},
|
|
365
|
+
ids: {},
|
|
366
|
+
isDateUnavailable: { type: Function },
|
|
367
|
+
locale: {},
|
|
368
|
+
max: {},
|
|
369
|
+
maxSelectedDates: {},
|
|
370
|
+
maxView: {},
|
|
371
|
+
min: {},
|
|
372
|
+
minView: {},
|
|
373
|
+
modelValue: {},
|
|
374
|
+
name: {},
|
|
375
|
+
numOfMonths: {},
|
|
376
|
+
open: { type: Boolean },
|
|
377
|
+
openOnClick: { type: Boolean },
|
|
378
|
+
outsideDaySelectable: { type: Boolean },
|
|
379
|
+
parse: { type: Function },
|
|
380
|
+
placeholder: {},
|
|
381
|
+
positioning: {},
|
|
382
|
+
readOnly: { type: Boolean },
|
|
383
|
+
selectionMode: {},
|
|
384
|
+
showWeekNumbers: { type: Boolean },
|
|
385
|
+
startOfWeek: {},
|
|
386
|
+
timeZone: {},
|
|
387
|
+
translations: {},
|
|
388
|
+
view: {},
|
|
389
|
+
inline: { type: Boolean },
|
|
390
|
+
invalid: { type: Boolean },
|
|
391
|
+
required: { type: Boolean },
|
|
392
|
+
lazyMount: { type: Boolean },
|
|
393
|
+
unmountOnExit: { type: Boolean },
|
|
394
|
+
asChild: { type: Boolean }
|
|
395
|
+
}, {
|
|
396
|
+
closeOnSelect: void 0,
|
|
397
|
+
defaultOpen: void 0,
|
|
398
|
+
disabled: void 0,
|
|
399
|
+
fixedWeeks: void 0,
|
|
400
|
+
inline: void 0,
|
|
401
|
+
invalid: void 0,
|
|
402
|
+
open: void 0,
|
|
403
|
+
openOnClick: void 0,
|
|
404
|
+
outsideDaySelectable: void 0,
|
|
405
|
+
readOnly: void 0,
|
|
406
|
+
required: void 0,
|
|
407
|
+
showWeekNumbers: void 0
|
|
408
|
+
}),
|
|
409
|
+
emits: [
|
|
410
|
+
"exitComplete",
|
|
411
|
+
"focusChange",
|
|
412
|
+
"openChange",
|
|
413
|
+
"valueChange",
|
|
414
|
+
"viewChange",
|
|
415
|
+
"visibleRangeChange",
|
|
416
|
+
"update:modelValue",
|
|
417
|
+
"update:open",
|
|
418
|
+
"update:view",
|
|
419
|
+
"update:focusedValue"
|
|
420
|
+
],
|
|
421
|
+
setup(__props, { emit: __emit }) {
|
|
422
|
+
const props = __props;
|
|
423
|
+
const emits = __emit;
|
|
424
|
+
const datePicker = useDatePicker(props, emits);
|
|
425
|
+
const presence = require_use_presence.usePresence((0, vue.computed)(() => ({
|
|
426
|
+
present: datePicker.value.open,
|
|
427
|
+
lazyMount: props.lazyMount,
|
|
428
|
+
unmountOnExit: props.unmountOnExit
|
|
429
|
+
})), emits);
|
|
430
|
+
DatePickerProvider(datePicker);
|
|
431
|
+
require_presence.PresenceProvider(presence);
|
|
432
|
+
require_utils.RenderStrategyPropsProvider((0, vue.computed)(() => ({
|
|
433
|
+
lazyMount: props.lazyMount,
|
|
434
|
+
unmountOnExit: props.unmountOnExit
|
|
435
|
+
})));
|
|
436
|
+
require_utils.useForwardExpose();
|
|
437
|
+
return (_ctx, _cache) => {
|
|
438
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(datePicker).getRootProps(), { "as-child": __props.asChild }), {
|
|
439
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
440
|
+
_: 3
|
|
441
|
+
}, 16, ["as-child"]);
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/components/date-picker/use-table-props-context.ts
|
|
447
|
+
const [DatePickerTablePropsProvider, useDatePickerTablePropsContext] = require_utils.createContext("DatePickerTablePropsContext");
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region src/components/date-picker/table-body.vue
|
|
450
|
+
const _sfc_main$15 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
451
|
+
__name: "table-body",
|
|
452
|
+
props: { asChild: { type: Boolean } },
|
|
453
|
+
setup(__props) {
|
|
454
|
+
const datePicker = useDatePickerContext();
|
|
455
|
+
const tableProps = useDatePickerTablePropsContext();
|
|
456
|
+
require_utils.useForwardExpose();
|
|
457
|
+
return (_ctx, _cache) => {
|
|
458
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).tbody, (0, vue.mergeProps)((0, vue.unref)(datePicker).getTableBodyProps((0, vue.unref)(tableProps)), { "as-child": __props.asChild }), {
|
|
459
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
460
|
+
_: 3
|
|
461
|
+
}, 16, ["as-child"]);
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region src/components/date-picker/use-table-cell-props-context.ts
|
|
467
|
+
const [DatePickerTableCellPropsProvider, useDatePickerTableCellPropsContext] = require_utils.createContext("DatePickerTableCellPropsContext");
|
|
468
|
+
//#endregion
|
|
469
|
+
//#region src/components/date-picker/table-cell-trigger.vue
|
|
470
|
+
const _sfc_main$17 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
471
|
+
__name: "table-cell-trigger",
|
|
472
|
+
props: { asChild: { type: Boolean } },
|
|
473
|
+
setup(__props) {
|
|
474
|
+
const datePicker = useDatePickerContext();
|
|
475
|
+
const cellProps = useDatePickerTableCellPropsContext();
|
|
476
|
+
const viewProps = useDatePickerViewPropsContext(DEFAULT_VIEW_PROPS_CONTEXT);
|
|
477
|
+
const triggerProps = (0, vue.computed)(() => {
|
|
478
|
+
const viewFn = {
|
|
479
|
+
day: datePicker.value.getDayTableCellTriggerProps,
|
|
480
|
+
month: datePicker.value.getMonthTableCellTriggerProps,
|
|
481
|
+
year: datePicker.value.getYearTableCellTriggerProps
|
|
482
|
+
}[viewProps.view];
|
|
483
|
+
return viewFn(cellProps);
|
|
484
|
+
});
|
|
485
|
+
require_utils.useForwardExpose();
|
|
486
|
+
return (_ctx, _cache) => {
|
|
487
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)(triggerProps.value, { "as-child": __props.asChild }), {
|
|
488
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
489
|
+
_: 3
|
|
490
|
+
}, 16, ["as-child"]);
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
//#endregion
|
|
495
|
+
//#region src/components/date-picker/table-cell.vue
|
|
496
|
+
const _sfc_main$16 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
497
|
+
__name: "table-cell",
|
|
498
|
+
props: {
|
|
499
|
+
value: {},
|
|
500
|
+
disabled: { type: Boolean },
|
|
501
|
+
columns: {},
|
|
502
|
+
visibleRange: {},
|
|
503
|
+
asChild: { type: Boolean }
|
|
504
|
+
},
|
|
505
|
+
setup(__props) {
|
|
506
|
+
const props = __props;
|
|
507
|
+
const datePicker = useDatePickerContext();
|
|
508
|
+
const viewProps = useDatePickerViewPropsContext(DEFAULT_VIEW_PROPS_CONTEXT);
|
|
509
|
+
DatePickerTableCellPropsProvider(props);
|
|
510
|
+
const tableCellProps = (0, vue.computed)(() => {
|
|
511
|
+
return {
|
|
512
|
+
day: datePicker.value.getDayTableCellProps,
|
|
513
|
+
month: datePicker.value.getMonthTableCellProps,
|
|
514
|
+
year: datePicker.value.getYearTableCellProps
|
|
515
|
+
}[viewProps.view ?? "day"](props);
|
|
516
|
+
});
|
|
517
|
+
require_utils.useForwardExpose();
|
|
518
|
+
return (_ctx, _cache) => {
|
|
519
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).td, (0, vue.mergeProps)(tableCellProps.value, { "as-child": __props.asChild }), {
|
|
520
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
521
|
+
_: 3
|
|
522
|
+
}, 16, ["as-child"]);
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/components/date-picker/table-head.vue
|
|
528
|
+
const _sfc_main$18 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
529
|
+
__name: "table-head",
|
|
530
|
+
props: { asChild: { type: Boolean } },
|
|
531
|
+
setup(__props) {
|
|
532
|
+
const datePicker = useDatePickerContext();
|
|
533
|
+
const tableProps = useDatePickerTablePropsContext();
|
|
534
|
+
require_utils.useForwardExpose();
|
|
535
|
+
return (_ctx, _cache) => {
|
|
536
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).thead, (0, vue.mergeProps)((0, vue.unref)(datePicker).getTableHeadProps((0, vue.unref)(tableProps)), { "as-child": __props.asChild }), {
|
|
537
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
538
|
+
_: 3
|
|
539
|
+
}, 16, ["as-child"]);
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region src/components/date-picker/table-header.vue
|
|
545
|
+
const _sfc_main$19 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
546
|
+
__name: "table-header",
|
|
547
|
+
props: { asChild: { type: Boolean } },
|
|
548
|
+
setup(__props) {
|
|
549
|
+
const datePicker = useDatePickerContext();
|
|
550
|
+
const tableProps = useDatePickerTablePropsContext();
|
|
551
|
+
require_utils.useForwardExpose();
|
|
552
|
+
return (_ctx, _cache) => {
|
|
553
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).th, (0, vue.mergeProps)((0, vue.unref)(datePicker).getTableHeaderProps((0, vue.unref)(tableProps)), { "as-child": __props.asChild }), {
|
|
554
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
555
|
+
_: 3
|
|
556
|
+
}, 16, ["as-child"]);
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
//#endregion
|
|
561
|
+
//#region src/components/date-picker/table-row.vue
|
|
562
|
+
const _sfc_main$20 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
563
|
+
__name: "table-row",
|
|
564
|
+
props: { asChild: { type: Boolean } },
|
|
565
|
+
setup(__props) {
|
|
566
|
+
const datePicker = useDatePickerContext();
|
|
567
|
+
const tableProps = useDatePickerTablePropsContext();
|
|
568
|
+
require_utils.useForwardExpose();
|
|
569
|
+
return (_ctx, _cache) => {
|
|
570
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).tr, (0, vue.mergeProps)((0, vue.unref)(datePicker).getTableRowProps((0, vue.unref)(tableProps)), { "as-child": __props.asChild }), {
|
|
571
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
572
|
+
_: 3
|
|
573
|
+
}, 16, ["as-child"]);
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region src/components/date-picker/table.vue
|
|
579
|
+
const _sfc_main$14 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
580
|
+
__name: "table",
|
|
581
|
+
props: {
|
|
582
|
+
view: {},
|
|
583
|
+
columns: {},
|
|
584
|
+
id: {},
|
|
585
|
+
asChild: { type: Boolean }
|
|
586
|
+
},
|
|
587
|
+
setup(__props) {
|
|
588
|
+
const props = __props;
|
|
589
|
+
const datePicker = useDatePickerContext();
|
|
590
|
+
const viewProps = useDatePickerViewPropsContext(DEFAULT_VIEW_PROPS_CONTEXT);
|
|
591
|
+
const uid = (0, vue.useId)();
|
|
592
|
+
const tableProps = (0, vue.computed)(() => ({
|
|
593
|
+
...props,
|
|
594
|
+
id: props.id ?? uid,
|
|
595
|
+
...viewProps
|
|
596
|
+
}));
|
|
597
|
+
DatePickerTablePropsProvider(tableProps);
|
|
598
|
+
require_utils.useForwardExpose();
|
|
599
|
+
return (_ctx, _cache) => {
|
|
600
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).table, (0, vue.mergeProps)((0, vue.unref)(datePicker).getTableProps(tableProps.value), { "as-child": __props.asChild }), {
|
|
601
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
602
|
+
_: 3
|
|
603
|
+
}, 16, ["as-child"]);
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region src/components/date-picker/trigger.vue
|
|
609
|
+
const _sfc_main$21 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
610
|
+
__name: "trigger",
|
|
611
|
+
props: { asChild: { type: Boolean } },
|
|
612
|
+
setup(__props) {
|
|
613
|
+
const datePicker = useDatePickerContext();
|
|
614
|
+
require_utils.useForwardExpose();
|
|
615
|
+
return (_ctx, _cache) => {
|
|
616
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(datePicker).getTriggerProps(), { "as-child": __props.asChild }), {
|
|
617
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
618
|
+
_: 3
|
|
619
|
+
}, 16, ["as-child"]);
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
//#endregion
|
|
624
|
+
//#region src/components/date-picker/view-control.vue
|
|
625
|
+
const _sfc_main$24 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
626
|
+
__name: "view-control",
|
|
627
|
+
props: { asChild: { type: Boolean } },
|
|
628
|
+
setup(__props) {
|
|
629
|
+
const datePicker = useDatePickerContext();
|
|
630
|
+
const viewProps = useDatePickerViewPropsContext(DEFAULT_VIEW_PROPS_CONTEXT);
|
|
631
|
+
require_utils.useForwardExpose();
|
|
632
|
+
return (_ctx, _cache) => {
|
|
633
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(datePicker).getViewControlProps((0, vue.unref)(viewProps)), { "as-child": __props.asChild }), {
|
|
634
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
635
|
+
_: 3
|
|
636
|
+
}, 16, ["as-child"]);
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region src/components/date-picker/view-trigger.vue
|
|
642
|
+
const _sfc_main$25 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
643
|
+
__name: "view-trigger",
|
|
644
|
+
props: { asChild: { type: Boolean } },
|
|
645
|
+
setup(__props) {
|
|
646
|
+
const datePicker = useDatePickerContext();
|
|
647
|
+
const viewProps = useDatePickerViewPropsContext(DEFAULT_VIEW_PROPS_CONTEXT);
|
|
648
|
+
require_utils.useForwardExpose();
|
|
649
|
+
return (_ctx, _cache) => {
|
|
650
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(datePicker).getViewTriggerProps((0, vue.unref)(viewProps)), { "as-child": __props.asChild }), {
|
|
651
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
652
|
+
_: 3
|
|
653
|
+
}, 16, ["as-child"]);
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region src/components/date-picker/view.vue
|
|
659
|
+
const _sfc_main$23 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
660
|
+
__name: "view",
|
|
661
|
+
props: {
|
|
662
|
+
view: {},
|
|
663
|
+
asChild: { type: Boolean }
|
|
664
|
+
},
|
|
665
|
+
setup(__props) {
|
|
666
|
+
const props = __props;
|
|
667
|
+
const datePicker = useDatePickerContext();
|
|
668
|
+
DatePickerViewPropsProvider(props);
|
|
669
|
+
require_utils.useForwardExpose();
|
|
670
|
+
return (_ctx, _cache) => {
|
|
671
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(datePickerAnatomy).build().view.attrs, {
|
|
672
|
+
hidden: (0, vue.unref)(datePicker).view !== __props.view,
|
|
673
|
+
"as-child": __props.asChild
|
|
674
|
+
}), {
|
|
675
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
676
|
+
_: 3
|
|
677
|
+
}, 16, ["hidden", "as-child"]);
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
//#endregion
|
|
682
|
+
//#region src/components/date-picker/week-number-header-cell.vue
|
|
683
|
+
const _sfc_main$27 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
684
|
+
__name: "week-number-header-cell",
|
|
685
|
+
props: { asChild: { type: Boolean } },
|
|
686
|
+
setup(__props) {
|
|
687
|
+
const datePicker = useDatePickerContext();
|
|
688
|
+
const tableProps = useDatePickerTablePropsContext();
|
|
689
|
+
require_utils.useForwardExpose();
|
|
690
|
+
return (_ctx, _cache) => {
|
|
691
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).th, (0, vue.mergeProps)((0, vue.unref)(datePicker).getWeekNumberHeaderCellProps((0, vue.unref)(tableProps)), { "as-child": __props.asChild }), {
|
|
692
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
693
|
+
_: 3
|
|
694
|
+
}, 16, ["as-child"]);
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region src/components/date-picker/week-number-cell.vue
|
|
700
|
+
const _sfc_main$26 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
701
|
+
__name: "week-number-cell",
|
|
702
|
+
props: {
|
|
703
|
+
weekIndex: {},
|
|
704
|
+
week: {},
|
|
705
|
+
asChild: { type: Boolean }
|
|
706
|
+
},
|
|
707
|
+
setup(__props) {
|
|
708
|
+
const props = __props;
|
|
709
|
+
const datePicker = useDatePickerContext();
|
|
710
|
+
require_utils.useForwardExpose();
|
|
711
|
+
return (_ctx, _cache) => {
|
|
712
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).td, (0, vue.mergeProps)((0, vue.unref)(datePicker).getWeekNumberCellProps({
|
|
713
|
+
weekIndex: props.weekIndex,
|
|
714
|
+
week: props.week
|
|
715
|
+
}), { "as-child": __props.asChild }), {
|
|
716
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
717
|
+
_: 3
|
|
718
|
+
}, 16, ["as-child"]);
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region src/components/date-picker/year-select.vue
|
|
724
|
+
const _hoisted_1 = ["value"];
|
|
725
|
+
const _sfc_main$28 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
726
|
+
__name: "year-select",
|
|
727
|
+
props: { asChild: { type: Boolean } },
|
|
728
|
+
setup(__props) {
|
|
729
|
+
const datePicker = useDatePickerContext();
|
|
730
|
+
require_utils.useForwardExpose();
|
|
731
|
+
return (_ctx, _cache) => {
|
|
732
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).select, (0, vue.mergeProps)((0, vue.unref)(datePicker).getYearSelectProps(), { "as-child": __props.asChild }), {
|
|
733
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)((0, vue.unref)(datePicker).getYears(), (year) => {
|
|
734
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
|
|
735
|
+
key: year.value,
|
|
736
|
+
value: year.value
|
|
737
|
+
}, (0, vue.toDisplayString)(year.label), 9, _hoisted_1);
|
|
738
|
+
}), 128))]),
|
|
739
|
+
_: 1
|
|
740
|
+
}, 16, ["as-child"]);
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
//#endregion
|
|
745
|
+
//#region src/components/date-picker/date-picker.ts
|
|
746
|
+
var date_picker_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
747
|
+
ClearTrigger: () => _sfc_main,
|
|
748
|
+
Content: () => _sfc_main$1,
|
|
749
|
+
Context: () => _sfc_main$2,
|
|
750
|
+
Control: () => _sfc_main$3,
|
|
751
|
+
Input: () => _sfc_main$4,
|
|
752
|
+
Label: () => _sfc_main$5,
|
|
753
|
+
MonthSelect: () => _sfc_main$6,
|
|
754
|
+
NextTrigger: () => _sfc_main$7,
|
|
755
|
+
Positioner: () => _sfc_main$8,
|
|
756
|
+
PresetTrigger: () => _sfc_main$9,
|
|
757
|
+
PrevTrigger: () => _sfc_main$10,
|
|
758
|
+
RangeText: () => _sfc_main$11,
|
|
759
|
+
Root: () => _sfc_main$12,
|
|
760
|
+
RootProvider: () => _sfc_main$13,
|
|
761
|
+
Table: () => _sfc_main$14,
|
|
762
|
+
TableBody: () => _sfc_main$15,
|
|
763
|
+
TableCell: () => _sfc_main$16,
|
|
764
|
+
TableCellTrigger: () => _sfc_main$17,
|
|
765
|
+
TableHead: () => _sfc_main$18,
|
|
766
|
+
TableHeader: () => _sfc_main$19,
|
|
767
|
+
TableRow: () => _sfc_main$20,
|
|
768
|
+
Trigger: () => _sfc_main$21,
|
|
769
|
+
ValueText: () => _sfc_main$22,
|
|
770
|
+
View: () => _sfc_main$23,
|
|
771
|
+
ViewControl: () => _sfc_main$24,
|
|
772
|
+
ViewTrigger: () => _sfc_main$25,
|
|
773
|
+
WeekNumberCell: () => _sfc_main$26,
|
|
774
|
+
WeekNumberHeaderCell: () => _sfc_main$27,
|
|
775
|
+
YearSelect: () => _sfc_main$28
|
|
776
|
+
});
|
|
777
|
+
//#endregion
|
|
778
|
+
Object.defineProperty(exports, "DatePicker", {
|
|
779
|
+
enumerable: true,
|
|
780
|
+
get: function() {
|
|
781
|
+
return date_picker_exports;
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
exports.DatePickerClearTrigger = _sfc_main;
|
|
785
|
+
exports.DatePickerContent = _sfc_main$1;
|
|
786
|
+
exports.DatePickerContext = _sfc_main$2;
|
|
787
|
+
exports.DatePickerControl = _sfc_main$3;
|
|
788
|
+
exports.DatePickerInput = _sfc_main$4;
|
|
789
|
+
exports.DatePickerLabel = _sfc_main$5;
|
|
790
|
+
exports.DatePickerMonthSelect = _sfc_main$6;
|
|
791
|
+
exports.DatePickerNextTrigger = _sfc_main$7;
|
|
792
|
+
exports.DatePickerPositioner = _sfc_main$8;
|
|
793
|
+
exports.DatePickerPresetTrigger = _sfc_main$9;
|
|
794
|
+
exports.DatePickerPrevTrigger = _sfc_main$10;
|
|
795
|
+
exports.DatePickerRangeText = _sfc_main$11;
|
|
796
|
+
exports.DatePickerRoot = _sfc_main$12;
|
|
797
|
+
exports.DatePickerRootProvider = _sfc_main$13;
|
|
798
|
+
exports.DatePickerTable = _sfc_main$14;
|
|
799
|
+
exports.DatePickerTableBody = _sfc_main$15;
|
|
800
|
+
exports.DatePickerTableCell = _sfc_main$16;
|
|
801
|
+
exports.DatePickerTableCellTrigger = _sfc_main$17;
|
|
802
|
+
exports.DatePickerTableHead = _sfc_main$18;
|
|
803
|
+
exports.DatePickerTableHeader = _sfc_main$19;
|
|
804
|
+
exports.DatePickerTableRow = _sfc_main$20;
|
|
805
|
+
exports.DatePickerTrigger = _sfc_main$21;
|
|
806
|
+
exports.DatePickerValueText = _sfc_main$22;
|
|
807
|
+
exports.DatePickerView = _sfc_main$23;
|
|
808
|
+
exports.DatePickerViewControl = _sfc_main$24;
|
|
809
|
+
exports.DatePickerViewTrigger = _sfc_main$25;
|
|
810
|
+
exports.DatePickerWeekNumberCell = _sfc_main$26;
|
|
811
|
+
exports.DatePickerWeekNumberHeaderCell = _sfc_main$27;
|
|
812
|
+
exports.DatePickerYearSelect = _sfc_main$28;
|
|
813
|
+
exports.datePickerAnatomy = datePickerAnatomy;
|
|
814
|
+
Object.defineProperty(exports, "parseDate", {
|
|
815
|
+
enumerable: true,
|
|
816
|
+
get: function() {
|
|
817
|
+
return _wirekyt_dom_machines_date_picker.parse;
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
exports.useDatePicker = useDatePicker;
|
|
821
|
+
exports.useDatePickerContext = useDatePickerContext;
|