@nexdom/uimed-vue 1.1.0-beta.3 → 1.1.0

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.
package/README.md CHANGED
@@ -58,9 +58,9 @@ Add the `Root` component to you `App.vue`, then add the rest of the components a
58
58
  ```vue
59
59
  <!-- App.vue -->
60
60
  <template>
61
- <Root>
61
+ <root>
62
62
  <!-- ... -->
63
- </Root>
63
+ </root>
64
64
  </template>
65
65
 
66
66
  <script setup lang="ts">
@@ -22,11 +22,11 @@ type RootProps = {
22
22
  *
23
23
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/root | Root Guide}
24
24
  */
25
- declare const _default$3: typeof __VLS_export$5;
26
- declare const __VLS_export$5: __VLS_WithSlots$4<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RootProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RootProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
25
+ declare const _default$4: typeof __VLS_export$6;
26
+ declare const __VLS_export$6: __VLS_WithSlots$5<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RootProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RootProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
27
27
  default?: (props: {}) => any;
28
28
  }>;
29
- type __VLS_WithSlots$4<T, S> = T & {
29
+ type __VLS_WithSlots$5<T, S> = T & {
30
30
  new (): {
31
31
  $slots: S;
32
32
  };
@@ -45,6 +45,12 @@ type BtnProps = {
45
45
  * @default "primary"
46
46
  */
47
47
  variant?: BtnVariant;
48
+ /**
49
+ * Applies a distinct behavior to the button.
50
+ * One of `button` or `submit`.
51
+ * @default "button"
52
+ */
53
+ type?: "submit" | "button";
48
54
  /**
49
55
  * Applies a color to the button.
50
56
  * One of `primary`, `secondary`, `positive`, `informative`, `caution`, or `danger`.
@@ -61,6 +67,10 @@ type BtnProps = {
61
67
  * @default false
62
68
  */
63
69
  loading?: boolean;
70
+ /**
71
+ * Associated [form](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/form) id.
72
+ */
73
+ form?: string;
64
74
  /**
65
75
  * Component id to use on automated tests.
66
76
  */
@@ -80,21 +90,21 @@ type BtnProps = {
80
90
  *
81
91
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/btn | Btn Guide}
82
92
  */
83
- declare const _default: typeof __VLS_export$4;
84
- declare const __VLS_export$4: __VLS_WithSlots$3<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<BtnProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
93
+ declare const _default: typeof __VLS_export$5;
94
+ declare const __VLS_export$5: __VLS_WithSlots$4<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<BtnProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
85
95
  click: (event: MouseEvent) => any;
86
96
  }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<BtnProps> & Readonly<{
87
97
  onClick?: ((event: MouseEvent) => any) | undefined;
88
98
  }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
89
99
  default?: (props: {}) => any;
90
100
  }>;
91
- type __VLS_WithSlots$3<T, S> = T & {
101
+ type __VLS_WithSlots$4<T, S> = T & {
92
102
  new (): {
93
103
  $slots: S;
94
104
  };
95
105
  };
96
106
  //#endregion
97
- //#region src/components/text-field/types.d.ts
107
+ //#region src/components/inputs/text-field/types.d.ts
98
108
  type TextFieldVariant = "primary" | "secondary";
99
109
  type TextFieldType = "text" | "phone" | "email" | "url" | "password" | "search";
100
110
  /**
@@ -133,6 +143,11 @@ type TextFieldProps = {
133
143
  * @default false
134
144
  */
135
145
  readonly?: boolean;
146
+ /**
147
+ * Add `rules` to require field to be filled before form submission.
148
+ * @default false
149
+ */
150
+ required?: boolean;
136
151
  /**
137
152
  * Field label.
138
153
  */
@@ -153,7 +168,7 @@ type TextFieldProps = {
153
168
  dataTestid?: string;
154
169
  };
155
170
  //#endregion
156
- //#region src/components/text-field/text-field.vue.d.ts
171
+ //#region src/components/inputs/text-field/text-field.vue.d.ts
157
172
  /**
158
173
  * Text field component to be used throughout the application.
159
174
  *
@@ -164,8 +179,8 @@ type TextFieldProps = {
164
179
  *
165
180
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/text-field | TextField Guide}
166
181
  */
167
- declare const _default$5: typeof __VLS_export$3;
168
- declare const __VLS_export$3: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TextFieldProps & {
182
+ declare const _default$6: typeof __VLS_export$4;
183
+ declare const __VLS_export$4: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TextFieldProps & {
169
184
  modelValue?: string;
170
185
  }, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
171
186
  "update:modelValue": (value: string) => any;
@@ -173,9 +188,7 @@ declare const __VLS_export$3: import("vue", { with: { "resolution-mode": "import
173
188
  modelValue?: string;
174
189
  }> & Readonly<{
175
190
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
176
- }>, {
177
- clearable: boolean;
178
- }, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
191
+ }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
179
192
  //#endregion
180
193
  //#region src/components/grid/container/types.d.ts
181
194
  /**
@@ -201,11 +214,11 @@ type ContainerProps = {
201
214
  *
202
215
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Container Guide}
203
216
  */
204
- declare const _default$2: typeof __VLS_export$2;
205
- declare const __VLS_export$2: __VLS_WithSlots$2<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ContainerProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
217
+ declare const _default$2: typeof __VLS_export$3;
218
+ declare const __VLS_export$3: __VLS_WithSlots$3<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ContainerProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
206
219
  default?: (props: {}) => any;
207
220
  }>;
208
- type __VLS_WithSlots$2<T, S> = T & {
221
+ type __VLS_WithSlots$3<T, S> = T & {
209
222
  new (): {
210
223
  $slots: S;
211
224
  };
@@ -237,11 +250,11 @@ type RowProps = {
237
250
  *
238
251
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Row Guide}
239
252
  */
240
- declare const _default$4: typeof __VLS_export$1;
241
- declare const __VLS_export$1: __VLS_WithSlots$1<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RowProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RowProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
253
+ declare const _default$5: typeof __VLS_export$2;
254
+ declare const __VLS_export$2: __VLS_WithSlots$2<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<RowProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<RowProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
242
255
  default?: (props: {}) => any;
243
256
  }>;
244
- type __VLS_WithSlots$1<T, S> = T & {
257
+ type __VLS_WithSlots$2<T, S> = T & {
245
258
  new (): {
246
259
  $slots: S;
247
260
  };
@@ -284,16 +297,59 @@ type Cols = "auto" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10"
284
297
  *
285
298
  * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Column Guide}
286
299
  */
287
- declare const _default$1: typeof __VLS_export;
288
- declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ColumnProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ColumnProps> & Readonly<{}>, {
300
+ declare const _default$1: typeof __VLS_export$1;
301
+ declare const __VLS_export$1: __VLS_WithSlots$1<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ColumnProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ColumnProps> & Readonly<{}>, {
289
302
  cols: "12" | "auto" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11";
290
303
  }, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
291
304
  default?: (props: {}) => any;
292
305
  }>;
306
+ type __VLS_WithSlots$1<T, S> = T & {
307
+ new (): {
308
+ $slots: S;
309
+ };
310
+ };
311
+ //#endregion
312
+ //#region src/components/frm/types.d.ts
313
+ /**
314
+ * Props exposed by the {@link Frm} component.
315
+ */
316
+ type FrmProps = {
317
+ /**
318
+ * Id to set on `form` native element.
319
+ */
320
+ id?: string;
321
+ /**
322
+ * Component id to use on automated tests.
323
+ */
324
+ dataTestid?: string;
325
+ };
326
+ //#endregion
327
+ //#region src/components/frm/frm.vue.d.ts
328
+ /**
329
+ * Form component to be used throughout the application.
330
+ *
331
+ * @example
332
+ * ```vue
333
+ * <frm @submit="onSubmit">
334
+ * <!-- uimed-field-components -->
335
+ * <!-- uimed-submit-btn-component -->
336
+ * </frm>
337
+ * ```
338
+ *
339
+ * @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/frm | Form Guide}
340
+ */
341
+ declare const _default$3: typeof __VLS_export;
342
+ declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<FrmProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
343
+ submit: (event: SubmitEvent) => any;
344
+ }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<FrmProps> & Readonly<{
345
+ onSubmit?: ((event: SubmitEvent) => any) | undefined;
346
+ }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
347
+ default?: (props: {}) => any;
348
+ }>;
293
349
  type __VLS_WithSlots<T, S> = T & {
294
350
  new (): {
295
351
  $slots: S;
296
352
  };
297
353
  };
298
354
  //#endregion
299
- export { _default as Btn, _default$1 as Column, _default$2 as Container, _default$3 as Root, _default$4 as Row, _default$5 as TextField };
355
+ export { _default as Btn, _default$1 as Column, _default$2 as Container, _default$3 as Frm, _default$4 as Root, _default$5 as Row, _default$6 as TextField };
@@ -1,5 +1,6 @@
1
- import { computed, createBlock, defineComponent, mergeModels, openBlock, renderSlot, toValue, unref, useModel, withCtx } from "vue";
2
- import { VApp, VBtn, VCol, VContainer, VRow, VTextField } from "vuetify/components";
1
+ import { computed, createBlock, createPropsRestProxy, defineComponent, mergeModels, openBlock, renderSlot, toValue, unref, useModel, withCtx, withModifiers } from "vue";
2
+ import { VApp, VBtn, VCol, VContainer, VForm, VRow, VTextField } from "vuetify/components";
3
+ import { isEmail, isEmpty, isPhone, isUrl } from "@nexdom/shared/utils";
3
4
  //#endregion
4
5
  //#region src/components/root/root.vue
5
6
  var root_default = /* @__PURE__ */ defineComponent({
@@ -20,7 +21,7 @@ var root_default = /* @__PURE__ */ defineComponent({
20
21
  }
21
22
  });
22
23
  //#endregion
23
- //#region src/components/btn/composables.ts
24
+ //#region src/composables/btn.ts
24
25
  const btnVariantToVuetifyVariant = {
25
26
  primary: "elevated",
26
27
  secondary: "flat",
@@ -46,6 +47,14 @@ function useBtnColor(color) {
46
47
  return colorValue ? btnColorToVuetifyColor[colorValue] : btnColorToVuetifyColor.primary;
47
48
  });
48
49
  }
50
+ function useBtnType(type) {
51
+ return computed(() => {
52
+ return toValue(type) ?? "button";
53
+ });
54
+ }
55
+ function useBtnForm(form) {
56
+ return computed(() => toValue(form));
57
+ }
49
58
  //#endregion
50
59
  //#region src/components/btn/btn.vue
51
60
  var btn_default = /* @__PURE__ */ defineComponent({
@@ -56,6 +65,10 @@ var btn_default = /* @__PURE__ */ defineComponent({
56
65
  type: String,
57
66
  required: false
58
67
  },
68
+ type: {
69
+ type: String,
70
+ required: false
71
+ },
59
72
  color: {
60
73
  type: String,
61
74
  required: false
@@ -68,6 +81,10 @@ var btn_default = /* @__PURE__ */ defineComponent({
68
81
  type: Boolean,
69
82
  required: false
70
83
  },
84
+ form: {
85
+ type: String,
86
+ required: false
87
+ },
71
88
  dataTestid: {
72
89
  type: String,
73
90
  required: false
@@ -77,34 +94,63 @@ var btn_default = /* @__PURE__ */ defineComponent({
77
94
  setup(__props, { emit: __emit }) {
78
95
  const props = __props;
79
96
  const emit = __emit;
80
- const vuetifyVariant = useBtnVariant(() => props.variant);
81
- const vuetifyColor = useBtnColor(() => props.color);
97
+ const variant = useBtnVariant(() => props.variant);
98
+ const color = useBtnColor(() => props.color);
99
+ const type = useBtnType(() => props.type);
100
+ const form = useBtnForm(() => props.form);
82
101
  function onClick(event) {
83
102
  emit("click", event);
84
103
  }
85
104
  return (_ctx, _cache) => {
86
105
  return openBlock(), createBlock(unref(VBtn), {
87
- variant: unref(vuetifyVariant),
88
- color: unref(vuetifyColor),
89
106
  disabled: props.disabled,
90
107
  loading: props.loading,
91
108
  "data-testid": props.dataTestid,
109
+ variant: unref(variant),
110
+ color: unref(color),
111
+ type: unref(type),
112
+ form: unref(form),
92
113
  onClick
93
114
  }, {
94
115
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
95
116
  _: 3
96
117
  }, 8, [
97
- "variant",
98
- "color",
99
118
  "disabled",
100
119
  "loading",
101
- "data-testid"
120
+ "data-testid",
121
+ "variant",
122
+ "color",
123
+ "type",
124
+ "form"
102
125
  ]);
103
126
  };
104
127
  }
105
128
  });
106
129
  //#endregion
107
- //#region src/components/text-field/composables.ts
130
+ //#region src/composables/inputs/rules.ts
131
+ function required(value) {
132
+ return !isEmpty(value) || "Campo obrigatório";
133
+ }
134
+ function phone(value) {
135
+ return isEmpty(value) || isPhone(value) || "Número inválido";
136
+ }
137
+ function email(value) {
138
+ return isEmpty(value) || isEmail(value) || "E-mail inválido";
139
+ }
140
+ function url(value) {
141
+ return isEmpty(value) || isUrl(value) || "URL inválida";
142
+ }
143
+ //#endregion
144
+ //#region src/composables/inputs/use-rules.ts
145
+ function useRules(options) {
146
+ return computed(() => {
147
+ const rules = [];
148
+ if (options.required) rules.push(required);
149
+ return rules;
150
+ });
151
+ }
152
+ //#endregion
153
+ //#region src/composables/inputs/text-field.ts
108
154
  const textFieldVariantToVuetifyVariant = {
109
155
  primary: "underlined",
110
156
  secondary: "outlined"
@@ -117,6 +163,11 @@ const textFieldTypeToVuetifyType = {
117
163
  password: "password",
118
164
  search: "text"
119
165
  };
166
+ const textFieldTypeToVuetifyRule = {
167
+ phone,
168
+ email,
169
+ url
170
+ };
120
171
  function useTextFieldVariant(variant) {
121
172
  return computed(() => {
122
173
  const variantValue = toValue(variant);
@@ -129,8 +180,20 @@ function useTextFieldType(type) {
129
180
  return typeValue ? textFieldTypeToVuetifyType[typeValue] : textFieldTypeToVuetifyType.text;
130
181
  });
131
182
  }
183
+ function useTextFieldRules(props) {
184
+ const defaultRules = useRules(props);
185
+ return computed(() => {
186
+ const rules = [...defaultRules.value];
187
+ const typeRule = associatedRuleType(props.type) ? textFieldTypeToVuetifyRule[props.type] : void 0;
188
+ if (typeRule) rules.push(typeRule);
189
+ return rules;
190
+ });
191
+ }
192
+ function associatedRuleType(type) {
193
+ return type in textFieldTypeToVuetifyRule;
194
+ }
132
195
  //#endregion
133
- //#region src/components/text-field/text-field.vue
196
+ //#region src/components/inputs/text-field/text-field.vue
134
197
  var text_field_default = /* @__PURE__ */ defineComponent({
135
198
  inheritAttrs: false,
136
199
  __name: "text-field",
@@ -154,12 +217,16 @@ var text_field_default = /* @__PURE__ */ defineComponent({
154
217
  clearable: {
155
218
  type: Boolean,
156
219
  required: false,
157
- default: void 0
220
+ default: () => void 0
158
221
  },
159
222
  readonly: {
160
223
  type: Boolean,
161
224
  required: false
162
225
  },
226
+ required: {
227
+ type: Boolean,
228
+ required: false
229
+ },
163
230
  label: {
164
231
  type: String,
165
232
  required: false
@@ -186,16 +253,18 @@ var text_field_default = /* @__PURE__ */ defineComponent({
186
253
  emits: ["update:modelValue"],
187
254
  setup(__props) {
188
255
  const modelValue = useModel(__props, "modelValue");
189
- const props = __props;
256
+ const props = createPropsRestProxy(__props, ["clearable"]);
190
257
  const vuetifyVariant = useTextFieldVariant(() => props.variant);
191
258
  const vuetifyType = useTextFieldType(() => props.type);
192
- const computedClearable = computed(() => props.clearable ?? props.type === "search");
259
+ const rules = useTextFieldRules(props);
260
+ const computedClearable = computed(() => __props.clearable ?? props.type === "search");
193
261
  return (_ctx, _cache) => {
194
262
  return openBlock(), createBlock(unref(VTextField), {
195
263
  modelValue: modelValue.value,
196
264
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
197
265
  variant: unref(vuetifyVariant),
198
266
  type: unref(vuetifyType),
267
+ rules: unref(rules),
199
268
  "data-testid": props.dataTestid,
200
269
  disabled: props.disabled,
201
270
  loading: props.loading,
@@ -208,6 +277,7 @@ var text_field_default = /* @__PURE__ */ defineComponent({
208
277
  "modelValue",
209
278
  "variant",
210
279
  "type",
280
+ "rules",
211
281
  "data-testid",
212
282
  "disabled",
213
283
  "loading",
@@ -292,4 +362,39 @@ var column_default = /* @__PURE__ */ defineComponent({
292
362
  }
293
363
  });
294
364
  //#endregion
295
- export { btn_default as Btn, column_default as Column, container_default as Container, root_default as Root, row_default as Row, text_field_default as TextField };
365
+ //#region src/components/frm/frm.vue
366
+ var frm_default = /* @__PURE__ */ defineComponent({
367
+ inheritAttrs: false,
368
+ __name: "frm",
369
+ props: {
370
+ id: {
371
+ type: String,
372
+ required: false
373
+ },
374
+ dataTestid: {
375
+ type: String,
376
+ required: false
377
+ }
378
+ },
379
+ emits: ["submit"],
380
+ setup(__props, { emit: __emit }) {
381
+ const props = __props;
382
+ const emit = __emit;
383
+ async function onSubmit(event) {
384
+ const { valid } = await event;
385
+ if (valid) emit("submit", event);
386
+ }
387
+ return (_ctx, _cache) => {
388
+ return openBlock(), createBlock(unref(VForm), {
389
+ id: props.id,
390
+ "data-testid": props.dataTestid,
391
+ onSubmit: withModifiers(onSubmit, ["prevent"])
392
+ }, {
393
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
394
+ _: 3
395
+ }, 8, ["id", "data-testid"]);
396
+ };
397
+ }
398
+ });
399
+ //#endregion
400
+ export { btn_default as Btn, column_default as Column, container_default as Container, frm_default as Frm, root_default as Root, row_default as Row, text_field_default as TextField };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexdom/uimed-vue",
3
- "version": "1.1.0-beta.3",
3
+ "version": "1.1.0",
4
4
  "description": "A ui framework for NEXDOM applications.",
5
5
  "keywords": [
6
6
  "lib",
@@ -54,6 +54,7 @@
54
54
  "@commitlint/config-conventional": "^21.2.0",
55
55
  "@fontsource/roboto": "^5.3.0",
56
56
  "@mdi/font": "^7.4.47",
57
+ "@nexdom/shared": "^2.1.1",
57
58
  "@playwright/test": "^1.62.1",
58
59
  "@stryker-mutator/core": "^10.0.0",
59
60
  "@stryker-mutator/vitest-runner": "^10.0.0",
@@ -66,12 +67,11 @@
66
67
  "conventional-changelog-conventionalcommits": "^9.3.1",
67
68
  "dependency-cruiser": "^18.1.1",
68
69
  "jsdom": "^30.0.1",
69
- "oxc-minify": "^0.143.0",
70
+ "oxc-minify": "^0.147.0",
70
71
  "postcss": "^8.5.25",
71
72
  "resize-observer-polyfill": "^1.5.1",
72
73
  "sass-embedded": "^1.103.1",
73
74
  "stryker-vue-ignorer": "github:davidlandais/stryker-vue-ignorer",
74
- "type-fest": "^5.8.0",
75
75
  "typescript": "^6.0.3",
76
76
  "vite-plugin-vuetify": "^2.1.3",
77
77
  "vite-plus": "^0.2.9",
@@ -84,6 +84,7 @@
84
84
  "peerDependencies": {
85
85
  "@fontsource/roboto": "^5.3.0",
86
86
  "@mdi/font": "^7.4.47",
87
+ "@nexdom/shared": "^2.1.1",
87
88
  "resize-observer-polyfill": "^1.5.1",
88
89
  "vite-plugin-vuetify": "^2.1.3",
89
90
  "vite-plus": "^0.2.7",