@codeandfunction/callaloo 4.9.1 → 4.9.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/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "ui components",
18
18
  "vuejs"
19
19
  ],
20
- "version": "4.9.1",
20
+ "version": "4.9.3",
21
21
  "license": "MIT",
22
22
  "type": "module",
23
23
  "unpkg": "dist/callaloo.global.js",
@@ -1,159 +0,0 @@
1
- import { defineComponent as Y, mergeModels as S, useModel as Z, ref as w, toRef as ee, watch as ae, onMounted as te, createElementBlock as s, openBlock as i, normalizeClass as c, createElementVNode as M, createVNode as f, unref as e, withCtx as v, createTextVNode as h, toDisplayString as C, Fragment as $, renderList as B, createBlock as le, createCommentVNode as re } from "vue";
2
- import { _ as b } from "./CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
3
- import { _ as N } from "./CLText.vue_vue_type_style_index_0_lang-B-L8ECJL.js";
4
- import { CLColorVariants as u, CLSizes as _, CLIconSizes as V, CLIconNames as P, CLBorderRadius as k, CLTextTypes as R, CLColors as g, CLAlign as ie } from "../index.js";
5
- import { useDatePicker as oe } from "../composables/useDatePicker.js";
6
- import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
- const de = ["data-testid"], se = /* @__PURE__ */ Y({
8
- name: "CLCalendar",
9
- __name: "CLCalendar",
10
- props: /* @__PURE__ */ S({
11
- color: { default: g.Primary },
12
- disabled: { type: Boolean, default: !1 },
13
- busy: { type: Boolean, default: !1 },
14
- isRange: { type: Boolean, default: !0 },
15
- fluid: { type: Boolean, default: !1 },
16
- testId: { default: "clll-calendar" }
17
- }, {
18
- modelValue: {},
19
- modelModifiers: {}
20
- }),
21
- emits: /* @__PURE__ */ S(["date-select"], ["update:modelValue"]),
22
- setup(t, { expose: T, emit: I }) {
23
- const m = t, E = I, l = "clll-calendar", o = Z(t, "modelValue"), n = w(o.value?.end ?? null), d = w(o.value?.start ?? null), {
24
- calendarGrid: F,
25
- cancelDraft: G,
26
- clearDraft: A,
27
- currentMonthLabel: O,
28
- draftEnd: D,
29
- draftStart: L,
30
- getDayAriaLabel: j,
31
- handleNextMonth: q,
32
- handlePrevMonth: H,
33
- initializeDraft: p,
34
- isDraftEnd: x,
35
- isDraftStart: z,
36
- isInDraftRange: J,
37
- onDayClick: K,
38
- weekDays: Q
39
- } = oe({
40
- appliedEnd: n,
41
- appliedStart: d,
42
- isRange: ee(m, "isRange")
43
- });
44
- ae(o, (r) => {
45
- d.value = r?.start ?? null, n.value = r?.end ?? null, p();
46
- }, { deep: !0 }), te(() => {
47
- p();
48
- });
49
- const U = (r, y) => {
50
- y?.preventDefault(), y?.stopPropagation(), !(m.disabled || m.busy || !r) && (K(r), E("date-select", r));
51
- };
52
- return T({
53
- apply: () => {
54
- d.value = L.value, n.value = D.value, o.value = {
55
- end: n.value,
56
- start: d.value
57
- };
58
- },
59
- cancel: () => {
60
- G();
61
- },
62
- draftEnd: D,
63
- draftStart: L,
64
- initializeDraft: p,
65
- reset: () => {
66
- A(), d.value = null, n.value = null, o.value = null;
67
- }
68
- }), (r, y) => (i(), s("div", {
69
- class: c([l, t.fluid ? `${l}__fluid` : ""]),
70
- "data-testid": t.testId
71
- }, [
72
- M("div", {
73
- class: c(`${l}__header`)
74
- }, [
75
- f(e(b), {
76
- "aria-label": "Previous month",
77
- "border-radius": e(k).Full,
78
- "icon-before": e(P).ChevronLeft,
79
- "icon-size": e(V).Tiny,
80
- "on-click": e(H),
81
- size: e(_).Tiny,
82
- variant: e(u).Ghost,
83
- height: "32px",
84
- width: "32px",
85
- wrap: ""
86
- }, null, 8, ["border-radius", "icon-before", "icon-size", "on-click", "size", "variant"]),
87
- f(e(N), {
88
- type: e(R).Medium,
89
- medium: ""
90
- }, {
91
- default: v(() => [
92
- h(C(e(O)), 1)
93
- ]),
94
- _: 1
95
- }, 8, ["type"]),
96
- f(e(b), {
97
- "aria-label": "Next month",
98
- "border-radius": e(k).Full,
99
- "icon-before": e(P).ChevronRight,
100
- "icon-size": e(V).Tiny,
101
- "on-click": e(q),
102
- size: e(_).Tiny,
103
- variant: e(u).Ghost,
104
- height: "32px",
105
- width: "32px",
106
- wrap: ""
107
- }, null, 8, ["border-radius", "icon-before", "icon-size", "on-click", "size", "variant"])
108
- ], 2),
109
- M("div", {
110
- class: c(`${l}__grid`)
111
- }, [
112
- (i(!0), s($, null, B(e(Q), (a) => (i(), s("div", {
113
- key: a,
114
- class: c(`${l}__weekday`)
115
- }, [
116
- f(e(N), {
117
- align: e(ie).Center,
118
- color: e(g).Neutral,
119
- type: e(R).Small
120
- }, {
121
- default: v(() => [
122
- h(C(a), 1)
123
- ]),
124
- _: 2
125
- }, 1032, ["align", "color", "type"])
126
- ], 2))), 128)),
127
- (i(!0), s($, null, B(e(F), (a, W) => (i(), s("div", {
128
- key: a.date ?? `pad-${W}`,
129
- class: c([
130
- `${l}__cell`,
131
- a.isOutsideMonth ? `${l}__cell--outside` : ""
132
- ])
133
- }, [
134
- a.day && a.date ? (i(), le(e(b), {
135
- key: 0,
136
- "aria-label": e(j)(a.date),
137
- "border-radius": e(k).Full,
138
- color: e(z)(a.date) || e(x)(a.date) ? t.color : e(g).Secondary,
139
- disabled: t.disabled || t.busy,
140
- size: e(_).Small,
141
- height: "100%",
142
- width: "100%",
143
- "on-click": (X) => U(a.date, X),
144
- variant: e(z)(a.date) || e(x)(a.date) ? e(u).Solid : e(J)(a.date) ? e(u).Soft : e(u).Ghost,
145
- wrap: ""
146
- }, {
147
- default: v(() => [
148
- h(C(a.day), 1)
149
- ]),
150
- _: 2
151
- }, 1032, ["aria-label", "border-radius", "color", "disabled", "size", "on-click", "variant"])) : re("", !0)
152
- ], 2))), 128))
153
- ], 2)
154
- ], 10, de));
155
- }
156
- }), be = /* @__PURE__ */ ne(se, [["__scopeId", "data-v-d4bca6fb"]]);
157
- export {
158
- be as C
159
- };
@@ -1,9 +0,0 @@
1
- const s = (t, r) => {
2
- const o = t.__vccOpts || t;
3
- for (const [c, e] of r)
4
- o[c] = e;
5
- return o;
6
- };
7
- export {
8
- s as _
9
- };
@@ -1 +0,0 @@
1
- export {};