@leaflink/stash 44.0.0-beta.6 → 44.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/AppNavigationItem.js +1 -1
  2. package/dist/Carousel.js +258 -246
  3. package/dist/Carousel.js.map +1 -1
  4. package/dist/DatePicker.js +1 -1
  5. package/dist/DatePicker.js.map +1 -1
  6. package/dist/Dialog.js.map +1 -1
  7. package/dist/Expand.js +1 -1
  8. package/dist/{Expand.vue_vue_type_script_setup_true_lang-5fe03d51.js → Expand.vue_vue_type_script_setup_true_lang-b6a57ae9.js} +4 -4
  9. package/dist/{Expand.vue_vue_type_script_setup_true_lang-5fe03d51.js.map → Expand.vue_vue_type_script_setup_true_lang-b6a57ae9.js.map} +1 -1
  10. package/dist/FilterSelect.js +25 -25
  11. package/dist/FilterSelect.js.map +1 -1
  12. package/dist/Filters.js.map +1 -1
  13. package/dist/ListView.js +46 -46
  14. package/dist/ListView.js.map +1 -1
  15. package/dist/PageNavigation.js +3 -3
  16. package/dist/PageNavigation.js.map +1 -1
  17. package/dist/QuickAction.js +22 -19
  18. package/dist/QuickAction.js.map +1 -1
  19. package/dist/Radio.js +26 -16
  20. package/dist/Radio.js.map +1 -1
  21. package/dist/RadioGroup.js +135 -106
  22. package/dist/RadioGroup.js.map +1 -1
  23. package/dist/RadioNew.js +118 -91
  24. package/dist/RadioNew.js.map +1 -1
  25. package/dist/Select.js +4 -4
  26. package/dist/Select.js.map +1 -1
  27. package/dist/Tab.js +2 -2
  28. package/dist/{Tab.vue_vue_type_script_setup_true_lang-4a40f015.js → Tab.vue_vue_type_script_setup_true_lang-69d1b046.js} +2 -2
  29. package/dist/{Tab.vue_vue_type_script_setup_true_lang-4a40f015.js.map → Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map} +1 -1
  30. package/dist/Table.js +2 -2
  31. package/dist/{Table.keys-1ebe4ecb.js → Table.keys-75e99266.js} +11 -11
  32. package/dist/{Table.keys-1ebe4ecb.js.map → Table.keys-75e99266.js.map} +1 -1
  33. package/dist/TableCell.js +1 -1
  34. package/dist/TableCell.js.map +1 -1
  35. package/dist/TableHeaderCell.js +1 -1
  36. package/dist/TableHeaderRow.js +1 -1
  37. package/dist/TableRow.js +38 -37
  38. package/dist/TableRow.js.map +1 -1
  39. package/dist/Tabs.js +2 -2
  40. package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-0af1e1cf.js → Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js} +25 -25
  41. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +1 -0
  42. package/dist/components.css +1 -1
  43. package/dist/tailwind-base.js +9 -2
  44. package/dist/tailwind-base.js.map +1 -1
  45. package/package.json +2 -2
  46. package/tailwind-base.ts +3 -1
  47. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-0af1e1cf.js.map +0 -1
