@nexdom/uimed-vue 1.3.0-beta.2 → 2.0.0-beta.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.
- package/AGENTS.md +2 -0
- package/dist/components.d.ts +193 -67
- package/dist/components.js +141 -20
- package/package.json +1 -2
package/AGENTS.md
CHANGED
|
@@ -105,6 +105,7 @@ CI (`.github/workflows/ci.yml`) runs, in order: commitlint on PR commits, `vp pa
|
|
|
105
105
|
## Code conventions
|
|
106
106
|
|
|
107
107
|
- All `src` code is written in English. `docs` content is written in Portuguese (aimed at Brazilian users), even though file/dir names stay in English.
|
|
108
|
+
- `docs` must not mention Vuetify
|
|
108
109
|
- Never write CSS, classes or any kind of styling. Always use component props.
|
|
109
110
|
- Path aliases: `@/*` → `src/*`, `@e2e/*` → `e2e/*`.
|
|
110
111
|
- Every public component follows this pattern to block access to internals and give it an editor-hover description:
|
|
@@ -127,6 +128,7 @@ CI (`.github/workflows/ci.yml`) runs, in order: commitlint on PR commits, `vp pa
|
|
|
127
128
|
|
|
128
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>/`.
|
|
129
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.
|
|
130
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.
|
|
131
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.
|
|
132
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,49 +156,51 @@ 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$4: typeof __VLS_export$
|
|
173
|
-
declare const __VLS_export$
|
|
174
|
+
declare const _default$4: typeof __VLS_export$8;
|
|
175
|
+
declare const __VLS_export$8: __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;
|
|
181
183
|
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
182
184
|
default?: (props: {}) => any;
|
|
183
185
|
}>;
|
|
184
|
-
type __VLS_WithSlots$
|
|
186
|
+
type __VLS_WithSlots$7<T, S> = T & {
|
|
185
187
|
new (): {
|
|
186
188
|
$slots: S;
|
|
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,28 +233,30 @@ 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$7;
|
|
252
|
+
declare const __VLS_export$7: __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;
|
|
254
258
|
}>;
|
|
255
|
-
type __VLS_WithSlots$
|
|
259
|
+
type __VLS_WithSlots$6<T, S> = T & {
|
|
256
260
|
new (): {
|
|
257
261
|
$slots: S;
|
|
258
262
|
};
|
|
@@ -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$8: typeof __VLS_export$6;
|
|
343
|
+
declare const __VLS_export$6: 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,18 +371,20 @@ 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$5;
|
|
384
|
+
declare const __VLS_export$5: __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
|
-
type __VLS_WithSlots$
|
|
387
|
+
type __VLS_WithSlots$5<T, S> = T & {
|
|
380
388
|
new (): {
|
|
381
389
|
$slots: S;
|
|
382
390
|
};
|
|
@@ -399,20 +407,22 @@ 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$5: typeof __VLS_export$
|
|
412
|
-
declare const __VLS_export$
|
|
421
|
+
declare const _default$5: typeof __VLS_export$4;
|
|
422
|
+
declare const __VLS_export$4: __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
|
-
type __VLS_WithSlots$
|
|
425
|
+
type __VLS_WithSlots$4<T, S> = T & {
|
|
416
426
|
new (): {
|
|
417
427
|
$slots: S;
|
|
418
428
|
};
|
|
@@ -444,34 +454,36 @@ 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$3;
|
|
471
|
+
declare const __VLS_export$3: __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;
|
|
463
475
|
}>;
|
|
464
|
-
type __VLS_WithSlots$
|
|
476
|
+
type __VLS_WithSlots$3<T, S> = T & {
|
|
465
477
|
new (): {
|
|
466
478
|
$slots: S;
|
|
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,32 +494,146 @@ 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$3: typeof __VLS_export;
|
|
500
|
-
declare const __VLS_export: __VLS_WithSlots<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<
|
|
513
|
+
declare const _default$3: typeof __VLS_export$2;
|
|
514
|
+
declare const __VLS_export$2: __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;
|
|
506
520
|
}>;
|
|
521
|
+
type __VLS_WithSlots$2<T, S> = T & {
|
|
522
|
+
new (): {
|
|
523
|
+
$slots: S;
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/components/sections/section-content/section-content.vue.d.ts
|
|
528
|
+
/**
|
|
529
|
+
* Proxy component for Vuetify's `v-card-text`, used to structure content
|
|
530
|
+
* displayed inside a {@link Section}.
|
|
531
|
+
*
|
|
532
|
+
* @example
|
|
533
|
+
* ```vue
|
|
534
|
+
* <template>
|
|
535
|
+
* <u-section title="Title">
|
|
536
|
+
* <u-section-content>Content</u-section-content>
|
|
537
|
+
* </u-section>
|
|
538
|
+
* </template>
|
|
539
|
+
* ```
|
|
540
|
+
*
|
|
541
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
|
|
542
|
+
*/
|
|
543
|
+
declare const _default$7: typeof __VLS_export$1;
|
|
544
|
+
declare const __VLS_export$1: __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>, {
|
|
545
|
+
default?: (props: {}) => any;
|
|
546
|
+
}>;
|
|
547
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
548
|
+
new (): {
|
|
549
|
+
$slots: S;
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region src/components/sections/section/types.d.ts
|
|
554
|
+
type SectionVariant = "primary" | "secondary";
|
|
555
|
+
/**
|
|
556
|
+
* Props exposed by the {@link Section} component.
|
|
557
|
+
*/
|
|
558
|
+
type SectionProps = {
|
|
559
|
+
/**
|
|
560
|
+
* Applies a distinct style variation to the section.
|
|
561
|
+
* One of `primary` or `secondary`.
|
|
562
|
+
* @default "primary"
|
|
563
|
+
*/
|
|
564
|
+
variant?: SectionVariant;
|
|
565
|
+
/**
|
|
566
|
+
* Title displayed at the top of the section.
|
|
567
|
+
*/
|
|
568
|
+
title?: string;
|
|
569
|
+
/**
|
|
570
|
+
* Subtitle displayed below the title.
|
|
571
|
+
*/
|
|
572
|
+
subtitle?: string;
|
|
573
|
+
/**
|
|
574
|
+
* List of actions displayed at the bottom of the section, inside
|
|
575
|
+
* `v-card-actions`. When undefined or empty, no actions area is rendered.
|
|
576
|
+
*/
|
|
577
|
+
actions?: SectionAction[];
|
|
578
|
+
/**
|
|
579
|
+
* Makes the section occupy 100% of its parent's width.
|
|
580
|
+
* @default false
|
|
581
|
+
*/
|
|
582
|
+
fullWidth?: boolean;
|
|
583
|
+
/**
|
|
584
|
+
* Makes the section occupy 100% of its parent's height.
|
|
585
|
+
* @default false
|
|
586
|
+
*/
|
|
587
|
+
fullHeight?: boolean;
|
|
588
|
+
/**
|
|
589
|
+
* Shows a skeleton loader in place of the content while data is being
|
|
590
|
+
* loaded.
|
|
591
|
+
* @default false
|
|
592
|
+
*/
|
|
593
|
+
loading?: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* Component id to use on automated tests.
|
|
596
|
+
*/
|
|
597
|
+
dataTestid?: string;
|
|
598
|
+
};
|
|
599
|
+
/**
|
|
600
|
+
* A single action rendered inside {@link Section}'s actions area.
|
|
601
|
+
*/
|
|
602
|
+
interface SectionAction extends ButtonProps {
|
|
603
|
+
/**
|
|
604
|
+
* Text displayed on the action button.
|
|
605
|
+
*/
|
|
606
|
+
label: string;
|
|
607
|
+
/**
|
|
608
|
+
* Called when the action button is clicked.
|
|
609
|
+
*/
|
|
610
|
+
onClick?: (event: MouseEvent) => void;
|
|
611
|
+
}
|
|
612
|
+
//#endregion
|
|
613
|
+
//#region src/components/sections/section/section.vue.d.ts
|
|
614
|
+
/**
|
|
615
|
+
* Section component to group related content and actions, to be used
|
|
616
|
+
* throughout the application.
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* ```vue
|
|
620
|
+
* <template>
|
|
621
|
+
* <u-section title="Title" subtitle="Subtitle">
|
|
622
|
+
* Content
|
|
623
|
+
* </u-section>
|
|
624
|
+
* <template>
|
|
625
|
+
* ```
|
|
626
|
+
*
|
|
627
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
|
|
628
|
+
*/
|
|
629
|
+
declare const _default$6: typeof __VLS_export;
|
|
630
|
+
declare const __VLS_export: __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>, {
|
|
631
|
+
default?: (props: {}) => any;
|
|
632
|
+
}>;
|
|
507
633
|
type __VLS_WithSlots<T, S> = T & {
|
|
508
634
|
new (): {
|
|
509
635
|
$slots: S;
|
|
510
636
|
};
|
|
511
637
|
};
|
|
512
638
|
//#endregion
|
|
513
|
-
export { type AppBarProps as AppBarConfig, type AppBarUserProps as AppBarUserConfig, _default as
|
|
639
|
+
export { type AppBarProps as AppBarConfig, type AppBarUserProps as AppBarUserConfig, type NavigationMenuProps as NavigationMenuConfig, type SectionAction, _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 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, VCardText, VCol, VContainer, VDivider, VForm, VIcon, VIconBtn, VImg, VList, VListGroup, VListItem, VListItemAction, VListSubheader, VMain, VMenu, VNavigationDrawer, VRow, 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, 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) {
|
|
@@ -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,4 +784,125 @@ var frm_default = /* @__PURE__ */ defineComponent({
|
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
786
|
//#endregion
|
|
787
|
-
|
|
787
|
+
//#region src/components/sections/section-content/section-content.vue
|
|
788
|
+
var section_content_default = /* @__PURE__ */ defineComponent({
|
|
789
|
+
inheritAttrs: false,
|
|
790
|
+
__name: "section-content",
|
|
791
|
+
setup(__props) {
|
|
792
|
+
return (_ctx, _cache) => {
|
|
793
|
+
return openBlock(), createBlock(unref(VCardText), null, {
|
|
794
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
795
|
+
_: 3
|
|
796
|
+
});
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
});
|
|
800
|
+
//#endregion
|
|
801
|
+
//#region src/composables/section/section.ts
|
|
802
|
+
const sectionVariantToVuetifyVariant = {
|
|
803
|
+
primary: "elevated",
|
|
804
|
+
secondary: "outlined"
|
|
805
|
+
};
|
|
806
|
+
function useSectionVariant(variant) {
|
|
807
|
+
return computed(() => {
|
|
808
|
+
const variantValue = toValue(variant);
|
|
809
|
+
return variantValue ? sectionVariantToVuetifyVariant[variantValue] : sectionVariantToVuetifyVariant.primary;
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
//#endregion
|
|
813
|
+
//#region src/components/sections/section/section.vue
|
|
814
|
+
var section_default = /* @__PURE__ */ defineComponent({
|
|
815
|
+
inheritAttrs: false,
|
|
816
|
+
__name: "section",
|
|
817
|
+
props: {
|
|
818
|
+
variant: {
|
|
819
|
+
type: String,
|
|
820
|
+
required: false
|
|
821
|
+
},
|
|
822
|
+
title: {
|
|
823
|
+
type: String,
|
|
824
|
+
required: false
|
|
825
|
+
},
|
|
826
|
+
subtitle: {
|
|
827
|
+
type: String,
|
|
828
|
+
required: false
|
|
829
|
+
},
|
|
830
|
+
actions: {
|
|
831
|
+
type: Array,
|
|
832
|
+
required: false
|
|
833
|
+
},
|
|
834
|
+
fullWidth: {
|
|
835
|
+
type: Boolean,
|
|
836
|
+
required: false
|
|
837
|
+
},
|
|
838
|
+
fullHeight: {
|
|
839
|
+
type: Boolean,
|
|
840
|
+
required: false
|
|
841
|
+
},
|
|
842
|
+
loading: {
|
|
843
|
+
type: Boolean,
|
|
844
|
+
required: false
|
|
845
|
+
},
|
|
846
|
+
dataTestid: {
|
|
847
|
+
type: String,
|
|
848
|
+
required: false
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
setup(__props) {
|
|
852
|
+
const props = __props;
|
|
853
|
+
const variant = useSectionVariant(() => props.variant);
|
|
854
|
+
const title = computed(() => props.title || void 0);
|
|
855
|
+
const subtitle = computed(() => props.subtitle || void 0);
|
|
856
|
+
const width = computed(() => props.fullWidth ? "100%" : void 0);
|
|
857
|
+
const height = computed(() => props.fullHeight ? "100%" : void 0);
|
|
858
|
+
const showActions = computed(() => !!props.actions?.length);
|
|
859
|
+
const skeletonType = computed(() => showActions.value ? "image, actions" : "image");
|
|
860
|
+
return (_ctx, _cache) => {
|
|
861
|
+
return openBlock(), createBlock(unref(VSkeletonLoader), {
|
|
862
|
+
loading: props.loading,
|
|
863
|
+
type: skeletonType.value,
|
|
864
|
+
width: width.value,
|
|
865
|
+
height: height.value
|
|
866
|
+
}, {
|
|
867
|
+
default: withCtx(() => [createVNode(unref(VCard), {
|
|
868
|
+
title: title.value,
|
|
869
|
+
subtitle: subtitle.value,
|
|
870
|
+
variant: unref(variant),
|
|
871
|
+
width: width.value,
|
|
872
|
+
height: height.value,
|
|
873
|
+
"data-testid": props.dataTestid,
|
|
874
|
+
class: "d-flex flex-column"
|
|
875
|
+
}, {
|
|
876
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default"), showActions.value ? (openBlock(), createBlock(unref(VCardActions), {
|
|
877
|
+
key: 0,
|
|
878
|
+
class: "mt-auto"
|
|
879
|
+
}, {
|
|
880
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, ({ label, onClick, ...action }, index) => {
|
|
881
|
+
return openBlock(), createBlock(button_default, mergeProps({ key: index }, { ref_for: true }, action, { onClick }), {
|
|
882
|
+
default: withCtx(() => [createTextVNode(toDisplayString(label), 1)]),
|
|
883
|
+
_: 2
|
|
884
|
+
}, 1040, ["onClick"]);
|
|
885
|
+
}), 128))]),
|
|
886
|
+
_: 1
|
|
887
|
+
})) : createCommentVNode("v-if", true)]),
|
|
888
|
+
_: 3
|
|
889
|
+
}, 8, [
|
|
890
|
+
"title",
|
|
891
|
+
"subtitle",
|
|
892
|
+
"variant",
|
|
893
|
+
"width",
|
|
894
|
+
"height",
|
|
895
|
+
"data-testid"
|
|
896
|
+
])]),
|
|
897
|
+
_: 3
|
|
898
|
+
}, 8, [
|
|
899
|
+
"loading",
|
|
900
|
+
"type",
|
|
901
|
+
"width",
|
|
902
|
+
"height"
|
|
903
|
+
]);
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
//#endregion
|
|
908
|
+
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, text_field_default as UTextField };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexdom/uimed-vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "A ui framework for NEXDOM applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lib",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"test": "vp test",
|
|
44
44
|
"test:mutations": "stryker run",
|
|
45
45
|
"test:e2e": "vpx playwright test",
|
|
46
|
-
"check": "vp check && vpx vue-tsc",
|
|
47
46
|
"prepublishOnly": "vpr build",
|
|
48
47
|
"prepare": "vp config",
|
|
49
48
|
"depcruise": "depcruise src --output-type err-long",
|