@codeandfunction/callaloo 4.9.1 → 4.9.2
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/callaloo.global.js +1 -1
- package/dist/chunks/{CLCalendar-XcUGsiWk.js → CLCalendar-BGwHfZr9.js} +57 -53
- package/dist/components/Form/CLCalendar/CLCalendar.css +1 -1
- package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
- package/dist/components/Form/CLCalendar/CLCalendar.vue.d.ts +3 -0
- package/dist/components/Form/CLInput/CLInput.js +1 -0
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.vue.d.ts +2 -0
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.vue.d.ts +2 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/test-setup.d.ts +0 -1
- /package/dist/components/Form/{CLInputDatePicker → CLInput}/CLInput.css +0 -0
|
@@ -1,57 +1,61 @@
|
|
|
1
|
-
import { defineComponent as Y, mergeModels as
|
|
1
|
+
import { defineComponent as Y, mergeModels as w, useCssVars as Z, useModel as ee, ref as S, toRef as ae, watch as te, onMounted as le, createElementBlock as s, openBlock as i, normalizeClass as u, createElementVNode as M, createVNode as f, unref as e, withCtx as y, createTextVNode as h, toDisplayString as C, Fragment as V, renderList as $, createBlock as re, createCommentVNode as ie } from "vue";
|
|
2
2
|
import { _ as b } from "./CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
|
|
3
|
-
import { _ as
|
|
4
|
-
import { CLColorVariants as
|
|
5
|
-
import { useDatePicker as
|
|
6
|
-
import { _ as
|
|
7
|
-
const
|
|
3
|
+
import { _ as B } from "./CLText.vue_vue_type_style_index_0_lang-B-L8ECJL.js";
|
|
4
|
+
import { CLColorVariants as c, CLSizes as _, CLIconSizes as N, CLIconNames as P, CLBorderRadius as k, CLTextTypes as R, CLColors as g, CLAlign as oe } from "../index.js";
|
|
5
|
+
import { useDatePicker as ne } from "../composables/useDatePicker.js";
|
|
6
|
+
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const se = ["data-testid"], ue = /* @__PURE__ */ Y({
|
|
8
8
|
name: "CLCalendar",
|
|
9
9
|
__name: "CLCalendar",
|
|
10
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ w({
|
|
11
11
|
color: { default: g.Primary },
|
|
12
12
|
disabled: { type: Boolean, default: !1 },
|
|
13
13
|
busy: { type: Boolean, default: !1 },
|
|
14
14
|
isRange: { type: Boolean, default: !0 },
|
|
15
15
|
fluid: { type: Boolean, default: !1 },
|
|
16
|
-
testId: { default: "clll-calendar" }
|
|
16
|
+
testId: { default: "clll-calendar" },
|
|
17
|
+
width: { default: "280px" }
|
|
17
18
|
}, {
|
|
18
19
|
modelValue: {},
|
|
19
20
|
modelModifiers: {}
|
|
20
21
|
}),
|
|
21
|
-
emits: /* @__PURE__ */
|
|
22
|
-
setup(
|
|
23
|
-
|
|
22
|
+
emits: /* @__PURE__ */ w(["date-select"], ["update:modelValue"]),
|
|
23
|
+
setup(l, { expose: T, emit: I }) {
|
|
24
|
+
Z((t) => ({
|
|
25
|
+
v0c243535: t.width
|
|
26
|
+
}));
|
|
27
|
+
const m = l, E = I, r = "clll-calendar", o = ee(l, "modelValue"), n = S(o.value?.end ?? null), d = S(o.value?.start ?? null), {
|
|
24
28
|
calendarGrid: F,
|
|
25
29
|
cancelDraft: G,
|
|
26
30
|
clearDraft: A,
|
|
27
31
|
currentMonthLabel: O,
|
|
28
|
-
draftEnd:
|
|
29
|
-
draftStart:
|
|
32
|
+
draftEnd: x,
|
|
33
|
+
draftStart: D,
|
|
30
34
|
getDayAriaLabel: j,
|
|
31
35
|
handleNextMonth: q,
|
|
32
36
|
handlePrevMonth: H,
|
|
33
37
|
initializeDraft: p,
|
|
34
|
-
isDraftEnd:
|
|
38
|
+
isDraftEnd: L,
|
|
35
39
|
isDraftStart: z,
|
|
36
40
|
isInDraftRange: J,
|
|
37
41
|
onDayClick: K,
|
|
38
42
|
weekDays: Q
|
|
39
|
-
} =
|
|
43
|
+
} = ne({
|
|
40
44
|
appliedEnd: n,
|
|
41
45
|
appliedStart: d,
|
|
42
|
-
isRange:
|
|
46
|
+
isRange: ae(m, "isRange")
|
|
43
47
|
});
|
|
44
|
-
|
|
45
|
-
d.value =
|
|
46
|
-
}, { deep: !0 }),
|
|
48
|
+
te(o, (t) => {
|
|
49
|
+
d.value = t?.start ?? null, n.value = t?.end ?? null, p();
|
|
50
|
+
}, { deep: !0 }), le(() => {
|
|
47
51
|
p();
|
|
48
52
|
});
|
|
49
|
-
const U = (
|
|
50
|
-
|
|
53
|
+
const U = (t, v) => {
|
|
54
|
+
v?.preventDefault(), v?.stopPropagation(), !(m.disabled || m.busy || !t) && (K(t), E("date-select", t));
|
|
51
55
|
};
|
|
52
56
|
return T({
|
|
53
57
|
apply: () => {
|
|
54
|
-
d.value =
|
|
58
|
+
d.value = D.value, n.value = x.value, o.value = {
|
|
55
59
|
end: n.value,
|
|
56
60
|
start: d.value
|
|
57
61
|
};
|
|
@@ -59,36 +63,36 @@ const de = ["data-testid"], se = /* @__PURE__ */ Y({
|
|
|
59
63
|
cancel: () => {
|
|
60
64
|
G();
|
|
61
65
|
},
|
|
62
|
-
draftEnd:
|
|
63
|
-
draftStart:
|
|
66
|
+
draftEnd: x,
|
|
67
|
+
draftStart: D,
|
|
64
68
|
initializeDraft: p,
|
|
65
69
|
reset: () => {
|
|
66
70
|
A(), d.value = null, n.value = null, o.value = null;
|
|
67
71
|
}
|
|
68
|
-
}), (
|
|
69
|
-
class:
|
|
70
|
-
"data-testid":
|
|
72
|
+
}), (t, v) => (i(), s("div", {
|
|
73
|
+
class: u([r, l.fluid ? `${r}__fluid` : ""]),
|
|
74
|
+
"data-testid": l.testId
|
|
71
75
|
}, [
|
|
72
76
|
M("div", {
|
|
73
|
-
class:
|
|
77
|
+
class: u(`${r}__header`)
|
|
74
78
|
}, [
|
|
75
79
|
f(e(b), {
|
|
76
80
|
"aria-label": "Previous month",
|
|
77
81
|
"border-radius": e(k).Full,
|
|
78
82
|
"icon-before": e(P).ChevronLeft,
|
|
79
|
-
"icon-size": e(
|
|
83
|
+
"icon-size": e(N).Tiny,
|
|
80
84
|
"on-click": e(H),
|
|
81
85
|
size: e(_).Tiny,
|
|
82
|
-
variant: e(
|
|
86
|
+
variant: e(c).Ghost,
|
|
83
87
|
height: "32px",
|
|
84
88
|
width: "32px",
|
|
85
89
|
wrap: ""
|
|
86
90
|
}, null, 8, ["border-radius", "icon-before", "icon-size", "on-click", "size", "variant"]),
|
|
87
|
-
f(e(
|
|
91
|
+
f(e(B), {
|
|
88
92
|
type: e(R).Medium,
|
|
89
93
|
medium: ""
|
|
90
94
|
}, {
|
|
91
|
-
default:
|
|
95
|
+
default: y(() => [
|
|
92
96
|
h(C(e(O)), 1)
|
|
93
97
|
]),
|
|
94
98
|
_: 1
|
|
@@ -97,63 +101,63 @@ const de = ["data-testid"], se = /* @__PURE__ */ Y({
|
|
|
97
101
|
"aria-label": "Next month",
|
|
98
102
|
"border-radius": e(k).Full,
|
|
99
103
|
"icon-before": e(P).ChevronRight,
|
|
100
|
-
"icon-size": e(
|
|
104
|
+
"icon-size": e(N).Tiny,
|
|
101
105
|
"on-click": e(q),
|
|
102
106
|
size: e(_).Tiny,
|
|
103
|
-
variant: e(
|
|
107
|
+
variant: e(c).Ghost,
|
|
104
108
|
height: "32px",
|
|
105
109
|
width: "32px",
|
|
106
110
|
wrap: ""
|
|
107
111
|
}, null, 8, ["border-radius", "icon-before", "icon-size", "on-click", "size", "variant"])
|
|
108
112
|
], 2),
|
|
109
113
|
M("div", {
|
|
110
|
-
class:
|
|
114
|
+
class: u(`${r}__grid`)
|
|
111
115
|
}, [
|
|
112
|
-
(i(!0), s(
|
|
116
|
+
(i(!0), s(V, null, $(e(Q), (a) => (i(), s("div", {
|
|
113
117
|
key: a,
|
|
114
|
-
class:
|
|
118
|
+
class: u(`${r}__weekday`)
|
|
115
119
|
}, [
|
|
116
|
-
f(e(
|
|
117
|
-
align: e(
|
|
120
|
+
f(e(B), {
|
|
121
|
+
align: e(oe).Center,
|
|
118
122
|
color: e(g).Neutral,
|
|
119
123
|
type: e(R).Small
|
|
120
124
|
}, {
|
|
121
|
-
default:
|
|
125
|
+
default: y(() => [
|
|
122
126
|
h(C(a), 1)
|
|
123
127
|
]),
|
|
124
128
|
_: 2
|
|
125
129
|
}, 1032, ["align", "color", "type"])
|
|
126
130
|
], 2))), 128)),
|
|
127
|
-
(i(!0), s(
|
|
131
|
+
(i(!0), s(V, null, $(e(F), (a, W) => (i(), s("div", {
|
|
128
132
|
key: a.date ?? `pad-${W}`,
|
|
129
|
-
class:
|
|
130
|
-
`${
|
|
131
|
-
a.isOutsideMonth ? `${
|
|
133
|
+
class: u([
|
|
134
|
+
`${r}__cell`,
|
|
135
|
+
a.isOutsideMonth ? `${r}__cell--outside` : ""
|
|
132
136
|
])
|
|
133
137
|
}, [
|
|
134
|
-
a.day && a.date ? (i(),
|
|
138
|
+
a.day && a.date ? (i(), re(e(b), {
|
|
135
139
|
key: 0,
|
|
136
140
|
"aria-label": e(j)(a.date),
|
|
137
141
|
"border-radius": e(k).Full,
|
|
138
|
-
color: e(z)(a.date) || e(
|
|
139
|
-
disabled:
|
|
142
|
+
color: e(z)(a.date) || e(L)(a.date) ? l.color : e(g).Secondary,
|
|
143
|
+
disabled: l.disabled || l.busy,
|
|
140
144
|
size: e(_).Small,
|
|
141
145
|
height: "100%",
|
|
142
146
|
width: "100%",
|
|
143
147
|
"on-click": (X) => U(a.date, X),
|
|
144
|
-
variant: e(z)(a.date) || e(
|
|
148
|
+
variant: e(z)(a.date) || e(L)(a.date) ? e(c).Solid : e(J)(a.date) ? e(c).Soft : e(c).Ghost,
|
|
145
149
|
wrap: ""
|
|
146
150
|
}, {
|
|
147
|
-
default:
|
|
151
|
+
default: y(() => [
|
|
148
152
|
h(C(a.day), 1)
|
|
149
153
|
]),
|
|
150
154
|
_: 2
|
|
151
|
-
}, 1032, ["aria-label", "border-radius", "color", "disabled", "size", "on-click", "variant"])) :
|
|
155
|
+
}, 1032, ["aria-label", "border-radius", "color", "disabled", "size", "on-click", "variant"])) : ie("", !0)
|
|
152
156
|
], 2))), 128))
|
|
153
157
|
], 2)
|
|
154
|
-
], 10,
|
|
158
|
+
], 10, se));
|
|
155
159
|
}
|
|
156
|
-
}),
|
|
160
|
+
}), _e = /* @__PURE__ */ de(ue, [["__scopeId", "data-v-94d6ba3b"]]);
|
|
157
161
|
export {
|
|
158
|
-
|
|
162
|
+
_e as C
|
|
159
163
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.clll-calendar[data-v-
|
|
1
|
+
.clll-calendar[data-v-94d6ba3b]{display:flex;flex-direction:column;background-color:#fff;box-sizing:border-box;width:var(--v0c243535)}.clll-calendar__fluid[data-v-94d6ba3b]{width:100%;max-width:none}.clll-calendar__header[data-v-94d6ba3b]{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--clll-unit-4)}.clll-calendar__grid[data-v-94d6ba3b]{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--clll-unit-1)}.clll-calendar__weekday[data-v-94d6ba3b]{text-align:center;padding-bottom:var(--clll-unit-1)}.clll-calendar__cell[data-v-94d6ba3b]{aspect-ratio:1;display:flex;justify-content:center;align-items:center}.clll-calendar__cell--outside[data-v-94d6ba3b]{opacity:.55}
|
|
@@ -13,6 +13,8 @@ export interface CLCalendarProps {
|
|
|
13
13
|
fluid?: boolean;
|
|
14
14
|
/** Test ID for testing purposes. */
|
|
15
15
|
testId?: string;
|
|
16
|
+
/** Sets the width of the calendar. */
|
|
17
|
+
width?: string;
|
|
16
18
|
}
|
|
17
19
|
declare const _default: import('vue').DefineComponent<{
|
|
18
20
|
modelValue?: {
|
|
@@ -47,6 +49,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
47
49
|
color: CLColors;
|
|
48
50
|
fluid: boolean;
|
|
49
51
|
testId: string;
|
|
52
|
+
width: string;
|
|
50
53
|
busy: boolean;
|
|
51
54
|
disabled: boolean;
|
|
52
55
|
isRange: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
|
+
import './CLInput.css';
|
|
2
3
|
import '../../../assets/shared/form-utilities.css';
|
|
3
4
|
import { defineComponent as S, computed as z, createElementBlock as $, openBlock as u, normalizeClass as y, unref as a, createBlock as b, Fragment as w, createTextVNode as M, toDisplayString as P, createVNode as K, ref as q, watch as R, createCommentVNode as v, mergeModels as N, useTemplateRef as Q, useModel as W, withCtx as Y, createElementVNode as p, normalizeStyle as Z, withDirectives as _, vModelDynamic as ee, isRef as le } from "vue";
|
|
4
5
|
import { _ as ie, i as ae, a as te } from "../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DTWvAACK.js";
|
|
@@ -4,7 +4,7 @@ import { defineComponent as U, mergeModels as q, ref as r, useModel as N, watch
|
|
|
4
4
|
import { u as W, a as X, o as Z, f as _, s as ee } from "../../../chunks/floating-ui.vue-Fx4CxKut.js";
|
|
5
5
|
import { _ as ae } from "../../../chunks/CLCard.vue_vue_type_style_index_0_lang-Sre7UYZd.js";
|
|
6
6
|
import { CLInput as te } from "../CLInput/CLInput.js";
|
|
7
|
-
import { C as le } from "../../../chunks/CLCalendar-
|
|
7
|
+
import { C as le } from "../../../chunks/CLCalendar-BGwHfZr9.js";
|
|
8
8
|
import { CLIconNames as ne, CLColorVariants as D, CLPlacement as oe, CLOrientation as ie, CLSizes as de, CLColors as ue } from "../../../index.js";
|
|
9
9
|
import { i as L } from "../../../chunks/helper-qUkciePY.js";
|
|
10
10
|
import { useEsc as re } from "../../../composables/useEsc.js";
|
|
@@ -225,6 +225,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
225
225
|
color: CLColors;
|
|
226
226
|
fluid: boolean;
|
|
227
227
|
testId: string;
|
|
228
|
+
width: string;
|
|
228
229
|
busy: boolean;
|
|
229
230
|
disabled: boolean;
|
|
230
231
|
isRange: boolean;
|
|
@@ -257,6 +258,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
257
258
|
color: CLColors;
|
|
258
259
|
fluid: boolean;
|
|
259
260
|
testId: string;
|
|
261
|
+
width: string;
|
|
260
262
|
busy: boolean;
|
|
261
263
|
disabled: boolean;
|
|
262
264
|
isRange: boolean;
|
|
@@ -3,7 +3,7 @@ import './CLModalDatePicker.css';
|
|
|
3
3
|
import { defineComponent as I, mergeModels as N, ref as p, computed as u, useModel as h, onBeforeUnmount as A, createElementBlock as T, openBlock as W, normalizeClass as $, unref as e, createVNode as s, withCtx as c, createTextVNode as v, toDisplayString as G, createElementVNode as S, nextTick as O } from "vue";
|
|
4
4
|
import { _ as y } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
|
|
5
5
|
import { _ as U } from "../../../chunks/CLModal.vue_vue_type_style_index_0_lang-BDyONfaQ.js";
|
|
6
|
-
import { C as j } from "../../../chunks/CLCalendar-
|
|
6
|
+
import { C as j } from "../../../chunks/CLCalendar-BGwHfZr9.js";
|
|
7
7
|
import { CLSizes as n, CLIconSizes as i, CLIconNames as q, CLBorderRadius as B, CLColorVariants as X, CLColors as C } from "../../../index.js";
|
|
8
8
|
import { i as z } from "../../../chunks/helper-qUkciePY.js";
|
|
9
9
|
import { useDatePicker as H } from "../../../composables/useDatePicker.js";
|
|
@@ -104,6 +104,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
104
104
|
color: CLColors;
|
|
105
105
|
fluid: boolean;
|
|
106
106
|
testId: string;
|
|
107
|
+
width: string;
|
|
107
108
|
busy: boolean;
|
|
108
109
|
disabled: boolean;
|
|
109
110
|
isRange: boolean;
|
|
@@ -136,6 +137,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
136
137
|
color: CLColors;
|
|
137
138
|
fluid: boolean;
|
|
138
139
|
testId: string;
|
|
140
|
+
width: string;
|
|
139
141
|
busy: boolean;
|
|
140
142
|
disabled: boolean;
|
|
141
143
|
isRange: boolean;
|