@nilloq/ouds-web 0.1.6 → 0.1.8

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 (120) 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-OgsnDYrO.js} +4 -3
  8. package/dist/{button-nN1Pcwm6.js → button-gcQ7CyWb.js} +3 -2
  9. package/dist/button.js +1 -1
  10. package/dist/checkbox-D7TFFuw3.js +196 -0
  11. package/dist/checkbox-DfYlHYR2.js +155 -0
  12. package/dist/checkbox.js +1 -1
  13. package/dist/chip-B3v4pWZD.js +92 -0
  14. package/dist/chip-DGfqitrQ.js +115 -0
  15. package/dist/chip.js +2 -0
  16. package/dist/{control-item-slots-BNXNsI1e.js → control-item-slots-BDoeNuk4.js} +5 -2
  17. package/dist/{control-item-slots-XV8Gjvf1.js → control-item-slots-Ddp7c8w8.js} +4 -1
  18. package/dist/elements-alert.js +1 -1
  19. package/dist/elements-badge.js +1 -1
  20. package/dist/elements-button.js +1 -1
  21. package/dist/elements-checkbox.js +1 -1
  22. package/dist/elements-chip.js +2 -0
  23. package/dist/elements-modal.js +1 -1
  24. package/dist/elements-radio.js +1 -1
  25. package/dist/elements-select.js +1 -1
  26. package/dist/elements-switch.js +1 -1
  27. package/dist/elements-tag.js +1 -1
  28. package/dist/elements-text-area.js +1 -1
  29. package/dist/elements-text-input.js +1 -1
  30. package/dist/elements.js +14 -13
  31. package/dist/index.js +13 -12
  32. package/dist/{modal-IEXNB8St.js → modal-BAvMVUIE.js} +2 -2
  33. package/dist/{modal-CHjaB_yR.js → modal-BnT5Kxjg.js} +1 -1
  34. package/dist/modal.js +1 -1
  35. package/dist/radio-CDq4r1_L.js +155 -0
  36. package/dist/radio-TaYThYkI.js +199 -0
  37. package/dist/radio.js +1 -1
  38. package/dist/{runtime-dom.esm-bundler-BeOO_l6v.js → runtime-dom.esm-bundler-DLryEdgJ.js} +1 -1
  39. package/dist/select-BWhJ-QB-.js +195 -0
  40. package/dist/select-BbeCpnsY.js +136 -0
  41. package/dist/select.js +1 -1
  42. package/dist/switch-BmxLKPbL.js +179 -0
  43. package/dist/switch-D5N-j5F7.js +140 -0
  44. package/dist/switch.js +1 -1
  45. package/dist/{tag-Un7w0uDf.js → tag--KKxqOf8.js} +17 -16
  46. package/dist/tag-D6j9yaoI.js +85 -0
  47. package/dist/tag.js +1 -1
  48. package/dist/text-area-Cmn22-fj.js +108 -0
  49. package/dist/text-area-Cr8RssdQ.js +165 -0
  50. package/dist/text-area.js +1 -1
  51. package/dist/text-input-DgFIuIOA.js +235 -0
  52. package/dist/text-input-i559HVOP.js +163 -0
  53. package/dist/text-input.js +1 -1
  54. package/dist/types/chip.d.ts +1 -0
  55. package/dist/types/components/alert/Alert.vue.d.ts +3 -3
  56. package/dist/types/components/badge/Badge.vue.d.ts +1 -1
  57. package/dist/types/components/button/Button.vue.d.ts +3 -1
  58. package/dist/types/components/button/button.types.d.ts +1 -0
  59. package/dist/types/components/checkbox/Checkbox.vue.d.ts +4 -15
  60. package/dist/types/components/checkbox/VueCheckbox.vue.d.ts +9 -3
  61. package/dist/types/components/checkbox/checkbox.types.d.ts +16 -0
  62. package/dist/types/components/chip/Chip.vue.d.ts +38 -0
  63. package/dist/types/components/chip/VueChip.vue.d.ts +32 -0
  64. package/dist/types/components/chip/chip.context.d.ts +2 -0
  65. package/dist/types/components/chip/chip.types.d.ts +27 -0
  66. package/dist/types/components/modal/Modal.vue.d.ts +8 -8
  67. package/dist/types/components/radio/Radio.vue.d.ts +2 -17
  68. package/dist/types/components/radio/VueRadio.vue.d.ts +8 -6
  69. package/dist/types/components/radio/radio.types.d.ts +16 -0
  70. package/dist/types/components/select/Select.vue.d.ts +2 -19
  71. package/dist/types/components/select/VueSelect.vue.d.ts +9 -3
  72. package/dist/types/components/select/select.types.d.ts +24 -0
  73. package/dist/types/components/shared/control-item-slots.d.ts +1 -0
  74. package/dist/types/components/switch/Switch.vue.d.ts +2 -14
  75. package/dist/types/components/switch/VueSwitch.vue.d.ts +9 -3
  76. package/dist/types/components/switch/switch.types.d.ts +13 -0
  77. package/dist/types/components/tag/Tag.vue.d.ts +3 -1
  78. package/dist/types/components/tag/tag.types.d.ts +1 -0
  79. package/dist/types/components/text-area/TextArea.vue.d.ts +2 -16
  80. package/dist/types/components/text-area/VueTextArea.vue.d.ts +9 -3
  81. package/dist/types/components/text-area/text-area.types.d.ts +18 -0
  82. package/dist/types/components/text-input/TextInput.vue.d.ts +2 -19
  83. package/dist/types/components/text-input/VueTextInput.vue.d.ts +9 -3
  84. package/dist/types/components/text-input/text-input.types.d.ts +25 -0
  85. package/dist/types/elements/chip.d.ts +4 -0
  86. package/dist/types/elements/index.d.ts +2 -0
  87. package/dist/types/vue/checkbox.d.ts +1 -1
  88. package/dist/types/vue/chip.d.ts +2 -0
  89. package/dist/types/vue/index.d.ts +8 -6
  90. package/dist/types/vue/radio.d.ts +1 -1
  91. package/dist/types/vue/select.d.ts +1 -1
  92. package/dist/types/vue/switch.d.ts +1 -1
  93. package/dist/types/vue/text-area.d.ts +1 -1
  94. package/dist/types/vue/text-input.d.ts +1 -1
  95. package/dist/vue-alert.js +1 -1
  96. package/dist/vue-button.js +1 -1
  97. package/dist/vue-checkbox.js +1 -1
  98. package/dist/vue-chip.js +2 -0
  99. package/dist/vue-modal.js +1 -1
  100. package/dist/vue-radio.js +1 -1
  101. package/dist/vue-select.js +1 -1
  102. package/dist/vue-switch.js +1 -1
  103. package/dist/vue-tag.js +1 -1
  104. package/dist/vue-text-area.js +1 -1
  105. package/dist/vue-text-input.js +1 -1
  106. package/dist/vue.js +12 -11
  107. package/package.json +15 -2
  108. package/dist/checkbox-PAgQqiIw.js +0 -145
  109. package/dist/checkbox-g6cqR6wz.js +0 -170
  110. package/dist/radio-Cmrtred_.js +0 -147
  111. package/dist/radio-CqVqsZ7n.js +0 -175
  112. package/dist/select-Bpou1HIY.js +0 -167
  113. package/dist/select-CWjTpHGb.js +0 -126
  114. package/dist/switch-CFv0JUeq.js +0 -132
  115. package/dist/switch-DEYsTCw5.js +0 -157
  116. package/dist/tag-BdB0YDBJ.js +0 -84
  117. package/dist/text-area-DkjEGpHg.js +0 -99
  118. package/dist/text-area-DqBoz2_d.js +0 -139
  119. package/dist/text-input-DnWjB1vE.js +0 -207
  120. package/dist/text-input-DxzwRS2R.js +0 -157
