@nilloq/ouds-web 0.1.6 → 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.
Files changed (120) hide show
  1. package/README.md +17 -115
  2. package/dist/{alert-bsnEmrzb.js → alert-B4w3fDHo.js} +2 -2
  3. package/dist/{alert-By364Om4.js → alert-Chns046l.js} +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/{badge-fffoaFuZ.js → badge-CDpWg-AO.js} +1 -1
  6. package/dist/badge.js +1 -1
  7. package/dist/{button-BUziAVbu.js → button-OgsnDYrO.js} +4 -3
  8. package/dist/{button-nN1Pcwm6.js → button-gcQ7CyWb.js} +3 -2
  9. package/dist/button.js +1 -1
  10. package/dist/checkbox-D7TFFuw3.js +196 -0
  11. package/dist/checkbox-DfYlHYR2.js +155 -0
  12. package/dist/checkbox.js +1 -1
  13. package/dist/chip-B3v4pWZD.js +92 -0
  14. package/dist/chip-DGfqitrQ.js +115 -0
  15. package/dist/chip.js +2 -0
  16. package/dist/{control-item-slots-BNXNsI1e.js → control-item-slots-BDoeNuk4.js} +5 -2
  17. package/dist/{control-item-slots-XV8Gjvf1.js → control-item-slots-Ddp7c8w8.js} +4 -1
  18. package/dist/elements-alert.js +1 -1
  19. package/dist/elements-badge.js +1 -1
  20. package/dist/elements-button.js +1 -1
  21. package/dist/elements-checkbox.js +1 -1
  22. package/dist/elements-chip.js +2 -0
  23. package/dist/elements-modal.js +1 -1
  24. package/dist/elements-radio.js +1 -1
  25. package/dist/elements-select.js +1 -1
  26. package/dist/elements-switch.js +1 -1
  27. package/dist/elements-tag.js +1 -1
  28. package/dist/elements-text-area.js +1 -1
  29. package/dist/elements-text-input.js +1 -1
  30. package/dist/elements.js +14 -13
  31. package/dist/index.js +13 -12
  32. package/dist/{modal-IEXNB8St.js → modal-BAvMVUIE.js} +2 -2
  33. package/dist/{modal-CHjaB_yR.js → modal-BnT5Kxjg.js} +1 -1
  34. package/dist/modal.js +1 -1
  35. package/dist/radio-CDq4r1_L.js +155 -0
  36. package/dist/radio-TaYThYkI.js +199 -0
  37. package/dist/radio.js +1 -1
  38. package/dist/{runtime-dom.esm-bundler-BeOO_l6v.js → runtime-dom.esm-bundler-DLryEdgJ.js} +1 -1
  39. package/dist/select-BWhJ-QB-.js +195 -0
  40. package/dist/select-BbeCpnsY.js +136 -0
  41. package/dist/select.js +1 -1
  42. package/dist/switch-BmxLKPbL.js +179 -0
  43. package/dist/switch-D5N-j5F7.js +140 -0
  44. package/dist/switch.js +1 -1
  45. package/dist/{tag-Un7w0uDf.js → tag--KKxqOf8.js} +17 -16
  46. package/dist/tag-D6j9yaoI.js +85 -0
  47. package/dist/tag.js +1 -1
  48. package/dist/text-area-Cmn22-fj.js +108 -0
  49. package/dist/text-area-Cr8RssdQ.js +165 -0
  50. package/dist/text-area.js +1 -1
  51. package/dist/text-input-DgFIuIOA.js +235 -0
  52. package/dist/text-input-i559HVOP.js +163 -0
  53. package/dist/text-input.js +1 -1
  54. package/dist/types/chip.d.ts +1 -0
  55. package/dist/types/components/alert/Alert.vue.d.ts +3 -3
  56. package/dist/types/components/badge/Badge.vue.d.ts +1 -1
  57. package/dist/types/components/button/Button.vue.d.ts +3 -1
  58. package/dist/types/components/button/button.types.d.ts +1 -0
  59. package/dist/types/components/checkbox/Checkbox.vue.d.ts +4 -15
  60. package/dist/types/components/checkbox/VueCheckbox.vue.d.ts +9 -3
  61. package/dist/types/components/checkbox/checkbox.types.d.ts +16 -0
  62. package/dist/types/components/chip/Chip.vue.d.ts +38 -0
  63. package/dist/types/components/chip/VueChip.vue.d.ts +32 -0
  64. package/dist/types/components/chip/chip.context.d.ts +2 -0
  65. package/dist/types/components/chip/chip.types.d.ts +27 -0
  66. package/dist/types/components/modal/Modal.vue.d.ts +8 -8
  67. package/dist/types/components/radio/Radio.vue.d.ts +2 -17
  68. package/dist/types/components/radio/VueRadio.vue.d.ts +8 -6
  69. package/dist/types/components/radio/radio.types.d.ts +16 -0
  70. package/dist/types/components/select/Select.vue.d.ts +2 -19
  71. package/dist/types/components/select/VueSelect.vue.d.ts +9 -3
  72. package/dist/types/components/select/select.types.d.ts +24 -0
  73. package/dist/types/components/shared/control-item-slots.d.ts +1 -0
  74. package/dist/types/components/switch/Switch.vue.d.ts +2 -14
  75. package/dist/types/components/switch/VueSwitch.vue.d.ts +9 -3
  76. package/dist/types/components/switch/switch.types.d.ts +13 -0
  77. package/dist/types/components/tag/Tag.vue.d.ts +3 -1
  78. package/dist/types/components/tag/tag.types.d.ts +1 -0
  79. package/dist/types/components/text-area/TextArea.vue.d.ts +2 -16
  80. package/dist/types/components/text-area/VueTextArea.vue.d.ts +9 -3
  81. package/dist/types/components/text-area/text-area.types.d.ts +18 -0
  82. package/dist/types/components/text-input/TextInput.vue.d.ts +2 -19
  83. package/dist/types/components/text-input/VueTextInput.vue.d.ts +9 -3
  84. package/dist/types/components/text-input/text-input.types.d.ts +25 -0
  85. package/dist/types/elements/chip.d.ts +4 -0
  86. package/dist/types/elements/index.d.ts +2 -0
  87. package/dist/types/vue/checkbox.d.ts +1 -1
  88. package/dist/types/vue/chip.d.ts +2 -0
  89. package/dist/types/vue/index.d.ts +8 -6
  90. package/dist/types/vue/radio.d.ts +1 -1
  91. package/dist/types/vue/select.d.ts +1 -1
  92. package/dist/types/vue/switch.d.ts +1 -1
  93. package/dist/types/vue/text-area.d.ts +1 -1
  94. package/dist/types/vue/text-input.d.ts +1 -1
  95. package/dist/vue-alert.js +1 -1
  96. package/dist/vue-button.js +1 -1
  97. package/dist/vue-checkbox.js +1 -1
  98. package/dist/vue-chip.js +2 -0
  99. package/dist/vue-modal.js +1 -1
  100. package/dist/vue-radio.js +1 -1
  101. package/dist/vue-select.js +1 -1
  102. package/dist/vue-switch.js +1 -1
  103. package/dist/vue-tag.js +1 -1
  104. package/dist/vue-text-area.js +1 -1
  105. package/dist/vue-text-input.js +1 -1
  106. package/dist/vue.js +12 -11
  107. package/package.json +15 -2
  108. package/dist/checkbox-PAgQqiIw.js +0 -145
  109. package/dist/checkbox-g6cqR6wz.js +0 -170
  110. package/dist/radio-Cmrtred_.js +0 -147
  111. package/dist/radio-CqVqsZ7n.js +0 -175
  112. package/dist/select-Bpou1HIY.js +0 -167
  113. package/dist/select-CWjTpHGb.js +0 -126
  114. package/dist/switch-CFv0JUeq.js +0 -132
  115. package/dist/switch-DEYsTCw5.js +0 -157
  116. package/dist/tag-BdB0YDBJ.js +0 -84
  117. package/dist/text-area-DkjEGpHg.js +0 -99
  118. package/dist/text-area-DqBoz2_d.js +0 -139
  119. package/dist/text-input-DnWjB1vE.js +0 -207
  120. package/dist/text-input-DxzwRS2R.js +0 -157
