@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.
Files changed (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -72
  3. package/dist/alert-B4w3fDHo.js +89 -0
  4. package/dist/alert-Chns046l.js +77 -0
  5. package/dist/alert.js +2 -0
  6. package/dist/badge-CDpWg-AO.js +57 -0
  7. package/dist/badge-yaFEZnEW.js +54 -0
  8. package/dist/badge.js +2 -0
  9. package/dist/{button-LlRiSiGS.js → button-nN1Pcwm6.js} +36 -21
  10. package/dist/button-rgIJZsYq.js +94 -0
  11. package/dist/button.js +1 -1
  12. package/dist/checkbox-D7TFFuw3.js +196 -0
  13. package/dist/checkbox-DfYlHYR2.js +155 -0
  14. package/dist/checkbox.js +1 -1
  15. package/dist/chip-B3v4pWZD.js +92 -0
  16. package/dist/chip-DGfqitrQ.js +115 -0
  17. package/dist/chip.js +2 -0
  18. package/dist/control-item-slots-BDoeNuk4.js +15 -0
  19. package/dist/control-item-slots-Ddp7c8w8.js +12 -0
  20. package/dist/elements-alert.js +2 -0
  21. package/dist/elements-badge.js +2 -0
  22. package/dist/elements-button.js +1 -1
  23. package/dist/elements-checkbox.js +1 -1
  24. package/dist/elements-chip.js +2 -0
  25. package/dist/elements-modal.js +2 -0
  26. package/dist/elements-radio.js +2 -0
  27. package/dist/elements-select.js +1 -1
  28. package/dist/elements-switch.js +2 -0
  29. package/dist/elements-tag.js +1 -1
  30. package/dist/elements-text-area.js +2 -0
  31. package/dist/elements-text-input.js +1 -1
  32. package/dist/elements.js +14 -7
  33. package/dist/index.js +13 -6
  34. package/dist/modal-BAvMVUIE.js +193 -0
  35. package/dist/modal-BnT5Kxjg.js +181 -0
  36. package/dist/modal.js +2 -0
  37. package/dist/radio-CDq4r1_L.js +155 -0
  38. package/dist/radio-TaYThYkI.js +199 -0
  39. package/dist/radio.js +5 -0
  40. package/dist/{runtime-dom.esm-bundler-BzNNnH8h.js → runtime-dom.esm-bundler-DLryEdgJ.js} +987 -839
  41. package/dist/select--O3jL-En.js +134 -0
  42. package/dist/select-NiIx8bVD.js +191 -0
  43. package/dist/select.js +1 -1
  44. package/dist/switch-BmxLKPbL.js +179 -0
  45. package/dist/switch-D5N-j5F7.js +140 -0
  46. package/dist/switch.js +5 -0
  47. package/dist/tag-BvOt0v-c.js +84 -0
  48. package/dist/tag-Un7w0uDf.js +81 -0
  49. package/dist/tag.js +1 -1
  50. package/dist/text-area-BdmAyh3N.js +163 -0
  51. package/dist/text-area-BgYNtAMx.js +107 -0
  52. package/dist/text-area.js +5 -0
  53. package/dist/text-input-DgFIuIOA.js +235 -0
  54. package/dist/text-input-i559HVOP.js +163 -0
  55. package/dist/text-input.js +1 -1
  56. package/dist/types/alert.d.ts +1 -0
  57. package/dist/types/badge.d.ts +1 -0
  58. package/dist/types/chip.d.ts +1 -0
  59. package/dist/types/components/alert/Alert.vue.d.ts +37 -0
  60. package/dist/types/components/alert/alert.context.d.ts +2 -0
  61. package/dist/types/components/alert/alert.options.d.ts +2 -0
  62. package/dist/types/components/alert/alert.types.d.ts +14 -0
  63. package/dist/types/components/badge/Badge.vue.d.ts +26 -0
  64. package/dist/types/components/badge/badge.options.d.ts +4 -0
  65. package/dist/types/components/badge/badge.types.d.ts +13 -0
  66. package/dist/types/components/button/Button.vue.d.ts +8 -5
  67. package/dist/types/components/button/button.options.d.ts +1 -1
  68. package/dist/types/components/button/button.types.d.ts +2 -0
  69. package/dist/types/components/checkbox/Checkbox.vue.d.ts +13 -17
  70. package/dist/types/components/checkbox/VueCheckbox.vue.d.ts +18 -8
  71. package/dist/types/components/checkbox/checkbox.context.d.ts +2 -0
  72. package/dist/types/components/checkbox/checkbox.types.d.ts +20 -0
  73. package/dist/types/components/chip/Chip.vue.d.ts +38 -0
  74. package/dist/types/components/chip/VueChip.vue.d.ts +32 -0
  75. package/dist/types/components/chip/chip.context.d.ts +2 -0
  76. package/dist/types/components/chip/chip.types.d.ts +27 -0
  77. package/dist/types/components/modal/Modal.vue.d.ts +86 -0
  78. package/dist/types/components/modal/modal.context.d.ts +2 -0
  79. package/dist/types/components/modal/modal.options.d.ts +7 -0
  80. package/dist/types/components/modal/modal.types.d.ts +28 -0
  81. package/dist/types/components/radio/Radio.vue.d.ts +22 -0
  82. package/dist/types/components/radio/VueRadio.vue.d.ts +36 -0
  83. package/dist/types/components/radio/radio.context.d.ts +2 -0
  84. package/dist/types/components/radio/radio.types.d.ts +36 -0
  85. package/dist/types/components/select/Select.vue.d.ts +17 -17
  86. package/dist/types/components/select/VueSelect.vue.d.ts +24 -8
  87. package/dist/types/components/select/select.types.d.ts +28 -0
  88. package/dist/types/components/shared/control-item-slots.d.ts +3 -0
  89. package/dist/types/components/switch/Switch.vue.d.ts +20 -0
  90. package/dist/types/components/switch/VueSwitch.vue.d.ts +34 -0
  91. package/dist/types/components/switch/switch.context.d.ts +2 -0
  92. package/dist/types/components/switch/switch.types.d.ts +30 -0
  93. package/dist/types/components/tag/Tag.vue.d.ts +9 -4
  94. package/dist/types/components/tag/tag.options.d.ts +1 -1
  95. package/dist/types/components/tag/tag.types.d.ts +4 -0
  96. package/dist/types/components/text-area/TextArea.vue.d.ts +22 -0
  97. package/dist/types/components/text-area/VueTextArea.vue.d.ts +38 -0
  98. package/dist/types/components/text-area/text-area.types.d.ts +34 -0
  99. package/dist/types/components/text-input/TextInput.vue.d.ts +19 -34
  100. package/dist/types/components/text-input/VueTextInput.vue.d.ts +26 -16
  101. package/dist/types/components/text-input/text-input.types.d.ts +26 -0
  102. package/dist/types/elements/alert.d.ts +5 -0
  103. package/dist/types/elements/badge.d.ts +5 -0
  104. package/dist/types/elements/chip.d.ts +4 -0
  105. package/dist/types/elements/index.d.ts +15 -0
  106. package/dist/types/elements/modal.d.ts +5 -0
  107. package/dist/types/elements/radio.d.ts +4 -0
  108. package/dist/types/elements/switch.d.ts +4 -0
  109. package/dist/types/elements/text-area.d.ts +4 -0
  110. package/dist/types/modal.d.ts +1 -0
  111. package/dist/types/radio.d.ts +2 -0
  112. package/dist/types/switch.d.ts +2 -0
  113. package/dist/types/text-area.d.ts +2 -0
  114. package/dist/types/vue/alert.d.ts +3 -0
  115. package/dist/types/vue/badge.d.ts +3 -0
  116. package/dist/types/vue/checkbox.d.ts +1 -1
  117. package/dist/types/vue/chip.d.ts +2 -0
  118. package/dist/types/vue/index.d.ts +16 -3
  119. package/dist/types/vue/modal.d.ts +3 -0
  120. package/dist/types/vue/radio.d.ts +2 -0
  121. package/dist/types/vue/select.d.ts +1 -1
  122. package/dist/types/vue/switch.d.ts +2 -0
  123. package/dist/types/vue/text-area.d.ts +2 -0
  124. package/dist/types/vue/text-input.d.ts +1 -1
  125. package/dist/vue-alert.js +2 -0
  126. package/dist/vue-badge.js +2 -0
  127. package/dist/vue-button.js +1 -1
  128. package/dist/vue-checkbox.js +1 -1
  129. package/dist/vue-chip.js +2 -0
  130. package/dist/vue-modal.js +2 -0
  131. package/dist/vue-radio.js +2 -0
  132. package/dist/vue-select.js +1 -1
  133. package/dist/vue-switch.js +2 -0
  134. package/dist/vue-tag.js +1 -1
  135. package/dist/vue-text-area.js +2 -0
  136. package/dist/vue-text-input.js +1 -1
  137. package/dist/vue.js +13 -6
  138. package/package.json +96 -11
  139. package/dist/button-BPOKh6G4.js +0 -79
  140. package/dist/checkbox-BYrgMhwO.js +0 -105
  141. package/dist/checkbox-D-A_bSBK.js +0 -79
  142. package/dist/select-CA6TVlpX.js +0 -58
  143. package/dist/select-CKHEHpJL.js +0 -80
  144. package/dist/tag-B2qhuHjk.js +0 -41
  145. package/dist/tag-BY32Hj5n.js +0 -44
  146. package/dist/text-input-CtTr5yfe.js +0 -151
  147. package/dist/text-input-l1F2arKl.js +0 -201
@@ -0,0 +1,199 @@
1
+ import { n as e } from "./control-item-slots-Ddp7c8w8.js";
2
+ import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, defineComponent as c, inject as l, mergeModels as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, openBlock as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, toRef as v, unref as y, useAttrs as b, useId as x, useModel as S, withCtx as C } from "vue";
3
+ //#region src/components/radio/radio.context.ts
4
+ var w = Symbol("ouds-radio-element-id"), T = { class: "control-item-assets-container" }, E = [
5
+ "id",
6
+ "name",
7
+ "value",
8
+ "checked",
9
+ "disabled",
10
+ "required",
11
+ "aria-describedby",
12
+ "aria-invalid"
13
+ ], D = [
14
+ "id",
15
+ "aria-checked",
16
+ "aria-labelledby",
17
+ "aria-describedby",
18
+ "aria-invalid"
19
+ ], O = { class: "control-item-text-container" }, k = ["id"], A = ["id"], j = {
20
+ key: 0,
21
+ class: "control-item-assets-container"
22
+ }, M = /* @__PURE__ */ c({
23
+ inheritAttrs: !1,
24
+ __name: "Radio",
25
+ props: {
26
+ label: { default: "Radio" },
27
+ description: { default: "" },
28
+ value: { default: "" },
29
+ checked: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ disabled: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ required: {
38
+ type: Boolean,
39
+ default: !1
40
+ },
41
+ divider: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ outlined: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ extraLabel: { default: "" },
50
+ name: { default: "" },
51
+ readonly: {
52
+ type: Boolean,
53
+ default: !1
54
+ },
55
+ invalid: {
56
+ type: Boolean,
57
+ default: !1
58
+ },
59
+ reverse: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ maxWidth: {
64
+ type: Boolean,
65
+ default: !1
66
+ }
67
+ },
68
+ setup(o) {
69
+ let c = b();
70
+ function u() {
71
+ let { class: e, style: t, ...n } = c;
72
+ return n;
73
+ }
74
+ let S = v(() => c.id), M = x(), N = l(w, void 0), P = e(N !== void 0), F = v(() => N ? `${S.value || N}-input` : S.value || `ouds-radio-${M}`), I = v(() => `${F.value}-label`), L = v(() => `${F.value}-extra-label`), R = v(() => `${F.value}-description`);
75
+ function z() {
76
+ let e = [c["aria-describedby"]];
77
+ return (o.extraLabel || P("extra-label")) && e.push(L.value), (o.description || P("description")) && e.push(R.value), e.filter(Boolean).join(" ") || void 0;
78
+ }
79
+ function B() {
80
+ return [c["aria-labelledby"], I.value].filter(Boolean).join(" ");
81
+ }
82
+ let V = t(() => ["radio-button-item", {
83
+ "control-item-divider": o.divider,
84
+ "radio-button-item-outlined": o.outlined,
85
+ "control-item-reverse": o.reverse,
86
+ "component-max-width": o.maxWidth
87
+ }]);
88
+ return (e, t) => (m(), i("div", {
89
+ class: f([V.value, y(c).class]),
90
+ style: p(y(c).style)
91
+ }, [
92
+ a("div", T, [o.readonly ? (m(), i("span", d({ key: 1 }, u(), {
93
+ id: F.value,
94
+ class: "control-item-indicator",
95
+ role: "radio",
96
+ "aria-disabled": "true",
97
+ tabindex: "0",
98
+ "aria-checked": o.checked,
99
+ "aria-labelledby": B(),
100
+ "aria-describedby": z(),
101
+ "aria-invalid": o.invalid || y(c)["aria-invalid"]
102
+ }), null, 16, D)) : (m(), i("input", d({ key: 0 }, u(), {
103
+ id: F.value,
104
+ class: "control-item-indicator",
105
+ type: "radio",
106
+ name: o.name,
107
+ value: o.value,
108
+ checked: o.checked,
109
+ disabled: o.disabled,
110
+ required: o.required,
111
+ "aria-describedby": z(),
112
+ "aria-invalid": o.invalid || y(c)["aria-invalid"]
113
+ }), null, 16, E))]),
114
+ a("div", O, [
115
+ (m(), n(g(o.readonly ? "span" : "label"), {
116
+ id: I.value,
117
+ class: f(["control-item-label", { "is-required": o.required }]),
118
+ for: o.readonly ? void 0 : F.value
119
+ }, {
120
+ default: C(() => [h(e.$slots, "label", {}, () => [s(_(o.label), 1)])]),
121
+ _: 3
122
+ }, 8, [
123
+ "id",
124
+ "class",
125
+ "for"
126
+ ])),
127
+ o.extraLabel || y(P)("extra-label") ? (m(), i("p", {
128
+ key: 0,
129
+ id: L.value,
130
+ class: "radio-button-extra-label"
131
+ }, [h(e.$slots, "extra-label", {}, () => [s(_(o.extraLabel), 1)])], 8, k)) : r("", !0),
132
+ o.description || y(P)("description") ? (m(), i("p", {
133
+ key: 1,
134
+ id: R.value,
135
+ class: "control-item-description"
136
+ }, [h(e.$slots, "description", {}, () => [s(_(o.description), 1)])], 8, A)) : r("", !0)
137
+ ]),
138
+ y(P)("asset") ? (m(), i("div", j, [h(e.$slots, "asset")])) : r("", !0)
139
+ ], 6));
140
+ }
141
+ }), N = /* @__PURE__ */ c({
142
+ inheritAttrs: !1,
143
+ __name: "VueRadio",
144
+ props: /*@__PURE__*/ u({
145
+ label: {},
146
+ description: {},
147
+ value: {},
148
+ disabled: { type: Boolean },
149
+ required: { type: Boolean },
150
+ divider: { type: Boolean },
151
+ outlined: { type: Boolean },
152
+ extraLabel: {},
153
+ name: {},
154
+ readonly: { type: Boolean },
155
+ invalid: { type: Boolean },
156
+ reverse: { type: Boolean },
157
+ maxWidth: { type: Boolean }
158
+ }, {
159
+ modelValue: { default: "" },
160
+ modelModifiers: {}
161
+ }),
162
+ emits: /*@__PURE__*/ u(["change"], ["update:modelValue"]),
163
+ setup(e, { emit: t }) {
164
+ let r = e, i = S(e, "modelValue"), a = t;
165
+ function s(e) {
166
+ i.value = e.target.value, a("change", e);
167
+ }
168
+ return (e, t) => (m(), n(M, d({
169
+ ...e.$attrs,
170
+ ...r
171
+ }, {
172
+ checked: i.value === (r.value ?? ""),
173
+ onChange: s
174
+ }), o({ _: 2 }, [
175
+ e.$slots.label ? {
176
+ name: "label",
177
+ fn: C(() => [h(e.$slots, "label")]),
178
+ key: "0"
179
+ } : void 0,
180
+ e.$slots.asset ? {
181
+ name: "asset",
182
+ fn: C(() => [h(e.$slots, "asset")]),
183
+ key: "1"
184
+ } : void 0,
185
+ e.$slots["extra-label"] ? {
186
+ name: "extra-label",
187
+ fn: C(() => [h(e.$slots, "extra-label")]),
188
+ key: "2"
189
+ } : void 0,
190
+ e.$slots.description ? {
191
+ name: "description",
192
+ fn: C(() => [h(e.$slots, "description")]),
193
+ key: "3"
194
+ } : void 0
195
+ ]), 1040, ["checked"]));
196
+ }
197
+ });
198
+ //#endregion
199
+ export { N as t };
package/dist/radio.js ADDED
@@ -0,0 +1,5 @@
1
+ import { n as e, t } from "./radio-CDq4r1_L.js";
2
+ //#region src/radio.ts
3
+ e();
4
+ //#endregion
5
+ export { t as OudsRadio, e as defineOudsRadio };