@wikicasa-dev/components 2.0.15 → 2.0.16

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.
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.CfwgKf93.js";
1
+ import { _ as f } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.ClV6kObA.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -34,6 +34,7 @@ declare const _default: <T, LabelID extends string | number | undefined>(__VLS_p
34
34
  classes: ClassType;
35
35
  }>;
36
36
  dataCy?: string;
37
+ wrapperClasses?: ClassType;
37
38
  })> & import('vue').PublicProps;
38
39
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
39
40
  attrs: any;
@@ -1,4 +1,4 @@
1
- import { h as f, defineComponent as T, mergeModels as B, useModel as H, useId as F, computed as C, ref as $, watch as I, onMounted as A, onUnmounted as z, openBlock as a, createElementBlock as n, normalizeClass as o, createElementVNode as s, createCommentVNode as k, withModifiers as b, renderSlot as E, unref as p, createBlock as P, createVNode as N, Fragment as M, renderList as O } from "vue";
1
+ import { h as f, defineComponent as T, mergeModels as B, useModel as H, useId as F, computed as g, ref as $, watch as I, onMounted as A, onUnmounted as z, openBlock as o, createElementBlock as n, normalizeClass as a, createElementVNode as s, createCommentVNode as k, withModifiers as b, renderSlot as E, unref as p, createBlock as P, createVNode as N, Fragment as M, renderList as O } from "vue";
2
2
  import { A as q } from "./useKeyboardController.CutKeclN.js";
3
3
  import { a as j } from "./ArrowIcon.CCFMdsq6.js";
4
4
  import { e as D } from "./PharmacyIcon.56ql_DYl.js";
@@ -36,7 +36,7 @@ const S = (t, { attrs: r }) => {
36
36
  })
37
37
  ]
38
38
  );
