@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
@@ -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,2 @@
1
+ import { n as e, t } from "./chip-B3v4pWZD.js";
2
+ export { t as OudsChip, e as defineOudsChip };
@@ -1,4 +1,4 @@
1
- import { S as e, n as t } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
1
+ import { S as e, n as t } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
2
2
  //#region src/components/shared/control-item-slots.ts
3
3
  var n = /* @__PURE__ */ new WeakMap();
4
4
  function r(e) {
@@ -8,5 +8,8 @@ function i(r) {
8
8
  let i = e(), a = r ? t() : void 0;
9
9
  return (e) => !!(i[e] || a && n.get(a)?.has(e));
10
10
  }
11
+ function a(e, t) {
12
+ return n.get(e)?.has(t) ?? !1;
13
+ }
11
14
  //#endregion
12
- export { i as n, r as t };
15
+ export { a as n, i as r, r as t };
@@ -5,5 +5,8 @@ function r(r) {
5
5
  let i = t(), a = r ? e() : void 0;
6
6
  return (e) => !!(i[e] || a && n.get(a)?.has(e));
7
7
  }
8
+ function i(e, t) {
9
+ return n.get(e)?.has(t) ?? !1;
10
+ }
8
11
  //#endregion
9
- export { r as t };
12
+ export { r as n, i as t };
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./alert-bsnEmrzb.js";
1
+ import { n as e, r as t, t as n } from "./alert-B4w3fDHo.js";
2
2
  export { n as OudsAlert, t as alertVariants, e as defineOudsAlert };
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./badge-fffoaFuZ.js";
1
+ import { i as e, n as t, r as n, t as r } from "./badge-CDpWg-AO.js";
2
2
  export { r as OudsBadge, n as badgeSizes, e as badgeVariants, t as defineOudsBadge };
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./button-BUziAVbu.js";
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-PAgQqiIw.js";
1
+ import { n as e, t } from "./checkbox-DfYlHYR2.js";
2
2
  export { t as OudsCheckbox, e as defineOudsCheckbox };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./chip-B3v4pWZD.js";
2
+ export { t as OudsChip, e as defineOudsChip };
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./modal-IEXNB8St.js";
1
+ import { a as e, i as t, n, r, t as i } from "./modal-BAvMVUIE.js";
2
2
  export { i as OudsModal, n as defineOudsModal, r as modalSizes, t as modalTypes, e as modalVariants };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./radio-Cmrtred_.js";
1
+ import { n as e, t } from "./radio-CDq4r1_L.js";
2
2
  export { t as OudsRadio, e as defineOudsRadio };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./select-CWjTpHGb.js";
1
+ import { n as e, t } from "./select--O3jL-En.js";
2
2
  export { t as OudsSelect, e as defineOudsSelect };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./switch-CFv0JUeq.js";
1
+ import { n as e, t } from "./switch-D5N-j5F7.js";
2
2
  export { t as OudsSwitch, e as defineOudsSwitch };
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./tag-BdB0YDBJ.js";
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-area-DkjEGpHg.js";
1
+ import { n as e, t } from "./text-area-BgYNtAMx.js";
2
2
  export { t as OudsTextArea, e as defineOudsTextArea };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./text-input-DxzwRS2R.js";
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,14 +1,15 @@
1
- import { n as e, r as t, t as n } from "./alert-bsnEmrzb.js";
2
- import { i as r, n as i, r as a, t as o } from "./badge-fffoaFuZ.js";
3
- import { a as s, i as c, n as l, o as u, r as d, t as f } from "./button-BUziAVbu.js";
4
- import { i as p, n as m, r as h, t as g } from "./tag-BdB0YDBJ.js";
5
- import { n as _, t as v } from "./select-CWjTpHGb.js";
6
- import { n as y, t as b } from "./checkbox-PAgQqiIw.js";
7
- import { n as x, t as S } from "./radio-Cmrtred_.js";
8
- import { n as C, t as w } from "./switch-CFv0JUeq.js";
9
- import { n as T, t as E } from "./text-input-DxzwRS2R.js";
10
- import { n as D, t as O } from "./text-area-DkjEGpHg.js";
11
- import { a as k, i as A, n as j, r as M, t as N } from "./modal-IEXNB8St.js";
12
- e(), i(), l(), m(), _(), y(), x(), C(), T(), D(), j();
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();
13
14
  //#endregion
14
- export { n as OudsAlert, o as OudsBadge, f as OudsButton, b as OudsCheckbox, N as OudsModal, S as OudsRadio, v as OudsSelect, w as OudsSwitch, g as OudsTag, O as OudsTextArea, E 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, y as defineOudsCheckbox, j as defineOudsModal, x as defineOudsRadio, _ as defineOudsSelect, C as defineOudsSwitch, m as defineOudsTag, D as defineOudsTextArea, T as defineOudsTextInput, M as modalSizes, A as modalTypes, k as modalVariants, h as tagSizes, p as tagVariants };
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 };
package/dist/index.js CHANGED
@@ -1,13 +1,14 @@
1
- import { n as e, r as t, t as n } from "./alert-bsnEmrzb.js";
2
- import { i as r, n as i, r as a, t as o } from "./badge-fffoaFuZ.js";
3
- import { a as s, i as c, n as l, o as u, r as d, t as f } from "./button-BUziAVbu.js";
4
- import { i as p, n as m, r as h, t as g } from "./tag-BdB0YDBJ.js";
5
- import { n as _, t as v } from "./select-CWjTpHGb.js";
6
- import { n as y, t as b } from "./checkbox-PAgQqiIw.js";
7
- import { n as x, t as S } from "./radio-Cmrtred_.js";
8
- import { n as C, t as w } from "./switch-CFv0JUeq.js";
9
- import { n as T, t as E } from "./text-input-DxzwRS2R.js";
10
- import { n as D, t as O } from "./text-area-DkjEGpHg.js";
11
- import { a as k, i as A, n as j, r as M, t as N } from "./modal-IEXNB8St.js";
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";
12
13
  import "./elements.js";
