@nilloq/ouds-web 0.1.7 → 0.1.8

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.
@@ -43,7 +43,8 @@ var d = [
43
43
  loading: {
44
44
  type: Boolean,
45
45
  default: !1
46
- }
46
+ },
47
+ loadingText: { default: "Loading" }
47
48
  },
48
49
  setup(i) {
49
50
  let l = n(), h = () => l["aria-label"] || l.ariaLabel, g = t(() => [
@@ -72,7 +73,7 @@ var d = [
72
73
  cy: "20",
73
74
  r: "17"
74
75
  }, null, -1)]])) : r("", !0),
75
- i.loading ? (a(), s("span", m, "Loading")) : r("", !0)
76
+ i.loading ? (a(), s("span", m, e(i.loadingText), 1)) : r("", !0)
76
77
  ], 10, d));
77
78
  }
78
79
  }), g = [
@@ -43,7 +43,8 @@ var u = [
43
43
  loading: {
44
44
  type: Boolean,
45
45
  default: !1
46
- }
46
+ },
47
+ loadingText: { default: "Loading" }
47
48
  },
48
49
  setup(i) {
49
50
  let m = l(), h = () => m["aria-label"] || m.ariaLabel, g = e(() => [
@@ -72,7 +73,7 @@ var u = [
72
73
  cy: "20",
73
74
  r: "17"
74
75
  }, null, -1)]])) : t("", !0),
75
- i.loading ? (o(), n("span", p, "Loading")) : t("", !0)
76
+ i.loading ? (o(), n("span", p, c(i.loadingText), 1)) : t("", !0)
76
77
  ], 10, u));
77
78
  }
