@maltjoy/core-vue 1.0.0-alpha.4 → 1.0.0-alpha.5

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/joy-vue.js CHANGED
@@ -1,26 +1,26 @@
1
- import { defineComponent as y, openBlock as s, createElementBlock as u, normalizeClass as d, useAttrs as z, computed as J, createBlock as w, resolveDynamicComponent as T, unref as f, withCtx as V, createCommentVNode as j, createElementVNode as n, renderSlot as r, ref as h, createTextVNode as R, toDisplayString as L, pushScopeId as O, popScopeId as N, mergeProps as C, useSlots as E, onBeforeMount as M, onMounted as A, watch as D } from "vue";
2
- const G = ["teal", "white"], W = /* @__PURE__ */ y({
1
+ import { defineComponent as _, openBlock as r, createElementBlock as c, normalizeClass as u, useAttrs as R, computed as I, createBlock as B, resolveDynamicComponent as A, unref as g, withCtx as q, createCommentVNode as h, createElementVNode as n, renderSlot as y, ref as b, createTextVNode as V, toDisplayString as J, pushScopeId as P, popScopeId as H, mergeProps as E, useSlots as T, onBeforeMount as D, onMounted as z, watch as G, createVNode as W } from "vue";
2
+ const U = ["teal", "white"], Z = /* @__PURE__ */ _({
3
3
  __name: "JoySpinner",
4
4
  props: {
5
5
  color: {
6
6
  type: String,
7
7
  validator(e) {
8
- return G.includes(e);
8
+ return U.includes(e);
9
9
  }
10
10
  }
11
11
  },
12
12
  setup(e) {
13
- return (a, t) => (s(), u("div", {
14
- class: d(["joy-spinner", `joy-spinner_${e.color}`])
13
+ return (l, t) => (r(), c("div", {
14
+ class: u(["joy-spinner", `joy-spinner_${e.color}`])
15
15
  }, null, 2));
16
16
  }
17
17
  });
18
- const _ = (e, a) => {
18
+ const v = (e, l) => {
19
19
  const t = e.__vccOpts || e;
20
- for (const [l, i] of a)
21
- t[l] = i;
20
+ for (const [o, s] of l)
21
+ t[o] = s;
22
22
  return t;
23
- }, P = /* @__PURE__ */ _(W, [["__scopeId", "data-v-b633f633"]]), Z = ["primary", "secondary"], U = ["xlarge", "large", "medium", "small", "xsmall", "xxsmall"], K = ["neutral", "success", "info", "warning", "error"], X = ["main", "admin", "white", "ghost"], Q = [...Z, ...X], Y = [...U], x = ["xxsmall", "xsmall", "small"], ee = ["name", "size"], te = { class: "joy-button--slot" }, oe = /* @__PURE__ */ y({
23
+ }, M = /* @__PURE__ */ v(Z, [["__scopeId", "data-v-b633f633"]]), K = ["primary", "secondary"], X = ["neutral", "success", "info", "warning", "error"], Q = ["main", "admin", "ghost"], Y = [...K, ...Q], x = ["large", "medium", "small", "xsmall", "xxsmall"], ee = ["xxsmall", "xsmall", "small"], te = ["name", "size"], ae = { class: "joy-button--slot" }, oe = /* @__PURE__ */ _({
24
24
  __name: "JoyButton",
25
25
  props: {
26
26
  /**
@@ -43,7 +43,7 @@ const _ = (e, a) => {
43
43
  type: String,
44
44
  default: "primary",
45
45
  validator(e) {
46
- return Q.includes(e);
46
+ return Y.includes(e);
47
47
  }
48
48
  },
49
49
  /** Button or Link size */
@@ -51,7 +51,7 @@ const _ = (e, a) => {
51
51
  type: String,
52
52
  default: "medium",
53
53
  validator(e) {
54
- return Y.includes(e);
54
+ return x.includes(e);
55
55
  }
56
56
  },
57
57
  /** Override the icon size. Default to xsmall */
@@ -59,15 +59,15 @@ const _ = (e, a) => {
59
59
  type: String,
60
60
  default: "xsmall",
61
61
  validator(e) {
62
- return x.includes(e);
62
+ return ee.includes(e);
63
63
  }
64
64
  }
65
65
  },
66
66
  setup(e) {
67
- const a = e, t = z(), l = J(() => ["white", "ghost", "secondary"].includes(a.variant) ? "teal" : "white");
68
- return (i, c) => (s(), w(T(f(t).href ? "a" : "button"), {
69
- disabled: e.loading || f(t).disabled,
70
- class: d([
67
+ const l = e, t = R(), o = I(() => ["white", "ghost", "secondary"].includes(l.variant) ? "teal" : "white");
68
+ return (s, m) => (r(), B(A(g(t).href ? "a" : "button"), {
69
+ disabled: e.loading || g(t).disabled,
70
+ class: u([
71
71
  "joy-button",
72
72
  `joy-button_${e.variant}`,
73
73
  `joy-button_${e.size}`,
@@ -77,26 +77,26 @@ const _ = (e, a) => {
77
77
  }
78
78
  ])
79
79
  }, {
80
- default: V(() => [
81
- e.icon ? (s(), u("joy-icon", {
80
+ default: q(() => [
81
+ e.icon ? (r(), c("joy-icon", {
82
82
  key: 0,
83
83
  name: e.icon,
84
84
  size: e.iconSize,
85
85
  lazy: !1
86
- }, null, 8, ee)) : j("", !0),
87
- e.loading ? (s(), w(P, {
86
+ }, null, 8, te)) : h("", !0),
87
+ e.loading ? (r(), B(M, {
88
88
  key: 1,
89
- color: f(l)
90
- }, null, 8, ["color"])) : j("", !0),
91
- n("span", te, [
92
- r(i.$slots, "default", {}, void 0, !0)
89
+ color: g(o)
90
+ }, null, 8, ["color"])) : h("", !0),
91
+ n("span", ae, [
92
+ y(s.$slots, "default", {}, void 0, !0)
93
93
  ])
94
94
  ]),
95
95
  _: 3
96
96
  }, 8, ["disabled", "class"]));
97
97
  }
98
98
  });
99
- const ae = /* @__PURE__ */ _(oe, [["__scopeId", "data-v-08c3c0a6"]]), B = {
99
+ const le = /* @__PURE__ */ v(oe, [["__scopeId", "data-v-958cc680"]]), L = {
100
100
  disabled: {
101
101
  type: Boolean,
102
102
  default: !1
@@ -115,6 +115,11 @@ const ae = /* @__PURE__ */ _(oe, [["__scopeId", "data-v-08c3c0a6"]]), B = {
115
115
  type: Boolean,
116
116
  default: !1
117
117
  }
118
+ }, N = {
119
+ modelValue: {
120
+ type: String,
121
+ default: ""
122
+ }
118
123
  }, F = {
119
124
  modelValue: {
120
125
  type: Boolean,
@@ -124,14 +129,19 @@ const ae = /* @__PURE__ */ _(oe, [["__scopeId", "data-v-08c3c0a6"]]), B = {
124
129
  type: String,
125
130
  default: "on"
126
131
  },
127
- ...B
128
- }, H = {
132
+ ...L
133
+ }, O = {
129
134
  label: String,
130
135
  labelSize: {
131
136
  type: String,
132
137
  default: "medium"
138
+ },
139
+ optionalLabel: String,
140
+ requiredMark: {
141
+ type: Boolean,
142
+ default: !1
133
143
  }
134
- }, le = ["aria-checked", "aria-hidden"], ne = ["name", "disabled", "checked", "required", "aria-checked", "value", "indeterminate"], ie = { class: "joy-checkbox__content-wrapper" }, se = { class: "joy-checkbox__content" }, re = /* @__PURE__ */ y({
144
+ }, ne = ["aria-checked", "aria-hidden"], ie = ["name", "disabled", "checked", "required", "aria-checked", "value", "indeterminate"], se = { class: "joy-checkbox__content-wrapper" }, re = { class: "joy-checkbox__content" }, de = /* @__PURE__ */ _({
135
145
  __name: "JoyCheckbox",
136
146
  props: {
137
147
  /** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
@@ -139,61 +149,66 @@ const ae = /* @__PURE__ */ _(oe, [["__scopeId", "data-v-08c3c0a6"]]), B = {
139
149
  type: Boolean,
140
150
  default: !1
141
151
  },
152
+ label: {
153
+ type: String
154
+ },
142
155
  ...F
143
156
  },
144
157
  emits: ["update:modelValue"],
145
- setup(e, { expose: a, emit: t }) {
146
- const l = e, i = h(), c = h(l.indeterminate), S = {
147
- onChange: (o) => {
148
- const p = o.target.checked;
149
- c.value = !1, t("update:modelValue", p);
158
+ setup(e, { expose: l, emit: t }) {
159
+ const o = e, s = b(), m = b(o.indeterminate), j = {
160
+ onChange: (a) => {
161
+ const p = a.target.checked;
162
+ m.value = !1, t("update:modelValue", p);
150
163
  }
151
164
  };
152
- return a({
153
- isIndeterminate: c
154
- }), (o, p) => (s(), u("div", {
155
- "aria-checked": o.modelValue,
156
- "aria-hidden": o.disabled
165
+ return l({
166
+ isIndeterminate: m
167
+ }), (a, p) => (r(), c("div", {
168
+ "aria-checked": a.modelValue,
169
+ "aria-hidden": a.disabled
157
170
  }, [
158
171
  n("label", {
159
- class: d([
172
+ class: u([
160
173
  "joy-checkbox",
161
174
  {
162
- "joy-checkbox__checked": o.modelValue,
163
- "joy-checkbox__indeterminate": c.value
175
+ "joy-checkbox__checked": a.modelValue,
176
+ "joy-checkbox__indeterminate": m.value
164
177
  }
165
178
  ])
166
179
  }, [
167
180
  n("input", {
168
181
  ref_key: "input",
169
- ref: i,
182
+ ref: s,
170
183
  type: "checkbox",
171
184
  class: "joy-checkbox__input",
172
185
  role: "checkbox",
173
- name: o.name,
174
- disabled: o.disabled,
175
- checked: o.modelValue,
176
- required: o.required,
177
- "aria-checked": o.modelValue,
178
- value: o.value,
179
- indeterminate: c.value,
186
+ name: a.name,
187
+ disabled: a.disabled,
188
+ checked: a.modelValue,
189
+ required: a.required,
190
+ "aria-checked": a.modelValue,
191
+ value: a.value,
192
+ indeterminate: m.value,
180
193
  onChange: p[0] || (p[0] = //@ts-ignore
181
- (...b) => S.onChange && S.onChange(...b))
182
- }, null, 40, ne),
183
- n("div", ie, [
184
- r(o.$slots, "default", {}, void 0, !0),
185
- n("div", se, [
186
- r(o.$slots, "checkbox-content", {}, void 0, !0)
194
+ (...S) => j.onChange && j.onChange(...S))
195
+ }, null, 40, ie),
196
+ n("div", se, [
197
+ y(a.$slots, "default", {}, () => [
198
+ V(J(e.label), 1)
199
+ ], !0),
200
+ n("div", re, [
201
+ y(a.$slots, "checkbox-content", {}, void 0, !0)
187
202
  ])
188
203
  ])
189
204
  ], 2)
190
- ], 8, le));
205
+ ], 8, ne));
191
206
  }
192
207
  });
193
- const de = /* @__PURE__ */ _(re, [["__scopeId", "data-v-61d9cccf"]]), ue = (e) => (O("data-v-eba58103"), e = e(), N(), e), ce = ["aria-hidden"], pe = /* @__PURE__ */ ue(() => /* @__PURE__ */ n("joy-icon", {
208
+ const ue = /* @__PURE__ */ v(de, [["__scopeId", "data-v-36f44295"]]), ce = (e) => (P("data-v-eba58103"), e = e(), H(), e), ye = ["aria-hidden"], pe = /* @__PURE__ */ ce(() => /* @__PURE__ */ n("joy-icon", {
194
209
  "custom-class": "joy-icon-error",
195
210
  name: "warning-triangle"
196
- }, null, -1)), ye = /* @__PURE__ */ y({
211
+ }, null, -1)), me = /* @__PURE__ */ _({
197
212
  __name: "JoyFormError",
198
213
  props: {
199
214
  visible: {
@@ -203,36 +218,36 @@ const de = /* @__PURE__ */ _(re, [["__scopeId", "data-v-61d9cccf"]]), ue = (e) =
203
218
  noHtmlErrorText: String
204
219
  },
205
220
  setup(e) {
206
- return (a, t) => (s(), u("div", {
221
+ return (l, t) => (r(), c("div", {
207
222
  "aria-hidden": e.visible,
208
- class: d(["joy-form-error", { "joy-has-error": e.visible }]),
223
+ class: u(["joy-form-error", { "joy-has-error": e.visible }]),
209
224
  role: "alert"
210
225
  }, [
211
226
  pe,
212
227
  n("div", null, [
213
- r(a.$slots, "default", {}, () => [
214
- R(L(e.noHtmlErrorText), 1)
228
+ y(l.$slots, "default", {}, () => [
229
+ V(J(e.noHtmlErrorText), 1)
215
230
  ], !0)
216
231
  ])
217
- ], 10, ce));
232
+ ], 10, ye));
218
233
  }
219
234
  });
220
- const _e = /* @__PURE__ */ _(ye, [["__scopeId", "data-v-eba58103"]]);
221
- function me(e) {
222
- let a;
235
+ const _e = /* @__PURE__ */ v(me, [["__scopeId", "data-v-eba58103"]]);
236
+ function ve(e) {
237
+ let l;
223
238
  switch (e) {
224
239
  case "error":
225
- a = "warning-triangle";
240
+ l = "warning-triangle";
226
241
  break;
227
242
  case "success":
228
- a = "check";
243
+ l = "check";
229
244
  break;
230
245
  default:
231
- a = "info-circle";
246
+ l = "info-circle";
232
247
  }
233
- return a;
248
+ return l;
234
249
  }
235
- const ve = [...K], fe = ["name"], ge = { class: "joy-highlight--text" }, he = /* @__PURE__ */ y({
250
+ const fe = [...X], ge = ["name"], he = { class: "joy-highlight--text" }, be = /* @__PURE__ */ _({
236
251
  __name: "JoyHighlight",
237
252
  props: {
238
253
  accent: {
@@ -248,51 +263,51 @@ const ve = [...K], fe = ["name"], ge = { class: "joy-highlight--text" }, he = /*
248
263
  type: String,
249
264
  default: "neutral",
250
265
  validator(e) {
251
- return ve.includes(e);
266
+ return fe.includes(e);
252
267
  }
253
268
  }
254
269
  },
255
- setup(e, { expose: a }) {
256
- const t = e, l = J(() => t.icon ? t.icon : me(t.level));
257
- return a({
258
- getRelevantIcon: l
259
- }), (i, c) => (s(), u("div", {
260
- class: d([
270
+ setup(e, { expose: l }) {
271
+ const t = e, o = I(() => t.icon ? t.icon : ve(t.level));
272
+ return l({
273
+ getRelevantIcon: o
274
+ }), (s, m) => (r(), c("div", {
275
+ class: u([
261
276
  "joy-highlight",
262
277
  `joy-highlight_${e.level}`,
263
278
  {
264
279
  "joy-highlight__accent": e.accent,
265
- "joy-highlight__titled": i.$slots["highlight-title"]
280
+ "joy-highlight__titled": s.$slots["highlight-title"]
266
281
  }
267
282
  ])
268
283
  }, [
269
- e.displayIcon ? (s(), u("joy-icon", {
284
+ e.displayIcon ? (r(), c("joy-icon", {
270
285
  key: 0,
271
- name: f(l)
272
- }, null, 8, fe)) : j("", !0),
273
- n("div", ge, [
286
+ name: g(o)
287
+ }, null, 8, ge)) : h("", !0),
288
+ n("div", he, [
274
289
  n("strong", null, [
275
- r(i.$slots, "highlight-title", {}, void 0, !0)
290
+ y(s.$slots, "highlight-title", {}, void 0, !0)
276
291
  ]),
277
- r(i.$slots, "default", {}, void 0, !0)
292
+ y(s.$slots, "default", {}, void 0, !0)
278
293
  ])
279
294
  ], 2));
280
295
  }
281
296
  });
282
- const be = /* @__PURE__ */ _(he, [["__scopeId", "data-v-15d3fa11"]]), je = ["small", "medium", "large"], Se = {
297
+ const je = /* @__PURE__ */ v(be, [["__scopeId", "data-v-15d3fa11"]]), Se = ["small", "medium", "large"], $e = {
283
298
  key: 0,
284
299
  class: "joy-label-required"
285
- }, $e = {
300
+ }, ke = {
286
301
  key: 1,
287
302
  class: "joy-label-optional"
288
- }, ke = /* @__PURE__ */ y({
303
+ }, Ie = /* @__PURE__ */ _({
289
304
  __name: "JoyLabel",
290
305
  props: {
291
306
  size: {
292
307
  type: String,
293
308
  default: "medium",
294
309
  validator(e) {
295
- return je.includes(e);
310
+ return Se.includes(e);
296
311
  }
297
312
  },
298
313
  tagName: {
@@ -308,145 +323,143 @@ const be = /* @__PURE__ */ _(he, [["__scopeId", "data-v-15d3fa11"]]), je = ["sma
308
323
  }
309
324
  },
310
325
  setup(e) {
311
- return (a, t) => (s(), w(T(e.tagName), C({
326
+ return (l, t) => (r(), B(A(e.tagName), E({
312
327
  class: ["joy-label", `joy-label--${e.size}`]
313
- }, a.$attrs), {
314
- default: V(() => [
315
- r(a.$slots, "default", {}, void 0, !0),
316
- e.required ? (s(), u("span", Se, "*")) : j("", !0),
317
- e.optionalLabel ? (s(), u("span", $e, "- " + L(e.optionalLabel), 1)) : j("", !0)
328
+ }, l.$attrs), {
329
+ default: q(() => [
330
+ y(l.$slots, "default", {}, void 0, !0),
331
+ e.required ? (r(), c("span", $e, "*")) : h("", !0),
332
+ e.optionalLabel ? (r(), c("span", ke, "- " + J(e.optionalLabel), 1)) : h("", !0)
318
333
  ]),
319
334
  _: 3
320
335
  }, 16, ["class"]));
321
336
  }
322
337
  });
323
- const q = /* @__PURE__ */ _(ke, [["__scopeId", "data-v-e3232407"]]), Je = ["id", "type", "value"], Ie = ["data-unit"], we = /* @__PURE__ */ y({
338
+ const C = /* @__PURE__ */ v(Ie, [["__scopeId", "data-v-e3232407"]]), Je = ["large", "medium", "small"], we = ["id", "disabled", "type", "value"], Ve = ["data-unit"], Be = /* @__PURE__ */ _({
324
339
  __name: "JoyInput",
325
340
  props: {
326
- ...B,
327
- ...H,
341
+ ...L,
342
+ ...O,
343
+ ...N,
328
344
  clearable: {
329
345
  type: Boolean,
330
346
  default: !1
331
347
  },
332
348
  icon: String,
333
- modelValue: {
334
- type: String,
335
- default: ""
336
- },
337
- optionalLabel: String,
338
- requiredMark: {
339
- type: Boolean,
340
- default: !1
341
- },
342
349
  size: {
343
350
  type: String,
344
- default: "medium"
351
+ default: "medium",
352
+ validator(e) {
353
+ return Je.includes(e);
354
+ }
345
355
  },
346
356
  type: String,
347
357
  unit: String
348
358
  },
349
359
  emits: ["update:modelValue"],
350
- setup(e, { emit: a }) {
351
- const t = e, l = h(), i = h(), c = z(), S = E(), o = h(!1), p = J(() => t.clearable && t.modelValue.length > 0 && !t.unit), b = J(() => S.default && S.default()), I = J(() => {
352
- var m, v;
353
- return !!((m = i.value) != null && m.closest("joy-wrapper")) || !!((v = i.value) != null && v.closest(".joy-wrapper"));
354
- }), g = h(t.type);
355
- M(() => {
356
- g.value = t.unit ? "number" : t.unit || "text";
360
+ setup(e, { emit: l }) {
361
+ const t = e, o = b(), s = b(), m = R(), j = T(), a = b(!1), p = I(() => t.clearable && t.modelValue.length > 0 && !t.unit), S = I(() => j.default && j.default()), k = I(() => {
362
+ var d, $;
363
+ return !!((d = s.value) != null && d.closest("joy-wrapper")) || !!(($ = s.value) != null && $.closest(".joy-wrapper"));
364
+ }), i = b(t.type);
365
+ D(() => {
366
+ i.value = t.unit ? "number" : t.unit || "text";
357
367
  });
358
- const $ = {
368
+ const f = {
359
369
  onFocus: () => {
360
- o.value = !0;
370
+ a.value = !0;
361
371
  },
362
372
  onBlur: () => {
363
- o.value = !1;
373
+ a.value = !1;
364
374
  },
365
- onInput: (m) => {
366
- let v = m.target.value;
367
- a("update:modelValue", v);
375
+ onInput: (d) => {
376
+ let $ = d.target.value;
377
+ l("update:modelValue", $);
368
378
  },
369
379
  clearValue: () => {
370
- a("update:modelValue", "");
380
+ t.disabled || l("update:modelValue", "");
371
381
  }
372
382
  };
373
- return (m, v) => (s(), u("div", {
383
+ return (d, $) => (r(), c("div", {
374
384
  ref_key: "root",
375
- ref: i,
376
- class: d([`joy-input--${t.size}`])
385
+ ref: s,
386
+ class: u([`joy-input--${t.size}`])
377
387
  }, [
378
388
  n("div", {
379
- class: d([
389
+ class: u([
380
390
  "joy-input",
381
391
  {
382
- "joy-input--focusing": o.value,
383
- "joy-input--disabled": f(c).disabled,
384
- "joy-input--invalid": m.invalid,
385
- "joy-input--valid": !m.invalid && !f(c).disabled
392
+ "joy-input--focusing": a.value,
393
+ "joy-input--disabled": d.disabled,
394
+ "joy-input--invalid": d.invalid,
395
+ "joy-input--valid": !d.invalid && !g(m).disabled
386
396
  }
387
397
  ])
388
398
  }, [
389
- f(b) ? (s(), w(q, {
399
+ g(S) || d.label ? (r(), B(C, {
390
400
  key: 0,
391
- for: m.name,
392
- required: m.required && e.requiredMark,
393
- "optional-label": e.optionalLabel,
394
- size: m.labelSize
401
+ for: d.name,
402
+ required: d.required && d.requiredMark,
403
+ "optional-label": d.optionalLabel,
404
+ size: d.labelSize
395
405
  }, {
396
- default: V(() => [
397
- r(m.$slots, "default", {}, void 0, !0)
406
+ default: q(() => [
407
+ y(d.$slots, "default", {}, () => [
408
+ V(J(d.label), 1)
409
+ ], !0)
398
410
  ]),
399
411
  _: 3
400
- }, 8, ["for", "required", "optional-label", "size"])) : j("", !0),
412
+ }, 8, ["for", "required", "optional-label", "size"])) : h("", !0),
401
413
  n("div", {
402
- class: d([
414
+ class: u([
403
415
  "joy-input--wrapper",
404
416
  {
405
417
  "joy-input--wrapper-has-icon": !!e.icon,
406
418
  "joy-input--wrapper---clearable": e.clearable,
407
419
  "joy-input--wrapper-unit": !!e.unit,
408
- "joy-input--wrapper-margin": !f(I)
420
+ "joy-input--wrapper-margin": !g(k)
409
421
  }
410
422
  ])
411
423
  }, [
412
- n("input", C(m.$attrs, {
424
+ n("input", E(d.$attrs, {
413
425
  id: t.name,
414
426
  ref_key: "input",
415
- ref: l,
427
+ ref: o,
428
+ disabled: d.disabled,
416
429
  class: [
417
430
  {
418
- "joy-input--field-disabled": f(c).disabled,
419
- "joy-input--field-invalid": m.invalid
431
+ "joy-input--field-disabled": d.disabled,
432
+ "joy-input--field-invalid": d.invalid
420
433
  }
421
434
  ],
422
- type: g.value,
423
- value: e.modelValue,
424
- onFocus: v[0] || (v[0] = //@ts-ignore
425
- (...k) => $.onFocus && $.onFocus(...k)),
426
- onBlur: v[1] || (v[1] = //@ts-ignore
427
- (...k) => $.onBlur && $.onBlur(...k)),
428
- onInput: v[2] || (v[2] = //@ts-ignore
429
- (...k) => $.onInput && $.onInput(...k))
430
- }), null, 16, Je),
431
- f(p) ? (s(), u("joy-icon", {
435
+ type: i.value,
436
+ value: d.modelValue,
437
+ onFocus: $[0] || ($[0] = //@ts-ignore
438
+ (...w) => f.onFocus && f.onFocus(...w)),
439
+ onBlur: $[1] || ($[1] = //@ts-ignore
440
+ (...w) => f.onBlur && f.onBlur(...w)),
441
+ onInput: $[2] || ($[2] = //@ts-ignore
442
+ (...w) => f.onInput && f.onInput(...w))
443
+ }), null, 16, we),
444
+ g(p) ? (r(), c("joy-icon", {
432
445
  key: 0,
433
446
  size: "xxsmall",
434
447
  name: "cross",
435
448
  class: "joy-input--clear",
436
- onClick: v[3] || (v[3] = //@ts-ignore
437
- (...k) => $.clearValue && $.clearValue(...k))
438
- })) : j("", !0),
439
- e.unit ? (s(), u("div", {
449
+ onClick: $[3] || ($[3] = //@ts-ignore
450
+ (...w) => f.clearValue && f.clearValue(...w))
451
+ })) : h("", !0),
452
+ e.unit ? (r(), c("div", {
440
453
  key: 1,
441
454
  "data-unit": e.unit,
442
455
  class: "joy-input--unit"
443
- }, null, 8, Ie)) : j("", !0)
456
+ }, null, 8, Ve)) : h("", !0)
444
457
  ], 2)
445
458
  ], 2)
446
459
  ], 2));
447
460
  }
448
461
  });
449
- const Ve = /* @__PURE__ */ _(we, [["__scopeId", "data-v-6eb67b7e"]]), Be = ["teal", "white"], Le = ["href"], Ce = ["color", "name"], Ee = /* @__PURE__ */ y({
462
+ const qe = /* @__PURE__ */ v(Be, [["__scopeId", "data-v-3e0a5c90"]]), Le = ["teal", "white"], Ee = ["href"], Ce = ["color", "name"], Te = /* @__PURE__ */ _({
450
463
  __name: "JoyLink",
451
464
  props: {
452
465
  href: {
@@ -457,29 +470,29 @@ const Ve = /* @__PURE__ */ _(we, [["__scopeId", "data-v-6eb67b7e"]]), Be = ["tea
457
470
  type: String,
458
471
  default: "teal",
459
472
  validator(e) {
460
- return Be.includes(e);
473
+ return Le.includes(e);
461
474
  }
462
475
  },
463
476
  icon: String
464
477
  },
465
478
  setup(e) {
466
- const a = e, t = J(() => a.color === "white" ? "white" : "teal");
467
- return (l, i) => (s(), u("a", C({ href: e.href }, l.$attrs, {
479
+ const l = e, t = I(() => l.color === "white" ? "white" : "teal");
480
+ return (o, s) => (r(), c("a", E({ href: e.href }, o.$attrs, {
468
481
  class: ["joy-link", `joy-link_${e.color}`]
469
482
  }), [
470
- e.icon ? (s(), u("joy-icon", {
483
+ e.icon ? (r(), c("joy-icon", {
471
484
  key: 0,
472
- color: f(t),
485
+ color: g(t),
473
486
  name: e.icon
474
- }, null, 8, Ce)) : j("", !0),
475
- r(l.$slots, "default", {}, void 0, !0)
476
- ], 16, Le));
487
+ }, null, 8, Ce)) : h("", !0),
488
+ y(o.$slots, "default", {}, void 0, !0)
489
+ ], 16, Ee));
477
490
  }
478
491
  });
479
- const qe = /* @__PURE__ */ _(Ee, [["__scopeId", "data-v-640ee9a6"]]), ze = ["id", "value", "checked", "disabled", "required", "name"], Te = { class: "joy-radio-label" }, Re = { class: "joy-radio-content__wrapper" }, Oe = { class: "joy-radio-content" }, Ne = /* @__PURE__ */ y({
492
+ const ze = /* @__PURE__ */ v(Te, [["__scopeId", "data-v-640ee9a6"]]), Ne = ["id", "value", "checked", "disabled", "required", "name"], Oe = { class: "joy-radio-label" }, Re = { class: "joy-radio-content__wrapper" }, Ae = { class: "joy-radio-content" }, Pe = /* @__PURE__ */ _({
480
493
  __name: "JoyRadio",
481
494
  props: {
482
- ...B,
495
+ ...L,
483
496
  modelValue: {
484
497
  type: String
485
498
  },
@@ -492,66 +505,66 @@ const qe = /* @__PURE__ */ _(Ee, [["__scopeId", "data-v-640ee9a6"]]), ze = ["id"
492
505
  }
493
506
  },
494
507
  emits: ["update:modelValue"],
495
- setup(e, { expose: a, emit: t }) {
496
- const l = e, i = h(!1), c = h(null), S = h(null), o = E(), p = J(() => !l.modelValue || !l.value ? !1 : l.modelValue === l.value);
497
- function b() {
498
- i.value = !!o["expandable-content"] && p.value;
508
+ setup(e, { expose: l, emit: t }) {
509
+ const o = e, s = b(!1), m = b(null), j = b(null), a = T(), p = I(() => !o.modelValue || !o.value ? !1 : o.modelValue === o.value);
510
+ function S() {
511
+ s.value = !!a["expandable-content"] && p.value;
499
512
  }
500
- function I() {
501
- t("update:modelValue", l.value), b();
513
+ function k() {
514
+ t("update:modelValue", o.value), S();
502
515
  }
503
- return A(() => {
504
- l.theme === "outline" && b();
505
- }), D(
506
- () => l.modelValue,
516
+ return z(() => {
517
+ o.theme === "outline" && S();
518
+ }), G(
519
+ () => o.modelValue,
507
520
  () => {
508
- b();
521
+ S();
509
522
  }
510
- ), a({
523
+ ), l({
511
524
  checked: p,
512
- isExpanded: i
513
- }), (g, $) => (s(), u("label", {
525
+ isExpanded: s
526
+ }), (i, f) => (r(), c("label", {
514
527
  ref_key: "root",
515
- ref: c,
516
- class: d([
528
+ ref: m,
529
+ class: u([
517
530
  "joy-radio",
518
531
  `joy-radio--${e.theme}`,
519
532
  {
520
- "joy-radio--checked": f(p),
521
- "joy-radio--disabled": g.disabled,
522
- "joy-radio--invalid": g.invalid
533
+ "joy-radio--checked": g(p),
534
+ "joy-radio--disabled": i.disabled,
535
+ "joy-radio--invalid": i.invalid
523
536
  }
524
537
  ])
525
538
  }, [
526
539
  n("input", {
527
- id: g.name,
540
+ id: i.name,
528
541
  type: "radio",
529
542
  value: e.value,
530
- checked: f(p),
531
- disabled: g.disabled,
532
- required: g.required,
533
- name: g.name,
534
- onChange: I
535
- }, null, 40, ze),
536
- n("span", Te, [
537
- r(g.$slots, "default", {}, void 0, !0)
543
+ checked: g(p),
544
+ disabled: i.disabled,
545
+ required: i.required,
546
+ name: i.name,
547
+ onChange: k
548
+ }, null, 40, Ne),
549
+ n("span", Oe, [
550
+ y(i.$slots, "default", {}, void 0, !0)
538
551
  ]),
539
552
  n("div", Re, [
540
- n("div", Oe, [
541
- r(g.$slots, "radio-content", {}, void 0, !0)
553
+ n("div", Ae, [
554
+ y(i.$slots, "radio-content", {}, void 0, !0)
542
555
  ]),
543
556
  n("div", {
544
557
  ref_key: "expandableElement",
545
- ref: S,
546
- class: d(["joy-radio-expandable", { "joy-radio-expandable--expanded": i.value }])
558
+ ref: j,
559
+ class: u(["joy-radio-expandable", { "joy-radio-expandable--expanded": s.value }])
547
560
  }, [
548
- r(g.$slots, "expandable-content", {}, void 0, !0)
561
+ y(i.$slots, "expandable-content", {}, void 0, !0)
549
562
  ], 2)
550
563
  ])
551
564
  ], 2));
552
565
  }
553
566
  });
554
- const Ae = /* @__PURE__ */ _(Ne, [["__scopeId", "data-v-822f5782"]]), Pe = ["form", "name"], Fe = /* @__PURE__ */ y({
567
+ const He = /* @__PURE__ */ v(Pe, [["__scopeId", "data-v-acb7c63c"]]), Me = ["form", "name"], Fe = /* @__PURE__ */ _({
555
568
  __name: "JoyRadioGroup",
556
569
  props: {
557
570
  direction: {
@@ -561,121 +574,104 @@ const Ae = /* @__PURE__ */ _(Ne, [["__scopeId", "data-v-822f5782"]]), Pe = ["for
561
574
  form: {
562
575
  type: String
563
576
  },
564
- modelValue: {
565
- type: String
566
- },
567
577
  name: {
568
578
  type: String
569
- },
570
- invalid: Boolean,
571
- invalidText: {
572
- type: String
573
579
  }
574
580
  },
575
581
  setup(e) {
576
- return (a, t) => (s(), u("fieldset", {
582
+ return (l, t) => (r(), c("fieldset", {
577
583
  ref: "root",
578
584
  class: "joy-radio-group-fieldset",
579
585
  role: "radiogroup",
580
586
  form: e.form,
581
587
  name: e.name
582
588
  }, [
583
- r(a.$slots, "radio-group-legend", {}, void 0, !0),
589
+ y(l.$slots, "radio-group-legend", {}, void 0, !0),
584
590
  n("div", {
585
- class: d(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
591
+ class: u(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
586
592
  }, [
587
- r(a.$slots, "default", {}, void 0, !0)
593
+ y(l.$slots, "default", {}, void 0, !0)
588
594
  ], 2)
589
- ], 8, Pe));
595
+ ], 8, Me));
590
596
  }
591
597
  });
592
- const He = /* @__PURE__ */ _(Fe, [["__scopeId", "data-v-09adf076"]]), Me = (e) => (O("data-v-7733736c"), e = e(), N(), e), De = ["id", "name", "aria-invalid", "required", "disabled", "value"], Ge = /* @__PURE__ */ Me(() => /* @__PURE__ */ n("joy-icon", {
598
+ const De = /* @__PURE__ */ v(Fe, [["__scopeId", "data-v-d75cd96a"]]), Ge = (e) => (P("data-v-48f25207"), e = e(), H(), e), We = ["id", "name", "aria-invalid", "required", "disabled", "value"], Ue = /* @__PURE__ */ Ge(() => /* @__PURE__ */ n("joy-icon", {
593
599
  class: "joy-select__chevron",
594
600
  name: "chevron-down"
595
- }, null, -1)), We = /* @__PURE__ */ y({
601
+ }, null, -1)), Ze = /* @__PURE__ */ _({
596
602
  __name: "JoySelect",
597
603
  props: {
598
- ...B,
599
- ...H,
600
- modelValue: {
601
- type: String,
602
- default: ""
603
- },
604
- optionalLabel: {
605
- type: String
606
- },
607
- requiredMark: {
608
- type: Boolean,
609
- default: !1
610
- }
604
+ ...L,
605
+ ...O,
606
+ ...N
611
607
  },
612
608
  emits: ["update:modelValue"],
613
- setup(e, { emit: a }) {
614
- const t = e, l = h(), i = h(), c = E();
615
- A(() => {
616
- var b;
617
- const o = c.label && c.label();
618
- if (!o || !o.length)
609
+ setup(e, { emit: l }) {
610
+ const t = e, o = b(), s = b(), m = T();
611
+ z(() => {
612
+ var S;
613
+ const a = m.label && m.label();
614
+ if (!a || !a.length)
619
615
  return;
620
- const p = o[0];
616
+ const p = a[0];
621
617
  if (p.type === "JoyLabel") {
622
- const I = (b = p.props) == null ? void 0 : b.for;
623
- if (!I) {
618
+ const k = (S = p.props) == null ? void 0 : S.for;
619
+ if (!k) {
624
620
  console.warn("JoyLabel for attribute is missing");
625
621
  return;
626
622
  }
627
- I !== t.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
623
+ k !== t.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
628
624
  }
629
625
  });
630
- function S(o) {
631
- const p = o.target.value;
632
- a("update:modelValue", p);
626
+ function j(a) {
627
+ const p = a.target.value;
628
+ l("update:modelValue", p);
633
629
  }
634
- return (o, p) => (s(), u("div", {
630
+ return (a, p) => (r(), c("div", {
635
631
  ref_key: "root",
636
- ref: l
632
+ ref: o
637
633
  }, [
638
- r(o.$slots, "label", {}, () => [
639
- o.label ? (s(), w(q, {
634
+ y(a.$slots, "label", {}, () => [
635
+ a.label ? (r(), B(C, {
640
636
  key: 0,
641
- required: o.required && e.requiredMark,
642
- "optional-label": e.optionalLabel,
643
- for: o.id || o.name,
644
- size: o.labelSize
637
+ required: a.required && a.requiredMark,
638
+ "optional-label": a.optionalLabel,
639
+ for: a.id || a.name,
640
+ size: a.labelSize
645
641
  }, {
646
- default: V(() => [
647
- R(L(o.label), 1)
642
+ default: q(() => [
643
+ V(J(a.label), 1)
648
644
  ]),
649
645
  _: 1
650
- }, 8, ["required", "optional-label", "for", "size"])) : j("", !0)
646
+ }, 8, ["required", "optional-label", "for", "size"])) : h("", !0)
651
647
  ], !0),
652
648
  n("div", {
653
- class: d({
649
+ class: u({
654
650
  "joy-select__wrapper": !0,
655
- "joy-select--invalid": o.invalid,
656
- "joy-select--disabled": o.disabled
651
+ "joy-select--invalid": a.invalid,
652
+ "joy-select--disabled": a.disabled
657
653
  })
658
654
  }, [
659
655
  n("select", {
660
- id: o.id || o.name,
656
+ id: a.id || a.name,
661
657
  ref_key: "select",
662
- ref: i,
658
+ ref: s,
663
659
  class: "joy-select",
664
- name: o.name,
665
- "aria-invalid": o.invalid,
666
- required: o.required,
667
- disabled: o.disabled,
668
- value: e.modelValue,
669
- onInput: S
660
+ name: a.name,
661
+ "aria-invalid": a.invalid,
662
+ required: a.required,
663
+ disabled: a.disabled,
664
+ value: a.modelValue,
665
+ onInput: j
670
666
  }, [
671
- r(o.$slots, "default", {}, void 0, !0)
672
- ], 40, De),
673
- Ge
667
+ y(a.$slots, "default", {}, void 0, !0)
668
+ ], 40, We),
669
+ Ue
674
670
  ], 2)
675
671
  ], 512));
676
672
  }
677
673
  });
678
- const Ze = /* @__PURE__ */ _(We, [["__scopeId", "data-v-7733736c"]]), Ue = /* @__PURE__ */ y({
674
+ const Ke = /* @__PURE__ */ v(Ze, [["__scopeId", "data-v-48f25207"]]), Xe = /* @__PURE__ */ _({
679
675
  __name: "JoyWrapper",
680
676
  props: {
681
677
  justify: {
@@ -696,83 +692,194 @@ const Ze = /* @__PURE__ */ _(We, [["__scopeId", "data-v-7733736c"]]), Ue = /* @_
696
692
  }
697
693
  },
698
694
  setup(e) {
699
- return (a, t) => (s(), u("div", {
700
- class: d(["joy-wrapper", `joy-wrapper--justify-${e.justify}`, `joy-wrapper--align-${e.align}`, `joy-wrapper--direction-${e.direction}`, `joy-wrapper--wrap-${e.wrap}`])
695
+ return (l, t) => (r(), c("div", {
696
+ class: u(["joy-wrapper", `joy-wrapper--justify-${e.justify}`, `joy-wrapper--align-${e.align}`, `joy-wrapper--direction-${e.direction}`, `joy-wrapper--wrap-${e.wrap}`])
701
697
  }, [
702
- r(a.$slots, "default", {}, void 0, !0)
698
+ y(l.$slots, "default", {}, void 0, !0)
703
699
  ], 2));
704
700
  }
705
701
  });
706
- const Ke = /* @__PURE__ */ _(Ue, [["__scopeId", "data-v-dce6df77"]]), Xe = { class: "joy-template__heading" }, Qe = { class: "joy-template__heading___headings" }, Ye = /* @__PURE__ */ y({
702
+ const Qe = /* @__PURE__ */ v(Xe, [["__scopeId", "data-v-ce0e1214"]]), Ye = { class: "joy-template__heading" }, xe = { class: "joy-template__heading___headings" }, et = /* @__PURE__ */ _({
707
703
  __name: "JoyTemplate",
708
704
  props: {
709
705
  full: { type: Boolean, default: !1 },
710
706
  sidebar: { type: String, default: "right" }
711
707
  },
712
708
  setup(e) {
713
- const a = e;
714
- return (t, l) => (s(), u("main", {
715
- class: d(["joy-template", { "joy-template--full": a.full }])
709
+ const l = e;
710
+ return (t, o) => (r(), c("main", {
711
+ class: u(["joy-template", { "joy-template--full": l.full }])
716
712
  }, [
717
- n("div", Xe, [
713
+ n("div", Ye, [
718
714
  n("div", {
719
- class: d({ "joy-template-slot-back": t.$slots["template-back"] })
715
+ class: u({ "joy-template-slot-back": t.$slots["template-back"] })
720
716
  }, [
721
- r(t.$slots, "template-back", {}, void 0, !0)
717
+ y(t.$slots, "template-back", {}, void 0, !0)
722
718
  ], 2),
723
- n("div", Qe, [
719
+ n("div", xe, [
724
720
  n("div", {
725
- class: d({ "joy-template-slot-title": t.$slots["template-title"] })
721
+ class: u({ "joy-template-slot-title": t.$slots["template-title"] })
726
722
  }, [
727
- r(t.$slots, "template-title", {}, void 0, !0)
723
+ y(t.$slots, "template-title", {}, void 0, !0)
728
724
  ], 2),
729
725
  n("div", {
730
- class: d({ "joy-template-slot-subtitle": t.$slots["template-subtitle"] })
726
+ class: u({ "joy-template-slot-subtitle": t.$slots["template-subtitle"] })
731
727
  }, [
732
- r(t.$slots, "template-subtitle", {}, void 0, !0)
728
+ y(t.$slots, "template-subtitle", {}, void 0, !0)
733
729
  ], 2)
734
730
  ])
735
731
  ]),
736
732
  n("div", {
737
- class: d([
733
+ class: u([
738
734
  "joy-template__content",
739
735
  {
740
- "joy-template__content--reverse": a.sidebar === "left"
736
+ "joy-template__content--reverse": l.sidebar === "left"
741
737
  }
742
738
  ])
743
739
  }, [
744
740
  n("div", {
745
- class: d({ "joy-template-slot-main": t.$slots["template-main"] })
741
+ class: u({ "joy-template-slot-main": t.$slots["template-main"] })
746
742
  }, [
747
- r(t.$slots, "template-main", {}, void 0, !0)
743
+ y(t.$slots, "template-main", {}, void 0, !0)
748
744
  ], 2),
749
745
  n("div", {
750
- class: d({ "joy-template-slot-sidebar": t.$slots["template-sidebar"] })
746
+ class: u({ "joy-template-slot-sidebar": t.$slots["template-sidebar"] })
751
747
  }, [
752
- r(t.$slots, "template-sidebar", {}, void 0, !0)
748
+ y(t.$slots, "template-sidebar", {}, void 0, !0)
753
749
  ], 2)
754
750
  ], 2)
755
751
  ], 2));
756
752
  }
757
753
  });
758
- const xe = /* @__PURE__ */ _(Ye, [["__scopeId", "data-v-d8b3fcfa"]]), et = ["name", "disabled", "checked", "required", "aria-checked", "value"], tt = { class: "joy-toggle__content" }, ot = /* @__PURE__ */ y({
754
+ const tt = /* @__PURE__ */ v(et, [["__scopeId", "data-v-2333416c"]]), at = ["aria-disabled"], ot = ["id", "disabled", "name", "required", "minlength", "value"], lt = {
755
+ key: 0,
756
+ class: "joy-textarea_helpers"
757
+ }, nt = {
758
+ key: 0,
759
+ name: "check",
760
+ color: "grey",
761
+ size: "xxsmall"
762
+ }, it = /* @__PURE__ */ _({
763
+ __name: "JoyTextarea",
764
+ props: {
765
+ ...L,
766
+ ...O,
767
+ ...N,
768
+ autogrow: {
769
+ type: Boolean,
770
+ default: !1
771
+ },
772
+ minlength: {
773
+ type: Number
774
+ },
775
+ minlengthLabel: String,
776
+ maxlength: {
777
+ type: Number
778
+ }
779
+ },
780
+ emits: ["update:modelValue"],
781
+ setup(e, { expose: l, emit: t }) {
782
+ const o = e, s = b(), m = b(), j = b(!1), a = I(() => o.maxlength ? o.modelValue.length > o.maxlength : !1), p = I(() => o.minlength ? o.modelValue.length < o.minlength : !1);
783
+ function S() {
784
+ s.value && o.autogrow && (s.value.style.height = "auto", s.value.style.height = s.value.scrollHeight + "px", m.value && (m.value.style.height = s.value.scrollHeight + "px"));
785
+ }
786
+ z(() => {
787
+ S();
788
+ });
789
+ const k = {
790
+ onInput: (i) => {
791
+ t("update:modelValue", i.target.value), S();
792
+ },
793
+ onBlur: () => {
794
+ j.value = a.value || p.value;
795
+ }
796
+ };
797
+ return l({
798
+ isInvalid: j,
799
+ valueOverMaxlength: a,
800
+ valueUnderMinlength: p
801
+ }), (i, f) => (r(), c("div", {
802
+ "aria-disabled": i.disabled,
803
+ class: u([
804
+ "joy-textarea",
805
+ {
806
+ "joy-textarea_invalid": j.value || i.invalid,
807
+ "joy-textarea_disabled": i.disabled,
808
+ "joy-textarea_autogrow": e.autogrow
809
+ }
810
+ ])
811
+ }, [
812
+ W(g(C), {
813
+ for: i.id,
814
+ required: i.required && i.requiredMark,
815
+ "optional-label": i.optionalLabel,
816
+ size: i.labelSize
817
+ }, {
818
+ default: q(() => [
819
+ y(i.$slots, "default", {}, () => [
820
+ V(J(i.label), 1)
821
+ ], !0)
822
+ ]),
823
+ _: 3
824
+ }, 8, ["for", "required", "optional-label", "size"]),
825
+ n("div", {
826
+ ref_key: "textareaWrapper",
827
+ ref: m,
828
+ class: "joy-textarea_wrapper"
829
+ }, [
830
+ n("textarea", E(i.$attrs, {
831
+ id: i.id,
832
+ ref_key: "textarea",
833
+ ref: s,
834
+ class: "joy-native-textarea",
835
+ disabled: i.disabled,
836
+ name: i.name,
837
+ required: i.required,
838
+ minlength: e.minlength,
839
+ value: i.modelValue,
840
+ onInput: f[0] || (f[0] = //@ts-ignore
841
+ (...d) => k.onInput && k.onInput(...d)),
842
+ onBlur: f[1] || (f[1] = //@ts-ignore
843
+ (...d) => k.onBlur && k.onBlur(...d))
844
+ }), null, 16, ot)
845
+ ], 512),
846
+ e.minlength || e.maxlength ? (r(), c("div", lt, [
847
+ e.minlength ? (r(), c("p", {
848
+ key: 0,
849
+ class: u(["joy-textarea-min", { "joy-textarea-min-invalid": i.invalid }])
850
+ }, [
851
+ g(p) ? h("", !0) : (r(), c("joy-icon", nt)),
852
+ V(" " + J(e.minlengthLabel || `Minimum ${e.minlength} characters`), 1)
853
+ ], 2)) : h("", !0),
854
+ e.maxlength ? (r(), c("p", {
855
+ key: 1,
856
+ class: u(["joy-textarea-count", { "joy-textarea-count-invalid": g(a) }])
857
+ }, J(i.modelValue.length + "/" + e.maxlength), 3)) : h("", !0)
858
+ ])) : h("", !0)
859
+ ], 10, at));
860
+ }
861
+ });
862
+ const st = /* @__PURE__ */ v(it, [["__scopeId", "data-v-c8303ed3"]]), rt = ["name", "disabled", "checked", "required", "aria-checked", "value"], dt = { class: "joy-toggle__content" }, ut = /* @__PURE__ */ _({
759
863
  __name: "JoyToggle",
760
- props: F,
864
+ props: {
865
+ ...F,
866
+ label: String
867
+ },
761
868
  emits: ["update:modelValue"],
762
- setup(e, { emit: a }) {
869
+ setup(e, { emit: l }) {
763
870
  const t = {
764
- onChange: (l) => {
765
- const i = l.target.checked;
766
- a("update:modelValue", i);
871
+ onChange: (o) => {
872
+ const s = o.target.checked;
873
+ l("update:modelValue", s);
767
874
  }
768
875
  };
769
- return (l, i) => (s(), u("div", null, [
876
+ return (o, s) => (r(), c("div", null, [
770
877
  n("label", {
771
- class: d([
878
+ class: u([
772
879
  "joy-toggle",
773
880
  {
774
- "joy-toggle__checked": l.modelValue,
775
- "joy-toggle__disabled": l.disabled
881
+ "joy-toggle__checked": o.modelValue,
882
+ "joy-toggle__disabled": o.disabled
776
883
  }
777
884
  ])
778
885
  }, [
@@ -781,59 +888,63 @@ const xe = /* @__PURE__ */ _(Ye, [["__scopeId", "data-v-d8b3fcfa"]]), et = ["nam
781
888
  type: "checkbox",
782
889
  class: "joy-toggle__input",
783
890
  role: "checkbox",
784
- name: l.name,
785
- disabled: l.disabled,
786
- checked: l.modelValue,
787
- required: l.required,
788
- "aria-checked": l.modelValue,
789
- value: l.value,
790
- onChange: i[0] || (i[0] = //@ts-ignore
791
- (...c) => t.onChange && t.onChange(...c))
792
- }, null, 40, et),
793
- n("p", tt, [
794
- r(l.$slots, "default", {}, void 0, !0)
891
+ name: o.name,
892
+ disabled: o.disabled,
893
+ checked: o.modelValue,
894
+ required: o.required,
895
+ "aria-checked": o.modelValue,
896
+ value: o.value,
897
+ onChange: s[0] || (s[0] = //@ts-ignore
898
+ (...m) => t.onChange && t.onChange(...m))
899
+ }, null, 40, rt),
900
+ n("p", dt, [
901
+ y(o.$slots, "default", {}, () => [
902
+ V(J(e.label), 1)
903
+ ], !0)
795
904
  ])
796
905
  ], 2)
797
906
  ]));
798
907
  }
799
908
  });
800
- const at = /* @__PURE__ */ _(ot, [["__scopeId", "data-v-e617de9c"]]), lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
909
+ const ct = /* @__PURE__ */ v(ut, [["__scopeId", "data-v-99d60249"]]), yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
801
910
  __proto__: null,
802
- JoyButton: ae,
803
- JoyCheckbox: de,
911
+ JoyButton: le,
912
+ JoyCheckbox: ue,
804
913
  JoyFormError: _e,
805
- JoyHighlight: be,
806
- JoyInput: Ve,
807
- JoyLabel: q,
808
- JoyLink: qe,
809
- JoyRadio: Ae,
810
- JoyRadioGroup: He,
811
- JoySelect: Ze,
812
- JoySpinner: P,
813
- JoyTemplate: xe,
814
- JoyToggle: at,
815
- JoyWrapper: Ke
816
- }, Symbol.toStringTag, { value: "Module" })), it = {
914
+ JoyHighlight: je,
915
+ JoyInput: qe,
916
+ JoyLabel: C,
917
+ JoyLink: ze,
918
+ JoyRadio: He,
919
+ JoyRadioGroup: De,
920
+ JoySelect: Ke,
921
+ JoySpinner: M,
922
+ JoyTemplate: tt,
923
+ JoyTextarea: st,
924
+ JoyToggle: ct,
925
+ JoyWrapper: Qe
926
+ }, Symbol.toStringTag, { value: "Module" })), mt = {
817
927
  install: (e) => {
818
- Object.entries(lt).forEach(([a, t]) => {
819
- e.component(a, t);
928
+ Object.entries(yt).forEach(([l, t]) => {
929
+ e.component(l, t);
820
930
  });
821
931
  }
822
932
  };
823
933
  export {
824
- ae as JoyButton,
825
- de as JoyCheckbox,
934
+ le as JoyButton,
935
+ ue as JoyCheckbox,
826
936
  _e as JoyFormError,
827
- be as JoyHighlight,
828
- Ve as JoyInput,
829
- q as JoyLabel,
830
- qe as JoyLink,
831
- Ae as JoyRadio,
832
- He as JoyRadioGroup,
833
- Ze as JoySelect,
834
- P as JoySpinner,
835
- xe as JoyTemplate,
836
- at as JoyToggle,
837
- it as JoyVuePlugin,
838
- Ke as JoyWrapper
937
+ je as JoyHighlight,
938
+ qe as JoyInput,
939
+ C as JoyLabel,
940
+ ze as JoyLink,
941
+ He as JoyRadio,
942
+ De as JoyRadioGroup,
943
+ Ke as JoySelect,
944
+ M as JoySpinner,
945
+ tt as JoyTemplate,
946
+ st as JoyTextarea,
947
+ ct as JoyToggle,
948
+ mt as JoyVuePlugin,
949
+ Qe as JoyWrapper
839
950
  };