@maltjoy/core-vue 1.0.0-alpha.6 → 1.0.0-alpha.7

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.
Files changed (36) hide show
  1. package/dist/components/JoyButton/JoyButton.vue.d.ts +3 -3
  2. package/dist/components/JoyCheckbox/JoyCheckbox.vue.d.ts +15 -14
  3. package/dist/components/JoyCounter/JoyCounter.vue.d.ts +36 -7
  4. package/dist/components/JoyFormError/JoyFormError.vue.d.ts +4 -0
  5. package/dist/components/JoyHighlight/JoyHighlight.types.d.ts +1 -1
  6. package/dist/components/JoyHighlight/JoyHighlight.vue.d.ts +3 -3
  7. package/dist/components/JoyInput/JoyInput.vue.d.ts +20 -4
  8. package/dist/components/JoyMultiCheckbox/JoyMultiCheckbox.vue.d.ts +84 -0
  9. package/dist/components/JoyRadio/JoyRadio.vue.d.ts +1 -1
  10. package/dist/components/JoySelect/JoySelect.vue.d.ts +2 -2
  11. package/dist/components/JoySelectableItem/JoySelectableItem.types.d.ts +2 -0
  12. package/dist/components/JoySelectableItem/JoySelectableItem.vue.d.ts +80 -0
  13. package/dist/components/JoySelectableItemGroup/JoySelectableItemGroup.vue.d.ts +93 -0
  14. package/dist/components/JoyTextarea/JoyTextarea.vue.d.ts +2 -2
  15. package/dist/components/JoyToggle/JoyToggle.vue.d.ts +2 -2
  16. package/dist/components/JoyWrapper/JoyWrapper.vue.d.ts +9 -9
  17. package/dist/components/index.d.ts +4 -1
  18. package/dist/joy-vue.js +722 -413
  19. package/dist/joy-vue.umd.cjs +1 -1
  20. package/dist/stories/fixtures/index.d.ts +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/tests/composables/test-components/CheckboxFormProps.vue.d.ts +2 -2
  23. package/dist/tests/composables/test-components/GenericFormProps.vue.d.ts +1 -1
  24. package/dist/tests/composables/test-components/GenericFormPropsWithLabel.vue.d.ts +1 -1
  25. package/joy-components.d.ts +4 -1
  26. package/package.json +5 -3
  27. package/dist/components/JoyButton/tests/JoyButton.spec.d.ts +0 -1
  28. package/dist/components/JoyCheckbox/tests/JoyCheckbox.spec.d.ts +0 -1
  29. package/dist/components/JoyFormError/tests/JoyFormError.spec.d.ts +0 -1
  30. package/dist/components/JoyHighlight/tests/JoyHighlight.spec.d.ts +0 -1
  31. package/dist/components/JoyLabel/tests/JoyLabel.spec.d.ts +0 -1
  32. package/dist/components/JoyRadio/tests/JoyRadio.spec.d.ts +0 -1
  33. package/dist/components/JoySelect/tests/JoySelect.spec.d.ts +0 -1
  34. package/dist/components/JoyToggle/tests/JoyToggle.spec.d.ts +0 -1
  35. package/dist/tests/composables/prop.spec.d.ts +0 -1
  36. package/dist/tests/helpers.spec.d.ts +0 -1
