@leaflink/stash 44.0.0-beta.1 → 44.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/ActionsDropdown.js +9 -9
  2. package/dist/ActionsDropdown.js.map +1 -1
  3. package/dist/AddressSelect.js +12 -11
  4. package/dist/AddressSelect.js.map +1 -1
  5. package/dist/Alert.js +2 -2
  6. package/dist/Alert.js.map +1 -1
  7. package/dist/AppNavigationItem.js +15 -15
  8. package/dist/AppNavigationItem.js.map +1 -1
  9. package/dist/AppSidebar.js +17 -17
  10. package/dist/AppSidebar.js.map +1 -1
  11. package/dist/AppTopbar.js +12 -12
  12. package/dist/Avatar.js +12 -12
  13. package/dist/Avatar.js.map +1 -1
  14. package/dist/Backdrop.js +1 -1
  15. package/dist/Backdrop.js.map +1 -1
  16. package/dist/Badge.js +12 -12
  17. package/dist/Badge.js.map +1 -1
  18. package/dist/Button.js +1 -1
  19. package/dist/Button.js.map +1 -1
  20. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js +17 -0
  21. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js.map +1 -0
  22. package/dist/ButtonGroup.js +26 -26
  23. package/dist/ButtonGroup.js.map +1 -1
  24. package/dist/Card.js +3 -3
  25. package/dist/Card.js.map +1 -1
  26. package/dist/CardHeader.js +3 -3
  27. package/dist/CardMedia.js +1 -1
  28. package/dist/CardMedia.js.map +1 -1
  29. package/dist/Carousel.js +24 -24
  30. package/dist/Carousel.js.map +1 -1
  31. package/dist/Checkbox.js +27 -26
  32. package/dist/Checkbox.js.map +1 -1
  33. package/dist/{Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js → Checkbox.vue_vue_type_style_index_0_scoped_dbd26d7f_lang-4ed993c7.js} +1 -1
  34. package/dist/Checkbox.vue_vue_type_style_index_0_scoped_dbd26d7f_lang-4ed993c7.js.map +1 -0
  35. package/dist/ChevronToggle.js +1 -1
  36. package/dist/Chip.js +1 -1
  37. package/dist/Chip.js.map +1 -1
  38. package/dist/ConfirmationCodeInput.js +21 -21
  39. package/dist/ConfirmationCodeInput.js.map +1 -1
  40. package/dist/ContextSwitcher.js +6 -5
  41. package/dist/ContextSwitcher.js.map +1 -1
  42. package/dist/Copy.js +1 -1
  43. package/dist/CurrencyInput.js +2 -2
  44. package/dist/DataView.js +1 -1
  45. package/dist/DataViewFilters.js +7 -7
  46. package/dist/DataViewFilters.js.map +1 -1
  47. package/dist/DataViewSortButton.js +5 -5
  48. package/dist/DataViewSortButton.js.map +1 -1
  49. package/dist/DataViewToolbar.js +4 -4
  50. package/dist/DataViewToolbar.js.map +1 -1
  51. package/dist/DatePicker.js +8 -8
  52. package/dist/DatePicker.js.map +1 -1
  53. package/dist/DescriptionListTerm.js +1 -1
  54. package/dist/DescriptionListTerm.js.map +1 -1
  55. package/dist/Dialog.js +34 -34
  56. package/dist/Dialog.js.map +1 -1
  57. package/dist/Dropdown.js +3 -3
  58. package/dist/Dropdown.js.map +1 -1
  59. package/dist/EmptyState.js +1 -1
  60. package/dist/EmptyState.js.map +1 -1
  61. package/dist/Field.js +2 -2
  62. package/dist/{Field.vue_vue_type_script_setup_true_lang-475832fe.js → Field.vue_vue_type_script_setup_true_lang-42cf79d4.js} +5 -5
  63. package/dist/{Field.vue_vue_type_script_setup_true_lang-475832fe.js.map → Field.vue_vue_type_script_setup_true_lang-42cf79d4.js.map} +1 -1
  64. package/dist/FileUpload.js +25 -25
  65. package/dist/FileUpload.js.map +1 -1
  66. package/dist/FilterChip.js +32 -32
  67. package/dist/FilterChip.js.map +1 -1
  68. package/dist/FilterDrawerItem.js +4 -4
  69. package/dist/FilterDrawerItem.js.map +1 -1
  70. package/dist/FilterDropdown.js +19 -19
  71. package/dist/FilterDropdown.js.map +1 -1
  72. package/dist/FilterSelect.js +2 -2
  73. package/dist/Filters.js +7 -6
  74. package/dist/Filters.js.map +1 -1
  75. package/dist/HttpError.js +30 -30
  76. package/dist/HttpError.js.map +1 -1
  77. package/dist/IconLabel.js +1 -1
  78. package/dist/IconLabel.js.map +1 -1
  79. package/dist/InlineEdit.js +3 -3
  80. package/dist/InlineEdit.js.map +1 -1
  81. package/dist/Input.js +37 -37
  82. package/dist/Input.js.map +1 -1
  83. package/dist/InputOptions.js +37 -36
  84. package/dist/InputOptions.js.map +1 -1
  85. package/dist/Label.js +1 -1
  86. package/dist/{Label.vue_vue_type_script_setup_true_lang-1d29d98a.js → Label.vue_vue_type_script_setup_true_lang-c5589919.js} +2 -2
  87. package/dist/{Label.vue_vue_type_script_setup_true_lang-1d29d98a.js.map → Label.vue_vue_type_script_setup_true_lang-c5589919.js.map} +1 -1
  88. package/dist/ListItem.js +6 -5
  89. package/dist/ListItem.js.map +1 -1
  90. package/dist/ListView.js +55 -54
  91. package/dist/ListView.js.map +1 -1
  92. package/dist/Menu.js +1 -1
  93. package/dist/Menu.js.map +1 -1
  94. package/dist/Metric.js +4 -4
  95. package/dist/Metric.js.map +1 -1
  96. package/dist/Modal.js +21 -21
  97. package/dist/Modal.js.map +1 -1
  98. package/dist/Module.js +2 -2
  99. package/dist/Module.js.map +1 -1
  100. package/dist/ModuleContent.js +2 -2
  101. package/dist/ModuleContent.js.map +1 -1
  102. package/dist/ModuleFooter.js +11 -11
  103. package/dist/ModuleFooter.js.map +1 -1
  104. package/dist/ModuleHeader.js +6 -6
  105. package/dist/ModuleHeader.js.map +1 -1
  106. package/dist/ObfuscateText.js +1 -1
  107. package/dist/PageHeader.js +3 -3
  108. package/dist/PageHeader.js.map +1 -1
  109. package/dist/PageNavigation.js +2 -2
  110. package/dist/Paginate.js +1 -1
  111. package/dist/Paginate.js.map +1 -1
  112. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js +11 -0
  113. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js.map +1 -0
  114. package/dist/QuickAction.js +11 -11
  115. package/dist/QuickAction.js.map +1 -1
  116. package/dist/Radio.js +2 -2
  117. package/dist/Radio.js.map +1 -1
  118. package/dist/RadioGroup.js +44 -44
  119. package/dist/RadioGroup.js.map +1 -1
  120. package/dist/RadioNew.js +14 -14
  121. package/dist/SearchBar.js +21 -21
  122. package/dist/SearchBar.js.map +1 -1
  123. package/dist/Select.js +187 -186
  124. package/dist/Select.js.map +1 -1
  125. package/dist/SelectStatus.js +22 -21
  126. package/dist/SelectStatus.js.map +1 -1
  127. package/dist/Step.js +37 -37
  128. package/dist/Step.js.map +1 -1
  129. package/dist/Switch.js +26 -25
  130. package/dist/Switch.js.map +1 -1
  131. package/dist/Tab.js +3 -2
  132. package/dist/Tab.js.map +1 -1
  133. package/dist/{Tab.vue_vue_type_script_setup_true_lang-b810bee8.js → Tab.vue_vue_type_script_setup_true_lang-4a40f015.js} +23 -22
  134. package/dist/Tab.vue_vue_type_script_setup_true_lang-4a40f015.js.map +1 -0
  135. package/dist/Table.js +20 -19
  136. package/dist/Table.js.map +1 -1
  137. package/dist/TableCell.js +22 -21
  138. package/dist/TableCell.js.map +1 -1
  139. package/dist/TableHeaderCell.js +7 -6
  140. package/dist/TableHeaderCell.js.map +1 -1
  141. package/dist/TableHeaderRow.js +6 -5
  142. package/dist/TableHeaderRow.js.map +1 -1
  143. package/dist/TableRow.js +24 -23
  144. package/dist/TableRow.js.map +1 -1
  145. package/dist/Tabs.js +2 -2
  146. package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-4f247ed7.js → Tabs.vue_used_vue_type_style_index_0_lang.module-0af1e1cf.js} +3 -3
  147. package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-4f247ed7.js.map → Tabs.vue_used_vue_type_style_index_0_lang.module-0af1e1cf.js.map} +1 -1
  148. package/dist/Textarea.js +2 -2
  149. package/dist/components.css +1 -1
  150. package/dist/index.js +21 -20
  151. package/dist/index.js.map +1 -1
  152. package/dist/storage.js +3 -2
  153. package/dist/storage.js.map +1 -1
  154. package/dist/useGoogleMaps.js.map +1 -1
  155. package/dist/utils/storage.js +30 -29
  156. package/dist/utils/storage.js.map +1 -1
  157. package/package.json +2 -2
  158. package/styles/_base.scss +1 -1
  159. package/styles/_core.scss +1 -1
  160. package/styles/elements/_links.scss +1 -1
  161. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b77978d6.js +0 -17
  162. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b77978d6.js.map +0 -1
  163. package/dist/Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js.map +0 -1
  164. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js +0 -11
  165. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js.map +0 -1
  166. package/dist/Tab.vue_vue_type_script_setup_true_lang-b810bee8.js.map +0 -1