@@ -1,99 +0,0 @@
1
- import { A as e, M as t, S as n, a as r, b as i, c as a, d as o, g as s, j as c, k as l, l as u, o as d, p as f, t as p, u as m, v as h, x as g } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
2
- //#region src/components/text-area/TextArea.vue?vue&type=script&setup=true&lang.ts
3
- var _ = ["id", "for"], v = [
4
- "id",
5
- "placeholder",
6
- "value",
7
- "disabled",
8
- "readonly",
9
- "required",
10
- "aria-describedby",
11
- "aria-invalid"
12
- ], y = ["id"], b = ["id"], x = [
13
- "id",
14
- "href",
15
- "aria-labelledby"
16
- ], S = p(/* @__PURE__ */ o({
17
- inheritAttrs: !1,
18
- __name: "TextArea",
19
- props: {
20
- label: { default: "Text area" },
21
- placeholder: { default: " " },
22
- helperText: { default: "" },
23
- errorText: { default: "" },
24
- helperLink: { default: "" },
25
- helperLinkHref: { default: "" },
26
- value: { default: "" },
27
- outlined: {
28
- type: Boolean,
29
- default: !1
30
- },
31
- disabled: {
32
- type: Boolean,
33
- default: !1
34
- },
35
- readonly: {
36
- type: Boolean,
37
- default: !1
38
- },
39
- required: {
40
- type: Boolean,
41
- default: !1
42
- },
43
- invalid: {
44
- type: Boolean,
45
- default: !1
46
- },
47
- maxWidth: {
48
- type: Boolean,
49
- default: !1
50
- }
51
- },
52
- setup(o) {
53
- let p = i(), S = l(() => p.id), C = n(), w = g(), T = l(() => S.value || `ouds-text-area-${w}`), E = l(() => `${T.value}-helper`), D = l(() => `${T.value}-error`), O = l(() => `${T.value}-label`), k = l(() => `${T.value}-helper-link`);
54
- function A() {
55
- let e = [p["aria-describedby"]];
56
- return (o.helperText || C["helper-text"]) && !o.invalid && e.push(E.value), o.invalid && (o.errorText || C["error-text"]) && e.push(D.value), o.helperLinkHref && (o.helperLink || C["helper-link"]) && e.push(k.value), e.filter(Boolean).join(" ") || void 0;
57
- }
58
- let j = r(() => ["text-area", { "component-max-width": o.maxWidth }]), M = r(() => ["text-area-container", { "text-area-container-outlined": o.outlined }]);
59
- return (n, r) => (s(), u("div", { class: c(j.value) }, [
60
- d("div", { class: c(M.value) }, [d("label", {
61
- id: O.value,
62
- for: T.value,
63
- class: c({ "is-required": o.required })
64
- }, [h(n.$slots, "label", {}, () => [m(t(o.label), 1)])], 10, _), d("textarea", f(e(p), {
65
- id: T.value,
66
- class: "text-area-field",
67
- placeholder: o.placeholder || " ",
68
- value: o.value,
69
- disabled: o.disabled,
70
- readonly: o.readonly,
71
- required: o.required,
72
- "aria-describedby": A(),
73
- "aria-invalid": o.invalid
74
- }), null, 16, v)], 2),
75
- (o.helperText || n.$slots["helper-text"]) && !o.invalid ? (s(), u("p", {
76
- key: 0,
77
- id: E.value,
78
- class: "helper-text"
79
- }, [h(n.$slots, "helper-text", {}, () => [m(t(o.helperText), 1)])], 8, y)) : a("", !0),
80
- o.invalid && (o.errorText || n.$slots["error-text"]) ? (s(), u("p", {
81
- key: 1,
82
- id: D.value,
83
- class: "error-text"
84
- }, [h(n.$slots, "error-text", {}, () => [m(t(o.errorText), 1)])], 8, b)) : a("", !0),
85
- o.helperLinkHref && (o.helperLink || n.$slots["helper-link"]) ? (s(), u("a", {
86
- key: 2,
87
- id: k.value,
88
- href: o.helperLinkHref,
89
- "aria-labelledby": `${k.value} ${O.value}`,
90
- class: "link link-small"
91
- }, [h(n.$slots, "helper-link", {}, () => [m(t(o.helperLink), 1)]), r[0] ||= d("span", { class: "visually-hidden" }, "on", -1)], 8, x)) : a("", !0)
92
- ], 2));
93
- }
94
- }), { shadowRoot: !1 });
95
- function C() {
96
- typeof customElements < "u" && (customElements.get("ouds-text-area") || customElements.define("ouds-text-area", S));
97
- }
98
- //#endregion
99
- export { C as n, S as t };
@@ -1,139 +0,0 @@
1
- import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createSlots as a, createTextVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, renderSlot as f, toDisplayString as p, toRef as m, unref as h, useAttrs as g, useId as _, useModel as v, useSlots as y, withCtx as b } from "vue";
2
- //#region src/components/text-area/TextArea.vue?vue&type=script&setup=true&lang.ts
3
- var x = ["id", "for"], S = [
4
- "id",
5
- "placeholder",
6
- "value",
7
- "disabled",
8
- "readonly",
9
- "required",
10
- "aria-describedby",
11
- "aria-invalid"
12
- ], C = ["id"], w = ["id"], T = [
13
- "id",
14
- "href",
15
- "aria-labelledby"
16
- ], E = /* @__PURE__ */ s({
17
- inheritAttrs: !1,
18
- __name: "TextArea",
19
- props: {
20
- label: { default: "Text area" },
21
- placeholder: { default: " " },
22
- helperText: { default: "" },
23
- errorText: { default: "" },
24
- helperLink: { default: "" },
25
- helperLinkHref: { default: "" },
26
- value: { default: "" },
27
- outlined: {
28
- type: Boolean,
29
- default: !1
30
- },
31
- disabled: {
32
- type: Boolean,
33
- default: !1
34
- },
35
- readonly: {
36
- type: Boolean,
37
- default: !1
38
- },
39
- required: {
40
- type: Boolean,
41
- default: !1
42
- },
43
- invalid: {
44
- type: Boolean,
45
- default: !1
46
- },
47
- maxWidth: {
48
- type: Boolean,
49
- default: !1
50
- }
51
- },
52
- setup(t) {
53
- let a = g(), s = m(() => a.id), c = y(), v = _(), b = m(() => s.value || `ouds-text-area-${v}`), E = m(() => `${b.value}-helper`), D = m(() => `${b.value}-error`), O = m(() => `${b.value}-label`), k = m(() => `${b.value}-helper-link`);
54
- function A() {
55
- let e = [a["aria-describedby"]];
56
- return (t.helperText || c["helper-text"]) && !t.invalid && e.push(E.value), t.invalid && (t.errorText || c["error-text"]) && e.push(D.value), t.helperLinkHref && (t.helperLink || c["helper-link"]) && e.push(k.value), e.filter(Boolean).join(" ") || void 0;
57
- }
58
- let j = e(() => ["text-area", { "component-max-width": t.maxWidth }]), M = e(() => ["text-area-container", { "text-area-container-outlined": t.outlined }]);
59
- return (e, s) => (d(), r("div", { class: u(j.value) }, [
60
- i("div", { class: u(M.value) }, [i("label", {
61
- id: O.value,
62
- for: b.value,
63
- class: u({ "is-required": t.required })
64
- }, [f(e.$slots, "label", {}, () => [o(p(t.label), 1)])], 10, x), i("textarea", l(h(a), {
65
- id: b.value,
66
- class: "text-area-field",
67
- placeholder: t.placeholder || " ",
68
- value: t.value,
69
- disabled: t.disabled,
70
- readonly: t.readonly,
71
- required: t.required,
72
- "aria-describedby": A(),
73
- "aria-invalid": t.invalid
74
- }), null, 16, S)], 2),
75
- (t.helperText || e.$slots["helper-text"]) && !t.invalid ? (d(), r("p", {
76
- key: 0,
77
- id: E.value,
78
- class: "helper-text"
79
- }, [f(e.$slots, "helper-text", {}, () => [o(p(t.helperText), 1)])], 8, C)) : n("", !0),
80
- t.invalid && (t.errorText || e.$slots["error-text"]) ? (d(), r("p", {
81
- key: 1,
82
- id: D.value,
83
- class: "error-text"
84
- }, [f(e.$slots, "error-text", {}, () => [o(p(t.errorText), 1)])], 8, w)) : n("", !0),
85
- t.helperLinkHref && (t.helperLink || e.$slots["helper-link"]) ? (d(), r("a", {
86
- key: 2,
87
- id: k.value,
88
- href: t.helperLinkHref,
89
- "aria-labelledby": `${k.value} ${O.value}`,
90
- class: "link link-small"
91
- }, [f(e.$slots, "helper-link", {}, () => [o(p(t.helperLink), 1)]), s[0] ||= i("span", { class: "visually-hidden" }, "on", -1)], 8, T)) : n("", !0)
92
- ], 2));
93
- }
94
- }), D = /* @__PURE__ */ s({
95
- inheritAttrs: !1,
96
- __name: "VueTextArea",
97
- props: {
98
- modelValue: { default: "" },
99
- modelModifiers: {}
100
- },
101
- emits: /*@__PURE__*/ c(["input", "change"], ["update:modelValue"]),
102
- setup(e, { emit: n }) {
103
- let r = v(e, "modelValue"), i = n;
104
- function o(e) {
105
- r.value = e.target.value, i("input", e);
106
- }
107
- function s(e) {
108
- r.value = e.target.value, i("change", e);
109
- }
110
- return (e, n) => (d(), t(E, l(e.$attrs, {
111
- value: r.value,
112
- onInput: o,
113
- onChange: s
114
- }), a({ _: 2 }, [
115
- e.$slots.label ? {
116
- name: "label",
117
- fn: b(() => [f(e.$slots, "label")]),
118
- key: "0"
119
- } : void 0,
120
- e.$slots["helper-text"] ? {
121
- name: "helper-text",
122
- fn: b(() => [f(e.$slots, "helper-text")]),
123
- key: "1"
124
- } : void 0,
125
- e.$slots["error-text"] ? {
126
- name: "error-text",
127
- fn: b(() => [f(e.$slots, "error-text")]),
128
- key: "2"
129
- } : void 0,
130
- e.$slots["helper-link"] ? {
131
- name: "helper-link",
132
- fn: b(() => [f(e.$slots, "helper-link")]),
133
- key: "3"
134
- } : void 0
135
- ]), 1040, ["value"]));
136
- }
137
- });
138
- //#endregion
139
- export { D as t };
@@ -1,207 +0,0 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, defineComponent as c, guardReactiveProps as l, mergeModels as u, mergeProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, renderSlot as h, toDisplayString as g, toRef as _, useAttrs as v, useId as y, useModel as b, useSlots as x, withCtx as S } from "vue";
2
- //#region src/components/text-input/TextInput.vue?vue&type=script&setup=true&lang.ts
3
- var C = ["id", "for"], w = ["data-bs-prefix", "data-bs-suffix"], T = [
4
- "id",
5
- "type",
6
- "placeholder",
7
- "value",
8
- "disabled",
9
- "readonly",
10
- "required",
11
- "aria-describedby",
12
- "aria-invalid"
13
- ], E = [
14
- "id",
15
- "type",
16
- "placeholder",
17
- "value",
18
- "disabled",
19
- "readonly",
20
- "required",
21
- "aria-describedby",
22
- "aria-invalid"
23
- ], D = ["id"], O = ["id"], k = ["id"], A = [
24
- "id",
25
- "href",
26
- "aria-labelledby"
27
- ], j = /* @__PURE__ */ c({
28
- inheritAttrs: !1,
29
- __name: "TextInput",
30
- props: {
31
- label: { default: "Text input" },
32
- placeholder: { default: " " },
33
- helperText: { default: "" },
34
- errorText: { default: "" },
35
- helperLink: { default: "" },
36
- helperLinkHref: { default: "" },
37
- suffix: { default: "" },
38
- value: { default: "" },
39
- type: { default: "text" },
40
- outlined: {
41
- type: Boolean,
42
- default: !1
43
- },
44
- disabled: {
45
- type: Boolean,
46
- default: !1
47
- },
48
- readonly: {
49
- type: Boolean,
50
- default: !1
51
- },
52
- required: {
53
- type: Boolean,
54
- default: !1
55
- },
56
- invalid: {
57
- type: Boolean,
58
- default: !1
59
- },
60
- maxWidth: {
61
- type: Boolean,
62
- default: !1
63
- },
64
- loading: {
65
- type: Boolean,
66
- default: !1
67
- }
68
- },
69
- setup(n) {
70
- let o = v(), c = _(() => o.prefix || "");
71
- function l() {
72
- let { prefix: e, ...t } = o;
73
- return t;
74
- }
75
- let u = _(() => o.id), p = x(), b = y(), S = _(() => u.value || `ouds-text-input-${b}`), j = _(() => `${S.value}-helper`), M = _(() => `${S.value}-error`), N = _(() => `${S.value}-label`), P = _(() => `${S.value}-helper-link`), F = _(() => `${S.value}-loading`);
76
- function I() {
77
- let e = [o["aria-describedby"]];
78
- return (n.helperText || p["helper-text"]) && !n.invalid && e.push(j.value), n.invalid && (n.errorText || p["error-text"]) && e.push(M.value), n.helperLinkHref && (n.helperLink || p["helper-link"]) && e.push(P.value), n.loading && e.push(F.value), e.filter(Boolean).join(" ") || void 0;
79
- }
80
- let L = t(() => ["text-input", { "component-max-width": n.maxWidth }]), R = t(() => ["text-input-container", { "text-input-container-outlined": n.outlined }]), z = t(() => ["text-input-field", { "loading-indeterminate": n.loading }]);
81
- return (t, o) => (m(), i("div", { class: f(L.value) }, [
82
- a("div", { class: f(R.value) }, [
83
- h(t.$slots, "leading-icon"),
84
- a("label", {
85
- id: N.value,
86
- for: S.value,
87
- class: f({ "is-required": n.required })
88
- }, [h(t.$slots, "label", {}, () => [s(g(n.label), 1)])], 10, C),
89
- c.value || n.suffix ? (m(), i("div", {
90
- key: 0,
91
- class: "input-container",
92
- "data-bs-prefix": c.value || void 0,
93
- "data-bs-suffix": n.suffix || void 0
94
- }, [a("input", d(l(), {
95
- id: S.value,
96
- type: n.type,
97
- class: z.value,
98
- placeholder: n.placeholder || " ",
99
- value: n.value,
100
- disabled: n.disabled,
101
- readonly: n.readonly,
102
- required: n.required,
103
- "aria-describedby": I(),
104
- "aria-invalid": n.invalid
105
- }), null, 16, T)], 8, w)) : (m(), i("input", d({ key: 1 }, l(), {
106
- id: S.value,
107
- type: n.type,
108
- class: z.value,
109
- placeholder: n.placeholder || " ",
110
- value: n.value,
111
- disabled: n.disabled,
112
- readonly: n.readonly,
113
- required: n.required,
114
- "aria-describedby": I(),
115
- "aria-invalid": n.invalid
116
- }), null, 16, E)),
117
- n.loading ? (m(), i(e, { key: 2 }, [o[0] ||= a("svg", {
118
- viewBox: "0 0 40 40",
119
- xmlns: "http://www.w3.org/2000/svg",
120
- class: "loader",
121
- "aria-hidden": "true"
122
- }, [a("circle", {
123
- class: "loader-inner",
124
- cx: "20",
125
- cy: "20",
126
- r: "17"
127
- })], -1), a("span", {
128
- id: F.value,
129
- role: "status",
130
- class: "visually-hidden"
131
- }, "Loading", 8, D)], 64)) : h(t.$slots, "trailing-action", { disabled: n.disabled || n.readonly }, void 0, void 0, 3)
132
- ], 2),
133
- (n.helperText || t.$slots["helper-text"]) && !n.invalid ? (m(), i("p", {
134
- key: 0,
135
- id: j.value,
136
- class: "helper-text"
137
- }, [h(t.$slots, "helper-text", {}, () => [s(g(n.helperText), 1)])], 8, O)) : r("", !0),
138
- n.invalid && (n.errorText || t.$slots["error-text"]) ? (m(), i("p", {
139
- key: 1,
140
- id: M.value,
141
- class: "error-text"
142
- }, [h(t.$slots, "error-text", {}, () => [s(g(n.errorText), 1)])], 8, k)) : r("", !0),
143
- n.helperLinkHref && (n.helperLink || t.$slots["helper-link"]) ? (m(), i("a", {
144
- key: 2,
145
- id: P.value,
146
- href: n.helperLinkHref,
147
- "aria-labelledby": `${P.value} ${N.value}`,
148
- class: "link link-small"
149
- }, [h(t.$slots, "helper-link", {}, () => [s(g(n.helperLink), 1)]), o[1] ||= a("span", { class: "visually-hidden" }, "on", -1)], 8, A)) : r("", !0)
150
- ], 2));
151
- }
152
- }), M = /* @__PURE__ */ c({
153
- inheritAttrs: !1,
154
- __name: "VueTextInput",
155
- props: {
156
- modelValue: { default: "" },
157
- modelModifiers: {}
158
- },
159
- emits: /*@__PURE__*/ u(["input", "change"], ["update:modelValue"]),
160
- setup(e, { emit: t }) {
161
- let r = b(e, "modelValue"), i = t;
162
- function a(e) {
163
- r.value = e.target.value, i("input", e);
164
- }
165
- function s(e) {
166
- r.value = e.target.value, i("change", e);
167
- }
168
- return (e, t) => (m(), n(j, d(e.$attrs, {
169
- value: r.value,
170
- onInput: a,
171
- onChange: s
172
- }), o({ _: 2 }, [
173
- e.$slots.label ? {
174
- name: "label",
175
- fn: S(() => [h(e.$slots, "label")]),
176
- key: "0"
177
- } : void 0,
178
- e.$slots["leading-icon"] ? {
179
- name: "leading-icon",
180
- fn: S(() => [h(e.$slots, "leading-icon")]),
181
- key: "1"
182
- } : void 0,
183
- e.$slots["trailing-action"] ? {
184
- name: "trailing-action",
185
- fn: S((t) => [h(e.$slots, "trailing-action", p(l(t)))]),
186
- key: "2"
187
- } : void 0,
188
- e.$slots["helper-text"] ? {
189
- name: "helper-text",
190
- fn: S(() => [h(e.$slots, "helper-text")]),
191
- key: "3"
192
- } : void 0,
193
- e.$slots["error-text"] ? {
194
- name: "error-text",
195
- fn: S(() => [h(e.$slots, "error-text")]),
196
- key: "4"
197
- } : void 0,
198
- e.$slots["helper-link"] ? {
199
- name: "helper-link",
200
- fn: S(() => [h(e.$slots, "helper-link")]),
201
- key: "5"
202
- } : void 0
203
- ]), 1040, ["value"]));
204
- }
205
- });
206
- //#endregion
207
- export { M as t };
@@ -1,157 +0,0 @@
1
- import { M as e, S as t, a as n, b as r, c as i, d as a, g as o, i as s, j as c, k as l, l as u, o as d, p as f, t as p, u as m, v as h, x as g } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
2
- //#region src/components/text-input/TextInput.vue?vue&type=script&setup=true&lang.ts
3
- var _ = ["id", "for"], v = ["data-bs-prefix", "data-bs-suffix"], y = [
4
- "id",
5
- "type",
6
- "placeholder",
7
- "value",
8
- "disabled",
9
- "readonly",
10
- "required",
11
- "aria-describedby",
12
- "aria-invalid"
13
- ], b = [
14
- "id",
15
- "type",
16
- "placeholder",
17
- "value",
18
- "disabled",
19
- "readonly",
20
- "required",
21
- "aria-describedby",
22
- "aria-invalid"
23
- ], x = ["id"], S = ["id"], C = ["id"], w = [
24
- "id",
25
- "href",
26
- "aria-labelledby"
27
- ], T = p(/* @__PURE__ */ a({
28
- inheritAttrs: !1,
29
- __name: "TextInput",
30
- props: {
31
- label: { default: "Text input" },
32
- placeholder: { default: " " },
33
- helperText: { default: "" },
34
- errorText: { default: "" },
35
- helperLink: { default: "" },
36
- helperLinkHref: { default: "" },
37
- suffix: { default: "" },
38
- value: { default: "" },
39
- type: { default: "text" },
40
- outlined: {
41
- type: Boolean,
42
- default: !1
43
- },
44
- disabled: {
45
- type: Boolean,
46
- default: !1
47
- },
48
- readonly: {
49
- type: Boolean,
50
- default: !1
51
- },
52
- required: {
53
- type: Boolean,
54
- default: !1
55
- },
56
- invalid: {
57
- type: Boolean,
58
- default: !1
59
- },
60
- maxWidth: {
61
- type: Boolean,
62
- default: !1
63
- },
64
- loading: {
65
- type: Boolean,
66
- default: !1
67
- }
68
- },
69
- setup(a) {
70
- let p = r(), T = l(() => p.prefix || "");
71
- function E() {
72
- let { prefix: e, ...t } = p;
73
- return t;
74
- }
75
- let D = l(() => p.id), O = t(), k = g(), A = l(() => D.value || `ouds-text-input-${k}`), j = l(() => `${A.value}-helper`), M = l(() => `${A.value}-error`), N = l(() => `${A.value}-label`), P = l(() => `${A.value}-helper-link`), F = l(() => `${A.value}-loading`);
76
- function I() {
77
- let e = [p["aria-describedby"]];
78
- return (a.helperText || O["helper-text"]) && !a.invalid && e.push(j.value), a.invalid && (a.errorText || O["error-text"]) && e.push(M.value), a.helperLinkHref && (a.helperLink || O["helper-link"]) && e.push(P.value), a.loading && e.push(F.value), e.filter(Boolean).join(" ") || void 0;
79
- }
80
- let L = n(() => ["text-input", { "component-max-width": a.maxWidth }]), R = n(() => ["text-input-container", { "text-input-container-outlined": a.outlined }]), z = n(() => ["text-input-field", { "loading-indeterminate": a.loading }]);
81
- return (t, n) => (o(), u("div", { class: c(L.value) }, [
82
- d("div", { class: c(R.value) }, [
83
- h(t.$slots, "leading-icon"),
84
- d("label", {
85
- id: N.value,
86
- for: A.value,
87
- class: c({ "is-required": a.required })
88
- }, [h(t.$slots, "label", {}, () => [m(e(a.label), 1)])], 10, _),
89
- T.value || a.suffix ? (o(), u("div", {
90
- key: 0,
91
- class: "input-container",
92
- "data-bs-prefix": T.value || void 0,
93
- "data-bs-suffix": a.suffix || void 0
94
- }, [d("input", f(E(), {
95
- id: A.value,
96
- type: a.type,
97
- class: z.value,
98
- placeholder: a.placeholder || " ",
99
- value: a.value,
100
- disabled: a.disabled,
101
- readonly: a.readonly,
102
- required: a.required,
103
- "aria-describedby": I(),
104
- "aria-invalid": a.invalid
105
- }), null, 16, y)], 8, v)) : (o(), u("input", f({ key: 1 }, E(), {
106
- id: A.value,
107
- type: a.type,
108
- class: z.value,
109
- placeholder: a.placeholder || " ",
110
- value: a.value,
111
- disabled: a.disabled,
112
- readonly: a.readonly,
113
- required: a.required,
114
- "aria-describedby": I(),
115
- "aria-invalid": a.invalid
116
- }), null, 16, b)),
117
- a.loading ? (o(), u(s, { key: 2 }, [n[0] ||= d("svg", {
118
- viewBox: "0 0 40 40",
119
- xmlns: "http://www.w3.org/2000/svg",
120
- class: "loader",
121
- "aria-hidden": "true"
122
- }, [d("circle", {
123
- class: "loader-inner",
124
- cx: "20",
125
- cy: "20",
126
- r: "17"
127
- })], -1), d("span", {
128
- id: F.value,
129
- role: "status",
130
- class: "visually-hidden"
131
- }, "Loading", 8, x)], 64)) : h(t.$slots, "trailing-action", { disabled: a.disabled || a.readonly }, void 0, void 0, 3)
132
- ], 2),
133
- (a.helperText || t.$slots["helper-text"]) && !a.invalid ? (o(), u("p", {
134
- key: 0,
135
- id: j.value,
136
- class: "helper-text"
137
- }, [h(t.$slots, "helper-text", {}, () => [m(e(a.helperText), 1)])], 8, S)) : i("", !0),
138
- a.invalid && (a.errorText || t.$slots["error-text"]) ? (o(), u("p", {
139
- key: 1,
140
- id: M.value,
141
- class: "error-text"
142
- }, [h(t.$slots, "error-text", {}, () => [m(e(a.errorText), 1)])], 8, C)) : i("", !0),
143
- a.helperLinkHref && (a.helperLink || t.$slots["helper-link"]) ? (o(), u("a", {
144
- key: 2,
145
- id: P.value,
146
- href: a.helperLinkHref,
147
- "aria-labelledby": `${P.value} ${N.value}`,
148
- class: "link link-small"
149
- }, [h(t.$slots, "helper-link", {}, () => [m(e(a.helperLink), 1)]), n[1] ||= d("span", { class: "visually-hidden" }, "on", -1)], 8, w)) : i("", !0)
150
- ], 2));
151
- }
152
- }), { shadowRoot: !1 });
153
- function E() {
154
- typeof customElements < "u" && (customElements.get("ouds-text-input") || customElements.define("ouds-text-input", T));
155
- }
156
- //#endregion
157
- export { E as n, T as t };