39
- }, U = { class: "uikit-relative uikit-flex uikit-h-12 uikit-items-center" }, G = ["id", "innerHTML"], J = ["id", "data-cy", "aria-required", "aria-controls", "aria-labelledby", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby"], K = ["innerHTML"], Q = { class: "uikit-pointer-events-none uikit-mt-1 uikit-inline-flex" }, R = ["innerHTML"], W = ["data-cy"], X = ["id", "aria-selected", "onClick", "onMouseover"], Y = { class: "uikit-inline-block uikit-cursor-pointer uikit-text-sm" }, Z = ["name", "checked", "onInput"], x = ["innerHTML"], _ = ["id", "arial-live", "innerHTML"], ii = ["id", "arial-live", "innerHTML"], oi = /* @__PURE__ */ T({
39
+ }, U = ["id", "innerHTML"], G = ["id", "data-cy", "aria-required", "aria-controls", "aria-labelledby", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby"], J = ["innerHTML"], K = { class: "uikit-pointer-events-none uikit-mt-1 uikit-inline-flex" }, Q = ["innerHTML"], R = ["data-cy"], W = ["id", "aria-selected", "onClick", "onMouseover"], X = { class: "uikit-inline-block uikit-cursor-pointer uikit-text-sm" }, Y = ["name", "checked", "onInput"], Z = ["innerHTML"], x = ["id", "arial-live", "innerHTML"], _ = ["id", "arial-live", "innerHTML"], ai = /* @__PURE__ */ T({
40
40
  inheritAttrs: !1,
41
41
  __name: "AccessibleSelect",
42
42
  props: /* @__PURE__ */ B({
@@ -56,7 +56,8 @@ const S = (t, { attrs: r }) => {
56
56
  dropdownItemClasses: {},
57
57
  btnTextClasses: {},
58
58
  arrowIcon: {},
59
- dataCy: {}
59
+ dataCy: {},
60
+ wrapperClasses: {}
60
61
  }, {
61
62
  modelValue: {
62
63
  default: () => ({ id: "", label: "" })
@@ -65,7 +66,7 @@ const S = (t, { attrs: r }) => {
65
66
  }),
66
67
  emits: ["update:modelValue"],
67
68
  setup(t) {
68
- const r = H(t, "modelValue"), m = F(), e = C(() => t.namespace || m), l = $(!1), L = $(null), h = C(() => !!r.value.label), { activeIdx: c, selectedIdx: V } = q({
69
+ const r = H(t, "modelValue"), m = F(), e = g(() => t.namespace || m), l = $(!1), L = $(null), h = g(() => !!r.value.label), { activeIdx: c, selectedIdx: V } = q({
69
70
  optionsLength: t.options.length,
70
71
  isDropdownOpen: l
71
72
  }), w = (i) => {
@@ -81,22 +82,24 @@ const S = (t, { attrs: r }) => {
81
82
  t.closeOnBodyPressed && document.addEventListener("click", y);
82
83
  }), z(() => {
83
84
  t.closeOnBodyPressed && document.removeEventListener("click", y);
84
- }), (i, u) => (a(), n("div", {
85
- class: o([i.$attrs.class])
85
+ }), (i, u) => (o(), n("div", {
86
+ class: a([i.$attrs.class])
86
87
  }, [
87
- s("div", U, [
88
- i.label ? (a(), n("label", {
88
+ s("div", {
89
+ class: a(["uikit-relative uikit-flex uikit-h-12 uikit-items-center", i.wrapperClasses])
90
+ }, [
91
+ i.label ? (o(), n("label", {
89
92
  key: 0,
90
93
  id: `${e.value}_label`,
91
- class: o(["uikit-pointer-events-none uikit-absolute uikit-z-10 uikit-text-sm uikit-font-medium uikit-transition-all uikit-ease-in-out", [
94
+ class: a(["uikit-pointer-events-none uikit-absolute uikit-z-10 uikit-text-sm uikit-font-medium uikit-transition-all uikit-ease-in-out", [
92
95
  h.value ? "as-floating -uikit-top-1 uikit-left-[22px] uikit-text-w-black" : "as-inline uikit-top-4 uikit-text-w-gray",
93
96
  i.labelClasses,
94
97
  { "uikit-left-9": i.$slots.lefticon && !h.value },
95
98
  { "uikit-left-4": !i.$slots.lefticon && !h.value }
96
99
  ]]),
97
100
  innerHTML: i.label
98
- }, null, 10, G)) : k("", !0),
99
- i.$slots.lefticon ? (a(), n("span", {
101
+ }, null, 10, U)) : k("", !0),
102
+ i.$slots.lefticon ? (o(), n("span", {
100
103
  key: 1,
101
104
  class: "uikit-z-20 uikit-mt-2 uikit-pl-2",
102
105
  onClick: u[0] || (u[0] = b((d) => l.value = !l.value, ["stop"]))
@@ -109,7 +112,7 @@ const S = (t, { attrs: r }) => {
109
112
  ref: L,
110
113
  type: "button",
111
114
  "data-cy": i.dataCy,
112
- class: o(["uikit-peer uikit-relative uikit-z-10 uikit-flex uikit-h-full uikit-w-full uikit-items-center uikit-justify-between uikit-truncate uikit-border-0 uikit-bg-transparent uikit-pr-4 uikit-text-left focus-visible:uikit-outline-0", [i.$slots.lefticon ? "uikit-pl-2" : "uikit-pl-4", i.btnClasses]]),
115
+ class: a(["uikit-peer uikit-relative uikit-z-10 uikit-flex uikit-h-full uikit-w-full uikit-items-center uikit-justify-between uikit-truncate uikit-border-0 uikit-bg-transparent uikit-pr-4 uikit-text-left focus-visible:uikit-outline-0", [i.$slots.lefticon ? "uikit-pl-2" : "uikit-pl-4", i.btnClasses]]),
113
116
  "aria-required": !!i.$attrs.required,
114
117
  role: "combobox",
115
118
  "aria-haspopup": "listbox",
@@ -122,11 +125,11 @@ const S = (t, { attrs: r }) => {
122
125
  onClick: u[1] || (u[1] = (d) => l.value = !l.value)
123
126
  }, [
124
127
  s("span", {
125
- class: o(["uikit-pointer-events-none uikit-mt-1", i.btnTextClasses]),
128
+ class: a(["uikit-pointer-events-none uikit-mt-1", i.btnTextClasses]),
126
129
  innerHTML: r.value.visibleLabel || r.value.label
127
- }, null, 10, K),
128
- s("span", Q, [
129
- i.isValid == !1 ? (a(), P(p(S), {
130
+ }, null, 10, J),
131
+ s("span", K, [
132
+ i.isValid == !1 ? (o(), P(p(S), {
130
133
  key: 0,
131
134
  class: "uikit-mr-1",
132
135
  width: 20,
@@ -134,7 +137,7 @@ const S = (t, { attrs: r }) => {
134
137
  "stroke-color": "#FA4F64"
135
138
  })) : k("", !0),
136
139
  N(p(j), {
137
- class: o(["uikit-transition-transform motion-reduce:uikit-transition-none", [
140
+ class: a(["uikit-transition-transform motion-reduce:uikit-transition-none", [
138
141
  l.value ? "uikit-rotate-180" : "",
139
142
  i.arrowIcon?.classes
140
143
  ]]),
@@ -143,10 +146,10 @@ const S = (t, { attrs: r }) => {
143
146
  "stroke-color": i.isValid ? "#2B5DFF" : i.isValid === !1 ? "#FA4F64" : i.arrowIcon?.strokeColor ?? "#222"
144
147
  }, null, 8, ["class", "width", "height", "stroke-color"])
145
148
  ])
146
- ], 10, J),
149
+ ], 10, G),
147
150
  s("fieldset", {
148
151
  "aria-hidden": "true",
149
- class: o(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-cursor-pointer uikit-rounded-xs uikit-bg-white uikit-px-2 uikit-py-0 peer-focus:uikit-border-2", [
152
+ class: a(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-cursor-pointer uikit-rounded-xs uikit-bg-white uikit-px-2 uikit-py-0 peer-focus:uikit-border-2", [
150
153
  i.fieldsetClasses,
151
154
  i.isValid ? "uikit-border-w-primary" : i.isValid === !1 ? "uikit-border-w-danger" : "uikit-border-w-secondary",
152
155
  {
@@ -156,13 +159,13 @@ const S = (t, { attrs: r }) => {
156
159
  ]])
157
160
  }, [
158
161
  s("legend", {
159
- class: o([[i.legendClasses, { "uikit-m-0 uikit-w-0": !i.label }], "uikit-ml-2 uikit-h-3 uikit-px-0 uikit-text-sm"])
162
+ class: a([[i.legendClasses, { "uikit-m-0 uikit-w-0": !i.label }], "uikit-ml-2 uikit-h-3 uikit-px-0 uikit-text-sm"])
160
163
  }, [
161
- i.label ? (a(), n("span", {
164
+ i.label ? (o(), n("span", {
162
165
  key: 0,
163
- class: o(["uikit-mx-5px", [r.value.label ? "uikit-invisible" : "uikit-hidden"]]),
166
+ class: a(["uikit-mx-5px", [r.value.label ? "uikit-invisible" : "uikit-hidden"]]),
164
167
  innerHTML: i.label
165
- }, null, 10, R)) : k("", !0)
168
+ }, null, 10, Q)) : k("", !0)
166
169
  ], 2)
167
170
  ], 2),
168
171
  s("ul", {
@@ -170,7 +173,7 @@ const S = (t, { attrs: r }) => {
170
173
  role: "listbox",
171
174
  tabindex: -1,
172
175
  "aria-multiselectable": !1,
173
- class: o(["uikit-absolute uikit-z-30 uikit-m-0 uikit-max-h-[225px] uikit-w-full uikit-min-w-full uikit-list-none uikit-overflow-y-auto uikit-p-0 uikit-no-scrollbar", [
176
+ class: a(["uikit-absolute uikit-z-30 uikit-m-0 uikit-max-h-[225px] uikit-w-full uikit-min-w-full uikit-list-none uikit-overflow-y-auto uikit-p-0 uikit-no-scrollbar", [
174
177
  { "uikit-h-0 uikit-w-0 uikit-overflow-hidden": !l.value },
175
178
  {
176
179
  "uikit-rounded-xs uikit-border uikit-border-solid uikit-border-w-secondary uikit-bg-white": l.value
@@ -182,52 +185,52 @@ const S = (t, { attrs: r }) => {
182
185
  onClick: u[3] || (u[3] = b(() => {
183
186
  }, ["stop"]))
184
187
  }, [
185
- (a(!0), n(M, null, O(i.options, (d, v) => (a(), n("li", {
188
+ (o(!0), n(M, null, O(i.options, (d, v) => (o(), n("li", {
186
189
  id: `${e.value}_element_${i.options[v].label}`,
187
190
  key: `${d.label}_${v}`,
188
191
  role: "option",
189
192
  "aria-selected": p(c) === v,
190
- class: o(["uikit-m-1 uikit-cursor-pointer uikit-px-20px uikit-py-10px uikit-text aria-selected:uikit-rounded-xs aria-selected:uikit-bg-w-cultured", i.dropdownItemClasses]),
191
- onClick: b((g) => w(d), ["stop"]),
192
- onMouseover: b((g) => c.value = v, ["stop"]),
193
+ class: a(["uikit-m-1 uikit-cursor-pointer uikit-px-20px uikit-py-10px uikit-text aria-selected:uikit-rounded-xs aria-selected:uikit-bg-w-cultured", i.dropdownItemClasses]),
194
+ onClick: b((C) => w(d), ["stop"]),
195
+ onMouseover: b((C) => c.value = v, ["stop"]),
193
196
  onBlur: u[2] || (u[2] = b(() => {
194
197
  }, ["stop"]))
195
198
  }, [
196
- s("label", Y, [
199
+ s("label", X, [
197
200
  s("input", {
198
201
  tabindex: "-1",
199
202
  class: "uikit-m-0 uikit-appearance-none",
200
203
  name: `${e.value}_radio`,
201
204
  type: "radio",
202
205
  checked: d.label === r.value.label,
203
- onInput: b((g) => w(d), ["stop"])
204
- }, null, 40, Z),
206
+ onInput: b((C) => w(d), ["stop"])
207
+ }, null, 40, Y),
205
208
  s("span", {
206
209
  innerHTML: d.label
207
- }, null, 8, x)
210
+ }, null, 8, Z)
208
211
  ])
209
- ], 42, X))), 128))
210
- ], 10, W)
211
- ]),
212
- i.feedback ? (a(), n(M, { key: 0 }, [
213
- i.feedback.valid ? (a(), n("span", {
212
+ ], 42, W))), 128))
213
+ ], 10, R)
214
+ ], 2),
215
+ i.feedback ? (o(), n(M, { key: 0 }, [
216
+ i.feedback.valid ? (o(), n("span", {
214
217
  key: 0,
215
218
  id: `${e.value}_valid_msg`,
216
219
  "arial-live": i.$attrs["aria-live"],
217
220
  class: "uikit-mt-1 uikit-inline-block uikit-text-12",
218
221
  innerHTML: i.isValid ? i.feedback.valid : ""
219
- }, null, 8, _)) : k("", !0),
220
- i.feedback.invalid ? (a(), n("span", {
222
+ }, null, 8, x)) : k("", !0),
223
+ i.feedback.invalid ? (o(), n("span", {
221
224
  key: 1,
222
225
  id: `${e.value}_invalid_msg`,
223
226
  "arial-live": i.$attrs["aria-live"],
224
227
  class: "uikit-mt-1 uikit-inline-block uikit-text-12 uikit-text-w-danger",
225
228
  innerHTML: i.isValid === !1 ? i.feedback.invalid : ""
226
- }, null, 8, ii)) : k("", !0)
229
+ }, null, 8, _)) : k("", !0)
227
230
  ], 64)) : k("", !0)
228
231
  ], 2));
229
232
  }
230
233
  });
231
234
  export {
232
- oi as _
235
+ ai as _
233
236
  };
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { _ } from "./chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K
9
9
  import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.Ar2KNVYH.js";
10
10
  import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.CiJAhkRj.js";
11
11
  import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BalzO73O.js";
12
- import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.CfwgKf93.js";
12
+ import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.ClV6kObA.js";
13
13
  import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
14
14
  import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CCR6X0si.js";
15
15
  import { _ as v } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",