13
- export { n as OudsAlert, o as OudsBadge, f as OudsButton, b as OudsCheckbox, N as OudsModal, S as OudsRadio, v as OudsSelect, w as OudsSwitch, g as OudsTag, O as OudsTextArea, E 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, y as defineOudsCheckbox, j as defineOudsModal, x as defineOudsRadio, _ as defineOudsSelect, C as defineOudsSwitch, m as defineOudsTag, D as defineOudsTextArea, T as defineOudsTextInput, M as modalSizes, A as modalTypes, k as modalVariants, h as tagSizes, p as tagVariants };
14
+ 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 };
@@ -1,5 +1,5 @@
1
- import { A as e, C as t, D as n, M as r, O as i, T as a, a as o, b as s, c, d as l, f as u, g as d, h as f, j as p, l as m, m as h, n as g, o as _, p as v, s as y, t as b, u as x, v as S, x as C, y as w } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
2
- import { n as T, t as E } from "./control-item-slots-BNXNsI1e.js";
1
+ import { A as e, C as t, D as n, N as r, O as i, T as a, a as o, b as s, c, d as l, f as u, g as d, h as f, j as p, l as m, m as h, n as g, o as _, p as v, s as y, t as b, u as x, v as S, x as C, y as w } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
2
+ import { r as T, t as E } from "./control-item-slots-BDoeNuk4.js";
3
3
  //#region src/components/modal/modal.context.ts
4
4
  var D = Symbol("ouds-modal-element-id"), ee = [
5
5
  "id",
@@ -1,4 +1,4 @@
1
- import { t as e } from "./control-item-slots-XV8Gjvf1.js";
1
+ import { n as e } from "./control-item-slots-Ddp7c8w8.js";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, inject as c, isRef as l, mergeProps as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useAttrs as b, useHost as x, useId as S, watch as C, withCtx as w } from "vue";
3
3
  //#region src/components/modal/modal.context.ts