package/dist/RadioNew.js CHANGED
@@ -1,7 +1,7 @@
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
- import { R as g } from "./RadioGroup.keys-974818d6.js";
3
- import { _ as v } from "./_plugin-vue_export-helper-dad06003.js";
4
- const N = ["id", "name", "value", "checked", "disabled"], R = ["for"], T = /* @__PURE__ */ r({
1
+ import { defineComponent as p, useCssModule as m, openBlock as _, createElementBlock as v, normalizeClass as d, unref as s, createElementVNode as n, toDisplayString as f, withDirectives as k, vShow as W, renderSlot as h, inject as C, computed as r, createBlock as M, resolveDynamicComponent as x, withCtx as N } from "vue";
2
+ import { R as D } from "./RadioGroup.keys-974818d6.js";
3
+ import { _ as $ } from "./_plugin-vue_export-helper-dad06003.js";
4
+ const E = ["id", "name", "value", "checked", "disabled"], R = ["for"], T = /* @__PURE__ */ p({
5
5
  __name: "VariantButton",
6
6
  props: {
7
7
  disabled: { type: Boolean },
@@ -13,29 +13,34 @@ const N = ["id", "name", "value", "checked", "disabled"], R = ["for"], T = /* @_
13
13
  value: {}
14
14
  },
15
15
  emits: ["input"],
16
- setup(a, { emit: d }) {
17
- const e = a;
18
- return (n, l) => (_(), p("div", {
19
- class: s(["root", { "tw-w-full": e.fullWidth }])
16
+ setup(t, { emit: i }) {
17
+ const e = t, a = m();
18
+ return (l, o) => (_(), v("div", {
19
+ class: d([s(a).root, { "tw-w-full": e.fullWidth }])
20
20
  }, [
21
- t("input", {
21
+ n("input", {
22
22
  id: `${e.name}-${e.id}`,
23
- class: "input sr-only",
23
+ class: d(["tw-sr-only", s(a).input]),
24
24
  type: "radio",
25
25
  name: e.name,
26
26
  value: e.value,
27
27
  checked: e.modelValue === e.value,
28
28
  disabled: e.disabled || e.disabled,
29
- onInput: l[0] || (l[0] = (i) => d("input", i))
30
- }, null, 40, N),
31
- t("label", {
32
- class: "label",
29
+ onInput: o[0] || (o[0] = (u) => i("input", u))
30
+ }, null, 42, E),
31
+ n("label", {
32
+ class: d(s(a).label),
33
33
  for: `${e.name}-${e.id}`
34
- }, m(e.label), 9, R)
34
+ }, f(e.label), 11, R)
35
35
  ], 2));
36
36
  }
37
- });
38
- const D = /* @__PURE__ */ v(T, [["__scopeId", "data-v-a8e17bca"]]), E = ["id", "name", "value", "checked", "disabled"], O = ["for"], S = /* @__PURE__ */ r({
37
+ }), g = "_label_1mshv_2", O = "_root_1mshv_14", S = "_input_1mshv_32", z = {
38
+ label: g,
39
+ root: O,
40
+ input: S
41
+ }, A = {
42
+ $style: z
43
+ }, F = /* @__PURE__ */ $(T, [["__cssModules", A]]), J = ["id", "name", "value", "checked", "disabled"], P = ["for"], U = /* @__PURE__ */ p({
39
44
  __name: "VariantChip",
40
45
  props: {
41
46
  disabled: { type: Boolean },
@@ -47,29 +52,33 @@ const D = /* @__PURE__ */ v(T, [["__scopeId", "data-v-a8e17bca"]]), E = ["id", "
47
52
  value: {}
48
53
  },
49
54
  emits: ["input"],
50
- setup(a, { emit: d }) {
51
- const e = a;
52
- return (n, l) => (_(), p("div", {
53
- class: s(["root", { "tw-w-full": e.fullWidth }])
55
+ setup(t, { emit: i }) {
56
+ const e = t, a = m();
57
+ return (l, o) => (_(), v("div", {
58
+ class: d([s(a).root, { "tw-w-full": e.fullWidth }])
54
59
  }, [
55
- t("input", {
60
+ n("input", {
56
61
  id: `${e.name}-${e.id}`,
57
- class: "input sr-only",
62
+ class: d(["tw-sr-only", s(a).input]),
58
63
  type: "radio",
59
64
  name: e.name,
60
65
  value: e.value,
61
66
  checked: e.modelValue === e.value,
62
67
  disabled: e.disabled || e.disabled,
63
- onInput: l[0] || (l[0] = (i) => d("input", i))
64
- }, null, 40, E),
65
- t("label", {
66
- class: "label",
68
+ onInput: o[0] || (o[0] = (u) => i("input", u))
69
+ }, null, 42, J),
70
+ n("label", {
71
+ class: d(s(a).label),
67
72
  for: `${e.name}-${e.id}`
68
- }, m(e.label), 9, O)
73
+ }, f(e.label), 11, P)
69
74
  ], 2));
70
75
  }
71
- });
72
- const M = /* @__PURE__ */ v(S, [["__scopeId", "data-v-2b097f35"]]), z = ["id", "name", "value", "checked", "disabled"], A = ["for"], F = /* @__PURE__ */ r({
76
+ }), q = "_label_vdpts_2", H = "_input_vdpts_16", K = {
77
+ label: q,
78
+ input: H
79
+ }, L = {
80
+ $style: K
81
+ }, Q = /* @__PURE__ */ $(U, [["__cssModules", L]]), X = ["id", "name", "value", "checked", "disabled"], Y = ["for"], Z = /* @__PURE__ */ p({
73
82
  __name: "VariantRadio",
74
83
  props: {
75
84
  disabled: { type: Boolean },
@@ -81,31 +90,35 @@ const M = /* @__PURE__ */ v(S, [["__scopeId", "data-v-2b097f35"]]), z = ["id", "
81
90
  value: {}
82
91
  },
83
92
  emits: ["input"],
84
- setup(a, { emit: d }) {
85
- const e = a;
86
- return (n, l) => (_(), p("div", {
87
- class: s(["root tw-flex", { "tw-w-full": e.fullWidth }])
93
+ setup(t, { emit: i }) {
94
+ const e = t, a = m();
95
+ return (l, o) => (_(), v("div", {
96
+ class: d(["tw-flex", [s(a).root, { "tw-w-full": e.fullWidth }]])
88
97
  }, [
89
- t("input", {
98
+ n("input", {
90
99
  id: `${e.name}-${e.id}`,
91
- class: "input",
100
+ class: d(s(a).input),
92
101
  type: "radio",
93
102
  name: e.name,
94
103
  value: e.value,
95
104
  checked: e.modelValue === e.value,
96
105
  disabled: e.disabled,
97
- onInput: l[0] || (l[0] = (i) => d("input", i))
98
- }, null, 40, z),
99
- w(t("label", {
100
- class: s(["label", { "tw-text-ice-500": e.disabled }]),
106
+ onInput: o[0] || (o[0] = (u) => i("input", u))
107
+ }, null, 42, X),
108
+ k(n("label", {
109
+ class: d([s(a).label, { "tw-text-ice-500": e.disabled }]),
101
110
  for: `${e.name}-${e.id}`
102
- }, m(e.label), 11, A), [
103
- [B, e.label]
111
+ }, f(e.label), 11, Y), [
112
+ [W, e.label]
104
113
  ])
105
114
  ], 2));
106
115
  }
107
- });
108
- const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-6ae860ec"]]), J = ["for"], P = ["id", "aria-labelledby", "name", "value", "checked", "disabled"], U = ["id"], q = /* @__PURE__ */ r({
116
+ }), I = "_label_kw8hn_2", j = "_input_kw8hn_9", G = {
117
+ label: I,
118
+ input: j
119
+ }, ee = {
120
+ $style: G
121
+ }, le = /* @__PURE__ */ $(Z, [["__cssModules", ee]]), ae = ["for"], te = ["id", "aria-labelledby", "name", "value", "checked", "disabled"], se = ["id"], de = /* @__PURE__ */ p({
109
122
  __name: "VariantTile",
110
123
  props: {
111
124
  disabled: { type: Boolean },
@@ -117,48 +130,62 @@ const I = /* @__PURE__ */ v(F, [["__scopeId", "data-v-6ae860ec"]]), J = ["for"],
117
130
  value: {}
118
131
  },
119
132
  emits: ["input"],
120
- setup(a, { emit: d }) {
121
- const e = a;
122
- return (n, l) => (_(), p("label", {
123
- class: s(["root", { "tw-w-full": e.fullWidth, "root--disabled": e.disabled }]),
133
+ setup(t, { emit: i }) {
134
+ const e = t, a = m();
135
+ return (l, o) => (_(), v("label", {
136
+ class: d([s(a).root, { "tw-w-full": e.fullWidth, [s(a)["root--disabled"]]: e.disabled }]),
124
137
  for: `${e.name}-${e.id}`
125
138
  }, [
126
- t("div", {
127
- class: s(["tile-header tw-flex tw-border", {
128
- "tw-border-blue-500 tw-bg-blue-100": e.modelValue === e.value && !e.disabled,
129
- "tw-border-ice-500 tw-bg-ice-100": e.modelValue !== e.value || e.disabled
130
- }])
139
+ n("div", {
140
+ class: d(["tw-flex tw-border", [
141
+ s(a)["tile-header"],
142
+ {
143
+ "tw-border-blue-500 tw-bg-blue-100": e.modelValue === e.value && !e.disabled,
144
+ "tw-border-ice-500 tw-bg-ice-100": e.modelValue !== e.value || e.disabled
145
+ }
146
+ ]])
131
147
  }, [
132
- t("input", {
148
+ n("input", {
133
149
  id: `${e.name}-${e.id}`,
134
150
  "aria-labelledby": `tile-label-${e.name}-${e.id}`,
135
- class: "input sr-only",
151
+ class: d(["tw-sr-only", s(a).input]),
136
152
  type: "radio",
137
153
  name: e.name,
138
154
  value: e.value,
139
155
  checked: e.modelValue === e.value,
140
156
  disabled: e.disabled,
141
- onInput: l[0] || (l[0] = (i) => d("input", i))
142
- }, null, 40, P),
143
- t("div", {
157
+ onInput: o[0] || (o[0] = (u) => i("input", u))
158
+ }, null, 42, te),
159
+ n("div", {
144
160
  id: `tile-label-${e.name}-${e.id}`,
145
- class: s(["label", { "tw-text-ice-500": e.disabled }])
146
- }, m(e.label), 11, U)
161
+ class: d([s(a).label, { "tw-text-ice-500": e.disabled }])
162
+ }, f(e.label), 11, se)
147
163
  ], 2),
148
- t("div", {
149
- class: s(["tile-body", {
150
- "tw-border-ice-500": e.modelValue !== e.value || e.disabled,
151
- "tw-border-blue-500": e.modelValue === e.value && !e.disabled
152
- }])
164
+ n("div", {
165
+ class: d([
166
+ s(a)["tile-body"],
167
+ {
168
+ "tw-border-ice-500": e.modelValue !== e.value || e.disabled,
169
+ "tw-border-blue-500": e.modelValue === e.value && !e.disabled
170
+ }
171
+ ])
153
172
  }, [
154
- b(n.$slots, "default", {}, void 0, !0)
173
+ h(l.$slots, "default")
155
174
  ], 2)
156
- ], 10, J));
175
+ ], 10, ae));
157
176
  }
158
- });
159
- const H = /* @__PURE__ */ v(q, [["__scopeId", "data-v-4255697e"]]);
160
- var u = /* @__PURE__ */ ((a) => (a.Radio = "radio", a.Button = "button", a.Chip = "chip", a.Tile = "tile", a))(u || {});
161
- const Y = /* @__PURE__ */ r({
177
+ }), oe = "_root_583pa_2", ne = "_label_583pa_32", ie = "_input_583pa_39", ue = {
178
+ root: oe,
179
+ "root--disabled": "_root--disabled_583pa_11",
180
+ "tile-header": "_tile-header_583pa_15",
181
+ "tile-body": "_tile-body_583pa_16",
182
+ label: ne,
183
+ input: ie
184
+ }, re = {
185
+ $style: ue
186
+ }, ce = /* @__PURE__ */ $(de, [["__cssModules", re]]);
187
+ var c = /* @__PURE__ */ ((t) => (t.Radio = "radio", t.Button = "button", t.Chip = "chip", t.Tile = "tile", t))(c || {});
188
+ const ve = /* @__PURE__ */ p({
162
189
  __name: "RadioNew",
163
190
  props: {
164
191
  name: { default: void 0 },
@@ -172,40 +199,40 @@ const Y = /* @__PURE__ */ r({
172
199
  value: {}
173
200
  },
174
201
  emits: ["update:modelValue"],
175
- setup(a, { emit: d }) {
176
- const e = a, n = {
177
- [u.Button]: D,
178
- [u.Chip]: M,
179
- [u.Radio]: I,
180
- [u.Tile]: H
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(c) {
202
+ setup(t, { emit: i }) {
203
+ const e = t, a = {
204
+ [c.Button]: F,
205
+ [c.Chip]: Q,
206
+ [c.Radio]: le,
207
+ [c.Tile]: ce
208
+ }, l = C(D.key, null), o = r(() => e.modelValue || (l == null ? void 0 : l.modelValue.value)), u = r(() => e.name || (l == null ? void 0 : l.name.value)), y = r(() => e.fullWidth || (l == null ? void 0 : l.fullWidth.value)), w = r(() => e.disabled || (l == null ? void 0 : l.disabled.value)), V = r(() => e.variant || (l == null ? void 0 : l.variant.value) || "radio");
209
+ function B(b) {
183
210
  if (l != null && l.update) {
184
- l.update(c);
211
+ l.update(b);
185
212
  return;
186
213
  }
187
- d("update:modelValue", c.target.value);
214
+ i("update:modelValue", b.target.value);
188
215
  }
189
- return (c, K) => (_(), k(W(n[$.value]), {
216
+ return (b, pe) => (_(), M(x(a[V.value]), {
190
217
  id: e.id,
191
- disabled: y.value,
218
+ disabled: w.value,
192
219
  "has-error": e.hasError,
193
- "full-width": h.value,
220
+ "full-width": y.value,
194
221
  label: e.label,
195
- "model-value": i.value,
196
- name: f.value,
222
+ "model-value": o.value,
223
+ name: u.value,
197
224
  value: e.value,
198
- onInput: V
225
+ onInput: B
199
226
  }, {
200
- default: C(() => [
201
- b(c.$slots, "default")
227
+ default: N(() => [
228
+ h(b.$slots, "default")
202
229
  ]),
203
230
  _: 3
204
231
  }, 40, ["id", "disabled", "has-error", "full-width", "label", "model-value", "name", "value"]));
205
232
  }
206
233
  });
207
234
  export {
208
- u as RadioVariant,
209
- Y as default
235
+ c as RadioVariant,
236
+ ve as default
210
237
  };
211
238
  //# sourceMappingURL=RadioNew.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioNew.js","sources":["../src/components/RadioNew/Radio.types.ts","../src/components/RadioNew/RadioNew.vue"],"sourcesContent":["export enum RadioVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioVariants = `${RadioVariant}`;\n","<script lang=\"ts\">\n export * from './Radio.types';\n\n export interface RadioProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Adds error styling\n */\n hasError?: boolean;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * the styling for the radio button @defaultValue 'radio'\n */\n variant?: RadioVariants;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup/RadioGroup.keys';\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 { RadioVariant, RadioVariants } from './Radio.types';\n\n const variantComponentsMap = {\n [RadioVariant.Button]: VariantButton,\n [RadioVariant.Chip]: VariantChip,\n [RadioVariant.Radio]: VariantRadio,\n [RadioVariant.Tile]: VariantTile,\n };\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key, null);\n\n const props = withDefaults(defineProps<RadioProps>(), {\n disabled: false,\n fullWidth: false,\n hasError: false,\n id: undefined,\n label: '',\n modelValue: undefined,\n name: undefined,\n variant: undefined,\n });\n\n /**\n * use prop values but fallback to radio group context values if they are provided\n */\n const derivedModelValue = computed(() => props.modelValue || radioGroupInjection?.modelValue.value);\n const derivedName = computed(() => props.name || radioGroupInjection?.name.value);\n const derivedNameFullWidth = computed(() => props.fullWidth || radioGroupInjection?.fullWidth.value);\n const derivedDisabled = computed(() => props.disabled || radioGroupInjection?.disabled.value);\n const derivedVariant = computed<RadioVariants>(() => props.variant || radioGroupInjection?.variant.value || 'radio');\n\n const emit =\n defineEmits<{\n (e: 'update:modelValue', value: RadioProps['value']): void;\n }>();\n\n function onInput(e: Event) {\n if (radioGroupInjection?.update) {\n radioGroupInjection.update(e);\n\n return;\n }\n\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n</script>\n\n<template>\n <component\n :is=\"variantComponentsMap[derivedVariant]\"\n :id=\"props.id\"\n :disabled=\"derivedDisabled\"\n :has-error=\"props.hasError\"\n :full-width=\"derivedNameFullWidth\"\n :label=\"props.label\"\n :model-value=\"derivedModelValue\"\n :name=\"derivedName\"\n :value=\"props.value\"\n @input=\"onInput\"\n >\n <slot></slot>\n </component>\n</template>\n"],"names":["RadioVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","radioGroupInjection","inject","RADIO_GROUP_INJECTION","derivedModelValue","computed","props","derivedName","derivedNameFullWidth","derivedDisabled","derivedVariant","onInput","e","emit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;iBC8DJC,IAAuB;AAAA,MAC3B,CAACD,EAAa,MAAM,GAAGE;AAAA,MACvB,CAACF,EAAa,IAAI,GAAGG;AAAA,MACrB,CAACH,EAAa,KAAK,GAAGI;AAAA,MACtB,CAACJ,EAAa,IAAI,GAAGK;AAAA,IAAA,GAGjBC,IAAsBC,EAAOC,EAAsB,KAAK,IAAI,GAgB5DC,IAAoBC,EAAS,MAAMC,EAAM,eAAcL,KAAA,gBAAAA,EAAqB,WAAW,MAAK,GAC5FM,IAAcF,EAAS,MAAMC,EAAM,SAAQL,KAAA,gBAAAA,EAAqB,KAAK,MAAK,GAC1EO,IAAuBH,EAAS,MAAMC,EAAM,cAAaL,KAAA,gBAAAA,EAAqB,UAAU,MAAK,GAC7FQ,IAAkBJ,EAAS,MAAMC,EAAM,aAAYL,KAAA,gBAAAA,EAAqB,SAAS,MAAK,GACtFS,IAAiBL,EAAwB,MAAMC,EAAM,YAAWL,KAAA,gBAAAA,EAAqB,QAAQ,UAAS,OAAO;AAOnH,aAASU,EAAQC,GAAU;AACzB,UAAIX,KAAA,QAAAA,EAAqB,QAAQ;AAC/B,QAAAA,EAAoB,OAAOW,CAAC;AAE5B;AAAA,MACF;AAEK,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioNew.js","sources":["../src/components/RadioNew/components/VariantButton.vue","../src/components/RadioNew/components/VariantChip.vue","../src/components/RadioNew/components/VariantRadio.vue","../src/components/RadioNew/components/VariantTile.vue","../src/components/RadioNew/Radio.types.ts","../src/components/RadioNew/RadioNew.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.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:first-of-type .label {\n border-top-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:last-of-type .label {\n border-top-right-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:not(:first-of-type) .label {\n margin-left: -1px;\n }\n\n .root:not(:last-of-type) .label {\n border-right-color: transparent;\n }\n\n .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .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 .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 { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n display: inline-block;\n padding: theme('spacing.1') theme('spacing.3');\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.normal');\n line-height: 1.375rem;\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 .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: theme('colors.white');\n background-color: var(--color-blue-500);\n font-weight: theme('fontWeight.bold');\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div class=\"tw-flex\" :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label\n v-show=\"props.label\"\n :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n border-radius: 50%;\n min-width: 20px;\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 }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled {\n background-image: radial-gradient(var(--color-ice-100) 100%, var(--color-ice-100) 100%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .input:disabled ~ .label {\n cursor: auto;\n }\n\n .input:hover:not(:disabled) ~ .label {\n color: var(--color-ice-900);\n }\n\n .input:not(:disabled) ~ .label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <label\n :class=\"[classes.root, { 'tw-w-full': props.fullWidth, [classes['root--disabled']]: props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n <div\n class=\"tw-flex tw-border\"\n :class=\"[\n classes['tile-header'],\n {\n 'tw-border-blue-500 tw-bg-blue-100': props.modelValue === props.value && !props.disabled,\n 'tw-border-ice-500 tw-bg-ice-100': props.modelValue !== props.value || props.disabled,\n },\n ]\"\n >\n <input\n :id=\"`${props.name}-${props.id}`\"\n :aria-labelledby=\"`tile-label-${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <div :id=\"`tile-label-${props.name}-${props.id}`\" :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\">\n {{ props.label }}\n </div>\n </div>\n <div\n :class=\"[\n classes['tile-body'],\n {\n 'tw-border-ice-500': props.modelValue !== props.value || props.disabled,\n 'tw-border-blue-500': props.modelValue === props.value && !props.disabled,\n },\n ]\"\n >\n <slot></slot>\n </div>\n </label>\n</template>\n\n<style module>\n .root {\n border-radius: theme('borderRadius.DEFAULT');\n cursor: pointer;\n display: flex;\n flex: 1;\n flex-direction: column;\n user-select: none;\n }\n\n .root--disabled {\n cursor: auto;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT') 0 0;\n padding: theme('spacing.3') 0;\n }\n\n .root:hover:not(.root--disabled) .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 .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n background-color: theme('colors.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 margin-left: theme('spacing.3');\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .tile-body {\n border-radius: 0 0 theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT');\n border-width: 0 1px 1px 1px;\n background-color: theme('colors.white');\n padding: theme('spacing.6');\n display: flex;\n flex-direction: column;\n }\n\n .root:hover:not(.root--disabled) .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n</style>\n","export enum RadioVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioVariants = `${RadioVariant}`;\n","<script lang=\"ts\">\n export * from './Radio.types';\n\n export interface RadioProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Adds error styling\n */\n hasError?: boolean;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * the styling for the radio button @defaultValue 'radio'\n */\n variant?: RadioVariants;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup/RadioGroup.keys';\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 { RadioVariant, RadioVariants } from './Radio.types';\n\n const variantComponentsMap = {\n [RadioVariant.Button]: VariantButton,\n [RadioVariant.Chip]: VariantChip,\n [RadioVariant.Radio]: VariantRadio,\n [RadioVariant.Tile]: VariantTile,\n };\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key, null);\n\n const props = withDefaults(defineProps<RadioProps>(), {\n disabled: false,\n fullWidth: false,\n hasError: false,\n id: undefined,\n label: '',\n modelValue: undefined,\n name: undefined,\n variant: undefined,\n });\n\n /**\n * use prop values but fallback to radio group context values if they are provided\n */\n const derivedModelValue = computed(() => props.modelValue || radioGroupInjection?.modelValue.value);\n const derivedName = computed(() => props.name || radioGroupInjection?.name.value);\n const derivedNameFullWidth = computed(() => props.fullWidth || radioGroupInjection?.fullWidth.value);\n const derivedDisabled = computed(() => props.disabled || radioGroupInjection?.disabled.value);\n const derivedVariant = computed<RadioVariants>(() => props.variant || radioGroupInjection?.variant.value || 'radio');\n\n const emit =\n defineEmits<{\n (e: 'update:modelValue', value: RadioProps['value']): void;\n }>();\n\n function onInput(e: Event) {\n if (radioGroupInjection?.update) {\n radioGroupInjection.update(e);\n\n return;\n }\n\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n</script>\n\n<template>\n <component\n :is=\"variantComponentsMap[derivedVariant]\"\n :id=\"props.id\"\n :disabled=\"derivedDisabled\"\n :has-error=\"props.hasError\"\n :full-width=\"derivedNameFullWidth\"\n :label=\"props.label\"\n :model-value=\"derivedModelValue\"\n :name=\"derivedName\"\n :value=\"props.value\"\n @input=\"onInput\"\n >\n <slot></slot>\n </component>\n</template>\n"],"names":["classes","useCssModule","RadioVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","radioGroupInjection","inject","RADIO_GROUP_INJECTION","derivedModelValue","computed","props","derivedName","derivedNameFullWidth","derivedDisabled","derivedVariant","onInput","e","emit"],"mappings":";;;;;;;;;;;;;;;;iBA0CQA,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1CN,IAAAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;iBC8DJC,IAAuB;AAAA,MAC3B,CAACD,EAAa,MAAM,GAAGE;AAAA,MACvB,CAACF,EAAa,IAAI,GAAGG;AAAA,MACrB,CAACH,EAAa,KAAK,GAAGI;AAAA,MACtB,CAACJ,EAAa,IAAI,GAAGK;AAAA,IAAA,GAGjBC,IAAsBC,EAAOC,EAAsB,KAAK,IAAI,GAgB5DC,IAAoBC,EAAS,MAAMC,EAAM,eAAcL,KAAA,gBAAAA,EAAqB,WAAW,MAAK,GAC5FM,IAAcF,EAAS,MAAMC,EAAM,SAAQL,KAAA,gBAAAA,EAAqB,KAAK,MAAK,GAC1EO,IAAuBH,EAAS,MAAMC,EAAM,cAAaL,KAAA,gBAAAA,EAAqB,UAAU,MAAK,GAC7FQ,IAAkBJ,EAAS,MAAMC,EAAM,aAAYL,KAAA,gBAAAA,EAAqB,SAAS,MAAK,GACtFS,IAAiBL,EAAwB,MAAMC,EAAM,YAAWL,KAAA,gBAAAA,EAAqB,QAAQ,UAAS,OAAO;AAOnH,aAASU,EAAQC,GAAU;AACzB,UAAIX,KAAA,QAAAA,EAAqB,QAAQ;AAC/B,QAAAA,EAAoB,OAAOW,CAAC;AAE5B;AAAA,MACF;AAEK,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;;;;;;;;;;;;;;;;;;;"}
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-91dc3b9a"), 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-35aedb3d"), 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 = {
@@ -1190,7 +1190,7 @@ const On = (e) => (Mt("data-v-91dc3b9a"), e = e(), Dt(), e), kn = ["id", "aria-e
1190
1190
  id: S,
1191
1191
  "aria-errormessage": A,
1192
1192
  "aria-invalid": L,
1193
- class: "sr-only",
1193
+ class: "tw-sr-only",
1194
1194
  disabled: t.disabled,
1195
1195
  multiple: !t.single,
1196
1196
  name: t.name,
@@ -1317,7 +1317,7 @@ const On = (e) => (Mt("data-v-91dc3b9a"), 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 tw-border-selector tw-w-full tw-shadow",
1320
+ class: "stash-select__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-91dc3b9a"), 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-91dc3b9a"]]);
1404
+ const ho = /* @__PURE__ */ Ut(Hn, [["__scopeId", "data-v-35aedb3d"]]);
1405
1405
  export {
1406
1406
  ho as default
1407
1407
  };