@@ -1,145 +0,0 @@
1
- import { A as e, M as t, O as n, T as r, a as i, b as a, c as o, d as s, f as c, g as l, j as u, k as d, l as f, o as p, p as m, s as h, t as g, u as _, v, w as y, x as b, y as x } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
2
- import { n as S, t as C } from "./control-item-slots-BNXNsI1e.js";
3
- //#region src/components/checkbox/checkbox.context.ts
4
- var w = Symbol("ouds-checkbox-element-id"), T = { class: "control-item-assets-container" }, E = [
5
- "id",
6
- "value",
7
- "checked",
8
- "disabled",
9
- "required",
10
- "aria-describedby",
11
- "aria-invalid"
12
- ], D = [
13
- "id",
14
- "aria-checked",
15
- "aria-labelledby",
16
- "aria-describedby",
17
- "aria-invalid"
18
- ], O = { class: "control-item-text-container" }, k = ["id"], A = {
19
- key: 0,
20
- class: "control-item-assets-container"
21
- }, j = /* @__PURE__ */ s({
22
- inheritAttrs: !1,
23
- __name: "Checkbox",
24
- props: {
25
- label: { default: "Checkbox" },
26
- description: { default: "" },
27
- value: { default: "" },
28
- checked: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- disabled: {
33
- type: Boolean,
34
- default: !1
35
- },
36
- required: {
37
- type: Boolean,
38
- default: !1
39
- },
40
- divider: {
41
- type: Boolean,
42
- default: !1
43
- },
44
- indeterminate: {
45
- type: Boolean,
46
- default: !1
47
- },
48
- readonly: {
49
- type: Boolean,
50
- default: !1
51
- },
52
- invalid: {
53
- type: Boolean,
54
- default: !1
55
- },
56
- reverse: {
57
- type: Boolean,
58
- default: !1
59
- },
60
- maxWidth: {
61
- type: Boolean,
62
- default: !1
63
- }
64
- },
65
- setup(s) {
66
- let g = a(), C = d(() => g.id), j = n(), M = b(), N = c(w, void 0), P = S(N !== void 0), F = d(() => N ? `${C.value || N}-input` : C.value || `ouds-checkbox-${M}`), I = d(() => `${F.value}-label`), L = d(() => `${F.value}-description`);
67
- function R() {
68
- let e = [g["aria-describedby"]];
69
- return (s.description || P("description")) && e.push(L.value), e.filter(Boolean).join(" ") || void 0;
70
- }
71
- function z() {
72
- return [g["aria-labelledby"], I.value].filter(Boolean).join(" ");
73
- }
74
- let B = i(() => ["checkbox-item", {
75
- "control-item-divider": s.divider,
76
- "control-item-reverse": s.reverse,
77
- "component-max-width": s.maxWidth
78
- }]);
79
- return y(() => {
80
- j.value && "indeterminate" in j.value && (j.value.indeterminate = s.indeterminate);
81
- }), (n, i) => (l(), f("div", { class: u(B.value) }, [
82
- p("div", T, [s.readonly ? (l(), f("span", m({
83
- key: 1,
84
- ref_key: "input",
85
- ref: j
86
- }, e(g), {
87
- id: F.value,
88
- class: "control-item-indicator",
89
- role: "checkbox",
90
- "aria-readonly": "true",
91
- "aria-disabled": "true",
92
- tabindex: "0",
93
- "aria-checked": s.indeterminate ? "mixed" : s.checked,
94
- "aria-labelledby": z(),
95
- "aria-describedby": R(),
96
- "aria-invalid": s.invalid || e(g)["aria-invalid"]
97
- }), null, 16, D)) : (l(), f("input", m({
98
- key: 0,
99
- ref_key: "input",
100
- ref: j
101
- }, e(g), {
102
- id: F.value,
103
- class: "control-item-indicator",
104
- type: "checkbox",
105
- value: s.value,
106
- checked: s.checked,
107
- disabled: s.disabled,
108
- required: s.required,
109
- "aria-describedby": R(),
110
- "aria-invalid": s.invalid || e(g)["aria-invalid"]
111
- }), null, 16, E))]),
112
- p("div", O, [(l(), h(x(s.readonly ? "span" : "label"), {
113
- id: I.value,
114
- class: u(["control-item-label", { "is-required": s.required }]),
115
- for: s.readonly ? void 0 : F.value
116
- }, {
117
- default: r(() => [v(n.$slots, "label", {}, () => [_(t(s.label), 1)])]),
118
- _: 3
119
- }, 8, [
120
- "id",
121
- "class",
122
- "for"
123
- ])), s.description || e(P)("description") ? (l(), f("p", {
124
- key: 0,
125
- id: L.value,
126
- class: "control-item-description"
127
- }, [v(n.$slots, "description", {}, () => [_(t(s.description), 1)])], 8, k)) : o("", !0)]),
128
- e(P)("asset") ? (l(), f("div", A, [v(n.$slots, "asset")])) : o("", !0)
129
- ], 2));
130
- }
131
- }), M = 0, N = g(j, {
132
- shadowRoot: !1,
133
- configureApp(e) {
134
- e.provide(w, `ouds-checkbox-element-${M++}`);
135
- }
136
- }), P = class extends N {
137
- connectedCallback() {
138
- C(this), super.connectedCallback();
139
- }
140
- };
141
- function F() {
142
- typeof customElements < "u" && (customElements.get("ouds-checkbox") || customElements.define("ouds-checkbox", P));
143
- }
144
- //#endregion
145
- export { F as n, P as t };
@@ -1,170 +0,0 @@
1
- import { t as e } from "./control-item-slots-XV8Gjvf1.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, openBlock as p, ref 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, watchEffect as C, withCtx as w } from "vue";
3
- //#region src/components/checkbox/checkbox.context.ts
4
- var T = Symbol("ouds-checkbox-element-id"), E = { class: "control-item-assets-container" }, D = [
5
- "id",
6
- "value",
7
- "checked",
8
- "disabled",
9
- "required",
10
- "aria-describedby",
11
- "aria-invalid"
12
- ], O = [
13
- "id",
14
- "aria-checked",
15
- "aria-labelledby",
16
- "aria-describedby",
17
- "aria-invalid"
18
- ], k = { class: "control-item-text-container" }, A = ["id"], j = {
19
- key: 0,
20
- class: "control-item-assets-container"
21
- }, M = /* @__PURE__ */ c({
22
- inheritAttrs: !1,
23
- __name: "Checkbox",
24
- props: {
25
- label: { default: "Checkbox" },
26
- description: { default: "" },
27
- value: { default: "" },
28
- checked: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- disabled: {
33
- type: Boolean,
34
- default: !1
35
- },
36
- required: {
37
- type: Boolean,
38
- default: !1
39
- },
40
- divider: {
41
- type: Boolean,
42
- default: !1
43
- },
44
- indeterminate: {
45
- type: Boolean,
46
- default: !1
47
- },
48
- readonly: {
49
- type: Boolean,
50
- default: !1
51
- },
52
- invalid: {
53
- type: Boolean,
54
- default: !1
55
- },
56
- reverse: {
57
- type: Boolean,
58
- default: !1
59
- },
60
- maxWidth: {
61
- type: Boolean,
62
- default: !1
63
- }
64
- },
65
- setup(o) {
66
- let c = b(), u = v(() => c.id), S = m(), M = x(), N = l(T, void 0), P = e(N !== void 0), F = v(() => N ? `${u.value || N}-input` : u.value || `ouds-checkbox-${M}`), I = v(() => `${F.value}-label`), L = v(() => `${F.value}-description`);
67
- function R() {
68
- let e = [c["aria-describedby"]];
69
- return (o.description || P("description")) && e.push(L.value), e.filter(Boolean).join(" ") || void 0;
70
- }
71
- function z() {
72
- return [c["aria-labelledby"], I.value].filter(Boolean).join(" ");
73
- }
74
- let B = t(() => ["checkbox-item", {
75
- "control-item-divider": o.divider,
76
- "control-item-reverse": o.reverse,
77
- "component-max-width": o.maxWidth
78
- }]);
79
- return C(() => {
80
- S.value && "indeterminate" in S.value && (S.value.indeterminate = o.indeterminate);
81
- }), (e, t) => (p(), i("div", { class: f(B.value) }, [
82
- a("div", E, [o.readonly ? (p(), i("span", d({
83
- key: 1,
84
- ref_key: "input",
85
- ref: S
86
- }, y(c), {
87
- id: F.value,
88
- class: "control-item-indicator",
89
- role: "checkbox",
90
- "aria-readonly": "true",
91
- "aria-disabled": "true",
92
- tabindex: "0",
93
- "aria-checked": o.indeterminate ? "mixed" : o.checked,
94
- "aria-labelledby": z(),
95
- "aria-describedby": R(),
96
- "aria-invalid": o.invalid || y(c)["aria-invalid"]
97
- }), null, 16, O)) : (p(), i("input", d({
98
- key: 0,
99
- ref_key: "input",
100
- ref: S
101
- }, y(c), {
102
- id: F.value,
103
- class: "control-item-indicator",
104
- type: "checkbox",
105
- value: o.value,
106
- checked: o.checked,
107
- disabled: o.disabled,
108
- required: o.required,
109
- "aria-describedby": R(),
110
- "aria-invalid": o.invalid || y(c)["aria-invalid"]
111
- }), null, 16, D))]),
112
- a("div", k, [(p(), n(g(o.readonly ? "span" : "label"), {
113
- id: I.value,
114
- class: f(["control-item-label", { "is-required": o.required }]),
115
- for: o.readonly ? void 0 : F.value
116
- }, {
117
- default: w(() => [h(e.$slots, "label", {}, () => [s(_(o.label), 1)])]),
118
- _: 3
119
- }, 8, [
120
- "id",
121
- "class",
122
- "for"
123
- ])), o.description || y(P)("description") ? (p(), i("p", {
124
- key: 0,
125
- id: L.value,
126
- class: "control-item-description"
127
- }, [h(e.$slots, "description", {}, () => [s(_(o.description), 1)])], 8, A)) : r("", !0)]),
128
- y(P)("asset") ? (p(), i("div", j, [h(e.$slots, "asset")])) : r("", !0)
129
- ], 2));
130
- }
131
- }), N = /* @__PURE__ */ c({
132
- inheritAttrs: !1,
133
- __name: "VueCheckbox",
134
- props: {
135
- modelValue: {
136
- type: Boolean,
137
- default: !1
138
- },
139
- modelModifiers: {}
140
- },
141
- emits: /*@__PURE__*/ u(["change"], ["update:modelValue"]),
142
- setup(e, { emit: t }) {
143
- let r = S(e, "modelValue"), i = t;
144
- function a(e) {
145
- r.value = e.target.checked, i("change", e);
146
- }
147
- return (e, t) => (p(), n(M, d(e.$attrs, {
148
- checked: r.value,
149
- onChange: a
150
- }), o({ _: 2 }, [
151
- e.$slots.label ? {
152
- name: "label",
153
- fn: w(() => [h(e.$slots, "label")]),
154
- key: "0"
155
- } : void 0,
156
- e.$slots.asset ? {
157
- name: "asset",
158
- fn: w(() => [h(e.$slots, "asset")]),
159
- key: "1"
160
- } : void 0,
161
- e.$slots.description ? {
162
- name: "description",
163
- fn: w(() => [h(e.$slots, "description")]),
164
- key: "2"
165
- } : void 0
166
- ]), 1040, ["checked"]));
167
- }
168
- });
169
- //#endregion
170
- export { N as t };
@@ -1,147 +0,0 @@
1
- import { A as e, M as t, T as n, a as r, b as i, c as a, d as o, f as s, g as c, j as l, k as u, l as d, o as f, p, s as m, t as h, u as g, v as _, x as v, y } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
2
- import { n as b, t as x } from "./control-item-slots-BNXNsI1e.js";
3
- //#region src/components/radio/radio.context.ts
4
- var S = Symbol("ouds-radio-element-id"), C = { class: "control-item-assets-container" }, w = [
5
- "id",
6
- "name",
7
- "value",
8
- "checked",
9
- "disabled",
10
- "required",
11
- "aria-describedby",
12
- "aria-invalid"
13
- ], T = [
14
- "id",
15
- "aria-checked",
16
- "aria-labelledby",
17
- "aria-describedby",
18
- "aria-invalid"
19
- ], E = { class: "control-item-text-container" }, D = ["id"], O = ["id"], k = {
20
- key: 0,
21
- class: "control-item-assets-container"
22
- }, A = /* @__PURE__ */ o({
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 h = i(), x = u(() => h.id), A = v(), j = s(S, void 0), M = b(j !== void 0), N = u(() => j ? `${x.value || j}-input` : x.value || `ouds-radio-${A}`), P = u(() => `${N.value}-label`), F = u(() => `${N.value}-extra-label`), I = u(() => `${N.value}-description`);
70
- function L() {
71
- let e = [h["aria-describedby"]];
72
- return (o.extraLabel || M("extra-label")) && e.push(F.value), (o.description || M("description")) && e.push(I.value), e.filter(Boolean).join(" ") || void 0;
73
- }
74
- function R() {
75
- return [h["aria-labelledby"], P.value].filter(Boolean).join(" ");
76
- }
77
- let z = r(() => ["radio-button-item", {
78
- "control-item-divider": o.divider,
79
- "radio-button-item-outlined": o.outlined,
80
- "control-item-reverse": o.reverse,
81
- "component-max-width": o.maxWidth
82
- }]);
83
- return (r, i) => (c(), d("div", { class: l(z.value) }, [
84
- f("div", C, [o.readonly ? (c(), d("span", p({ key: 1 }, e(h), {
85
- id: N.value,
86
- class: "control-item-indicator",
87
- role: "radio",
88
- "aria-disabled": "true",
89
- tabindex: "0",
90
- "aria-checked": o.checked,
91
- "aria-labelledby": R(),
92
- "aria-describedby": L(),
93
- "aria-invalid": o.invalid || e(h)["aria-invalid"]
94
- }), null, 16, T)) : (c(), d("input", p({ key: 0 }, e(h), {
95
- id: N.value,
96
- class: "control-item-indicator",
97
- type: "radio",
98
- name: o.name,
99
- value: o.value,
100
- checked: o.checked,
101
- disabled: o.disabled,
102
- required: o.required,
103
- "aria-describedby": L(),
104
- "aria-invalid": o.invalid || e(h)["aria-invalid"]
105
- }), null, 16, w))]),
106
- f("div", E, [
107
- (c(), m(y(o.readonly ? "span" : "label"), {
108
- id: P.value,
109
- class: l(["control-item-label", { "is-required": o.required }]),
110
- for: o.readonly ? void 0 : N.value
111
- }, {
112
- default: n(() => [_(r.$slots, "label", {}, () => [g(t(o.label), 1)])]),
113
- _: 3
114
- }, 8, [
115
- "id",
116
- "class",
117
- "for"
118
- ])),
119
- o.extraLabel || e(M)("extra-label") ? (c(), d("p", {
120
- key: 0,
121
- id: F.value,
122
- class: "radio-button-extra-label"
123
- }, [_(r.$slots, "extra-label", {}, () => [g(t(o.extraLabel), 1)])], 8, D)) : a("", !0),
124
- o.description || e(M)("description") ? (c(), d("p", {
125
- key: 1,
126
- id: I.value,
127
- class: "control-item-description"
128
- }, [_(r.$slots, "description", {}, () => [g(t(o.description), 1)])], 8, O)) : a("", !0)
129
- ]),
130
- e(M)("asset") ? (c(), d("div", k, [_(r.$slots, "asset")])) : a("", !0)
131
- ], 2));
132
- }
133
- }), j = 0, M = h(A, {
134
- shadowRoot: !1,
135
- configureApp(e) {
136
- e.provide(S, `ouds-radio-element-${j++}`);
137
- }
138
- }), N = class extends M {
139
- connectedCallback() {
140
- x(this), super.connectedCallback();
141
- }
142
- };
143
- function P() {
144
- typeof customElements < "u" && (customElements.get("ouds-radio") || customElements.define("ouds-radio", N));
145
- }
146
- //#endregion
147
- export { P as n, N as t };
@@ -1,175 +0,0 @@
1
- import { t as e } from "./control-item-slots-XV8Gjvf1.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, openBlock as p, renderSlot as m, resolveDynamicComponent as h, toDisplayString as g, toRef as _, unref as v, useAttrs as y, useId as b, useModel as x, withCtx as S } from "vue";
3
- //#region src/components/radio/radio.context.ts
4
- var C = Symbol("ouds-radio-element-id"), w = { class: "control-item-assets-container" }, T = [
5
- "id",
6
- "name",
7
- "value",
8
- "checked",
9
- "disabled",
10
- "required",
11
- "aria-describedby",
12
- "aria-invalid"
13
- ], E = [
14
- "id",
15
- "aria-checked",
16
- "aria-labelledby",
17
- "aria-describedby",
18
- "aria-invalid"
19
- ], D = { class: "control-item-text-container" }, O = ["id"], k = ["id"], A = {
20
- key: 0,
21
- class: "control-item-assets-container"
22
- }, j = /* @__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 = y(), u = _(() => c.id), x = b(), j = l(C, void 0), M = e(j !== void 0), N = _(() => j ? `${u.value || j}-input` : u.value || `ouds-radio-${x}`), P = _(() => `${N.value}-label`), F = _(() => `${N.value}-extra-label`), I = _(() => `${N.value}-description`);
70
- function L() {
71
- let e = [c["aria-describedby"]];
72
- return (o.extraLabel || M("extra-label")) && e.push(F.value), (o.description || M("description")) && e.push(I.value), e.filter(Boolean).join(" ") || void 0;
73
- }
74
- function R() {
75
- return [c["aria-labelledby"], P.value].filter(Boolean).join(" ");
76
- }
77
- let z = t(() => ["radio-button-item", {
78
- "control-item-divider": o.divider,
79
- "radio-button-item-outlined": o.outlined,
80
- "control-item-reverse": o.reverse,
81
- "component-max-width": o.maxWidth
82
- }]);
83
- return (e, t) => (p(), i("div", { class: f(z.value) }, [
84
- a("div", w, [o.readonly ? (p(), i("span", d({ key: 1 }, v(c), {
85
- id: N.value,
86
- class: "control-item-indicator",
87
- role: "radio",
88
- "aria-disabled": "true",
89
- tabindex: "0",
90
- "aria-checked": o.checked,
91
- "aria-labelledby": R(),
92
- "aria-describedby": L(),
93
- "aria-invalid": o.invalid || v(c)["aria-invalid"]
94
- }), null, 16, E)) : (p(), i("input", d({ key: 0 }, v(c), {
95
- id: N.value,
96
- class: "control-item-indicator",
97
- type: "radio",
98
- name: o.name,
99
- value: o.value,
100
- checked: o.checked,
101
- disabled: o.disabled,
102
- required: o.required,
103
- "aria-describedby": L(),
104
- "aria-invalid": o.invalid || v(c)["aria-invalid"]
105
- }), null, 16, T))]),
106
- a("div", D, [
107
- (p(), n(h(o.readonly ? "span" : "label"), {
108
- id: P.value,
109
- class: f(["control-item-label", { "is-required": o.required }]),
110
- for: o.readonly ? void 0 : N.value
111
- }, {
112
- default: S(() => [m(e.$slots, "label", {}, () => [s(g(o.label), 1)])]),
113
- _: 3
114
- }, 8, [
115
- "id",
116
- "class",
117
- "for"
118
- ])),
119
- o.extraLabel || v(M)("extra-label") ? (p(), i("p", {
120
- key: 0,
121
- id: F.value,
122
- class: "radio-button-extra-label"
123
- }, [m(e.$slots, "extra-label", {}, () => [s(g(o.extraLabel), 1)])], 8, O)) : r("", !0),
124
- o.description || v(M)("description") ? (p(), i("p", {
125
- key: 1,
126
- id: I.value,
127
- class: "control-item-description"
128
- }, [m(e.$slots, "description", {}, () => [s(g(o.description), 1)])], 8, k)) : r("", !0)
129
- ]),
130
- v(M)("asset") ? (p(), i("div", A, [m(e.$slots, "asset")])) : r("", !0)
131
- ], 2));
132
- }
133
- }), M = /* @__PURE__ */ c({
134
- inheritAttrs: !1,
135
- __name: "VueRadio",
136
- props: /*@__PURE__*/ u({ value: { default: "" } }, {
137
- modelValue: { default: "" },
138
- modelModifiers: {}
139
- }),
140
- emits: /*@__PURE__*/ u(["change"], ["update:modelValue"]),
141
- setup(e, { emit: t }) {
142
- let r = x(e, "modelValue"), i = t;
143
- function a(e) {
144
- r.value = e.target.value, i("change", e);
145
- }
146
- return (t, i) => (p(), n(j, d(t.$attrs, {
147
- value: e.value,
148
- checked: r.value === e.value,
149
- onChange: a
150
- }), o({ _: 2 }, [
151
- t.$slots.label ? {
152
- name: "label",
153
- fn: S(() => [m(t.$slots, "label")]),
154
- key: "0"
155
- } : void 0,
156
- t.$slots.asset ? {
157
- name: "asset",
158
- fn: S(() => [m(t.$slots, "asset")]),
159
- key: "1"
160
- } : void 0,
161
- t.$slots["extra-label"] ? {
162
- name: "extra-label",
163
- fn: S(() => [m(t.$slots, "extra-label")]),
164
- key: "2"
165
- } : void 0,
166
- t.$slots.description ? {
167
- name: "description",
168
- fn: S(() => [m(t.$slots, "description")]),
169
- key: "3"
170
- } : void 0
171
- ]), 1040, ["value", "checked"]));
172
- }
173
- });
174
- //#endregion
175
- export { M as t };