4
4
  var T = Symbol("ouds-modal-element-id"), E = [
package/dist/modal.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./modal-IEXNB8St.js";
1
+ import { a as e, i as t, n, r, t as i } from "./modal-BAvMVUIE.js";
2
2
  export { i as OudsModal, n as defineOudsModal, r as modalSizes, t as modalTypes, e as modalVariants };
@@ -0,0 +1,155 @@
1
+ import { A as e, M as t, N 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, x as y, y as b } from "./runtime-dom.esm-bundler-DLryEdgJ.js";
2
+ import { r as x, t as S } from "./control-item-slots-BDoeNuk4.js";
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__ */ s({
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(s) {
69
+ let g = a();
70
+ function S() {
71
+ let { class: e, style: t, ...n } = g;
72
+ return n;
73
+ }
74
+ let j = d(() => g.id), M = y(), N = c(C, void 0), P = x(N !== void 0), F = d(() => N ? `${j.value || N}-input` : j.value || `ouds-radio-${M}`), I = d(() => `${F.value}-label`), L = d(() => `${F.value}-extra-label`), R = d(() => `${F.value}-description`);
75
+ function z() {
76
+ let e = [g["aria-describedby"]];
77
+ return (s.extraLabel || P("extra-label")) && e.push(L.value), (s.description || P("description")) && e.push(R.value), e.filter(Boolean).join(" ") || void 0;
78
+ }
79
+ function B() {
80
+ return [g["aria-labelledby"], I.value].filter(Boolean).join(" ");
81
+ }
82
+ let V = i(() => ["radio-button-item", {
83
+ "control-item-divider": s.divider,
84
+ "radio-button-item-outlined": s.outlined,
85
+ "control-item-reverse": s.reverse,
86
+ "component-max-width": s.maxWidth
87
+ }]);
88
+ return (i, a) => (l(), f("div", {
89
+ class: u([V.value, e(g).class]),
90
+ style: t(e(g).style)
91
+ }, [
92
+ p("div", w, [s.readonly ? (l(), f("span", m({ key: 1 }, S(), {
93
+ id: F.value,
94
+ class: "control-item-indicator",
95
+ role: "radio",
96
+ "aria-disabled": "true",
97
+ tabindex: "0",
98
+ "aria-checked": s.checked,
99
+ "aria-labelledby": B(),
100
+ "aria-describedby": z(),
101
+ "aria-invalid": s.invalid || e(g)["aria-invalid"]
102
+ }), null, 16, E)) : (l(), f("input", m({ key: 0 }, S(), {
103
+ id: F.value,
104
+ class: "control-item-indicator",
105
+ type: "radio",
106
+ name: s.name,
107
+ value: s.value,
108
+ checked: s.checked,
109
+ disabled: s.disabled,
110
+ required: s.required,
111
+ "aria-describedby": z(),
112
+ "aria-invalid": s.invalid || e(g)["aria-invalid"]
113
+ }), null, 16, T))]),
114
+ p("div", D, [
115
+ (l(), h(b(s.readonly ? "span" : "label"), {
116
+ id: I.value,
117
+ class: u(["control-item-label", { "is-required": s.required }]),
118
+ for: s.readonly ? void 0 : F.value
119
+ }, {
120
+ default: r(() => [v(i.$slots, "label", {}, () => [_(n(s.label), 1)])]),
121
+ _: 3
122
+ }, 8, [
123
+ "id",
124
+ "class",
125
+ "for"
126
+ ])),
127
+ s.extraLabel || e(P)("extra-label") ? (l(), f("p", {
128
+ key: 0,
129
+ id: L.value,
130
+ class: "radio-button-extra-label"
131
+ }, [v(i.$slots, "extra-label", {}, () => [_(n(s.extraLabel), 1)])], 8, O)) : o("", !0),
132
+ s.description || e(P)("description") ? (l(), f("p", {
133
+ key: 1,
134
+ id: R.value,
135
+ class: "control-item-description"
136
+ }, [v(i.$slots, "description", {}, () => [_(n(s.description), 1)])], 8, k)) : o("", !0)
137
+ ]),
138
+ e(P)("asset") ? (l(), f("div", A, [v(i.$slots, "asset")])) : o("", !0)
139
+ ], 6));
140
+ }
141
+ }), M = 0, N = g(j, {
142
+ shadowRoot: !1,
143
+ configureApp(e) {
144
+ e.provide(C, `ouds-radio-element-${M++}`);
145
+ }
146
+ }), P = class extends N {
147
+ connectedCallback() {
148
+ S(this), super.connectedCallback();
149
+ }
150
+ };
151
+ function F() {
152
+ typeof customElements < "u" && (customElements.get("ouds-radio") || customElements.define("ouds-radio", P));
153
+ }
154
+ //#endregion
155
+ export { F as n, P as t };
@@ -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 CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./radio-Cmrtred_.js";
1
+ import { n as e, t } from "./radio-CDq4r1_L.js";
2
2
  //#region src/radio.ts
3
3
  e();
4
4
  //#endregion
@@ -2930,4 +2930,4 @@ function ro(e) {
2930
2930
  return g(e) ? document.querySelector(e) : e;
2931
2931
  }
2932
2932
  //#endregion
2933
- export { Jt as A, Ln as C, V as D, jn as E, Oe as M, Gt as O, _r as S, An as T, ur as _, ra as a, vr as b, ji as c, Kn as d, Nn as f, hi as g, rr as h, J as i, _e as j, $t as k, bi as l, ir as m, Xa as n, Ei as o, Pi as p, _a as r, xi as s, qa as t, Ai as u, dr as v, In as w, qn as x, sr as y };
2933
+ export { Jt as A, Ln as C, V as D, jn as E, pe as M, Oe as N, Gt as O, _r as S, An as T, ur as _, ra as a, vr as b, ji as c, Kn as d, Nn as f, hi as g, rr as h, J as i, _e as j, $t as k, bi as l, ir as m, Xa as n, Ei as o, Pi as p, _a as r, xi as s, qa as t, Ai as u, dr as v, In as w, qn as x, sr as y };