@leaflink/stash 44.0.0-beta.2 → 44.0.0-beta.4

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 (41) hide show
  1. package/dist/ActionsDropdown.js +4 -4
  2. package/dist/ActionsDropdown.js.map +1 -1
  3. package/dist/AppNavigationItem.js +8 -8
  4. package/dist/AppNavigationItem.js.map +1 -1
  5. package/dist/ButtonGroup.js +2 -2
  6. package/dist/ButtonGroup.js.map +1 -1
  7. package/dist/DataViewSortButton.js +10 -10
  8. package/dist/DataViewSortButton.js.map +1 -1
  9. package/dist/DatePicker.js +2 -2
  10. package/dist/DatePicker.js.map +1 -1
  11. package/dist/DescriptionListTerm.js +1 -1
  12. package/dist/DescriptionListTerm.js.map +1 -1
  13. package/dist/Divider.js +3 -3
  14. package/dist/Divider.js.map +1 -1
  15. package/dist/FileUpload.js +14 -14
  16. package/dist/FileUpload.js.map +1 -1
  17. package/dist/FilterDropdown.js +1 -1
  18. package/dist/FilterDropdown.js.map +1 -1
  19. package/dist/Filters.js +6 -6
  20. package/dist/Filters.js.map +1 -1
  21. package/dist/IconLabel.js +10 -10
  22. package/dist/IconLabel.js.map +1 -1
  23. package/dist/Image.js +1 -1
  24. package/dist/Image.js.map +1 -1
  25. package/dist/Input.js +2 -2
  26. package/dist/Input.js.map +1 -1
  27. package/dist/InputOptions.js +8 -8
  28. package/dist/InputOptions.js.map +1 -1
  29. package/dist/ListView.js +37 -37
  30. package/dist/ListView.js.map +1 -1
  31. package/dist/ObfuscateText.js +4 -4
  32. package/dist/ObfuscateText.js.map +1 -1
  33. package/dist/RadioGroup.js +103 -103
  34. package/dist/RadioGroup.js.map +1 -1
  35. package/dist/RadioNew.js +2 -2
  36. package/dist/Select.js +3 -3
  37. package/dist/Select.js.map +1 -1
  38. package/dist/TableHeaderCell.js +2 -2
  39. package/dist/TableHeaderCell.js.map +1 -1
  40. package/dist/components.css +1 -1
  41. package/package.json +1 -1
@@ -1,150 +1,150 @@
1
- import { defineComponent as y, inject as x, openBlock as d, createElementBlock as n, Fragment as w, renderList as V, unref as e, normalizeClass as v, createElementVNode as i, toDisplayString as h, provide as g, computed as b, createBlock as B, withCtx as T, renderSlot as R, resolveDynamicComponent as C } from "vue";
1
+ import { defineComponent as w, inject as $, openBlock as d, createElementBlock as n, Fragment as x, renderList as V, unref as e, normalizeClass as v, createElementVNode as r, toDisplayString as h, provide as g, computed as b, createBlock as B, withCtx as T, renderSlot as R, resolveDynamicComponent as C } from "vue";
2
2
  import E from "lodash-es/uniqueId";
3
3
  import { _ as G } from "./Field.vue_vue_type_script_setup_true_lang-42cf79d4.js";
4
- import { R as $ } from "./RadioGroup.keys-974818d6.js";
4
+ import { R as y } from "./RadioGroup.keys-974818d6.js";
5
5
  import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
6
6
  import "./Label.vue_vue_type_script_setup_true_lang-c5589919.js";
7
7
  import "./locale.js";
8
8
  import "lodash-es/get";
