@nexdom/uimed-vue 1.3.0-beta.3 → 2.0.0-beta.2
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/AGENTS.md +1 -0
- package/dist/components.d.ts +177 -91
- package/dist/components.js +118 -36
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -128,6 +128,7 @@ CI (`.github/workflows/ci.yml`) runs, in order: commitlint on PR commits, `vp pa
|
|
|
128
128
|
|
|
129
129
|
- Component layout: `src/components/<name>/<name>.vue`, `types.ts` for prop/option types, `__tests__/<name>.test.ts` for unit tests. Composables follow the same shape under `src/composables/<name>/`.
|
|
130
130
|
- Public components/composables/types are re-exported from `src/components/index.ts` and `src/composables/index.ts`.
|
|
131
|
+
- Every publicly exported component must use the `U` prefix on its export identifier (e.g., `UButton`, `UMain`), while internal file names and component names remain unprefixed.
|
|
131
132
|
- Use [JSDoc](https://jsdoc.app/about-getting-started) on every method/prop/type intended to be part of the public API — it's the primary documentation surface and supports markdown/code examples.
|
|
132
133
|
- Known workarounds (see CONTRIBUTING.md before touching related config): `stryker-vue-ignorer` patches a Stryker/Vue macro-hoisting issue; `vue-tsc` is used for type-check instead of Vite+'s built-in one due to an oxlint/Vue support gap. Both are meant to be removed once their upstream issues are fixed — don't build further on top of them without checking if they're still needed.
|
|
133
134
|
|
package/dist/components.d.ts
CHANGED
|
@@ -133,11 +133,11 @@ interface NavigationMenuItem {
|
|
|
133
133
|
action?: () => void;
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
|
-
//#region src/components/
|
|
136
|
+
//#region src/components/main/types.d.ts
|
|
137
137
|
/**
|
|
138
|
-
* Props exposed by the {@link
|
|
138
|
+
* Props exposed by the {@link Main} component.
|
|
139
139
|
*/
|
|
140
|
-
type
|
|
140
|
+
type MainProps = {
|
|
141
141
|
/**
|
|
142
142
|
* Component id to use on automated tests.
|
|
143
143
|
*/
|
|
@@ -156,25 +156,27 @@ type RootProps = {
|
|
|
156
156
|
navigationMenu?: NavigationMenuProps;
|
|
157
157
|
};
|
|
158
158
|
//#endregion
|
|
159
|
-
//#region src/components/
|
|
159
|
+
//#region src/components/main/main.vue.d.ts
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
161
|
+
* Main component to be placed at the top of the component tree.
|
|
162
162
|
*
|
|
163
163
|
* @example
|
|
164
164
|
* ```vue
|
|
165
|
-
* <
|
|
166
|
-
*
|
|
167
|
-
*
|
|
165
|
+
* <template>
|
|
166
|
+
* <u-main>
|
|
167
|
+
* <!-- uimed-components -->
|
|
168
|
+
* </u-main>
|
|
169
|
+
* </template>
|
|
168
170
|
* ```
|
|
169
171
|
*
|
|
170
|
-
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/
|
|
172
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/main | Main Guide}
|
|
171
173
|
*/
|
|
172
|
-
declare const _default$
|
|
173
|
-
declare const __VLS_export$
|
|
174
|
+
declare const _default$4: typeof __VLS_export$9;
|
|
175
|
+
declare const __VLS_export$9: __VLS_WithSlots$7<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<MainProps & {
|
|
174
176
|
notificationsOpen?: boolean;
|
|
175
177
|
}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
176
178
|
"update:notificationsOpen": (value: boolean) => any;
|
|
177
|
-
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<
|
|
179
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<MainProps & {
|
|
178
180
|
notificationsOpen?: boolean;
|
|
179
181
|
}> & Readonly<{
|
|
180
182
|
"onUpdate:notificationsOpen"?: ((value: boolean) => any) | undefined;
|
|
@@ -187,18 +189,18 @@ type __VLS_WithSlots$7<T, S> = T & {
|
|
|
187
189
|
};
|
|
188
190
|
};
|
|
189
191
|
//#endregion
|
|
190
|
-
//#region src/components/
|
|
191
|
-
type
|
|
192
|
+
//#region src/components/button/types.d.ts
|
|
193
|
+
type ButtonVariant = "primary" | "secondary" | "ghost";
|
|
192
194
|
/**
|
|
193
|
-
* Props exposed by the {@link
|
|
195
|
+
* Props exposed by the {@link Button} component.
|
|
194
196
|
*/
|
|
195
|
-
type
|
|
197
|
+
type ButtonProps = {
|
|
196
198
|
/**
|
|
197
199
|
* Applies a distinct style variation to the button.
|
|
198
200
|
* One of `primary`, `secondary`, or `ghost`.
|
|
199
201
|
* @default "primary"
|
|
200
202
|
*/
|
|
201
|
-
variant?:
|
|
203
|
+
variant?: ButtonVariant;
|
|
202
204
|
/**
|
|
203
205
|
* Applies a distinct behavior to the button.
|
|
204
206
|
* One of `button` or `submit`.
|
|
@@ -231,23 +233,25 @@ type BtnProps = {
|
|
|
231
233
|
dataTestid?: string;
|
|
232
234
|
};
|
|
233
235
|
//#endregion
|
|
234
|
-
//#region src/components/
|
|
236
|
+
//#region src/components/button/button.vue.d.ts
|
|
235
237
|
/**
|
|
236
238
|
* Button component to be used throughout the application.
|
|
237
239
|
*
|
|
238
240
|
* @example
|
|
239
241
|
* ```vue
|
|
240
|
-
* <
|
|
241
|
-
*
|
|
242
|
-
*
|
|
242
|
+
* <template>
|
|
243
|
+
* <u-button color="danger" @click="onClick">
|
|
244
|
+
* Confirmar
|
|
245
|
+
* </u-button>
|
|
246
|
+
* </template>
|
|
243
247
|
* ```
|
|
244
248
|
*
|
|
245
|
-
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/
|
|
249
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/button | Button Guide}
|
|
246
250
|
*/
|
|
247
|
-
declare const _default: typeof __VLS_export$
|
|
248
|
-
declare const __VLS_export$
|
|
251
|
+
declare const _default: typeof __VLS_export$8;
|
|
252
|
+
declare const __VLS_export$8: __VLS_WithSlots$6<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
|
|
249
253
|
click: (event: MouseEvent) => any;
|
|
250
|
-
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<
|
|
254
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
251
255
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
252
256
|
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
253
257
|
default?: (props: {}) => any;
|
|
@@ -328,13 +332,15 @@ type TextFieldProps = {
|
|
|
328
332
|
*
|
|
329
333
|
* @example
|
|
330
334
|
* ```vue
|
|
331
|
-
* <
|
|
335
|
+
* <template>
|
|
336
|
+
* <u-text-field label="E-mail" type="email" />
|
|
337
|
+
* <template>
|
|
332
338
|
* ```
|
|
333
339
|
*
|
|
334
340
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/text-field | TextField Guide}
|
|
335
341
|
*/
|
|
336
|
-
declare const _default$
|
|
337
|
-
declare const __VLS_export$
|
|
342
|
+
declare const _default$9: typeof __VLS_export$7;
|
|
343
|
+
declare const __VLS_export$7: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TextFieldProps & {
|
|
338
344
|
modelValue?: string;
|
|
339
345
|
}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
340
346
|
"update:modelValue": (value: string) => any;
|
|
@@ -365,15 +371,17 @@ type ContainerProps = {
|
|
|
365
371
|
*
|
|
366
372
|
* @example
|
|
367
373
|
* ```vue
|
|
368
|
-
* <
|
|
369
|
-
*
|
|
370
|
-
*
|
|
374
|
+
* <template>
|
|
375
|
+
* <u-container>
|
|
376
|
+
* <!-- uimed-components -->
|
|
377
|
+
* </u-container>
|
|
378
|
+
* <template>
|
|
371
379
|
* ```
|
|
372
380
|
*
|
|
373
381
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Container Guide}
|
|
374
382
|
*/
|
|
375
|
-
declare const _default$2: typeof __VLS_export$
|
|
376
|
-
declare const __VLS_export$
|
|
383
|
+
declare const _default$2: typeof __VLS_export$6;
|
|
384
|
+
declare const __VLS_export$6: __VLS_WithSlots$5<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>, {
|
|
377
385
|
default?: (props: {}) => any;
|
|
378
386
|
}>;
|
|
379
387
|
type __VLS_WithSlots$5<T, S> = T & {
|
|
@@ -399,17 +407,19 @@ type RowProps = {
|
|
|
399
407
|
*
|
|
400
408
|
* @example
|
|
401
409
|
* ```vue
|
|
402
|
-
* <
|
|
403
|
-
* <
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
410
|
+
* <template>
|
|
411
|
+
* <u-container>
|
|
412
|
+
* <u-row>
|
|
413
|
+
* <!-- uimed-column -->
|
|
414
|
+
* </u-row>
|
|
415
|
+
* </u-container>
|
|
416
|
+
* </template>
|
|
407
417
|
* ```
|
|
408
418
|
*
|
|
409
419
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Row Guide}
|
|
410
420
|
*/
|
|
411
|
-
declare const _default$
|
|
412
|
-
declare const __VLS_export$
|
|
421
|
+
declare const _default$5: typeof __VLS_export$5;
|
|
422
|
+
declare const __VLS_export$5: __VLS_WithSlots$4<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>, {
|
|
413
423
|
default?: (props: {}) => any;
|
|
414
424
|
}>;
|
|
415
425
|
type __VLS_WithSlots$4<T, S> = T & {
|
|
@@ -444,19 +454,21 @@ type Cols = "auto" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10"
|
|
|
444
454
|
*
|
|
445
455
|
* @example
|
|
446
456
|
* ```vue
|
|
447
|
-
* <
|
|
448
|
-
* <
|
|
449
|
-
* <
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
457
|
+
* <template>
|
|
458
|
+
* <u-container>
|
|
459
|
+
* <u-row>
|
|
460
|
+
* <u-column>
|
|
461
|
+
* <!-- uimed-components -->
|
|
462
|
+
* </u-column>
|
|
463
|
+
* </u-row>
|
|
464
|
+
* </u-container>
|
|
465
|
+
* </template>
|
|
454
466
|
* ```
|
|
455
467
|
*
|
|
456
468
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Column Guide}
|
|
457
469
|
*/
|
|
458
|
-
declare const _default$1: typeof __VLS_export$
|
|
459
|
-
declare const __VLS_export$
|
|
470
|
+
declare const _default$1: typeof __VLS_export$4;
|
|
471
|
+
declare const __VLS_export$4: __VLS_WithSlots$3<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<{}>, {
|
|
460
472
|
cols: "12" | "auto" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11";
|
|
461
473
|
}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
462
474
|
default?: (props: {}) => any;
|
|
@@ -467,11 +479,11 @@ type __VLS_WithSlots$3<T, S> = T & {
|
|
|
467
479
|
};
|
|
468
480
|
};
|
|
469
481
|
//#endregion
|
|
470
|
-
//#region src/components/
|
|
482
|
+
//#region src/components/form/types.d.ts
|
|
471
483
|
/**
|
|
472
|
-
* Props exposed by the {@link
|
|
484
|
+
* Props exposed by the {@link Form} component.
|
|
473
485
|
*/
|
|
474
|
-
type
|
|
486
|
+
type FormProps = {
|
|
475
487
|
/**
|
|
476
488
|
* Id to set on `form` native element.
|
|
477
489
|
*/
|
|
@@ -482,24 +494,26 @@ type FrmProps = {
|
|
|
482
494
|
dataTestid?: string;
|
|
483
495
|
};
|
|
484
496
|
//#endregion
|
|
485
|
-
//#region src/components/
|
|
497
|
+
//#region src/components/form/form.vue.d.ts
|
|
486
498
|
/**
|
|
487
499
|
* Form component to be used throughout the application.
|
|
488
500
|
*
|
|
489
501
|
* @example
|
|
490
502
|
* ```vue
|
|
491
|
-
* <
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
503
|
+
* <template>
|
|
504
|
+
* <u-form @submit="onSubmit">
|
|
505
|
+
* <!-- uimed-field-components -->
|
|
506
|
+
* <!-- uimed-submit-btn-component -->
|
|
507
|
+
* </u-form>
|
|
508
|
+
* </template>
|
|
495
509
|
* ```
|
|
496
510
|
*
|
|
497
|
-
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/
|
|
511
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/form | Form Guide}
|
|
498
512
|
*/
|
|
499
|
-
declare const _default$
|
|
500
|
-
declare const __VLS_export$
|
|
513
|
+
declare const _default$3: typeof __VLS_export$3;
|
|
514
|
+
declare const __VLS_export$3: __VLS_WithSlots$2<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<FormProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
|
|
501
515
|
submit: (event: SubmitEvent) => any;
|
|
502
|
-
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<
|
|
516
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<FormProps> & Readonly<{
|
|
503
517
|
onSubmit?: ((event: SubmitEvent) => any) | undefined;
|
|
504
518
|
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
505
519
|
default?: (props: {}) => any;
|
|
@@ -510,22 +524,24 @@ type __VLS_WithSlots$2<T, S> = T & {
|
|
|
510
524
|
};
|
|
511
525
|
};
|
|
512
526
|
//#endregion
|
|
513
|
-
//#region src/components/content/content.vue.d.ts
|
|
527
|
+
//#region src/components/sections/section-content/section-content.vue.d.ts
|
|
514
528
|
/**
|
|
515
529
|
* Proxy component for Vuetify's `v-card-text`, used to structure content
|
|
516
|
-
* displayed inside a {@link
|
|
530
|
+
* displayed inside a {@link Section}.
|
|
517
531
|
*
|
|
518
532
|
* @example
|
|
519
533
|
* ```vue
|
|
520
|
-
* <
|
|
521
|
-
* <
|
|
522
|
-
*
|
|
534
|
+
* <template>
|
|
535
|
+
* <u-section title="Title">
|
|
536
|
+
* <u-section-content>Content</u-section-content>
|
|
537
|
+
* </u-section>
|
|
538
|
+
* </template>
|
|
523
539
|
* ```
|
|
524
540
|
*
|
|
525
|
-
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/
|
|
541
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
|
|
526
542
|
*/
|
|
527
|
-
declare const _default$
|
|
528
|
-
declare const __VLS_export$
|
|
543
|
+
declare const _default$7: typeof __VLS_export$2;
|
|
544
|
+
declare const __VLS_export$2: __VLS_WithSlots$1<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<{}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>, {
|
|
529
545
|
default?: (props: {}) => any;
|
|
530
546
|
}>;
|
|
531
547
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
@@ -534,20 +550,20 @@ type __VLS_WithSlots$1<T, S> = T & {
|
|
|
534
550
|
};
|
|
535
551
|
};
|
|
536
552
|
//#endregion
|
|
537
|
-
//#region src/components/
|
|
538
|
-
type
|
|
553
|
+
//#region src/components/sections/section/types.d.ts
|
|
554
|
+
type SectionVariant = "primary" | "secondary";
|
|
539
555
|
/**
|
|
540
|
-
* Props exposed by the {@link
|
|
556
|
+
* Props exposed by the {@link Section} component.
|
|
541
557
|
*/
|
|
542
|
-
type
|
|
558
|
+
type SectionProps = {
|
|
543
559
|
/**
|
|
544
|
-
* Applies a distinct style variation to the
|
|
560
|
+
* Applies a distinct style variation to the section.
|
|
545
561
|
* One of `primary` or `secondary`.
|
|
546
562
|
* @default "primary"
|
|
547
563
|
*/
|
|
548
|
-
variant?:
|
|
564
|
+
variant?: SectionVariant;
|
|
549
565
|
/**
|
|
550
|
-
* Title displayed at the top of the
|
|
566
|
+
* Title displayed at the top of the section.
|
|
551
567
|
*/
|
|
552
568
|
title?: string;
|
|
553
569
|
/**
|
|
@@ -555,17 +571,17 @@ type ContentSetProps = {
|
|
|
555
571
|
*/
|
|
556
572
|
subtitle?: string;
|
|
557
573
|
/**
|
|
558
|
-
* List of actions displayed at the bottom of the
|
|
574
|
+
* List of actions displayed at the bottom of the section, inside
|
|
559
575
|
* `v-card-actions`. When undefined or empty, no actions area is rendered.
|
|
560
576
|
*/
|
|
561
|
-
actions?:
|
|
577
|
+
actions?: SectionAction[];
|
|
562
578
|
/**
|
|
563
|
-
* Makes the
|
|
579
|
+
* Makes the section occupy 100% of its parent's width.
|
|
564
580
|
* @default false
|
|
565
581
|
*/
|
|
566
582
|
fullWidth?: boolean;
|
|
567
583
|
/**
|
|
568
|
-
* Makes the
|
|
584
|
+
* Makes the section occupy 100% of its parent's height.
|
|
569
585
|
* @default false
|
|
570
586
|
*/
|
|
571
587
|
fullHeight?: boolean;
|
|
@@ -581,9 +597,9 @@ type ContentSetProps = {
|
|
|
581
597
|
dataTestid?: string;
|
|
582
598
|
};
|
|
583
599
|
/**
|
|
584
|
-
* A single action rendered inside {@link
|
|
600
|
+
* A single action rendered inside {@link Section}'s actions area.
|
|
585
601
|
*/
|
|
586
|
-
interface
|
|
602
|
+
interface SectionAction extends ButtonProps {
|
|
587
603
|
/**
|
|
588
604
|
* Text displayed on the action button.
|
|
589
605
|
*/
|
|
@@ -594,22 +610,24 @@ interface ContentSetAction extends BtnProps {
|
|
|
594
610
|
onClick?: (event: MouseEvent) => void;
|
|
595
611
|
}
|
|
596
612
|
//#endregion
|
|
597
|
-
//#region src/components/
|
|
613
|
+
//#region src/components/sections/section/section.vue.d.ts
|
|
598
614
|
/**
|
|
599
|
-
*
|
|
615
|
+
* Section component to group related content and actions, to be used
|
|
600
616
|
* throughout the application.
|
|
601
617
|
*
|
|
602
618
|
* @example
|
|
603
619
|
* ```vue
|
|
604
|
-
* <
|
|
605
|
-
*
|
|
606
|
-
*
|
|
620
|
+
* <template>
|
|
621
|
+
* <u-section title="Title" subtitle="Subtitle">
|
|
622
|
+
* Content
|
|
623
|
+
* </u-section>
|
|
624
|
+
* <template>
|
|
607
625
|
* ```
|
|
608
626
|
*
|
|
609
|
-
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/
|
|
627
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
|
|
610
628
|
*/
|
|
611
|
-
declare const _default$
|
|
612
|
-
declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<
|
|
629
|
+
declare const _default$6: typeof __VLS_export$1;
|
|
630
|
+
declare const __VLS_export$1: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<SectionProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<SectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
613
631
|
default?: (props: {}) => any;
|
|
614
632
|
}>;
|
|
615
633
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -618,4 +636,72 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
618
636
|
};
|
|
619
637
|
};
|
|
620
638
|
//#endregion
|
|
621
|
-
|
|
639
|
+
//#region src/components/table/types.d.ts
|
|
640
|
+
/**
|
|
641
|
+
* Props exposed by the {@link UTable} component.
|
|
642
|
+
*/
|
|
643
|
+
type TableProps = {
|
|
644
|
+
/**
|
|
645
|
+
* Optional column headers. When not provided or empty, no `<thead>` is
|
|
646
|
+
* rendered in horizontal mode. In vertical mode, headers (when non-empty)
|
|
647
|
+
* are used as labels for rows. When `vertical` is true and `headers` is
|
|
648
|
+
* `undefined`, the component falls back to horizontal mode (single table,
|
|
649
|
+
* plain rows). When `vertical` is true and `headers` is an empty array,
|
|
650
|
+
* vertical mode is still used, but rows are rendered without labels (a
|
|
651
|
+
* single `<td>` per row).
|
|
652
|
+
*/
|
|
653
|
+
headers?: string[];
|
|
654
|
+
/**
|
|
655
|
+
* Optional rows of data. Each entry is a list of string cell values.
|
|
656
|
+
* In horizontal mode, each item becomes one `<tr>` with cells as `<td>`.
|
|
657
|
+
* In vertical mode with headers, renders one `v-table` per item with one `<tr>`
|
|
658
|
+
* per header (th + td for that item's value). In vertical mode with an empty
|
|
659
|
+
* `headers` array, renders one `v-table` per item with one `<tr>` per cell
|
|
660
|
+
* value (a single `<td>`, no `<th>`). No padding or truncation applied —
|
|
661
|
+
* cells are rendered exactly as provided, even if rows have different lengths.
|
|
662
|
+
*/
|
|
663
|
+
items?: string[][];
|
|
664
|
+
/**
|
|
665
|
+
* Changes table layout when true. When enabled with a non-empty `headers`
|
|
666
|
+
* array, renders one `v-table` per item in `items`, with each table showing
|
|
667
|
+
* that item's values vertically (one row per header). When enabled with an
|
|
668
|
+
* empty `headers` array, still renders one `v-table` per item, but each row
|
|
669
|
+
* only has the item's value (no header label). When `headers` is
|
|
670
|
+
* `undefined`, falls back to horizontal layout (single table, plain rows)
|
|
671
|
+
* regardless of this prop.
|
|
672
|
+
* @default false
|
|
673
|
+
*/
|
|
674
|
+
vertical?: boolean;
|
|
675
|
+
/**
|
|
676
|
+
* Shows a skeleton loader in place of the table content while data is being
|
|
677
|
+
* loaded.
|
|
678
|
+
* @default false
|
|
679
|
+
*/
|
|
680
|
+
loading?: boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Component id to use on automated tests. In vertical mode with multiple
|
|
683
|
+
* items, each table gets a suffixed id: `${dataTestid}-${index}`. With a
|
|
684
|
+
* single table (non-vertical or vertical with one item), the unsuffixed id
|
|
685
|
+
* is used. When undefined, no data-testid attribute is set.
|
|
686
|
+
*/
|
|
687
|
+
dataTestid?: string;
|
|
688
|
+
};
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/components/table/table.vue.d.ts
|
|
691
|
+
/**
|
|
692
|
+
* Component to present data using tables. All content is data-driven via props
|
|
693
|
+
* — no slots. Supports both horizontal (default) and vertical layouts.
|
|
694
|
+
*
|
|
695
|
+
* @example
|
|
696
|
+
* ```vue
|
|
697
|
+
* <template>
|
|
698
|
+
* <u-table :headers="['Nome', 'Idade']" :items="[['Ana', '30'], ['Bruno', '25']]" />
|
|
699
|
+
* </template>
|
|
700
|
+
* ```
|
|
701
|
+
*
|
|
702
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/table | Table Guide}
|
|
703
|
+
*/
|
|
704
|
+
declare const _default$8: typeof __VLS_export;
|
|
705
|
+
declare const __VLS_export: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TableProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<TableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
706
|
+
//#endregion
|
|
707
|
+
export { type AppBarProps as AppBarConfig, type AppBarUserProps as AppBarUserConfig, type NavigationMenuProps as NavigationMenuConfig, type SectionAction, type TableProps, _default as UButton, _default$1 as UColumn, _default$2 as UContainer, _default$3 as UForm, _default$4 as UMain, _default$5 as URow, _default$6 as USection, _default$7 as USectionContent, _default$8 as UTable, _default$9 as UTextField };
|
package/dist/components.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as useVuetifyColor, t as messages } from "./use-toast-CACuYhK_.js";
|
|
2
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, isRef, mergeModels, mergeProps, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, useModel, withCtx, withModifiers } from "vue";
|
|
3
|
-
import { VApp, VAppBar, VAppBarNavIcon, VAppBarTitle, VAvatar, VBadge, VBtn, VCard, VCardActions, VCardText, VCol, VContainer, VDivider, VForm, VIcon, VIconBtn, VImg, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VMain, VMenu, VNavigationDrawer, VRow, VSkeletonLoader, VSnackbarQueue, VTextField } from "vuetify/components";
|
|
3
|
+
import { VApp, VAppBar, VAppBarNavIcon, VAppBarTitle, VAvatar, VBadge, VBtn, VCard, VCardActions, VCardText, VCol, VContainer, VDivider, VForm, VIcon, VIconBtn, VImg, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VMain, VMenu, VNavigationDrawer, VRow, VSkeletonLoader, VSnackbarQueue, VTable, VTextField } from "vuetify/components";
|
|
4
4
|
import { formatDateTime, isEmail, isEmpty, isPhone, isUrl, toPeriodInterval } from "@nexdom/shared/utils";
|
|
5
5
|
//#region src/composables/navigation/use-route-props.ts
|
|
6
6
|
function useRouteProps(route) {
|
|
@@ -15,7 +15,7 @@ function isExternalRoute(route) {
|
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/components/app-bar/app-bar.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
-
const _hoisted_1$
|
|
18
|
+
const _hoisted_1$2 = { class: "opacity-60" };
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/components/app-bar/app-bar.vue
|
|
21
21
|
var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
@@ -139,7 +139,7 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
139
139
|
}, createSlots({ _: 2 }, [notification.date ? {
|
|
140
140
|
name: "append",
|
|
141
141
|
fn: withCtx(() => [createVNode(unref(VListItemAction), { end: "" }, {
|
|
142
|
-
default: withCtx(() => [createElementVNode("small", _hoisted_1$
|
|
142
|
+
default: withCtx(() => [createElementVNode("small", _hoisted_1$2, toDisplayString(formatNotificationDate(notification.date)), 1)]),
|
|
143
143
|
_: 2
|
|
144
144
|
}, 1024)]),
|
|
145
145
|
key: "0"
|
|
@@ -405,7 +405,7 @@ var text_field_default = /* @__PURE__ */ defineComponent({
|
|
|
405
405
|
});
|
|
406
406
|
//#endregion
|
|
407
407
|
//#region src/components/navigation-menu/navigation-menu.vue?vue&type=script&setup=true&lang.ts
|
|
408
|
-
const _hoisted_1 = { class: "px-4 pt-2" };
|
|
408
|
+
const _hoisted_1$1 = { class: "px-4 pt-2" };
|
|
409
409
|
//#endregion
|
|
410
410
|
//#region src/components/navigation-menu/navigation-menu.vue
|
|
411
411
|
var navigation_menu_default = /* @__PURE__ */ defineComponent({
|
|
@@ -462,7 +462,7 @@ var navigation_menu_default = /* @__PURE__ */ defineComponent({
|
|
|
462
462
|
absolute: "",
|
|
463
463
|
temporary: ""
|
|
464
464
|
}, {
|
|
465
|
-
prepend: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(text_field_default, {
|
|
465
|
+
prepend: withCtx(() => [createElementVNode("div", _hoisted_1$1, [createVNode(text_field_default, {
|
|
466
466
|
modelValue: search.value,
|
|
467
467
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
|
|
468
468
|
type: "search",
|
|
@@ -543,10 +543,10 @@ var toast_default = /* @__PURE__ */ defineComponent({
|
|
|
543
543
|
}
|
|
544
544
|
});
|
|
545
545
|
//#endregion
|
|
546
|
-
//#region src/components/
|
|
547
|
-
var
|
|
546
|
+
//#region src/components/main/main.vue
|
|
547
|
+
var main_default = /* @__PURE__ */ defineComponent({
|
|
548
548
|
inheritAttrs: false,
|
|
549
|
-
__name: "
|
|
549
|
+
__name: "main",
|
|
550
550
|
props: /*@__PURE__*/ mergeModels({
|
|
551
551
|
dataTestid: {
|
|
552
552
|
type: String,
|
|
@@ -608,31 +608,31 @@ var root_default = /* @__PURE__ */ defineComponent({
|
|
|
608
608
|
}
|
|
609
609
|
});
|
|
610
610
|
//#endregion
|
|
611
|
-
//#region src/composables/
|
|
612
|
-
const
|
|
611
|
+
//#region src/composables/button/button.ts
|
|
612
|
+
const buttonVariantToVuetifyVariant = {
|
|
613
613
|
primary: "elevated",
|
|
614
614
|
secondary: "flat",
|
|
615
615
|
ghost: "outlined"
|
|
616
616
|
};
|
|
617
|
-
function
|
|
617
|
+
function useButtonVariant(variant) {
|
|
618
618
|
return computed(() => {
|
|
619
619
|
const variantValue = toValue(variant);
|
|
620
|
-
return variantValue ?
|
|
620
|
+
return variantValue ? buttonVariantToVuetifyVariant[variantValue] : buttonVariantToVuetifyVariant.primary;
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function useButtonType(type) {
|
|
624
624
|
return computed(() => {
|
|
625
625
|
return toValue(type) ?? "button";
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function useButtonForm(form) {
|
|
629
629
|
return computed(() => toValue(form));
|
|
630
630
|
}
|
|
631
631
|
//#endregion
|
|
632
|
-
//#region src/components/
|
|
633
|
-
var
|
|
632
|
+
//#region src/components/button/button.vue
|
|
633
|
+
var button_default = /* @__PURE__ */ defineComponent({
|
|
634
634
|
inheritAttrs: false,
|
|
635
|
-
__name: "
|
|
635
|
+
__name: "button",
|
|
636
636
|
props: {
|
|
637
637
|
variant: {
|
|
638
638
|
type: String,
|
|
@@ -667,10 +667,10 @@ var btn_default = /* @__PURE__ */ defineComponent({
|
|
|
667
667
|
setup(__props, { emit: __emit }) {
|
|
668
668
|
const props = __props;
|
|
669
669
|
const emit = __emit;
|
|
670
|
-
const variant =
|
|
670
|
+
const variant = useButtonVariant(() => props.variant);
|
|
671
671
|
const color = useVuetifyColor(() => props.color);
|
|
672
|
-
const type =
|
|
673
|
-
const form =
|
|
672
|
+
const type = useButtonType(() => props.type);
|
|
673
|
+
const form = useButtonForm(() => props.form);
|
|
674
674
|
function onClick(event) {
|
|
675
675
|
emit("click", event);
|
|
676
676
|
}
|
|
@@ -749,10 +749,10 @@ var column_default = /* @__PURE__ */ defineComponent({
|
|
|
749
749
|
}
|
|
750
750
|
});
|
|
751
751
|
//#endregion
|
|
752
|
-
//#region src/components/
|
|
753
|
-
var
|
|
752
|
+
//#region src/components/form/form.vue
|
|
753
|
+
var form_default = /* @__PURE__ */ defineComponent({
|
|
754
754
|
inheritAttrs: false,
|
|
755
|
-
__name: "
|
|
755
|
+
__name: "form",
|
|
756
756
|
props: {
|
|
757
757
|
id: {
|
|
758
758
|
type: String,
|
|
@@ -784,10 +784,10 @@ var frm_default = /* @__PURE__ */ defineComponent({
|
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
786
|
//#endregion
|
|
787
|
-
//#region src/components/content/content.vue
|
|
788
|
-
var
|
|
787
|
+
//#region src/components/sections/section-content/section-content.vue
|
|
788
|
+
var section_content_default = /* @__PURE__ */ defineComponent({
|
|
789
789
|
inheritAttrs: false,
|
|
790
|
-
__name: "content",
|
|
790
|
+
__name: "section-content",
|
|
791
791
|
setup(__props) {
|
|
792
792
|
return (_ctx, _cache) => {
|
|
793
793
|
return openBlock(), createBlock(unref(VCardText), null, {
|
|
@@ -798,22 +798,22 @@ var content_default = /* @__PURE__ */ defineComponent({
|
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
800
|
//#endregion
|
|
801
|
-
//#region src/composables/
|
|
802
|
-
const
|
|
801
|
+
//#region src/composables/section/section.ts
|
|
802
|
+
const sectionVariantToVuetifyVariant = {
|
|
803
803
|
primary: "elevated",
|
|
804
804
|
secondary: "outlined"
|
|
805
805
|
};
|
|
806
|
-
function
|
|
806
|
+
function useSectionVariant(variant) {
|
|
807
807
|
return computed(() => {
|
|
808
808
|
const variantValue = toValue(variant);
|
|
809
|
-
return variantValue ?
|
|
809
|
+
return variantValue ? sectionVariantToVuetifyVariant[variantValue] : sectionVariantToVuetifyVariant.primary;
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
812
|
//#endregion
|
|
813
|
-
//#region src/components/
|
|
814
|
-
var
|
|
813
|
+
//#region src/components/sections/section/section.vue
|
|
814
|
+
var section_default = /* @__PURE__ */ defineComponent({
|
|
815
815
|
inheritAttrs: false,
|
|
816
|
-
__name: "
|
|
816
|
+
__name: "section",
|
|
817
817
|
props: {
|
|
818
818
|
variant: {
|
|
819
819
|
type: String,
|
|
@@ -850,7 +850,7 @@ var content_set_default = /* @__PURE__ */ defineComponent({
|
|
|
850
850
|
},
|
|
851
851
|
setup(__props) {
|
|
852
852
|
const props = __props;
|
|
853
|
-
const variant =
|
|
853
|
+
const variant = useSectionVariant(() => props.variant);
|
|
854
854
|
const title = computed(() => props.title || void 0);
|
|
855
855
|
const subtitle = computed(() => props.subtitle || void 0);
|
|
856
856
|
const width = computed(() => props.fullWidth ? "100%" : void 0);
|
|
@@ -878,7 +878,7 @@ var content_set_default = /* @__PURE__ */ defineComponent({
|
|
|
878
878
|
class: "mt-auto"
|
|
879
879
|
}, {
|
|
880
880
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, ({ label, onClick, ...action }, index) => {
|
|
881
|
-
return openBlock(), createBlock(
|
|
881
|
+
return openBlock(), createBlock(button_default, mergeProps({ key: index }, { ref_for: true }, action, { onClick }), {
|
|
882
882
|
default: withCtx(() => [createTextVNode(toDisplayString(label), 1)]),
|
|
883
883
|
_: 2
|
|
884
884
|
}, 1040, ["onClick"]);
|
|
@@ -905,4 +905,86 @@ var content_set_default = /* @__PURE__ */ defineComponent({
|
|
|
905
905
|
}
|
|
906
906
|
});
|
|
907
907
|
//#endregion
|
|
908
|
-
|
|
908
|
+
//#region src/components/table/table.vue?vue&type=script&setup=true&lang.ts
|
|
909
|
+
const _hoisted_1 = { scope: "row" };
|
|
910
|
+
const _hoisted_2 = { key: 0 };
|
|
911
|
+
//#endregion
|
|
912
|
+
//#region src/components/table/table.vue
|
|
913
|
+
var table_default = /* @__PURE__ */ defineComponent({
|
|
914
|
+
inheritAttrs: false,
|
|
915
|
+
__name: "table",
|
|
916
|
+
props: {
|
|
917
|
+
headers: {
|
|
918
|
+
type: Array,
|
|
919
|
+
required: false
|
|
920
|
+
},
|
|
921
|
+
items: {
|
|
922
|
+
type: Array,
|
|
923
|
+
required: false
|
|
924
|
+
},
|
|
925
|
+
vertical: {
|
|
926
|
+
type: Boolean,
|
|
927
|
+
required: false
|
|
928
|
+
},
|
|
929
|
+
loading: {
|
|
930
|
+
type: Boolean,
|
|
931
|
+
required: false
|
|
932
|
+
},
|
|
933
|
+
dataTestid: {
|
|
934
|
+
type: String,
|
|
935
|
+
required: false
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
setup(__props) {
|
|
939
|
+
const props = __props;
|
|
940
|
+
const hasHeaders = computed(() => !!props.headers?.length);
|
|
941
|
+
const itemRows = computed(() => props.items ?? []);
|
|
942
|
+
const type = computed(() => {
|
|
943
|
+
if (hasHeaders.value && !props.vertical) return "table-thead, table-tbody";
|
|
944
|
+
return "table-tbody";
|
|
945
|
+
});
|
|
946
|
+
function getVerticalTableTestId(index) {
|
|
947
|
+
if (!props.dataTestid) return void 0;
|
|
948
|
+
if (itemRows.value.length === 1) return props.dataTestid;
|
|
949
|
+
return `${props.dataTestid}-${index}`;
|
|
950
|
+
}
|
|
951
|
+
return (_ctx, _cache) => {
|
|
952
|
+
return openBlock(), createBlock(unref(VSkeletonLoader), {
|
|
953
|
+
loading: props.loading,
|
|
954
|
+
type: type.value
|
|
955
|
+
}, {
|
|
956
|
+
default: withCtx(() => [props.vertical ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(itemRows.value, (item, itemIndex) => {
|
|
957
|
+
return openBlock(), createBlock(unref(VTable), {
|
|
958
|
+
key: itemIndex,
|
|
959
|
+
"data-testid": getVerticalTableTestId(itemIndex)
|
|
960
|
+
}, {
|
|
961
|
+
default: withCtx(() => [createElementVNode("tbody", null, [hasHeaders.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.headers, (header, headerIndex) => {
|
|
962
|
+
return openBlock(), createElementBlock("tr", { key: headerIndex }, [createElementVNode("th", _hoisted_1, toDisplayString(header), 1), createElementVNode("td", null, toDisplayString(item[headerIndex]), 1)]);
|
|
963
|
+
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(item, (cell, cellIndex) => {
|
|
964
|
+
return openBlock(), createElementBlock("tr", { key: cellIndex }, [createElementVNode("td", null, toDisplayString(cell), 1)]);
|
|
965
|
+
}), 128))])]),
|
|
966
|
+
_: 2
|
|
967
|
+
}, 1032, ["data-testid"]);
|
|
968
|
+
}), 128)) : (openBlock(), createBlock(unref(VTable), {
|
|
969
|
+
key: 1,
|
|
970
|
+
"data-testid": props.dataTestid
|
|
971
|
+
}, {
|
|
972
|
+
default: withCtx(() => [hasHeaders.value && !props.vertical ? (openBlock(), createElementBlock("thead", _hoisted_2, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.headers, (header, index) => {
|
|
973
|
+
return openBlock(), createElementBlock("th", {
|
|
974
|
+
key: index,
|
|
975
|
+
scope: "col"
|
|
976
|
+
}, toDisplayString(header), 1);
|
|
977
|
+
}), 128))])])) : createCommentVNode("v-if", true), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(itemRows.value, (row, rowIndex) => {
|
|
978
|
+
return openBlock(), createElementBlock("tr", { key: rowIndex }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, cellIndex) => {
|
|
979
|
+
return openBlock(), createElementBlock("td", { key: cellIndex }, toDisplayString(cell), 1);
|
|
980
|
+
}), 128))]);
|
|
981
|
+
}), 128))])]),
|
|
982
|
+
_: 1
|
|
983
|
+
}, 8, ["data-testid"]))]),
|
|
984
|
+
_: 1
|
|
985
|
+
}, 8, ["loading", "type"]);
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
});
|
|
989
|
+
//#endregion
|
|
990
|
+
export { button_default as UButton, column_default as UColumn, container_default as UContainer, form_default as UForm, main_default as UMain, row_default as URow, section_default as USection, section_content_default as USectionContent, table_default as UTable, text_field_default as UTextField };
|