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