@maltjoy/core-vue 1.0.0-alpha.2 → 1.0.0-alpha.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/dist/joy-vue.js CHANGED
@@ -1,29 +1,26 @@
1
- import { defineComponent as _, openBlock as a, createElementBlock as r, normalizeClass as y, useAttrs as $, computed as v, createBlock as I, resolveDynamicComponent as L, unref as l, withCtx as J, createCommentVNode as d, createElementVNode as g, renderSlot as S, mergeProps as x, toDisplayString as N, ref as m, useSlots as E, onBeforeMount as q } from "vue";
2
- const T = ["teal", "white"], A = /* @__PURE__ */ _({
1
+ import { defineComponent as m, openBlock as o, createElementBlock as n, normalizeClass as f, useAttrs as x, computed as w, createBlock as I, resolveDynamicComponent as L, unref as p, withCtx as B, createCommentVNode as u, createElementVNode as s, renderSlot as i, mergeProps as V, toDisplayString as C, ref as b, useSlots as q, onBeforeMount as T, onMounted as E, watch as R, createTextVNode as O, pushScopeId as A, popScopeId as M } from "vue";
2
+ const F = ["teal", "white"], P = /* @__PURE__ */ m({
3
3
  __name: "JoySpinner",
4
4
  props: {
5
5
  color: {
6
6
  type: String,
7
7
  validator(e) {
8
- return T.includes(e);
8
+ return F.includes(e);
9
9
  }
10
10
  }
11
11
  },
12
12
  setup(e) {
13
- return (n, t) => (a(), r("div", {
14
- class: y(["joy-spinner", `joy-spinner_${e.color}`])
13
+ return (a, t) => (o(), n("div", {
14
+ class: f(["joy-spinner", `joy-spinner_${e.color}`])
15
15
  }, null, 2));
16
16
  }
17
17
  });
18
- const b = (e, n) => {
18
+ const g = (e, a) => {
19
19
  const t = e.__vccOpts || e;
20
- for (const [p, s] of n)
21
- t[p] = s;
20
+ for (const [l, r] of a)
21
+ t[l] = r;
22
22
  return t;
23
- }, z = /* @__PURE__ */ b(A, [["__scopeId", "data-v-e97b61a5"]]), O = ["primary", "secondary"], F = ["xlarge", "large", "medium", "small", "xsmall", "xxsmall"], R = ["main", "admin", "white", "ghost"], W = [
24
- ...O,
25
- ...R
26
- ], P = [...F], Z = ["xxsmall", "xsmall", "small"], D = ["name", "size"], M = { class: "joy-button--slot" }, U = /* @__PURE__ */ _({
23
+ }, N = /* @__PURE__ */ g(P, [["__scopeId", "data-v-b633f633"]]), W = ["primary", "secondary"], G = ["xlarge", "large", "medium", "small", "xsmall", "xxsmall"], Z = ["main", "admin", "white", "ghost"], D = [...W, ...Z], U = [...G], H = ["xxsmall", "xsmall", "small"], K = ["name", "size"], Q = { class: "joy-button--slot" }, X = /* @__PURE__ */ m({
27
24
  __name: "JoyButton",
28
25
  props: {
29
26
  /**
@@ -46,7 +43,7 @@ const b = (e, n) => {
46
43
  type: String,
47
44
  default: "primary",
48
45
  validator(e) {
49
- return W.includes(e);
46
+ return D.includes(e);
50
47
  }
51
48
  },
52
49
  /** Button or Link size */
@@ -54,7 +51,7 @@ const b = (e, n) => {
54
51
  type: String,
55
52
  default: "medium",
56
53
  validator(e) {
57
- return P.includes(e);
54
+ return U.includes(e);
58
55
  }
59
56
  },
60
57
  /** Override the icon size. Default to xsmall */
@@ -62,59 +59,63 @@ const b = (e, n) => {
62
59
  type: String,
63
60
  default: "xsmall",
64
61
  validator(e) {
65
- return Z.includes(e);
62
+ return H.includes(e);
66
63
  }
67
64
  }
68
65
  },
69
66
  setup(e) {
70
- const n = e, t = $(), p = v(() => ["white", "ghost", "secondary"].includes(n.variant) ? "teal" : "white");
71
- return (s, f) => (a(), I(L(l(t).href ? "a" : "button"), {
72
- disabled: e.loading || l(t).disabled,
73
- class: y([
67
+ const a = e, t = x(), l = w(() => ["white", "ghost", "secondary"].includes(a.variant) ? "teal" : "white");
68
+ return (r, v) => (o(), I(L(p(t).href ? "a" : "button"), {
69
+ disabled: e.loading || p(t).disabled,
70
+ class: f([
74
71
  "joy-button",
75
72
  `joy-button_${e.variant}`,
76
73
  `joy-button_${e.size}`,
77
74
  {
78
- "joy-button_circle": n.circle,
79
- "joy-button_loading": n.loading
75
+ "joy-button_circle": e.circle,
76
+ "joy-button_loading": e.loading
80
77
  }
81
78
  ])
82
79
  }, {
83
- default: J(() => [
84
- e.icon ? (a(), r("joy-icon", {
80
+ default: B(() => [
81
+ e.icon ? (o(), n("joy-icon", {
85
82
  key: 0,
86
83
  name: e.icon,
87
84
  size: e.iconSize,
88
85
  lazy: !1
89
- }, null, 8, D)) : d("", !0),
90
- e.loading ? (a(), I(z, {
86
+ }, null, 8, K)) : u("", !0),
87
+ e.loading ? (o(), I(N, {
91
88
  key: 1,
92
- color: l(p)
93
- }, null, 8, ["color"])) : d("", !0),
94
- g("span", M, [
95
- S(s.$slots, "default", {}, void 0, !0)
89
+ color: p(l)
90
+ }, null, 8, ["color"])) : u("", !0),
91
+ s("span", Q, [
92
+ i(r.$slots, "default", {}, void 0, !0)
96
93
  ])
97
94
  ]),
98
95
  _: 3
99
96
  }, 8, ["disabled", "class"]));
100
97
  }
101
98
  });
102
- const G = /* @__PURE__ */ b(U, [["__scopeId", "data-v-107b2043"]]), H = ["small", "medium", "large"], K = {
99
+ const Y = /* @__PURE__ */ g(X, [["__scopeId", "data-v-08c3c0a6"]]), ee = ["small", "medium", "large"], te = {
103
100
  key: 0,
104
101
  class: "joy-label-required"
105
- }, Q = {
102
+ }, ae = {
106
103
  key: 1,
107
104
  class: "joy-label-optional"
108
- }, X = /* @__PURE__ */ _({
105
+ }, oe = /* @__PURE__ */ m({
109
106
  __name: "JoyLabel",
110
107
  props: {
111
108
  size: {
112
109
  type: String,
113
110
  default: "medium",
114
111
  validator(e) {
115
- return H.includes(e);
112
+ return ee.includes(e);
116
113
  }
117
114
  },
115
+ tagName: {
116
+ type: String,
117
+ default: "label"
118
+ },
118
119
  required: {
119
120
  type: Boolean,
120
121
  default: !1
@@ -124,17 +125,19 @@ const G = /* @__PURE__ */ b(U, [["__scopeId", "data-v-107b2043"]]), H = ["small"
124
125
  }
125
126
  },
126
127
  setup(e) {
127
- const n = e;
128
- return (t, p) => (a(), r("label", x({
128
+ return (a, t) => (o(), I(L(e.tagName), V({
129
129
  class: ["joy-label", `joy-label--${e.size}`]
130
- }, t.$attrs), [
131
- S(t.$slots, "default", {}, void 0, !0),
132
- n.required ? (a(), r("span", K, "*")) : d("", !0),
133
- n.optionalLabel ? (a(), r("span", Q, " - " + N(n.optionalLabel), 1)) : d("", !0)
134
- ], 16));
130
+ }, a.$attrs), {
131
+ default: B(() => [
132
+ i(a.$slots, "default", {}, void 0, !0),
133
+ e.required ? (o(), n("span", te, "*")) : u("", !0),
134
+ e.optionalLabel ? (o(), n("span", ae, "- " + C(e.optionalLabel), 1)) : u("", !0)
135
+ ]),
136
+ _: 3
137
+ }, 16, ["class"]));
135
138
  }
136
139
  });
137
- const h = /* @__PURE__ */ b(X, [["__scopeId", "data-v-21392cc3"]]), Y = ["id", "type", "value"], ee = ["data-unit"], te = /* @__PURE__ */ _({
140
+ const z = /* @__PURE__ */ g(oe, [["__scopeId", "data-v-e3232407"]]), le = ["id", "type", "value"], ne = ["data-unit"], ie = /* @__PURE__ */ m({
138
141
  __name: "JoyInput",
139
142
  props: {
140
143
  clearable: {
@@ -155,8 +158,7 @@ const h = /* @__PURE__ */ b(X, [["__scopeId", "data-v-21392cc3"]]), Y = ["id", "
155
158
  * For accessibility purpose, the name is required. it will be mapped to the input ID, and the label "for" attribute as well.
156
159
  */
157
160
  name: {
158
- type: String,
159
- required: !0
161
+ type: String
160
162
  },
161
163
  optionalLabel: String,
162
164
  required: {
@@ -175,106 +177,364 @@ const h = /* @__PURE__ */ b(X, [["__scopeId", "data-v-21392cc3"]]), Y = ["id", "
175
177
  unit: String
176
178
  },
177
179
  emits: ["update:modelValue"],
178
- setup(e, { emit: n }) {
179
- const t = e, p = m(), s = m(), f = $(), w = E(), j = m(!1), k = v(() => t.clearable && t.modelValue.length > 0 && !t.unit), V = v(() => w.default && w.default()), C = v(() => {
180
- var u, o;
181
- return !!((u = s.value) != null && u.closest("joy-wrapper")) || !!((o = s.value) != null && o.closest(".joy-wrapper"));
182
- }), B = m(t.type);
183
- q(() => {
184
- B.value = t.unit ? "number" : t.unit || "text";
180
+ setup(e, { emit: a }) {
181
+ const t = e, l = b(), r = b(), v = x(), $ = q(), d = b(!1), y = w(() => t.clearable && t.modelValue.length > 0 && !t.unit), S = w(() => $.default && $.default()), k = w(() => {
182
+ var j, c;
183
+ return !!((j = r.value) != null && j.closest("joy-wrapper")) || !!((c = r.value) != null && c.closest(".joy-wrapper"));
184
+ }), J = b(t.type);
185
+ T(() => {
186
+ J.value = t.unit ? "number" : t.unit || "text";
185
187
  });
186
- const i = {
188
+ const _ = {
187
189
  onFocus: () => {
188
- j.value = !0;
190
+ d.value = !0;
189
191
  },
190
192
  onBlur: () => {
191
- j.value = !1;
193
+ d.value = !1;
192
194
  },
193
- onInput: (u) => {
194
- let o = u.target.value;
195
- n("update:modelValue", o);
195
+ onInput: (j) => {
196
+ let c = j.target.value;
197
+ a("update:modelValue", c);
196
198
  },
197
199
  clearValue: () => {
198
- n("update:modelValue", "");
200
+ a("update:modelValue", "");
199
201
  }
200
202
  };
201
- return (u, o) => (a(), r("div", {
203
+ return (j, c) => (o(), n("div", {
202
204
  ref_key: "root",
203
- ref: s,
204
- class: y([`joy-input--${t.size}`])
205
+ ref: r,
206
+ class: f([`joy-input--${t.size}`])
205
207
  }, [
206
- g("div", {
207
- class: y([
208
+ s("div", {
209
+ class: f([
208
210
  "joy-input",
209
211
  {
210
- "joy-input--focusing": j.value,
211
- "joy-input--disabled": l(f).disabled,
212
- "joy-input--invalid": t.invalid,
213
- "joy-input--valid": !t.invalid && !l(f).disabled
212
+ "joy-input--focusing": d.value,
213
+ "joy-input--disabled": p(v).disabled,
214
+ "joy-input--invalid": e.invalid,
215
+ "joy-input--valid": !e.invalid && !p(v).disabled
214
216
  }
215
217
  ])
216
218
  }, [
217
- l(V) ? (a(), I(h, {
219
+ p(S) ? (o(), I(z, {
218
220
  key: 0,
219
- for: t.name,
220
- required: t.required && t.requiredMark,
221
+ for: e.name,
222
+ required: e.required && e.requiredMark,
221
223
  "optional-label": e.optionalLabel,
222
224
  size: e.labelSize
223
225
  }, {
224
- default: J(() => [
225
- S(u.$slots, "default", {}, void 0, !0)
226
+ default: B(() => [
227
+ i(j.$slots, "default", {}, void 0, !0)
226
228
  ]),
227
229
  _: 3
228
- }, 8, ["for", "required", "optional-label", "size"])) : d("", !0),
229
- g("div", {
230
- class: y([
230
+ }, 8, ["for", "required", "optional-label", "size"])) : u("", !0),
231
+ s("div", {
232
+ class: f([
231
233
  "joy-input--wrapper",
232
234
  {
233
- "joy-input--wrapper-has-icon": !!t.icon,
234
- "joy-input--wrapper---clearable": t.clearable,
235
- "joy-input--wrapper-unit": !!t.unit,
236
- "joy-input--wrapper-margin": !l(C)
235
+ "joy-input--wrapper-has-icon": !!e.icon,
236
+ "joy-input--wrapper---clearable": e.clearable,
237
+ "joy-input--wrapper-unit": !!e.unit,
238
+ "joy-input--wrapper-margin": !p(k)
237
239
  }
238
240
  ])
239
241
  }, [
240
- g("input", x(u.$attrs, {
242
+ s("input", V(j.$attrs, {
241
243
  id: t.name,
242
244
  ref_key: "input",
243
- ref: p,
245
+ ref: l,
244
246
  class: [
245
247
  {
246
- "joy-input--field-disabled": l(f).disabled,
247
- "joy-input--field-invalid": t.invalid
248
+ "joy-input--field-disabled": p(v).disabled,
249
+ "joy-input--field-invalid": e.invalid
248
250
  }
249
251
  ],
250
- type: B.value,
252
+ type: J.value,
251
253
  value: e.modelValue,
252
- onFocus: o[0] || (o[0] = //@ts-ignore
253
- (...c) => i.onFocus && i.onFocus(...c)),
254
- onBlur: o[1] || (o[1] = //@ts-ignore
255
- (...c) => i.onBlur && i.onBlur(...c)),
256
- onInput: o[2] || (o[2] = //@ts-ignore
257
- (...c) => i.onInput && i.onInput(...c))
258
- }), null, 16, Y),
259
- l(k) ? (a(), r("joy-icon", {
254
+ onFocus: c[0] || (c[0] = //@ts-ignore
255
+ (...h) => _.onFocus && _.onFocus(...h)),
256
+ onBlur: c[1] || (c[1] = //@ts-ignore
257
+ (...h) => _.onBlur && _.onBlur(...h)),
258
+ onInput: c[2] || (c[2] = //@ts-ignore
259
+ (...h) => _.onInput && _.onInput(...h))
260
+ }), null, 16, le),
261
+ p(y) ? (o(), n("joy-icon", {
260
262
  key: 0,
261
263
  size: "xxsmall",
262
264
  name: "cross",
263
265
  class: "joy-input--clear",
264
- onClick: o[3] || (o[3] = //@ts-ignore
265
- (...c) => i.clearValue && i.clearValue(...c))
266
- })) : d("", !0),
267
- t.unit ? (a(), r("div", {
266
+ onClick: c[3] || (c[3] = //@ts-ignore
267
+ (...h) => _.clearValue && _.clearValue(...h))
268
+ })) : u("", !0),
269
+ e.unit ? (o(), n("div", {
268
270
  key: 1,
269
- "data-unit": t.unit,
271
+ "data-unit": e.unit,
270
272
  class: "joy-input--unit"
271
- }, null, 8, ee)) : d("", !0)
273
+ }, null, 8, ne)) : u("", !0)
272
274
  ], 2)
273
275
  ], 2)
274
276
  ], 2));
275
277
  }
276
278
  });
277
- const ne = /* @__PURE__ */ b(te, [["__scopeId", "data-v-2249f4f9"]]), oe = /* @__PURE__ */ _({
279
+ const se = /* @__PURE__ */ g(ie, [["__scopeId", "data-v-da36bd3d"]]), re = ["teal", "white"], de = ["href"], ue = ["color", "name"], ce = /* @__PURE__ */ m({
280
+ __name: "JoyLink",
281
+ props: {
282
+ href: {
283
+ type: String,
284
+ required: !0
285
+ },
286
+ color: {
287
+ type: String,
288
+ default: "teal",
289
+ validator(e) {
290
+ return re.includes(e);
291
+ }
292
+ },
293
+ icon: String
294
+ },
295
+ setup(e) {
296
+ const a = e, t = w(() => a.color === "white" ? "white" : "teal");
297
+ return (l, r) => (o(), n("a", V({ href: e.href }, l.$attrs, {
298
+ class: ["joy-link", `joy-link_${e.color}`]
299
+ }), [
300
+ e.icon ? (o(), n("joy-icon", {
301
+ key: 0,
302
+ color: p(t),
303
+ name: e.icon
304
+ }, null, 8, ue)) : u("", !0),
305
+ i(l.$slots, "default", {}, void 0, !0)
306
+ ], 16, de));
307
+ }
308
+ });
309
+ const ye = /* @__PURE__ */ g(ce, [["__scopeId", "data-v-640ee9a6"]]), pe = ["id", "value", "checked", "disabled", "required", "name"], fe = { class: "joy-radio-label" }, me = { class: "joy-radio-content__wrapper" }, ve = { class: "joy-radio-content" }, _e = /* @__PURE__ */ m({
310
+ __name: "JoyRadio",
311
+ props: {
312
+ disabled: Boolean,
313
+ invalid: Boolean,
314
+ modelValue: {
315
+ type: String
316
+ },
317
+ name: {
318
+ type: String
319
+ },
320
+ required: Boolean,
321
+ theme: {
322
+ type: String,
323
+ default: "default"
324
+ },
325
+ value: {
326
+ type: String
327
+ }
328
+ },
329
+ emits: ["update:modelValue"],
330
+ setup(e, { expose: a, emit: t }) {
331
+ const l = e, r = b(!1), v = b(null), $ = b(null), d = q(), y = w(() => !l.modelValue || !l.value ? !1 : l.modelValue === l.value);
332
+ function S() {
333
+ r.value = !!d["expandable-content"] && y.value;
334
+ }
335
+ function k() {
336
+ t("update:modelValue", l.value), S();
337
+ }
338
+ return E(() => {
339
+ l.theme === "outline" && S();
340
+ }), R(
341
+ () => l.modelValue,
342
+ () => {
343
+ S();
344
+ }
345
+ ), a({
346
+ checked: y,
347
+ isExpanded: r
348
+ }), (J, _) => (o(), n("label", {
349
+ ref_key: "root",
350
+ ref: v,
351
+ class: f([
352
+ "joy-radio",
353
+ `joy-radio--${e.theme}`,
354
+ {
355
+ "joy-radio--checked": p(y),
356
+ "joy-radio--disabled": e.disabled,
357
+ "joy-radio--invalid": e.invalid
358
+ }
359
+ ])
360
+ }, [
361
+ s("input", {
362
+ id: e.name,
363
+ type: "radio",
364
+ value: e.value,
365
+ checked: p(y),
366
+ disabled: e.disabled,
367
+ required: e.required,
368
+ name: e.name,
369
+ onChange: k
370
+ }, null, 40, pe),
371
+ s("span", fe, [
372
+ i(J.$slots, "default", {}, void 0, !0)
373
+ ]),
374
+ s("div", me, [
375
+ s("div", ve, [
376
+ i(J.$slots, "radio-content", {}, void 0, !0)
377
+ ]),
378
+ s("div", {
379
+ ref_key: "expandableElement",
380
+ ref: $,
381
+ class: f(["joy-radio-expandable", { "joy-radio-expandable--expanded": r.value }])
382
+ }, [
383
+ i(J.$slots, "expandable-content", {}, void 0, !0)
384
+ ], 2)
385
+ ])
386
+ ], 2));
387
+ }
388
+ });
389
+ const be = /* @__PURE__ */ g(_e, [["__scopeId", "data-v-27ec5b79"]]), ge = ["form", "name"], Se = /* @__PURE__ */ m({
390
+ __name: "JoyRadioGroup",
391
+ props: {
392
+ direction: {
393
+ type: String,
394
+ default: "horizontal"
395
+ },
396
+ form: {
397
+ type: String
398
+ },
399
+ modelValue: {
400
+ type: String
401
+ },
402
+ name: {
403
+ type: String
404
+ },
405
+ invalid: Boolean,
406
+ invalidText: {
407
+ type: String
408
+ }
409
+ },
410
+ setup(e) {
411
+ return (a, t) => (o(), n("fieldset", {
412
+ ref: "root",
413
+ class: "joy-radio-group-fieldset",
414
+ role: "radiogroup",
415
+ form: e.form,
416
+ name: e.name
417
+ }, [
418
+ i(a.$slots, "radio-group-legend", {}, void 0, !0),
419
+ s("div", {
420
+ class: f(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
421
+ }, [
422
+ i(a.$slots, "default", {}, void 0, !0)
423
+ ], 2)
424
+ ], 8, ge));
425
+ }
426
+ });
427
+ const je = /* @__PURE__ */ g(Se, [["__scopeId", "data-v-09adf076"]]), he = (e) => (A("data-v-1ef94fc2"), e = e(), M(), e), $e = ["id", "name", "aria-invalid", "required", "disabled", "value"], ke = /* @__PURE__ */ he(() => /* @__PURE__ */ s("joy-icon", {
428
+ class: "joy-select__chevron",
429
+ name: "chevron-down"
430
+ }, null, -1)), Je = /* @__PURE__ */ m({
431
+ __name: "JoySelect",
432
+ props: {
433
+ disabled: {
434
+ type: Boolean,
435
+ default: !1
436
+ },
437
+ invalid: {
438
+ type: Boolean,
439
+ default: !1
440
+ },
441
+ id: {
442
+ type: String
443
+ },
444
+ label: {
445
+ type: String
446
+ },
447
+ labelSize: {
448
+ type: String,
449
+ default: "medium"
450
+ },
451
+ modelValue: {
452
+ type: String,
453
+ default: ""
454
+ },
455
+ name: {
456
+ type: String,
457
+ default: "select"
458
+ },
459
+ optionalLabel: {
460
+ type: String
461
+ },
462
+ required: {
463
+ type: Boolean,
464
+ default: !1
465
+ },
466
+ requiredMark: {
467
+ type: Boolean,
468
+ default: !1
469
+ }
470
+ },
471
+ emits: ["update:modelValue"],
472
+ setup(e, { emit: a }) {
473
+ const t = e, l = b(), r = b(), v = q();
474
+ E(() => {
475
+ var S;
476
+ const d = v.label && v.label();
477
+ if (!d || !d.length)
478
+ return;
479
+ const y = d[0];
480
+ if (y.type === "JoyLabel") {
481
+ const k = (S = y.props) == null ? void 0 : S.for;
482
+ if (!k) {
483
+ console.warn("JoyLabel for attribute is missing");
484
+ return;
485
+ }
486
+ k !== t.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
487
+ }
488
+ });
489
+ function $(d) {
490
+ const y = d.target.value;
491
+ a("update:modelValue", y);
492
+ }
493
+ return (d, y) => (o(), n("div", {
494
+ ref_key: "root",
495
+ ref: l
496
+ }, [
497
+ i(d.$slots, "label", {}, () => [
498
+ e.label ? (o(), I(z, {
499
+ key: 0,
500
+ required: e.required && e.requiredMark,
501
+ "optional-label": e.optionalLabel,
502
+ for: e.id || e.name,
503
+ size: e.labelSize
504
+ }, {
505
+ default: B(() => [
506
+ O(C(e.label), 1)
507
+ ]),
508
+ _: 1
509
+ }, 8, ["required", "optional-label", "for", "size"])) : u("", !0)
510
+ ], !0),
511
+ s("div", {
512
+ class: f({
513
+ "joy-select__wrapper": !0,
514
+ "joy-select--invalid": e.invalid,
515
+ "joy-select--disabled": e.disabled
516
+ })
517
+ }, [
518
+ s("select", {
519
+ id: e.id || e.name,
520
+ ref_key: "select",
521
+ ref: r,
522
+ class: "joy-select",
523
+ name: e.name,
524
+ "aria-invalid": e.invalid,
525
+ required: e.required,
526
+ disabled: e.disabled,
527
+ value: e.modelValue,
528
+ onInput: $
529
+ }, [
530
+ i(d.$slots, "default", {}, void 0, !0)
531
+ ], 40, $e),
532
+ ke
533
+ ], 2)
534
+ ], 512));
535
+ }
536
+ });
537
+ const we = /* @__PURE__ */ g(Je, [["__scopeId", "data-v-1ef94fc2"]]), Ie = /* @__PURE__ */ m({
278
538
  __name: "JoyWrapper",
279
539
  props: {
280
540
  justify: {
@@ -295,29 +555,99 @@ const ne = /* @__PURE__ */ b(te, [["__scopeId", "data-v-2249f4f9"]]), oe = /* @_
295
555
  }
296
556
  },
297
557
  setup(e) {
298
- return (n, t) => (a(), r("div", {
299
- class: y([
300
- "joy-wrapper",
301
- `joy-wrapper--justify-${e.justify}`,
302
- `joy-wrapper--align-${e.align}`,
303
- `joy-wrapper--direction-${e.direction}`,
304
- `joy-wrapper--wrap-${e.wrap}`
305
- ])
558
+ return (a, t) => (o(), n("div", {
559
+ class: f(["joy-wrapper", `joy-wrapper--justify-${e.justify}`, `joy-wrapper--align-${e.align}`, `joy-wrapper--direction-${e.direction}`, `joy-wrapper--wrap-${e.wrap}`])
306
560
  }, [
307
- S(n.$slots, "default")
561
+ i(a.$slots, "default")
308
562
  ], 2));
309
563
  }
310
564
  });
311
- const le = {
565
+ const Be = { class: "joy-template__heading" }, Ve = {
566
+ key: 0,
567
+ class: "joy-template-slot-back"
568
+ }, qe = { class: "joy-template__heading___headings" }, ze = {
569
+ key: 0,
570
+ class: "joy-template-slot-title"
571
+ }, xe = {
572
+ key: 1,
573
+ class: "joy-template-slot-subtitle"
574
+ }, Le = {
575
+ key: 0,
576
+ class: "joy-template-slot-main"
577
+ }, Ce = {
578
+ key: 1,
579
+ class: "joy-template-slot-sidebar"
580
+ }, Ee = /* @__PURE__ */ m({
581
+ __name: "JoyTemplate",
582
+ props: {
583
+ full: { type: Boolean, default: !1 },
584
+ sidebar: { type: String, default: "right" }
585
+ },
586
+ setup(e) {
587
+ const a = e;
588
+ return (t, l) => (o(), n("main", {
589
+ class: f(["joy-template", { "joy-template--full": a.full }])
590
+ }, [
591
+ s("div", Be, [
592
+ t.$slots["template-back"] ? (o(), n("div", Ve, [
593
+ i(t.$slots, "template-back", {}, void 0, !0)
594
+ ])) : u("", !0),
595
+ s("div", qe, [
596
+ t.$slots["template-title"] ? (o(), n("div", ze, [
597
+ i(t.$slots, "template-title", {}, void 0, !0)
598
+ ])) : u("", !0),
599
+ t.$slots["template-subtitle"] ? (o(), n("div", xe, [
600
+ i(t.$slots, "template-subtitle", {}, void 0, !0)
601
+ ])) : u("", !0)
602
+ ])
603
+ ]),
604
+ s("div", {
605
+ class: f([
606
+ "joy-template__content",
607
+ {
608
+ "joy-template__content--reverse": a.sidebar === "left"
609
+ }
610
+ ])
611
+ }, [
612
+ t.$slots["template-main"] ? (o(), n("div", Le, [
613
+ i(t.$slots, "template-main", {}, void 0, !0)
614
+ ])) : u("", !0),
615
+ t.$slots["template-sidebar"] ? (o(), n("div", Ce, [
616
+ i(t.$slots, "template-sidebar", {}, void 0, !0)
617
+ ])) : u("", !0)
618
+ ], 2)
619
+ ], 2));
620
+ }
621
+ });
622
+ const Ne = /* @__PURE__ */ g(Ee, [["__scopeId", "data-v-f0293852"]]), Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
623
+ __proto__: null,
624
+ JoyButton: Y,
625
+ JoyInput: se,
626
+ JoyLabel: z,
627
+ JoyLink: ye,
628
+ JoyRadio: be,
629
+ JoyRadioGroup: je,
630
+ JoySelect: we,
631
+ JoySpinner: N,
632
+ JoyTemplate: Ne,
633
+ JoyWrapper: Ie
634
+ }, Symbol.toStringTag, { value: "Module" })), Oe = {
312
635
  install: (e) => {
313
- e.component("JoyButton", G), e.component("JoyInput", ne), e.component("JoyLabel", h), e.component("JoySpinner", z), e.component("JoyWrapper", oe);
636
+ Object.entries(Te).forEach(([a, t]) => {
637
+ e.component(a, t);
638
+ });
314
639
  }
315
640
  };
316
641
  export {
317
- G as JoyButton,
318
- ne as JoyInput,
319
- h as JoyLabel,
320
- z as JoySpinner,
321
- le as JoyVuePlugin,
322
- oe as JoyWrapper
642
+ Y as JoyButton,
643
+ se as JoyInput,
644
+ z as JoyLabel,
645
+ ye as JoyLink,
646
+ be as JoyRadio,
647
+ je as JoyRadioGroup,
648
+ we as JoySelect,
649
+ N as JoySpinner,
650
+ Ne as JoyTemplate,
651
+ Oe as JoyVuePlugin,
652
+ Ie as JoyWrapper
323
653
  };