@3df-spa/ui 1.0.7 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/UiPopoverTrigger.vue_vue_type_script_setup_true_lang-DKJgwMAw.js +258 -0
- package/dist/calendar.d.ts +88 -0
- package/dist/calendar.js +416 -0
- package/dist/carousel.d.ts +103 -0
- package/dist/carousel.js +206 -0
- package/dist/index.d.ts +43 -223
- package/dist/index.js +3593 -4455
- package/dist/theme.css +181 -785
- package/dist/utils-C9QoOYNG.js +6 -0
- package/package.json +22 -4
- /package/dist/{index.css → ui.css} +0 -0
package/dist/calendar.js
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import { defineComponent as j, useAttrs as E, computed as w, ref as A, watch as H, openBlock as f, createElementBlock as h, mergeProps as B, unref as p, createElementVNode as a, normalizeClass as U, Fragment as P, renderList as R, createCommentVNode as $, toDisplayString as S, createBlock as _, withCtx as y, createVNode as k } from "vue";
|
|
2
|
+
import { startOfWeek as T, format as x, addDays as W, addMonths as F, startOfMonth as J, eachDayOfInterval as I, endOfMonth as K, endOfWeek as Q, isToday as X, isSameMonth as Y, isSameDay as V, subMonths as Z } from "date-fns";
|
|
3
|
+
import { c as C } from "./utils-C9QoOYNG.js";
|
|
4
|
+
import { _ as N, a as z, b as L } from "./UiPopoverTrigger.vue_vue_type_script_setup_true_lang-DKJgwMAw.js";
|
|
5
|
+
function ee(t, n, e) {
|
|
6
|
+
if (n) {
|
|
7
|
+
if (t === "single" && n instanceof Date) return n;
|
|
8
|
+
if (t === "range" && "from" in n)
|
|
9
|
+
return n.from;
|
|
10
|
+
}
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function te(t, n) {
|
|
14
|
+
const e = T(/* @__PURE__ */ new Date(), { weekStartsOn: t });
|
|
15
|
+
return Array.from({ length: 7 }, (r, s) => x(W(e, s), "EEEEEE", { locale: n }));
|
|
16
|
+
}
|
|
17
|
+
function ne(t, n, e) {
|
|
18
|
+
if (!e) return !1;
|
|
19
|
+
if (n === "single") return V(t, e);
|
|
20
|
+
const r = e;
|
|
21
|
+
return V(t, r.from) || (r.to ? V(t, r.to) : !1);
|
|
22
|
+
}
|
|
23
|
+
function oe(t, n, e) {
|
|
24
|
+
return n !== "range" || !e ? !1 : V(t, e.from);
|
|
25
|
+
}
|
|
26
|
+
function ae(t, n, e) {
|
|
27
|
+
if (n !== "range" || !e) return !1;
|
|
28
|
+
const r = e;
|
|
29
|
+
return r.to ? V(t, r.to) : !1;
|
|
30
|
+
}
|
|
31
|
+
function re(t, n, e) {
|
|
32
|
+
if (n !== "range" || !e) return !1;
|
|
33
|
+
const r = e;
|
|
34
|
+
return r.to ? t > r.from && t < r.to : !1;
|
|
35
|
+
}
|
|
36
|
+
function le(t, n, e, r, s, g, c, b) {
|
|
37
|
+
const i = [];
|
|
38
|
+
for (let l = 0; l < n; l++) {
|
|
39
|
+
const v = F(t, l), M = J(v), D = T(M, { weekStartsOn: e });
|
|
40
|
+
let u;
|
|
41
|
+
if (r)
|
|
42
|
+
u = I({ start: D, end: W(D, 41) });
|
|
43
|
+
else {
|
|
44
|
+
const d = K(v), O = Q(d, { weekStartsOn: e });
|
|
45
|
+
u = I({ start: D, end: O });
|
|
46
|
+
}
|
|
47
|
+
const m = u.map((d) => ({
|
|
48
|
+
date: d,
|
|
49
|
+
isCurrentMonth: Y(d, v),
|
|
50
|
+
isToday: X(d),
|
|
51
|
+
isSelected: ne(d, s, g),
|
|
52
|
+
isRangeStart: oe(d, s, g),
|
|
53
|
+
isRangeEnd: ae(d, s, g),
|
|
54
|
+
isInRange: re(d, s, g),
|
|
55
|
+
isDisabled: c ? c(d) : !1
|
|
56
|
+
}));
|
|
57
|
+
i.push({
|
|
58
|
+
month: v,
|
|
59
|
+
label: x(v, "MMMM yyyy", { locale: b }),
|
|
60
|
+
days: m
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return i;
|
|
64
|
+
}
|
|
65
|
+
const se = { class: "relative flex items-center justify-center pt-1 pb-4" }, ie = {
|
|
66
|
+
"aria-live": "polite",
|
|
67
|
+
class: "text-sm font-medium capitalize"
|
|
68
|
+
}, ue = {
|
|
69
|
+
class: "grid grid-cols-7",
|
|
70
|
+
role: "row"
|
|
71
|
+
}, de = {
|
|
72
|
+
class: "grid grid-cols-7",
|
|
73
|
+
role: "grid"
|
|
74
|
+
}, ce = {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "h-9 w-9",
|
|
77
|
+
role: "gridcell"
|
|
78
|
+
}, fe = ["disabled", "aria-selected", "aria-current", "aria-label", "data-today", "data-outside", "onClick"], q = /* @__PURE__ */ j({
|
|
79
|
+
name: "UiCalendar",
|
|
80
|
+
inheritAttrs: !1,
|
|
81
|
+
__name: "UiCalendar",
|
|
82
|
+
props: {
|
|
83
|
+
mode: { default: "single" },
|
|
84
|
+
modelValue: { default: void 0 },
|
|
85
|
+
defaultMonth: { default: () => /* @__PURE__ */ new Date() },
|
|
86
|
+
numberOfMonths: { default: 1 },
|
|
87
|
+
weekStartsOn: { default: 1 },
|
|
88
|
+
showOutsideDays: { type: Boolean, default: !0 },
|
|
89
|
+
fixedWeeks: { type: Boolean, default: !0 },
|
|
90
|
+
disabled: { type: Function, default: void 0 },
|
|
91
|
+
locale: { default: void 0 }
|
|
92
|
+
},
|
|
93
|
+
emits: ["update:modelValue"],
|
|
94
|
+
setup(t, { emit: n }) {
|
|
95
|
+
const e = t, r = n, s = E(), g = w(() => {
|
|
96
|
+
const { class: u, ...m } = s;
|
|
97
|
+
return m;
|
|
98
|
+
}), c = A(
|
|
99
|
+
new Date(ee(e.mode, e.modelValue, e.defaultMonth))
|
|
100
|
+
);
|
|
101
|
+
H(
|
|
102
|
+
() => e.defaultMonth,
|
|
103
|
+
(u) => {
|
|
104
|
+
u && (c.value = new Date(u));
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
function b() {
|
|
108
|
+
c.value = Z(c.value, 1);
|
|
109
|
+
}
|
|
110
|
+
function i() {
|
|
111
|
+
c.value = F(c.value, 1);
|
|
112
|
+
}
|
|
113
|
+
const l = w(() => te(e.weekStartsOn, e.locale)), v = w(
|
|
114
|
+
() => le(
|
|
115
|
+
c.value,
|
|
116
|
+
e.numberOfMonths,
|
|
117
|
+
e.weekStartsOn,
|
|
118
|
+
e.fixedWeeks,
|
|
119
|
+
e.mode,
|
|
120
|
+
e.modelValue,
|
|
121
|
+
e.disabled,
|
|
122
|
+
e.locale
|
|
123
|
+
)
|
|
124
|
+
), M = A(!1);
|
|
125
|
+
function D(u) {
|
|
126
|
+
if (!e.disabled?.(u))
|
|
127
|
+
if (e.mode === "single")
|
|
128
|
+
r("update:modelValue", u);
|
|
129
|
+
else if (!M.value || !e.modelValue)
|
|
130
|
+
r("update:modelValue", { from: u }), M.value = !0;
|
|
131
|
+
else {
|
|
132
|
+
const m = e.modelValue;
|
|
133
|
+
u < m.from ? r("update:modelValue", { from: u, to: m.from }) : r("update:modelValue", { from: m.from, to: u }), M.value = !1;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return (u, m) => (f(), h("div", B(g.value, {
|
|
137
|
+
class: p(C)("p-3", p(s).class)
|
|
138
|
+
}), [
|
|
139
|
+
a("div", {
|
|
140
|
+
class: U(p(C)("flex", t.numberOfMonths > 1 && "gap-4"))
|
|
141
|
+
}, [
|
|
142
|
+
(f(!0), h(P, null, R(v.value, (d, O) => (f(), h("div", {
|
|
143
|
+
key: d.label,
|
|
144
|
+
class: "w-full"
|
|
145
|
+
}, [
|
|
146
|
+
a("div", se, [
|
|
147
|
+
O === 0 ? (f(), h("button", {
|
|
148
|
+
key: 0,
|
|
149
|
+
type: "button",
|
|
150
|
+
"aria-label": "Mes anterior",
|
|
151
|
+
class: "text-muted-foreground hover:bg-accent hover:text-accent-foreground absolute left-0 inline-flex h-7 w-7 items-center justify-center rounded-md bg-transparent text-sm font-medium transition-colors",
|
|
152
|
+
onClick: b
|
|
153
|
+
}, [...m[0] || (m[0] = [
|
|
154
|
+
a("svg", {
|
|
155
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
156
|
+
width: "16",
|
|
157
|
+
height: "16",
|
|
158
|
+
viewBox: "0 0 24 24",
|
|
159
|
+
fill: "none",
|
|
160
|
+
stroke: "currentColor",
|
|
161
|
+
"stroke-width": "2",
|
|
162
|
+
"stroke-linecap": "round",
|
|
163
|
+
"stroke-linejoin": "round",
|
|
164
|
+
"aria-hidden": "true",
|
|
165
|
+
class: "h-4 w-4"
|
|
166
|
+
}, [
|
|
167
|
+
a("path", { d: "m15 18-6-6 6-6" })
|
|
168
|
+
], -1)
|
|
169
|
+
])])) : $("", !0),
|
|
170
|
+
a("span", ie, S(d.label), 1),
|
|
171
|
+
O === v.value.length - 1 ? (f(), h("button", {
|
|
172
|
+
key: 1,
|
|
173
|
+
type: "button",
|
|
174
|
+
"aria-label": "Mes siguiente",
|
|
175
|
+
class: "text-muted-foreground hover:bg-accent hover:text-accent-foreground absolute right-0 inline-flex h-7 w-7 items-center justify-center rounded-md bg-transparent text-sm font-medium transition-colors",
|
|
176
|
+
onClick: i
|
|
177
|
+
}, [...m[1] || (m[1] = [
|
|
178
|
+
a("svg", {
|
|
179
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
180
|
+
width: "16",
|
|
181
|
+
height: "16",
|
|
182
|
+
viewBox: "0 0 24 24",
|
|
183
|
+
fill: "none",
|
|
184
|
+
stroke: "currentColor",
|
|
185
|
+
"stroke-width": "2",
|
|
186
|
+
"stroke-linecap": "round",
|
|
187
|
+
"stroke-linejoin": "round",
|
|
188
|
+
"aria-hidden": "true",
|
|
189
|
+
class: "h-4 w-4"
|
|
190
|
+
}, [
|
|
191
|
+
a("path", { d: "m9 18 6-6-6-6" })
|
|
192
|
+
], -1)
|
|
193
|
+
])])) : $("", !0)
|
|
194
|
+
]),
|
|
195
|
+
a("div", ue, [
|
|
196
|
+
(f(!0), h(P, null, R(l.value, (o) => (f(), h("div", {
|
|
197
|
+
key: o,
|
|
198
|
+
role: "columnheader",
|
|
199
|
+
class: "text-muted-foreground flex h-9 w-9 items-center justify-center text-[0.8rem] font-normal"
|
|
200
|
+
}, S(o), 1))), 128))
|
|
201
|
+
]),
|
|
202
|
+
a("div", de, [
|
|
203
|
+
(f(!0), h(P, null, R(d.days, (o, G) => (f(), h(P, { key: G }, [
|
|
204
|
+
!o.isCurrentMonth && !t.showOutsideDays ? (f(), h("div", ce)) : (f(), h("button", {
|
|
205
|
+
key: 1,
|
|
206
|
+
type: "button",
|
|
207
|
+
role: "gridcell",
|
|
208
|
+
disabled: o.isDisabled,
|
|
209
|
+
"aria-selected": o.isSelected || void 0,
|
|
210
|
+
"aria-current": o.isToday ? "date" : void 0,
|
|
211
|
+
"aria-label": p(x)(o.date, "PPPP", { locale: t.locale }),
|
|
212
|
+
"data-today": o.isToday || void 0,
|
|
213
|
+
"data-outside": !o.isCurrentMonth || void 0,
|
|
214
|
+
class: U(
|
|
215
|
+
p(C)(
|
|
216
|
+
"inline-flex h-9 w-9 items-center justify-center rounded-md p-0 text-sm font-normal",
|
|
217
|
+
"transition-colors duration-100",
|
|
218
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
219
|
+
"focus-visible:outline-2 focus-visible:outline-ring",
|
|
220
|
+
o.isToday && !o.isSelected && "bg-accent text-accent-foreground font-medium",
|
|
221
|
+
o.isSelected && !o.isInRange && "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground font-medium",
|
|
222
|
+
o.isInRange && "bg-accent/50 rounded-none",
|
|
223
|
+
o.isRangeStart && o.isSelected && "rounded-r-none",
|
|
224
|
+
o.isRangeEnd && o.isSelected && "rounded-l-none",
|
|
225
|
+
!o.isCurrentMonth && "text-muted-foreground/50",
|
|
226
|
+
o.isDisabled && "pointer-events-none opacity-50"
|
|
227
|
+
)
|
|
228
|
+
),
|
|
229
|
+
onClick: (me) => D(o.date)
|
|
230
|
+
}, S(o.date.getDate()), 11, fe))
|
|
231
|
+
], 64))), 128))
|
|
232
|
+
])
|
|
233
|
+
]))), 128))
|
|
234
|
+
], 2)
|
|
235
|
+
], 16));
|
|
236
|
+
}
|
|
237
|
+
}), be = /* @__PURE__ */ j({
|
|
238
|
+
name: "UiDatePicker",
|
|
239
|
+
inheritAttrs: !1,
|
|
240
|
+
__name: "UiDatePicker",
|
|
241
|
+
props: {
|
|
242
|
+
modelValue: { default: void 0 },
|
|
243
|
+
placeholder: { default: "Pick a date" },
|
|
244
|
+
formatStr: { default: "PPP" },
|
|
245
|
+
locale: { default: void 0 },
|
|
246
|
+
disabled: { type: Function, default: void 0 },
|
|
247
|
+
weekStartsOn: { default: 1 }
|
|
248
|
+
},
|
|
249
|
+
emits: ["update:modelValue"],
|
|
250
|
+
setup(t, { emit: n }) {
|
|
251
|
+
const e = t, r = n, s = E(), g = w(() => {
|
|
252
|
+
const { class: i, ...l } = s;
|
|
253
|
+
return l;
|
|
254
|
+
}), c = w(() => e.modelValue ? x(e.modelValue, e.formatStr, { locale: e.locale }) : null);
|
|
255
|
+
function b(i) {
|
|
256
|
+
r("update:modelValue", i);
|
|
257
|
+
}
|
|
258
|
+
return (i, l) => (f(), _(N, null, {
|
|
259
|
+
default: y(() => [
|
|
260
|
+
k(z, null, {
|
|
261
|
+
default: y(() => [
|
|
262
|
+
a("button", B(g.value, {
|
|
263
|
+
type: "button",
|
|
264
|
+
class: p(C)(
|
|
265
|
+
"inline-flex h-10 w-full min-w-[240px] items-center justify-start gap-2 rounded-md border-ui border-input bg-foreground/5 px-3 py-2 text-left text-sm ring-offset-background transition-colors",
|
|
266
|
+
"hover:bg-accent/50",
|
|
267
|
+
"focus-visible:outline-2 focus-visible:outline-ring",
|
|
268
|
+
!t.modelValue && "text-muted-foreground",
|
|
269
|
+
p(s).class
|
|
270
|
+
)
|
|
271
|
+
}), [
|
|
272
|
+
l[0] || (l[0] = a("svg", {
|
|
273
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
274
|
+
width: "16",
|
|
275
|
+
height: "16",
|
|
276
|
+
viewBox: "0 0 24 24",
|
|
277
|
+
fill: "none",
|
|
278
|
+
stroke: "currentColor",
|
|
279
|
+
"stroke-width": "2",
|
|
280
|
+
"stroke-linecap": "round",
|
|
281
|
+
"stroke-linejoin": "round",
|
|
282
|
+
class: "h-4 w-4 shrink-0 opacity-50"
|
|
283
|
+
}, [
|
|
284
|
+
a("path", { d: "M8 2v4" }),
|
|
285
|
+
a("path", { d: "M16 2v4" }),
|
|
286
|
+
a("rect", {
|
|
287
|
+
width: "18",
|
|
288
|
+
height: "18",
|
|
289
|
+
x: "3",
|
|
290
|
+
y: "4",
|
|
291
|
+
rx: "2"
|
|
292
|
+
}),
|
|
293
|
+
a("path", { d: "M3 10h18" })
|
|
294
|
+
], -1)),
|
|
295
|
+
a("span", null, S(c.value ?? t.placeholder), 1)
|
|
296
|
+
], 16)
|
|
297
|
+
]),
|
|
298
|
+
_: 1
|
|
299
|
+
}),
|
|
300
|
+
k(L, {
|
|
301
|
+
align: "start",
|
|
302
|
+
class: "w-auto p-0"
|
|
303
|
+
}, {
|
|
304
|
+
default: y(() => [
|
|
305
|
+
k(q, {
|
|
306
|
+
mode: "single",
|
|
307
|
+
"model-value": t.modelValue,
|
|
308
|
+
disabled: t.disabled,
|
|
309
|
+
locale: t.locale,
|
|
310
|
+
"week-starts-on": t.weekStartsOn,
|
|
311
|
+
"onUpdate:modelValue": b
|
|
312
|
+
}, null, 8, ["model-value", "disabled", "locale", "week-starts-on"])
|
|
313
|
+
]),
|
|
314
|
+
_: 1
|
|
315
|
+
})
|
|
316
|
+
]),
|
|
317
|
+
_: 1
|
|
318
|
+
}));
|
|
319
|
+
}
|
|
320
|
+
}), we = /* @__PURE__ */ j({
|
|
321
|
+
name: "UiDateRangePicker",
|
|
322
|
+
inheritAttrs: !1,
|
|
323
|
+
__name: "UiDateRangePicker",
|
|
324
|
+
props: {
|
|
325
|
+
modelValue: { default: void 0 },
|
|
326
|
+
placeholder: { default: "Pick a date range" },
|
|
327
|
+
formatStr: { default: "PP" },
|
|
328
|
+
locale: { default: void 0 },
|
|
329
|
+
disabled: { type: Function, default: void 0 },
|
|
330
|
+
weekStartsOn: { default: 1 },
|
|
331
|
+
numberOfMonths: { default: 2 }
|
|
332
|
+
},
|
|
333
|
+
emits: ["update:modelValue"],
|
|
334
|
+
setup(t, { emit: n }) {
|
|
335
|
+
const e = t, r = n, s = E(), g = w(() => {
|
|
336
|
+
const { class: i, ...l } = s;
|
|
337
|
+
return l;
|
|
338
|
+
}), c = w(() => {
|
|
339
|
+
if (!e.modelValue) return null;
|
|
340
|
+
const i = { locale: e.locale }, l = x(e.modelValue.from, e.formatStr, i);
|
|
341
|
+
if (!e.modelValue.to) return l;
|
|
342
|
+
const v = x(e.modelValue.to, e.formatStr, i);
|
|
343
|
+
return `${l} – ${v}`;
|
|
344
|
+
});
|
|
345
|
+
function b(i) {
|
|
346
|
+
r("update:modelValue", i);
|
|
347
|
+
}
|
|
348
|
+
return (i, l) => (f(), _(N, null, {
|
|
349
|
+
default: y(() => [
|
|
350
|
+
k(z, null, {
|
|
351
|
+
default: y(() => [
|
|
352
|
+
a("button", B(g.value, {
|
|
353
|
+
type: "button",
|
|
354
|
+
class: p(C)(
|
|
355
|
+
"inline-flex h-10 w-full min-w-[300px] items-center justify-start gap-2 rounded-md border-ui border-input bg-foreground/5 px-3 py-2 text-left text-sm ring-offset-background transition-colors",
|
|
356
|
+
"hover:bg-accent/50",
|
|
357
|
+
"focus-visible:outline-2 focus-visible:outline-ring",
|
|
358
|
+
!t.modelValue && "text-muted-foreground",
|
|
359
|
+
p(s).class
|
|
360
|
+
)
|
|
361
|
+
}), [
|
|
362
|
+
l[0] || (l[0] = a("svg", {
|
|
363
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
364
|
+
width: "16",
|
|
365
|
+
height: "16",
|
|
366
|
+
viewBox: "0 0 24 24",
|
|
367
|
+
fill: "none",
|
|
368
|
+
stroke: "currentColor",
|
|
369
|
+
"stroke-width": "2",
|
|
370
|
+
"stroke-linecap": "round",
|
|
371
|
+
"stroke-linejoin": "round",
|
|
372
|
+
class: "h-4 w-4 shrink-0 opacity-50"
|
|
373
|
+
}, [
|
|
374
|
+
a("path", { d: "M8 2v4" }),
|
|
375
|
+
a("path", { d: "M16 2v4" }),
|
|
376
|
+
a("rect", {
|
|
377
|
+
width: "18",
|
|
378
|
+
height: "18",
|
|
379
|
+
x: "3",
|
|
380
|
+
y: "4",
|
|
381
|
+
rx: "2"
|
|
382
|
+
}),
|
|
383
|
+
a("path", { d: "M3 10h18" })
|
|
384
|
+
], -1)),
|
|
385
|
+
a("span", null, S(c.value ?? t.placeholder), 1)
|
|
386
|
+
], 16)
|
|
387
|
+
]),
|
|
388
|
+
_: 1
|
|
389
|
+
}),
|
|
390
|
+
k(L, {
|
|
391
|
+
align: "start",
|
|
392
|
+
class: "w-auto p-0"
|
|
393
|
+
}, {
|
|
394
|
+
default: y(() => [
|
|
395
|
+
k(q, {
|
|
396
|
+
mode: "range",
|
|
397
|
+
"model-value": t.modelValue,
|
|
398
|
+
"number-of-months": t.numberOfMonths,
|
|
399
|
+
disabled: t.disabled,
|
|
400
|
+
locale: t.locale,
|
|
401
|
+
"week-starts-on": t.weekStartsOn,
|
|
402
|
+
"onUpdate:modelValue": b
|
|
403
|
+
}, null, 8, ["model-value", "number-of-months", "disabled", "locale", "week-starts-on"])
|
|
404
|
+
]),
|
|
405
|
+
_: 1
|
|
406
|
+
})
|
|
407
|
+
]),
|
|
408
|
+
_: 1
|
|
409
|
+
}));
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
export {
|
|
413
|
+
q as Calendar,
|
|
414
|
+
be as DatePicker,
|
|
415
|
+
we as DateRangePicker
|
|
416
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
import { EmblaCarouselType } from 'embla-carousel';
|
|
5
|
+
import { EmblaOptionsType } from 'embla-carousel';
|
|
6
|
+
import { EmblaPluginType } from 'embla-carousel';
|
|
7
|
+
import { PublicProps } from 'vue';
|
|
8
|
+
import { Ref } from 'vue';
|
|
9
|
+
|
|
10
|
+
declare const __VLS_component: DefineComponent<UiCarouselProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
|
+
"set-api": (api: EmblaCarouselType) => any;
|
|
12
|
+
}, string, PublicProps, Readonly<UiCarouselProps> & Readonly<{
|
|
13
|
+
"onSet-api"?: ((api: EmblaCarouselType) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
orientation: CarouselOrientation;
|
|
16
|
+
opts: Partial<EmblaOptionsType>;
|
|
17
|
+
plugins: EmblaPluginType[];
|
|
18
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
|
|
20
|
+
declare const __VLS_component_2: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
|
|
22
|
+
declare const __VLS_component_3: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
|
|
24
|
+
declare function __VLS_template(): {
|
|
25
|
+
attrs: Partial<{}>;
|
|
26
|
+
slots: {
|
|
27
|
+
default?(_: {}): any;
|
|
28
|
+
};
|
|
29
|
+
refs: {};
|
|
30
|
+
rootEl: any;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare function __VLS_template_2(): {
|
|
34
|
+
attrs: Partial<{}>;
|
|
35
|
+
slots: {
|
|
36
|
+
default?(_: {}): any;
|
|
37
|
+
};
|
|
38
|
+
refs: {};
|
|
39
|
+
rootEl: any;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare function __VLS_template_3(): {
|
|
43
|
+
attrs: Partial<{}>;
|
|
44
|
+
slots: {
|
|
45
|
+
default?(_: {}): any;
|
|
46
|
+
};
|
|
47
|
+
refs: {};
|
|
48
|
+
rootEl: any;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
52
|
+
|
|
53
|
+
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
54
|
+
|
|
55
|
+
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
56
|
+
|
|
57
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
64
|
+
new (): {
|
|
65
|
+
$slots: S;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export declare const Carousel: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
76
|
+
|
|
77
|
+
export declare const CarouselContent: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
78
|
+
|
|
79
|
+
export declare interface CarouselContext {
|
|
80
|
+
orientation: Ref<CarouselOrientation>;
|
|
81
|
+
viewportRef: Ref<HTMLElement | undefined>;
|
|
82
|
+
api: Ref<EmblaCarouselType | undefined>;
|
|
83
|
+
canScrollPrev: Ref<boolean>;
|
|
84
|
+
canScrollNext: Ref<boolean>;
|
|
85
|
+
scrollPrev: () => void;
|
|
86
|
+
scrollNext: () => void;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export declare const CarouselItem: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
90
|
+
|
|
91
|
+
export declare const CarouselNext: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
92
|
+
|
|
93
|
+
export declare type CarouselOrientation = 'horizontal' | 'vertical';
|
|
94
|
+
|
|
95
|
+
export declare const CarouselPrevious: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
96
|
+
|
|
97
|
+
declare interface UiCarouselProps {
|
|
98
|
+
opts?: Partial<EmblaOptionsType>;
|
|
99
|
+
orientation?: CarouselOrientation;
|
|
100
|
+
plugins?: EmblaPluginType[];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { }
|