@ulu/frontend-vue 0.5.16 → 0.6.1

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 (133) hide show
  1. package/dist/components/elements/UluBadge.vue.d.ts +2 -0
  2. package/dist/components/elements/UluBadge.vue.d.ts.map +1 -1
  3. package/dist/components/elements/UluBadge.vue.js +30 -21
  4. package/dist/components/elements/UluButton.vue.d.ts +4 -0
  5. package/dist/components/elements/UluButton.vue.d.ts.map +1 -1
  6. package/dist/components/elements/UluButton.vue.js +31 -16
  7. package/dist/components/elements/UluIcon.vue.js +21 -36
  8. package/dist/components/forms/UluFormCheckbox.vue.d.ts +3 -19
  9. package/dist/components/forms/UluFormCheckbox.vue.d.ts.map +1 -1
  10. package/dist/components/forms/UluFormCheckbox.vue.js +10 -31
  11. package/dist/components/forms/UluFormFile.vue.d.ts +3 -25
  12. package/dist/components/forms/UluFormFile.vue.d.ts.map +1 -1
  13. package/dist/components/forms/UluFormFile.vue.js +11 -49
  14. package/dist/components/forms/UluFormItem.vue.d.ts +23 -8
  15. package/dist/components/forms/UluFormItem.vue.d.ts.map +1 -1
  16. package/dist/components/forms/UluFormItem.vue.js +126 -29
  17. package/dist/components/forms/UluFormLabel.vue.d.ts +24 -0
  18. package/dist/components/forms/UluFormLabel.vue.d.ts.map +1 -0
  19. package/dist/components/forms/UluFormLabel.vue.js +34 -0
  20. package/dist/components/forms/UluFormRadio.vue.d.ts +7 -25
  21. package/dist/components/forms/UluFormRadio.vue.d.ts.map +1 -1
  22. package/dist/components/forms/UluFormRadio.vue.js +11 -37
  23. package/dist/components/forms/UluFormSelect.vue.d.ts +7 -23
  24. package/dist/components/forms/UluFormSelect.vue.d.ts.map +1 -1
  25. package/dist/components/forms/UluFormSelect.vue.js +24 -43
  26. package/dist/components/forms/UluFormText.vue.d.ts +5 -23
  27. package/dist/components/forms/UluFormText.vue.d.ts.map +1 -1
  28. package/dist/components/forms/UluFormText.vue.js +10 -38
  29. package/dist/components/forms/UluFormTextarea.vue.d.ts +5 -23
  30. package/dist/components/forms/UluFormTextarea.vue.d.ts.map +1 -1
  31. package/dist/components/forms/UluFormTextarea.vue.js +10 -37
  32. package/dist/components/forms/UluSearchForm.vue.d.ts +24 -3
  33. package/dist/components/forms/UluSearchForm.vue.d.ts.map +1 -1
  34. package/dist/components/forms/UluSearchForm.vue.js +67 -22
  35. package/dist/components/index.d.ts +1 -0
  36. package/dist/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -1
  37. package/dist/components/systems/facets/UluFacetsFilterSelects.vue.js +21 -22
  38. package/dist/components/systems/facets/useFacets.d.ts.map +1 -1
  39. package/dist/components/systems/scroll-anchors/useScrollAnchorSection.d.ts.map +1 -1
  40. package/dist/components/systems/scroll-anchors/useScrollAnchorSections.d.ts.map +1 -1
  41. package/dist/components/systems/scroll-anchors/useScrollAnchors.d.ts.map +1 -1
  42. package/dist/components/utils/UluAction.vue.d.ts +2 -0
  43. package/dist/components/utils/UluAction.vue.d.ts.map +1 -1
  44. package/dist/components/utils/UluAction.vue.js +9 -5
  45. package/dist/components/visualizations/UluProgressBar.vue.d.ts +2 -2
  46. package/dist/composables/useBreakpointManager.d.ts.map +1 -1
  47. package/dist/composables/useDocumentTitle.d.ts.map +1 -1
  48. package/dist/composables/useIcon.d.ts +3 -0
  49. package/dist/composables/useIcon.d.ts.map +1 -1
  50. package/dist/composables/useModifiers.d.ts.map +1 -1
  51. package/dist/composables/usePagination.d.ts.map +1 -1
  52. package/dist/composables/useRequiredInject.d.ts.map +1 -1
  53. package/dist/composables/useTableData.d.ts.map +1 -1
  54. package/dist/composables/useUluFloating.d.ts.map +1 -1
  55. package/dist/composables/useWindowResize.d.ts.map +1 -1
  56. package/dist/index.js +130 -128
  57. package/dist/mcp-data.json +17685 -0
  58. package/dist/plugins/breakpoints/index.d.ts.map +1 -1
  59. package/dist/plugins/core/index.d.ts.map +1 -1
  60. package/dist/plugins/core/index.js +17 -16
  61. package/dist/plugins/modals/api.d.ts.map +1 -1
  62. package/dist/plugins/modals/index.d.ts.map +1 -1
  63. package/dist/plugins/modals/useModals.d.ts.map +1 -1
  64. package/dist/plugins/popovers/defaults.d.ts.map +1 -1
  65. package/dist/plugins/popovers/index.d.ts.map +1 -1
  66. package/dist/plugins/popovers/useTooltip.d.ts.map +1 -1
  67. package/dist/plugins/popovers/useTooltipFollow.d.ts.map +1 -1
  68. package/dist/plugins/toast/index.d.ts.map +1 -1
  69. package/dist/plugins/toast/store.d.ts.map +1 -1
  70. package/dist/plugins/toast/useToast.d.ts.map +1 -1
  71. package/dist/resolver.d.ts.map +1 -1
  72. package/dist/utils/dom.d.ts +3 -0
  73. package/dist/utils/dom.d.ts.map +1 -1
  74. package/dist/utils/props.d.ts +10 -0
  75. package/dist/utils/props.d.ts.map +1 -1
  76. package/dist/utils/props.js +8 -2
  77. package/dist/utils/router.d.ts +12 -15
  78. package/dist/utils/router.d.ts.map +1 -1
  79. package/lib/components/elements/UluBadge.vue +16 -5
  80. package/lib/components/elements/UluButton.vue +18 -3
  81. package/lib/components/elements/UluIcon.vue +8 -26
  82. package/lib/components/forms/UluForm.vue +25 -25
  83. package/lib/components/forms/UluFormCheckbox.vue +11 -25
  84. package/lib/components/forms/UluFormFieldset.vue +6 -6
  85. package/lib/components/forms/UluFormFile.vue +10 -40
  86. package/lib/components/forms/UluFormItem.vue +150 -39
  87. package/lib/components/forms/UluFormLabel.vue +30 -0
  88. package/lib/components/forms/UluFormRadio.vue +15 -34
  89. package/lib/components/forms/UluFormSelect.vue +19 -24
  90. package/lib/components/forms/UluFormText.vue +7 -25
  91. package/lib/components/forms/UluFormTextarea.vue +7 -25
  92. package/lib/components/forms/UluSearchForm.vue +67 -19
  93. package/lib/components/forms/UluSelectableMenu.vue +62 -62
  94. package/lib/components/index.js +4 -0
  95. package/lib/components/systems/facets/UluFacetsFilterSelects.vue +11 -14
  96. package/lib/components/systems/facets/useFacets.js +3 -0
  97. package/lib/components/systems/index.js +3 -0
  98. package/lib/components/systems/scroll-anchors/useScrollAnchorSection.js +3 -0
  99. package/lib/components/systems/scroll-anchors/useScrollAnchorSections.js +3 -0
  100. package/lib/components/systems/scroll-anchors/useScrollAnchors.js +3 -0
  101. package/lib/components/utils/UluAction.vue +6 -2
  102. package/lib/composables/useBreakpointManager.js +3 -0
  103. package/lib/composables/useDocumentTitle.js +3 -0
  104. package/lib/composables/useIcon.js +3 -0
  105. package/lib/composables/useModifiers.js +3 -1
  106. package/lib/composables/usePagination.js +3 -0
  107. package/lib/composables/useRequiredInject.js +3 -0
  108. package/lib/composables/useTableData.js +3 -0
  109. package/lib/composables/useUluFloating.js +3 -0
  110. package/lib/composables/useWindowResize.js +3 -0
  111. package/lib/index.js +1 -1
  112. package/lib/meta.js +1 -1
  113. package/lib/plugins/breakpoints/index.js +3 -0
  114. package/lib/plugins/core/index.js +4 -2
  115. package/lib/plugins/index.js +1 -1
  116. package/lib/plugins/modals/api.js +3 -0
  117. package/lib/plugins/modals/index.js +2 -3
  118. package/lib/plugins/modals/useModals.js +3 -0
  119. package/lib/plugins/popovers/defaults.js +3 -0
  120. package/lib/plugins/popovers/index.js +3 -0
  121. package/lib/plugins/popovers/useTooltip.js +3 -0
  122. package/lib/plugins/popovers/useTooltipFollow.js +3 -0
  123. package/lib/plugins/toast/defaults.js +3 -0
  124. package/lib/plugins/toast/index.js +3 -0
  125. package/lib/plugins/toast/store.js +3 -0
  126. package/lib/plugins/toast/useToast.js +3 -0
  127. package/lib/resolver.js +3 -0
  128. package/lib/utils/dom.js +3 -0
  129. package/lib/utils/index.js +3 -0
  130. package/lib/utils/props.js +17 -0
  131. package/lib/utils/router.js +10 -10
  132. package/lib/vite.js +3 -0
  133. package/package.json +19 -6
