@nilloq/ouds-web 0.1.0 → 0.1.4
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 +15 -38
- package/dist/button-BPOKh6G4.js +79 -0
- package/dist/button-LlRiSiGS.js +76 -0
- package/dist/button.js +2 -2
- package/dist/checkbox-BYrgMhwO.js +105 -0
- package/dist/checkbox-D-A_bSBK.js +79 -0
- package/dist/checkbox.js +5 -0
- package/dist/elements-button.js +2 -2
- package/dist/elements-checkbox.js +2 -0
- package/dist/elements-select.js +2 -0
- package/dist/elements-tag.js +2 -2
- package/dist/elements-text-input.js +2 -0
- package/dist/elements.js +7 -4
- package/dist/index.js +6 -3
- package/dist/{runtime-dom.esm-bundler-aqFyuQnx.js → runtime-dom.esm-bundler-BzNNnH8h.js} +1041 -855
- package/dist/select-CA6TVlpX.js +58 -0
- package/dist/select-CKHEHpJL.js +80 -0
- package/dist/select.js +5 -0
- package/dist/{tag-XX1_lffX.js → tag-B2qhuHjk.js} +9 -2
- package/dist/tag-BY32Hj5n.js +44 -0
- package/dist/tag.js +2 -2
- package/dist/text-input-DOUGu0A2.js +180 -0
- package/dist/text-input-t-iE4dFj.js +130 -0
- package/dist/text-input.js +5 -0
- package/dist/types/checkbox.d.ts +2 -0
- package/dist/types/components/button/Button.vue.d.ts +7 -4
- package/dist/types/components/button/button.options.d.ts +8 -0
- package/dist/types/components/button/button.types.d.ts +11 -6
- package/dist/types/components/checkbox/Checkbox.vue.d.ts +26 -0
- package/dist/types/components/checkbox/VueCheckbox.vue.d.ts +24 -0
- package/dist/types/components/checkbox/checkbox.types.d.ts +14 -0
- package/dist/types/components/select/Select.vue.d.ts +26 -0
- package/dist/types/components/select/VueSelect.vue.d.ts +24 -0
- package/dist/types/components/select/select.types.d.ts +12 -0
- package/dist/types/components/tag/Tag.vue.d.ts +3 -3
- package/dist/types/components/tag/tag.options.d.ts +4 -0
- package/dist/types/components/tag/tag.types.d.ts +7 -6
- package/dist/types/components/text-input/TextInput.vue.d.ts +41 -0
- package/dist/types/components/text-input/VueTextInput.vue.d.ts +34 -0
- package/dist/types/components/text-input/text-input.types.d.ts +20 -0
- package/dist/types/elements/button.d.ts +4 -3
- package/dist/types/elements/checkbox.d.ts +4 -0
- package/dist/types/elements/index.d.ts +8 -0
- package/dist/types/elements/select.d.ts +4 -0
- package/dist/types/elements/tag.d.ts +4 -3
- package/dist/types/elements/text-input.d.ts +4 -0
- package/dist/types/select.d.ts +2 -0
- package/dist/types/text-input.d.ts +2 -0
- package/dist/types/vue/button.d.ts +2 -1
- package/dist/types/vue/checkbox.d.ts +2 -0
- package/dist/types/vue/index.d.ts +10 -2
- package/dist/types/vue/select.d.ts +2 -0
- package/dist/types/vue/tag.d.ts +2 -1
- package/dist/types/vue/text-input.d.ts +2 -0
- package/dist/vue-button.js +2 -2
- package/dist/vue-checkbox.js +2 -0
- package/dist/vue-select.js +2 -0
- package/dist/vue-tag.js +2 -2
- package/dist/vue-text-input.js +2 -0
- package/dist/vue.js +6 -3
- package/package.json +53 -12
- package/dist/button-BxUIuMAv.js +0 -38
- package/dist/button-C5MSESb5.js +0 -35
- package/dist/tag-BGpa_wYn.js +0 -37
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { a as e, b as t, c as n, d as r, f as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m, v as h, y as g } from "./runtime-dom.esm-bundler-BzNNnH8h.js";
|
|
2
|
+
//#region src/components/select/Select.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var _ = ["for"], v = [
|
|
4
|
+
"id",
|
|
5
|
+
"aria-describedby",
|
|
6
|
+
"value",
|
|
7
|
+
"disabled",
|
|
8
|
+
"required"
|
|
9
|
+
], y = ["value"], b = ["id"], x = p(/* @__PURE__ */ n({
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "Select",
|
|
12
|
+
props: {
|
|
13
|
+
id: {},
|
|
14
|
+
label: { default: "Select" },
|
|
15
|
+
options: { default: () => [] },
|
|
16
|
+
helperText: { default: "" },
|
|
17
|
+
value: { default: "" },
|
|
18
|
+
outlined: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
disabled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
required: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(n) {
|
|
32
|
+
let p = u(), x = s(), S = d(() => n.id || `ouds-select-${x}`), C = d(() => `${S.value}-helper`), w = d(() => n.helperText ? C.value : p["aria-describedby"]), T = d(() => ["select-input-container", { "select-input-container-outlined": n.outlined }]), E = d(() => ["select-input", { "is-required": n.required }]);
|
|
33
|
+
return (s, u) => (m(), l("div", { class: g(E.value) }, [a("div", { class: g(T.value) }, [a("label", { for: S.value }, [i(s.$slots, "label", {}, () => [f(t(n.label), 1)])], 8, _), a("select", o(h(p), {
|
|
34
|
+
id: S.value,
|
|
35
|
+
"aria-describedby": w.value,
|
|
36
|
+
class: "select-input-field",
|
|
37
|
+
value: n.value,
|
|
38
|
+
disabled: n.disabled,
|
|
39
|
+
required: n.required
|
|
40
|
+
}), [u[0] ||= a("option", {
|
|
41
|
+
value: "",
|
|
42
|
+
disabled: "",
|
|
43
|
+
selected: ""
|
|
44
|
+
}, null, -1), (m(!0), l(c, null, r(n.options, (e) => (m(), l("option", {
|
|
45
|
+
key: e.value,
|
|
46
|
+
value: e.value
|
|
47
|
+
}, t(e.label), 9, y))), 128))], 16, v)], 2), n.helperText ? (m(), l("p", {
|
|
48
|
+
key: 0,
|
|
49
|
+
id: C.value,
|
|
50
|
+
class: "helper-text"
|
|
51
|
+
}, t(n.helperText), 9, b)) : e("", !0)], 2));
|
|
52
|
+
}
|
|
53
|
+
}), { shadowRoot: !1 });
|
|
54
|
+
function S() {
|
|
55
|
+
typeof customElements < "u" && (customElements.get("ouds-select") || customElements.define("ouds-select", x));
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { S as n, x as t };
|
|
@@ -0,0 +1,80 @@
|
|
|
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, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useAttrs as _, useId as v, useModel as y, withCtx as b } from "vue";
|
|
2
|
+
//#region src/components/select/Select.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var x = ["for"], S = [
|
|
4
|
+
"id",
|
|
5
|
+
"aria-describedby",
|
|
6
|
+
"value",
|
|
7
|
+
"disabled",
|
|
8
|
+
"required"
|
|
9
|
+
], C = ["value"], w = ["id"], T = /* @__PURE__ */ c({
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "Select",
|
|
12
|
+
props: {
|
|
13
|
+
id: {},
|
|
14
|
+
label: { default: "Select" },
|
|
15
|
+
options: { default: () => [] },
|
|
16
|
+
helperText: { default: "" },
|
|
17
|
+
value: { default: "" },
|
|
18
|
+
outlined: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
disabled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
required: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(n) {
|
|
32
|
+
let o = _(), c = v(), l = t(() => n.id || `ouds-select-${c}`), y = t(() => `${l.value}-helper`), b = t(() => n.helperText ? y.value : o["aria-describedby"]), T = t(() => ["select-input-container", { "select-input-container-outlined": n.outlined }]), E = t(() => ["select-input", { "is-required": n.required }]);
|
|
33
|
+
return (t, c) => (f(), i("div", { class: d(E.value) }, [a("div", { class: d(T.value) }, [a("label", { for: l.value }, [m(t.$slots, "label", {}, () => [s(h(n.label), 1)])], 8, x), a("select", u(g(o), {
|
|
34
|
+
id: l.value,
|
|
35
|
+
"aria-describedby": b.value,
|
|
36
|
+
class: "select-input-field",
|
|
37
|
+
value: n.value,
|
|
38
|
+
disabled: n.disabled,
|
|
39
|
+
required: n.required
|
|
40
|
+
}), [c[0] ||= a("option", {
|
|
41
|
+
value: "",
|
|
42
|
+
disabled: "",
|
|
43
|
+
selected: ""
|
|
44
|
+
}, null, -1), (f(!0), i(e, null, p(n.options, (e) => (f(), i("option", {
|
|
45
|
+
key: e.value,
|
|
46
|
+
value: e.value
|
|
47
|
+
}, h(e.label), 9, C))), 128))], 16, S)], 2), n.helperText ? (f(), i("p", {
|
|
48
|
+
key: 0,
|
|
49
|
+
id: y.value,
|
|
50
|
+
class: "helper-text"
|
|
51
|
+
}, h(n.helperText), 9, w)) : r("", !0)], 2));
|
|
52
|
+
}
|
|
53
|
+
}), E = /* @__PURE__ */ c({
|
|
54
|
+
inheritAttrs: !1,
|
|
55
|
+
__name: "VueSelect",
|
|
56
|
+
props: {
|
|
57
|
+
modelValue: { default: "" },
|
|
58
|
+
modelModifiers: {}
|
|
59
|
+
},
|
|
60
|
+
emits: /*@__PURE__*/ l(["change"], ["update:modelValue"]),
|
|
61
|
+
setup(e, { emit: t }) {
|
|
62
|
+
let r = y(e, "modelValue"), i = t;
|
|
63
|
+
function a(e) {
|
|
64
|
+
r.value = e.target.value, i("change", e);
|
|
65
|
+
}
|
|
66
|
+
return (e, t) => (f(), n(T, u(e.$attrs, {
|
|
67
|
+
value: r.value,
|
|
68
|
+
onChange: a
|
|
69
|
+
}), o({
|
|
70
|
+
default: b(() => [m(e.$slots, "default")]),
|
|
71
|
+
_: 2
|
|
72
|
+
}, [e.$slots.label ? {
|
|
73
|
+
name: "label",
|
|
74
|
+
fn: b(() => [m(e.$slots, "label")]),
|
|
75
|
+
key: "0"
|
|
76
|
+
} : void 0]), 1040, ["value"]));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
//#endregion
|
|
80
|
+
export { E as t };
|
package/dist/select.js
ADDED
|
@@ -29,6 +29,13 @@ var c = {
|
|
|
29
29
|
]);
|
|
30
30
|
return (e, u) => (o(), n("span", { class: a(l.value) }, [i.statusIcon ? (o(), n("span", c)) : t("", !0), s(e.$slots, "default", {}, () => [u[0] ||= r("Tag", -1)])], 2));
|
|
31
31
|
}
|
|
32
|
-
})
|
|
32
|
+
}), u = [
|
|
33
|
+
"neutral",
|
|
34
|
+
"accent",
|
|
35
|
+
"positive",
|
|
36
|
+
"info",
|
|
37
|
+
"warning",
|
|
38
|
+
"negative"
|
|
39
|
+
], d = ["medium", "small"];
|
|
33
40
|
//#endregion
|
|
34
|
-
export { l as t };
|
|
41
|
+
export { u as n, l as r, d as t };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { a as e, c as t, f as n, o as r, r as i, s as a, t as o, u as s, y as c } from "./runtime-dom.esm-bundler-BzNNnH8h.js";
|
|
2
|
+
//#region src/components/tag/Tag.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var l = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "tag-status-icon",
|
|
6
|
+
"aria-hidden": "true"
|
|
7
|
+
}, u = /* @__PURE__ */ t({
|
|
8
|
+
__name: "Tag",
|
|
9
|
+
props: {
|
|
10
|
+
variant: { default: "neutral" },
|
|
11
|
+
statusIcon: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
size: { default: "medium" },
|
|
16
|
+
muted: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(t) {
|
|
22
|
+
let o = i(() => [
|
|
23
|
+
"tag",
|
|
24
|
+
t.variant !== "neutral" && `tag-${t.variant}`,
|
|
25
|
+
{
|
|
26
|
+
"tag-muted": t.muted,
|
|
27
|
+
"tag-small": t.size === "small"
|
|
28
|
+
}
|
|
29
|
+
]);
|
|
30
|
+
return (i, u) => (s(), r("span", { class: c(o.value) }, [t.statusIcon ? (s(), r("span", l)) : e("", !0), n(i.$slots, "default", {}, () => [u[0] ||= a("Tag", -1)])], 2));
|
|
31
|
+
}
|
|
32
|
+
}), d = [
|
|
33
|
+
"neutral",
|
|
34
|
+
"accent",
|
|
35
|
+
"positive",
|
|
36
|
+
"info",
|
|
37
|
+
"warning",
|
|
38
|
+
"negative"
|
|
39
|
+
], f = ["medium", "small"], p = o(u, { shadowRoot: !1 });
|
|
40
|
+
function m() {
|
|
41
|
+
typeof customElements < "u" && (customElements.get("ouds-tag") || customElements.define("ouds-tag", p));
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { d as i, m as n, f as r, p as t };
|
package/dist/tag.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./tag-BY32Hj5n.js";
|
|
2
|
+
export { r as OudsTag, t as defineOudsTag, n as tagSizes, e as tagVariants };
|
|
@@ -0,0 +1,180 @@
|
|
|
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, unref as m, useAttrs as h, useId as g, useModel as _, useSlots as v, withCtx as y } from "vue";
|
|
2
|
+
//#region src/components/text-input/TextInput.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var b = { class: "text-input" }, x = ["id", "for"], S = ["data-bs-prefix", "data-bs-suffix"], C = [
|
|
4
|
+
"id",
|
|
5
|
+
"type",
|
|
6
|
+
"placeholder",
|
|
7
|
+
"value",
|
|
8
|
+
"disabled",
|
|
9
|
+
"readonly",
|
|
10
|
+
"required",
|
|
11
|
+
"aria-describedby",
|
|
12
|
+
"aria-invalid"
|
|
13
|
+
], w = [
|
|
14
|
+
"id",
|
|
15
|
+
"type",
|
|
16
|
+
"placeholder",
|
|
17
|
+
"value",
|
|
18
|
+
"disabled",
|
|
19
|
+
"readonly",
|
|
20
|
+
"required",
|
|
21
|
+
"aria-describedby",
|
|
22
|
+
"aria-invalid"
|
|
23
|
+
], T = ["id"], E = ["id"], D = [
|
|
24
|
+
"id",
|
|
25
|
+
"href",
|
|
26
|
+
"aria-labelledby"
|
|
27
|
+
], O = /* @__PURE__ */ s({
|
|
28
|
+
inheritAttrs: !1,
|
|
29
|
+
__name: "TextInput",
|
|
30
|
+
props: {
|
|
31
|
+
id: {},
|
|
32
|
+
label: { default: "Text input" },
|
|
33
|
+
placeholder: { default: " " },
|
|
34
|
+
helperText: { default: "" },
|
|
35
|
+
errorText: { default: "" },
|
|
36
|
+
helperLink: { default: "" },
|
|
37
|
+
helperLinkHref: { default: "" },
|
|
38
|
+
prefix: { default: "" },
|
|
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
|
+
},
|
|
63
|
+
setup(t) {
|
|
64
|
+
let a = h(), s = v(), c = g(), _ = e(() => t.id || `ouds-text-input-${c}`), y = e(() => `${_.value}-helper`), O = e(() => `${_.value}-error`), k = e(() => `${_.value}-label`), A = e(() => `${_.value}-helper-link`), j = e(() => {
|
|
65
|
+
let e = [a["aria-describedby"]];
|
|
66
|
+
return t.helperText && !t.invalid && e.push(y.value), t.invalid && (t.errorText || s.error) && e.push(O.value), t.helperLinkHref && (t.helperLink || s["helper-link"]) && e.push(A.value), e.filter(Boolean).join(" ") || void 0;
|
|
67
|
+
}), M = e(() => ["text-input-container", { "text-input-container-outlined": t.outlined }]);
|
|
68
|
+
return (e, s) => (d(), r("div", b, [
|
|
69
|
+
i("div", { class: u(M.value) }, [
|
|
70
|
+
f(e.$slots, "leading"),
|
|
71
|
+
i("label", {
|
|
72
|
+
id: k.value,
|
|
73
|
+
for: _.value,
|
|
74
|
+
class: u({ "is-required": t.required })
|
|
75
|
+
}, [f(e.$slots, "label", {}, () => [o(p(t.label), 1)])], 10, x),
|
|
76
|
+
t.prefix || t.suffix ? (d(), r("div", {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "input-container",
|
|
79
|
+
"data-bs-prefix": t.prefix || void 0,
|
|
80
|
+
"data-bs-suffix": t.suffix || void 0
|
|
81
|
+
}, [i("input", l(m(a), {
|
|
82
|
+
id: _.value,
|
|
83
|
+
type: t.type,
|
|
84
|
+
class: "text-input-field",
|
|
85
|
+
placeholder: t.placeholder,
|
|
86
|
+
value: t.value,
|
|
87
|
+
disabled: t.disabled,
|
|
88
|
+
readonly: t.readonly,
|
|
89
|
+
required: t.required,
|
|
90
|
+
"aria-describedby": j.value,
|
|
91
|
+
"aria-invalid": t.invalid
|
|
92
|
+
}), null, 16, C)], 8, S)) : (d(), r("input", l({ key: 1 }, m(a), {
|
|
93
|
+
id: _.value,
|
|
94
|
+
type: t.type,
|
|
95
|
+
class: "text-input-field",
|
|
96
|
+
placeholder: t.placeholder,
|
|
97
|
+
value: t.value,
|
|
98
|
+
disabled: t.disabled,
|
|
99
|
+
readonly: t.readonly,
|
|
100
|
+
required: t.required,
|
|
101
|
+
"aria-describedby": j.value,
|
|
102
|
+
"aria-invalid": t.invalid
|
|
103
|
+
}), null, 16, w)),
|
|
104
|
+
f(e.$slots, "trailing")
|
|
105
|
+
], 2),
|
|
106
|
+
t.helperText && !t.invalid ? (d(), r("p", {
|
|
107
|
+
key: 0,
|
|
108
|
+
id: y.value,
|
|
109
|
+
class: "helper-text"
|
|
110
|
+
}, [f(e.$slots, "helper", {}, () => [o(p(t.helperText), 1)])], 8, T)) : n("", !0),
|
|
111
|
+
t.invalid && (t.errorText || e.$slots.error) ? (d(), r("p", {
|
|
112
|
+
key: 1,
|
|
113
|
+
id: O.value,
|
|
114
|
+
class: "error-text"
|
|
115
|
+
}, [f(e.$slots, "error", {}, () => [o(p(t.errorText), 1)])], 8, E)) : n("", !0),
|
|
116
|
+
t.helperLinkHref && (t.helperLink || e.$slots["helper-link"]) ? (d(), r("a", {
|
|
117
|
+
key: 2,
|
|
118
|
+
id: A.value,
|
|
119
|
+
href: t.helperLinkHref,
|
|
120
|
+
"aria-labelledby": `${A.value} ${k.value}`,
|
|
121
|
+
class: "link link-small"
|
|
122
|
+
}, [f(e.$slots, "helper-link", {}, () => [o(p(t.helperLink), 1)]), s[0] ||= i("span", { class: "visually-hidden" }, "on", -1)], 8, D)) : n("", !0)
|
|
123
|
+
]));
|
|
124
|
+
}
|
|
125
|
+
}), k = /* @__PURE__ */ s({
|
|
126
|
+
inheritAttrs: !1,
|
|
127
|
+
__name: "VueTextInput",
|
|
128
|
+
props: {
|
|
129
|
+
modelValue: { default: "" },
|
|
130
|
+
modelModifiers: {}
|
|
131
|
+
},
|
|
132
|
+
emits: /*@__PURE__*/ c(["input", "change"], ["update:modelValue"]),
|
|
133
|
+
setup(e, { emit: n }) {
|
|
134
|
+
let r = _(e, "modelValue"), i = n;
|
|
135
|
+
function o(e) {
|
|
136
|
+
r.value = e.target.value, i("input", e);
|
|
137
|
+
}
|
|
138
|
+
function s(e) {
|
|
139
|
+
r.value = e.target.value, i("change", e);
|
|
140
|
+
}
|
|
141
|
+
return (e, n) => (d(), t(O, l(e.$attrs, {
|
|
142
|
+
value: r.value,
|
|
143
|
+
onInput: o,
|
|
144
|
+
onChange: s
|
|
145
|
+
}), a({ _: 2 }, [
|
|
146
|
+
e.$slots.label ? {
|
|
147
|
+
name: "label",
|
|
148
|
+
fn: y(() => [f(e.$slots, "label")]),
|
|
149
|
+
key: "0"
|
|
150
|
+
} : void 0,
|
|
151
|
+
e.$slots.leading ? {
|
|
152
|
+
name: "leading",
|
|
153
|
+
fn: y(() => [f(e.$slots, "leading")]),
|
|
154
|
+
key: "1"
|
|
155
|
+
} : void 0,
|
|
156
|
+
e.$slots.trailing ? {
|
|
157
|
+
name: "trailing",
|
|
158
|
+
fn: y(() => [f(e.$slots, "trailing")]),
|
|
159
|
+
key: "2"
|
|
160
|
+
} : void 0,
|
|
161
|
+
e.$slots.helper ? {
|
|
162
|
+
name: "helper",
|
|
163
|
+
fn: y(() => [f(e.$slots, "helper")]),
|
|
164
|
+
key: "3"
|
|
165
|
+
} : void 0,
|
|
166
|
+
e.$slots.error ? {
|
|
167
|
+
name: "error",
|
|
168
|
+
fn: y(() => [f(e.$slots, "error")]),
|
|
169
|
+
key: "4"
|
|
170
|
+
} : void 0,
|
|
171
|
+
e.$slots["helper-link"] ? {
|
|
172
|
+
name: "helper-link",
|
|
173
|
+
fn: y(() => [f(e.$slots, "helper-link")]),
|
|
174
|
+
key: "5"
|
|
175
|
+
} : void 0
|
|
176
|
+
]), 1040, ["value"]));
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
//#endregion
|
|
180
|
+
export { k as t };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { a as e, b as t, c as n, f as r, h as i, i as a, l as o, m as s, o as c, p as l, r as u, s as d, t as f, u as p, v as m, y as h } from "./runtime-dom.esm-bundler-BzNNnH8h.js";
|
|
2
|
+
//#region src/components/text-input/TextInput.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var g = { class: "text-input" }, _ = ["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 = [
|
|
24
|
+
"id",
|
|
25
|
+
"href",
|
|
26
|
+
"aria-labelledby"
|
|
27
|
+
], w = f(/* @__PURE__ */ n({
|
|
28
|
+
inheritAttrs: !1,
|
|
29
|
+
__name: "TextInput",
|
|
30
|
+
props: {
|
|
31
|
+
id: {},
|
|
32
|
+
label: { default: "Text input" },
|
|
33
|
+
placeholder: { default: " " },
|
|
34
|
+
helperText: { default: "" },
|
|
35
|
+
errorText: { default: "" },
|
|
36
|
+
helperLink: { default: "" },
|
|
37
|
+
helperLinkHref: { default: "" },
|
|
38
|
+
prefix: { default: "" },
|
|
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
|
+
},
|
|
63
|
+
setup(n) {
|
|
64
|
+
let f = l(), w = i(), T = s(), E = u(() => n.id || `ouds-text-input-${T}`), D = u(() => `${E.value}-helper`), O = u(() => `${E.value}-error`), k = u(() => `${E.value}-label`), A = u(() => `${E.value}-helper-link`), j = u(() => {
|
|
65
|
+
let e = [f["aria-describedby"]];
|
|
66
|
+
return n.helperText && !n.invalid && e.push(D.value), n.invalid && (n.errorText || w.error) && e.push(O.value), n.helperLinkHref && (n.helperLink || w["helper-link"]) && e.push(A.value), e.filter(Boolean).join(" ") || void 0;
|
|
67
|
+
}), M = u(() => ["text-input-container", { "text-input-container-outlined": n.outlined }]);
|
|
68
|
+
return (i, s) => (p(), c("div", g, [
|
|
69
|
+
a("div", { class: h(M.value) }, [
|
|
70
|
+
r(i.$slots, "leading"),
|
|
71
|
+
a("label", {
|
|
72
|
+
id: k.value,
|
|
73
|
+
for: E.value,
|
|
74
|
+
class: h({ "is-required": n.required })
|
|
75
|
+
}, [r(i.$slots, "label", {}, () => [d(t(n.label), 1)])], 10, _),
|
|
76
|
+
n.prefix || n.suffix ? (p(), c("div", {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "input-container",
|
|
79
|
+
"data-bs-prefix": n.prefix || void 0,
|
|
80
|
+
"data-bs-suffix": n.suffix || void 0
|
|
81
|
+
}, [a("input", o(m(f), {
|
|
82
|
+
id: E.value,
|
|
83
|
+
type: n.type,
|
|
84
|
+
class: "text-input-field",
|
|
85
|
+
placeholder: n.placeholder,
|
|
86
|
+
value: n.value,
|
|
87
|
+
disabled: n.disabled,
|
|
88
|
+
readonly: n.readonly,
|
|
89
|
+
required: n.required,
|
|
90
|
+
"aria-describedby": j.value,
|
|
91
|
+
"aria-invalid": n.invalid
|
|
92
|
+
}), null, 16, y)], 8, v)) : (p(), c("input", o({ key: 1 }, m(f), {
|
|
93
|
+
id: E.value,
|
|
94
|
+
type: n.type,
|
|
95
|
+
class: "text-input-field",
|
|
96
|
+
placeholder: n.placeholder,
|
|
97
|
+
value: n.value,
|
|
98
|
+
disabled: n.disabled,
|
|
99
|
+
readonly: n.readonly,
|
|
100
|
+
required: n.required,
|
|
101
|
+
"aria-describedby": j.value,
|
|
102
|
+
"aria-invalid": n.invalid
|
|
103
|
+
}), null, 16, b)),
|
|
104
|
+
r(i.$slots, "trailing")
|
|
105
|
+
], 2),
|
|
106
|
+
n.helperText && !n.invalid ? (p(), c("p", {
|
|
107
|
+
key: 0,
|
|
108
|
+
id: D.value,
|
|
109
|
+
class: "helper-text"
|
|
110
|
+
}, [r(i.$slots, "helper", {}, () => [d(t(n.helperText), 1)])], 8, x)) : e("", !0),
|
|
111
|
+
n.invalid && (n.errorText || i.$slots.error) ? (p(), c("p", {
|
|
112
|
+
key: 1,
|
|
113
|
+
id: O.value,
|
|
114
|
+
class: "error-text"
|
|
115
|
+
}, [r(i.$slots, "error", {}, () => [d(t(n.errorText), 1)])], 8, S)) : e("", !0),
|
|
116
|
+
n.helperLinkHref && (n.helperLink || i.$slots["helper-link"]) ? (p(), c("a", {
|
|
117
|
+
key: 2,
|
|
118
|
+
id: A.value,
|
|
119
|
+
href: n.helperLinkHref,
|
|
120
|
+
"aria-labelledby": `${A.value} ${k.value}`,
|
|
121
|
+
class: "link link-small"
|
|
122
|
+
}, [r(i.$slots, "helper-link", {}, () => [d(t(n.helperLink), 1)]), s[0] ||= a("span", { class: "visually-hidden" }, "on", -1)], 8, C)) : e("", !0)
|
|
123
|
+
]));
|
|
124
|
+
}
|
|
125
|
+
}), { shadowRoot: !1 });
|
|
126
|
+
function T() {
|
|
127
|
+
typeof customElements < "u" && (customElements.get("ouds-text-input") || customElements.define("ouds-text-input", w));
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
export { T as n, w as t };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ButtonType, ButtonVariant, ButtonSize, ButtonNavigation } from "./button.types.js";
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
type?:
|
|
4
|
-
variant?:
|
|
5
|
-
size?:
|
|
3
|
+
type?: ButtonType;
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
6
|
iconOnly?: boolean;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
navigation?: ButtonNavigation;
|
|
7
9
|
disabled?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
8
11
|
};
|
|
9
12
|
declare var __VLS_1: {};
|
|
10
13
|
type __VLS_Slots = {} & {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const buttonVariants: readonly ["default", "strong", "brand", "minimal", "negative"];
|
|
2
|
+
export declare const buttonSizes: readonly ["medium", "small"];
|
|
3
|
+
export declare const buttonTypes: readonly ["button", "submit", "reset"];
|
|
4
|
+
export declare const buttonNavigations: readonly ["previous", "next"];
|
|
5
|
+
export type ButtonVariant = (typeof buttonVariants)[number];
|
|
6
|
+
export type ButtonSize = (typeof buttonSizes)[number];
|
|
7
|
+
export type ButtonType = (typeof buttonTypes)[number];
|
|
8
|
+
export type ButtonNavigation = (typeof buttonNavigations)[number];
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
type:
|
|
1
|
+
import type { ButtonType, ButtonVariant, ButtonSize, ButtonNavigation } from "./button.options.js";
|
|
2
|
+
export type { ButtonType, ButtonVariant, ButtonSize, ButtonNavigation } from "./button.options.js";
|
|
3
|
+
export type ButtonElement = HTMLElement & {
|
|
4
|
+
type: ButtonType;
|
|
5
|
+
variant: ButtonVariant;
|
|
6
|
+
size: ButtonSize;
|
|
7
|
+
iconOnly: boolean;
|
|
5
8
|
disabled: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
navigation?: ButtonNavigation;
|
|
6
11
|
};
|
|
7
|
-
export type
|
|
8
|
-
new (initialProps?: Partial<
|
|
12
|
+
export type ButtonConstructor = CustomElementConstructor & {
|
|
13
|
+
new (initialProps?: Partial<ButtonElement>): ButtonElement;
|
|
9
14
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
divider?: boolean;
|
|
10
|
+
indeterminate?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
label?: (props: typeof __VLS_1) => any;
|
|
15
|
+
} & {
|
|
16
|
+
asset?: (props: typeof __VLS_3) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_10: {}, __VLS_13: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
label?: (props: typeof __VLS_10) => any;
|
|
7
|
+
} & {
|
|
8
|
+
asset?: (props: typeof __VLS_13) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
11
|
+
change: (event: Event) => any;
|
|
12
|
+
"update:modelValue": (value: boolean) => any;
|
|
13
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
14
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CheckboxElement = HTMLElement & {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
value: string;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
required: boolean;
|
|
9
|
+
divider: boolean;
|
|
10
|
+
indeterminate: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type CheckboxConstructor = CustomElementConstructor & {
|
|
13
|
+
new (initialProps?: Partial<CheckboxElement>): CheckboxElement;
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
options?: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}[];
|
|
8
|
+
helperText?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
outlined?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare var __VLS_1: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
label?: (props: typeof __VLS_1) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|