package/dist/joy-vue.js CHANGED
@@ -1,26 +1,26 @@
1
- import { defineComponent as h, openBlock as i, createElementBlock as u, normalizeClass as y, useAttrs as N, computed as I, createBlock as J, resolveDynamicComponent as M, unref as g, withCtx as q, createCommentVNode as b, createElementVNode as n, renderSlot as s, ref as S, createTextVNode as B, toDisplayString as V, mergeProps as w, createVNode as R, pushScopeId as L, popScopeId as z, useSlots as E, onBeforeMount as A, onMounted as T, watch as G } from "vue";
2
- const D = ["teal", "white"], P = /* @__PURE__ */ h({
1
+ import { defineComponent as S, openBlock as i, createElementBlock as r, normalizeClass as v, useAttrs as O, computed as J, createBlock as V, resolveDynamicComponent as z, unref as b, withCtx as q, createCommentVNode as f, createElementVNode as d, renderSlot as m, ref as _, createTextVNode as B, toDisplayString as $, mergeProps as w, createVNode as R, pushScopeId as M, popScopeId as T, useSlots as L, onBeforeMount as P, Fragment as F, renderList as A, onMounted as E, watch as D, createSlots as K } from "vue";
2
+ const Z = ["teal", "white"], Q = /* @__PURE__ */ S({
3
3
  __name: "JoySpinner",
4
4
  props: {
5
5
  color: {
6
6
  type: String,
7
7
  validator(e) {
8
- return D.includes(e);
8
+ return Z.includes(e);
9
9
  }
10
10
  }
11
11
  },
12
12
  setup(e) {
13
- return (l, t) => (i(), u("div", {
14
- class: y(["joy-spinner", `joy-spinner_${e.color}`])
13
+ return (n, a) => (i(), r("div", {
14
+ class: v(["joy-spinner", `joy-spinner_${e.color}`])
15
15
  }, null, 2));
16
16
  }
17
17
  });
18
- const p = (e, l) => {
19
- const t = e.__vccOpts || e;
20
- for (const [a, o] of l)
21
- t[a] = o;
22
- return t;
23
- }, F = /* @__PURE__ */ p(P, [["__scopeId", "data-v-b633f633"]]), W = ["primary", "secondary"], U = ["neutral", "success", "info", "warning", "error"], Z = ["main", "admin", "ghost"], K = [...W, ...Z], Q = ["large", "medium", "small", "xsmall", "xxsmall"], X = ["xxsmall", "xsmall", "small"], Y = ["name", "size"], ee = { class: "joy-button--slot" }, te = /* @__PURE__ */ h({
18
+ const j = (e, n) => {
19
+ const a = e.__vccOpts || e;
20
+ for (const [t, o] of n)
21
+ a[t] = o;
22
+ return a;
23
+ }, H = /* @__PURE__ */ j(Q, [["__scopeId", "data-v-b633f633"]]), X = ["primary", "secondary"], Y = ["neutral", "success", "info", "warning", "error"], ee = ["main", "admin", "ghost"], te = [...X, ...ee], ae = ["large", "medium", "small", "xsmall", "xxsmall"], le = ["xxsmall", "xsmall", "small"], ne = ["name", "size"], ie = { class: "joy-button--slot" }, oe = /* @__PURE__ */ S({
24
24
  __name: "JoyButton",
25
25
  props: {
26
26
  /**
@@ -43,7 +43,7 @@ const p = (e, l) => {
43
43
  type: String,
44
44
  default: "primary",
45
45
  validator(e) {
46
- return K.includes(e);
46
+ return te.includes(e);
47
47
  }
48
48
  },
49
49
  /** Button or Link size */
@@ -51,7 +51,7 @@ const p = (e, l) => {
51
51
  type: String,
52
52
  default: "medium",
53
53
  validator(e) {
54
- return Q.includes(e);
54
+ return ae.includes(e);
55
55
  }
56
56
  },
57
57
  /** Override the icon size. Default to xsmall */
@@ -59,15 +59,15 @@ const p = (e, l) => {
59
59
  type: String,
60
60
  default: "xsmall",
61
61
  validator(e) {
62
- return X.includes(e);
62
+ return le.includes(e);
63
63
  }
64
64
  }
65
65
  },
66
66
  setup(e) {
67
- const l = e, t = N(), a = I(() => ["white", "ghost", "secondary"].includes(l.variant) ? "teal" : "white");
68
- return (o, m) => (i(), J(M(g(t).href ? "a" : "button"), {
69
- disabled: e.loading || g(t).disabled,
70
- class: y([
67
+ const n = e, a = O(), t = J(() => ["white", "ghost", "secondary"].includes(n.variant) ? "teal" : "white");
68
+ return (o, s) => (i(), V(z(b(a).href ? "a" : "button"), {
69
+ disabled: e.loading || b(a).disabled,
70
+ class: v([
71
71
  "joy-button",
72
72
  `joy-button_${e.variant}`,
73
73
  `joy-button_${e.size}`,
@@ -78,25 +78,25 @@ const p = (e, l) => {
78
78
  ])
79
79
  }, {
80
80
  default: q(() => [
81
- e.icon ? (i(), u("joy-icon", {
81
+ e.icon ? (i(), r("joy-icon", {
82
82
  key: 0,
83
83
  name: e.icon,
84
84
  size: e.iconSize,
85
85
  lazy: !1
86
- }, null, 8, Y)) : b("", !0),
87
- e.loading ? (i(), J(F, {
86
+ }, null, 8, ne)) : f("", !0),
87
+ e.loading ? (i(), V(H, {
88
88
  key: 1,
89
- color: g(a)
90
- }, null, 8, ["color"])) : b("", !0),
91
- n("span", ee, [
92
- s(o.$slots, "default", {}, void 0, !0)
89
+ color: b(t)
90
+ }, null, 8, ["color"])) : f("", !0),
91
+ d("span", ie, [
92
+ m(o.$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__ */ p(te, [["__scopeId", "data-v-958cc680"]]), le = ["aria-checked", "aria-hidden"], ne = ["name", "disabled", "checked", "required", "aria-checked", "value", "indeterminate"], oe = { class: "joy-checkbox__content-wrapper" }, ie = { class: "joy-checkbox__content" }, de = /* @__PURE__ */ h({
99
+ const de = /* @__PURE__ */ j(oe, [["__scopeId", "data-v-958cc680"]]), ue = ["aria-checked", "aria-hidden"], re = ["id", "name", "disabled", "checked", "required", "aria-checked", "value", "indeterminate"], se = { class: "joy-checkbox__content-wrapper" }, ce = { class: "joy-checkbox__content" }, ye = /* @__PURE__ */ S({
100
100
  __name: "JoyCheckbox",
101
101
  props: {
102
102
  /** 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 */
@@ -104,17 +104,21 @@ const ae = /* @__PURE__ */ p(te, [["__scopeId", "data-v-958cc680"]]), le = ["ari
104
104
  type: Boolean,
105
105
  default: !1
106
106
  },
107
+ /** Use it to replace the default slot */
107
108
  label: {
108
109
  type: String
109
110
  },
110
- modelValue: {
111
+ /** Checked state of the component */
112
+ checked: {
111
113
  type: Boolean,
112
114
  default: !1
113
115
  },
116
+ /** The value is used in multiselection context in order to build array of values. */
114
117
  value: {
115
118
  type: String,
116
119
  default: "on"
117
120
  },
121
+ /** Removes any interactivity if disabled */
118
122
  disabled: {
119
123
  type: Boolean,
120
124
  default: !1
@@ -122,10 +126,6 @@ const ae = /* @__PURE__ */ p(te, [["__scopeId", "data-v-958cc680"]]), le = ["ari
122
126
  id: {
123
127
  type: String
124
128
  },
125
- invalid: {
126
- type: Boolean,
127
- default: !1
128
- },
129
129
  name: {
130
130
  type: String
131
131
  },
@@ -133,32 +133,32 @@ const ae = /* @__PURE__ */ p(te, [["__scopeId", "data-v-958cc680"]]), le = ["ari
133
133
  type: Boolean,
134
134
  default: !1
135
135
  }
136
- // ...CHECKBOX_BASED_PROPS,
137
136
  },
138
- emits: ["update:modelValue"],
139
- setup(e, { expose: l, emit: t }) {
140
- const a = e, o = S(), m = S(a.indeterminate), _ = {
141
- onChange: (r) => {
142
- const c = r.target.checked;
143
- m.value = !1, t("update:modelValue", c);
137
+ emits: ["update:checked"],
138
+ setup(e, { expose: n, emit: a }) {
139
+ const t = e, o = _(), s = _(t.indeterminate), c = {
140
+ onChange: (l) => {
141
+ const u = l.target.checked;
142
+ s.value = !1, a("update:checked", u);
144
143
  }
145
144
  };
146
- return l({
147
- isIndeterminate: m
148
- }), (r, c) => (i(), u("div", {
149
- "aria-checked": e.modelValue,
145
+ return n({
146
+ isIndeterminate: s
147
+ }), (l, u) => (i(), r("div", {
148
+ "aria-checked": e.checked,
150
149
  "aria-hidden": e.disabled
151
150
  }, [
152
- n("label", {
153
- class: y([
151
+ d("label", {
152
+ class: v([
154
153
  "joy-checkbox",
155
154
  {
156
- "joy-checkbox__checked": e.modelValue,
157
- "joy-checkbox__indeterminate": m.value
155
+ "joy-checkbox__checked": e.checked,
156
+ "joy-checkbox__indeterminate": s.value
158
157
  }
159
158
  ])
160
159
  }, [
161
- n("input", {
160
+ d("input", {
161
+ id: e.id,
162
162
  ref_key: "input",
163
163
  ref: o,
164
164
  type: "checkbox",
@@ -166,45 +166,45 @@ const ae = /* @__PURE__ */ p(te, [["__scopeId", "data-v-958cc680"]]), le = ["ari
166
166
  role: "checkbox",
167
167
  name: e.name,
168
168
  disabled: e.disabled,
169
- checked: e.modelValue,
169
+ checked: e.checked,
170
170
  required: e.required,
171
- "aria-checked": e.modelValue,
171
+ "aria-checked": e.checked,
172
172
  value: e.value,
173
- indeterminate: m.value,
174
- onChange: c[0] || (c[0] = //@ts-ignore
175
- (...j) => _.onChange && _.onChange(...j))
176
- }, null, 40, ne),
177
- n("div", oe, [
178
- s(r.$slots, "default", {}, () => [
179
- B(V(e.label), 1)
173
+ indeterminate: s.value,
174
+ onChange: u[0] || (u[0] = //@ts-ignore
175
+ (...g) => c.onChange && c.onChange(...g))
176
+ }, null, 40, re),
177
+ d("div", se, [
178
+ m(l.$slots, "default", {}, () => [
179
+ B($(e.label), 1)
180
180
  ], !0),
181
- n("div", ie, [
182
- s(r.$slots, "checkbox-content", {}, void 0, !0)
181
+ d("div", ce, [
182
+ m(l.$slots, "checkbox-content", {}, void 0, !0)
183
183
  ])
184
184
  ])
185
185
  ], 2)
186
- ], 8, le));
186
+ ], 8, ue));
187
187
  }
188
188
  });
189
- const re = /* @__PURE__ */ p(de, [["__scopeId", "data-v-cd187cef"]]), H = (e) => (L("data-v-366cb712"), e = e(), z(), e), ue = { class: "joy-counter" }, se = { class: "joy-counter__wrapper" }, ce = ["aria-label", "disabled"], ye = /* @__PURE__ */ H(() => /* @__PURE__ */ n("joy-icon", {
189
+ const N = /* @__PURE__ */ j(ye, [["__scopeId", "data-v-7251a11b"]]), G = (e) => (M("data-v-47a76942"), e = e(), T(), e), me = { class: "joy-counter" }, fe = { class: "joy-counter__wrapper" }, be = ["aria-label", "disabled"], ve = /* @__PURE__ */ G(() => /* @__PURE__ */ d("joy-icon", {
190
190
  name: "minus",
191
191
  color: "teal",
192
192
  lazy: !1
193
- }, null, -1)), me = [
194
- ye
195
- ], fe = ["id", "min", "max", "aria-invalid", "name", "required", "value"], ve = ["aria-label", "disabled"], ge = /* @__PURE__ */ H(() => /* @__PURE__ */ n("joy-icon", {
193
+ }, null, -1)), ge = [
194
+ ve
195
+ ], he = ["id", "min", "max", "aria-invalid", "name", "required", "value"], pe = ["aria-label", "disabled"], ke = /* @__PURE__ */ G(() => /* @__PURE__ */ d("joy-icon", {
196
196
  name: "add",
197
197
  lazy: !1,
198
198
  color: "teal"
199
- }, null, -1)), be = [
200
- ge
201
- ], he = {
199
+ }, null, -1)), Se = [
200
+ ke
201
+ ], je = {
202
202
  key: 0,
203
203
  class: "joy-counter_error"
204
- }, pe = /* @__PURE__ */ h({
204
+ }, _e = /* @__PURE__ */ S({
205
205
  __name: "JoyCounter",
206
206
  props: {
207
- // ...FORM_BASED_PROPS,
207
+ /** Removes any interactivity */
208
208
  disabled: {
209
209
  type: Boolean,
210
210
  default: !1
@@ -223,20 +223,25 @@ const re = /* @__PURE__ */ p(de, [["__scopeId", "data-v-cd187cef"]]), H = (e) =>
223
223
  type: Boolean,
224
224
  default: !1
225
225
  },
226
+ /** Display a label on top of the element. */
226
227
  label: String,
228
+ /** Overrides the default label size. See JoyLabel stories */
227
229
  labelSize: {
228
230
  type: String,
229
231
  default: "medium"
230
232
  },
233
+ /** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
231
234
  optionalLabel: String,
235
+ /** Depending on context, we can add a "*" after the label to specify it's mandatory. */
232
236
  requiredMark: {
233
237
  type: Boolean,
234
238
  default: !1
235
239
  },
236
- // ...LABEL_BASED_PROPS,
240
+ /** Used for aria-label. */
237
241
  labelDecrement: {
238
242
  type: String
239
243
  },
244
+ /** Used for aria-label. */
240
245
  labelIncrement: {
241
246
  type: String
242
247
  },
@@ -251,53 +256,55 @@ const re = /* @__PURE__ */ p(de, [["__scopeId", "data-v-cd187cef"]]), H = (e) =>
251
256
  type: Number,
252
257
  default: 0
253
258
  },
259
+ /** In order to increment or decrement by given steps. For non-integer values, don't use comma */
254
260
  step: {
255
261
  type: Number,
256
262
  default: 1
257
263
  },
258
- componentErrorMessage: {
264
+ /** When given, it renders a JoyFormError element */
265
+ errorMessage: {
259
266
  type: String
260
267
  }
261
268
  },
262
269
  emits: ["update:modelValue"],
263
- setup(e, { expose: l, emit: t }) {
264
- const a = e, o = S(!1);
265
- function m() {
266
- const d = c(!1);
267
- d >= 0 ? t("update:modelValue", d <= a.min ? a.min : d) : t("update:modelValue", 0), r();
270
+ setup(e, { expose: n, emit: a }) {
271
+ const t = e, o = _(!1);
272
+ function s() {
273
+ const y = u(!1);
274
+ y >= 0 ? a("update:modelValue", y <= t.min ? t.min : y) : a("update:modelValue", 0), l();
268
275
  }
269
- function _() {
270
- const d = c();
271
- a.max && d <= a.max ? t("update:modelValue", d >= a.max ? a.max : d) : a.max && d > a.max ? t("update:modelValue", a.max) : t("update:modelValue", d), r();
276
+ function c() {
277
+ const y = u();
278
+ t.max && y <= t.max ? a("update:modelValue", y >= t.max ? t.max : y) : t.max && y > t.max ? a("update:modelValue", t.max) : a("update:modelValue", y), l();
272
279
  }
273
- function r() {
274
- o.value = !j();
280
+ function l() {
281
+ o.value = !g();
275
282
  }
276
- function c(d = !0) {
277
- const f = a.step.toString().split("."), $ = f.length === 2 ? f[1].length : 0;
278
- return parseFloat(d ? (a.modelValue + a.step).toFixed($) : (a.modelValue - a.step).toFixed($));
283
+ function u(y = !0) {
284
+ const h = t.step.toString().split("."), x = h.length === 2 ? h[1].length : 0;
285
+ return parseFloat(y ? (t.modelValue + t.step).toFixed(x) : (t.modelValue - t.step).toFixed(x));
279
286
  }
280
- function j() {
281
- return x() && k();
287
+ function g() {
288
+ return p() && I();
282
289
  }
283
- function x() {
284
- return !a.max || a.modelValue <= a.max;
290
+ function p() {
291
+ return !t.max || t.modelValue <= t.max;
285
292
  }
286
- function k() {
287
- return a.min <= a.modelValue;
293
+ function I() {
294
+ return t.min <= t.modelValue;
288
295
  }
289
- const v = {
290
- onInput: (d) => {
291
- t("update:modelValue", +d.target.value || 0), o.value = !1;
296
+ const k = {
297
+ onInput: (y) => {
298
+ a("update:modelValue", +y.target.value || 0), o.value = !1;
292
299
  },
293
300
  onBlur: () => {
294
- r();
301
+ l();
295
302
  }
296
303
  };
297
- return l({
298
- props: a
299
- }), (d, f) => (i(), u("div", ue, [
300
- e.label ? (i(), J(g(C), {
304
+ return n({
305
+ props: t
306
+ }), (y, h) => (i(), r("div", me, [
307
+ e.label ? (i(), V(b(C), {
301
308
  key: 0,
302
309
  for: e.id,
303
310
  required: e.required && e.requiredMark,
@@ -305,21 +312,21 @@ const re = /* @__PURE__ */ p(de, [["__scopeId", "data-v-cd187cef"]]), H = (e) =>
305
312
  size: e.labelSize
306
313
  }, {
307
314
  default: q(() => [
308
- s(d.$slots, "default", {}, () => [
309
- B(V(e.label), 1)
315
+ m(y.$slots, "default", {}, () => [
316
+ B($(e.label), 1)
310
317
  ], !0)
311
318
  ]),
312
319
  _: 3
313
- }, 8, ["for", "required", "optional-label", "size"])) : b("", !0),
314
- n("div", se, [
315
- n("button", {
320
+ }, 8, ["for", "required", "optional-label", "size"])) : f("", !0),
321
+ d("div", fe, [
322
+ d("button", {
316
323
  class: "joy-counter__decrement",
317
324
  type: "button",
318
325
  "aria-label": e.labelDecrement,
319
326
  disabled: e.modelValue <= e.min,
320
- onClick: m
321
- }, me, 8, ce),
322
- n("input", w({
327
+ onClick: s
328
+ }, ge, 8, be),
329
+ d("input", w({
323
330
  id: e.id,
324
331
  ref: "input",
325
332
  type: "number",
@@ -331,69 +338,71 @@ const re = /* @__PURE__ */ p(de, [["__scopeId", "data-v-cd187cef"]]), H = (e) =>
331
338
  required: e.required,
332
339
  step: "any",
333
340
  value: e.modelValue
334
- }, d.$attrs, {
335
- onInput: f[0] || (f[0] = //@ts-ignore
336
- (...$) => v.onInput && v.onInput(...$)),
337
- onBlur: f[1] || (f[1] = //@ts-ignore
338
- (...$) => v.onBlur && v.onBlur(...$))
339
- }), null, 16, fe),
340
- n("button", {
341
+ }, y.$attrs, {
342
+ onInput: h[0] || (h[0] = //@ts-ignore
343
+ (...x) => k.onInput && k.onInput(...x)),
344
+ onBlur: h[1] || (h[1] = //@ts-ignore
345
+ (...x) => k.onBlur && k.onBlur(...x))
346
+ }), null, 16, he),
347
+ d("button", {
341
348
  class: "joy-counter__increment",
342
349
  type: "button",
343
350
  "aria-label": e.labelIncrement,
344
351
  disabled: e.max ? e.modelValue >= e.max : !1,
345
- onClick: _
346
- }, be, 8, ve),
347
- e.invalid && e.componentErrorMessage ? (i(), u("div", he, [
348
- R(g(O), { "no-html-error-text": e.componentErrorMessage }, null, 8, ["no-html-error-text"])
349
- ])) : b("", !0)
352
+ onClick: c
353
+ }, Se, 8, pe),
354
+ e.invalid && e.errorMessage ? (i(), r("div", je, [
355
+ R(b(U), { "no-html-error-text": e.errorMessage }, null, 8, ["no-html-error-text"])
356
+ ])) : f("", !0)
350
357
  ])
351
358
  ]));
352
359
  }
353
360
  });
354
- const _e = /* @__PURE__ */ p(pe, [["__scopeId", "data-v-366cb712"]]), je = (e) => (L("data-v-eba58103"), e = e(), z(), e), Se = ["aria-hidden"], $e = /* @__PURE__ */ je(() => /* @__PURE__ */ n("joy-icon", {
361
+ const $e = /* @__PURE__ */ j(_e, [["__scopeId", "data-v-47a76942"]]), xe = (e) => (M("data-v-d693f93c"), e = e(), T(), e), Ie = ["aria-hidden"], qe = /* @__PURE__ */ xe(() => /* @__PURE__ */ d("joy-icon", {
355
362
  "custom-class": "joy-icon-error",
356
363
  name: "warning-triangle"
357
- }, null, -1)), xe = /* @__PURE__ */ h({
364
+ }, null, -1)), Be = /* @__PURE__ */ S({
358
365
  __name: "JoyFormError",
359
366
  props: {
367
+ /** In some cases you'll need to inject the error in the DOM but hide it. Visible by default */
360
368
  visible: {
361
369
  type: Boolean,
362
370
  default: !0
363
371
  },
372
+ /** Error message to display. If you need a list of errors, use the slot instead */
364
373
  noHtmlErrorText: String
365
374
  },
366
375
  setup(e) {
367
- return (l, t) => (i(), u("div", {
376
+ return (n, a) => (i(), r("div", {
368
377
  "aria-hidden": e.visible,
369
- class: y(["joy-form-error", { "joy-has-error": e.visible }]),
378
+ class: v(["joy-form-error", { "joy-has-error": e.visible }]),
370
379
  role: "alert"
371
380
  }, [
372
- $e,
373
- n("div", null, [
374
- s(l.$slots, "default", {}, () => [
375
- B(V(e.noHtmlErrorText), 1)
381
+ qe,
382
+ d("div", null, [
383
+ m(n.$slots, "default", {}, () => [
384
+ B($(e.noHtmlErrorText), 1)
376
385
  ], !0)
377
386
  ])
378
- ], 10, Se));
387
+ ], 10, Ie));
379
388
  }
380
389
  });
381
- const O = /* @__PURE__ */ p(xe, [["__scopeId", "data-v-eba58103"]]);
382
- function ke(e) {
383
- let l;
390
+ const U = /* @__PURE__ */ j(Be, [["__scopeId", "data-v-d693f93c"]]);
391
+ function Ve(e) {
392
+ let n;
384
393
  switch (e) {
385
394
  case "error":
386
- l = "warning-triangle";
395
+ n = "warning-triangle";
387
396
  break;
388
397
  case "success":
389
- l = "check";
398
+ n = "check";
390
399
  break;
391
400
  default:
392
- l = "info-circle";
401
+ n = "info-circle";
393
402
  }
394
- return l;
403
+ return n;
395
404
  }
396
- const Ve = [...U], Ie = ["name"], Be = { class: "joy-highlight--text" }, Je = /* @__PURE__ */ h({
405
+ const Je = [...Y], Ce = ["name"], we = { class: "joy-highlight--text" }, Le = /* @__PURE__ */ S({
397
406
  __name: "JoyHighlight",
398
407
  props: {
399
408
  accent: {
@@ -409,16 +418,16 @@ const Ve = [...U], Ie = ["name"], Be = { class: "joy-highlight--text" }, Je = /*
409
418
  type: String,
410
419
  default: "neutral",
411
420
  validator(e) {
412
- return Ve.includes(e);
421
+ return Je.includes(e);
413
422
  }
414
423
  }
415
424
  },
416
- setup(e, { expose: l }) {
417
- const t = e, a = I(() => t.icon ? t.icon : ke(t.level));
418
- return l({
419
- getRelevantIcon: a
420
- }), (o, m) => (i(), u("div", {
421
- class: y([
425
+ setup(e, { expose: n }) {
426
+ const a = e, t = J(() => a.icon ? a.icon : Ve(a.level));
427
+ return n({
428
+ getRelevantIcon: t
429
+ }), (o, s) => (i(), r("div", {
430
+ class: v([
422
431
  "joy-highlight",
423
432
  `joy-highlight_${e.level}`,
424
433
  {
@@ -427,33 +436,33 @@ const Ve = [...U], Ie = ["name"], Be = { class: "joy-highlight--text" }, Je = /*
427
436
  }
428
437
  ])
429
438
  }, [
430
- e.displayIcon ? (i(), u("joy-icon", {
439
+ e.displayIcon ? (i(), r("joy-icon", {
431
440
  key: 0,
432
- name: g(a)
433
- }, null, 8, Ie)) : b("", !0),
434
- n("div", Be, [
435
- n("strong", null, [
436
- s(o.$slots, "highlight-title", {}, void 0, !0)
441
+ name: b(t)
442
+ }, null, 8, Ce)) : f("", !0),
443
+ d("div", we, [
444
+ d("strong", null, [
445
+ m(o.$slots, "highlight-title", {}, void 0, !0)
437
446
  ]),
438
- s(o.$slots, "default", {}, void 0, !0)
447
+ m(o.$slots, "default", {}, void 0, !0)
439
448
  ])
440
449
  ], 2));
441
450
  }
442
451
  });
443
- const qe = /* @__PURE__ */ p(Je, [["__scopeId", "data-v-15d3fa11"]]), we = ["small", "medium", "large"], Ce = {
452
+ const ze = /* @__PURE__ */ j(Le, [["__scopeId", "data-v-15d3fa11"]]), Me = ["small", "medium", "large"], Te = {
444
453
  key: 0,
445
454
  class: "joy-label-required"
446
- }, Le = {
455
+ }, Ee = {
447
456
  key: 1,
448
457
  class: "joy-label-optional"
449
- }, ze = /* @__PURE__ */ h({
458
+ }, Ne = /* @__PURE__ */ S({
450
459
  __name: "JoyLabel",
451
460
  props: {
452
461
  size: {
453
462
  type: String,
454
463
  default: "medium",
455
464
  validator(e) {
456
- return we.includes(e);
465
+ return Me.includes(e);
457
466
  }
458
467
  },
459
468
  tagName: {
@@ -469,22 +478,21 @@ const qe = /* @__PURE__ */ p(Je, [["__scopeId", "data-v-15d3fa11"]]), we = ["sma
469
478
  }
470
479
  },
471
480
  setup(e) {
472
- return (l, t) => (i(), J(M(e.tagName), w({
481
+ return (n, a) => (i(), V(z(e.tagName), w({
473
482
  class: ["joy-label", `joy-label--${e.size}`]
474
- }, l.$attrs), {
483
+ }, n.$attrs), {
475
484
  default: q(() => [
476
- s(l.$slots, "default", {}, void 0, !0),
477
- e.required ? (i(), u("span", Ce, "*")) : b("", !0),
478
- e.optionalLabel ? (i(), u("span", Le, "- " + V(e.optionalLabel), 1)) : b("", !0)
485
+ m(n.$slots, "default", {}, void 0, !0),
486
+ e.required ? (i(), r("span", Te, "*")) : f("", !0),
487
+ e.optionalLabel ? (i(), r("span", Ee, "- " + $(e.optionalLabel), 1)) : f("", !0)
479
488
  ]),
480
489
  _: 3
481
490
  }, 16, ["class"]));
482
491
  }
483
492
  });
484
- const C = /* @__PURE__ */ p(ze, [["__scopeId", "data-v-e3232407"]]), Ee = ["large", "medium", "small"], Te = ["id", "disabled", "type", "value"], Ne = ["data-unit"], Me = /* @__PURE__ */ h({
493
+ const C = /* @__PURE__ */ j(Ne, [["__scopeId", "data-v-e3232407"]]), Oe = ["large", "medium", "small"], Re = ["id", "disabled", "type", "value"], Fe = ["data-unit"], Ae = /* @__PURE__ */ S({
485
494
  __name: "JoyInput",
486
495
  props: {
487
- // ...FORM_BASED_PROPS,
488
496
  disabled: {
489
497
  type: Boolean,
490
498
  default: !1
@@ -503,78 +511,83 @@ const C = /* @__PURE__ */ p(ze, [["__scopeId", "data-v-e3232407"]]), Ee = ["larg
503
511
  type: Boolean,
504
512
  default: !1
505
513
  },
514
+ /** Display a label on top of the element. */
506
515
  label: String,
516
+ /** Overrides the default label size. See JoyLabel stories */
507
517
  labelSize: {
508
518
  type: String,
509
519
  default: "medium"
510
520
  },
521
+ /** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
511
522
  optionalLabel: String,
523
+ /** Depending on context, we can add a "*" after the label to specify it's mandatory. */
512
524
  requiredMark: {
513
525
  type: Boolean,
514
526
  default: !1
515
527
  },
516
- // ...LABEL_BASED_PROPS,
517
528
  modelValue: {
518
529
  type: String,
519
530
  default: ""
520
531
  },
521
- // ...TEXT_BASED_PROPS,
532
+ /** Display a cross icon on the right that enables to clear the field */
522
533
  clearable: {
523
534
  type: Boolean,
524
535
  default: !1
525
536
  },
537
+ /** Add a JoyIcon / joy-icon with given name on left-side. */
526
538
  icon: String,
527
539
  size: {
528
540
  type: String,
529
541
  default: "medium",
530
542
  validator(e) {
531
- return Ee.includes(e);
543
+ return Oe.includes(e);
532
544
  }
533
545
  },
534
546
  type: String,
547
+ /** Adds a legend like symbol on the right of the component. Made for number based values */
535
548
  unit: String
536
549
  },
537
550
  emits: ["update:modelValue"],
538
- setup(e, { emit: l }) {
539
- const t = e, a = S(), o = S(), m = N(), _ = E(), r = S(!1), c = I(() => t.clearable && t.modelValue.length > 0 && !t.unit), j = I(() => _.default && _.default()), x = I(() => {
540
- var d, f;
541
- return !!((d = o.value) != null && d.closest("joy-wrapper")) || !!((f = o.value) != null && f.closest(".joy-wrapper"));
542
- }), k = S(t.type);
543
- A(() => {
544
- k.value = t.unit ? "number" : t.unit || "text";
551
+ setup(e, { emit: n }) {
552
+ const a = e, t = _(), o = _(), s = O(), c = L(), l = _(!1), u = J(() => a.clearable && a.modelValue.length > 0 && !a.unit), g = J(() => c.default && c.default()), p = J(() => {
553
+ var y, h;
554
+ return !!((y = o.value) != null && y.closest("joy-wrapper")) || !!((h = o.value) != null && h.closest(".joy-wrapper"));
555
+ }), I = _(a.type);
556
+ P(() => {
557
+ I.value = a.unit ? "number" : a.unit || "text";
545
558
  });
546
- const v = {
559
+ const k = {
547
560
  onFocus: () => {
548
- r.value = !0;
561
+ l.value = !0;
549
562
  },
550
563
  onBlur: () => {
551
- r.value = !1;
564
+ l.value = !1;
552
565
  },
553
- onInput: (d) => {
554
- let f = d.target.value;
555
- l("update:modelValue", f);
566
+ onInput: (y) => {
567
+ let h = y.target.value;
568
+ n("update:modelValue", h);
556
569
  },
557
570
  clearValue: () => {
558
- t.disabled || l("update:modelValue", "");
571
+ a.disabled || n("update:modelValue", "");
559
572
  }
560
573
  };
561
- return (d, f) => (i(), u("div", {
574
+ return (y, h) => (i(), r("div", {
562
575
  ref_key: "root",
563
576
  ref: o,
564
- class: y([`joy-input--${t.size}`])
577
+ class: v([`joy-input--${a.size}`])
565
578
  }, [
566
- n("div", {
567
- class: y([
579
+ d("div", {
580
+ class: v([
568
581
  "joy-input",
569
582
  {
570
- "joy-input--focusing": r.value,
583
+ "joy-input--focusing": l.value,
571
584
  "joy-input--disabled": e.disabled,
572
585
  "joy-input--invalid": e.invalid,
573
- "joy-input--valid": !e.invalid && !g(m).disabled
586
+ "joy-input--valid": !e.invalid && !b(s).disabled
574
587
  }
575
588
  ])
576
589
  }, [
577
- g(j) || e.label ? (i(), J(C, {
590
+ b(g) || e.label ? (i(), V(C, {
578
591
  key: 0,
579
592
  for: e.name,
580
593
  required: e.required && e.requiredMark,
@@ -582,27 +595,27 @@ const C = /* @__PURE__ */ p(ze, [["__scopeId", "data-v-e3232407"]]), Ee = ["larg
582
595
  size: e.labelSize
583
596
  }, {
584
597
  default: q(() => [
585
- s(d.$slots, "default", {}, () => [
586
- B(V(e.label), 1)
598
+ m(y.$slots, "default", {}, () => [
599
+ B($(e.label), 1)
587
600
  ], !0)
588
601
  ]),
589
602
  _: 3
590
- }, 8, ["for", "required", "optional-label", "size"])) : b("", !0),
591
- n("div", {
592
- class: y([
603
+ }, 8, ["for", "required", "optional-label", "size"])) : f("", !0),
604
+ d("div", {
605
+ class: v([
593
606
  "joy-input--wrapper",
594
607
  {
595
608
  "joy-input--wrapper-has-icon": !!e.icon,
596
609
  "joy-input--wrapper---clearable": e.clearable,
597
610
  "joy-input--wrapper-unit": !!e.unit,
598
- "joy-input--wrapper-margin": !g(x)
611
+ "joy-input--wrapper-margin": !b(p)
599
612
  }
600
613
  ])
601
614
  }, [
602
- n("input", w(d.$attrs, {
603
- id: t.name,
615
+ d("input", w(y.$attrs, {
616
+ id: a.name,
604
617
  ref_key: "input",
605
- ref: a,
618
+ ref: t,
606
619
  disabled: e.disabled,
607
620
  class: [
608
621
  {
@@ -610,34 +623,34 @@ const C = /* @__PURE__ */ p(ze, [["__scopeId", "data-v-e3232407"]]), Ee = ["larg
610
623
  "joy-input--field-invalid": e.invalid
611
624
  }
612
625
  ],
613
- type: k.value,
626
+ type: I.value,
614
627
  value: e.modelValue,
615
- onFocus: f[0] || (f[0] = //@ts-ignore
616
- (...$) => v.onFocus && v.onFocus(...$)),
617
- onBlur: f[1] || (f[1] = //@ts-ignore
618
- (...$) => v.onBlur && v.onBlur(...$)),
619
- onInput: f[2] || (f[2] = //@ts-ignore
620
- (...$) => v.onInput && v.onInput(...$))
621
- }), null, 16, Te),
622
- g(c) ? (i(), u("joy-icon", {
628
+ onFocus: h[0] || (h[0] = //@ts-ignore
629
+ (...x) => k.onFocus && k.onFocus(...x)),
630
+ onBlur: h[1] || (h[1] = //@ts-ignore
631
+ (...x) => k.onBlur && k.onBlur(...x)),
632
+ onInput: h[2] || (h[2] = //@ts-ignore
633
+ (...x) => k.onInput && k.onInput(...x))
634
+ }), null, 16, Re),
635
+ b(u) ? (i(), r("joy-icon", {
623
636
  key: 0,
624
637
  size: "xxsmall",
625
638
  name: "cross",
626
639
  class: "joy-input--clear",
627
- onClick: f[3] || (f[3] = //@ts-ignore
628
- (...$) => v.clearValue && v.clearValue(...$))
629
- })) : b("", !0),
630
- e.unit ? (i(), u("div", {
640
+ onClick: h[3] || (h[3] = //@ts-ignore
641
+ (...x) => k.clearValue && k.clearValue(...x))
642
+ })) : f("", !0),
643
+ e.unit ? (i(), r("div", {
631
644
  key: 1,
632
645
  "data-unit": e.unit,
633
646
  class: "joy-input--unit"
634
- }, null, 8, Ne)) : b("", !0)
647
+ }, null, 8, Fe)) : f("", !0)
635
648
  ], 2)
636
649
  ], 2)
637
650
  ], 2));
638
651
  }
639
652
  });
640
- const Re = /* @__PURE__ */ p(Me, [["__scopeId", "data-v-3da79efb"]]), Fe = ["teal", "white"], He = ["href"], Oe = ["color", "name"], Ae = /* @__PURE__ */ h({
653
+ const He = /* @__PURE__ */ j(Ae, [["__scopeId", "data-v-f264c5ef"]]), Ge = ["teal", "white"], Ue = ["href"], We = ["color", "name"], Pe = /* @__PURE__ */ S({
641
654
  __name: "JoyLink",
642
655
  props: {
643
656
  href: {
@@ -648,26 +661,109 @@ const Re = /* @__PURE__ */ p(Me, [["__scopeId", "data-v-3da79efb"]]), Fe = ["tea
648
661
  type: String,
649
662
  default: "teal",
650
663
  validator(e) {
651
- return Fe.includes(e);
664
+ return Ge.includes(e);
652
665
  }
653
666
  },
654
667
  icon: String
655
668
  },
656
669
  setup(e) {
657
- const l = e, t = I(() => l.color === "white" ? "white" : "teal");
658
- return (a, o) => (i(), u("a", w({ href: e.href }, a.$attrs, {
670
+ const n = e, a = J(() => n.color === "white" ? "white" : "teal");
671
+ return (t, o) => (i(), r("a", w({ href: e.href }, t.$attrs, {
659
672
  class: ["joy-link", `joy-link_${e.color}`]
660
673
  }), [
661
- e.icon ? (i(), u("joy-icon", {
674
+ e.icon ? (i(), r("joy-icon", {
662
675
  key: 0,
663
- color: g(t),
676
+ color: b(a),
664
677
  name: e.icon
665
- }, null, 8, Oe)) : b("", !0),
666
- s(a.$slots, "default", {}, void 0, !0)
667
- ], 16, He));
678
+ }, null, 8, We)) : f("", !0),
679
+ m(t.$slots, "default", {}, void 0, !0)
680
+ ], 16, Ue));
668
681
  }
669
682
  });
670
- const Ge = /* @__PURE__ */ p(Ae, [["__scopeId", "data-v-640ee9a6"]]), De = ["id", "value", "checked", "disabled", "required", "name"], Pe = { class: "joy-radio-label" }, We = { class: "joy-radio-content__wrapper" }, Ue = { class: "joy-radio-content" }, Ze = /* @__PURE__ */ h({
683
+ const De = /* @__PURE__ */ j(Pe, [["__scopeId", "data-v-640ee9a6"]]), Ke = ["id"], Ze = {
684
+ class: /* @__PURE__ */ v(["joy-multi-checkbox"])
685
+ }, Qe = /* @__PURE__ */ S({
686
+ __name: "JoyMultiCheckbox",
687
+ props: {
688
+ options: {
689
+ type: Array,
690
+ required: !0,
691
+ validator(e) {
692
+ const n = e.every((t) => Object.keys(t).includes("value")), a = e.every((t) => Object.keys(t).includes("label"));
693
+ return n && a;
694
+ }
695
+ },
696
+ id: String,
697
+ value: {
698
+ type: Object,
699
+ default() {
700
+ return [];
701
+ }
702
+ },
703
+ fullWidth: {
704
+ type: Boolean,
705
+ default: !1
706
+ },
707
+ required: {
708
+ type: Boolean,
709
+ default: !1
710
+ },
711
+ label: String,
712
+ labelSize: {
713
+ type: String,
714
+ default: "medium"
715
+ },
716
+ optionalLabel: String,
717
+ requiredMark: {
718
+ type: Boolean,
719
+ default: !1
720
+ }
721
+ },
722
+ emits: ["update:value"],
723
+ setup(e, { emit: n }) {
724
+ const a = e;
725
+ function t(s) {
726
+ return a.value.includes(s.value);
727
+ }
728
+ function o(s, c) {
729
+ let l = [...a.value || []];
730
+ c ? l.push(s) : l.splice(l.indexOf(s), 1), n("update:value", l);
731
+ }
732
+ return (s, c) => (i(), r("fieldset", {
733
+ id: e.id,
734
+ class: "joy-multi-checkbox__wrapper"
735
+ }, [
736
+ e.label ? (i(), V(b(C), {
737
+ key: 0,
738
+ "tag-name": "legend",
739
+ required: e.required && e.requiredMark,
740
+ "optional-label": e.optionalLabel,
741
+ size: e.labelSize
742
+ }, {
743
+ default: q(() => [
744
+ B($(e.label), 1)
745
+ ]),
746
+ _: 1
747
+ }, 8, ["required", "optional-label", "size"])) : f("", !0),
748
+ d("div", Ze, [
749
+ (i(!0), r(F, null, A(e.options, (l) => (i(), V(b(N), {
750
+ id: l.id,
751
+ key: l.id,
752
+ name: l.name,
753
+ value: l.value,
754
+ checked: t(l),
755
+ "onUpdate:checked": (u) => o(l.value, u)
756
+ }, {
757
+ default: q(() => [
758
+ B($(l.label), 1)
759
+ ]),
760
+ _: 2
761
+ }, 1032, ["id", "name", "value", "checked", "onUpdate:checked"]))), 128))
762
+ ])
763
+ ], 8, Ke));
764
+ }
765
+ });
766
+ const Xe = /* @__PURE__ */ j(Qe, [["__scopeId", "data-v-ac218b17"]]), Ye = ["id", "value", "checked", "disabled", "required", "name"], et = { class: "joy-radio-label" }, tt = { class: "joy-radio-content__wrapper" }, at = { class: "joy-radio-content" }, lt = /* @__PURE__ */ S({
671
767
  __name: "JoyRadio",
672
768
  props: {
673
769
  disabled: {
@@ -701,66 +797,66 @@ const Ge = /* @__PURE__ */ p(Ae, [["__scopeId", "data-v-640ee9a6"]]), De = ["id"
701
797
  }
702
798
  },
703
799
  emits: ["update:modelValue"],
704
- setup(e, { expose: l, emit: t }) {
705
- const a = e, o = S(!1), m = S(null), _ = S(null), r = E(), c = I(() => !a.modelValue || !a.value ? !1 : a.modelValue === a.value);
706
- function j() {
707
- o.value = !!r["expandable-content"] && c.value;
800
+ setup(e, { expose: n, emit: a }) {
801
+ const t = e, o = _(!1), s = _(null), c = _(null), l = L(), u = J(() => !t.modelValue || !t.value ? !1 : t.modelValue === t.value);
802
+ function g() {
803
+ o.value = !!l["expandable-content"] && u.value;
708
804
  }
709
- function x() {
710
- t("update:modelValue", a.value), j();
805
+ function p() {
806
+ a("update:modelValue", t.value), g();
711
807
  }
712
- return T(() => {
713
- a.theme === "outline" && j();
714
- }), G(
715
- () => a.modelValue,
808
+ return E(() => {
809
+ t.theme === "outline" && g();
810
+ }), D(
811
+ () => t.modelValue,
716
812
  () => {
717
- j();
813
+ g();
718
814
  }
719
- ), l({
720
- checked: c,
815
+ ), n({
816
+ checked: u,
721
817
  isExpanded: o
722
- }), (k, v) => (i(), u("label", {
818
+ }), (I, k) => (i(), r("label", {
723
819
  ref_key: "root",
724
- ref: m,
725
- class: y([
820
+ ref: s,
821
+ class: v([
726
822
  "joy-radio",
727
823
  `joy-radio--${e.theme}`,
728
824
  {
729
- "joy-radio--checked": g(c),
825
+ "joy-radio--checked": b(u),
730
826
  "joy-radio--disabled": e.disabled,
731
827
  "joy-radio--invalid": e.invalid
732
828
  }
733
829
  ])
734
830
  }, [
735
- n("input", {
736
- id: e.name,
831
+ d("input", {
832
+ id: e.id,
737
833
  type: "radio",
738
834
  value: e.value,
739
- checked: g(c),
835
+ checked: b(u),
740
836
  disabled: e.disabled,
741
837
  required: e.required,
742
838
  name: e.name,
743
- onChange: x
744
- }, null, 40, De),
745
- n("span", Pe, [
746
- s(k.$slots, "default", {}, void 0, !0)
839
+ onChange: p
840
+ }, null, 40, Ye),
841
+ d("span", et, [
842
+ m(I.$slots, "default", {}, void 0, !0)
747
843
  ]),
748
- n("div", We, [
749
- n("div", Ue, [
750
- s(k.$slots, "radio-content", {}, void 0, !0)
844
+ d("div", tt, [
845
+ d("div", at, [
846
+ m(I.$slots, "radio-content", {}, void 0, !0)
751
847
  ]),
752
- n("div", {
848
+ d("div", {
753
849
  ref_key: "expandableElement",
754
- ref: _,
755
- class: y(["joy-radio-expandable", { "joy-radio-expandable--expanded": o.value }])
850
+ ref: c,
851
+ class: v(["joy-radio-expandable", { "joy-radio-expandable--expanded": o.value }])
756
852
  }, [
757
- s(k.$slots, "expandable-content", {}, void 0, !0)
853
+ m(I.$slots, "expandable-content", {}, void 0, !0)
758
854
  ], 2)
759
855
  ])
760
856
  ], 2));
761
857
  }
762
858
  });
763
- const Ke = /* @__PURE__ */ p(Ze, [["__scopeId", "data-v-0a0dcfe7"]]), Qe = ["form", "name"], Xe = /* @__PURE__ */ h({
859
+ const nt = /* @__PURE__ */ j(lt, [["__scopeId", "data-v-8882dc58"]]), it = ["form", "name"], ot = /* @__PURE__ */ S({
764
860
  __name: "JoyRadioGroup",
765
861
  props: {
766
862
  direction: {
@@ -775,26 +871,26 @@ const Ke = /* @__PURE__ */ p(Ze, [["__scopeId", "data-v-0a0dcfe7"]]), Qe = ["for
775
871
  }
776
872
  },
777
873
  setup(e) {
778
- return (l, t) => (i(), u("fieldset", {
874
+ return (n, a) => (i(), r("fieldset", {
779
875
  ref: "root",
780
876
  class: "joy-radio-group-fieldset",
781
877
  role: "radiogroup",
782
878
  form: e.form,
783
879
  name: e.name
784
880
  }, [
785
- s(l.$slots, "radio-group-legend", {}, void 0, !0),
786
- n("div", {
787
- class: y(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
881
+ m(n.$slots, "radio-group-legend", {}, void 0, !0),
882
+ d("div", {
883
+ class: v(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
788
884
  }, [
789
- s(l.$slots, "default", {}, void 0, !0)
885
+ m(n.$slots, "default", {}, void 0, !0)
790
886
  ], 2)
791
- ], 8, Qe));
887
+ ], 8, it));
792
888
  }
793
889
  });
794
- const Ye = /* @__PURE__ */ p(Xe, [["__scopeId", "data-v-d75cd96a"]]), et = (e) => (L("data-v-f9015b7b"), e = e(), z(), e), tt = ["id", "name", "aria-invalid", "required", "disabled", "value"], at = /* @__PURE__ */ et(() => /* @__PURE__ */ n("joy-icon", {
890
+ const dt = /* @__PURE__ */ j(ot, [["__scopeId", "data-v-d75cd96a"]]), ut = (e) => (M("data-v-f9015b7b"), e = e(), T(), e), rt = ["id", "name", "aria-invalid", "required", "disabled", "value"], st = /* @__PURE__ */ ut(() => /* @__PURE__ */ d("joy-icon", {
795
891
  class: "joy-select__chevron",
796
892
  name: "chevron-down"
797
- }, null, -1)), lt = /* @__PURE__ */ h({
893
+ }, null, -1)), ct = /* @__PURE__ */ S({
798
894
  __name: "JoySelect",
799
895
  props: {
800
896
  disabled: {
@@ -834,33 +930,33 @@ const Ye = /* @__PURE__ */ p(Xe, [["__scopeId", "data-v-d75cd96a"]]), et = (e) =
834
930
  // ...TEXT_BASED_PROPS,
835
931
  },
836
932
  emits: ["update:modelValue"],
837
- setup(e, { emit: l }) {
838
- const t = e, a = S(), o = S(), m = E();
839
- T(() => {
840
- var j;
841
- const r = m.label && m.label();
842
- if (!r || !r.length)
933
+ setup(e, { emit: n }) {
934
+ const a = e, t = _(), o = _(), s = L();
935
+ E(() => {
936
+ var g;
937
+ const l = s.label && s.label();
938
+ if (!l || !l.length)
843
939
  return;
844
- const c = r[0];
845
- if (c.type === "JoyLabel") {
846
- const x = (j = c.props) == null ? void 0 : j.for;
847
- if (!x) {
940
+ const u = l[0];
941
+ if (u.type === "JoyLabel") {
942
+ const p = (g = u.props) == null ? void 0 : g.for;
943
+ if (!p) {
848
944
  console.warn("JoyLabel for attribute is missing");
849
945
  return;
850
946
  }
851
- x !== t.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
947
+ p !== a.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
852
948
  }
853
949
  });
854
- function _(r) {
855
- const c = r.target.value;
856
- l("update:modelValue", c);
950
+ function c(l) {
951
+ const u = l.target.value;
952
+ n("update:modelValue", u);
857
953
  }
858
- return (r, c) => (i(), u("div", {
954
+ return (l, u) => (i(), r("div", {
859
955
  ref_key: "root",
860
- ref: a
956
+ ref: t
861
957
  }, [
862
- s(r.$slots, "label", {}, () => [
863
- e.label ? (i(), J(C, {
958
+ m(l.$slots, "label", {}, () => [
959
+ e.label ? (i(), V(C, {
864
960
  key: 0,
865
961
  required: e.required && e.requiredMark,
866
962
  "optional-label": e.optionalLabel,
@@ -868,19 +964,19 @@ const Ye = /* @__PURE__ */ p(Xe, [["__scopeId", "data-v-d75cd96a"]]), et = (e) =
868
964
  size: e.labelSize
869
965
  }, {
870
966
  default: q(() => [
871
- B(V(e.label), 1)
967
+ B($(e.label), 1)
872
968
  ]),
873
969
  _: 1
874
- }, 8, ["required", "optional-label", "for", "size"])) : b("", !0)
970
+ }, 8, ["required", "optional-label", "for", "size"])) : f("", !0)
875
971
  ], !0),
876
- n("div", {
877
- class: y({
972
+ d("div", {
973
+ class: v({
878
974
  "joy-select__wrapper": !0,
879
975
  "joy-select--invalid": e.invalid,
880
976
  "joy-select--disabled": e.disabled
881
977
  })
882
978
  }, [
883
- n("select", {
979
+ d("select", {
884
980
  id: e.id || e.name,
885
981
  ref_key: "select",
886
982
  ref: o,
@@ -890,16 +986,233 @@ const Ye = /* @__PURE__ */ p(Xe, [["__scopeId", "data-v-d75cd96a"]]), et = (e) =
890
986
  required: e.required,
891
987
  disabled: e.disabled,
892
988
  value: e.modelValue,
893
- onInput: _
989
+ onInput: c
894
990
  }, [
895
- s(r.$slots, "default", {}, void 0, !0)
896
- ], 40, tt),
897
- at
991
+ m(l.$slots, "default", {}, void 0, !0)
992
+ ], 40, rt),
993
+ st
898
994
  ], 2)
899
995
  ], 512));
900
996
  }
901
997
  });
902
- const nt = /* @__PURE__ */ p(lt, [["__scopeId", "data-v-f9015b7b"]]), ot = /* @__PURE__ */ h({
998
+ const yt = /* @__PURE__ */ j(ct, [["__scopeId", "data-v-f9015b7b"]]), mt = ["aria-disabled"], ft = ["id", "value", "checked", "disabled", "required", "name"], bt = /* @__PURE__ */ S({
999
+ __name: "JoySelectableItem",
1000
+ props: {
1001
+ disabled: {
1002
+ type: Boolean,
1003
+ default: !1
1004
+ },
1005
+ /** Mandatory in order to link the label and the actual input */
1006
+ id: {
1007
+ type: String,
1008
+ required: !0
1009
+ },
1010
+ invalid: {
1011
+ type: Boolean,
1012
+ default: !1
1013
+ },
1014
+ multiple: {
1015
+ type: Boolean,
1016
+ default: !1
1017
+ },
1018
+ name: {
1019
+ type: String
1020
+ },
1021
+ required: {
1022
+ type: Boolean,
1023
+ default: !1
1024
+ },
1025
+ checked: {
1026
+ type: Boolean
1027
+ },
1028
+ value: {
1029
+ type: String
1030
+ }
1031
+ },
1032
+ emits: ["update:checked"],
1033
+ setup(e, { emit: n }) {
1034
+ const a = e, t = _(a.checked), o = _(), s = a.multiple ? "div" : "label", c = {
1035
+ onRadioChange: () => {
1036
+ n("update:checked", a.value);
1037
+ },
1038
+ onClick: () => {
1039
+ a.checked && !a.multiple && n("update:checked", "");
1040
+ },
1041
+ onLabelClick: (u) => {
1042
+ a.multiple || u.stopPropagation();
1043
+ }
1044
+ };
1045
+ function l(u) {
1046
+ n("update:checked", u);
1047
+ }
1048
+ return (u, g) => (i(), r("div", {
1049
+ class: "joy-selectable-item__wrapper",
1050
+ "aria-disabled": e.disabled,
1051
+ onClick: g[2] || (g[2] = //@ts-ignore
1052
+ (...p) => c.onClick && c.onClick(...p))
1053
+ }, [
1054
+ e.multiple ? f("", !0) : (i(), r("input", {
1055
+ key: 0,
1056
+ id: e.id,
1057
+ ref_key: "inputRadio",
1058
+ ref: o,
1059
+ type: "radio",
1060
+ value: e.value,
1061
+ checked: e.checked,
1062
+ disabled: e.disabled,
1063
+ required: e.required,
1064
+ name: e.name,
1065
+ onChange: g[0] || (g[0] = //@ts-ignore
1066
+ (...p) => c.onRadioChange && c.onRadioChange(...p))
1067
+ }, null, 40, ft)),
1068
+ (i(), V(z(b(s)), {
1069
+ for: e.id,
1070
+ class: v([
1071
+ "joy-selectable-item",
1072
+ {
1073
+ "joy-selectable-item--disabled": e.disabled,
1074
+ "joy-selectable-item--checked": e.checked,
1075
+ "joy-selectable-item--multiple": e.multiple,
1076
+ "joy-selectable-item--single": !e.multiple
1077
+ }
1078
+ ]),
1079
+ onClick: c.onLabelClick
1080
+ }, {
1081
+ default: q(() => [
1082
+ e.multiple ? (i(), V(b(N), {
1083
+ key: 0,
1084
+ id: e.id,
1085
+ checked: t.value,
1086
+ "onUpdate:checked": [
1087
+ g[1] || (g[1] = (p) => t.value = p),
1088
+ l
1089
+ ],
1090
+ disabled: e.disabled,
1091
+ value: e.value,
1092
+ name: e.name,
1093
+ required: e.required
1094
+ }, {
1095
+ default: q(() => [
1096
+ m(u.$slots, "default", {}, void 0, !0)
1097
+ ]),
1098
+ _: 3
1099
+ }, 8, ["id", "checked", "disabled", "value", "name", "required"])) : f("", !0),
1100
+ e.multiple ? f("", !0) : m(u.$slots, "default", { key: 1 }, void 0, !0),
1101
+ d("div", {
1102
+ class: v([{ "joy-selectable-item__sublabel": u.$slots["selectable-item-sublabel"] }])
1103
+ }, [
1104
+ m(u.$slots, "selectable-item-sublabel", {}, void 0, !0)
1105
+ ], 2)
1106
+ ]),
1107
+ _: 3
1108
+ }, 8, ["for", "class", "onClick"]))
1109
+ ], 8, mt));
1110
+ }
1111
+ });
1112
+ const W = /* @__PURE__ */ j(bt, [["__scopeId", "data-v-6fdac15a"]]), vt = ["id"], gt = /* @__PURE__ */ S({
1113
+ __name: "JoySelectableItemGroup",
1114
+ props: {
1115
+ options: {
1116
+ type: Array,
1117
+ required: !0,
1118
+ validator(e) {
1119
+ const n = e.every((t) => Object.keys(t).includes("value")), a = e.every((t) => Object.keys(t).includes("label"));
1120
+ return n && a;
1121
+ }
1122
+ },
1123
+ id: String,
1124
+ value: {
1125
+ type: [String, Array],
1126
+ default: null
1127
+ },
1128
+ multiple: {
1129
+ type: Boolean,
1130
+ default: !1
1131
+ },
1132
+ fullWidth: {
1133
+ type: Boolean,
1134
+ default: !1
1135
+ },
1136
+ required: {
1137
+ type: Boolean,
1138
+ default: !1
1139
+ },
1140
+ label: String,
1141
+ labelSize: {
1142
+ type: String,
1143
+ default: "medium"
1144
+ },
1145
+ optionalLabel: String,
1146
+ requiredMark: {
1147
+ type: Boolean,
1148
+ default: !1
1149
+ }
1150
+ },
1151
+ emits: ["update:value"],
1152
+ setup(e, { emit: n }) {
1153
+ const a = e;
1154
+ function t(s) {
1155
+ return typeof a.value == "string" ? a.value === s.value : (a.value || []).includes(s.value);
1156
+ }
1157
+ function o(s, c) {
1158
+ if (!a.multiple)
1159
+ return n("update:value", c);
1160
+ let l = [...a.value || []];
1161
+ c && typeof c == "boolean" ? l.push(s) : l.splice(l.indexOf(s), 1), n("update:value", l);
1162
+ }
1163
+ return (s, c) => (i(), r("fieldset", {
1164
+ id: e.id,
1165
+ class: "joy-selectable-item-group__wrapper"
1166
+ }, [
1167
+ e.label ? (i(), V(b(C), {
1168
+ key: 0,
1169
+ "tag-name": "legend",
1170
+ required: e.required && e.requiredMark,
1171
+ "optional-label": e.optionalLabel,
1172
+ size: e.labelSize
1173
+ }, {
1174
+ default: q(() => [
1175
+ B($(e.label), 1)
1176
+ ]),
1177
+ _: 1
1178
+ }, 8, ["required", "optional-label", "size"])) : f("", !0),
1179
+ d("div", {
1180
+ class: v([
1181
+ "joy-selectable-item-group",
1182
+ {
1183
+ "joy-selectable-item-group--multiple": e.multiple,
1184
+ "joy-selectable-item-group--single": !e.multiple,
1185
+ "joy-selectable-item-group--full": e.fullWidth
1186
+ }
1187
+ ])
1188
+ }, [
1189
+ (i(!0), r(F, null, A(e.options, (l) => (i(), V(b(W), {
1190
+ id: l.id,
1191
+ key: l.id,
1192
+ name: l.name,
1193
+ value: l.value,
1194
+ multiple: e.multiple,
1195
+ checked: t(l),
1196
+ "onUpdate:checked": (u) => o(l.value, u)
1197
+ }, K({
1198
+ default: q(() => [
1199
+ B($(l.label) + " ", 1)
1200
+ ]),
1201
+ _: 2
1202
+ }, [
1203
+ l.subLabel ? {
1204
+ name: "selectable-item-sublabel",
1205
+ fn: q(() => [
1206
+ B($(l.subLabel), 1)
1207
+ ]),
1208
+ key: "0"
1209
+ } : void 0
1210
+ ]), 1032, ["id", "name", "value", "multiple", "checked", "onUpdate:checked"]))), 128))
1211
+ ], 2)
1212
+ ], 8, vt));
1213
+ }
1214
+ });
1215
+ const ht = /* @__PURE__ */ j(gt, [["__scopeId", "data-v-93c88f70"]]), pt = /* @__PURE__ */ S({
903
1216
  __name: "JoyWrapper",
904
1217
  props: {
905
1218
  justify: {
@@ -920,74 +1233,64 @@ const nt = /* @__PURE__ */ p(lt, [["__scopeId", "data-v-f9015b7b"]]), ot = /* @_
920
1233
  }
921
1234
  },
922
1235
  setup(e) {
923
- return (l, t) => (i(), u("div", {
924
- class: y(["joy-wrapper", `joy-wrapper--justify-${e.justify}`, `joy-wrapper--align-${e.align}`, `joy-wrapper--direction-${e.direction}`, `joy-wrapper--wrap-${e.wrap}`])
1236
+ return (n, a) => (i(), r("div", {
1237
+ class: v(["joy-wrapper", `joy-wrapper--justify-${e.justify}`, `joy-wrapper--align-${e.align}`, `joy-wrapper--direction-${e.direction}`, `joy-wrapper--wrap-${e.wrap}`])
925
1238
  }, [
926
- s(l.$slots, "default", {}, void 0, !0)
1239
+ m(n.$slots, "default", {}, void 0, !0)
927
1240
  ], 2));
928
1241
  }
929
1242
  });
930
- const it = /* @__PURE__ */ p(ot, [["__scopeId", "data-v-ce0e1214"]]), dt = { class: "joy-template__heading" }, rt = { class: "joy-template__heading___headings" }, ut = /* @__PURE__ */ h({
1243
+ const kt = /* @__PURE__ */ j(pt, [["__scopeId", "data-v-ce0e1214"]]), St = { class: "joy-template__heading" }, jt = { key: 0 }, _t = { class: "joy-template__heading___headings" }, $t = { key: 0 }, xt = { key: 1 }, It = { key: 0 }, qt = { key: 1 }, Bt = /* @__PURE__ */ S({
931
1244
  __name: "JoyTemplate",
932
1245
  props: {
933
1246
  full: { type: Boolean, default: !1 },
934
1247
  sidebar: { type: String, default: "right" }
935
1248
  },
936
1249
  setup(e) {
937
- const l = e;
938
- return (t, a) => (i(), u("main", {
939
- class: y(["joy-template", { "joy-template--full": l.full }])
1250
+ const n = e, a = L();
1251
+ return (t, o) => (i(), r("main", {
1252
+ class: v(["joy-template", { "joy-template--full": n.full }])
940
1253
  }, [
941
- n("div", dt, [
942
- n("div", {
943
- class: y({ "joy-template-slot-back": t.$slots["template-back"] })
944
- }, [
945
- s(t.$slots, "template-back", {}, void 0, !0)
946
- ], 2),
947
- n("div", rt, [
948
- n("div", {
949
- class: y({ "joy-template-slot-title": t.$slots["template-title"] })
950
- }, [
951
- s(t.$slots, "template-title", {}, void 0, !0)
952
- ], 2),
953
- n("div", {
954
- class: y({ "joy-template-slot-subtitle": t.$slots["template-subtitle"] })
955
- }, [
956
- s(t.$slots, "template-subtitle", {}, void 0, !0)
957
- ], 2)
1254
+ d("div", St, [
1255
+ b(a)["template-back"] ? (i(), r("div", jt, [
1256
+ m(t.$slots, "template-back", {}, void 0, !0)
1257
+ ])) : f("", !0),
1258
+ d("div", _t, [
1259
+ b(a)["template-title"] ? (i(), r("div", $t, [
1260
+ m(t.$slots, "template-title", {}, void 0, !0)
1261
+ ])) : f("", !0),
1262
+ b(a)["template-subtitle"] ? (i(), r("div", xt, [
1263
+ m(t.$slots, "template-subtitle", {}, void 0, !0)
1264
+ ])) : f("", !0)
958
1265
  ])
959
1266
  ]),
960
- n("div", {
961
- class: y([
1267
+ d("div", {
1268
+ class: v([
962
1269
  "joy-template__content",
963
1270
  {
964
- "joy-template__content--reverse": l.sidebar === "left"
1271
+ "joy-template__content--reverse": n.sidebar === "left"
965
1272
  }
966
1273
  ])
967
1274
  }, [
968
- n("div", {
969
- class: y({ "joy-template-slot-main": t.$slots["template-main"] })
970
- }, [
971
- s(t.$slots, "template-main", {}, void 0, !0)
972
- ], 2),
973
- n("div", {
974
- class: y({ "joy-template-slot-sidebar": t.$slots["template-sidebar"] })
975
- }, [
976
- s(t.$slots, "template-sidebar", {}, void 0, !0)
977
- ], 2)
1275
+ t.$slots["template-main"] ? (i(), r("div", It, [
1276
+ m(t.$slots, "template-main", {}, void 0, !0)
1277
+ ])) : f("", !0),
1278
+ t.$slots["template-sidebar"] ? (i(), r("div", qt, [
1279
+ m(t.$slots, "template-sidebar", {}, void 0, !0)
1280
+ ])) : f("", !0)
978
1281
  ], 2)
979
1282
  ], 2));
980
1283
  }
981
1284
  });
982
- const st = /* @__PURE__ */ p(ut, [["__scopeId", "data-v-2333416c"]]), ct = ["aria-disabled"], yt = ["id", "disabled", "name", "required", "minlength", "value"], mt = {
1285
+ const Vt = /* @__PURE__ */ j(Bt, [["__scopeId", "data-v-ba1a4be0"]]), Jt = ["aria-disabled"], Ct = ["id", "disabled", "name", "required", "minlength", "value"], wt = {
983
1286
  key: 0,
984
1287
  class: "joy-textarea_helpers"
985
- }, ft = {
1288
+ }, Lt = {
986
1289
  key: 0,
987
1290
  name: "check",
988
1291
  color: "grey",
989
1292
  size: "xxsmall"
990
- }, vt = /* @__PURE__ */ h({
1293
+ }, zt = /* @__PURE__ */ S({
991
1294
  __name: "JoyTextarea",
992
1295
  props: {
993
1296
  disabled: {
@@ -1038,56 +1341,56 @@ const st = /* @__PURE__ */ p(ut, [["__scopeId", "data-v-2333416c"]]), ct = ["ari
1038
1341
  }
1039
1342
  },
1040
1343
  emits: ["update:modelValue"],
1041
- setup(e, { expose: l, emit: t }) {
1042
- const a = e, o = S(), m = S(), _ = S(!1), r = I(() => a.maxlength ? a.modelValue.length > a.maxlength : !1), c = I(() => a.minlength ? a.modelValue.length < a.minlength : !1);
1043
- function j() {
1044
- o.value && a.autogrow && (o.value.style.height = "auto", o.value.style.height = o.value.scrollHeight + "px", m.value && (m.value.style.height = o.value.scrollHeight + "px"));
1344
+ setup(e, { expose: n, emit: a }) {
1345
+ const t = e, o = _(), s = _(), c = _(!1), l = J(() => t.maxlength ? t.modelValue.length > t.maxlength : !1), u = J(() => t.minlength ? t.modelValue.length < t.minlength : !1);
1346
+ function g() {
1347
+ o.value && t.autogrow && (o.value.style.height = "auto", o.value.style.height = o.value.scrollHeight + "px", s.value && (s.value.style.height = o.value.scrollHeight + "px"));
1045
1348
  }
1046
- T(() => {
1047
- j();
1349
+ E(() => {
1350
+ g();
1048
1351
  });
1049
- const x = {
1050
- onInput: (k) => {
1051
- t("update:modelValue", k.target.value), j();
1352
+ const p = {
1353
+ onInput: (I) => {
1354
+ a("update:modelValue", I.target.value), g();
1052
1355
  },
1053
1356
  onBlur: () => {
1054
- _.value = r.value || c.value;
1357
+ c.value = l.value || u.value;
1055
1358
  }
1056
1359
  };
1057
- return l({
1058
- isInvalid: _,
1059
- valueOverMaxlength: r,
1060
- valueUnderMinlength: c
1061
- }), (k, v) => (i(), u("div", {
1360
+ return n({
1361
+ isInvalid: c,
1362
+ valueOverMaxlength: l,
1363
+ valueUnderMinlength: u
1364
+ }), (I, k) => (i(), r("div", {
1062
1365
  "aria-disabled": e.disabled,
1063
- class: y([
1366
+ class: v([
1064
1367
  "joy-textarea",
1065
1368
  {
1066
- "joy-textarea_invalid": _.value || e.invalid,
1369
+ "joy-textarea_invalid": c.value || e.invalid,
1067
1370
  "joy-textarea_disabled": e.disabled,
1068
1371
  "joy-textarea_autogrow": e.autogrow
1069
1372
  }
1070
1373
  ])
1071
1374
  }, [
1072
- R(g(C), {
1375
+ R(b(C), {
1073
1376
  for: e.id,
1074
1377
  required: e.required && e.requiredMark,
1075
1378
  "optional-label": e.optionalLabel,
1076
1379
  size: e.labelSize
1077
1380
  }, {
1078
1381
  default: q(() => [
1079
- s(k.$slots, "default", {}, () => [
1080
- B(V(e.label), 1)
1382
+ m(I.$slots, "default", {}, () => [
1383
+ B($(e.label), 1)
1081
1384
  ], !0)
1082
1385
  ]),
1083
1386
  _: 3
1084
1387
  }, 8, ["for", "required", "optional-label", "size"]),
1085
- n("div", {
1388
+ d("div", {
1086
1389
  ref_key: "textareaWrapper",
1087
- ref: m,
1390
+ ref: s,
1088
1391
  class: "joy-textarea_wrapper"
1089
1392
  }, [
1090
- n("textarea", w(k.$attrs, {
1393
+ d("textarea", w(I.$attrs, {
1091
1394
  id: e.id,
1092
1395
  ref_key: "textarea",
1093
1396
  ref: o,
@@ -1097,29 +1400,29 @@ const st = /* @__PURE__ */ p(ut, [["__scopeId", "data-v-2333416c"]]), ct = ["ari
1097
1400
  required: e.required,
1098
1401
  minlength: e.minlength,
1099
1402
  value: e.modelValue,
1100
- onInput: v[0] || (v[0] = //@ts-ignore
1101
- (...d) => x.onInput && x.onInput(...d)),
1102
- onBlur: v[1] || (v[1] = //@ts-ignore
1103
- (...d) => x.onBlur && x.onBlur(...d))
1104
- }), null, 16, yt)
1403
+ onInput: k[0] || (k[0] = //@ts-ignore
1404
+ (...y) => p.onInput && p.onInput(...y)),
1405
+ onBlur: k[1] || (k[1] = //@ts-ignore
1406
+ (...y) => p.onBlur && p.onBlur(...y))
1407
+ }), null, 16, Ct)
1105
1408
  ], 512),
1106
- e.minlength || e.maxlength ? (i(), u("div", mt, [
1107
- e.minlength ? (i(), u("p", {
1409
+ e.minlength || e.maxlength ? (i(), r("div", wt, [
1410
+ e.minlength ? (i(), r("p", {
1108
1411
  key: 0,
1109
- class: y(["joy-textarea-min", { "joy-textarea-min-invalid": e.invalid }])
1412
+ class: v(["joy-textarea-min", { "joy-textarea-min-invalid": e.invalid }])
1110
1413
  }, [
1111
- g(c) ? b("", !0) : (i(), u("joy-icon", ft)),
1112
- B(" " + V(e.minlengthLabel || `Minimum ${e.minlength} characters`), 1)
1113
- ], 2)) : b("", !0),
1114
- e.maxlength ? (i(), u("p", {
1414
+ b(u) ? f("", !0) : (i(), r("joy-icon", Lt)),
1415
+ B(" " + $(e.minlengthLabel || `Minimum ${e.minlength} characters`), 1)
1416
+ ], 2)) : f("", !0),
1417
+ e.maxlength ? (i(), r("p", {
1115
1418
  key: 1,
1116
- class: y(["joy-textarea-count", { "joy-textarea-count-invalid": g(r) }])
1117
- }, V(e.modelValue.length + "/" + e.maxlength), 3)) : b("", !0)
1118
- ])) : b("", !0)
1119
- ], 10, ct));
1419
+ class: v(["joy-textarea-count", { "joy-textarea-count-invalid": b(l) }])
1420
+ }, $(e.modelValue.length + "/" + e.maxlength), 3)) : f("", !0)
1421
+ ])) : f("", !0)
1422
+ ], 10, Jt));
1120
1423
  }
1121
1424
  });
1122
- const gt = /* @__PURE__ */ p(vt, [["__scopeId", "data-v-d68ef0dd"]]), bt = ["name", "disabled", "checked", "required", "aria-checked", "value"], ht = { class: "joy-toggle__content" }, pt = /* @__PURE__ */ h({
1425
+ const Mt = /* @__PURE__ */ j(zt, [["__scopeId", "data-v-d68ef0dd"]]), Tt = ["name", "disabled", "checked", "required", "aria-checked", "value"], Et = { class: "joy-toggle__content" }, Nt = /* @__PURE__ */ S({
1123
1426
  __name: "JoyToggle",
1124
1427
  props: {
1125
1428
  modelValue: {
@@ -1152,16 +1455,16 @@ const gt = /* @__PURE__ */ p(vt, [["__scopeId", "data-v-d68ef0dd"]]), bt = ["nam
1152
1455
  label: String
1153
1456
  },
1154
1457
  emits: ["update:modelValue"],
1155
- setup(e, { emit: l }) {
1156
- const t = {
1157
- onChange: (a) => {
1158
- const o = a.target.checked;
1159
- l("update:modelValue", o);
1458
+ setup(e, { emit: n }) {
1459
+ const a = {
1460
+ onChange: (t) => {
1461
+ const o = t.target.checked;
1462
+ n("update:modelValue", o);
1160
1463
  }
1161
1464
  };
1162
- return (a, o) => (i(), u("div", null, [
1163
- n("label", {
1164
- class: y([
1465
+ return (t, o) => (i(), r("div", null, [
1466
+ d("label", {
1467
+ class: v([
1165
1468
  "joy-toggle",
1166
1469
  {
1167
1470
  "joy-toggle__checked": e.modelValue,
@@ -1169,7 +1472,7 @@ const gt = /* @__PURE__ */ p(vt, [["__scopeId", "data-v-d68ef0dd"]]), bt = ["nam
1169
1472
  }
1170
1473
  ])
1171
1474
  }, [
1172
- n("input", {
1475
+ d("input", {
1173
1476
  ref: "input",
1174
1477
  type: "checkbox",
1175
1478
  class: "joy-toggle__input",
@@ -1181,58 +1484,64 @@ const gt = /* @__PURE__ */ p(vt, [["__scopeId", "data-v-d68ef0dd"]]), bt = ["nam
1181
1484
  "aria-checked": e.modelValue,
1182
1485
  value: e.value,
1183
1486
  onChange: o[0] || (o[0] = //@ts-ignore
1184
- (...m) => t.onChange && t.onChange(...m))
1185
- }, null, 40, bt),
1186
- n("p", ht, [
1187
- s(a.$slots, "default", {}, () => [
1188
- B(V(e.label), 1)
1487
+ (...s) => a.onChange && a.onChange(...s))
1488
+ }, null, 40, Tt),
1489
+ d("p", Et, [
1490
+ m(t.$slots, "default", {}, () => [
1491
+ B($(e.label), 1)
1189
1492
  ], !0)
1190
1493
  ])
1191
1494
  ], 2)
1192
1495
  ]));
1193
1496
  }
1194
1497
  });
1195
- const _t = /* @__PURE__ */ p(pt, [["__scopeId", "data-v-e31a6b5e"]]), jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1498
+ const Ot = /* @__PURE__ */ j(Nt, [["__scopeId", "data-v-e31a6b5e"]]), Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1196
1499
  __proto__: null,
1197
- JoyButton: ae,
1198
- JoyCheckbox: re,
1199
- JoyCounter: _e,
1200
- JoyFormError: O,
1201
- JoyHighlight: qe,
1202
- JoyInput: Re,
1500
+ JoyButton: de,
1501
+ JoyCheckbox: N,
1502
+ JoyCounter: $e,
1503
+ JoyFormError: U,
1504
+ JoyHighlight: ze,
1505
+ JoyInput: He,
1203
1506
  JoyLabel: C,
1204
- JoyLink: Ge,
1205
- JoyRadio: Ke,
1206
- JoyRadioGroup: Ye,
1207
- JoySelect: nt,
1208
- JoySpinner: F,
1209
- JoyTemplate: st,
1210
- JoyTextarea: gt,
1211
- JoyToggle: _t,
1212
- JoyWrapper: it
1213
- }, Symbol.toStringTag, { value: "Module" })), $t = {
1507
+ JoyLink: De,
1508
+ JoyMultiCheckbox: Xe,
1509
+ JoyRadio: nt,
1510
+ JoyRadioGroup: dt,
1511
+ JoySelect: yt,
1512
+ JoySelectableItem: W,
1513
+ JoySelectableItemGroup: ht,
1514
+ JoySpinner: H,
1515
+ JoyTemplate: Vt,
1516
+ JoyTextarea: Mt,
1517
+ JoyToggle: Ot,
1518
+ JoyWrapper: kt
1519
+ }, Symbol.toStringTag, { value: "Module" })), At = {
1214
1520
  install: (e) => {
1215
- Object.entries(jt).forEach(([l, t]) => {
1216
- e.component(l, t);
1521
+ Object.entries(Rt).forEach(([n, a]) => {
1522
+ e.component(n, a);
1217
1523
  });
1218
1524
  }
1219
1525
  };
1220
1526
  export {
1221
- ae as JoyButton,
1222
- re as JoyCheckbox,
1223
- _e as JoyCounter,
1224
- O as JoyFormError,
1225
- qe as JoyHighlight,
1226
- Re as JoyInput,
1527
+ de as JoyButton,
1528
+ N as JoyCheckbox,
1529
+ $e as JoyCounter,
1530
+ U as JoyFormError,
1531
+ ze as JoyHighlight,
1532
+ He as JoyInput,
1227
1533
  C as JoyLabel,
1228
- Ge as JoyLink,
1229
- Ke as JoyRadio,
1230
- Ye as JoyRadioGroup,
1231
- nt as JoySelect,
1232
- F as JoySpinner,
1233
- st as JoyTemplate,
1234
- gt as JoyTextarea,
1235
- _t as JoyToggle,
1236
- $t as JoyVuePlugin,
1237
- it as JoyWrapper
1534
+ De as JoyLink,
1535
+ Xe as JoyMultiCheckbox,
1536
+ nt as JoyRadio,
1537
+ dt as JoyRadioGroup,
1538
+ yt as JoySelect,
1539
+ W as JoySelectableItem,
1540
+ ht as JoySelectableItemGroup,
1541
+ H as JoySpinner,
1542
+ Vt as JoyTemplate,
1543
+ Mt as JoyTextarea,
1544
+ Ot as JoyToggle,
1545
+ At as JoyVuePlugin,
1546
+ kt as JoyWrapper
1238
1547
  };