@@ -1,52 +1,149 @@
1
- import { createElementBlock as o, openBlock as a, normalizeClass as l, renderSlot as m } from "vue";
2
- const i = {
1
+ import { useSlots as I, computed as i, provide as q, createElementBlock as H, openBlock as o, normalizeClass as p, unref as A, createBlock as d, createCommentVNode as u, renderSlot as t, withCtx as g, createTextVNode as c, toDisplayString as f } from "vue";
2
+ import { newId as C } from "../../utils/dom.js";
3
+ import { useModifiers as F } from "../../composables/useModifiers.js";
4
+ import m from "./UluFormMessage.vue.js";
5
+ import h from "./UluFormLabel.vue.js";
6
+ const j = {
3
7
  __name: "UluFormItem",
4
8
  props: {
5
9
  /**
6
- * If true, applies the error state styles.
10
+ * The layout variant for this form item (e.g., 'text', 'select', 'textarea', 'checkbox', 'radio', 'file').
11
+ * This determines the layout and BEM styling of the item container.
7
12
  */
8
- error: Boolean,
13
+ layout: String,
9
14
  /**
10
- * If true, applies the warning state styles.
15
+ * The ID to use for the form field. If not provided, a unique ID is generated.
11
16
  */
12
- warning: Boolean,
17
+ fieldId: String,
13
18
  /**
14
- * If true, aligns the item to the top.
19
+ * The label for the form field.
15
20
  */
16
- alignTop: Boolean,
21
+ label: String,
22
+ /**
23
+ * If true, the label will be visually hidden.
24
+ */
25
+ labelHidden: Boolean,
26
+ /**
27
+ * The description text for the form field.
28
+ */
29
+ description: String,
30
+ /**
31
+ * The error message text.
32
+ */
33
+ errorMessage: String,
34
+ /**
35
+ * The warning message text.
36
+ */
37
+ warningMessage: String,
17
38
  /**
18
- * If true, applies the text item styles.
39
+ * If true, the field will be marked as required.
19
40
  */
20
- text: Boolean,
41
+ required: Boolean,
21
42
  /**
22
- * If true, applies the file item styles.
43
+ * If true, applies the error state styles.
23
44
  */
24
- file: Boolean,
45
+ error: Boolean,
25
46
  /**
26
- * If true, applies the select item styles.
47
+ * If true, applies the warning state styles.
27
48
  */
28
- select: Boolean,
49
+ warning: Boolean,
50
+ /**
51
+ * If true, aligns the item to the top.
52
+ */
53
+ alignTop: Boolean,
29
54
  /**
30
- * If true, applies the textarea item styles.
55
+ * Additional BEM modifiers for the form item.
31
56
  */
32
- textarea: Boolean
57
+ modifiers: [String, Array]
33
58
  },
34
- setup(e) {
35
- return (t, n) => (a(), o("div", {
36
- class: l(["form-theme__item", [{
37
- "is-danger": e.error,
38
- "is-warning": e.warning,
39
- "form-theme__item--align-top": e.alignTop,
40
- "form-theme__item--text": e.text,
41
- "form-theme__item--file": e.file,
42
- "form-theme__item--select": e.select,
43
- "form-theme__item--textarea": e.textarea
44
- }]])
59
+ setup(r) {
60
+ const e = r, s = I(), { resolvedModifiers: S } = F({
61
+ props: e,
62
+ baseClass: "form-theme__item",
63
+ internal: i(() => ({
64
+ [e.layout]: e.layout,
65
+ "align-top": e.alignTop
66
+ }))
67
+ }), l = i(() => e.fieldId || C()), v = i(() => `${l.value}-desc`), b = i(() => `${l.value}-error`), M = i(() => `${l.value}-warn`), w = i(() => !!e.label || !!s.label), $ = i(() => e.error || !!e.errorMessage || !!s.errorMessage), k = i(() => e.warning || !!e.warningMessage || !!s.warningMessage), y = i(() => ["checkbox", "radio"].includes(e.layout)), B = i(() => {
68
+ const a = {
69
+ id: l.value
70
+ }, n = [];
71
+ return (e.description || s.description) && n.push(v.value), (e.errorMessage || s.errorMessage) && n.push(b.value), (e.warningMessage || s.warningMessage) && n.push(M.value), n.length > 0 && (a["aria-describedby"] = n.join(" ")), $.value && (a["aria-invalid"] = "true"), a;
72
+ });
73
+ return q("uluFormFieldAttrs", B), (a, n) => (o(), H("div", {
74
+ class: p(["form-theme__item", [
75
+ A(S),
76
+ {
77
+ "is-danger": $.value,
78
+ "is-warning": k.value
79
+ }
80
+ ]])
45
81
  }, [
46
- m(t.$slots, "default")
82
+ !y.value && w.value ? (o(), d(h, {
83
+ key: 0,
84
+ id: l.value,
85
+ labelHidden: r.labelHidden,
86
+ required: r.required
87
+ }, {
88
+ default: g(() => [
89
+ t(a.$slots, "label", {}, () => [
90
+ c(f(r.label), 1)
91
+ ])
92
+ ]),
93
+ _: 3
94
+ }, 8, ["id", "labelHidden", "required"])) : u("", !0),
95
+ t(a.$slots, "default"),
96
+ y.value && w.value ? (o(), d(h, {
97
+ key: 1,
98
+ id: l.value,
99
+ labelHidden: r.labelHidden,
100
+ required: r.required
101
+ }, {
102
+ default: g(() => [
103
+ t(a.$slots, "label", {}, () => [
104
+ c(f(r.label), 1)
105
+ ])
106
+ ]),
107
+ _: 3
108
+ }, 8, ["id", "labelHidden", "required"])) : u("", !0),
109
+ r.description || a.$slots.description ? (o(), d(m, {
110
+ key: 2,
111
+ id: v.value
112
+ }, {
113
+ default: g(() => [
114
+ t(a.$slots, "description", {}, () => [
115
+ c(f(r.description), 1)
116
+ ])
117
+ ]),
118
+ _: 3
119
+ }, 8, ["id"])) : u("", !0),
120
+ r.errorMessage || a.$slots.errorMessage ? (o(), d(m, {
121
+ key: 3,
122
+ id: b.value,
123
+ error: ""
124
+ }, {
125
+ default: g(() => [
126
+ t(a.$slots, "errorMessage", {}, () => [
127
+ c(f(r.errorMessage), 1)
128
+ ])
129
+ ]),
130
+ _: 3
131
+ }, 8, ["id"])) : u("", !0),
132
+ r.warningMessage || a.$slots.warningMessage ? (o(), d(m, {
133
+ key: 4,
134
+ id: M.value,
135
+ warning: ""
136
+ }, {
137
+ default: g(() => [
138
+ t(a.$slots, "warningMessage", {}, () => [
139
+ c(f(r.warningMessage), 1)
140
+ ])
141
+ ]),
142
+ _: 3
143
+ }, 8, ["id"])) : u("", !0)
47
144
  ], 2));
48
145
  }
49
146
  };
50
147
  export {
51
- i as default
148
+ j as default
52
149
  };
@@ -0,0 +1,24 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ id: string;
8
+ required: boolean;
9
+ labelHidden: boolean;
10
+ $props: {
11
+ readonly id?: string | undefined;
12
+ readonly required?: boolean | undefined;
13
+ readonly labelHidden?: boolean | undefined;
14
+ };
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLLabelElement>;
16
+ type __VLS_TemplateResult = {
17
+ attrs: Partial<{}>;
18
+ slots: {
19
+ default?(_: {}): any;
20
+ };
21
+ refs: {};
22
+ rootEl: HTMLLabelElement;
23
+ };
24
+ //# sourceMappingURL=UluFormLabel.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UluFormLabel.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormLabel.vue"],"names":[],"mappings":"AAQA;wBAgHqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;wPAQG"}
@@ -0,0 +1,34 @@
1
+ import { createElementBlock as o, openBlock as r, normalizeClass as t, renderSlot as a, createBlock as n, createCommentVNode as d } from "vue";
2
+ import i from "./UluFormRequiredChar.vue.js";
3
+ const c = ["for"], f = {
4
+ __name: "UluFormLabel",
5
+ props: {
6
+ /**
7
+ * The ID of the input this label is associated with.
8
+ */
9
+ id: {
10
+ type: String,
11
+ required: !0
12
+ },
13
+ /**
14
+ * If true, the label will be visually hidden.
15
+ */
16
+ labelHidden: Boolean,
17
+ /**
18
+ * If true, appends the required character.
19
+ */
20
+ required: Boolean
21
+ },
22
+ setup(e) {
23
+ return (l, s) => (r(), o("label", {
24
+ for: e.id,
25
+ class: t({ "hidden-visually": e.labelHidden })
26
+ }, [
27
+ a(l.$slots, "default"),
28
+ e.required ? (r(), n(i, { key: 0 })) : d("", !0)
29
+ ], 10, c));
30
+ }
31
+ };
32
+ export {
33
+ f as default
34
+ };
@@ -1,29 +1,11 @@
1
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
- export default _default;
3
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
- $slots: S;
5
- });
6
- declare const __VLS_component: import('vue').DefineComponent<{}, {
1
+ declare const _default: import('vue').DefineComponent<{}, {
7
2
  $emit: (event: "update:modelValue", ...args: any[]) => void;
8
- required: boolean;
9
- modelValue?: string | number | undefined;
10
- value?: string | number | undefined;
11
- label?: string | undefined;
12
- name?: string | undefined;
3
+ modelValue?: string | number | boolean | undefined;
4
+ value?: string | number | boolean | undefined;
13
5
  $props: {
14
- readonly required?: boolean | undefined;
15
- readonly modelValue?: string | number | undefined;
16
- readonly value?: string | number | undefined;
17
- readonly label?: string | undefined;
18
- readonly name?: string | undefined;
19
- };
20
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
21
- type __VLS_TemplateResult = {
22
- attrs: Partial<{}>;
23
- slots: {
24
- default?(_: {}): any;
6
+ readonly modelValue?: string | number | boolean | undefined;
7
+ readonly value?: string | number | boolean | undefined;
25
8
  };
26
- refs: {};
27
- rootEl: any;
28
- };
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLInputElement>;
10
+ export default _default;
29
11
  //# sourceMappingURL=UluFormRadio.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluFormRadio.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormRadio.vue"],"names":[],"mappings":"AAgBA;wBAwJqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;2OAQG"}
1
+ {"version":3,"file":"UluFormRadio.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormRadio.vue"],"names":[],"mappings":"AASA;"}
@@ -1,52 +1,26 @@
1
- import { createElementBlock as u, openBlock as a, Fragment as d, createElementVNode as n, unref as o, renderSlot as m, createTextVNode as i, createBlock as c, createCommentVNode as f, toDisplayString as s } from "vue";
2
- import { newId as g } from "../../utils/dom.js";
3
- import v from "./UluFormRequiredChar.vue.js";
4
- const V = ["id", "name", "value", "checked", "required"], k = ["for"], h = {
1
+ import { inject as a, computed as n, createElementBlock as r, openBlock as m, mergeProps as d } from "vue";
2
+ const i = ["value", "checked"], v = {
5
3
  __name: "UluFormRadio",
6
4
  props: {
7
- /**
8
- * The label for the radio button.
9
- */
10
- label: String,
11
5
  /**
12
6
  * The value of the selected radio button in the group (for v-model).
13
7
  */
14
- modelValue: [String, Number],
8
+ modelValue: [String, Number, Boolean],
15
9
  /**
16
10
  * The value of this radio button.
17
11
  */
18
- value: [String, Number],
19
- /**
20
- * The name of the radio button group.
21
- */
22
- name: String,
23
- /**
24
- * If true, the field will be required.
25
- */
26
- required: Boolean
12
+ value: [String, Number, Boolean]
27
13
  },
28
14
  emits: ["update:modelValue"],
29
15
  setup(e) {
30
- const t = g();
31
- return (l, r) => (a(), u(d, null, [
32
- n("input", {
33
- type: "radio",
34
- id: o(t),
35
- name: e.name,
36
- value: e.value,
37
- checked: e.modelValue === e.value,
38
- onChange: r[0] || (r[0] = (S) => l.$emit("update:modelValue", e.value)),
39
- required: e.required
40
- }, null, 40, V),
41
- n("label", { for: o(t) }, [
42
- m(l.$slots, "default", {}, () => [
43
- i(s(e.label), 1),
44
- e.required ? (a(), c(v, { key: 0 })) : f("", !0)
45
- ])
46
- ], 8, k)
47
- ], 64));
16
+ const t = a("uluFormFieldAttrs", null), u = n(() => t ? t.value : {});
17
+ return (o, l) => (m(), r("input", d({ type: "radio" }, u.value, {
18
+ value: e.value,
19
+ checked: e.modelValue === e.value,
20
+ onChange: l[0] || (l[0] = (c) => o.$emit("update:modelValue", e.value))
21
+ }), null, 16, i));
48
22
  }
49
23
  };
50
24
  export {
51
- h as default
25
+ v as default
52
26
  };
@@ -1,29 +1,13 @@
1
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
- export default _default;
3
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
- $slots: S;
5
- });
6
- declare const __VLS_component: import('vue').DefineComponent<{}, {
1
+ declare const _default: import('vue').DefineComponent<{}, {
7
2
  $emit: (event: "update:modelValue", ...args: any[]) => void;
8
- required: boolean;
9
- labelHidden: boolean;
10
- modelValue?: string | undefined;
11
- label?: string | undefined;
3
+ placeholder: string | boolean;
4
+ modelValue?: string | number | unknown[] | undefined;
12
5
  options?: unknown[] | undefined;
13
6
  $props: {
14
- readonly required?: boolean | undefined;
15
- readonly labelHidden?: boolean | undefined;
16
- readonly modelValue?: string | undefined;
17
- readonly label?: string | undefined;
7
+ readonly placeholder?: string | boolean | undefined;
8
+ readonly modelValue?: string | number | unknown[] | undefined;
18
9
  readonly options?: unknown[] | undefined;
19
10
  };
20
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
21
- type __VLS_TemplateResult = {
22
- attrs: Partial<{}>;
23
- slots: {
24
- label?(_: {}): any;
25
- };
26
- refs: {};
27
- rootEl: any;
28
- };
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSelectElement>;
12
+ export default _default;
29
13
  //# sourceMappingURL=UluFormSelect.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluFormSelect.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormSelect.vue"],"names":[],"mappings":"AAkBA;wBAoKqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;2OAQG"}
1
+ {"version":3,"file":"UluFormSelect.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormSelect.vue"],"names":[],"mappings":"AAkBA;"}
@@ -1,61 +1,42 @@
1
- import { createElementBlock as r, openBlock as o, Fragment as i, createElementVNode as a, unref as u, normalizeClass as c, renderSlot as f, createTextVNode as v, createBlock as b, createCommentVNode as V, toDisplayString as s, renderList as g } from "vue";
2
- import { newId as k } from "../../utils/dom.js";
3
- import p from "./UluFormRequiredChar.vue.js";
4
- const q = ["for"], y = ["id", "value", "required"], B = ["value"], x = {
1
+ import { inject as i, computed as c, createElementBlock as l, openBlock as o, mergeProps as m, createCommentVNode as p, toDisplayString as n, Fragment as v, renderList as f } from "vue";
2
+ const g = ["value"], y = {
3
+ key: 0,
4
+ disabled: "",
5
+ value: ""
6
+ }, h = ["value"], V = {
5
7
  __name: "UluFormSelect",
6
8
  props: {
7
- /**
8
- * The label for the select input.
9
- */
10
- label: String,
11
9
  /**
12
10
  * The value of the select input (for v-model).
13
11
  */
14
- modelValue: String,
12
+ modelValue: [String, Number, Array],
15
13
  /**
16
14
  * An array of options for the select input. Each option should be an object with `value` and `text` properties.
17
15
  */
18
16
  options: Array,
19
17
  /**
20
- * If true, the label will be visually hidden.
21
- */
22
- labelHidden: Boolean,
23
- /**
24
- * If true, the field will be required.
18
+ * The text for the default disabled option. Pass false to hide it.
25
19
  */
26
- required: Boolean
20
+ placeholder: {
21
+ type: [String, Boolean],
22
+ default: "Please select one"
23
+ }
27
24
  },
28
25
  emits: ["update:modelValue"],
29
26
  setup(e) {
30
- const n = k();
31
- return (d, l) => (o(), r(i, null, [
32
- a("label", {
33
- class: c({ "hidden-visually": e.labelHidden }),
34
- for: u(n)
35
- }, [
36
- f(d.$slots, "label", {}, () => [
37
- v(s(e.label), 1),
38
- e.required ? (o(), b(p, { key: 0 })) : V("", !0)
39
- ])
40
- ], 10, q),
41
- a("select", {
42
- id: u(n),
43
- value: e.modelValue,
44
- onInput: l[0] || (l[0] = (t) => d.$emit("update:modelValue", t.target.value)),
45
- required: e.required
46
- }, [
47
- l[1] || (l[1] = a("option", {
48
- disabled: "",
49
- value: ""
50
- }, "Please select one", -1)),
51
- (o(!0), r(i, null, g(e.options, (t, m) => (o(), r("option", {
52
- key: m,
53
- value: t.value
54
- }, s(t.text), 9, B))), 128))
55
- ], 40, y)
56
- ], 64));
27
+ const a = i("uluFormFieldAttrs", null), u = c(() => a ? a.value : {});
28
+ return (s, r) => (o(), l("select", m(u.value, {
29
+ value: e.modelValue,
30
+ onInput: r[0] || (r[0] = (t) => s.$emit("update:modelValue", t.target.value))
31
+ }), [
32
+ e.placeholder !== !1 ? (o(), l("option", y, n(e.placeholder || "Please select one"), 1)) : p("", !0),
33
+ (o(!0), l(v, null, f(e.options, (t, d) => (o(), l("option", {
34
+ key: d,
35
+ value: t.value
36
+ }, n(t.text), 9, h))), 128))
37
+ ], 16, g));
57
38
  }
58
39
  };
59
40
  export {
60
- x as default
41
+ V as default
61
42
  };
@@ -1,27 +1,9 @@
1
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
- export default _default;
3
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
- $slots: S;
5
- });
6
- declare const __VLS_component: import('vue').DefineComponent<{}, {
1
+ declare const _default: import('vue').DefineComponent<{}, {
7
2
  $emit: (event: "update:modelValue", ...args: any[]) => void;
8
- required: boolean;
9
- labelHidden: boolean;
10
- modelValue?: string | undefined;
11
- label?: string | undefined;
3
+ modelValue?: string | number | undefined;
12
4
  $props: {
13
- readonly required?: boolean | undefined;
14
- readonly labelHidden?: boolean | undefined;
15
- readonly modelValue?: string | undefined;
16
- readonly label?: string | undefined;
17
- };
18
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
- type __VLS_TemplateResult = {
20
- attrs: Partial<{}>;
21
- slots: {
22
- label?(_: {}): any;
5
+ readonly modelValue?: string | number | undefined;
23
6
  };
24
- refs: {};
25
- rootEl: any;
26
- };
7
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLInputElement>;
8
+ export default _default;
27
9
  //# sourceMappingURL=UluFormText.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluFormText.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormText.vue"],"names":[],"mappings":"AAcA;wBA8IqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;2OAQG"}
1
+ {"version":3,"file":"UluFormText.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormText.vue"],"names":[],"mappings":"AAQA;"}
@@ -1,49 +1,21 @@
1
- import { createElementBlock as i, openBlock as o, Fragment as u, createElementVNode as a, unref as n, normalizeClass as m, renderSlot as s, createTextVNode as c, createBlock as f, createCommentVNode as V, toDisplayString as b } from "vue";
2
- import { newId as p } from "../../utils/dom.js";
3
- import g from "./UluFormRequiredChar.vue.js";
4
- const q = ["for"], B = ["value", "id", "required"], S = {
1
+ import { inject as n, computed as a, createElementBlock as m, openBlock as s, mergeProps as p } from "vue";
2
+ const d = ["value"], c = {
5
3
  __name: "UluFormText",
6
4
  props: {
7
- /**
8
- * The label for the text input.
9
- */
10
- label: String,
11
5
  /**
12
6
  * The value of the text input (for v-model).
13
7
  */
14
- modelValue: String,
15
- /**
16
- * If true, the label will be visually hidden.
17
- */
18
- labelHidden: Boolean,
19
- /**
20
- * If true, the field will be required.
21
- */
22
- required: Boolean
8
+ modelValue: [String, Number]
23
9
  },
24
10
  emits: ["update:modelValue"],
25
- setup(e) {
26
- const l = p();
27
- return (t, r) => (o(), i(u, null, [
28
- a("label", {
29
- class: m({ "hidden-visually": e.labelHidden }),
30
- for: n(l)
31
- }, [
32
- s(t.$slots, "label", {}, () => [
33
- c(b(e.label), 1),
34
- e.required ? (o(), f(g, { key: 0 })) : V("", !0)
35
- ])
36
- ], 10, q),
37
- a("input", {
38
- type: "text",
39
- value: e.modelValue,
40
- onInput: r[0] || (r[0] = (d) => t.$emit("update:modelValue", d.target.value)),
41
- id: n(l),
42
- required: e.required
43
- }, null, 40, B)
44
- ], 64));
11
+ setup(l) {
12
+ const e = n("uluFormFieldAttrs", null), u = a(() => e ? e.value : {});
13
+ return (o, t) => (s(), m("input", p({ type: "text" }, u.value, {
14
+ value: l.modelValue,
15
+ onInput: t[0] || (t[0] = (r) => o.$emit("update:modelValue", r.target.value))
16
+ }), null, 16, d));
45
17
  }
46
18
  };
47
19
  export {
48
- S as default
20
+ c as default
49
21
  };
@@ -1,27 +1,9 @@
1
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
- export default _default;
3
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
- $slots: S;
5
- });
6
- declare const __VLS_component: import('vue').DefineComponent<{}, {
1
+ declare const _default: import('vue').DefineComponent<{}, {
7
2
  $emit: (event: "update:modelValue", ...args: any[]) => void;
8
- required: boolean;
9
- labelHidden: boolean;
10
- modelValue?: string | undefined;
11
- label?: string | undefined;
3
+ modelValue?: string | number | undefined;
12
4
  $props: {
13
- readonly required?: boolean | undefined;
14
- readonly labelHidden?: boolean | undefined;
15
- readonly modelValue?: string | undefined;
16
- readonly label?: string | undefined;
17
- };
18
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
- type __VLS_TemplateResult = {
20
- attrs: Partial<{}>;
21
- slots: {
22
- label?(_: {}): any;
5
+ readonly modelValue?: string | number | undefined;
23
6
  };
24
- refs: {};
25
- rootEl: any;
26
- };
7
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLTextAreaElement>;
8
+ export default _default;
27
9
  //# sourceMappingURL=UluFormTextarea.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluFormTextarea.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormTextarea.vue"],"names":[],"mappings":"AAaA;wBA4IqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;2OAQG"}
1
+ {"version":3,"file":"UluFormTextarea.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/forms/UluFormTextarea.vue"],"names":[],"mappings":"AAOA;"}