9
- const O = { class: "root flex" }, W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @__PURE__ */ y({
9
+ const O = { class: "root tw-flex" }, W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @__PURE__ */ w({
10
10
  __name: "VariantButton",
11
11
  setup(u) {
12
- const r = x($.key);
13
- if (!r)
12
+ const i = $(y.key);
13
+ if (!i)
14
14
  throw new Error("VariantButton must be used with a RadioGroup instance.");
15
- const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
15
+ const { name: t, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = i;
16
16
  return (I, c) => (d(), n("div", O, [
17
- (d(!0), n(w, null, V(e(o), (t) => (d(), n("div", {
18
- key: `${e(a)}-${t.id}`,
19
- class: v([{ "w-full": e(m) }])
17
+ (d(!0), n(x, null, V(e(o), (a) => (d(), n("div", {
18
+ key: `${e(t)}-${a.id}`,
19
+ class: v([{ "tw-w-full": e(m) }])
20
20
  }, [
21
- i("input", {
22
- id: `${e(a)}-${t.id}`,
21
+ r("input", {
22
+ id: `${e(t)}-${a.id}`,
23
23
  class: "sr-only",
24
24
  type: "radio",
25
- name: e(a),
26
- value: t.value,
27
- checked: e(l) === t.value,
28
- disabled: e(p) || t.disabled,
25
+ name: e(t),
26
+ value: a.value,
27
+ checked: e(l) === a.value,
28
+ disabled: e(p) || a.disabled,
29
29
  onInput: c[0] || (c[0] = //@ts-ignore
30
30
  (...f) => e(s) && e(s)(...f))
31
31
  }, null, 40, W),
32
- i("label", {
33
- for: `${e(a)}-${t.id}`
34
- }, h(t.text), 9, j)
32
+ r("label", {
33
+ for: `${e(t)}-${a.id}`
34
+ }, h(a.text), 9, j)
35
35
  ], 2))), 128))
36
36
  ]));
37
37
  }
38
38
  });
39
- const S = /* @__PURE__ */ k(q, [["__scopeId", "data-v-0f829714"]]), D = { class: "root flex flex-wrap tw-my-1.5" }, L = ["id", "name", "value", "checked", "disabled"], N = ["for"], z = /* @__PURE__ */ y({
39
+ const S = /* @__PURE__ */ k(q, [["__scopeId", "data-v-7b71c8aa"]]), D = { class: "root tw-my-1.5 tw-flex tw-flex-wrap" }, L = ["id", "name", "value", "checked", "disabled"], N = ["for"], z = /* @__PURE__ */ w({
40
40
  __name: "VariantChip",
41
41
  setup(u) {
42
- const r = x($.key);
43
- if (!r)
42
+ const i = $(y.key);
43
+ if (!i)
44
44
  throw new Error("VariantChip must be used with a RadioGroup instance.");
45
- const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
45
+ const { name: t, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = i;
46
46
  return (I, c) => (d(), n("div", D, [
47
- (d(!0), n(w, null, V(e(o), (t) => (d(), n("div", {
48
- key: `${e(a)}-${t.id}`,
49
- class: v([{ "w-full": e(m) }])
47
+ (d(!0), n(x, null, V(e(o), (a) => (d(), n("div", {
48
+ key: `${e(t)}-${a.id}`,
49
+ class: v([{ "tw-w-full": e(m) }])
50
50
  }, [
51
- i("input", {
52
- id: `${e(a)}-${t.id}`,
51
+ r("input", {
52
+ id: `${e(t)}-${a.id}`,
53
53
  class: "sr-only",
54
54
  type: "radio",
55
- name: e(a),
56
- value: t.value,
57
- checked: e(l) === t.value,
58
- disabled: e(p) || t.disabled,
55
+ name: e(t),
56
+ value: a.value,
57
+ checked: e(l) === a.value,
58
+ disabled: e(p) || a.disabled,
59
59
  onInput: c[0] || (c[0] = //@ts-ignore
60
60
  (...f) => e(s) && e(s)(...f))
61
61
  }, null, 40, L),
62
- i("label", {
63
- for: `${e(a)}-${t.id}`
64
- }, h(t.text), 9, N)
62
+ r("label", {
63
+ for: `${e(t)}-${a.id}`
64
+ }, h(a.text), 9, N)
65
65
  ], 2))), 128))
66
66
  ]));
67
67
  }
68
68
  });
69
- const A = /* @__PURE__ */ k(z, [["__scopeId", "data-v-3ce4d831"]]), F = { class: "root flex flex-wrap" }, J = ["id", "name", "value", "checked", "disabled"], M = ["for"], P = /* @__PURE__ */ y({
69
+ const A = /* @__PURE__ */ k(z, [["__scopeId", "data-v-b3ebd673"]]), F = { class: "root tw-flex tw-flex-wrap" }, J = ["id", "name", "value", "checked", "disabled"], M = ["for"], P = /* @__PURE__ */ w({
70
70
  __name: "VariantRadio",
71
71
  setup(u) {
72
- const r = x($.key);
73
- if (!r)
72
+ const i = $(y.key);
73
+ if (!i)
74
74
  throw new Error("VariantRadio must be used with a RadioGroup instance.");
75
- const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
75
+ const { name: t, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = i;
76
76
  return (I, c) => (d(), n("div", F, [
77
- (d(!0), n(w, null, V(e(o), (t) => (d(), n("div", {
78
- key: `${e(a)}-${t.id}`,
79
- class: v([{ "w-full": e(m) }])
77
+ (d(!0), n(x, null, V(e(o), (a) => (d(), n("div", {
78
+ key: `${e(t)}-${a.id}`,
79
+ class: v([{ "tw-w-full": e(m) }])
80
80
  }, [
81
- i("input", {
82
- id: `${e(a)}-${t.id}`,
81
+ r("input", {
82
+ id: `${e(t)}-${a.id}`,
83
83
  type: "radio",
84
- name: e(a),
85
- value: t.value,
86
- checked: e(l) === t.value,
87
- disabled: e(p) || t.disabled,
84
+ name: e(t),
85
+ value: a.value,
86
+ checked: e(l) === a.value,
87
+ disabled: e(p) || a.disabled,
88
88
  onInput: c[0] || (c[0] = //@ts-ignore
89
89
  (...f) => e(s) && e(s)(...f))
90
90
  }, null, 40, J),
91
- i("label", {
92
- for: `${e(a)}-${t.id}`
93
- }, h(t.text), 9, M)
91
+ r("label", {
92
+ for: `${e(t)}-${a.id}`
93
+ }, h(a.text), 9, M)
94
94
  ], 2))), 128))
95
95
  ]));
96
96
  }
97
97
  });
98
- const U = /* @__PURE__ */ k(P, [["__scopeId", "data-v-eec0806b"]]), H = { class: "root flex flex-wrap" }, K = ["for"], Q = ["id", "name", "value", "checked", "disabled"], X = { class: "color-ice-900 tw-m-0" }, Y = { class: "color-ice-700 tw-m-0" }, Z = /* @__PURE__ */ y({
98
+ const U = /* @__PURE__ */ k(P, [["__scopeId", "data-v-ae5fdd9e"]]), H = { class: "root tw-flex tw-flex-wrap" }, K = ["for"], Q = ["id", "name", "value", "checked", "disabled"], X = { class: "color-ice-900 tw-m-0" }, Y = { class: "color-ice-700 tw-m-0" }, Z = /* @__PURE__ */ w({
99
99
  __name: "VariantTile",
100
100
  setup(u) {
101
- const r = x($.key);
102
- if (!r)
101
+ const i = $(y.key);
102
+ if (!i)
103
103
  throw new Error("VariantTile must be used with a RadioGroup instance.");
104
- const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
104
+ const { name: t, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = i;
105
105
  return (I, c) => (d(), n("div", H, [
106
- (d(!0), n(w, null, V(e(o), (t) => (d(), n("label", {
107
- key: `${e(a)}-${t.id}`,
108
- class: v(["tile-container", { "w-full": e(m) }]),
109
- for: `${e(a)}-${t.id}`
106
+ (d(!0), n(x, null, V(e(o), (a) => (d(), n("label", {
107
+ key: `${e(t)}-${a.id}`,
108
+ class: v(["tile-container", { "tw-w-full": e(m) }]),
109
+ for: `${e(t)}-${a.id}`
110
110
  }, [
111
- i("div", {
112
- class: v(["tile-header border flex", {
113
- "border-blue-500 bg-blue-100 color-ice-900": e(l) === t.value,
114
- "border-ice-500 bg-ice-100 color-ice-700": e(l) !== t.value
111
+ r("div", {
112
+ class: v(["tile-header tw-flex tw-border", {
113
+ "border-blue-500 bg-blue-100 color-ice-900": e(l) === a.value,
114
+ "bg-ice-100 color-ice-700 tw-border-ice-500": e(l) !== a.value
115
115
  }])
116
116
  }, [
117
- i("input", {
118
- id: `${e(a)}-${t.id}`,
117
+ r("input", {
118
+ id: `${e(t)}-${a.id}`,
119
119
  class: "sr-only",
120
120
  type: "radio",
121
- name: e(a),
122
- value: t.value,
123
- checked: e(l) === t.value,
124
- disabled: e(p) || t.disabled,
121
+ name: e(t),
122
+ value: a.value,
123
+ checked: e(l) === a.value,
124
+ disabled: e(p) || a.disabled,
125
125
  onInput: c[0] || (c[0] = //@ts-ignore
126
126
  (...f) => e(s) && e(s)(...f))
127
127
  }, null, 40, Q),
128
- i("div", null, [
129
- i("span", null, h(t.text), 1)
128
+ r("div", null, [
129
+ r("span", null, h(a.text), 1)
130
130
  ])
131
131
  ], 2),
132
- i("div", {
133
- class: v(["tile-body border-r border-b border-l", {
134
- "border-ice-500": e(l) !== t.value,
135
- "border-blue-500": e(l) === t.value
132
+ r("div", {
133
+ class: v(["tile-body tw-border-x tw-border-b", {
134
+ "tw-border-ice-500": e(l) !== a.value,
135
+ "border-blue-500": e(l) === a.value
136
136
  }])
137
137
  }, [
138
- i("p", X, h(t.subTitle), 1),
139
- i("p", Y, h(t.subText), 1)
138
+ r("p", X, h(a.subTitle), 1),
139
+ r("p", Y, h(a.subText), 1)
140
140
  ], 2)
141
141
  ], 10, K))), 128))
142
142
  ]));
143
143
  }
144
144
  });
145
- const ee = /* @__PURE__ */ k(Z, [["__scopeId", "data-v-8eb44db9"]]);
145
+ const ee = /* @__PURE__ */ k(Z, [["__scopeId", "data-v-d1625dbf"]]);
146
146
  var _ = /* @__PURE__ */ ((u) => (u.Radio = "radio", u.Button = "button", u.Chip = "chip", u.Tile = "tile", u))(_ || {});
147
- const ne = /* @__PURE__ */ y({
147
+ const ne = /* @__PURE__ */ w({
148
148
  __name: "RadioGroup",
149
149
  props: {
150
150
  name: { default: void 0 },
@@ -162,50 +162,50 @@ const ne = /* @__PURE__ */ y({
162
162
  showOptionalInLabel: { type: Boolean }
163
163
  },
164
164
  emits: ["update:modelValue"],
165
- setup(u, { emit: r }) {
166
- const a = u, p = {
165
+ setup(u, { emit: i }) {
166
+ const t = u, p = {
167
167
  [_.Button]: S,
168
168
  [_.Chip]: A,
169
169
  [_.Radio]: U,
170
170
  [_.Tile]: ee
171
171
  };
172
172
  function m(o) {
173
- r("update:modelValue", o.target.value);
173
+ i("update:modelValue", o.target.value);
174
174
  }
175
175
  const l = E("radio-group-field-error-");
176
- return g($.key, {
177
- name: b(() => a.name),
178
- disabled: b(() => a.disabled),
179
- fullWidth: b(() => a.fullWidth),
180
- modelValue: b(() => a.modelValue),
181
- options: b(() => a.options),
182
- variant: b(() => a.variant),
176
+ return g(y.key, {
177
+ name: b(() => t.name),
178
+ disabled: b(() => t.disabled),
179
+ fullWidth: b(() => t.fullWidth),
180
+ modelValue: b(() => t.modelValue),
181
+ options: b(() => t.options),
182
+ variant: b(() => t.variant),
183
183
  update: m
184
184
  }), (o, s) => (d(), B(G, {
185
185
  class: v([
186
186
  {
187
- "tw-flex": !a.options,
188
- "tw-flex-wrap": !a.options && (a.variant === e(_).Chip || a.variant === e(_).Radio),
189
- "tw-gap-x-1.5 tw-gap-y-3": !a.options && a.variant === e(_).Chip,
190
- "tw-gap-6": !a.options && (a.variant === e(_).Radio || a.variant === e(_).Tile)
187
+ "tw-flex": !t.options,
188
+ "tw-flex-wrap": !t.options && (t.variant === e(_).Chip || t.variant === e(_).Radio),
189
+ "tw-gap-x-1.5 tw-gap-y-3": !t.options && t.variant === e(_).Chip,
190
+ "tw-gap-6": !t.options && (t.variant === e(_).Radio || t.variant === e(_).Tile)
191
191
  }
192
192
  ]),
193
193
  "aria-errormessage": e(l),
194
- "aria-invalid": !!a.errorText,
194
+ "aria-invalid": !!t.errorText,
195
195
  role: "radiogroup",
196
196
  fieldset: "",
197
- label: a.label,
198
- "add-bottom-space": a.addBottomSpace,
197
+ label: t.label,
198
+ "add-bottom-space": t.addBottomSpace,
199
199
  "error-id": e(l),
200
- "error-text": a.errorText,
201
- "hint-text": a.hintText,
202
- "show-optional-in-label": a.showOptionalInLabel,
203
- "is-required": a.isRequired,
204
- "is-read-only": a.isReadOnly
200
+ "error-text": t.errorText,
201
+ "hint-text": t.hintText,
202
+ "show-optional-in-label": t.showOptionalInLabel,
203
+ "is-required": t.isRequired,
204
+ "is-read-only": t.isReadOnly
205
205
  }, {
206
206
  default: T(() => [
207
- a.options ? R(o.$slots, "default", { key: 0 }, () => [
208
- (d(), B(C(p[a.variant])))
207
+ t.options ? R(o.$slots, "default", { key: 0 }, () => [
208
+ (d(), B(C(p[t.variant])))
209
209
  ]) : R(o.$slots, "default", { key: 1 })
210
210
  ]),
211
211
  _: 3
@@ -213,7 +213,7 @@ const ne = /* @__PURE__ */ y({
213
213
  }
214
214
  });
215
215
  export {
216
- $ as RADIO_GROUP_INJECTION,
216
+ y as RADIO_GROUP_INJECTION,
217
217
  _ as RadioGroupVariant,
218
218
  ne as default
219
219
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../src/components/RadioGroup/components/VariantButton.vue","../src/components/RadioGroup/components/VariantChip.vue","../src/components/RadioGroup/components/VariantRadio.vue","../src/components/RadioGroup/components/VariantTile.vue","../src/components/RadioGroup/RadioGroup.types.ts","../src/components/RadioGroup/RadioGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantButton must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: var(--font-weight-semibold);\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root > div:first-child label {\n border-top-left-radius: var(--border-radius);\n border-bottom-left-radius: var(--border-radius);\n }\n\n .root > div:last-child label {\n border-top-right-radius: var(--border-radius);\n border-bottom-right-radius: var(--border-radius);\n }\n\n .root > div:not(:first-child) label {\n margin-left: -1px;\n }\n\n .root > div:not(:last-child) label {\n border-right-color: transparent;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantChip must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap tw-my-1.5\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n padding: var(--ll-space-1) var(--ll-space-2);\n border: 1px solid var(--color-ice-500);\n font-weight: var(--font-weight-normal);\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-white);\n background-color: var(--color-blue-500);\n font-weight: var(--font-weight-bold);\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantRadio must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input {\n appearance: none;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 5px;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n .root input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantTile must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap\">\n <label\n v-for=\"option in options\"\n :key=\"`${name}-${option.id}`\"\n class=\"tile-container\"\n :class=\"{ 'w-full': fullWidth }\"\n :for=\"`${name}-${option.id}`\"\n >\n <div\n class=\"tile-header border flex\"\n :class=\"{\n 'border-blue-500 bg-blue-100 color-ice-900': modelValue === option.value,\n 'border-ice-500 bg-ice-100 color-ice-700': modelValue !== option.value,\n }\"\n >\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <div>\n <span>\n {{ option.text }}\n </span>\n </div>\n </div>\n <div\n class=\"tile-body border-r border-b border-l\"\n :class=\"{\n 'border-ice-500': modelValue !== option.value,\n 'border-blue-500': modelValue === option.value,\n }\"\n >\n <p class=\"color-ice-900 tw-m-0\">{{ option.subTitle }}</p>\n <p class=\"color-ice-700 tw-m-0\">{{ option.subText }}</p>\n </div>\n </label>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n cursor: pointer;\n user-select: none;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n\n .root label.tile-container {\n border-radius: var(--border-radius);\n display: flex;\n flex: 1;\n flex-direction: column;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n padding: var(--ll-space-2) 0;\n }\n\n .root label.tile-container:hover .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .tile-body {\n border-radius: 0 0 var(--border-radius) var(--border-radius);\n background-color: var(--color-white);\n padding: var(--ll-space-3);\n display: flex;\n flex-direction: column;\n }\n\n .root label.tile-container:hover .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n\n .root input {\n appearance: none;\n background-color: var(--color-white);\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n }\n\n .root input ~ div {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root label.tile-container input {\n margin-left: var(--ll-space-2);\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n @media screen and (width <= 640px) {\n .root {\n flex-direction: column;\n }\n }\n</style>\n","import { ComputedRef } from 'vue';\n\nexport enum RadioGroupVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioGroupVariants = `${RadioGroupVariant}`;\n\n/**\n * An individual radio `<input>` within a RadioGroup instance\n */\nexport interface RadioGroupOption {\n /**\n * Disables the RadioGroupOption if truthy\n */\n disabled?: boolean;\n\n /**\n * The unique identifier for the option\n */\n id: string;\n\n /**\n * The text to be displayed for the option\n */\n text: string;\n\n /**\n * The value of the option. Used for the modelValue of the RadioGroup.\n */\n value: string;\n\n /**\n * The subtitle for tile variant\n */\n subTitle?: string;\n\n /**\n * The subtext for tile variant\n */\n subText?: string;\n}\n\n/**\n * Properties and utilities provided to children of a RadioGroup instance\n */\nexport interface RadioGroupInjection {\n /**\n * This type should match RadioGroupProps['disabled']\n */\n disabled: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['fullWidth']\n */\n fullWidth: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['modelValue']\n */\n modelValue: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['name']\n */\n name: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['options']\n */\n options: ComputedRef<RadioGroupOption[] | undefined>;\n\n /**\n * Triggered when the user changes their selection; updates the v-model.\n */\n update: (e: Event) => void;\n\n /**\n * This type should match RadioGroupProps['variant']\n * @default 'radio'\n */\n variant: ComputedRef<RadioGroupVariants | undefined>;\n}\n","<script lang=\"ts\">\n import { RadioGroupOption, RadioGroupVariant, RadioGroupVariants } from './RadioGroup.types';\n\n export * from './RadioGroup.keys';\n export * from './RadioGroup.types';\n\n export interface RadioGroupProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` elements within the RadioGroup.\n */\n name?: string;\n\n /**\n * Deprecated - Compose your radio group with the `Radio` component instead\n * @deprecated\n */\n options?: RadioGroupOption[];\n\n modelValue?: RadioGroupOption['value'];\n\n /**\n * @defaultValue 'radio'\n */\n variant?: RadioGroupVariants;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Adds spacing under the field that is consistent whether or not hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n }\n</script>\n\n<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, provide } from 'vue';\n\n import Field from '../Field/Field.vue';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RADIO_GROUP_INJECTION } from './RadioGroup.keys';\n\n const variantComponentsMap = {\n [RadioGroupVariant.Button]: VariantButton,\n [RadioGroupVariant.Chip]: VariantChip,\n [RadioGroupVariant.Radio]: VariantRadio,\n [RadioGroupVariant.Tile]: VariantTile,\n };\n\n const props = withDefaults(defineProps<RadioGroupProps>(), {\n variant: 'radio',\n disabled: false,\n fullWidth: false,\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n modelValue: undefined,\n name: undefined,\n options: undefined,\n });\n\n const emit =\n defineEmits<{\n /**\n * Occurs when the user selects a radio option. Also, it enables v-model usage on the component.\n */\n (e: 'update:modelValue', value: RadioGroupOption['value']): void;\n }>();\n\n function update(e: Event) {\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n\n const errorId = uniqueId('radio-group-field-error-');\n\n provide(RADIO_GROUP_INJECTION.key, {\n name: computed(() => props.name),\n disabled: computed(() => props.disabled),\n fullWidth: computed(() => props.fullWidth),\n modelValue: computed(() => props.modelValue),\n options: computed(() => props.options),\n variant: computed(() => props.variant),\n update,\n });\n</script>\n\n<template>\n <Field\n :class=\"[\n {\n 'tw-flex': !props.options,\n 'tw-flex-wrap':\n !props.options && (props.variant === RadioGroupVariant.Chip || props.variant === RadioGroupVariant.Radio),\n 'tw-gap-x-1.5 tw-gap-y-3': !props.options && props.variant === RadioGroupVariant.Chip,\n 'tw-gap-6':\n !props.options && (props.variant === RadioGroupVariant.Radio || props.variant === RadioGroupVariant.Tile),\n },\n ]\"\n :aria-errormessage=\"errorId\"\n :aria-invalid=\"!!props.errorText\"\n role=\"radiogroup\"\n fieldset\n :label=\"props.label\"\n :add-bottom-space=\"props.addBottomSpace\"\n :error-id=\"errorId\"\n :error-text=\"props.errorText\"\n :hint-text=\"props.hintText\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n :is-required=\"props.isRequired\"\n :is-read-only=\"props.isReadOnly\"\n >\n <slot v-if=\"props.options\">\n <component :is=\"variantComponentsMap[props.variant]\" />\n </slot>\n <slot v-else></slot>\n </Field>\n</template>\n"],"names":["radioGroupInjection","inject","RADIO_GROUP_INJECTION","name","disabled","fullWidth","modelValue","options","update","RadioGroupVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","e","emit","errorId","uniqueId","provide","computed","props"],"mappings":";;;;;;;;;;;AAKQ,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,wDAAwD;AAG1E,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,uDAAuD;AAGzE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTzD,IAAAS,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;iBCiFJC,IAAuB;AAAA,MAC3B,CAACD,EAAkB,MAAM,GAAGE;AAAA,MAC5B,CAACF,EAAkB,IAAI,GAAGG;AAAA,MAC1B,CAACH,EAAkB,KAAK,GAAGI;AAAA,MAC3B,CAACJ,EAAkB,IAAI,GAAGK;AAAA,IAAA;AAuB5B,aAASN,EAAOO,GAAU;AACnB,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;AAEM,UAAAE,IAAUC,EAAS,0BAA0B;AAEnD,WAAAC,EAAQjB,EAAsB,KAAK;AAAA,MACjC,MAAMkB,EAAS,MAAMC,EAAM,IAAI;AAAA,MAC/B,UAAUD,EAAS,MAAMC,EAAM,QAAQ;AAAA,MACvC,WAAWD,EAAS,MAAMC,EAAM,SAAS;AAAA,MACzC,YAAYD,EAAS,MAAMC,EAAM,UAAU;AAAA,MAC3C,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,QAAAb;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../src/components/RadioGroup/components/VariantButton.vue","../src/components/RadioGroup/components/VariantChip.vue","../src/components/RadioGroup/components/VariantRadio.vue","../src/components/RadioGroup/components/VariantTile.vue","../src/components/RadioGroup/RadioGroup.types.ts","../src/components/RadioGroup/RadioGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantButton must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root tw-flex\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: var(--font-weight-semibold);\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root > div:first-child label {\n border-top-left-radius: var(--border-radius);\n border-bottom-left-radius: var(--border-radius);\n }\n\n .root > div:last-child label {\n border-top-right-radius: var(--border-radius);\n border-bottom-right-radius: var(--border-radius);\n }\n\n .root > div:not(:first-child) label {\n margin-left: -1px;\n }\n\n .root > div:not(:last-child) label {\n border-right-color: transparent;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantChip must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root tw-my-1.5 tw-flex tw-flex-wrap\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n padding: var(--ll-space-1) var(--ll-space-2);\n border: 1px solid var(--color-ice-500);\n font-weight: var(--font-weight-normal);\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-white);\n background-color: var(--color-blue-500);\n font-weight: var(--font-weight-bold);\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantRadio must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root tw-flex tw-flex-wrap\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input {\n appearance: none;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 5px;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n .root input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantTile must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root tw-flex tw-flex-wrap\">\n <label\n v-for=\"option in options\"\n :key=\"`${name}-${option.id}`\"\n class=\"tile-container\"\n :class=\"{ 'tw-w-full': fullWidth }\"\n :for=\"`${name}-${option.id}`\"\n >\n <div\n class=\"tile-header tw-flex tw-border\"\n :class=\"{\n 'border-blue-500 bg-blue-100 color-ice-900': modelValue === option.value,\n 'bg-ice-100 color-ice-700 tw-border-ice-500': modelValue !== option.value,\n }\"\n >\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <div>\n <span>\n {{ option.text }}\n </span>\n </div>\n </div>\n <div\n class=\"tile-body tw-border-x tw-border-b\"\n :class=\"{\n 'tw-border-ice-500': modelValue !== option.value,\n 'border-blue-500': modelValue === option.value,\n }\"\n >\n <p class=\"color-ice-900 tw-m-0\">{{ option.subTitle }}</p>\n <p class=\"color-ice-700 tw-m-0\">{{ option.subText }}</p>\n </div>\n </label>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n cursor: pointer;\n user-select: none;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n\n .root label.tile-container {\n border-radius: var(--border-radius);\n display: flex;\n flex: 1;\n flex-direction: column;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n padding: var(--ll-space-2) 0;\n }\n\n .root label.tile-container:hover .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .tile-body {\n border-radius: 0 0 var(--border-radius) var(--border-radius);\n background-color: var(--color-white);\n padding: var(--ll-space-3);\n display: flex;\n flex-direction: column;\n }\n\n .root label.tile-container:hover .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n\n .root input {\n appearance: none;\n background-color: var(--color-white);\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n }\n\n .root input ~ div {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root label.tile-container input {\n margin-left: var(--ll-space-2);\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n @media screen and (width <= 640px) {\n .root {\n flex-direction: column;\n }\n }\n</style>\n","import { ComputedRef } from 'vue';\n\nexport enum RadioGroupVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioGroupVariants = `${RadioGroupVariant}`;\n\n/**\n * An individual radio `<input>` within a RadioGroup instance\n */\nexport interface RadioGroupOption {\n /**\n * Disables the RadioGroupOption if truthy\n */\n disabled?: boolean;\n\n /**\n * The unique identifier for the option\n */\n id: string;\n\n /**\n * The text to be displayed for the option\n */\n text: string;\n\n /**\n * The value of the option. Used for the modelValue of the RadioGroup.\n */\n value: string;\n\n /**\n * The subtitle for tile variant\n */\n subTitle?: string;\n\n /**\n * The subtext for tile variant\n */\n subText?: string;\n}\n\n/**\n * Properties and utilities provided to children of a RadioGroup instance\n */\nexport interface RadioGroupInjection {\n /**\n * This type should match RadioGroupProps['disabled']\n */\n disabled: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['fullWidth']\n */\n fullWidth: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['modelValue']\n */\n modelValue: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['name']\n */\n name: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['options']\n */\n options: ComputedRef<RadioGroupOption[] | undefined>;\n\n /**\n * Triggered when the user changes their selection; updates the v-model.\n */\n update: (e: Event) => void;\n\n /**\n * This type should match RadioGroupProps['variant']\n * @default 'radio'\n */\n variant: ComputedRef<RadioGroupVariants | undefined>;\n}\n","<script lang=\"ts\">\n import { RadioGroupOption, RadioGroupVariant, RadioGroupVariants } from './RadioGroup.types';\n\n export * from './RadioGroup.keys';\n export * from './RadioGroup.types';\n\n export interface RadioGroupProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` elements within the RadioGroup.\n */\n name?: string;\n\n /**\n * Deprecated - Compose your radio group with the `Radio` component instead\n * @deprecated\n */\n options?: RadioGroupOption[];\n\n modelValue?: RadioGroupOption['value'];\n\n /**\n * @defaultValue 'radio'\n */\n variant?: RadioGroupVariants;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Adds spacing under the field that is consistent whether or not hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n }\n</script>\n\n<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, provide } from 'vue';\n\n import Field from '../Field/Field.vue';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RADIO_GROUP_INJECTION } from './RadioGroup.keys';\n\n const variantComponentsMap = {\n [RadioGroupVariant.Button]: VariantButton,\n [RadioGroupVariant.Chip]: VariantChip,\n [RadioGroupVariant.Radio]: VariantRadio,\n [RadioGroupVariant.Tile]: VariantTile,\n };\n\n const props = withDefaults(defineProps<RadioGroupProps>(), {\n variant: 'radio',\n disabled: false,\n fullWidth: false,\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n modelValue: undefined,\n name: undefined,\n options: undefined,\n });\n\n const emit =\n defineEmits<{\n /**\n * Occurs when the user selects a radio option. Also, it enables v-model usage on the component.\n */\n (e: 'update:modelValue', value: RadioGroupOption['value']): void;\n }>();\n\n function update(e: Event) {\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n\n const errorId = uniqueId('radio-group-field-error-');\n\n provide(RADIO_GROUP_INJECTION.key, {\n name: computed(() => props.name),\n disabled: computed(() => props.disabled),\n fullWidth: computed(() => props.fullWidth),\n modelValue: computed(() => props.modelValue),\n options: computed(() => props.options),\n variant: computed(() => props.variant),\n update,\n });\n</script>\n\n<template>\n <Field\n :class=\"[\n {\n 'tw-flex': !props.options,\n 'tw-flex-wrap':\n !props.options && (props.variant === RadioGroupVariant.Chip || props.variant === RadioGroupVariant.Radio),\n 'tw-gap-x-1.5 tw-gap-y-3': !props.options && props.variant === RadioGroupVariant.Chip,\n 'tw-gap-6':\n !props.options && (props.variant === RadioGroupVariant.Radio || props.variant === RadioGroupVariant.Tile),\n },\n ]\"\n :aria-errormessage=\"errorId\"\n :aria-invalid=\"!!props.errorText\"\n role=\"radiogroup\"\n fieldset\n :label=\"props.label\"\n :add-bottom-space=\"props.addBottomSpace\"\n :error-id=\"errorId\"\n :error-text=\"props.errorText\"\n :hint-text=\"props.hintText\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n :is-required=\"props.isRequired\"\n :is-read-only=\"props.isReadOnly\"\n >\n <slot v-if=\"props.options\">\n <component :is=\"variantComponentsMap[props.variant]\" />\n </slot>\n <slot v-else></slot>\n </Field>\n</template>\n"],"names":["radioGroupInjection","inject","RADIO_GROUP_INJECTION","name","disabled","fullWidth","modelValue","options","update","RadioGroupVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","e","emit","errorId","uniqueId","provide","computed","props"],"mappings":";;;;;;;;;;;AAKQ,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,wDAAwD;AAG1E,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,uDAAuD;AAGzE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTzD,IAAAS,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;iBCiFJC,IAAuB;AAAA,MAC3B,CAACD,EAAkB,MAAM,GAAGE;AAAA,MAC5B,CAACF,EAAkB,IAAI,GAAGG;AAAA,MAC1B,CAACH,EAAkB,KAAK,GAAGI;AAAA,MAC3B,CAACJ,EAAkB,IAAI,GAAGK;AAAA,IAAA;AAuB5B,aAASN,EAAOO,GAAU;AACnB,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;AAEM,UAAAE,IAAUC,EAAS,0BAA0B;AAEnD,WAAAC,EAAQjB,EAAsB,KAAK;AAAA,MACjC,MAAMkB,EAAS,MAAMC,EAAM,IAAI;AAAA,MAC/B,UAAUD,EAAS,MAAMC,EAAM,QAAQ;AAAA,MACvC,WAAWD,EAAS,MAAMC,EAAM,SAAS;AAAA,MACzC,YAAYD,EAAS,MAAMC,EAAM,UAAU;AAAA,MAC3C,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,QAAAb;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/RadioNew.js CHANGED
@@ -124,7 +124,7 @@ const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-958e0dc3"]]), J = ["for"],
124
124
  for: `${e.name}-${e.id}`
125
125
  }, [
126
126
  t("div", {
127
- class: s(["tile-header border tw-flex", {
127
+ class: s(["tile-header tw-flex tw-border", {
128
128
  "tw-border-blue-500 tw-bg-blue-100": e.modelValue === e.value && !e.disabled,
129
129
  "tw-border-ice-500 tw-bg-ice-100": e.modelValue !== e.value || e.disabled
130
130
  }])
@@ -156,7 +156,7 @@ const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-958e0dc3"]]), J = ["for"],
156
156
  ], 10, J));
157
157
  }
158
158
  });
159
- const H = /* @__PURE__ */ v(q, [["__scopeId", "data-v-03632ce9"]]);
159
+ const H = /* @__PURE__ */ v(q, [["__scopeId", "data-v-4255697e"]]);
160
160
  var u = /* @__PURE__ */ ((a) => (a.Radio = "radio", a.Button = "button", a.Chip = "chip", a.Tile = "tile", a))(u || {});
161
161
  const Y = /* @__PURE__ */ r({
162
162
  __name: "RadioNew",
package/dist/Select.js CHANGED
@@ -956,7 +956,7 @@ function Rn(e, n, t) {
956
956
  update: E
957
957
  };
958
958
  }
959
- const On = (e) => (Mt("data-v-32017b62"), e = e(), Dt(), e), kn = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], Tn = ["selected", "value"], Bn = /* @__PURE__ */ On(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), An = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], Ln = ["id"], Mn = ["onKeypress", "onMousedown"], Dn = {
959
+ const On = (e) => (Mt("data-v-fa811e90"), e = e(), Dt(), e), kn = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], Tn = ["selected", "value"], Bn = /* @__PURE__ */ On(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), An = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], Ln = ["id"], Mn = ["onKeypress", "onMousedown"], Dn = {
960
960
  key: 0,
961
961
  class: "stash-select__total"
962
962
  }, Fn = {
@@ -1317,7 +1317,7 @@ const On = (e) => (Mt("data-v-32017b62"), e = e(), Dt(), e), kn = ["id", "aria-e
1317
1317
  de(z("div", {
1318
1318
  ref_key: "optionsWrapperRef",
1319
1319
  ref: u,
1320
- class: "stash-select__border-selector border-selector tw-w-full tw-shadow",
1320
+ class: "stash-select__border-selector tw-border-selector tw-w-full tw-shadow",
1321
1321
  style: At(F(C)),
1322
1322
  onClick: m[3] || (m[3] = he(() => {
1323
1323
  }, ["stop"]))
@@ -1401,7 +1401,7 @@ const On = (e) => (Mt("data-v-32017b62"), e = e(), Dt(), e), kn = ["id", "aria-e
1401
1401
  ]), 1032, ["id", "add-bottom-space", "class", "error-text", "hint-text", "label", "show-optional-in-label"]));
1402
1402
  }
1403
1403
  });
1404
- const ho = /* @__PURE__ */ Ut(Hn, [["__scopeId", "data-v-32017b62"]]);
1404
+ const ho = /* @__PURE__ */ Ut(Hn, [["__scopeId", "data-v-fa811e90"]]);
1405
1405
  export {
1406
1406
  ho as default
1407
1407
  };