78
79
  }), h = [
package/dist/button.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./button-rgIJZsYq.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./button-OgsnDYrO.js";
2
2
  export { a as OudsButton, i as buttonNavigations, t as buttonSizes, e as buttonTypes, r as buttonVariants, n as defineOudsButton };
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./button-rgIJZsYq.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./button-OgsnDYrO.js";
2
2
  export { a as OudsButton, i as buttonNavigations, t as buttonSizes, e as buttonTypes, r as buttonVariants, n as defineOudsButton };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./select--O3jL-En.js";
1
+ import { n as e, t } from "./select-BbeCpnsY.js";
2
2
  export { t as OudsSelect, e as defineOudsSelect };
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./tag-BvOt0v-c.js";
1
+ import { i as e, n as t, r as n, t as r } from "./tag-D6j9yaoI.js";
2
2
  export { r as OudsTag, t as defineOudsTag, n as tagSizes, e as tagVariants };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./text-area-BgYNtAMx.js";
1
+ import { n as e, t } from "./text-area-Cmn22-fj.js";
2
2
  export { t as OudsTextArea, e as defineOudsTextArea };
package/dist/elements.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { n as e, r as t, t as n } from "./alert-B4w3fDHo.js";
2
2
  import { i as r, n as i, r as a, t as o } from "./badge-CDpWg-AO.js";
3
- import { a as s, i as c, n as l, o as u, r as d, t as f } from "./button-rgIJZsYq.js";
4
- import { i as p, n as m, r as h, t as g } from "./tag-BvOt0v-c.js";
3
+ import { a as s, i as c, n as l, o as u, r as d, t as f } from "./button-OgsnDYrO.js";
4
+ import { i as p, n as m, r as h, t as g } from "./tag-D6j9yaoI.js";
5
5
  import { n as _, t as v } from "./chip-B3v4pWZD.js";
6
- import { n as y, t as b } from "./select--O3jL-En.js";
6
+ import { n as y, t as b } from "./select-BbeCpnsY.js";
7
7
  import { n as x, t as S } from "./checkbox-DfYlHYR2.js";
8
8
  import { n as C, t as w } from "./radio-CDq4r1_L.js";
9
9
  import { n as T, t as E } from "./switch-D5N-j5F7.js";
10
10
  import { n as D, t as O } from "./text-input-i559HVOP.js";
11
- import { n as k, t as A } from "./text-area-BgYNtAMx.js";
11
+ import { n as k, t as A } from "./text-area-Cmn22-fj.js";
12
12
  import { a as j, i as M, n as N, r as P, t as F } from "./modal-BAvMVUIE.js";
13
13
  e(), i(), l(), m(), _(), y(), x(), C(), T(), D(), k(), N();
14
14
  //#endregion
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { n as e, r as t, t as n } from "./alert-B4w3fDHo.js";
2
2
  import { i as r, n as i, r as a, t as o } from "./badge-CDpWg-AO.js";
3
- import { a as s, i as c, n as l, o as u, r as d, t as f } from "./button-rgIJZsYq.js";
4
- import { i as p, n as m, r as h, t as g } from "./tag-BvOt0v-c.js";
3
+ import { a as s, i as c, n as l, o as u, r as d, t as f } from "./button-OgsnDYrO.js";
4
+ import { i as p, n as m, r as h, t as g } from "./tag-D6j9yaoI.js";
5
5
  import { n as _, t as v } from "./chip-B3v4pWZD.js";
6
- import { n as y, t as b } from "./select--O3jL-En.js";
6
+ import { n as y, t as b } from "./select-BbeCpnsY.js";
7
7
  import { n as x, t as S } from "./checkbox-DfYlHYR2.js";
8
8
  import { n as C, t as w } from "./radio-CDq4r1_L.js";
9
9
  import { n as T, t as E } from "./switch-D5N-j5F7.js";
10
10
  import { n as D, t as O } from "./text-input-i559HVOP.js";
11
- import { n as k, t as A } from "./text-area-BgYNtAMx.js";
11
+ import { n as k, t as A } from "./text-area-Cmn22-fj.js";
12
12
  import { a as j, i as M, n as N, r as P, t as F } from "./modal-BAvMVUIE.js";
13
13
  import "./elements.js";
14
14
  export { n as OudsAlert, o as OudsBadge, f as OudsButton, S as OudsCheckbox, v as OudsChip, F as OudsModal, w as OudsRadio, b as OudsSelect, E as OudsSwitch, g as OudsTag, A as OudsTextArea, O as OudsTextInput, t as alertVariants, a as badgeSizes, r as badgeVariants, d as buttonNavigations, c as buttonSizes, s as buttonTypes, u as buttonVariants, e as defineOudsAlert, i as defineOudsBadge, l as defineOudsButton, x as defineOudsCheckbox, _ as defineOudsChip, N as defineOudsModal, C as defineOudsRadio, y as defineOudsSelect, T as defineOudsSwitch, m as defineOudsTag, k as defineOudsTextArea, D as defineOudsTextInput, P as modalSizes, M as modalTypes, j as modalVariants, h as tagSizes, p as tagVariants };
@@ -11,7 +11,7 @@ var w = ["id", "for"], T = [
11
11
  "id",
12
12
  "href",
13
13
  "aria-labelledby"
14
- ], M = /* @__PURE__ */ c({
14
+ ], M = { class: "visually-hidden" }, N = /* @__PURE__ */ c({
15
15
  inheritAttrs: !1,
16
16
  __name: "Select",
17
17
  props: {
@@ -21,6 +21,7 @@ var w = ["id", "for"], T = [
21
21
  errorText: { default: "" },
22
22
  helperLink: { default: "" },
23
23
  helperLinkHref: { default: "" },
24
+ helperLinkAria: { default: "on" },
24
25
  value: { default: "" },
25
26
  outlined: {
26
27
  type: Boolean,
@@ -45,7 +46,8 @@ var w = ["id", "for"], T = [
45
46
  loading: {
46
47
  type: Boolean,
47
48
  default: !1
48
- }
49
+ },
50
+ loadingText: { default: "Loading" }
49
51
  },
50
52
  setup(n) {
51
53
  let o = y();
@@ -53,28 +55,28 @@ var w = ["id", "for"], T = [
53
55
  let { class: e, style: t, ...n } = o;
54
56
  return n;
55
57
  }
56
- let l = _(() => o.id), x = S(), C = b(), M = _(() => l.value || `ouds-select-${C}`), N = _(() => `${M.value}-label`), P = _(() => `${M.value}-helper`), F = _(() => `${M.value}-error`), I = _(() => `${M.value}-helper-link`), L = _(() => `${M.value}-loading`);
57
- function R() {
58
+ let l = _(() => o.id), x = S(), C = b(), N = _(() => l.value || `ouds-select-${C}`), P = _(() => `${N.value}-label`), F = _(() => `${N.value}-helper`), I = _(() => `${N.value}-error`), L = _(() => `${N.value}-helper-link`), R = _(() => `${N.value}-loading`);
59
+ function z() {
58
60
  let e = [o["aria-describedby"]];
59
- return (n.helperText || x["helper-text"]) && !n.invalid && e.push(P.value), n.invalid && (n.errorText || x["error-text"]) && e.push(F.value), n.helperLinkHref && (n.helperLink || x["helper-link"]) && e.push(I.value), n.loading && e.push(L.value), e.filter(Boolean).join(" ") || void 0;
61
+ return (n.helperText || x["helper-text"]) && !n.invalid && e.push(F.value), n.invalid && (n.errorText || x["error-text"]) && e.push(I.value), n.helperLinkHref && (n.helperLink || x["helper-link"]) && e.push(L.value), n.loading && e.push(R.value), e.filter(Boolean).join(" ") || void 0;
60
62
  }
61
- let z = t(() => ["select-input-container", { "select-input-container-outlined": n.outlined }]), B = t(() => ["select-input", { "component-max-width": n.maxWidth }]), V = t(() => ["select-input-field", { "loading-indeterminate": n.loading }]);
63
+ let B = t(() => ["select-input-container", { "select-input-container-outlined": n.outlined }]), V = t(() => ["select-input", { "component-max-width": n.maxWidth }]), H = t(() => ["select-input-field", { "loading-indeterminate": n.loading }]);
62
64
  return (t, l) => (p(), i("div", {
63
- class: d([B.value, v(o).class]),
65
+ class: d([V.value, v(o).class]),
64
66
  style: f(v(o).style)
65
67
  }, [
66
- a("div", { class: d(z.value) }, [
68
+ a("div", { class: d(B.value) }, [
67
69
  h(t.$slots, "leading-icon"),
68
70
  a("label", {
69
- id: N.value,
70
- for: M.value,
71
+ id: P.value,
72
+ for: N.value,
71
73
  class: d({ "is-required": n.required })
72
74
  }, [h(t.$slots, "label", {}, () => [s(g(n.label), 1)])], 10, w),
73
75
  a("select", u(c(), {
74
- id: M.value,
75
- "aria-describedby": R(),
76
+ id: N.value,
77
+ "aria-describedby": z(),
76
78
  "aria-invalid": n.invalid || v(o)["aria-invalid"],
77
- class: V.value,
79
+ class: H.value,
78
80
  value: n.value,
79
81
  disabled: n.disabled,
80
82
  required: n.required
@@ -97,31 +99,31 @@ var w = ["id", "for"], T = [
97
99
  cy: "20",
98
100
  r: "17"
99
101
  })], -1), a("span", {
100
- id: L.value,
102
+ id: R.value,
101
103
  role: "status",
102
104
  class: "visually-hidden"
103
- }, "Loading", 8, O)], 64)) : r("", !0)
105
+ }, g(n.loadingText), 9, O)], 64)) : r("", !0)
104
106
  ], 2),
105
107
  (n.helperText || t.$slots["helper-text"]) && !n.invalid ? (p(), i("p", {
106
108
  key: 0,
107
- id: P.value,
109
+ id: F.value,
108
110
  class: "helper-text"
109
111
  }, [h(t.$slots, "helper-text", {}, () => [s(g(n.helperText), 1)])], 8, k)) : r("", !0),
110
112
  n.invalid && (n.errorText || t.$slots["error-text"]) ? (p(), i("p", {
111
113
  key: 1,
112
- id: F.value,
114
+ id: I.value,
113
115
  class: "error-text"
114
116
  }, [h(t.$slots, "error-text", {}, () => [s(g(n.errorText), 1)])], 8, A)) : r("", !0),
115
117
  n.helperLinkHref && (n.helperLink || t.$slots["helper-link"]) ? (p(), i("a", {
116
118
  key: 2,
117
- id: I.value,
119
+ id: L.value,
118
120
  href: n.helperLinkHref,
119
- "aria-labelledby": `${I.value} ${N.value}`,
121
+ "aria-labelledby": `${L.value} ${P.value}`,
120
122
  class: "link link-small"
121
- }, [h(t.$slots, "helper-link", {}, () => [s(g(n.helperLink), 1)]), l[1] ||= a("span", { class: "visually-hidden" }, "on", -1)], 8, j)) : r("", !0)
123
+ }, [h(t.$slots, "helper-link", {}, () => [s(g(n.helperLink), 1)]), a("span", M, g(n.helperLinkAria), 1)], 8, j)) : r("", !0)
122
124
  ], 6));