@@ -1,24 +1,24 @@
1
- import { defineComponent as y, inject as x, openBlock as r, createElementBlock as n, Fragment as w, renderList as V, unref as e, normalizeClass as v, createElementVNode as d, 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 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";
2
2
  import E from "lodash-es/uniqueId";
3
- import { _ as G } from "./Field.vue_vue_type_script_setup_true_lang-475832fe.js";
3
+ import { _ as G } from "./Field.vue_vue_type_script_setup_true_lang-42cf79d4.js";
4
4
  import { R as $ } from "./RadioGroup.keys-974818d6.js";
5
5
  import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
6
- import "./Label.vue_vue_type_script_setup_true_lang-1d29d98a.js";
6
+ import "./Label.vue_vue_type_script_setup_true_lang-c5589919.js";
7
7
  import "./locale.js";
8
8
  import "lodash-es/get";
9
9
  const O = { class: "root flex" }, W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @__PURE__ */ y({
10
10
  __name: "VariantButton",
11
11
  setup(u) {
12
- const i = x($.key);
13
- if (!i)
12
+ const r = x($.key);
13
+ if (!r)
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 } = i;
16
- return (I, c) => (r(), n("div", O, [
17
- (r(!0), n(w, null, V(e(o), (t) => (r(), n("div", {
15
+ const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
16
+ return (I, c) => (d(), n("div", O, [
17
+ (d(!0), n(w, null, V(e(o), (t) => (d(), n("div", {
18
18
  key: `${e(a)}-${t.id}`,
19
19
  class: v([{ "w-full": e(m) }])
20
20
  }, [
21
- d("input", {
21
+ i("input", {
22
22
  id: `${e(a)}-${t.id}`,
23
23
  class: "sr-only",
24
24
  type: "radio",
@@ -29,26 +29,26 @@ const O = { class: "root flex" }, W = ["id", "name", "value", "checked", "disabl
29
29
  onInput: c[0] || (c[0] = //@ts-ignore
30
30
  (...f) => e(s) && e(s)(...f))
31
31
  }, null, 40, W),
32
- d("label", {
32
+ i("label", {
33
33
  for: `${e(a)}-${t.id}`
34
34
  }, h(t.text), 9, j)
35
35
  ], 2))), 128))
36
36
  ]));
37
37
  }
38
38
  });
39
- const S = /* @__PURE__ */ k(q, [["__scopeId", "data-v-e8a24f17"]]), 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-0f829714"]]), D = { class: "root flex flex-wrap tw-my-1.5" }, L = ["id", "name", "value", "checked", "disabled"], N = ["for"], z = /* @__PURE__ */ y({
40
40
  __name: "VariantChip",
41
41
  setup(u) {
42
- const i = x($.key);
43
- if (!i)
42
+ const r = x($.key);
43
+ if (!r)
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 } = i;
46
- return (I, c) => (r(), n("div", D, [
47
- (r(!0), n(w, null, V(e(o), (t) => (r(), n("div", {
45
+ const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
46
+ return (I, c) => (d(), n("div", D, [
47
+ (d(!0), n(w, null, V(e(o), (t) => (d(), n("div", {
48
48
  key: `${e(a)}-${t.id}`,
49
49
  class: v([{ "w-full": e(m) }])
50
50
  }, [
51
- d("input", {
51
+ i("input", {
52
52
  id: `${e(a)}-${t.id}`,
53
53
  class: "sr-only",
54
54
  type: "radio",
@@ -59,26 +59,26 @@ const S = /* @__PURE__ */ k(q, [["__scopeId", "data-v-e8a24f17"]]), D = { class:
59
59
  onInput: c[0] || (c[0] = //@ts-ignore
60
60
  (...f) => e(s) && e(s)(...f))
61
61
  }, null, 40, L),
62
- d("label", {
62
+ i("label", {
63
63
  for: `${e(a)}-${t.id}`
64
64
  }, h(t.text), 9, N)
65
65
  ], 2))), 128))
66
66
  ]));
67
67
  }
68
68
  });
69
- const A = /* @__PURE__ */ k(z, [["__scopeId", "data-v-b4b020c6"]]), 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-3ce4d831"]]), F = { class: "root flex flex-wrap" }, J = ["id", "name", "value", "checked", "disabled"], M = ["for"], P = /* @__PURE__ */ y({
70
70
  __name: "VariantRadio",
71
71
  setup(u) {
72
- const i = x($.key);
73
- if (!i)
72
+ const r = x($.key);
73
+ if (!r)
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 } = i;
76
- return (I, c) => (r(), n("div", F, [
77
- (r(!0), n(w, null, V(e(o), (t) => (r(), n("div", {
75
+ const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
76
+ return (I, c) => (d(), n("div", F, [
77
+ (d(!0), n(w, null, V(e(o), (t) => (d(), n("div", {
78
78
  key: `${e(a)}-${t.id}`,
79
79
  class: v([{ "w-full": e(m) }])
80
80
  }, [
81
- d("input", {
81
+ i("input", {
82
82
  id: `${e(a)}-${t.id}`,
83
83
  type: "radio",
84
84
  name: e(a),
@@ -88,33 +88,33 @@ const A = /* @__PURE__ */ k(z, [["__scopeId", "data-v-b4b020c6"]]), F = { class:
88
88
  onInput: c[0] || (c[0] = //@ts-ignore
89
89
  (...f) => e(s) && e(s)(...f))
90
90
  }, null, 40, J),
91
- d("label", {
91
+ i("label", {
92
92
  for: `${e(a)}-${t.id}`
93
93
  }, h(t.text), 9, M)
94
94
  ], 2))), 128))
95
95
  ]));
96
96
  }
97
97
  });
98
- const U = /* @__PURE__ */ k(P, [["__scopeId", "data-v-1962fcc7"]]), 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-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({
99
99
  __name: "VariantTile",
100
100
  setup(u) {
101
- const i = x($.key);
102
- if (!i)
101
+ const r = x($.key);
102
+ if (!r)
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 } = i;
105
- return (I, c) => (r(), n("div", H, [
106
- (r(!0), n(w, null, V(e(o), (t) => (r(), n("label", {
104
+ const { name: a, disabled: p, fullWidth: m, modelValue: l, options: o, update: s } = r;
105
+ return (I, c) => (d(), n("div", H, [
106
+ (d(!0), n(w, null, V(e(o), (t) => (d(), n("label", {
107
107
  key: `${e(a)}-${t.id}`,
108
108
  class: v(["tile-container", { "w-full": e(m) }]),
109
109
  for: `${e(a)}-${t.id}`
110
110
  }, [
111
- d("div", {
111
+ i("div", {
112
112
  class: v(["tile-header border flex", {
113
113
  "border-blue-500 bg-blue-100 color-ice-900": e(l) === t.value,
114
114
  "border-ice-500 bg-ice-100 color-ice-700": e(l) !== t.value
115
115
  }])
116
116
  }, [
117
- d("input", {
117
+ i("input", {
118
118
  id: `${e(a)}-${t.id}`,
119
119
  class: "sr-only",
120
120
  type: "radio",
@@ -125,24 +125,24 @@ const U = /* @__PURE__ */ k(P, [["__scopeId", "data-v-1962fcc7"]]), H = { class:
125
125
  onInput: c[0] || (c[0] = //@ts-ignore
126
126
  (...f) => e(s) && e(s)(...f))
127
127
  }, null, 40, Q),
128
- d("div", null, [
129
- d("span", null, h(t.text), 1)
128
+ i("div", null, [
129
+ i("span", null, h(t.text), 1)
130
130
  ])
131
131
  ], 2),
132
- d("div", {
132
+ i("div", {
133
133
  class: v(["tile-body border-r border-b border-l", {
134
134
  "border-ice-500": e(l) !== t.value,
135
135
  "border-blue-500": e(l) === t.value
136
136
  }])
137
137
  }, [
138
- d("p", X, h(t.subTitle), 1),
139
- d("p", Y, h(t.subText), 1)
138
+ i("p", X, h(t.subTitle), 1),
139
+ i("p", Y, h(t.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-e6997760"]]);
145
+ const ee = /* @__PURE__ */ k(Z, [["__scopeId", "data-v-8eb44db9"]]);
146
146
  var _ = /* @__PURE__ */ ((u) => (u.Radio = "radio", u.Button = "button", u.Chip = "chip", u.Tile = "tile", u))(_ || {});
147
147
  const ne = /* @__PURE__ */ y({
148
148
  __name: "RadioGroup",
@@ -162,7 +162,7 @@ const ne = /* @__PURE__ */ y({
162
162
  showOptionalInLabel: { type: Boolean }
163
163
  },
164
164
  emits: ["update:modelValue"],
165
- setup(u, { emit: i }) {
165
+ setup(u, { emit: r }) {
166
166
  const a = u, p = {
167
167
  [_.Button]: S,
168
168
  [_.Chip]: A,
@@ -170,7 +170,7 @@ const ne = /* @__PURE__ */ y({
170
170
  [_.Tile]: ee
171
171
  };
172
172
  function m(o) {
173
- i("update:modelValue", o.target.value);
173
+ r("update:modelValue", o.target.value);
174
174
  }
175
175
  const l = E("radio-group-field-error-");
176
176
  return g($.key, {
@@ -181,7 +181,7 @@ const ne = /* @__PURE__ */ y({
181
181
  options: b(() => a.options),
182
182
  variant: b(() => a.variant),
183
183
  update: m
184
- }), (o, s) => (r(), B(G, {
184
+ }), (o, s) => (d(), B(G, {
185
185
  class: v([
186
186
  {
187
187
  "tw-flex": !a.options,
@@ -205,7 +205,7 @@ const ne = /* @__PURE__ */ y({
205
205
  }, {
206
206
  default: T(() => [
207
207
  a.options ? R(o.$slots, "default", { key: 0 }, () => [
208
- (r(), B(C(p[a.variant])))
208
+ (d(), B(C(p[a.variant])))
209
209
  ]) : R(o.$slots, "default", { key: 1 })
210
210
  ]),
211
211
  _: 3
@@ -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);\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);\n cursor: auto;\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue);\n color: var(--color-blue);\n z-index: 1;\n position: relative;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue);\n color: var(--color-blue);\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);\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);\n cursor: auto;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue);\n color: var(--color-white);\n background-color: var(--color-blue);\n font-weight: var(--font-weight-bold);\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue);\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);\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) 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) 50%, transparent 54%);\n }\n\n .root input:hover:not(:disabled) {\n border-color: var(--color-blue);\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) !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) !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);\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) 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) 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 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/RadioNew.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as r, openBlock as _, createElementBlock as c, normalizeClass as s, createElementVNode as t, toDisplayString as m, withDirectives as w, vShow as B, renderSlot as b, inject as x, computed as o, createBlock as k, resolveDynamicComponent as W, withCtx as C } from "vue";
1
+ import { defineComponent as r, openBlock as _, createElementBlock as p, normalizeClass as s, createElementVNode as t, toDisplayString as m, withDirectives as w, vShow as B, renderSlot as b, inject as x, computed as o, createBlock as k, resolveDynamicComponent as W, withCtx as C } from "vue";
2
2
  import { R as g } from "./RadioGroup.keys-974818d6.js";
3
3
  import { _ as v } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  const N = ["id", "name", "value", "checked", "disabled"], R = ["for"], T = /* @__PURE__ */ r({
@@ -15,7 +15,7 @@ const N = ["id", "name", "value", "checked", "disabled"], R = ["for"], T = /* @_
15
15
  emits: ["input"],
16
16
  setup(a, { emit: d }) {
17
17
  const e = a;
18
- return (n, l) => (_(), c("div", {
18
+ return (n, l) => (_(), p("div", {
19
19
  class: s(["root", { "tw-w-full": e.fullWidth }])
20
20
  }, [
21
21
  t("input", {
@@ -35,7 +35,7 @@ const N = ["id", "name", "value", "checked", "disabled"], R = ["for"], T = /* @_
35
35
  ], 2));
36
36
  }
37
37
  });
38
- const D = /* @__PURE__ */ v(T, [["__scopeId", "data-v-2172fc90"]]), E = ["id", "name", "value", "checked", "disabled"], O = ["for"], S = /* @__PURE__ */ r({
38
+ const D = /* @__PURE__ */ v(T, [["__scopeId", "data-v-a8e17bca"]]), E = ["id", "name", "value", "checked", "disabled"], O = ["for"], S = /* @__PURE__ */ r({
39
39
  __name: "VariantChip",
40
40
  props: {
41
41
  disabled: { type: Boolean },
@@ -49,7 +49,7 @@ const D = /* @__PURE__ */ v(T, [["__scopeId", "data-v-2172fc90"]]), E = ["id", "
49
49
  emits: ["input"],
50
50
  setup(a, { emit: d }) {
51
51
  const e = a;
52
- return (n, l) => (_(), c("div", {
52
+ return (n, l) => (_(), p("div", {
53
53
  class: s(["root", { "tw-w-full": e.fullWidth }])
54
54
  }, [
55
55
  t("input", {
@@ -69,7 +69,7 @@ const D = /* @__PURE__ */ v(T, [["__scopeId", "data-v-2172fc90"]]), E = ["id", "
69
69
  ], 2));
70
70
  }
71
71
  });
72
- const M = /* @__PURE__ */ v(S, [["__scopeId", "data-v-8bfe9d47"]]), z = ["id", "name", "value", "checked", "disabled"], A = ["for"], F = /* @__PURE__ */ r({
72
+ const M = /* @__PURE__ */ v(S, [["__scopeId", "data-v-2b097f35"]]), z = ["id", "name", "value", "checked", "disabled"], A = ["for"], F = /* @__PURE__ */ r({
73
73
  __name: "VariantRadio",
74
74
  props: {
75
75
  disabled: { type: Boolean },
@@ -83,7 +83,7 @@ const M = /* @__PURE__ */ v(S, [["__scopeId", "data-v-8bfe9d47"]]), z = ["id", "
83
83
  emits: ["input"],
84
84
  setup(a, { emit: d }) {
85
85
  const e = a;
86
- return (n, l) => (_(), c("div", {
86
+ return (n, l) => (_(), p("div", {
87
87
  class: s(["root tw-flex", { "tw-w-full": e.fullWidth }])
88
88
  }, [
89
89
  t("input", {
@@ -105,7 +105,7 @@ const M = /* @__PURE__ */ v(S, [["__scopeId", "data-v-8bfe9d47"]]), z = ["id", "
105
105
  ], 2));
106
106
  }
107
107
  });
108
- const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-7175a75d"]]), J = ["for"], P = ["id", "aria-labelledby", "name", "value", "checked", "disabled"], U = ["id"], q = /* @__PURE__ */ r({
108
+ const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-958e0dc3"]]), J = ["for"], P = ["id", "aria-labelledby", "name", "value", "checked", "disabled"], U = ["id"], q = /* @__PURE__ */ r({
109
109
  __name: "VariantTile",
110
110
  props: {
111
111
  disabled: { type: Boolean },
@@ -119,7 +119,7 @@ const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-7175a75d"]]), J = ["for"],
119
119
  emits: ["input"],
120
120
  setup(a, { emit: d }) {
121
121
  const e = a;
122
- return (n, l) => (_(), c("label", {
122
+ return (n, l) => (_(), p("label", {
123
123
  class: s(["root", { "tw-w-full": e.fullWidth, "root--disabled": e.disabled }]),
124
124
  for: `${e.name}-${e.id}`
125
125
  }, [
@@ -156,7 +156,7 @@ const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-7175a75d"]]), J = ["for"],
156
156
  ], 10, J));
157
157
  }
158
158
  });
159
- const H = /* @__PURE__ */ v(q, [["__scopeId", "data-v-1984a217"]]);
159
+ const H = /* @__PURE__ */ v(q, [["__scopeId", "data-v-03632ce9"]]);
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",
@@ -179,14 +179,14 @@ const Y = /* @__PURE__ */ r({
179
179
  [u.Radio]: I,
180
180
  [u.Tile]: H
181
181
  }, l = x(g.key, null), i = o(() => e.modelValue || (l == null ? void 0 : l.modelValue.value)), f = o(() => e.name || (l == null ? void 0 : l.name.value)), h = o(() => e.fullWidth || (l == null ? void 0 : l.fullWidth.value)), y = o(() => e.disabled || (l == null ? void 0 : l.disabled.value)), $ = o(() => e.variant || (l == null ? void 0 : l.variant.value) || "radio");
182
- function V(p) {
182
+ function V(c) {
183
183
  if (l != null && l.update) {
184
- l.update(p);
184
+ l.update(c);
185
185
  return;
186
186
  }
187
- d("update:modelValue", p.target.value);
187
+ d("update:modelValue", c.target.value);
188
188
  }
189
- return (p, K) => (_(), k(W(n[$.value]), {
189
+ return (c, K) => (_(), k(W(n[$.value]), {
190
190
  id: e.id,
191
191
  disabled: y.value,
192
192
  "has-error": e.hasError,
@@ -198,7 +198,7 @@ const Y = /* @__PURE__ */ r({
198
198
  onInput: V
199
199
  }, {
200
200
  default: C(() => [
201
- b(p.$slots, "default")
201
+ b(c.$slots, "default")
202
202
  ]),
203
203
  _: 3
204
204
  }, 40, ["id", "disabled", "has-error", "full-width", "label", "model-value", "name", "value"]));
package/dist/SearchBar.js CHANGED
@@ -1,19 +1,19 @@
1
- import { defineComponent as C, useCssModule as B, useSlots as S, ref as m, openBlock as h, createBlock as f, normalizeClass as o, unref as r, withKeys as V, createSlots as w, withCtx as n, createVNode as u, createCommentVNode as I, renderSlot as L } from "vue";
1
+ import { defineComponent as C, useCssModule as B, useSlots as S, ref as h, openBlock as m, createBlock as f, normalizeClass as o, unref as r, withKeys as V, createSlots as w, withCtx as n, createVNode as i, createCommentVNode as I, renderSlot as L } from "vue";
2
2
  import { t as b } from "./locale.js";
3
3
  import _ from "./Button.js";
4
4
  import v from "./Icon.js";
5
5
  import T from "./Input.js";
6
6
  import { _ as M } from "./_plugin-vue_export-helper-dad06003.js";
7
7
  import "lodash-es/get";
8
- import "./Button.vue_used_vue_type_style_index_0_lang.module-b77978d6.js";
8
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js";
9
9
  import "lodash-es/uniqueId";
10
10
  import "./index-79ce320f.js";
11
11
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
12
12
  import "lodash-es/isNil";
13
13
  import "./utils/i18n.js";
14
14
  import "./constants.js";
15
- import "./Field.vue_vue_type_script_setup_true_lang-475832fe.js";
16
- import "./Label.vue_vue_type_script_setup_true_lang-1d29d98a.js";
15
+ import "./Field.vue_vue_type_script_setup_true_lang-42cf79d4.js";
16
+ import "./Label.vue_vue_type_script_setup_true_lang-c5589919.js";
17
17
  const W = /* @__PURE__ */ C({
18
18
  name: "ll-search-bar",
19
19
  __name: "SearchBar",
@@ -26,25 +26,25 @@ const W = /* @__PURE__ */ C({
26
26
  hintText: { default: void 0 }
27
27
  },
28
28
  emits: ["search", "update:model-value"],
29
- setup(k, { emit: s }) {
30
- const e = k, c = B(), g = S(), a = m(e.modelValue), i = m();
29
+ setup(y, { emit: s }) {
30
+ const e = y, c = B(), k = S(), a = h(e.modelValue), u = h();
31
31
  function d() {
32
32
  s("search", a.value);
33
33
  }
34
- function x() {
34
+ function g() {
35
35
  var l, t;
36
- a.value = "", s("search", ""), s("update:model-value", ""), (t = (l = i.value) == null ? void 0 : l.inputEl) == null || t.focus();
36
+ a.value = "", s("search", ""), s("update:model-value", ""), (t = (l = u.value) == null ? void 0 : l.inputEl) == null || t.focus();
37
37
  }
38
- function y() {
38
+ function x() {
39
39
  s("update:model-value", a.value);
40
40
  }
41
- return (l, t) => (h(), f(T, {
41
+ return (l, t) => (m(), f(T, {
42
42
  ref_key: "stashInputRef",
43
- ref: i,
43
+ ref: u,
44
44
  modelValue: a.value,
45
45
  "onUpdate:modelValue": [
46
46
  t[0] || (t[0] = (p) => a.value = p),
47
- y
47
+ x
48
48
  ],
49
49
  class: o(["stash-search-bar", r(c)["search-input"]]),
50
50
  label: e.label,
@@ -54,26 +54,26 @@ const W = /* @__PURE__ */ C({
54
54
  onKeyup: t[1] || (t[1] = V((p) => !e.isLoading && d(), ["enter"]))
55
55
  }, w({
56
56
  append: n(() => [
57
- a.value ? (h(), f(_, {
57
+ a.value ? (m(), f(_, {
58
58
  key: 0,
59
59
  class: o(r(c)["clear-button"]),
60
60
  disabled: e.isLoading,
61
61
  "data-test": "stash-search-bar|clear-button",
62
- onClick: x
62
+ onClick: g
63
63
  }, {
64
64
  default: n(() => [
65
- u(v, { name: "close" })
65
+ i(v, { name: "close" })
66
66
  ]),
67
67
  _: 1
68
68
  }, 8, ["class", "disabled"])) : I("", !0),
69
- u(_, {
69
+ i(_, {
70
70
  "data-test": "stash-search-bar|search-button",
71
71
  disabled: e.isLoading,
72
72
  class: o(r(c)["search-button"]),
73
73
  onClick: d
74
74
  }, {
75
75
  default: n(() => [
76
- u(v, {
76
+ i(v, {
77
77
  class: o({ "fx-spin tw-text-teal-500": e.isWorking }),
78
78
  name: e.isWorking ? "working" : "search"
79
79
  }, null, 8, ["class", "name"])
@@ -83,7 +83,7 @@ const W = /* @__PURE__ */ C({
83
83
  ]),
84
84
  _: 2
85
85
  }, [
86
- r(g).hint ? {
86
+ r(k).hint ? {
87
87
  name: "hint",
88
88
  fn: n(() => [
89
89
  L(l.$slots, "hint")
@@ -93,9 +93,9 @@ const W = /* @__PURE__ */ C({
93
93
  ]), 1032, ["modelValue", "class", "label", "placeholder", "hint-text"]));
94
94
  }
95
95
  }), $ = {
96
- "search-input": "_search-input_1e6pm_2",
97
- "clear-button": "_clear-button_1e6pm_8",
98
- "search-button": "_search-button_1e6pm_23"
96
+ "search-input": "_search-input_19idy_2",
97
+ "clear-button": "_clear-button_19idy_8",
98
+ "search-button": "_search-button_19idy_23"
99
99
  }, K = {
100
100
  $style: $
101
101
  }, X = /* @__PURE__ */ M(W, [["__cssModules", K]]);
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBar.js","sources":["../src/components/SearchBar/SearchBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { ref, useCssModule, useSlots } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n import Input from '../Input/Input.vue';\n\n export interface SearchBarProps {\n /**\n * Indicates loading activity (for example async request) that should prevent search\n */\n isLoading?: boolean;\n\n /**\n * Sets a visual indicator that the search is active\n */\n isWorking?: boolean;\n\n /**\n * The search term\n */\n modelValue?: string;\n\n /**\n * Placeholder text for the input\n */\n placeholder?: string;\n\n /**\n * Label for search bar\n */\n label?: string;\n\n /**\n * Text below the input\n */\n hintText?: string;\n }\n\n defineOptions({\n name: 'll-search-bar',\n });\n\n const props = withDefaults(defineProps<SearchBarProps>(), {\n isLoading: false,\n isWorking: false,\n modelValue: '',\n placeholder: t('ll.search'),\n label: t('ll.search'),\n hintText: undefined,\n });\n\n const emit =\n defineEmits<{\n /**\n * Emitted when searching or clearing the search input\n */\n (e: 'search', searchTerm: string): void;\n\n /**\n * Emitted when the search term changes\n */\n (e: 'update:model-value', searchTerm: string): void;\n }>();\n\n const classes = useCssModule();\n const slots = useSlots();\n const searchTerm = ref(props.modelValue);\n const stashInputRef = ref<InstanceType<typeof Input>>();\n\n function onSearch() {\n emit('search', searchTerm.value);\n }\n\n function clearSearchTerm() {\n searchTerm.value = '';\n emit('search', '');\n emit('update:model-value', '');\n\n stashInputRef.value?.inputEl?.focus();\n }\n\n function handleChange() {\n emit('update:model-value', searchTerm.value);\n }\n</script>\n\n<template>\n <Input\n ref=\"stashInputRef\"\n v-model=\"searchTerm\"\n class=\"stash-search-bar\"\n :class=\"classes['search-input']\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :hint-text=\"props.hintText\"\n data-test=\"stash-search-bar\"\n @update:model-value=\"handleChange\"\n @keyup.enter=\"!props.isLoading && onSearch()\"\n >\n <template #append>\n <Button\n v-if=\"searchTerm\"\n :class=\"classes['clear-button']\"\n :disabled=\"props.isLoading\"\n data-test=\"stash-search-bar|clear-button\"\n @click=\"clearSearchTerm\"\n >\n <Icon name=\"close\" />\n </Button>\n <Button\n data-test=\"stash-search-bar|search-button\"\n :disabled=\"props.isLoading\"\n :class=\"classes['search-button']\"\n @click=\"onSearch\"\n >\n <Icon :class=\"{ 'fx-spin tw-text-teal-500': props.isWorking }\" :name=\"props.isWorking ? 'working' : 'search'\" />\n </Button>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Overrides the Input hint-text prop -->\n <slot name=\"hint\"></slot>\n </template>\n </Input>\n</template>\n\n<style module>\n .search-input :global(.stash-input-append) {\n display: flex;\n justify-content: flex-end;\n width: 72px; /* double the the default width of 36px */\n }\n\n .search-input :global(.stash-input-append) .clear-button {\n color: theme(colors.ice.700);\n height: theme(spacing.9);\n margin: 0;\n min-width: theme(spacing.9);\n padding: 0;\n width: theme(spacing.9);\n background: none;\n }\n\n .search-input :global(.stash-input-append) .clear-button:disabled {\n color: theme('colors.ice.500');\n cursor: default;\n }\n\n .search-input :global(.stash-input-append) .search-button {\n border-bottom-left-radius: 0;\n border-left: none;\n border-top-left-radius: 0;\n min-width: theme(spacing.9);\n padding: 0 theme(spacing[1.5]);\n width: theme(spacing.9);\n }\n\n .search-input :global(.stash-input-append) .search-button:focus {\n box-shadow: none;\n }\n\n .search-input :global(.stash-input-append) .search-button:disabled {\n border-color: theme('colors.ice.500');\n }\n</style>\n"],"names":["classes","useCssModule","slots","useSlots","searchTerm","ref","props","stashInputRef","onSearch","emit","clearSearchTerm","_b","_a","handleChange"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkEQA,IAAUC,KACVC,IAAQC,KACRC,IAAaC,EAAIC,EAAM,UAAU,GACjCC,IAAgBF;AAEtB,aAASG,IAAW;AACb,MAAAC,EAAA,UAAUL,EAAW,KAAK;AAAA,IACjC;AAEA,aAASM,IAAkB;;AACzB,MAAAN,EAAW,QAAQ,IACnBK,EAAK,UAAU,EAAE,GACjBA,EAAK,sBAAsB,EAAE,IAEfE,KAAAC,IAAAL,EAAA,UAAA,gBAAAK,EAAO,YAAP,QAAAD,EAAgB;AAAA,IAChC;AAEA,aAASE,IAAe;AACjB,MAAAJ,EAAA,sBAAsBL,EAAW,KAAK;AAAA,IAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SearchBar.js","sources":["../src/components/SearchBar/SearchBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { ref, useCssModule, useSlots } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n import Input from '../Input/Input.vue';\n\n export interface SearchBarProps {\n /**\n * Indicates loading activity (for example async request) that should prevent search\n */\n isLoading?: boolean;\n\n /**\n * Sets a visual indicator that the search is active\n */\n isWorking?: boolean;\n\n /**\n * The search term\n */\n modelValue?: string;\n\n /**\n * Placeholder text for the input\n */\n placeholder?: string;\n\n /**\n * Label for search bar\n */\n label?: string;\n\n /**\n * Text below the input\n */\n hintText?: string;\n }\n\n defineOptions({\n name: 'll-search-bar',\n });\n\n const props = withDefaults(defineProps<SearchBarProps>(), {\n isLoading: false,\n isWorking: false,\n modelValue: '',\n placeholder: t('ll.search'),\n label: t('ll.search'),\n hintText: undefined,\n });\n\n const emit =\n defineEmits<{\n /**\n * Emitted when searching or clearing the search input\n */\n (e: 'search', searchTerm: string): void;\n\n /**\n * Emitted when the search term changes\n */\n (e: 'update:model-value', searchTerm: string): void;\n }>();\n\n const classes = useCssModule();\n const slots = useSlots();\n const searchTerm = ref(props.modelValue);\n const stashInputRef = ref<InstanceType<typeof Input>>();\n\n function onSearch() {\n emit('search', searchTerm.value);\n }\n\n function clearSearchTerm() {\n searchTerm.value = '';\n emit('search', '');\n emit('update:model-value', '');\n\n stashInputRef.value?.inputEl?.focus();\n }\n\n function handleChange() {\n emit('update:model-value', searchTerm.value);\n }\n</script>\n\n<template>\n <Input\n ref=\"stashInputRef\"\n v-model=\"searchTerm\"\n class=\"stash-search-bar\"\n :class=\"classes['search-input']\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :hint-text=\"props.hintText\"\n data-test=\"stash-search-bar\"\n @update:model-value=\"handleChange\"\n @keyup.enter=\"!props.isLoading && onSearch()\"\n >\n <template #append>\n <Button\n v-if=\"searchTerm\"\n :class=\"classes['clear-button']\"\n :disabled=\"props.isLoading\"\n data-test=\"stash-search-bar|clear-button\"\n @click=\"clearSearchTerm\"\n >\n <Icon name=\"close\" />\n </Button>\n <Button\n data-test=\"stash-search-bar|search-button\"\n :disabled=\"props.isLoading\"\n :class=\"classes['search-button']\"\n @click=\"onSearch\"\n >\n <Icon :class=\"{ 'fx-spin tw-text-teal-500': props.isWorking }\" :name=\"props.isWorking ? 'working' : 'search'\" />\n </Button>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Overrides the Input hint-text prop -->\n <slot name=\"hint\"></slot>\n </template>\n </Input>\n</template>\n\n<style module>\n .search-input :global(.stash-input-append) {\n display: flex;\n justify-content: flex-end;\n width: 72px; /* double the the default width of 36px */\n }\n\n .search-input :global(.stash-input-append) .clear-button {\n color: var(--color-ice-700);\n height: theme(spacing.9);\n margin: 0;\n min-width: theme(spacing.9);\n padding: 0;\n width: theme(spacing.9);\n background: none;\n }\n\n .search-input :global(.stash-input-append) .clear-button:disabled {\n color: var(--color-ice-500);\n cursor: default;\n }\n\n .search-input :global(.stash-input-append) .search-button {\n border-bottom-left-radius: 0;\n border-left: none;\n border-top-left-radius: 0;\n min-width: theme(spacing.9);\n padding: 0 theme(spacing[1.5]);\n width: theme(spacing.9);\n }\n\n .search-input :global(.stash-input-append) .search-button:focus {\n box-shadow: none;\n }\n\n .search-input :global(.stash-input-append) .search-button:disabled {\n border-color: var(--color-ice-500);\n }\n</style>\n"],"names":["classes","useCssModule","slots","useSlots","searchTerm","ref","props","stashInputRef","onSearch","emit","clearSearchTerm","_b","_a","handleChange"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkEQA,IAAUC,KACVC,IAAQC,KACRC,IAAaC,EAAIC,EAAM,UAAU,GACjCC,IAAgBF;AAEtB,aAASG,IAAW;AACb,MAAAC,EAAA,UAAUL,EAAW,KAAK;AAAA,IACjC;AAEA,aAASM,IAAkB;;AACzB,MAAAN,EAAW,QAAQ,IACnBK,EAAK,UAAU,EAAE,GACjBA,EAAK,sBAAsB,EAAE,IAEfE,KAAAC,IAAAL,EAAA,UAAA,gBAAAK,EAAO,YAAP,QAAAD,EAAgB;AAAA,IAChC;AAEA,aAASE,IAAe;AACjB,MAAAJ,EAAA,sBAAsBL,EAAW,KAAK;AAAA,IAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}