@nilloq/ouds-web 0.1.6 → 0.1.7

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