123
125
  }
124
- }), N = /* @__PURE__ */ c({
126
+ }), P = /* @__PURE__ */ c({
125
127
  inheritAttrs: !1,
126
128
  __name: "VueSelect",
127
129
  props: /*@__PURE__*/ l({
@@ -131,12 +133,14 @@ var w = ["id", "for"], T = [
131
133
  errorText: {},
132
134
  helperLink: {},
133
135
  helperLinkHref: {},
136
+ helperLinkAria: {},
134
137
  outlined: { type: Boolean },
135
138
  disabled: { type: Boolean },
136
139
  required: { type: Boolean },
137
140
  invalid: { type: Boolean },
138
141
  maxWidth: { type: Boolean },
139
- loading: { type: Boolean }
142
+ loading: { type: Boolean },
143
+ loadingText: {}
140
144
  }, {
141
145
  modelValue: { default: "" },
142
146
  modelModifiers: {}
@@ -147,7 +151,7 @@ var w = ["id", "for"], T = [
147
151
  function s(e) {
148
152
  i.value = e.target.value, a("change", e);
149
153
  }
150
- return (e, t) => (p(), n(M, u({
154
+ return (e, t) => (p(), n(N, u({
151
155
  ...e.$attrs,
152
156
  ...r
153
157
  }, {
@@ -188,4 +192,4 @@ var w = ["id", "for"], T = [
188
192
  }
189
193
  });
190
194
  //#endregion
191
- export { N as t };
195
+ export { P as t };
@@ -11,7 +11,7 @@ var b = ["id", "for"], x = [
11
11
  "id",
12
12
  "href",
13
13
  "aria-labelledby"
14
- ], O = g(/* @__PURE__ */ c({
14
+ ], O = { class: "visually-hidden" }, k = g(/* @__PURE__ */ c({
15
15
  inheritAttrs: !1,
16
16
  __name: "Select",
17
17
  props: {
@@ -21,6 +21,7 @@ var b = ["id", "for"], x = [
21
21
  errorText: { default: "" },
22
22
  helperLink: { default: "" },
23
23
  helperLinkHref: { default: "" },
24
+ helperLinkAria: { default: "on" },
24
25
  value: { default: "" },
25
26
  outlined: {
26
27
  type: Boolean,
@@ -45,36 +46,37 @@ var b = ["id", "for"], x = [
45
46
  loading: {
46
47
  type: Boolean,
47
48
  default: !1
48
- }
49
+ },
50
+ loadingText: { default: "Loading" }
49
51
  },
50
52
  setup(c) {
51
53
  let g = o();
52
- function O() {
54
+ function k() {
53
55
  let { class: e, style: t, ...n } = g;
54
56
  return n;
55
57
  }
56
- let k = f(() => g.id), A = r(), j = y(), M = f(() => k.value || `ouds-select-${j}`), N = f(() => `${M.value}-label`), P = f(() => `${M.value}-helper`), F = f(() => `${M.value}-error`), I = f(() => `${M.value}-helper-link`), L = f(() => `${M.value}-loading`);
57
- function R() {
58
+ let A = f(() => g.id), j = r(), M = y(), N = f(() => A.value || `ouds-select-${M}`), P = f(() => `${N.value}-label`), F = f(() => `${N.value}-helper`), I = f(() => `${N.value}-error`), L = f(() => `${N.value}-helper-link`), R = f(() => `${N.value}-loading`);
59
+ function z() {
58
60
  let e = [g["aria-describedby"]];
59
- return (c.helperText || A["helper-text"]) && !c.invalid && e.push(P.value), c.invalid && (c.errorText || A["error-text"]) && e.push(F.value), c.helperLinkHref && (c.helperLink || A["helper-link"]) && e.push(I.value), c.loading && e.push(L.value), e.filter(Boolean).join(" ") || void 0;
61
+ return (c.helperText || j["helper-text"]) && !c.invalid && e.push(F.value), c.invalid && (c.errorText || j["error-text"]) && e.push(I.value), c.helperLinkHref && (c.helperLink || j["helper-link"]) && e.push(L.value), c.loading && e.push(R.value), e.filter(Boolean).join(" ") || void 0;
60
62
  }
61
- let z = a(() => ["select-input-container", { "select-input-container-outlined": c.outlined }]), B = a(() => ["select-input", { "component-max-width": c.maxWidth }]), V = a(() => ["select-input-field", { "loading-indeterminate": c.loading }]);
63
+ let B = a(() => ["select-input-container", { "select-input-container-outlined": c.outlined }]), V = a(() => ["select-input", { "component-max-width": c.maxWidth }]), H = a(() => ["select-input-field", { "loading-indeterminate": c.loading }]);
62
64
  return (r, a) => (l(), p("div", {
63
- class: d([B.value, e(g).class]),
65
+ class: d([V.value, e(g).class]),
64
66
  style: t(e(g).style)
65
67
  }, [
66
- m("div", { class: d(z.value) }, [
68
+ m("div", { class: d(B.value) }, [
67
69
  v(r.$slots, "leading-icon"),
68
70
  m("label", {
69
- id: N.value,
70
- for: M.value,
71
+ id: P.value,
72
+ for: N.value,
71
73
  class: d({ "is-required": c.required })
72
74
  }, [v(r.$slots, "label", {}, () => [_(n(c.label), 1)])], 10, b),
73
- m("select", h(O(), {
74
- id: M.value,
75
- "aria-describedby": R(),
75
+ m("select", h(k(), {
76
+ id: N.value,
77
+ "aria-describedby": z(),
76
78
  "aria-invalid": c.invalid || e(g)["aria-invalid"],
77
- class: V.value,
79
+ class: H.value,
78
80
  value: c.value,
79
81
  disabled: c.disabled,
80
82
  required: c.required
@@ -97,38 +99,38 @@ var b = ["id", "for"], x = [
97
99
  cy: "20",
98
100
  r: "17"
99
101
  })], -1), m("span", {
100
- id: L.value,
102
+ id: R.value,
101
103
  role: "status",
102
104
  class: "visually-hidden"
103
- }, "Loading", 8, w)], 64)) : s("", !0)
105
+ }, n(c.loadingText), 9, w)], 64)) : s("", !0)
104
106
  ], 2),
105
107
  (c.helperText || r.$slots["helper-text"]) && !c.invalid ? (l(), p("p", {
106
108
  key: 0,
107
- id: P.value,
109
+ id: F.value,
108
110
  class: "helper-text"
109
111
  }, [v(r.$slots, "helper-text", {}, () => [_(n(c.helperText), 1)])], 8, T)) : s("", !0),
110
112
  c.invalid && (c.errorText || r.$slots["error-text"]) ? (l(), p("p", {
111
113
  key: 1,
112
- id: F.value,
114
+ id: I.value,
113
115
  class: "error-text"
114
116
  }, [v(r.$slots, "error-text", {}, () => [_(n(c.errorText), 1)])], 8, E)) : s("", !0),
115
117
  c.helperLinkHref && (c.helperLink || r.$slots["helper-link"]) ? (l(), p("a", {
116
118
  key: 2,
117
- id: I.value,
119
+ id: L.value,
118
120
  href: c.helperLinkHref,
119
- "aria-labelledby": `${I.value} ${N.value}`,
121
+ "aria-labelledby": `${L.value} ${P.value}`,
120
122
  class: "link link-small"
121
- }, [v(r.$slots, "helper-link", {}, () => [_(n(c.helperLink), 1)]), a[1] ||= m("span", { class: "visually-hidden" }, "on", -1)], 8, D)) : s("", !0)
123
+ }, [v(r.$slots, "helper-link", {}, () => [_(n(c.helperLink), 1)]), m("span", O, n(c.helperLinkAria), 1)], 8, D)) : s("", !0)
122
124
  ], 6));
123
125
  }
124
- }), { shadowRoot: !1 }), k = class extends O {
126
+ }), { shadowRoot: !1 }), A = class extends k {
125
127
  connectedCallback() {
126
128
  for (let e of Array.from(this.childNodes)) (e.nodeType === 8 || e.nodeType === 3 && !e.textContent?.trim()) && e.remove();
127
129
  super.connectedCallback();
128
130
  }
129
131
  };
130
- function A() {
131
- typeof customElements < "u" && (customElements.get("ouds-select") || customElements.define("ouds-select", k));
132
+ function j() {
133
+ typeof customElements < "u" && (customElements.get("ouds-select") || customElements.define("ouds-select", A));
132
134
  }
133
135
  //#endregion
134
- export { A as n, k as t };
136
+ export { j as n, A as t };
package/dist/select.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./select--O3jL-En.js";
1
+ import { n as e, t } from "./select-BbeCpnsY.js";
2
2
  //#region src/select.ts
3
3
  e();
4
4
  //#endregion
@@ -1,14 +1,17 @@
1
- import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, renderSlot as l } from "vue";
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, renderSlot as l, toDisplayString as u } from "vue";
2
2
  //#region src/components/tag/Tag.vue?vue&type=script&setup=true&lang.ts
3
- var u = {
3
+ var d = {
4
+ role: "status",
5
+ class: "visually-hidden"
6
+ }, f = {
4
7
  key: 1,
5
8
  class: "tag-status-icon",
6
9
  "aria-hidden": "true"
7
- }, d = {
10
+ }, p = {
8
11
  key: 2,
9
12
  class: "tag-bullet",
10
13
  "aria-hidden": "true"
11
- }, f = /* @__PURE__ */ o({
14
+ }, m = /* @__PURE__ */ o({
12
15
  __name: "Tag",
13
16
  props: {
14
17
  variant: { default: "neutral" },
@@ -32,25 +35,26 @@ var u = {
32
35
  loading: {
33
36
  type: Boolean,
34
37
  default: !1
35
- }
38
+ },
39
+ loadingText: { default: "Loading" }
36
40
  },
37
41
  setup(o) {
38
- let f = t(() => o.variant.startsWith("categorical-")), p = t(() => [
42
+ let m = t(() => o.variant.startsWith("categorical-")), h = t(() => [
39
43
  "positive",
40
44
  "info",
41
45
  "warning",
42
46
  "negative"
43
- ].includes(o.variant)), m = t(() => [
47
+ ].includes(o.variant)), g = t(() => [
44
48
  "tag",
45
49
  o.variant !== "neutral" && `tag-${o.variant}`,
46
50
  {
47
- "tag-muted": o.muted && !f.value,
51
+ "tag-muted": o.muted && !m.value,
48
52
  "tag-small": o.size === "small",
49
53
  disabled: o.disabled,
50
54
  loading: o.loading
51
55
  }
52
56
  ]);
53
- return (t, f) => (c(), r("span", { class: s(m.value) }, [o.loading ? (c(), r(e, { key: 0 }, [f[0] ||= i("svg", {
57
+ return (t, m) => (c(), r("span", { class: s(g.value) }, [o.loading ? (c(), r(e, { key: 0 }, [m[0] ||= i("svg", {
54
58
  viewBox: "0 0 40 40",
55
59
  class: "tag-loader",
56
60
  "aria-hidden": "true"
@@ -59,12 +63,9 @@ var u = {
59
63
  cx: "20",
60
64
  cy: "20",
61
65
  r: "15"
62
- })], -1), f[1] ||= i("span", {
63
- role: "status",
64
- class: "visually-hidden"
65
- }, "Loading", -1)], 64)) : o.statusIcon && p.value ? (c(), r("span", u)) : o.bullet ? (c(), r("span", d)) : n("", !0), l(t.$slots, "default", {}, () => [f[2] ||= a("Tag", -1)])], 2));
66
+ })], -1), i("span", d, u(o.loadingText), 1)], 64)) : o.statusIcon && h.value ? (c(), r("span", f)) : o.bullet ? (c(), r("span", p)) : n("", !0), l(t.$slots, "default", {}, () => [m[1] ||= a("Tag", -1)])], 2));
66
67
  }
67
- }), p = [
68
+ }), h = [
68
69
  "neutral",
69
70
  "accent",
70
71
  "positive",
@@ -76,6 +77,6 @@ var u = {
76
77
  "categorical-3",
77
78
  "categorical-4",
78
79
  "categorical-5"
79
- ], m = ["medium", "small"];
80
+ ], g = ["medium", "small"];
80
81
  //#endregion
81
- export { p as n, f as r, m as t };
82
+ export { h as n, m as r, g as t };
@@ -0,0 +1,85 @@
1
+ import { N as e, a as t, c as n, d as r, g as i, i as a, j as o, l as s, o as c, t as l, u, v as d } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
2
+ //#region src/components/tag/Tag.vue?vue&type=script&setup=true&lang.ts
3
+ var f = {
4
+ role: "status",
5
+ class: "visually-hidden"
6
+ }, p = {
7
+ key: 1,
8
+ class: "tag-status-icon",
9
+ "aria-hidden": "true"
10
+ }, m = {
11
+ key: 2,
12
+ class: "tag-bullet",
13
+ "aria-hidden": "true"
14
+ }, h = /* @__PURE__ */ r({
15
+ __name: "Tag",
16
+ props: {
17
+ variant: { default: "neutral" },
18
+ statusIcon: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ size: { default: "medium" },
23
+ muted: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ bullet: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ disabled: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ loading: {
36
+ type: Boolean,
37
+ default: !1
38
+ },
39
+ loadingText: { default: "Loading" }
40
+ },
41
+ setup(r) {
42
+ let l = t(() => r.variant.startsWith("categorical-")), h = t(() => [
43
+ "positive",
44
+ "info",
45
+ "warning",
46
+ "negative"
47
+ ].includes(r.variant)), g = t(() => [
48
+ "tag",
49
+ r.variant !== "neutral" && `tag-${r.variant}`,
50
+ {
51
+ "tag-muted": r.muted && !l.value,
52
+ "tag-small": r.size === "small",
53
+ disabled: r.disabled,
54
+ loading: r.loading
55
+ }
56
+ ]);
57
+ return (t, l) => (i(), s("span", { class: o(g.value) }, [r.loading ? (i(), s(a, { key: 0 }, [l[0] ||= c("svg", {
58
+ viewBox: "0 0 40 40",
59
+ class: "tag-loader",
60
+ "aria-hidden": "true"
61
+ }, [c("circle", {
62
+ class: "tag-loader-inner",
63
+ cx: "20",
64
+ cy: "20",
65
+ r: "15"
66
+ })], -1), c("span", f, e(r.loadingText), 1)], 64)) : r.statusIcon && h.value ? (i(), s("span", p)) : r.bullet ? (i(), s("span", m)) : n("", !0), d(t.$slots, "default", {}, () => [l[1] ||= u("Tag", -1)])], 2));
67
+ }
68
+ }), g = [
69
+ "neutral",
70
+ "accent",
71
+ "positive",
72
+ "info",
73
+ "warning",
74
+ "negative",
75
+ "categorical-1",
76
+ "categorical-2",
77
+ "categorical-3",
78
+ "categorical-4",
79
+ "categorical-5"
80
+ ], _ = ["medium", "small"], v = l(h, { shadowRoot: !1 });
81
+ function y() {
82
+ typeof customElements < "u" && (customElements.get("ouds-tag") || customElements.define("ouds-tag", v));
83
+ }
84
+ //#endregion
85
+ export { g as i, y as n, _ as r, v as t };
package/dist/tag.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./tag-BvOt0v-c.js";
1
+ import { i as e, n as t, r as n, t as r } from "./tag-D6j9yaoI.js";
2
2
  export { r as OudsTag, t as defineOudsTag, n as tagSizes, e as tagVariants };
@@ -13,7 +13,7 @@ var v = ["id", "for"], y = [
13
13
  "id",
14
14
  "href",
15
15
  "aria-labelledby"
16
- ], C = m(/* @__PURE__ */ s({
16
+ ], C = { class: "visually-hidden" }, w = m(/* @__PURE__ */ s({
17
17
  inheritAttrs: !1,
18
18
  __name: "TextArea",
19
19
  props: {
@@ -23,6 +23,7 @@ var v = ["id", "for"], y = [
23
23
  errorText: { default: "" },
24
24
  helperLink: { default: "" },
25
25
  helperLinkHref: { default: "" },
26
+ helperLinkAria: { default: "on" },
26
27
  value: { default: "" },
27
28
  outlined: {
28
29
  type: Boolean,
@@ -51,57 +52,57 @@ var v = ["id", "for"], y = [
51
52
  },
52
53
  setup(s) {
53
54
  let m = a();
54
- function C() {
55
+ function w() {
55
56
  let { class: e, style: t, ...n } = m;
56
57
  return n;
57
58
  }
58
- let w = u(() => m.id), T = r(), E = _(), D = u(() => w.value || `ouds-text-area-${E}`), O = u(() => `${D.value}-helper`), k = u(() => `${D.value}-error`), A = u(() => `${D.value}-label`), j = u(() => `${D.value}-helper-link`);
59
- function M() {
59
+ let T = u(() => m.id), E = r(), D = _(), O = u(() => T.value || `ouds-text-area-${D}`), k = u(() => `${O.value}-helper`), A = u(() => `${O.value}-error`), j = u(() => `${O.value}-label`), M = u(() => `${O.value}-helper-link`);
60
+ function N() {
60
61
  let e = [m["aria-describedby"]];
61
- return (s.helperText || T["helper-text"]) && !s.invalid && e.push(O.value), s.invalid && (s.errorText || T["error-text"]) && e.push(k.value), s.helperLinkHref && (s.helperLink || T["helper-link"]) && e.push(j.value), e.filter(Boolean).join(" ") || void 0;
62
+ return (s.helperText || E["helper-text"]) && !s.invalid && e.push(k.value), s.invalid && (s.errorText || E["error-text"]) && e.push(A.value), s.helperLinkHref && (s.helperLink || E["helper-link"]) && e.push(M.value), e.filter(Boolean).join(" ") || void 0;
62
63
  }
63
- let N = i(() => ["text-area", { "component-max-width": s.maxWidth }]), P = i(() => ["text-area-container", { "text-area-container-outlined": s.outlined }]);
64
+ let P = i(() => ["text-area", { "component-max-width": s.maxWidth }]), F = i(() => ["text-area-container", { "text-area-container-outlined": s.outlined }]);
64
65
  return (r, i) => (c(), d("div", {
65
- class: l([N.value, e(m).class]),
66
+ class: l([P.value, e(m).class]),
66
67
  style: t(e(m).style)
67
68
  }, [
68
- f("div", { class: l(P.value) }, [f("label", {
69
- id: A.value,
70
- for: D.value,
69
+ f("div", { class: l(F.value) }, [f("label", {
70
+ id: j.value,
71
+ for: O.value,
71
72
  class: l({ "is-required": s.required })
72
- }, [g(r.$slots, "label", {}, () => [h(n(s.label), 1)])], 10, v), f("textarea", p(C(), {
73
- id: D.value,
73
+ }, [g(r.$slots, "label", {}, () => [h(n(s.label), 1)])], 10, v), f("textarea", p(w(), {
74
+ id: O.value,
74
75
  class: "text-area-field",
75
76
  placeholder: s.placeholder || " ",
76
77
  value: s.value,
77
78
  disabled: s.disabled,
78
79
  readonly: s.readonly,
79
80
  required: s.required,
80
- "aria-describedby": M(),
81
+ "aria-describedby": N(),
81
82
  "aria-invalid": s.invalid
82
83
  }), null, 16, y)], 2),
83
84
  (s.helperText || r.$slots["helper-text"]) && !s.invalid ? (c(), d("p", {
84
85
  key: 0,
85
- id: O.value,
86
+ id: k.value,
86
87
  class: "helper-text"
87
88
  }, [g(r.$slots, "helper-text", {}, () => [h(n(s.helperText), 1)])], 8, b)) : o("", !0),
88
89
  s.invalid && (s.errorText || r.$slots["error-text"]) ? (c(), d("p", {
89
90
  key: 1,
90
- id: k.value,
91
+ id: A.value,
91
92
  class: "error-text"
92
93
  }, [g(r.$slots, "error-text", {}, () => [h(n(s.errorText), 1)])], 8, x)) : o("", !0),
93
94
  s.helperLinkHref && (s.helperLink || r.$slots["helper-link"]) ? (c(), d("a", {
94
95
  key: 2,
95
- id: j.value,
96
+ id: M.value,
96
97
  href: s.helperLinkHref,
97
- "aria-labelledby": `${j.value} ${A.value}`,
98
+ "aria-labelledby": `${M.value} ${j.value}`,
98
99
  class: "link link-small"
99
- }, [g(r.$slots, "helper-link", {}, () => [h(n(s.helperLink), 1)]), i[0] ||= f("span", { class: "visually-hidden" }, "on", -1)], 8, S)) : o("", !0)
100
+ }, [g(r.$slots, "helper-link", {}, () => [h(n(s.helperLink), 1)]), f("span", C, n(s.helperLinkAria), 1)], 8, S)) : o("", !0)
100
101
  ], 6));
101
102
  }
102
103
  }), { shadowRoot: !1 });
103
- function w() {
104
- typeof customElements < "u" && (customElements.get("ouds-text-area") || customElements.define("ouds-text-area", C));
104
+ function T() {
105
+ typeof customElements < "u" && (customElements.get("ouds-text-area") || customElements.define("ouds-text-area", w));
105
106
  }
106
107
  //#endregion
107
- export { w as n, C as t };
108
+ export { T as n, w as t };
@@ -13,7 +13,7 @@ var S = ["id", "for"], C = [
13
13
  "id",
14
14
  "href",
15
15
  "aria-labelledby"
16
- ], D = /* @__PURE__ */ s({
16
+ ], D = { class: "visually-hidden" }, O = /* @__PURE__ */ s({
17
17
  inheritAttrs: !1,
18
18
  __name: "TextArea",
19
19
  props: {
@@ -23,6 +23,7 @@ var S = ["id", "for"], C = [
23
23
  errorText: { default: "" },
24
24
  helperLink: { default: "" },
25
25
  helperLinkHref: { default: "" },
26
+ helperLinkAria: { default: "on" },
26
27
  value: { default: "" },
27
28
  outlined: {
28
29
  type: Boolean,
@@ -55,51 +56,51 @@ var S = ["id", "for"], C = [
55
56
  let { class: e, style: t, ...n } = a;
56
57
  return n;
57
58
  }
58
- let c = h(() => a.id), y = b(), x = v(), D = h(() => c.value || `ouds-text-area-${x}`), O = h(() => `${D.value}-helper`), k = h(() => `${D.value}-error`), A = h(() => `${D.value}-label`), j = h(() => `${D.value}-helper-link`);
59
- function M() {
59
+ let c = h(() => a.id), y = b(), x = v(), O = h(() => c.value || `ouds-text-area-${x}`), k = h(() => `${O.value}-helper`), A = h(() => `${O.value}-error`), j = h(() => `${O.value}-label`), M = h(() => `${O.value}-helper-link`);
60
+ function N() {
60
61
  let e = [a["aria-describedby"]];
61
- return (t.helperText || y["helper-text"]) && !t.invalid && e.push(O.value), t.invalid && (t.errorText || y["error-text"]) && e.push(k.value), t.helperLinkHref && (t.helperLink || y["helper-link"]) && e.push(j.value), e.filter(Boolean).join(" ") || void 0;
62
+ return (t.helperText || y["helper-text"]) && !t.invalid && e.push(k.value), t.invalid && (t.errorText || y["error-text"]) && e.push(A.value), t.helperLinkHref && (t.helperLink || y["helper-link"]) && e.push(M.value), e.filter(Boolean).join(" ") || void 0;
62
63
  }
63
- let N = e(() => ["text-area", { "component-max-width": t.maxWidth }]), P = e(() => ["text-area-container", { "text-area-container-outlined": t.outlined }]);
64
+ let P = e(() => ["text-area", { "component-max-width": t.maxWidth }]), F = e(() => ["text-area-container", { "text-area-container-outlined": t.outlined }]);
64
65
  return (e, c) => (f(), r("div", {
65
- class: u([N.value, g(a).class]),
66
+ class: u([P.value, g(a).class]),
66
67
  style: d(g(a).style)
67
68
  }, [
68
- i("div", { class: u(P.value) }, [i("label", {
69
- id: A.value,
70
- for: D.value,
69
+ i("div", { class: u(F.value) }, [i("label", {
70
+ id: j.value,
71
+ for: O.value,
71
72
  class: u({ "is-required": t.required })
72
73
  }, [p(e.$slots, "label", {}, () => [o(m(t.label), 1)])], 10, S), i("textarea", l(s(), {
73
- id: D.value,
74
+ id: O.value,
74
75
  class: "text-area-field",
75
76
  placeholder: t.placeholder || " ",
76
77
  value: t.value,
77
78
  disabled: t.disabled,
78
79
  readonly: t.readonly,
79
80
  required: t.required,
80
- "aria-describedby": M(),
81
+ "aria-describedby": N(),
81
82
  "aria-invalid": t.invalid
82
83
  }), null, 16, C)], 2),
83
84
  (t.helperText || e.$slots["helper-text"]) && !t.invalid ? (f(), r("p", {
84
85
  key: 0,
85
- id: O.value,
86
+ id: k.value,
86
87
  class: "helper-text"
87
88
  }, [p(e.$slots, "helper-text", {}, () => [o(m(t.helperText), 1)])], 8, w)) : n("", !0),
88
89
  t.invalid && (t.errorText || e.$slots["error-text"]) ? (f(), r("p", {
89
90
  key: 1,
90
- id: k.value,
91
+ id: A.value,
91
92
  class: "error-text"
92
93
  }, [p(e.$slots, "error-text", {}, () => [o(m(t.errorText), 1)])], 8, T)) : n("", !0),
93
94
  t.helperLinkHref && (t.helperLink || e.$slots["helper-link"]) ? (f(), r("a", {
94
95
  key: 2,
95
- id: j.value,
96
+ id: M.value,
96
97
  href: t.helperLinkHref,
97
- "aria-labelledby": `${j.value} ${A.value}`,
98
+ "aria-labelledby": `${M.value} ${j.value}`,
98
99
  class: "link link-small"
99
- }, [p(e.$slots, "helper-link", {}, () => [o(m(t.helperLink), 1)]), c[0] ||= i("span", { class: "visually-hidden" }, "on", -1)], 8, E)) : n("", !0)
100
+ }, [p(e.$slots, "helper-link", {}, () => [o(m(t.helperLink), 1)]), i("span", D, m(t.helperLinkAria), 1)], 8, E)) : n("", !0)
100
101
  ], 6));
101
102
  }
102
- }), O = /* @__PURE__ */ s({
103
+ }), k = /* @__PURE__ */ s({
103
104
  inheritAttrs: !1,
104
105
  __name: "VueTextArea",
105
106
  props: /*@__PURE__*/ c({
@@ -109,6 +110,7 @@ var S = ["id", "for"], C = [
109
110
  errorText: {},
110
111
  helperLink: {},
111
112
  helperLinkHref: {},
113
+ helperLinkAria: {},
112
114
  outlined: { type: Boolean },
113
115
  disabled: { type: Boolean },
114
116
  readonly: { type: Boolean },
@@ -128,7 +130,7 @@ var S = ["id", "for"], C = [
128
130
  function c(e) {
129
131
  i.value = e.target.value, o("change", e);
130
132
  }
131
- return (e, n) => (f(), t(D, l({
133
+ return (e, n) => (f(), t(O, l({
132
134
  ...e.$attrs,
133
135
  ...r
134
136
  }, {
@@ -160,4 +162,4 @@ var S = ["id", "for"], C = [
160
162
  }
161
163
  });
162
164
  //#endregion
163
- export { O as t };
165
+ export { k as t };
package/dist/text-area.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./text-area-BgYNtAMx.js";
1
+ import { n as e, t } from "./text-area-Cmn22-fj.js";
2
2
  //#region src/text-area.ts
3
3
  e();
4
4
  //#endregion
@@ -9,6 +9,8 @@ type __VLS_Props = {
9
9
  onColoredBg?: boolean;
10
10
  disabled?: boolean;
11
11
  loading?: boolean;
12
+ /** Localized screen-reader loading announcement. */
13
+ loadingText?: string;
12
14
  };
13
15
  declare const __VLS_template: () => {
14
16
  __VLS_Slots: {
@@ -7,6 +7,7 @@ export type ButtonElement = HTMLElement & {
7
7
  iconOnly: boolean;
8
8
  disabled: boolean;
9
9
  loading: boolean;
10
+ loadingText: string;
10
11
  expand: boolean;
11
12
  onColoredBg: boolean;
12
13
  navigation?: ButtonNavigation;
@@ -8,6 +8,8 @@ export interface SelectProps {
8
8
  errorText?: string;
9
9
  helperLink?: string;
10
10
  helperLinkHref?: string;
11
+ /** Hidden text between the helper link and field label. Defaults to "on". */
12
+ helperLinkAria?: string;
11
13
  value?: string;
12
14
  outlined?: boolean;
13
15
  disabled?: boolean;
@@ -15,6 +17,8 @@ export interface SelectProps {
15
17
  invalid?: boolean;
16
18
  maxWidth?: boolean;
17
19
  loading?: boolean;
20
+ /** Localized screen-reader loading announcement. Defaults to "Loading". */
21
+ loadingText?: string;
18
22
  }
19
23
  export type SelectElement = HTMLElement & {
20
24
  id: string;
@@ -23,6 +27,7 @@ export type SelectElement = HTMLElement & {
23
27
  errorText: string;
24
28
  helperLink: string;
25
29
  helperLinkHref: string;
30
+ helperLinkAria: string;
26
31
  options: {
27
32
  label: string;
28
33
  value: string;
@@ -34,6 +39,7 @@ export type SelectElement = HTMLElement & {
34
39
  invalid: boolean;
35
40
  maxWidth: boolean;
36
41
  loading: boolean;
42
+ loadingText: string;
37
43
  };
38
44
  export type SelectConstructor = CustomElementConstructor & {
39
45
  new (initialProps?: Partial<SelectElement>): SelectElement;
@@ -7,6 +7,8 @@ type __VLS_Props = {
7
7
  bullet?: boolean;
8
8
  disabled?: boolean;
9
9
  loading?: boolean;
10
+ /** Localized screen-reader loading announcement. */
11
+ loadingText?: string;
10
12
  };
11
13
  declare const __VLS_template: () => {
12
14
  __VLS_Slots: {
@@ -8,6 +8,7 @@ export type TagElement = HTMLElement & {
8
8
  bullet: boolean;
9
9
  disabled: boolean;
10
10
  loading: boolean;
11
+ loadingText: string;
11
12
  };
12
13
  export type TagConstructor = CustomElementConstructor & {
13
14
  new (initialProps?: Partial<TagElement>): TagElement;
@@ -5,6 +5,8 @@ export interface TextAreaProps {
5
5
  errorText?: string;
6
6
  helperLink?: string;
7
7
  helperLinkHref?: string;
8
+ /** Hidden text between the helper link and field label. Defaults to "on". */
9
+ helperLinkAria?: string;
8
10
  value?: string;
9
11
  outlined?: boolean;
10
12
  disabled?: boolean;
@@ -21,6 +23,7 @@ export type TextAreaElement = HTMLElement & {
21
23
  errorText: string;
22
24
  helperLink: string;
23
25
  helperLinkHref: string;
26
+ helperLinkAria: string;
24
27
  value: string;
25
28
  outlined: boolean;
26
29
  disabled: boolean;
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./button-nN1Pcwm6.js";
1
+ import { a as e, i as t, n, r, t as i } from "./button-gcQ7CyWb.js";
2
2
  export { e as OudsButton, i as buttonNavigations, n as buttonSizes, r as buttonTypes, t as buttonVariants };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./select-NiIx8bVD.js";
1
+ import { t as e } from "./select-BWhJ-QB-.js";
2
2
  export { e as OudsSelect };
package/dist/vue-tag.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./tag-Un7w0uDf.js";
1
+ import { n as e, r as t, t as n } from "./tag--KKxqOf8.js";
2
2
  export { t as OudsTag, n as tagSizes, e as tagVariants };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./text-area-BdmAyh3N.js";
1
+ import { t as e } from "./text-area-Cr8RssdQ.js";
2
2
  export { e as OudsTextArea };
package/dist/vue.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { n as e, t } from "./alert-Chns046l.js";
2
2
  import { n, r, t as i } from "./badge-yaFEZnEW.js";
3
- import { a, i as o, n as s, r as c, t as l } from "./button-nN1Pcwm6.js";
4
- import { n as u, r as d, t as f } from "./tag-Un7w0uDf.js";
3
+ import { a, i as o, n as s, r as c, t as l } from "./button-gcQ7CyWb.js";
4
+ import { n as u, r as d, t as f } from "./tag--KKxqOf8.js";
5
5
  import { t as p } from "./chip-DGfqitrQ.js";
6
- import { t as m } from "./select-NiIx8bVD.js";
6
+ import { t as m } from "./select-BWhJ-QB-.js";
7
7
  import { t as h } from "./checkbox-D7TFFuw3.js";
8
8
  import { t as g } from "./radio-TaYThYkI.js";
9
9
  import { t as _ } from "./switch-BmxLKPbL.js";
10
10
  import { t as v } from "./text-input-DgFIuIOA.js";
11
- import { t as y } from "./text-area-BdmAyh3N.js";
11
+ import { t as y } from "./text-area-Cr8RssdQ.js";
12
12
  import { i as b, n as x, r as S, t as C } from "./modal-BnT5Kxjg.js";
13
13
  export { e as OudsAlert, r as OudsBadge, a as OudsButton, h as OudsCheckbox, p as OudsChip, b as OudsModal, g as OudsRadio, m as OudsSelect, _ as OudsSwitch, d as OudsTag, y as OudsTextArea, v as OudsTextInput, t as alertVariants, i as badgeSizes, n as badgeVariants, l as buttonNavigations, s as buttonSizes, c as buttonTypes, o as buttonVariants, C as modalSizes, x as modalTypes, S as modalVariants, f as tagSizes, u as tagVariants };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nilloq/ouds-web",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Vue components and framework-independent custom elements styled with OUDS Web.",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -1,84 +0,0 @@
1
- import { a as e, c as t, d as n, g as r, i, j as a, l as o, o as s, t as c, u as l, v as u } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
2
- //#region src/components/tag/Tag.vue?vue&type=script&setup=true&lang.ts
3
- var d = {
4
- key: 1,
5
- class: "tag-status-icon",
6
- "aria-hidden": "true"
7
- }, f = {
8
- key: 2,
9
- class: "tag-bullet",
10
- "aria-hidden": "true"
11
- }, p = /* @__PURE__ */ n({
12
- __name: "Tag",
13
- props: {
14
- variant: { default: "neutral" },
15
- statusIcon: {
16
- type: Boolean,
17
- default: !1
18
- },
19
- size: { default: "medium" },
20
- muted: {
21
- type: Boolean,
22
- default: !1
23
- },
24
- bullet: {
25
- type: Boolean,
26
- default: !1
27
- },
28
- disabled: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- loading: {
33
- type: Boolean,
34
- default: !1
35
- }
36
- },
37
- setup(n) {
38
- let c = e(() => n.variant.startsWith("categorical-")), p = e(() => [
39
- "positive",
40
- "info",
41
- "warning",
42
- "negative"
43
- ].includes(n.variant)), m = e(() => [
44
- "tag",
45
- n.variant !== "neutral" && `tag-${n.variant}`,
46
- {
47
- "tag-muted": n.muted && !c.value,
48
- "tag-small": n.size === "small",
49
- disabled: n.disabled,
50
- loading: n.loading
51
- }
52
- ]);
53
- return (e, c) => (r(), o("span", { class: a(m.value) }, [n.loading ? (r(), o(i, { key: 0 }, [c[0] ||= s("svg", {
54
- viewBox: "0 0 40 40",
55
- class: "tag-loader",
56
- "aria-hidden": "true"
57
- }, [s("circle", {
58
- class: "tag-loader-inner",
59
- cx: "20",
60
- cy: "20",
61
- r: "15"
62
- })], -1), c[1] ||= s("span", {
63
- role: "status",
64
- class: "visually-hidden"
65
- }, "Loading", -1)], 64)) : n.statusIcon && p.value ? (r(), o("span", d)) : n.bullet ? (r(), o("span", f)) : t("", !0), u(e.$slots, "default", {}, () => [c[2] ||= l("Tag", -1)])], 2));
66
- }
67
- }), m = [
68
- "neutral",
69
- "accent",
70
- "positive",
71
- "info",
72
- "warning",
73
- "negative",
74
- "categorical-1",
75
- "categorical-2",
76
- "categorical-3",
77
- "categorical-4",
78
- "categorical-5"
79
- ], h = ["medium", "small"], g = c(p, { shadowRoot: !1 });
80
- function _() {
81
- typeof customElements < "u" && (customElements.get("ouds-tag") || customElements.define("ouds-tag", g));
82
- }
83
- //#endregion
84
- export { m as i, _ as n, h as r, g as t };