@nilloq/ouds-web 0.1.6 → 0.1.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.
- package/README.md +17 -115
- package/dist/{alert-bsnEmrzb.js → alert-B4w3fDHo.js} +2 -2
- package/dist/{alert-By364Om4.js → alert-Chns046l.js} +1 -1
- package/dist/alert.js +1 -1
- package/dist/{badge-fffoaFuZ.js → badge-CDpWg-AO.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/{button-BUziAVbu.js → button-rgIJZsYq.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/checkbox-D7TFFuw3.js +196 -0
- package/dist/checkbox-DfYlHYR2.js +155 -0
- package/dist/checkbox.js +1 -1
- package/dist/chip-B3v4pWZD.js +92 -0
- package/dist/chip-DGfqitrQ.js +115 -0
- package/dist/chip.js +2 -0
- package/dist/{control-item-slots-BNXNsI1e.js → control-item-slots-BDoeNuk4.js} +5 -2
- package/dist/{control-item-slots-XV8Gjvf1.js → control-item-slots-Ddp7c8w8.js} +4 -1
- package/dist/elements-alert.js +1 -1
- package/dist/elements-badge.js +1 -1
- package/dist/elements-button.js +1 -1
- package/dist/elements-checkbox.js +1 -1
- package/dist/elements-chip.js +2 -0
- package/dist/elements-modal.js +1 -1
- package/dist/elements-radio.js +1 -1
- package/dist/elements-select.js +1 -1
- package/dist/elements-switch.js +1 -1
- package/dist/elements-tag.js +1 -1
- package/dist/elements-text-area.js +1 -1
- package/dist/elements-text-input.js +1 -1
- package/dist/elements.js +14 -13
- package/dist/index.js +13 -12
- package/dist/{modal-IEXNB8St.js → modal-BAvMVUIE.js} +2 -2
- package/dist/{modal-CHjaB_yR.js → modal-BnT5Kxjg.js} +1 -1
- package/dist/modal.js +1 -1
- package/dist/radio-CDq4r1_L.js +155 -0
- package/dist/radio-TaYThYkI.js +199 -0
- package/dist/radio.js +1 -1
- package/dist/{runtime-dom.esm-bundler-BeOO_l6v.js → runtime-dom.esm-bundler-DLryEdgJ.js} +1 -1
- package/dist/select--O3jL-En.js +134 -0
- package/dist/select-NiIx8bVD.js +191 -0
- package/dist/select.js +1 -1
- package/dist/switch-BmxLKPbL.js +179 -0
- package/dist/switch-D5N-j5F7.js +140 -0
- package/dist/switch.js +1 -1
- package/dist/{tag-BdB0YDBJ.js → tag-BvOt0v-c.js} +1 -1
- package/dist/tag.js +1 -1
- package/dist/text-area-BdmAyh3N.js +163 -0
- package/dist/text-area-BgYNtAMx.js +107 -0
- package/dist/text-area.js +1 -1
- package/dist/text-input-DgFIuIOA.js +235 -0
- package/dist/text-input-i559HVOP.js +163 -0
- package/dist/text-input.js +1 -1
- package/dist/types/chip.d.ts +1 -0
- package/dist/types/components/alert/Alert.vue.d.ts +3 -3
- package/dist/types/components/badge/Badge.vue.d.ts +1 -1
- package/dist/types/components/button/Button.vue.d.ts +1 -1
- package/dist/types/components/checkbox/Checkbox.vue.d.ts +4 -15
- package/dist/types/components/checkbox/VueCheckbox.vue.d.ts +9 -3
- package/dist/types/components/checkbox/checkbox.types.d.ts +16 -0
- package/dist/types/components/chip/Chip.vue.d.ts +38 -0
- package/dist/types/components/chip/VueChip.vue.d.ts +32 -0
- package/dist/types/components/chip/chip.context.d.ts +2 -0
- package/dist/types/components/chip/chip.types.d.ts +27 -0
- package/dist/types/components/modal/Modal.vue.d.ts +8 -8
- package/dist/types/components/radio/Radio.vue.d.ts +2 -17
- package/dist/types/components/radio/VueRadio.vue.d.ts +8 -6
- package/dist/types/components/radio/radio.types.d.ts +16 -0
- package/dist/types/components/select/Select.vue.d.ts +2 -19
- package/dist/types/components/select/VueSelect.vue.d.ts +9 -3
- package/dist/types/components/select/select.types.d.ts +18 -0
- package/dist/types/components/shared/control-item-slots.d.ts +1 -0
- package/dist/types/components/switch/Switch.vue.d.ts +2 -14
- package/dist/types/components/switch/VueSwitch.vue.d.ts +9 -3
- package/dist/types/components/switch/switch.types.d.ts +13 -0
- package/dist/types/components/tag/Tag.vue.d.ts +1 -1
- package/dist/types/components/text-area/TextArea.vue.d.ts +2 -16
- package/dist/types/components/text-area/VueTextArea.vue.d.ts +9 -3
- package/dist/types/components/text-area/text-area.types.d.ts +15 -0
- package/dist/types/components/text-input/TextInput.vue.d.ts +2 -19
- package/dist/types/components/text-input/VueTextInput.vue.d.ts +9 -3
- package/dist/types/components/text-input/text-input.types.d.ts +25 -0
- package/dist/types/elements/chip.d.ts +4 -0
- package/dist/types/elements/index.d.ts +2 -0
- package/dist/types/vue/checkbox.d.ts +1 -1
- package/dist/types/vue/chip.d.ts +2 -0
- package/dist/types/vue/index.d.ts +8 -6
- package/dist/types/vue/radio.d.ts +1 -1
- package/dist/types/vue/select.d.ts +1 -1
- package/dist/types/vue/switch.d.ts +1 -1
- package/dist/types/vue/text-area.d.ts +1 -1
- package/dist/types/vue/text-input.d.ts +1 -1
- package/dist/vue-alert.js +1 -1
- package/dist/vue-checkbox.js +1 -1
- package/dist/vue-chip.js +2 -0
- package/dist/vue-modal.js +1 -1
- package/dist/vue-radio.js +1 -1
- package/dist/vue-select.js +1 -1
- package/dist/vue-switch.js +1 -1
- package/dist/vue-text-area.js +1 -1
- package/dist/vue-text-input.js +1 -1
- package/dist/vue.js +10 -9
- package/package.json +15 -2
- package/dist/checkbox-PAgQqiIw.js +0 -145
- package/dist/checkbox-g6cqR6wz.js +0 -170
- package/dist/radio-Cmrtred_.js +0 -147
- package/dist/radio-CqVqsZ7n.js +0 -175
- package/dist/select-Bpou1HIY.js +0 -167
- package/dist/select-CWjTpHGb.js +0 -126
- package/dist/switch-CFv0JUeq.js +0 -132
- package/dist/switch-DEYsTCw5.js +0 -157
- package/dist/text-area-DkjEGpHg.js +0 -99
- package/dist/text-area-DqBoz2_d.js +0 -139
- package/dist/text-input-DnWjB1vE.js +0 -207
- package/dist/text-input-DxzwRS2R.js +0 -157
package/dist/switch-CFv0JUeq.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { A as e, M as t, T as n, a as r, b as i, c as a, d as o, f as s, g as c, j as l, k as u, l as d, o as f, p, s as m, t as h, u as g, v as _, x as v, y } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
|
|
2
|
-
import { n as b, t as x } from "./control-item-slots-BNXNsI1e.js";
|
|
3
|
-
//#region src/components/switch/switch.context.ts
|
|
4
|
-
var S = Symbol("ouds-switch-element-id"), C = { class: "control-item-assets-container" }, w = [
|
|
5
|
-
"id",
|
|
6
|
-
"value",
|
|
7
|
-
"checked",
|
|
8
|
-
"disabled",
|
|
9
|
-
"required",
|
|
10
|
-
"aria-describedby",
|
|
11
|
-
"aria-invalid"
|
|
12
|
-
], T = [
|
|
13
|
-
"id",
|
|
14
|
-
"aria-checked",
|
|
15
|
-
"aria-labelledby",
|
|
16
|
-
"aria-describedby",
|
|
17
|
-
"aria-invalid"
|
|
18
|
-
], E = { class: "control-item-text-container" }, D = ["id"], O = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "control-item-assets-container"
|
|
21
|
-
}, k = /* @__PURE__ */ o({
|
|
22
|
-
inheritAttrs: !1,
|
|
23
|
-
__name: "Switch",
|
|
24
|
-
props: {
|
|
25
|
-
label: { default: "Switch" },
|
|
26
|
-
description: { default: "" },
|
|
27
|
-
value: { default: "" },
|
|
28
|
-
checked: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: !1
|
|
31
|
-
},
|
|
32
|
-
disabled: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: !1
|
|
35
|
-
},
|
|
36
|
-
required: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: !1
|
|
39
|
-
},
|
|
40
|
-
divider: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: !1
|
|
43
|
-
},
|
|
44
|
-
readonly: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: !1
|
|
47
|
-
},
|
|
48
|
-
invalid: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: !1
|
|
51
|
-
},
|
|
52
|
-
reverse: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: !1
|
|
55
|
-
},
|
|
56
|
-
maxWidth: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: !1
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
setup(o) {
|
|
62
|
-
let h = i(), x = u(() => h.id), k = v(), A = s(S, void 0), j = b(A !== void 0), M = u(() => A ? `${x.value || A}-input` : x.value || `ouds-switch-${k}`), N = u(() => `${M.value}-label`), P = u(() => `${M.value}-description`);
|
|
63
|
-
function F() {
|
|
64
|
-
let e = [h["aria-describedby"]];
|
|
65
|
-
return (o.description || j("description")) && e.push(P.value), e.filter(Boolean).join(" ") || void 0;
|
|
66
|
-
}
|
|
67
|
-
function I() {
|
|
68
|
-
return [h["aria-labelledby"], N.value].filter(Boolean).join(" ");
|
|
69
|
-
}
|
|
70
|
-
let L = r(() => ["switch-item", {
|
|
71
|
-
"control-item-divider": o.divider,
|
|
72
|
-
"control-item-reverse": o.reverse,
|
|
73
|
-
"component-max-width": o.maxWidth
|
|
74
|
-
}]);
|
|
75
|
-
return (r, i) => (c(), d("div", { class: l(L.value) }, [
|
|
76
|
-
f("div", C, [o.readonly ? (c(), d("span", p({ key: 1 }, e(h), {
|
|
77
|
-
id: M.value,
|
|
78
|
-
class: "control-item-indicator",
|
|
79
|
-
role: "switch",
|
|
80
|
-
"aria-readonly": "true",
|
|
81
|
-
"aria-disabled": "true",
|
|
82
|
-
tabindex: "0",
|
|
83
|
-
"aria-checked": o.checked,
|
|
84
|
-
"aria-labelledby": I(),
|
|
85
|
-
"aria-describedby": F(),
|
|
86
|
-
"aria-invalid": o.invalid || e(h)["aria-invalid"]
|
|
87
|
-
}), null, 16, T)) : (c(), d("input", p({ key: 0 }, e(h), {
|
|
88
|
-
id: M.value,
|
|
89
|
-
class: "control-item-indicator",
|
|
90
|
-
type: "checkbox",
|
|
91
|
-
role: "switch",
|
|
92
|
-
value: o.value,
|
|
93
|
-
checked: o.checked,
|
|
94
|
-
disabled: o.disabled,
|
|
95
|
-
required: o.required,
|
|
96
|
-
"aria-describedby": F(),
|
|
97
|
-
"aria-invalid": o.invalid || e(h)["aria-invalid"]
|
|
98
|
-
}), null, 16, w))]),
|
|
99
|
-
f("div", E, [(c(), m(y(o.readonly ? "span" : "label"), {
|
|
100
|
-
id: N.value,
|
|
101
|
-
class: l(["control-item-label", { "is-required": o.required }]),
|
|
102
|
-
for: o.readonly ? void 0 : M.value
|
|
103
|
-
}, {
|
|
104
|
-
default: n(() => [_(r.$slots, "label", {}, () => [g(t(o.label), 1)])]),
|
|
105
|
-
_: 3
|
|
106
|
-
}, 8, [
|
|
107
|
-
"id",
|
|
108
|
-
"class",
|
|
109
|
-
"for"
|
|
110
|
-
])), o.description || e(j)("description") ? (c(), d("p", {
|
|
111
|
-
key: 0,
|
|
112
|
-
id: P.value,
|
|
113
|
-
class: "control-item-description"
|
|
114
|
-
}, [_(r.$slots, "description", {}, () => [g(t(o.description), 1)])], 8, D)) : a("", !0)]),
|
|
115
|
-
e(j)("asset") ? (c(), d("div", O, [_(r.$slots, "asset")])) : a("", !0)
|
|
116
|
-
], 2));
|
|
117
|
-
}
|
|
118
|
-
}), A = 0, j = h(k, {
|
|
119
|
-
shadowRoot: !1,
|
|
120
|
-
configureApp(e) {
|
|
121
|
-
e.provide(S, `ouds-switch-element-${A++}`);
|
|
122
|
-
}
|
|
123
|
-
}), M = class extends j {
|
|
124
|
-
connectedCallback() {
|
|
125
|
-
x(this), super.connectedCallback();
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
function N() {
|
|
129
|
-
typeof customElements < "u" && (customElements.get("ouds-switch") || customElements.define("ouds-switch", M));
|
|
130
|
-
}
|
|
131
|
-
//#endregion
|
|
132
|
-
export { N as n, M as t };
|
package/dist/switch-DEYsTCw5.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./control-item-slots-XV8Gjvf1.js";
|
|
2
|
-
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, defineComponent as c, inject as l, mergeModels as u, mergeProps as d, normalizeClass as f, openBlock as p, renderSlot as m, resolveDynamicComponent as h, toDisplayString as g, toRef as _, unref as v, useAttrs as y, useId as b, useModel as x, withCtx as S } from "vue";
|
|
3
|
-
//#region src/components/switch/switch.context.ts
|
|
4
|
-
var C = Symbol("ouds-switch-element-id"), w = { class: "control-item-assets-container" }, T = [
|
|
5
|
-
"id",
|
|
6
|
-
"value",
|
|
7
|
-
"checked",
|
|
8
|
-
"disabled",
|
|
9
|
-
"required",
|
|
10
|
-
"aria-describedby",
|
|
11
|
-
"aria-invalid"
|
|
12
|
-
], E = [
|
|
13
|
-
"id",
|
|
14
|
-
"aria-checked",
|
|
15
|
-
"aria-labelledby",
|
|
16
|
-
"aria-describedby",
|
|
17
|
-
"aria-invalid"
|
|
18
|
-
], D = { class: "control-item-text-container" }, O = ["id"], k = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "control-item-assets-container"
|
|
21
|
-
}, A = /* @__PURE__ */ c({
|
|
22
|
-
inheritAttrs: !1,
|
|
23
|
-
__name: "Switch",
|
|
24
|
-
props: {
|
|
25
|
-
label: { default: "Switch" },
|
|
26
|
-
description: { default: "" },
|
|
27
|
-
value: { default: "" },
|
|
28
|
-
checked: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: !1
|
|
31
|
-
},
|
|
32
|
-
disabled: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: !1
|
|
35
|
-
},
|
|
36
|
-
required: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: !1
|
|
39
|
-
},
|
|
40
|
-
divider: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: !1
|
|
43
|
-
},
|
|
44
|
-
readonly: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: !1
|
|
47
|
-
},
|
|
48
|
-
invalid: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: !1
|
|
51
|
-
},
|
|
52
|
-
reverse: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: !1
|
|
55
|
-
},
|
|
56
|
-
maxWidth: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: !1
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
setup(o) {
|
|
62
|
-
let c = y(), u = _(() => c.id), x = b(), A = l(C, void 0), j = e(A !== void 0), M = _(() => A ? `${u.value || A}-input` : u.value || `ouds-switch-${x}`), N = _(() => `${M.value}-label`), P = _(() => `${M.value}-description`);
|
|
63
|
-
function F() {
|
|
64
|
-
let e = [c["aria-describedby"]];
|
|
65
|
-
return (o.description || j("description")) && e.push(P.value), e.filter(Boolean).join(" ") || void 0;
|
|
66
|
-
}
|
|
67
|
-
function I() {
|
|
68
|
-
return [c["aria-labelledby"], N.value].filter(Boolean).join(" ");
|
|
69
|
-
}
|
|
70
|
-
let L = t(() => ["switch-item", {
|
|
71
|
-
"control-item-divider": o.divider,
|
|
72
|
-
"control-item-reverse": o.reverse,
|
|
73
|
-
"component-max-width": o.maxWidth
|
|
74
|
-
}]);
|
|
75
|
-
return (e, t) => (p(), i("div", { class: f(L.value) }, [
|
|
76
|
-
a("div", w, [o.readonly ? (p(), i("span", d({ key: 1 }, v(c), {
|
|
77
|
-
id: M.value,
|
|
78
|
-
class: "control-item-indicator",
|
|
79
|
-
role: "switch",
|
|
80
|
-
"aria-readonly": "true",
|
|
81
|
-
"aria-disabled": "true",
|
|
82
|
-
tabindex: "0",
|
|
83
|
-
"aria-checked": o.checked,
|
|
84
|
-
"aria-labelledby": I(),
|
|
85
|
-
"aria-describedby": F(),
|
|
86
|
-
"aria-invalid": o.invalid || v(c)["aria-invalid"]
|
|
87
|
-
}), null, 16, E)) : (p(), i("input", d({ key: 0 }, v(c), {
|
|
88
|
-
id: M.value,
|
|
89
|
-
class: "control-item-indicator",
|
|
90
|
-
type: "checkbox",
|
|
91
|
-
role: "switch",
|
|
92
|
-
value: o.value,
|
|
93
|
-
checked: o.checked,
|
|
94
|
-
disabled: o.disabled,
|
|
95
|
-
required: o.required,
|
|
96
|
-
"aria-describedby": F(),
|
|
97
|
-
"aria-invalid": o.invalid || v(c)["aria-invalid"]
|
|
98
|
-
}), null, 16, T))]),
|
|
99
|
-
a("div", D, [(p(), n(h(o.readonly ? "span" : "label"), {
|
|
100
|
-
id: N.value,
|
|
101
|
-
class: f(["control-item-label", { "is-required": o.required }]),
|
|
102
|
-
for: o.readonly ? void 0 : M.value
|
|
103
|
-
}, {
|
|
104
|
-
default: S(() => [m(e.$slots, "label", {}, () => [s(g(o.label), 1)])]),
|
|
105
|
-
_: 3
|
|
106
|
-
}, 8, [
|
|
107
|
-
"id",
|
|
108
|
-
"class",
|
|
109
|
-
"for"
|
|
110
|
-
])), o.description || v(j)("description") ? (p(), i("p", {
|
|
111
|
-
key: 0,
|
|
112
|
-
id: P.value,
|
|
113
|
-
class: "control-item-description"
|
|
114
|
-
}, [m(e.$slots, "description", {}, () => [s(g(o.description), 1)])], 8, O)) : r("", !0)]),
|
|
115
|
-
v(j)("asset") ? (p(), i("div", k, [m(e.$slots, "asset")])) : r("", !0)
|
|
116
|
-
], 2));
|
|
117
|
-
}
|
|
118
|
-
}), j = /* @__PURE__ */ c({
|
|
119
|
-
inheritAttrs: !1,
|
|
120
|
-
__name: "VueSwitch",
|
|
121
|
-
props: {
|
|
122
|
-
modelValue: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: !1
|
|
125
|
-
},
|
|
126
|
-
modelModifiers: {}
|
|
127
|
-
},
|
|
128
|
-
emits: /*@__PURE__*/ u(["change"], ["update:modelValue"]),
|
|
129
|
-
setup(e, { emit: t }) {
|
|
130
|
-
let r = x(e, "modelValue"), i = t;
|
|
131
|
-
function a(e) {
|
|
132
|
-
r.value = e.target.checked, i("change", e);
|
|
133
|
-
}
|
|
134
|
-
return (e, t) => (p(), n(A, d(e.$attrs, {
|
|
135
|
-
checked: r.value,
|
|
136
|
-
onChange: a
|
|
137
|
-
}), o({ _: 2 }, [
|
|
138
|
-
e.$slots.label ? {
|
|
139
|
-
name: "label",
|
|
140
|
-
fn: S(() => [m(e.$slots, "label")]),
|
|
141
|
-
key: "0"
|
|
142
|
-
} : void 0,
|
|
143
|
-
e.$slots.asset ? {
|
|
144
|
-
name: "asset",
|
|
145
|
-
fn: S(() => [m(e.$slots, "asset")]),
|
|
146
|
-
key: "1"
|
|
147
|
-
} : void 0,
|
|
148
|
-
e.$slots.description ? {
|
|
149
|
-
name: "description",
|
|
150
|
-
fn: S(() => [m(e.$slots, "description")]),
|
|
151
|
-
key: "2"
|
|
152
|
-
} : void 0
|
|
153
|
-
]), 1040, ["checked"]));
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
//#endregion
|
|
157
|
-
export { j as t };
|
|
@@ -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 };
|