@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,196 @@
|
|
|
1
|
+
import { n as e } from "./control-item-slots-Ddp7c8w8.js";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, createTextVNode as c, defineComponent as l, inject as u, mergeModels as d, mergeProps as f, normalizeClass as p, normalizeStyle as m, openBlock as h, ref as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, toRef as b, unref as x, useAttrs as S, useId as C, useModel as w, watchEffect as T, withCtx as E } from "vue";
|
|
3
|
+
//#region src/components/checkbox/checkbox.context.ts
|
|
4
|
+
var D = Symbol("ouds-checkbox-element-id"), O = ["id"], k = { class: "control-item-assets-container" }, A = { class: "control-item-text-container" }, j = ["id"], M = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "control-item-assets-container"
|
|
7
|
+
}, N = /* @__PURE__ */ l({
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
__name: "Checkbox",
|
|
10
|
+
props: {
|
|
11
|
+
label: { default: "Checkbox" },
|
|
12
|
+
description: { default: "" },
|
|
13
|
+
value: { default: "" },
|
|
14
|
+
checked: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
required: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
divider: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
indeterminate: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
readonly: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
invalid: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
reverse: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
maxWidth: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
standalone: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !1
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
setup(s) {
|
|
56
|
+
let l = S();
|
|
57
|
+
function d() {
|
|
58
|
+
let { class: e, style: t, ...n } = l;
|
|
59
|
+
return n;
|
|
60
|
+
}
|
|
61
|
+
let w = b(() => l.id), N = g(), P = C(), F = u(D, void 0), I = e(F !== void 0), L = b(() => F ? `${w.value || F}-input` : w.value || `ouds-checkbox-${P}`), R = b(() => `${L.value}-label`), z = b(() => `${L.value}-description`);
|
|
62
|
+
function B() {
|
|
63
|
+
return !s.standalone && !!(s.description || I("description"));
|
|
64
|
+
}
|
|
65
|
+
function V() {
|
|
66
|
+
let e = [l["aria-describedby"]];
|
|
67
|
+
return B() && e.push(z.value), e.filter(Boolean).join(" ") || void 0;
|
|
68
|
+
}
|
|
69
|
+
function H() {
|
|
70
|
+
return [l["aria-labelledby"], R.value].filter(Boolean).join(" ");
|
|
71
|
+
}
|
|
72
|
+
function U() {
|
|
73
|
+
let e = {
|
|
74
|
+
...d(),
|
|
75
|
+
id: L.value,
|
|
76
|
+
"aria-describedby": V(),
|
|
77
|
+
"aria-invalid": s.invalid || l["aria-invalid"]
|
|
78
|
+
};
|
|
79
|
+
return s.readonly ? {
|
|
80
|
+
...e,
|
|
81
|
+
role: "checkbox",
|
|
82
|
+
"aria-readonly": "true",
|
|
83
|
+
"aria-disabled": "true",
|
|
84
|
+
tabindex: 0,
|
|
85
|
+
"aria-checked": s.indeterminate ? "mixed" : s.checked,
|
|
86
|
+
"aria-labelledby": H()
|
|
87
|
+
} : {
|
|
88
|
+
...e,
|
|
89
|
+
type: "checkbox",
|
|
90
|
+
value: s.value,
|
|
91
|
+
checked: s.checked,
|
|
92
|
+
disabled: s.disabled,
|
|
93
|
+
required: s.required
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
let W = n(() => s.standalone ? s.readonly ? "span" : "label" : "div"), G = n(() => s.standalone ? ["checkbox-standalone", { "component-max-width": s.maxWidth }] : ["checkbox-item", {
|
|
97
|
+
"control-item-divider": s.divider,
|
|
98
|
+
"control-item-reverse": s.reverse,
|
|
99
|
+
"component-max-width": s.maxWidth
|
|
100
|
+
}]);
|
|
101
|
+
return T(() => {
|
|
102
|
+
N.value && "indeterminate" in N.value && (N.value.indeterminate = s.indeterminate);
|
|
103
|
+
}), (e, n) => (h(), r(v(W.value), {
|
|
104
|
+
class: p([G.value, x(l).class]),
|
|
105
|
+
style: m(x(l).style)
|
|
106
|
+
}, {
|
|
107
|
+
default: E(() => [s.standalone ? (h(), a(t, { key: 0 }, [(h(), r(v(s.readonly ? "span" : "input"), f({
|
|
108
|
+
ref_key: "input",
|
|
109
|
+
ref: N,
|
|
110
|
+
class: "control-item-indicator"
|
|
111
|
+
}, U()), null, 16)), o("span", {
|
|
112
|
+
id: R.value,
|
|
113
|
+
class: "visually-hidden"
|
|
114
|
+
}, [_(e.$slots, "label", {}, () => [c(y(s.label), 1)])], 8, O)], 64)) : (h(), a(t, { key: 1 }, [
|
|
115
|
+
o("div", k, [(h(), r(v(s.readonly ? "span" : "input"), f({
|
|
116
|
+
ref_key: "input",
|
|
117
|
+
ref: N,
|
|
118
|
+
class: "control-item-indicator"
|
|
119
|
+
}, U()), null, 16))]),
|
|
120
|
+
o("div", A, [(h(), r(v(s.readonly ? "span" : "label"), {
|
|
121
|
+
id: R.value,
|
|
122
|
+
class: p(["control-item-label", { "is-required": s.required }]),
|
|
123
|
+
for: s.readonly ? void 0 : L.value
|
|
124
|
+
}, {
|
|
125
|
+
default: E(() => [_(e.$slots, "label", {}, () => [c(y(s.label), 1)])]),
|
|
126
|
+
_: 3
|
|
127
|
+
}, 8, [
|
|
128
|
+
"id",
|
|
129
|
+
"class",
|
|
130
|
+
"for"
|
|
131
|
+
])), B() ? (h(), a("p", {
|
|
132
|
+
key: 0,
|
|
133
|
+
id: z.value,
|
|
134
|
+
class: "control-item-description"
|
|
135
|
+
}, [_(e.$slots, "description", {}, () => [c(y(s.description), 1)])], 8, j)) : i("", !0)]),
|
|
136
|
+
x(I)("asset") ? (h(), a("div", M, [_(e.$slots, "asset")])) : i("", !0)
|
|
137
|
+
], 64))]),
|
|
138
|
+
_: 3
|
|
139
|
+
}, 8, ["class", "style"]));
|
|
140
|
+
}
|
|
141
|
+
}), P = /* @__PURE__ */ l({
|
|
142
|
+
inheritAttrs: !1,
|
|
143
|
+
__name: "VueCheckbox",
|
|
144
|
+
props: /*@__PURE__*/ d({
|
|
145
|
+
label: {},
|
|
146
|
+
description: {},
|
|
147
|
+
value: {},
|
|
148
|
+
disabled: { type: Boolean },
|
|
149
|
+
required: { type: Boolean },
|
|
150
|
+
divider: { type: Boolean },
|
|
151
|
+
indeterminate: { type: Boolean },
|
|
152
|
+
readonly: { type: Boolean },
|
|
153
|
+
invalid: { type: Boolean },
|
|
154
|
+
reverse: { type: Boolean },
|
|
155
|
+
maxWidth: { type: Boolean },
|
|
156
|
+
standalone: { type: Boolean }
|
|
157
|
+
}, {
|
|
158
|
+
modelValue: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
default: !1
|
|
161
|
+
},
|
|
162
|
+
modelModifiers: {}
|
|
163
|
+
}),
|
|
164
|
+
emits: /*@__PURE__*/ d(["change"], ["update:modelValue"]),
|
|
165
|
+
setup(e, { emit: t }) {
|
|
166
|
+
let n = e, i = w(e, "modelValue"), a = t;
|
|
167
|
+
function o(e) {
|
|
168
|
+
i.value = e.target.checked, a("change", e);
|
|
169
|
+
}
|
|
170
|
+
return (e, t) => (h(), r(N, f({
|
|
171
|
+
...e.$attrs,
|
|
172
|
+
...n
|
|
173
|
+
}, {
|
|
174
|
+
checked: i.value,
|
|
175
|
+
onChange: o
|
|
176
|
+
}), s({ _: 2 }, [
|
|
177
|
+
e.$slots.label ? {
|
|
178
|
+
name: "label",
|
|
179
|
+
fn: E(() => [_(e.$slots, "label")]),
|
|
180
|
+
key: "0"
|
|
181
|
+
} : void 0,
|
|
182
|
+
e.$slots.asset ? {
|
|
183
|
+
name: "asset",
|
|
184
|
+
fn: E(() => [_(e.$slots, "asset")]),
|
|
185
|
+
key: "1"
|
|
186
|
+
} : void 0,
|
|
187
|
+
e.$slots.description ? {
|
|
188
|
+
name: "description",
|
|
189
|
+
fn: E(() => [_(e.$slots, "description")]),
|
|
190
|
+
key: "2"
|
|
191
|
+
} : void 0
|
|
192
|
+
]), 1040, ["checked"]));
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
//#endregion
|
|
196
|
+
export { P as t };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { A as e, M as t, N as n, O as r, T as i, a, b as o, c as s, d as c, f as l, g as u, i as d, j as f, k as p, l as m, o as h, p as g, s as _, t as v, u as y, v as b, w as x, x as S, y as C } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
|
|
2
|
+
import { r as w, t as T } from "./control-item-slots-BDoeNuk4.js";
|
|
3
|
+
//#region src/components/checkbox/checkbox.context.ts
|
|
4
|
+
var E = Symbol("ouds-checkbox-element-id"), D = ["id"], O = { class: "control-item-assets-container" }, k = { class: "control-item-text-container" }, A = ["id"], j = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "control-item-assets-container"
|
|
7
|
+
}, M = /* @__PURE__ */ c({
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
__name: "Checkbox",
|
|
10
|
+
props: {
|
|
11
|
+
label: { default: "Checkbox" },
|
|
12
|
+
description: { default: "" },
|
|
13
|
+
value: { default: "" },
|
|
14
|
+
checked: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
required: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
divider: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
indeterminate: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
readonly: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
invalid: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
reverse: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
maxWidth: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
standalone: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !1
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
setup(c) {
|
|
56
|
+
let v = o();
|
|
57
|
+
function T() {
|
|
58
|
+
let { class: e, style: t, ...n } = v;
|
|
59
|
+
return n;
|
|
60
|
+
}
|
|
61
|
+
let M = p(() => v.id), N = r(), P = S(), F = l(E, void 0), I = w(F !== void 0), L = p(() => F ? `${M.value || F}-input` : M.value || `ouds-checkbox-${P}`), R = p(() => `${L.value}-label`), z = p(() => `${L.value}-description`);
|
|
62
|
+
function B() {
|
|
63
|
+
return !c.standalone && !!(c.description || I("description"));
|
|
64
|
+
}
|
|
65
|
+
function V() {
|
|
66
|
+
let e = [v["aria-describedby"]];
|
|
67
|
+
return B() && e.push(z.value), e.filter(Boolean).join(" ") || void 0;
|
|
68
|
+
}
|
|
69
|
+
function H() {
|
|
70
|
+
return [v["aria-labelledby"], R.value].filter(Boolean).join(" ");
|
|
71
|
+
}
|
|
72
|
+
function U() {
|
|
73
|
+
let e = {
|
|
74
|
+
...T(),
|
|
75
|
+
id: L.value,
|
|
76
|
+
"aria-describedby": V(),
|
|
77
|
+
"aria-invalid": c.invalid || v["aria-invalid"]
|
|
78
|
+
};
|
|
79
|
+
return c.readonly ? {
|
|
80
|
+
...e,
|
|
81
|
+
role: "checkbox",
|
|
82
|
+
"aria-readonly": "true",
|
|
83
|
+
"aria-disabled": "true",
|
|
84
|
+
tabindex: 0,
|
|
85
|
+
"aria-checked": c.indeterminate ? "mixed" : c.checked,
|
|
86
|
+
"aria-labelledby": H()
|
|
87
|
+
} : {
|
|
88
|
+
...e,
|
|
89
|
+
type: "checkbox",
|
|
90
|
+
value: c.value,
|
|
91
|
+
checked: c.checked,
|
|
92
|
+
disabled: c.disabled,
|
|
93
|
+
required: c.required
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
let W = a(() => c.standalone ? c.readonly ? "span" : "label" : "div"), G = a(() => c.standalone ? ["checkbox-standalone", { "component-max-width": c.maxWidth }] : ["checkbox-item", {
|
|
97
|
+
"control-item-divider": c.divider,
|
|
98
|
+
"control-item-reverse": c.reverse,
|
|
99
|
+
"component-max-width": c.maxWidth
|
|
100
|
+
}]);
|
|
101
|
+
return x(() => {
|
|
102
|
+
N.value && "indeterminate" in N.value && (N.value.indeterminate = c.indeterminate);
|
|
103
|
+
}), (r, a) => (u(), _(C(W.value), {
|
|
104
|
+
class: f([G.value, e(v).class]),
|
|
105
|
+
style: t(e(v).style)
|
|
106
|
+
}, {
|
|
107
|
+
default: i(() => [c.standalone ? (u(), m(d, { key: 0 }, [(u(), _(C(c.readonly ? "span" : "input"), g({
|
|
108
|
+
ref_key: "input",
|
|
109
|
+
ref: N,
|
|
110
|
+
class: "control-item-indicator"
|
|
111
|
+
}, U()), null, 16)), h("span", {
|
|
112
|
+
id: R.value,
|
|
113
|
+
class: "visually-hidden"
|
|
114
|
+
}, [b(r.$slots, "label", {}, () => [y(n(c.label), 1)])], 8, D)], 64)) : (u(), m(d, { key: 1 }, [
|
|
115
|
+
h("div", O, [(u(), _(C(c.readonly ? "span" : "input"), g({
|
|
116
|
+
ref_key: "input",
|
|
117
|
+
ref: N,
|
|
118
|
+
class: "control-item-indicator"
|
|
119
|
+
}, U()), null, 16))]),
|
|
120
|
+
h("div", k, [(u(), _(C(c.readonly ? "span" : "label"), {
|
|
121
|
+
id: R.value,
|
|
122
|
+
class: f(["control-item-label", { "is-required": c.required }]),
|
|
123
|
+
for: c.readonly ? void 0 : L.value
|
|
124
|
+
}, {
|
|
125
|
+
default: i(() => [b(r.$slots, "label", {}, () => [y(n(c.label), 1)])]),
|
|
126
|
+
_: 3
|
|
127
|
+
}, 8, [
|
|
128
|
+
"id",
|
|
129
|
+
"class",
|
|
130
|
+
"for"
|
|
131
|
+
])), B() ? (u(), m("p", {
|
|
132
|
+
key: 0,
|
|
133
|
+
id: z.value,
|
|
134
|
+
class: "control-item-description"
|
|
135
|
+
}, [b(r.$slots, "description", {}, () => [y(n(c.description), 1)])], 8, A)) : s("", !0)]),
|
|
136
|
+
e(I)("asset") ? (u(), m("div", j, [b(r.$slots, "asset")])) : s("", !0)
|
|
137
|
+
], 64))]),
|
|
138
|
+
_: 3
|
|
139
|
+
}, 8, ["class", "style"]));
|
|
140
|
+
}
|
|
141
|
+
}), N = 0, P = v(M, {
|
|
142
|
+
shadowRoot: !1,
|
|
143
|
+
configureApp(e) {
|
|
144
|
+
e.provide(E, `ouds-checkbox-element-${N++}`);
|
|
145
|
+
}
|
|
146
|
+
}), F = class extends P {
|
|
147
|
+
connectedCallback() {
|
|
148
|
+
T(this), super.connectedCallback();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
function I() {
|
|
152
|
+
typeof customElements < "u" && (customElements.get("ouds-checkbox") || customElements.define("ouds-checkbox", F));
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
export { I as n, F as t };
|
package/dist/checkbox.js
CHANGED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { A as e, C as t, M as n, N as r, O as i, S as a, b as o, d as s, f as c, g as l, i as u, j as d, k as f, l as p, n as m, o as h, p as g, t as _, u as v, v as y, x as b } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
|
|
2
|
+
import { n as x, t as S } from "./control-item-slots-BDoeNuk4.js";
|
|
3
|
+
//#region src/components/chip/chip.context.ts
|
|
4
|
+
var C = Symbol("ouds-chip-element-id"), w = ["aria-label"], T = [
|
|
5
|
+
"id",
|
|
6
|
+
"type",
|
|
7
|
+
"name",
|
|
8
|
+
"value",
|
|
9
|
+
"checked",
|
|
10
|
+
"disabled"
|
|
11
|
+
], E = ["for"], D = ["disabled"], O = /* @__PURE__ */ s({
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "Chip",
|
|
14
|
+
props: {
|
|
15
|
+
variant: { default: "filter" },
|
|
16
|
+
inputType: { default: "checkbox" },
|
|
17
|
+
label: { default: "Chip" },
|
|
18
|
+
ariaLabel: { default: "" },
|
|
19
|
+
checked: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
name: { default: "" },
|
|
28
|
+
value: { default: "" },
|
|
29
|
+
iconOnly: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ["change", "update:checked"],
|
|
35
|
+
setup(s, { emit: _ }) {
|
|
36
|
+
let S = s, O = _, k = o(), A = b(), j = c(C, void 0), M = m(), N = a();
|
|
37
|
+
function P() {
|
|
38
|
+
return j && M ? x(M, "default") : !!N.default;
|
|
39
|
+
}
|
|
40
|
+
let F = f(() => j ? `${k.id || j}-input` : String(k.id || `ouds-chip-${A}`)), I = i(S.checked);
|
|
41
|
+
t(() => S.checked, (e) => {
|
|
42
|
+
I.value = e;
|
|
43
|
+
});
|
|
44
|
+
function L() {
|
|
45
|
+
let { class: e, style: t, id: n, "aria-label": r, ...i } = k;
|
|
46
|
+
return i;
|
|
47
|
+
}
|
|
48
|
+
function R(e) {
|
|
49
|
+
I.value = e.target.checked, O("update:checked", I.value), O("change", e);
|
|
50
|
+
}
|
|
51
|
+
return (t, i) => (l(), p("ul", {
|
|
52
|
+
class: d(["chips-container", e(k).class]),
|
|
53
|
+
style: n(e(k).style),
|
|
54
|
+
"aria-label": s.ariaLabel || (s.variant === "filter" ? "Filter options" : "Suggestions")
|
|
55
|
+
}, [h("li", { class: d(["chip", `chip-${s.variant}`]) }, [s.variant === "filter" ? (l(), p(u, { key: 0 }, [h("input", g(L(), {
|
|
56
|
+
id: F.value,
|
|
57
|
+
type: s.inputType,
|
|
58
|
+
name: s.name || void 0,
|
|
59
|
+
value: s.value,
|
|
60
|
+
checked: I.value,
|
|
61
|
+
disabled: s.disabled,
|
|
62
|
+
onChange: R
|
|
63
|
+
}), null, 16, T), h("label", {
|
|
64
|
+
for: F.value,
|
|
65
|
+
class: d(["chip-interactive", { "chip-icon": s.iconOnly }])
|
|
66
|
+
}, [h("span", { class: d({ "visually-hidden": s.iconOnly }) }, [P() ? y(t.$slots, "default", {}, void 0, void 0, 0) : (l(), p(u, { key: 1 }, [v(r(s.label), 1)], 64))], 2), y(t.$slots, "icon")], 10, E)], 64)) : (l(), p("button", g({ key: 1 }, L(), {
|
|
67
|
+
class: ["chip-interactive", { "chip-icon": s.iconOnly }],
|
|
68
|
+
type: "button",
|
|
69
|
+
disabled: s.disabled
|
|
70
|
+
}), [y(t.$slots, "icon"), h("span", { class: d({ "visually-hidden": s.iconOnly }) }, [P() ? y(t.$slots, "default", {}, void 0, void 0, 0) : (l(), p(u, { key: 1 }, [v(r(s.label), 1)], 64))], 2)], 16, D))], 2)], 14, w));
|
|
71
|
+
}
|
|
72
|
+
}), k = 0, A = _(O, {
|
|
73
|
+
shadowRoot: !1,
|
|
74
|
+
configureApp(e) {
|
|
75
|
+
e.provide(C, `ouds-chip-element-${k++}`);
|
|
76
|
+
}
|
|
77
|
+
}), j = class extends A {
|
|
78
|
+
onChecked = (e) => {
|
|
79
|
+
this.checked = e.detail[0];
|
|
80
|
+
};
|
|
81
|
+
connectedCallback() {
|
|
82
|
+
S(this), this.addEventListener("update:checked", this.onChecked), super.connectedCallback();
|
|
83
|
+
}
|
|
84
|
+
disconnectedCallback() {
|
|
85
|
+
this.removeEventListener("update:checked", this.onChecked), super.disconnectedCallback();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
function M() {
|
|
89
|
+
typeof customElements < "u" && (customElements.get("ouds-chip") || customElements.define("ouds-chip", j));
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { M as n, j as t };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { t as e } from "./control-item-slots-Ddp7c8w8.js";
|
|
2
|
+
import { Fragment as t, createBlock as n, createElementBlock as r, createElementVNode as i, createSlots as a, createTextVNode as o, defineComponent as s, inject as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, toRef as _, unref as v, useAttrs as y, useHost as b, useId as x, useModel as S, useSlots as C, watch as w, withCtx as T } from "vue";
|
|
3
|
+
//#region src/components/chip/chip.context.ts
|
|
4
|
+
var E = Symbol("ouds-chip-element-id"), D = ["aria-label"], O = [
|
|
5
|
+
"id",
|
|
6
|
+
"type",
|
|
7
|
+
"name",
|
|
8
|
+
"value",
|
|
9
|
+
"checked",
|
|
10
|
+
"disabled"
|
|
11
|
+
], k = ["for"], A = ["disabled"], j = /* @__PURE__ */ s({
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "Chip",
|
|
14
|
+
props: {
|
|
15
|
+
variant: { default: "filter" },
|
|
16
|
+
inputType: { default: "checkbox" },
|
|
17
|
+
label: { default: "Chip" },
|
|
18
|
+
ariaLabel: { default: "" },
|
|
19
|
+
checked: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
name: { default: "" },
|
|
28
|
+
value: { default: "" },
|
|
29
|
+
iconOnly: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ["change", "update:checked"],
|
|
35
|
+
setup(n, { emit: a }) {
|
|
36
|
+
let s = n, l = a, S = y(), T = x(), j = c(E, void 0), M = b(), N = C();
|
|
37
|
+
function P() {
|
|
38
|
+
return j && M ? e(M, "default") : !!N.default;
|
|
39
|
+
}
|
|
40
|
+
let F = _(() => j ? `${S.id || j}-input` : String(S.id || `ouds-chip-${T}`)), I = m(s.checked);
|
|
41
|
+
w(() => s.checked, (e) => {
|
|
42
|
+
I.value = e;
|
|
43
|
+
});
|
|
44
|
+
function L() {
|
|
45
|
+
let { class: e, style: t, id: n, "aria-label": r, ...i } = S;
|
|
46
|
+
return i;
|
|
47
|
+
}
|
|
48
|
+
function R(e) {
|
|
49
|
+
I.value = e.target.checked, l("update:checked", I.value), l("change", e);
|
|
50
|
+
}
|
|
51
|
+
return (e, a) => (p(), r("ul", {
|
|
52
|
+
class: d(["chips-container", v(S).class]),
|
|
53
|
+
style: f(v(S).style),
|
|
54
|
+
"aria-label": n.ariaLabel || (n.variant === "filter" ? "Filter options" : "Suggestions")
|
|
55
|
+
}, [i("li", { class: d(["chip", `chip-${n.variant}`]) }, [n.variant === "filter" ? (p(), r(t, { key: 0 }, [i("input", u(L(), {
|
|
56
|
+
id: F.value,
|
|
57
|
+
type: n.inputType,
|
|
58
|
+
name: n.name || void 0,
|
|
59
|
+
value: n.value,
|
|
60
|
+
checked: I.value,
|
|
61
|
+
disabled: n.disabled,
|
|
62
|
+
onChange: R
|
|
63
|
+
}), null, 16, O), i("label", {
|
|
64
|
+
for: F.value,
|
|
65
|
+
class: d(["chip-interactive", { "chip-icon": n.iconOnly }])
|
|
66
|
+
}, [i("span", { class: d({ "visually-hidden": n.iconOnly }) }, [P() ? h(e.$slots, "default", {}, void 0, void 0, 0) : (p(), r(t, { key: 1 }, [o(g(n.label), 1)], 64))], 2), h(e.$slots, "icon")], 10, k)], 64)) : (p(), r("button", u({ key: 1 }, L(), {
|
|
67
|
+
class: ["chip-interactive", { "chip-icon": n.iconOnly }],
|
|
68
|
+
type: "button",
|
|
69
|
+
disabled: n.disabled
|
|
70
|
+
}), [h(e.$slots, "icon"), i("span", { class: d({ "visually-hidden": n.iconOnly }) }, [P() ? h(e.$slots, "default", {}, void 0, void 0, 0) : (p(), r(t, { key: 1 }, [o(g(n.label), 1)], 64))], 2)], 16, A))], 2)], 14, D));
|
|
71
|
+
}
|
|
72
|
+
}), M = /* @__PURE__ */ s({
|
|
73
|
+
inheritAttrs: !1,
|
|
74
|
+
__name: "VueChip",
|
|
75
|
+
props: /*@__PURE__*/ l({
|
|
76
|
+
variant: {},
|
|
77
|
+
inputType: {},
|
|
78
|
+
label: {},
|
|
79
|
+
ariaLabel: {},
|
|
80
|
+
disabled: { type: Boolean },
|
|
81
|
+
name: {},
|
|
82
|
+
value: {},
|
|
83
|
+
iconOnly: { type: Boolean }
|
|
84
|
+
}, {
|
|
85
|
+
modelValue: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: !1
|
|
88
|
+
},
|
|
89
|
+
modelModifiers: {}
|
|
90
|
+
}),
|
|
91
|
+
emits: /*@__PURE__*/ l(["change"], ["update:modelValue"]),
|
|
92
|
+
setup(e, { emit: t }) {
|
|
93
|
+
let r = e, i = S(e, "modelValue"), o = t;
|
|
94
|
+
function s(e) {
|
|
95
|
+
i.value = e.target.checked, o("change", e);
|
|
96
|
+
}
|
|
97
|
+
return (e, t) => (p(), n(j, u({
|
|
98
|
+
...e.$attrs,
|
|
99
|
+
...r
|
|
100
|
+
}, {
|
|
101
|
+
checked: i.value,
|
|
102
|
+
onChange: s
|
|
103
|
+
}), a({ _: 2 }, [e.$slots.default ? {
|
|
104
|
+
name: "default",
|
|
105
|
+
fn: T(() => [h(e.$slots, "default")]),
|
|
106
|
+
key: "0"
|
|
107
|
+
} : void 0, e.$slots.icon ? {
|
|
108
|
+
name: "icon",
|
|
109
|
+
fn: T(() => [h(e.$slots, "icon")]),
|
|
110
|
+
key: "1"
|
|
111
|
+
} : void 0]), 1040, ["checked"]));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
//#endregion
|
|
115
|
+
export { M as t };
|
package/dist/chip.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { S as e, n as t } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
|
|
2
|
+
//#region src/components/shared/control-item-slots.ts
|
|
3
|
+
var n = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function r(e) {
|
|
5
|
+
n.has(e) || n.set(e, new Set(Array.from(e.childNodes).flatMap((e) => e.nodeType === 1 ? [e.getAttribute("slot") || "default"] : e.nodeType === 3 && e.textContent?.trim() ? ["default"] : [])));
|
|
6
|
+
}
|
|
7
|
+
function i(r) {
|
|
8
|
+
let i = e(), a = r ? t() : void 0;
|
|
9
|
+
return (e) => !!(i[e] || a && n.get(a)?.has(e));
|
|
10
|
+
}
|
|
11
|
+
function a(e, t) {
|
|
12
|
+
return n.get(e)?.has(t) ?? !1;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { a as n, i as r, r as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useHost as e, useSlots as t } from "vue";
|
|
2
|
+
//#region src/components/shared/control-item-slots.ts
|
|
3
|
+
var n = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function r(r) {
|
|
5
|
+
let i = t(), a = r ? e() : void 0;
|
|
6
|
+
return (e) => !!(i[e] || a && n.get(a)?.has(e));
|
|
7
|
+
}
|
|
8
|
+
function i(e, t) {
|
|
9
|
+
return n.get(e)?.has(t) ?? !1;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { r as n, i as t };
|
package/dist/elements-button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./button-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./button-rgIJZsYq.js";
|
|
2
2
|
export { a as OudsButton, i as buttonNavigations, t as buttonSizes, e as buttonTypes, r as buttonVariants, n as defineOudsButton };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./checkbox-
|
|
1
|
+
import { n as e, t } from "./checkbox-DfYlHYR2.js";
|
|
2
2
|
export { t as OudsCheckbox, e as defineOudsCheckbox };
|
package/dist/elements-select.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./select-
|
|
1
|
+
import { n as e, t } from "./select--O3jL-En.js";
|
|
2
2
|
export { t as OudsSelect, e as defineOudsSelect };
|
package/dist/elements-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 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./text-input-
|
|
1
|
+
import { n as e, t } from "./text-input-i559HVOP.js";
|
|
2
2
|
export { t as OudsTextInput, e as defineOudsTextInput };
|
package/dist/elements.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import { n as u,
|
|
4
|
-
import { n as
|
|
5
|
-
import { n as
|
|
6
|
-
n
|
|
1
|
+
import { n as e, r as t, t as n } from "./alert-B4w3fDHo.js";
|
|
2
|
+
import { i as r, n as i, r as a, t as o } from "./badge-CDpWg-AO.js";
|
|
3
|
+
import { a as s, i as c, n as l, o as u, r as d, t as f } from "./button-rgIJZsYq.js";
|
|
4
|
+
import { i as p, n as m, r as h, t as g } from "./tag-BvOt0v-c.js";
|
|
5
|
+
import { n as _, t as v } from "./chip-B3v4pWZD.js";
|
|
6
|
+
import { n as y, t as b } from "./select--O3jL-En.js";
|
|
7
|
+
import { n as x, t as S } from "./checkbox-DfYlHYR2.js";
|
|
8
|
+
import { n as C, t as w } from "./radio-CDq4r1_L.js";
|
|
9
|
+
import { n as T, t as E } from "./switch-D5N-j5F7.js";
|
|
10
|
+
import { n as D, t as O } from "./text-input-i559HVOP.js";
|
|
11
|
+
import { n as k, t as A } from "./text-area-BgYNtAMx.js";
|
|
12
|
+
import { a as j, i as M, n as N, r as P, t as F } from "./modal-BAvMVUIE.js";
|
|
13
|
+
e(), i(), l(), m(), _(), y(), x(), C(), T(), D(), k(), N();
|
|
7
14
|
//#endregion
|
|
8
|
-
export {
|
|
15
|
+
export { n as OudsAlert, o as OudsBadge, f as OudsButton, S as OudsCheckbox, v as OudsChip, F as OudsModal, w as OudsRadio, b as OudsSelect, E as OudsSwitch, g as OudsTag, A as OudsTextArea, O as OudsTextInput, t as alertVariants, a as badgeSizes, r as badgeVariants, d as buttonNavigations, c as buttonSizes, s as buttonTypes, u as buttonVariants, e as defineOudsAlert, i as defineOudsBadge, l as defineOudsButton, x as defineOudsCheckbox, _ as defineOudsChip, N as defineOudsModal, C as defineOudsRadio, y as defineOudsSelect, T as defineOudsSwitch, m as defineOudsTag, k as defineOudsTextArea, D as defineOudsTextInput, P as modalSizes, M as modalTypes, j as modalVariants, h as tagSizes, p as tagVariants };
|