@nilloq/ouds-web 0.1.5 → 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/LICENSE +21 -0
- package/README.md +17 -72
- package/dist/alert-B4w3fDHo.js +89 -0
- package/dist/alert-Chns046l.js +77 -0
- package/dist/alert.js +2 -0
- package/dist/badge-CDpWg-AO.js +57 -0
- package/dist/badge-yaFEZnEW.js +54 -0
- package/dist/badge.js +2 -0
- package/dist/{button-LlRiSiGS.js → button-nN1Pcwm6.js} +36 -21
- package/dist/button-rgIJZsYq.js +94 -0
- 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-BDoeNuk4.js +15 -0
- package/dist/control-item-slots-Ddp7c8w8.js +12 -0
- package/dist/elements-alert.js +2 -0
- package/dist/elements-badge.js +2 -0
- 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 +2 -0
- package/dist/elements-radio.js +2 -0
- package/dist/elements-select.js +1 -1
- package/dist/elements-switch.js +2 -0
- package/dist/elements-tag.js +1 -1
- package/dist/elements-text-area.js +2 -0
- package/dist/elements-text-input.js +1 -1
- package/dist/elements.js +14 -7
- package/dist/index.js +13 -6
- package/dist/modal-BAvMVUIE.js +193 -0
- package/dist/modal-BnT5Kxjg.js +181 -0
- package/dist/modal.js +2 -0
- package/dist/radio-CDq4r1_L.js +155 -0
- package/dist/radio-TaYThYkI.js +199 -0
- package/dist/radio.js +5 -0
- package/dist/{runtime-dom.esm-bundler-BzNNnH8h.js → runtime-dom.esm-bundler-DLryEdgJ.js} +987 -839
- 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 +5 -0
- package/dist/tag-BvOt0v-c.js +84 -0
- package/dist/tag-Un7w0uDf.js +81 -0
- 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 +5 -0
- 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/alert.d.ts +1 -0
- package/dist/types/badge.d.ts +1 -0
- package/dist/types/chip.d.ts +1 -0
- package/dist/types/components/alert/Alert.vue.d.ts +37 -0
- package/dist/types/components/alert/alert.context.d.ts +2 -0
- package/dist/types/components/alert/alert.options.d.ts +2 -0
- package/dist/types/components/alert/alert.types.d.ts +14 -0
- package/dist/types/components/badge/Badge.vue.d.ts +26 -0
- package/dist/types/components/badge/badge.options.d.ts +4 -0
- package/dist/types/components/badge/badge.types.d.ts +13 -0
- package/dist/types/components/button/Button.vue.d.ts +8 -5
- package/dist/types/components/button/button.options.d.ts +1 -1
- package/dist/types/components/button/button.types.d.ts +2 -0
- package/dist/types/components/checkbox/Checkbox.vue.d.ts +13 -17
- package/dist/types/components/checkbox/VueCheckbox.vue.d.ts +18 -8
- package/dist/types/components/checkbox/checkbox.context.d.ts +2 -0
- package/dist/types/components/checkbox/checkbox.types.d.ts +20 -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 +86 -0
- package/dist/types/components/modal/modal.context.d.ts +2 -0
- package/dist/types/components/modal/modal.options.d.ts +7 -0
- package/dist/types/components/modal/modal.types.d.ts +28 -0
- package/dist/types/components/radio/Radio.vue.d.ts +22 -0
- package/dist/types/components/radio/VueRadio.vue.d.ts +36 -0
- package/dist/types/components/radio/radio.context.d.ts +2 -0
- package/dist/types/components/radio/radio.types.d.ts +36 -0
- package/dist/types/components/select/Select.vue.d.ts +17 -17
- package/dist/types/components/select/VueSelect.vue.d.ts +24 -8
- package/dist/types/components/select/select.types.d.ts +28 -0
- package/dist/types/components/shared/control-item-slots.d.ts +3 -0
- package/dist/types/components/switch/Switch.vue.d.ts +20 -0
- package/dist/types/components/switch/VueSwitch.vue.d.ts +34 -0
- package/dist/types/components/switch/switch.context.d.ts +2 -0
- package/dist/types/components/switch/switch.types.d.ts +30 -0
- package/dist/types/components/tag/Tag.vue.d.ts +9 -4
- package/dist/types/components/tag/tag.options.d.ts +1 -1
- package/dist/types/components/tag/tag.types.d.ts +4 -0
- package/dist/types/components/text-area/TextArea.vue.d.ts +22 -0
- package/dist/types/components/text-area/VueTextArea.vue.d.ts +38 -0
- package/dist/types/components/text-area/text-area.types.d.ts +34 -0
- package/dist/types/components/text-input/TextInput.vue.d.ts +19 -34
- package/dist/types/components/text-input/VueTextInput.vue.d.ts +26 -16
- package/dist/types/components/text-input/text-input.types.d.ts +26 -0
- package/dist/types/elements/alert.d.ts +5 -0
- package/dist/types/elements/badge.d.ts +5 -0
- package/dist/types/elements/chip.d.ts +4 -0
- package/dist/types/elements/index.d.ts +15 -0
- package/dist/types/elements/modal.d.ts +5 -0
- package/dist/types/elements/radio.d.ts +4 -0
- package/dist/types/elements/switch.d.ts +4 -0
- package/dist/types/elements/text-area.d.ts +4 -0
- package/dist/types/modal.d.ts +1 -0
- package/dist/types/radio.d.ts +2 -0
- package/dist/types/switch.d.ts +2 -0
- package/dist/types/text-area.d.ts +2 -0
- package/dist/types/vue/alert.d.ts +3 -0
- package/dist/types/vue/badge.d.ts +3 -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 +16 -3
- package/dist/types/vue/modal.d.ts +3 -0
- package/dist/types/vue/radio.d.ts +2 -0
- package/dist/types/vue/select.d.ts +1 -1
- package/dist/types/vue/switch.d.ts +2 -0
- package/dist/types/vue/text-area.d.ts +2 -0
- package/dist/types/vue/text-input.d.ts +1 -1
- package/dist/vue-alert.js +2 -0
- package/dist/vue-badge.js +2 -0
- package/dist/vue-button.js +1 -1
- package/dist/vue-checkbox.js +1 -1
- package/dist/vue-chip.js +2 -0
- package/dist/vue-modal.js +2 -0
- package/dist/vue-radio.js +2 -0
- package/dist/vue-select.js +1 -1
- package/dist/vue-switch.js +2 -0
- package/dist/vue-tag.js +1 -1
- package/dist/vue-text-area.js +2 -0
- package/dist/vue-text-input.js +1 -1
- package/dist/vue.js +13 -6
- package/package.json +96 -11
- package/dist/button-BPOKh6G4.js +0 -79
- package/dist/checkbox-BYrgMhwO.js +0 -105
- package/dist/checkbox-D-A_bSBK.js +0 -79
- package/dist/select-CA6TVlpX.js +0 -58
- package/dist/select-CKHEHpJL.js +0 -80
- package/dist/tag-B2qhuHjk.js +0 -41
- package/dist/tag-BY32Hj5n.js +0 -44
- package/dist/text-input-CtTr5yfe.js +0 -151
- package/dist/text-input-l1F2arKl.js +0 -201
|
@@ -0,0 +1,84 @@
|
|
|
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 };
|
|
@@ -0,0 +1,81 @@
|
|
|
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";
|
|
2
|
+
//#region src/components/tag/Tag.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var u = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "tag-status-icon",
|
|
6
|
+
"aria-hidden": "true"
|
|
7
|
+
}, d = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "tag-bullet",
|
|
10
|
+
"aria-hidden": "true"
|
|
11
|
+
}, f = /* @__PURE__ */ o({
|
|
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(o) {
|
|
38
|
+
let f = t(() => o.variant.startsWith("categorical-")), p = t(() => [
|
|
39
|
+
"positive",
|
|
40
|
+
"info",
|
|
41
|
+
"warning",
|
|
42
|
+
"negative"
|
|
43
|
+
].includes(o.variant)), m = t(() => [
|
|
44
|
+
"tag",
|
|
45
|
+
o.variant !== "neutral" && `tag-${o.variant}`,
|
|
46
|
+
{
|
|
47
|
+
"tag-muted": o.muted && !f.value,
|
|
48
|
+
"tag-small": o.size === "small",
|
|
49
|
+
disabled: o.disabled,
|
|
50
|
+
loading: o.loading
|
|
51
|
+
}
|
|
52
|
+
]);
|
|
53
|
+
return (t, f) => (c(), r("span", { class: s(m.value) }, [o.loading ? (c(), r(e, { key: 0 }, [f[0] ||= i("svg", {
|
|
54
|
+
viewBox: "0 0 40 40",
|
|
55
|
+
class: "tag-loader",
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}, [i("circle", {
|
|
58
|
+
class: "tag-loader-inner",
|
|
59
|
+
cx: "20",
|
|
60
|
+
cy: "20",
|
|
61
|
+
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
|
+
}
|
|
67
|
+
}), p = [
|
|
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
|
+
], m = ["medium", "small"];
|
|
80
|
+
//#endregion
|
|
81
|
+
export { p as n, f as r, m 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-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./tag-BvOt0v-c.js";
|
|
2
2
|
export { r as OudsTag, t as defineOudsTag, n as tagSizes, e as tagVariants };
|
|
@@ -0,0 +1,163 @@
|
|
|
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, normalizeStyle as d, openBlock as f, renderSlot as p, toDisplayString as m, toRef as h, unref as g, useAttrs as _, useId as v, useModel as y, useSlots as b, withCtx as x } from "vue";
|
|
2
|
+
//#region src/components/text-area/TextArea.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var S = ["id", "for"], C = [
|
|
4
|
+
"id",
|
|
5
|
+
"placeholder",
|
|
6
|
+
"value",
|
|
7
|
+
"disabled",
|
|
8
|
+
"readonly",
|
|
9
|
+
"required",
|
|
10
|
+
"aria-describedby",
|
|
11
|
+
"aria-invalid"
|
|
12
|
+
], w = ["id"], T = ["id"], E = [
|
|
13
|
+
"id",
|
|
14
|
+
"href",
|
|
15
|
+
"aria-labelledby"
|
|
16
|
+
], D = /* @__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 = _();
|
|
54
|
+
function s() {
|
|
55
|
+
let { class: e, style: t, ...n } = a;
|
|
56
|
+
return n;
|
|
57
|
+
}
|
|
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() {
|
|
60
|
+
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
|
+
}
|
|
63
|
+
let N = e(() => ["text-area", { "component-max-width": t.maxWidth }]), P = e(() => ["text-area-container", { "text-area-container-outlined": t.outlined }]);
|
|
64
|
+
return (e, c) => (f(), r("div", {
|
|
65
|
+
class: u([N.value, g(a).class]),
|
|
66
|
+
style: d(g(a).style)
|
|
67
|
+
}, [
|
|
68
|
+
i("div", { class: u(P.value) }, [i("label", {
|
|
69
|
+
id: A.value,
|
|
70
|
+
for: D.value,
|
|
71
|
+
class: u({ "is-required": t.required })
|
|
72
|
+
}, [p(e.$slots, "label", {}, () => [o(m(t.label), 1)])], 10, S), i("textarea", l(s(), {
|
|
73
|
+
id: D.value,
|
|
74
|
+
class: "text-area-field",
|
|
75
|
+
placeholder: t.placeholder || " ",
|
|
76
|
+
value: t.value,
|
|
77
|
+
disabled: t.disabled,
|
|
78
|
+
readonly: t.readonly,
|
|
79
|
+
required: t.required,
|
|
80
|
+
"aria-describedby": M(),
|
|
81
|
+
"aria-invalid": t.invalid
|
|
82
|
+
}), null, 16, C)], 2),
|
|
83
|
+
(t.helperText || e.$slots["helper-text"]) && !t.invalid ? (f(), r("p", {
|
|
84
|
+
key: 0,
|
|
85
|
+
id: O.value,
|
|
86
|
+
class: "helper-text"
|
|
87
|
+
}, [p(e.$slots, "helper-text", {}, () => [o(m(t.helperText), 1)])], 8, w)) : n("", !0),
|
|
88
|
+
t.invalid && (t.errorText || e.$slots["error-text"]) ? (f(), r("p", {
|
|
89
|
+
key: 1,
|
|
90
|
+
id: k.value,
|
|
91
|
+
class: "error-text"
|
|
92
|
+
}, [p(e.$slots, "error-text", {}, () => [o(m(t.errorText), 1)])], 8, T)) : n("", !0),
|
|
93
|
+
t.helperLinkHref && (t.helperLink || e.$slots["helper-link"]) ? (f(), r("a", {
|
|
94
|
+
key: 2,
|
|
95
|
+
id: j.value,
|
|
96
|
+
href: t.helperLinkHref,
|
|
97
|
+
"aria-labelledby": `${j.value} ${A.value}`,
|
|
98
|
+
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
|
+
], 6));
|
|
101
|
+
}
|
|
102
|
+
}), O = /* @__PURE__ */ s({
|
|
103
|
+
inheritAttrs: !1,
|
|
104
|
+
__name: "VueTextArea",
|
|
105
|
+
props: /*@__PURE__*/ c({
|
|
106
|
+
label: {},
|
|
107
|
+
placeholder: {},
|
|
108
|
+
helperText: {},
|
|
109
|
+
errorText: {},
|
|
110
|
+
helperLink: {},
|
|
111
|
+
helperLinkHref: {},
|
|
112
|
+
outlined: { type: Boolean },
|
|
113
|
+
disabled: { type: Boolean },
|
|
114
|
+
readonly: { type: Boolean },
|
|
115
|
+
required: { type: Boolean },
|
|
116
|
+
invalid: { type: Boolean },
|
|
117
|
+
maxWidth: { type: Boolean }
|
|
118
|
+
}, {
|
|
119
|
+
modelValue: { default: "" },
|
|
120
|
+
modelModifiers: {}
|
|
121
|
+
}),
|
|
122
|
+
emits: /*@__PURE__*/ c(["input", "change"], ["update:modelValue"]),
|
|
123
|
+
setup(e, { emit: n }) {
|
|
124
|
+
let r = e, i = y(e, "modelValue"), o = n;
|
|
125
|
+
function s(e) {
|
|
126
|
+
i.value = e.target.value, o("input", e);
|
|
127
|
+
}
|
|
128
|
+
function c(e) {
|
|
129
|
+
i.value = e.target.value, o("change", e);
|
|
130
|
+
}
|
|
131
|
+
return (e, n) => (f(), t(D, l({
|
|
132
|
+
...e.$attrs,
|
|
133
|
+
...r
|
|
134
|
+
}, {
|
|
135
|
+
value: i.value,
|
|
136
|
+
onInput: s,
|
|
137
|
+
onChange: c
|
|
138
|
+
}), a({ _: 2 }, [
|
|
139
|
+
e.$slots.label ? {
|
|
140
|
+
name: "label",
|
|
141
|
+
fn: x(() => [p(e.$slots, "label")]),
|
|
142
|
+
key: "0"
|
|
143
|
+
} : void 0,
|
|
144
|
+
e.$slots["helper-text"] ? {
|
|
145
|
+
name: "helper-text",
|
|
146
|
+
fn: x(() => [p(e.$slots, "helper-text")]),
|
|
147
|
+
key: "1"
|
|
148
|
+
} : void 0,
|
|
149
|
+
e.$slots["error-text"] ? {
|
|
150
|
+
name: "error-text",
|
|
151
|
+
fn: x(() => [p(e.$slots, "error-text")]),
|
|
152
|
+
key: "2"
|
|
153
|
+
} : void 0,
|
|
154
|
+
e.$slots["helper-link"] ? {
|
|
155
|
+
name: "helper-link",
|
|
156
|
+
fn: x(() => [p(e.$slots, "helper-link")]),
|
|
157
|
+
key: "3"
|
|
158
|
+
} : void 0
|
|
159
|
+
]), 1040, ["value"]));
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
//#endregion
|
|
163
|
+
export { O as t };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { A as e, M as t, N as n, S as r, a as i, b as a, c as o, d as s, g as c, j as l, k as u, l as d, o as f, p, t as m, u as h, v as g, x as _ } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
|
|
2
|
+
//#region src/components/text-area/TextArea.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var v = ["id", "for"], y = [
|
|
4
|
+
"id",
|
|
5
|
+
"placeholder",
|
|
6
|
+
"value",
|
|
7
|
+
"disabled",
|
|
8
|
+
"readonly",
|
|
9
|
+
"required",
|
|
10
|
+
"aria-describedby",
|
|
11
|
+
"aria-invalid"
|
|
12
|
+
], b = ["id"], x = ["id"], S = [
|
|
13
|
+
"id",
|
|
14
|
+
"href",
|
|
15
|
+
"aria-labelledby"
|
|
16
|
+
], C = m(/* @__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(s) {
|
|
53
|
+
let m = a();
|
|
54
|
+
function C() {
|
|
55
|
+
let { class: e, style: t, ...n } = m;
|
|
56
|
+
return n;
|
|
57
|
+
}
|
|
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() {
|
|
60
|
+
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
|
+
}
|
|
63
|
+
let N = i(() => ["text-area", { "component-max-width": s.maxWidth }]), P = i(() => ["text-area-container", { "text-area-container-outlined": s.outlined }]);
|
|
64
|
+
return (r, i) => (c(), d("div", {
|
|
65
|
+
class: l([N.value, e(m).class]),
|
|
66
|
+
style: t(e(m).style)
|
|
67
|
+
}, [
|
|
68
|
+
f("div", { class: l(P.value) }, [f("label", {
|
|
69
|
+
id: A.value,
|
|
70
|
+
for: D.value,
|
|
71
|
+
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,
|
|
74
|
+
class: "text-area-field",
|
|
75
|
+
placeholder: s.placeholder || " ",
|
|
76
|
+
value: s.value,
|
|
77
|
+
disabled: s.disabled,
|
|
78
|
+
readonly: s.readonly,
|
|
79
|
+
required: s.required,
|
|
80
|
+
"aria-describedby": M(),
|
|
81
|
+
"aria-invalid": s.invalid
|
|
82
|
+
}), null, 16, y)], 2),
|
|
83
|
+
(s.helperText || r.$slots["helper-text"]) && !s.invalid ? (c(), d("p", {
|
|
84
|
+
key: 0,
|
|
85
|
+
id: O.value,
|
|
86
|
+
class: "helper-text"
|
|
87
|
+
}, [g(r.$slots, "helper-text", {}, () => [h(n(s.helperText), 1)])], 8, b)) : o("", !0),
|
|
88
|
+
s.invalid && (s.errorText || r.$slots["error-text"]) ? (c(), d("p", {
|
|
89
|
+
key: 1,
|
|
90
|
+
id: k.value,
|
|
91
|
+
class: "error-text"
|
|
92
|
+
}, [g(r.$slots, "error-text", {}, () => [h(n(s.errorText), 1)])], 8, x)) : o("", !0),
|
|
93
|
+
s.helperLinkHref && (s.helperLink || r.$slots["helper-link"]) ? (c(), d("a", {
|
|
94
|
+
key: 2,
|
|
95
|
+
id: j.value,
|
|
96
|
+
href: s.helperLinkHref,
|
|
97
|
+
"aria-labelledby": `${j.value} ${A.value}`,
|
|
98
|
+
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
|
+
], 6));
|
|
101
|
+
}
|
|
102
|
+
}), { shadowRoot: !1 });
|
|
103
|
+
function w() {
|
|
104
|
+
typeof customElements < "u" && (customElements.get("ouds-text-area") || customElements.define("ouds-text-area", C));
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { w as n, C as t };
|
|
@@ -0,0 +1,235 @@
|
|
|
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, normalizeStyle as m, openBlock as h, renderSlot as g, toDisplayString as _, toRef as v, unref as y, useAttrs as b, useId as x, useModel as S, useSlots as C, withCtx as w } from "vue";
|
|
2
|
+
//#region src/components/text-input/TextInput.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var T = ["id", "for"], E = ["data-bs-prefix", "data-bs-suffix"], D = [
|
|
4
|
+
"id",
|
|
5
|
+
"type",
|
|
6
|
+
"placeholder",
|
|
7
|
+
"value",
|
|
8
|
+
"disabled",
|
|
9
|
+
"readonly",
|
|
10
|
+
"required",
|
|
11
|
+
"aria-describedby",
|
|
12
|
+
"aria-invalid"
|
|
13
|
+
], O = [
|
|
14
|
+
"id",
|
|
15
|
+
"type",
|
|
16
|
+
"placeholder",
|
|
17
|
+
"value",
|
|
18
|
+
"disabled",
|
|
19
|
+
"readonly",
|
|
20
|
+
"required",
|
|
21
|
+
"aria-describedby",
|
|
22
|
+
"aria-invalid"
|
|
23
|
+
], k = ["id"], A = ["id"], j = ["id"], M = [
|
|
24
|
+
"id",
|
|
25
|
+
"href",
|
|
26
|
+
"aria-labelledby"
|
|
27
|
+
], N = { class: "visually-hidden" }, P = /* @__PURE__ */ c({
|
|
28
|
+
inheritAttrs: !1,
|
|
29
|
+
__name: "TextInput",
|
|
30
|
+
props: {
|
|
31
|
+
prefix: { default: "" },
|
|
32
|
+
label: { default: "Text input" },
|
|
33
|
+
placeholder: { default: " " },
|
|
34
|
+
helperText: { default: "" },
|
|
35
|
+
errorText: { default: "" },
|
|
36
|
+
helperLink: { default: "" },
|
|
37
|
+
helperLinkHref: { default: "" },
|
|
38
|
+
helperLinkAria: { default: "on" },
|
|
39
|
+
suffix: { default: "" },
|
|
40
|
+
value: { default: "" },
|
|
41
|
+
type: { default: "text" },
|
|
42
|
+
outlined: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
disabled: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
readonly: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !1
|
|
53
|
+
},
|
|
54
|
+
required: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !1
|
|
57
|
+
},
|
|
58
|
+
invalid: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
maxWidth: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !1
|
|
65
|
+
},
|
|
66
|
+
loading: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
70
|
+
loadingText: { default: "Loading" }
|
|
71
|
+
},
|
|
72
|
+
setup(n) {
|
|
73
|
+
let o = b();
|
|
74
|
+
function c() {
|
|
75
|
+
let { class: e, style: t, ...n } = o;
|
|
76
|
+
return n;
|
|
77
|
+
}
|
|
78
|
+
let l = v(() => o.id), u = C(), p = x(), S = v(() => l.value || `ouds-text-input-${p}`), w = v(() => `${S.value}-helper`), P = v(() => `${S.value}-error`), F = v(() => `${S.value}-label`), I = v(() => `${S.value}-helper-link`), L = v(() => `${S.value}-loading`);
|
|
79
|
+
function R() {
|
|
80
|
+
let e = [o["aria-describedby"]];
|
|
81
|
+
return (n.helperText || u["helper-text"]) && !n.invalid && e.push(w.value), n.invalid && (n.errorText || u["error-text"]) && e.push(P.value), n.helperLinkHref && (n.helperLink || u["helper-link"]) && e.push(I.value), n.loading && e.push(L.value), e.filter(Boolean).join(" ") || void 0;
|
|
82
|
+
}
|
|
83
|
+
let z = t(() => ["text-input", { "component-max-width": n.maxWidth }]), B = t(() => ["text-input-container", { "text-input-container-outlined": n.outlined }]), V = t(() => ["text-input-field", { "loading-indeterminate": n.loading }]);
|
|
84
|
+
return (t, l) => (h(), i("div", {
|
|
85
|
+
class: f([z.value, y(o).class]),
|
|
86
|
+
style: m(y(o).style)
|
|
87
|
+
}, [
|
|
88
|
+
a("div", { class: f(B.value) }, [
|
|
89
|
+
g(t.$slots, "leading-icon"),
|
|
90
|
+
a("label", {
|
|
91
|
+
id: F.value,
|
|
92
|
+
for: S.value,
|
|
93
|
+
class: f({ "is-required": n.required })
|
|
94
|
+
}, [g(t.$slots, "label", {}, () => [s(_(n.label), 1)])], 10, T),
|
|
95
|
+
n.prefix || n.suffix ? (h(), i("div", {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: "input-container",
|
|
98
|
+
"data-bs-prefix": n.prefix || void 0,
|
|
99
|
+
"data-bs-suffix": n.suffix || void 0
|
|
100
|
+
}, [a("input", d(c(), {
|
|
101
|
+
id: S.value,
|
|
102
|
+
type: n.type,
|
|
103
|
+
class: V.value,
|
|
104
|
+
placeholder: n.placeholder || " ",
|
|
105
|
+
value: n.value,
|
|
106
|
+
disabled: n.disabled,
|
|
107
|
+
readonly: n.readonly,
|
|
108
|
+
required: n.required,
|
|
109
|
+
"aria-describedby": R(),
|
|
110
|
+
"aria-invalid": n.invalid
|
|
111
|
+
}), null, 16, D)], 8, E)) : (h(), i("input", d({ key: 1 }, c(), {
|
|
112
|
+
id: S.value,
|
|
113
|
+
type: n.type,
|
|
114
|
+
class: V.value,
|
|
115
|
+
placeholder: n.placeholder || " ",
|
|
116
|
+
value: n.value,
|
|
117
|
+
disabled: n.disabled,
|
|
118
|
+
readonly: n.readonly,
|
|
119
|
+
required: n.required,
|
|
120
|
+
"aria-describedby": R(),
|
|
121
|
+
"aria-invalid": n.invalid
|
|
122
|
+
}), null, 16, O)),
|
|
123
|
+
n.loading ? (h(), i(e, { key: 2 }, [l[0] ||= a("svg", {
|
|
124
|
+
viewBox: "0 0 40 40",
|
|
125
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
126
|
+
class: "loader",
|
|
127
|
+
"aria-hidden": "true"
|
|
128
|
+
}, [a("circle", {
|
|
129
|
+
class: "loader-inner",
|
|
130
|
+
cx: "20",
|
|
131
|
+
cy: "20",
|
|
132
|
+
r: "17"
|
|
133
|
+
})], -1), a("span", {
|
|
134
|
+
id: L.value,
|
|
135
|
+
role: "status",
|
|
136
|
+
class: "visually-hidden"
|
|
137
|
+
}, _(n.loadingText), 9, k)], 64)) : g(t.$slots, "trailing-action", { disabled: n.disabled || n.readonly }, void 0, void 0, 3)
|
|
138
|
+
], 2),
|
|
139
|
+
(n.helperText || t.$slots["helper-text"]) && !n.invalid ? (h(), i("p", {
|
|
140
|
+
key: 0,
|
|
141
|
+
id: w.value,
|
|
142
|
+
class: "helper-text"
|
|
143
|
+
}, [g(t.$slots, "helper-text", {}, () => [s(_(n.helperText), 1)])], 8, A)) : r("", !0),
|
|
144
|
+
n.invalid && (n.errorText || t.$slots["error-text"]) ? (h(), i("p", {
|
|
145
|
+
key: 1,
|
|
146
|
+
id: P.value,
|
|
147
|
+
class: "error-text"
|
|
148
|
+
}, [g(t.$slots, "error-text", {}, () => [s(_(n.errorText), 1)])], 8, j)) : r("", !0),
|
|
149
|
+
n.helperLinkHref && (n.helperLink || t.$slots["helper-link"]) ? (h(), i("a", {
|
|
150
|
+
key: 2,
|
|
151
|
+
id: I.value,
|
|
152
|
+
href: n.helperLinkHref,
|
|
153
|
+
"aria-labelledby": `${I.value} ${F.value}`,
|
|
154
|
+
class: "link link-small"
|
|
155
|
+
}, [g(t.$slots, "helper-link", {}, () => [s(_(n.helperLink), 1)]), a("span", N, _(n.helperLinkAria), 1)], 8, M)) : r("", !0)
|
|
156
|
+
], 6));
|
|
157
|
+
}
|
|
158
|
+
}), F = /* @__PURE__ */ c({
|
|
159
|
+
inheritAttrs: !1,
|
|
160
|
+
__name: "VueTextInput",
|
|
161
|
+
props: /*@__PURE__*/ u({
|
|
162
|
+
prefix: {},
|
|
163
|
+
label: {},
|
|
164
|
+
placeholder: {},
|
|
165
|
+
helperText: {},
|
|
166
|
+
errorText: {},
|
|
167
|
+
helperLink: {},
|
|
168
|
+
helperLinkHref: {},
|
|
169
|
+
helperLinkAria: {},
|
|
170
|
+
suffix: {},
|
|
171
|
+
type: {},
|
|
172
|
+
outlined: { type: Boolean },
|
|
173
|
+
disabled: { type: Boolean },
|
|
174
|
+
readonly: { type: Boolean },
|
|
175
|
+
required: { type: Boolean },
|
|
176
|
+
invalid: { type: Boolean },
|
|
177
|
+
maxWidth: { type: Boolean },
|
|
178
|
+
loading: { type: Boolean },
|
|
179
|
+
loadingText: {}
|
|
180
|
+
}, {
|
|
181
|
+
modelValue: { default: "" },
|
|
182
|
+
modelModifiers: {}
|
|
183
|
+
}),
|
|
184
|
+
emits: /*@__PURE__*/ u(["input", "change"], ["update:modelValue"]),
|
|
185
|
+
setup(e, { emit: t }) {
|
|
186
|
+
let r = e, i = S(e, "modelValue"), a = t;
|
|
187
|
+
function s(e) {
|
|
188
|
+
i.value = e.target.value, a("input", e);
|
|
189
|
+
}
|
|
190
|
+
function c(e) {
|
|
191
|
+
i.value = e.target.value, a("change", e);
|
|
192
|
+
}
|
|
193
|
+
return (e, t) => (h(), n(P, d({
|
|
194
|
+
...e.$attrs,
|
|
195
|
+
...r
|
|
196
|
+
}, {
|
|
197
|
+
value: i.value,
|
|
198
|
+
onInput: s,
|
|
199
|
+
onChange: c
|
|
200
|
+
}), o({ _: 2 }, [
|
|
201
|
+
e.$slots.label ? {
|
|
202
|
+
name: "label",
|
|
203
|
+
fn: w(() => [g(e.$slots, "label")]),
|
|
204
|
+
key: "0"
|
|
205
|
+
} : void 0,
|
|
206
|
+
e.$slots["leading-icon"] ? {
|
|
207
|
+
name: "leading-icon",
|
|
208
|
+
fn: w(() => [g(e.$slots, "leading-icon")]),
|
|
209
|
+
key: "1"
|
|
210
|
+
} : void 0,
|
|
211
|
+
e.$slots["trailing-action"] ? {
|
|
212
|
+
name: "trailing-action",
|
|
213
|
+
fn: w((t) => [g(e.$slots, "trailing-action", p(l(t)))]),
|
|
214
|
+
key: "2"
|
|
215
|
+
} : void 0,
|
|
216
|
+
e.$slots["helper-text"] ? {
|
|
217
|
+
name: "helper-text",
|
|
218
|
+
fn: w(() => [g(e.$slots, "helper-text")]),
|
|
219
|
+
key: "3"
|
|
220
|
+
} : void 0,
|
|
221
|
+
e.$slots["error-text"] ? {
|
|
222
|
+
name: "error-text",
|
|
223
|
+
fn: w(() => [g(e.$slots, "error-text")]),
|
|
224
|
+
key: "4"
|
|
225
|
+
} : void 0,
|
|
226
|
+
e.$slots["helper-link"] ? {
|
|
227
|
+
name: "helper-link",
|
|
228
|
+
fn: w(() => [g(e.$slots, "helper-link")]),
|
|
229
|
+
key: "5"
|
|
230
|
+
} : void 0
|
|
231
|
+
]), 1040, ["value"]));
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
//#endregion
|
|
235
|
+
export { F as t };
|