@nexdom/uimed-vue 2.0.0-beta.44 → 2.0.0-beta.46
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 +6 -4
- package/dist/components.d.ts +126 -14
- package/dist/components.js +163 -17
- package/dist/composables.js +1 -1
- package/dist/index.js +11 -2
- package/dist/{use-dialog-Ck2_ZW7T.js → use-dialog-Czq2P-Z9.js} +16 -2
- package/package.json +2 -1
package/AGENTS.md
CHANGED
|
@@ -153,7 +153,7 @@ Use an existing component (e.g. `button`) as the reference, and deliver all of t
|
|
|
153
153
|
2. The `U`-prefixed export in `src/components/index.ts`.
|
|
154
154
|
3. A usage guide at `docs/guide/components/<name>.md`, with `<demo>` examples (and a `<playground>` section when the component has configurable props), and an API reference at `docs/api/components/<name>.md` (props, events and slots tables). Both in Portuguese. In a demo's template inside a `.md` file, don't put an attribute with a template literal after one with an arrow function in the same tag: the Markdown type-check (`vue-tsc`) reads the `>` of `=>` as the end of the tag and fails with `TS1003`. Order the attributes so the template literal comes first.
|
|
155
155
|
4. Both pages registered in the sidebar at `docs/.vitepress/config.ts`.
|
|
156
|
-
5. `e2e/components/<name>.spec.ts` covering the guide's interactive examples and a "UI consistency" screenshot check (plus accessible snapshots where relevant). Commit the generated files under `__snapshots__`/`__screenshot__`.
|
|
156
|
+
5. `e2e/components/<name>.spec.ts` covering the guide's interactive examples, an "accessibility" check (see [Testing conventions](#testing-conventions)) and a "UI consistency" screenshot check (plus accessible snapshots where relevant). Commit the generated files under `__snapshots__`/`__screenshot__`.
|
|
157
157
|
6. The full CI sequence passing locally.
|
|
158
158
|
|
|
159
159
|
## Adding a new composable
|
|
@@ -163,7 +163,7 @@ Use an existing composable (e.g. `use-toast`) as the reference, and deliver in t
|
|
|
163
163
|
1. `src/composables/<group>/<name>.ts` and `__tests__/<name>.test.ts`, plus the types in the group's `types.ts`. If it relies on an internal component (as `useToast` relies on the internal `Toast` rendered by `UMain`), that component follows the component layout but isn't exported.
|
|
164
164
|
2. The export in `src/composables/index.ts`, and its assertion in `src/composables/__tests__/index.test.ts`.
|
|
165
165
|
3. A usage guide at `docs/guide/composables/<name>.md` and an API reference at `docs/api/composables/<name>.md`, both in Portuguese, registered in both sidebars at `docs/.vitepress/config.ts` and listed in `docs/api/index.md` and in the table of `docs/guide/index.md`. If it relies on `UMain` (like `useToast`), also mention it in `UMain`'s guide and API pages.
|
|
166
|
-
4. `e2e/composables/<name>.spec.ts` covering the guide's examples and a "UI consistency" screenshot check.
|
|
166
|
+
4. `e2e/composables/<name>.spec.ts` covering the guide's examples, an "accessibility" check (see [Testing conventions](#testing-conventions)) and a "UI consistency" screenshot check.
|
|
167
167
|
5. The full CI sequence passing locally.
|
|
168
168
|
|
|
169
169
|
## Code conventions
|
|
@@ -178,7 +178,7 @@ Use an existing composable (e.g. `use-toast`) as the reference, and deliver in t
|
|
|
178
178
|
- Reuse the shared internal composables for props that recur across components, so every component maps them to Vuetify the same way, instead of mapping them again:
|
|
179
179
|
- `fullWidth`/`fullHeight`: `useFullWidth`/`useFullHeight` (`src/composables/dimensions/dimensions.ts`), applying Vuetify's `w-100`/`h-100` classes even where the component has `width`/`height` props.
|
|
180
180
|
- `alignX`/`alignY`: `useAlignX`/`useAlignY` (`src/composables/alignment/alignment.ts`), with the `AlignX`/`AlignY` types from the group's `types.ts`.
|
|
181
|
-
- `color`: `useVuetifyColor` (`src/composables/colors/use-vuetify-color.ts`), with the `ColorVariant` type from the group's `types.ts`.
|
|
181
|
+
- `color`: `useVuetifyColor` (`src/composables/colors/use-vuetify-color.ts`), with the `ColorVariant` type from the group's `types.ts`. Where the color is the text's instead of a fill (e.g. `UButton`'s `ghost` variant), use `useVuetifyTextColor` (`use-vuetify-text-color.ts`) instead: the fills are too light to reach WCAG AA's contrast as text, so each one has a darker text shade in the theme.
|
|
182
182
|
|
|
183
183
|
A new prop that does the same as one of these takes its name and type. When a second component needs a mapping that only one component has, move it into a shared composable first.
|
|
184
184
|
|
|
@@ -205,7 +205,8 @@ Use an existing composable (e.g. `use-toast`) as the reference, and deliver in t
|
|
|
205
205
|
|
|
206
206
|
- Component layout: `src/components/<name>/<name>.vue`, `types.ts` for prop/option types, `__tests__/<name>.test.ts` for unit tests. Components that belong to a group live in the group's folder (e.g. the internal `src/components/dialogs/toast.vue`).
|
|
207
207
|
- Composables live in a group folder: `src/composables/<group>/<name>.ts`, with `types.ts` and `__tests__/` in the group folder (e.g. `src/composables/dialogs/use-toast.ts`). A composable (`use-*.ts`) must depend on `vue` or `vue-router`, directly or through other modules (enforced by dependency-cruiser's `composables-use-vue` rule).
|
|
208
|
-
- Library-wide configuration constants that aren't components or composables live in `src/consts/<name>.ts` (e.g. `src/consts/locale.ts`, the language set by `createUimed()` and `vueTestUtilsPluginUimed()`).
|
|
208
|
+
- Library-wide configuration constants that aren't components or composables live in `src/consts/<name>.ts` (e.g. `src/consts/locale.ts`, the language set by `createUimed()` and `vueTestUtilsPluginUimed()`), with their types in `src/consts/types.ts`.
|
|
209
|
+
- Components accept icons by name (the `Icon` type in `src/consts/types.ts`), mapped to icon font classes by the internal `icons` object in `src/consts/icons.ts`. To add an icon, add it to that map and to the list on the "Ícones" guide page (`docs/guide/icons.md`), and check that its class exists in the installed icon font: the unit test of `src/consts/icons.ts` checks every class, and the page's E2E spec fails when the page and the map list different icons.
|
|
209
210
|
- Pure helpers that don't use Vue live in `src/utils/<name>.ts`, with tests in `src/utils/__tests__/`. Generic helpers that any TypeScript project could use (e.g. `isDeepEqual`) belong in `@nexdom/shared` instead.
|
|
210
211
|
- Public components/composables are re-exported from `src/components/index.ts` and `src/composables/index.ts`. Prop types stay internal (`types.ts` is not re-exported); consumers derive them with `ComponentProps` (see [Usage](#usage)).
|
|
211
212
|
- 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.
|
|
@@ -219,6 +220,7 @@ Use an existing composable (e.g. `use-toast`) as the reference, and deliver in t
|
|
|
219
220
|
- With fake timers in jsdom, Vuetify transitions (e.g. of `VDialog`, `VMenu`) don't finish on their own. Emit the transition events on the Vuetify component (`wrapper.findComponent(VDialog).vm.$emit("afterLeave")`) or advance the timers with `await vi.runAllTimersAsync()`.
|
|
220
221
|
- Coverage threshold is 100%; mutation testing threshold is 100% (break at 100). Don't add code paths without covering tests. Mutants that don't compile are reported as compile errors and don't count toward the score.
|
|
221
222
|
- E2E tests (Playwright, `e2e/`) run against the built docs preview (`http://localhost:4173/uimed-vue/`). Snapshots/screenshots live under `__snapshots__`/`__screenshot__` next to each spec.
|
|
223
|
+
- Every E2E spec has an "accessibility" `describe` that calls `expectNoA11yViolations(page)` from `e2e/utils.ts` at least once. It runs axe against WCAG 2.2 AA and its best practices on the page's demos and overlays, in both of the docs' color schemes (the demos keep the library's light theme on a background of their own in dark mode), and fails on any violation. Check each state that renders something new, too: open overlays (menus, dialogs, toasts) and every color of a variant whose text takes the color (as `button.spec.ts` does for `ghost`). Contrast is the most common failure: the theme's colors and text shades must keep 4.5:1, which `src/__tests__/index.test.ts` checks. Don't make a check pass by disabling rules or excluding elements: fix the cause, or stop and ask. The helper only disables the landmark rules that fail because of the docs' layout, with a comment saying why.
|
|
222
224
|
- Before keeping a new screenshot as a baseline, open it and check it against how plain Vuetify renders the same component: overflowing content shows its scrollbar, buttons and cards keep their native paddings, nothing touches the edges or gets clipped. A screenshot that only "looks fine" isn't enough: name what you checked in your report.
|
|
223
225
|
- Generate and update screenshots only on Linux, as CI does: in the Dev Container, or in the Playwright Docker image of the version in `package.json` (`mcr.microsoft.com/playwright:v<version>-noble`). Screenshots taken on Windows or macOS render fonts differently and fail in CI.
|
|
224
226
|
- Update baselines with `--update-snapshots=changed`, scoped to the spec you changed. `--update-snapshots=all` also rewrites accessible snapshots (`.aria.yml`) that didn't need to change.
|
package/dist/components.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ButtonProps } from "./types-BbWo6RIy.js";
|
|
1
|
+
import { r as ColorVariant, t as ButtonProps } from "./types-BbWo6RIy.js";
|
|
2
2
|
import { RouteLocationRaw } from "vue-router";
|
|
3
3
|
//#region src/components/app-bar/types.d.ts
|
|
4
4
|
/**
|
|
@@ -93,6 +93,53 @@ interface Option {
|
|
|
93
93
|
action?: () => void;
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
|
+
//#region src/consts/icons.d.ts
|
|
97
|
+
/**
|
|
98
|
+
* Icon font class of each icon available to the components that accept one (e.g. `UIconButton`
|
|
99
|
+
* and the items of the navigation menu), by its name, in the order the "Ícones" guide page lists
|
|
100
|
+
* them. A name ending in `-alternative` is an alternative version of the same drawing (currently,
|
|
101
|
+
* outlined).
|
|
102
|
+
*
|
|
103
|
+
* To add an icon, add it here and to the list on the "Ícones" guide page (`docs/guide/icons.md`).
|
|
104
|
+
*/
|
|
105
|
+
declare const icons: {
|
|
106
|
+
home: string;
|
|
107
|
+
"home-alternative": string;
|
|
108
|
+
account: string;
|
|
109
|
+
"account-alternative": string;
|
|
110
|
+
"account-group": string;
|
|
111
|
+
"account-group-alternative": string;
|
|
112
|
+
calendar: string;
|
|
113
|
+
"calendar-alternative": string;
|
|
114
|
+
"clipboard-text": string;
|
|
115
|
+
"clipboard-text-alternative": string;
|
|
116
|
+
"file-document": string;
|
|
117
|
+
"file-document-alternative": string;
|
|
118
|
+
flask: string;
|
|
119
|
+
"flask-alternative": string;
|
|
120
|
+
folder: string;
|
|
121
|
+
"folder-alternative": string;
|
|
122
|
+
"chart-box": string;
|
|
123
|
+
"chart-box-alternative": string;
|
|
124
|
+
wallet: string;
|
|
125
|
+
"wallet-alternative": string;
|
|
126
|
+
cog: string;
|
|
127
|
+
"cog-alternative": string;
|
|
128
|
+
stethoscope: string;
|
|
129
|
+
pill: string;
|
|
130
|
+
hospital: string;
|
|
131
|
+
};
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/consts/types.d.ts
|
|
134
|
+
/**
|
|
135
|
+
* Name of an icon available to the components that accept one (e.g. `UIconButton` and the items
|
|
136
|
+
* of the navigation menu). The full list, with a preview of each icon, is on the "Ícones" guide
|
|
137
|
+
* page.
|
|
138
|
+
*
|
|
139
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/icons | Icons Guide}
|
|
140
|
+
*/
|
|
141
|
+
type Icon = keyof typeof icons;
|
|
142
|
+
//#endregion
|
|
96
143
|
//#region src/components/navigation-menu/types.d.ts
|
|
97
144
|
/**
|
|
98
145
|
* Props exposed by the {@link NavigationMenu} component.
|
|
@@ -114,6 +161,13 @@ type NavigationMenuParentItem = {
|
|
|
114
161
|
* Text to present for the group.
|
|
115
162
|
*/
|
|
116
163
|
description: string;
|
|
164
|
+
/**
|
|
165
|
+
* Icon shown before the group's description. One of the names listed on the "Ícones" guide
|
|
166
|
+
* page.
|
|
167
|
+
*
|
|
168
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/icons | Icons Guide}
|
|
169
|
+
*/
|
|
170
|
+
icon?: Icon;
|
|
117
171
|
/**
|
|
118
172
|
* Child {@link NavigationMenuItem} list.
|
|
119
173
|
*/
|
|
@@ -124,6 +178,13 @@ interface NavigationMenuItem {
|
|
|
124
178
|
* Text to present for the item.
|
|
125
179
|
*/
|
|
126
180
|
description: string;
|
|
181
|
+
/**
|
|
182
|
+
* Icon shown before the item's description. One of the names listed on the "Ícones" guide
|
|
183
|
+
* page.
|
|
184
|
+
*
|
|
185
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/icons | Icons Guide}
|
|
186
|
+
*/
|
|
187
|
+
icon?: Icon;
|
|
127
188
|
/**
|
|
128
189
|
* Route to navigate when item is clicked.
|
|
129
190
|
*/
|
|
@@ -208,8 +269,8 @@ type MainProps = {
|
|
|
208
269
|
*
|
|
209
270
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/main | Main Guide}
|
|
210
271
|
*/
|
|
211
|
-
declare const _default$
|
|
212
|
-
declare const __VLS_export$
|
|
272
|
+
declare const _default$14: typeof __VLS_export$20;
|
|
273
|
+
declare const __VLS_export$20: __VLS_WithSlots$11<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<MainProps & {
|
|
213
274
|
notificationsOpen?: boolean;
|
|
214
275
|
}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
215
276
|
"update:notificationsOpen": (value: boolean) => any;
|
|
@@ -241,8 +302,8 @@ type __VLS_WithSlots$11<T, S> = T & {
|
|
|
241
302
|
*
|
|
242
303
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/button | Button Guide}
|
|
243
304
|
*/
|
|
244
|
-
declare const _default$1: typeof __VLS_export$
|
|
245
|
-
declare const __VLS_export$
|
|
305
|
+
declare const _default$1: typeof __VLS_export$19;
|
|
306
|
+
declare const __VLS_export$19: __VLS_WithSlots$10<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
|
|
246
307
|
click: (event: MouseEvent) => any;
|
|
247
308
|
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
248
309
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
@@ -255,6 +316,57 @@ type __VLS_WithSlots$10<T, S> = T & {
|
|
|
255
316
|
};
|
|
256
317
|
};
|
|
257
318
|
//#endregion
|
|
319
|
+
//#region src/components/icon-button/types.d.ts
|
|
320
|
+
/**
|
|
321
|
+
* Props exposed by the {@link IconButton} component.
|
|
322
|
+
*/
|
|
323
|
+
type IconButtonProps = {
|
|
324
|
+
/**
|
|
325
|
+
* Icon drawn on the button. One of the names listed on the "Ícones" guide page. Assistive
|
|
326
|
+
* technologies ignore it and read `label` instead.
|
|
327
|
+
*
|
|
328
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/icons | Icons Guide}
|
|
329
|
+
*/
|
|
330
|
+
icon: Icon;
|
|
331
|
+
/**
|
|
332
|
+
* Accessible name of the button, read by assistive technologies instead of the icon. Describe
|
|
333
|
+
* the action the button performs (e.g. "Editar paciente"), not the icon's drawing (e.g.
|
|
334
|
+
* "Lápis").
|
|
335
|
+
*/
|
|
336
|
+
label: string;
|
|
337
|
+
/**
|
|
338
|
+
* Applies a color to the button.
|
|
339
|
+
* One of `primary`, `secondary`, `positive`, `informative`, `caution`, or `danger`.
|
|
340
|
+
* @default "primary"
|
|
341
|
+
*/
|
|
342
|
+
color?: ColorVariant;
|
|
343
|
+
/**
|
|
344
|
+
* Component id to use on automated tests.
|
|
345
|
+
*/
|
|
346
|
+
dataTestid?: string;
|
|
347
|
+
};
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region src/components/icon-button/icon-button.vue.d.ts
|
|
350
|
+
/**
|
|
351
|
+
* Button that shows only an icon, for actions whose icon is enough to identify them, such as
|
|
352
|
+
* editing a record of a list. Its `label` is the name assistive technologies read.
|
|
353
|
+
*
|
|
354
|
+
* @example
|
|
355
|
+
* ```vue
|
|
356
|
+
* <template>
|
|
357
|
+
* <u-icon-button icon="cog" label="Configurações" @click="onClick" />
|
|
358
|
+
* </template>
|
|
359
|
+
* ```
|
|
360
|
+
*
|
|
361
|
+
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/icon-button | IconButton Guide}
|
|
362
|
+
*/
|
|
363
|
+
declare const _default$11: typeof __VLS_export$18;
|
|
364
|
+
declare const __VLS_export$18: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<IconButtonProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {} & {
|
|
365
|
+
click: (event: MouseEvent) => any;
|
|
366
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<IconButtonProps> & Readonly<{
|
|
367
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
368
|
+
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
369
|
+
//#endregion
|
|
258
370
|
//#region src/components/inputs/text-field/types.d.ts
|
|
259
371
|
type TextFieldVariant = "primary" | "secondary";
|
|
260
372
|
type TextFieldType = "text" | "phone" | "email" | "url" | "password" | "search";
|
|
@@ -452,7 +564,7 @@ type __VLS_PrettifyLocal$2<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [
|
|
|
452
564
|
*
|
|
453
565
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/text-field | TextField Guide}
|
|
454
566
|
*/
|
|
455
|
-
declare const _default$
|
|
567
|
+
declare const _default$20: typeof __VLS_export$16;
|
|
456
568
|
declare const __VLS_export$16: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<TextFieldProps & {
|
|
457
569
|
modelValue?: string;
|
|
458
570
|
}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
@@ -780,7 +892,7 @@ type MaskFieldProps = {
|
|
|
780
892
|
*
|
|
781
893
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/mask-field | MaskField Guide}
|
|
782
894
|
*/
|
|
783
|
-
declare const _default$
|
|
895
|
+
declare const _default$15: typeof __VLS_export$13;
|
|
784
896
|
declare const __VLS_export$13: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<MaskFieldProps & {
|
|
785
897
|
modelValue?: string;
|
|
786
898
|
}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
@@ -926,7 +1038,7 @@ type RowProps = {
|
|
|
926
1038
|
*
|
|
927
1039
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/layout | Row Guide}
|
|
928
1040
|
*/
|
|
929
|
-
declare const _default$
|
|
1041
|
+
declare const _default$16: typeof __VLS_export$11;
|
|
930
1042
|
declare const __VLS_export$11: __VLS_WithSlots$8<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>, {
|
|
931
1043
|
default?: (props: {}) => any;
|
|
932
1044
|
}>;
|
|
@@ -1055,7 +1167,7 @@ type __VLS_WithSlots$6<T, S> = T & {
|
|
|
1055
1167
|
*
|
|
1056
1168
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
|
|
1057
1169
|
*/
|
|
1058
|
-
declare const _default$
|
|
1170
|
+
declare const _default$18: typeof __VLS_export$8;
|
|
1059
1171
|
declare const __VLS_export$8: __VLS_WithSlots$5<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>, {
|
|
1060
1172
|
default?: (props: {}) => any;
|
|
1061
1173
|
}>;
|
|
@@ -1160,7 +1272,7 @@ interface SectionAction extends ButtonProps {
|
|
|
1160
1272
|
*
|
|
1161
1273
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/section | Section Guide}
|
|
1162
1274
|
*/
|
|
1163
|
-
declare const _default$
|
|
1275
|
+
declare const _default$17: typeof __VLS_export$7;
|
|
1164
1276
|
declare const __VLS_export$7: __VLS_WithSlots$4<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>, {
|
|
1165
1277
|
default?: (props: {}) => any;
|
|
1166
1278
|
}>;
|
|
@@ -1235,7 +1347,7 @@ type TableProps = {
|
|
|
1235
1347
|
*
|
|
1236
1348
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/table | Table Guide}
|
|
1237
1349
|
*/
|
|
1238
|
-
declare const _default$
|
|
1350
|
+
declare const _default$19: typeof __VLS_export$6;
|
|
1239
1351
|
declare const __VLS_export$6: 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>;
|
|
1240
1352
|
//#endregion
|
|
1241
1353
|
//#region src/components/details/types.d.ts
|
|
@@ -1354,7 +1466,7 @@ type ImgProps = {
|
|
|
1354
1466
|
*
|
|
1355
1467
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/img | Img Guide}
|
|
1356
1468
|
*/
|
|
1357
|
-
declare const _default$
|
|
1469
|
+
declare const _default$12: typeof __VLS_export$4;
|
|
1358
1470
|
declare const __VLS_export$4: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ImgProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ImgProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
1359
1471
|
//#endregion
|
|
1360
1472
|
//#region src/components/link/types.d.ts
|
|
@@ -1389,7 +1501,7 @@ type LinkProps = {
|
|
|
1389
1501
|
*
|
|
1390
1502
|
* @see {@link https://nexdom-healthtech.github.io/uimed-vue/guide/components/link | Link Guide}
|
|
1391
1503
|
*/
|
|
1392
|
-
declare const _default$
|
|
1504
|
+
declare const _default$13: typeof __VLS_export$3;
|
|
1393
1505
|
declare const __VLS_export$3: __VLS_WithSlots$2<import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<LinkProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<LinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>, {
|
|
1394
1506
|
default?: (props: {}) => any;
|
|
1395
1507
|
}>;
|
|
@@ -1666,4 +1778,4 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
1666
1778
|
};
|
|
1667
1779
|
};
|
|
1668
1780
|
//#endregion
|
|
1669
|
-
export { _default as UAutocompleteField, _default$1 as UButton, _default$2 as UCheckbox, _default$3 as UColumn, _default$4 as UContainer, _default$5 as UDataSet, _default$6 as UDataSetItem, _default$7 as UDateTimeField, _default$8 as UDetails, _default$9 as UDialog, _default$10 as UForm, _default$11 as
|
|
1781
|
+
export { _default as UAutocompleteField, _default$1 as UButton, _default$2 as UCheckbox, _default$3 as UColumn, _default$4 as UContainer, _default$5 as UDataSet, _default$6 as UDataSetItem, _default$7 as UDateTimeField, _default$8 as UDetails, _default$9 as UDialog, _default$10 as UForm, _default$11 as UIconButton, _default$12 as UImg, _default$13 as ULink, _default$14 as UMain, _default$15 as UMaskField, _default$16 as URow, _default$17 as USection, _default$18 as USectionContent, _default$19 as UTable, _default$20 as UTextField };
|
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as messages, n as owners$1, r as requests, s as useVuetifyColor } from "./use-dialog-
|
|
1
|
+
import { a as messages, c as colorToVuetifyTextColor, n as owners$1, r as requests, s as useVuetifyColor } from "./use-dialog-Czq2P-Z9.js";
|
|
2
2
|
import { useLocale, useMask } from "vuetify";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, onMounted, onScopeDispose, onUnmounted, openBlock, provide, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useId, useModel, useSlots, useTemplateRef, watch, withCtx, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { pt } from "vuetify/locale";
|
|
@@ -14,6 +14,13 @@ function routeToProps(route) {
|
|
|
14
14
|
const location = toValue(route);
|
|
15
15
|
return isExternalRoute(location) ? { href: location } : { to: location };
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Maps a menu item's route to its list item's props. An item without a route only runs its action,
|
|
19
|
+
* so it's a button: Vuetify would make it a list item, which the menus' groups of links don't allow.
|
|
20
|
+
*/
|
|
21
|
+
function routeToListItemProps(route) {
|
|
22
|
+
return route ? routeToProps(route) : { role: "button" };
|
|
23
|
+
}
|
|
17
24
|
function isExternalRoute(route) {
|
|
18
25
|
return typeof route === "string" && route.startsWith("http");
|
|
19
26
|
}
|
|
@@ -186,7 +193,8 @@ var skeleton_loader_default = /* @__PURE__ */ defineComponent({
|
|
|
186
193
|
});
|
|
187
194
|
//#endregion
|
|
188
195
|
//#region src/components/app-bar/app-bar.vue?vue&type=script&setup=true&lang.ts
|
|
189
|
-
const _hoisted_1$3 = { class: "
|
|
196
|
+
const _hoisted_1$3 = { class: "text-high-emphasis" };
|
|
197
|
+
const _hoisted_2$1 = { class: "text-medium-emphasis" };
|
|
190
198
|
//#endregion
|
|
191
199
|
//#region src/components/app-bar/app-bar.vue
|
|
192
200
|
var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
@@ -313,11 +321,14 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
313
321
|
active: !notification.read,
|
|
314
322
|
title: notification.title,
|
|
315
323
|
subtitle: notification.subtitle,
|
|
316
|
-
"active-class": "text-primary"
|
|
317
|
-
}, createSlots({
|
|
324
|
+
"active-class": "text-primary-text"
|
|
325
|
+
}, createSlots({
|
|
326
|
+
subtitle: withCtx(({ subtitle }) => [createElementVNode("span", _hoisted_1$3, toDisplayString(subtitle), 1)]),
|
|
327
|
+
_: 2
|
|
328
|
+
}, [notification.when ? {
|
|
318
329
|
name: "append",
|
|
319
330
|
fn: withCtx(() => [createVNode(unref(VListItemAction), { end: "" }, {
|
|
320
|
-
default: withCtx(() => [createElementVNode("small",
|
|
331
|
+
default: withCtx(() => [createCommentVNode(" No prop sets the secondary text color, which follows the theme's contrast "), createElementVNode("small", _hoisted_2$1, toDisplayString(notification.when), 1)]),
|
|
321
332
|
_: 2
|
|
322
333
|
}, 1024)]),
|
|
323
334
|
key: "0"
|
|
@@ -354,15 +365,24 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
354
365
|
"data-testid": userMenuDataTestid.value
|
|
355
366
|
}, {
|
|
356
367
|
prepend: withCtx(() => [createVNode(unref(VAvatar), mergeProps(userAvatarProps.value, { color: "primary" }), null, 16)]),
|
|
357
|
-
default: withCtx(() => [createVNode(unref(VDivider)), createVNode(unref(VList), {
|
|
368
|
+
default: withCtx(() => [createVNode(unref(VDivider)), createVNode(unref(VList), {
|
|
369
|
+
nav: "",
|
|
370
|
+
role: "group"
|
|
371
|
+
}, {
|
|
358
372
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.user?.options, (option, index) => {
|
|
359
373
|
return openBlock(), createElementBlock(Fragment, { key: index }, [index > 0 ? (openBlock(), createBlock(unref(VDivider), {
|
|
360
374
|
key: 0,
|
|
361
375
|
class: "mt-1"
|
|
362
376
|
})) : createCommentVNode("v-if", true), isParentOption(option) ? (openBlock(), createBlock(unref(VListGroup), { key: 1 }, {
|
|
363
|
-
activator: withCtx(({ props }) => [createVNode(unref(VListItem), mergeProps({ ref_for: true }, props, {
|
|
377
|
+
activator: withCtx(({ props, isOpen }) => [createVNode(unref(VListItem), mergeProps({ ref_for: true }, props, {
|
|
378
|
+
title: option.description,
|
|
379
|
+
"aria-expanded": isOpen,
|
|
380
|
+
role: void 0,
|
|
381
|
+
tag: "button",
|
|
382
|
+
type: "button"
|
|
383
|
+
}), null, 16, ["title", "aria-expanded"])]),
|
|
364
384
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(option.items, (childOption, index) => {
|
|
365
|
-
return openBlock(), createBlock(unref(VListItem), mergeProps({ key: index }, { ref_for: true }, unref(
|
|
385
|
+
return openBlock(), createBlock(unref(VListItem), mergeProps({ key: index }, { ref_for: true }, unref(routeToListItemProps)(childOption.route), {
|
|
366
386
|
title: childOption.description,
|
|
367
387
|
onClick: childOption.action
|
|
368
388
|
}), null, 16, ["title", "onClick"]);
|
|
@@ -371,7 +391,7 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
371
391
|
}, 1024)) : (openBlock(), createBlock(unref(VListItem), mergeProps({
|
|
372
392
|
key: 2,
|
|
373
393
|
title: option.description
|
|
374
|
-
}, { ref_for: true }, unref(
|
|
394
|
+
}, { ref_for: true }, unref(routeToListItemProps)(option.route), { onClick: option.action }), null, 16, ["title", "onClick"]))], 64);
|
|
375
395
|
}), 128))]),
|
|
376
396
|
_: 1
|
|
377
397
|
})]),
|
|
@@ -423,6 +443,43 @@ var app_bar_default = /* @__PURE__ */ defineComponent({
|
|
|
423
443
|
}
|
|
424
444
|
});
|
|
425
445
|
//#endregion
|
|
446
|
+
//#region src/consts/icons.ts
|
|
447
|
+
/**
|
|
448
|
+
* Icon font class of each icon available to the components that accept one (e.g. `UIconButton`
|
|
449
|
+
* and the items of the navigation menu), by its name, in the order the "Ícones" guide page lists
|
|
450
|
+
* them. A name ending in `-alternative` is an alternative version of the same drawing (currently,
|
|
451
|
+
* outlined).
|
|
452
|
+
*
|
|
453
|
+
* To add an icon, add it here and to the list on the "Ícones" guide page (`docs/guide/icons.md`).
|
|
454
|
+
*/
|
|
455
|
+
const icons = {
|
|
456
|
+
home: "mdi-home",
|
|
457
|
+
"home-alternative": "mdi-home-outline",
|
|
458
|
+
account: "mdi-account",
|
|
459
|
+
"account-alternative": "mdi-account-outline",
|
|
460
|
+
"account-group": "mdi-account-group",
|
|
461
|
+
"account-group-alternative": "mdi-account-group-outline",
|
|
462
|
+
calendar: "mdi-calendar",
|
|
463
|
+
"calendar-alternative": "mdi-calendar-outline",
|
|
464
|
+
"clipboard-text": "mdi-clipboard-text",
|
|
465
|
+
"clipboard-text-alternative": "mdi-clipboard-text-outline",
|
|
466
|
+
"file-document": "mdi-file-document",
|
|
467
|
+
"file-document-alternative": "mdi-file-document-outline",
|
|
468
|
+
flask: "mdi-flask",
|
|
469
|
+
"flask-alternative": "mdi-flask-outline",
|
|
470
|
+
folder: "mdi-folder",
|
|
471
|
+
"folder-alternative": "mdi-folder-outline",
|
|
472
|
+
"chart-box": "mdi-chart-box",
|
|
473
|
+
"chart-box-alternative": "mdi-chart-box-outline",
|
|
474
|
+
wallet: "mdi-wallet",
|
|
475
|
+
"wallet-alternative": "mdi-wallet-outline",
|
|
476
|
+
cog: "mdi-cog",
|
|
477
|
+
"cog-alternative": "mdi-cog-outline",
|
|
478
|
+
stethoscope: "mdi-stethoscope",
|
|
479
|
+
pill: "mdi-pill",
|
|
480
|
+
hospital: "mdi-hospital-building"
|
|
481
|
+
};
|
|
482
|
+
//#endregion
|
|
426
483
|
//#region src/composables/inputs/rules.ts
|
|
427
484
|
function required(value) {
|
|
428
485
|
return !isEmpty(value) || "Campo obrigatório";
|
|
@@ -768,21 +825,45 @@ var navigation_menu_default = /* @__PURE__ */ defineComponent({
|
|
|
768
825
|
type: "list-item@6",
|
|
769
826
|
color: "primary"
|
|
770
827
|
}, {
|
|
771
|
-
default: withCtx(() => [
|
|
828
|
+
default: withCtx(() => [createCommentVNode(" Vuetify's `list` role only allows list items, but the items are links "), createVNode(unref(VList), {
|
|
829
|
+
nav: "",
|
|
830
|
+
role: "group"
|
|
831
|
+
}, {
|
|
772
832
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredItems.value, (item, index) => {
|
|
773
833
|
return openBlock(), createElementBlock(Fragment, { key: index }, [isParentItem(item) ? (openBlock(), createBlock(unref(VListGroup), { key: 0 }, {
|
|
774
|
-
activator: withCtx(({ props: activatorProps }) => [createVNode(unref(VListItem), mergeProps({ ref_for: true }, activatorProps, {
|
|
834
|
+
activator: withCtx(({ props: activatorProps, isOpen }) => [createVNode(unref(VListItem), mergeProps({ ref_for: true }, activatorProps, {
|
|
835
|
+
title: item.description,
|
|
836
|
+
"prepend-icon": item.icon && unref(icons)[item.icon],
|
|
837
|
+
"aria-expanded": isOpen,
|
|
838
|
+
role: void 0,
|
|
839
|
+
tag: "button",
|
|
840
|
+
type: "button"
|
|
841
|
+
}), null, 16, [
|
|
842
|
+
"title",
|
|
843
|
+
"prepend-icon",
|
|
844
|
+
"aria-expanded"
|
|
845
|
+
])]),
|
|
775
846
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (childItem, childIndex) => {
|
|
776
|
-
return openBlock(), createBlock(unref(VListItem), mergeProps({ key: childIndex }, { ref_for: true }, unref(
|
|
847
|
+
return openBlock(), createBlock(unref(VListItem), mergeProps({ key: childIndex }, { ref_for: true }, unref(routeToListItemProps)(childItem.route), {
|
|
777
848
|
title: childItem.description,
|
|
849
|
+
"prepend-icon": childItem.icon && unref(icons)[childItem.icon],
|
|
778
850
|
onClick: childItem.action
|
|
779
|
-
}), null, 16, [
|
|
851
|
+
}), null, 16, [
|
|
852
|
+
"title",
|
|
853
|
+
"prepend-icon",
|
|
854
|
+
"onClick"
|
|
855
|
+
]);
|
|
780
856
|
}), 128))]),
|
|
781
857
|
_: 2
|
|
782
858
|
}, 1024)) : (openBlock(), createBlock(unref(VListItem), mergeProps({
|
|
783
859
|
key: 1,
|
|
784
|
-
title: item.description
|
|
785
|
-
|
|
860
|
+
title: item.description,
|
|
861
|
+
"prepend-icon": item.icon && unref(icons)[item.icon]
|
|
862
|
+
}, { ref_for: true }, unref(routeToListItemProps)(item.route), { onClick: item.action }), null, 16, [
|
|
863
|
+
"title",
|
|
864
|
+
"prepend-icon",
|
|
865
|
+
"onClick"
|
|
866
|
+
]))], 64);
|
|
786
867
|
}), 128))]),
|
|
787
868
|
_: 1
|
|
788
869
|
})]),
|
|
@@ -912,6 +993,15 @@ var toast_default = /* @__PURE__ */ defineComponent({
|
|
|
912
993
|
}
|
|
913
994
|
});
|
|
914
995
|
//#endregion
|
|
996
|
+
//#region src/composables/colors/use-vuetify-text-color.ts
|
|
997
|
+
/**
|
|
998
|
+
* Maps a color to the theme color to use when it's the text color, e.g. in a ghost button, so it
|
|
999
|
+
* keeps WCAG AA's contrast on the surface and background.
|
|
1000
|
+
*/
|
|
1001
|
+
function useVuetifyTextColor(color) {
|
|
1002
|
+
return computed(() => colorToVuetifyTextColor[toValue(color) ?? "primary"]);
|
|
1003
|
+
}
|
|
1004
|
+
//#endregion
|
|
915
1005
|
//#region src/composables/button/button.ts
|
|
916
1006
|
const buttonVariantToVuetifyVariant = {
|
|
917
1007
|
primary: "elevated",
|
|
@@ -944,6 +1034,15 @@ function useButtonType(type, route, blocked) {
|
|
|
944
1034
|
});
|
|
945
1035
|
}
|
|
946
1036
|
/**
|
|
1037
|
+
* Maps the button's color to Vuetify's. A ghost button has no fill, so its color is the text's,
|
|
1038
|
+
* which takes the color's text shade to keep WCAG AA's contrast.
|
|
1039
|
+
*/
|
|
1040
|
+
function useButtonColor(color, variant) {
|
|
1041
|
+
const fillColor = useVuetifyColor(color);
|
|
1042
|
+
const textColor = useVuetifyTextColor(color);
|
|
1043
|
+
return computed(() => toValue(variant) === "ghost" ? textColor.value : fillColor.value);
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
947
1046
|
* The button's `form`, or `undefined` when it has a `route`, even while blocked, since `form`
|
|
948
1047
|
* doesn't apply to it.
|
|
949
1048
|
*/
|
|
@@ -998,7 +1097,7 @@ var button_default = /* @__PURE__ */ defineComponent({
|
|
|
998
1097
|
const props = __props;
|
|
999
1098
|
const emit = __emit;
|
|
1000
1099
|
const variant = useButtonVariant(() => props.variant);
|
|
1001
|
-
const color =
|
|
1100
|
+
const color = useButtonColor(() => props.color, () => props.variant);
|
|
1002
1101
|
const widthClass = useFullWidth(() => props.fullWidth);
|
|
1003
1102
|
const isDisabled = computed(() => props.disabled || props.loading);
|
|
1004
1103
|
const routeProps = useRouteProps(useButtonRoute(() => props.route, isDisabled));
|
|
@@ -1377,6 +1476,53 @@ var main_default = /* @__PURE__ */ defineComponent({
|
|
|
1377
1476
|
}
|
|
1378
1477
|
});
|
|
1379
1478
|
//#endregion
|
|
1479
|
+
//#region src/components/icon-button/icon-button.vue
|
|
1480
|
+
var icon_button_default = /* @__PURE__ */ defineComponent({
|
|
1481
|
+
inheritAttrs: false,
|
|
1482
|
+
__name: "icon-button",
|
|
1483
|
+
props: {
|
|
1484
|
+
icon: {
|
|
1485
|
+
type: null,
|
|
1486
|
+
required: true
|
|
1487
|
+
},
|
|
1488
|
+
label: {
|
|
1489
|
+
type: String,
|
|
1490
|
+
required: true
|
|
1491
|
+
},
|
|
1492
|
+
color: {
|
|
1493
|
+
type: String,
|
|
1494
|
+
required: false
|
|
1495
|
+
},
|
|
1496
|
+
dataTestid: {
|
|
1497
|
+
type: String,
|
|
1498
|
+
required: false
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
emits: ["click"],
|
|
1502
|
+
setup(__props, { emit: __emit }) {
|
|
1503
|
+
const props = __props;
|
|
1504
|
+
const emit = __emit;
|
|
1505
|
+
const color = useVuetifyColor(() => props.color);
|
|
1506
|
+
function onClick(event) {
|
|
1507
|
+
emit("click", event);
|
|
1508
|
+
}
|
|
1509
|
+
return (_ctx, _cache) => {
|
|
1510
|
+
return openBlock(), createBlock(unref(VIconBtn), {
|
|
1511
|
+
icon: unref(icons)[props.icon],
|
|
1512
|
+
"aria-label": props.label,
|
|
1513
|
+
color: unref(color),
|
|
1514
|
+
"data-testid": props.dataTestid,
|
|
1515
|
+
onClick
|
|
1516
|
+
}, null, 8, [
|
|
1517
|
+
"icon",
|
|
1518
|
+
"aria-label",
|
|
1519
|
+
"color",
|
|
1520
|
+
"data-testid"
|
|
1521
|
+
]);
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
//#endregion
|
|
1380
1526
|
//#region src/composables/inputs/autocomplete-field.ts
|
|
1381
1527
|
function createAutocompleteRequiredRule(options) {
|
|
1382
1528
|
return createRequiredRule(options.required, (value) => {
|
|
@@ -3032,4 +3178,4 @@ var data_set_item_default = /* @__PURE__ */ defineComponent({
|
|
|
3032
3178
|
}
|
|
3033
3179
|
});
|
|
3034
3180
|
//#endregion
|
|
3035
|
-
export { autocomplete_field_default as UAutocompleteField, button_default as UButton, checkbox_default as UCheckbox, column_default as UColumn, container_default as UContainer, data_set_default as UDataSet, data_set_item_default as UDataSetItem, date_time_field_default as UDateTimeField, details_default as UDetails, dialog_default as UDialog, form_default as UForm, img_default as UImg, link_default as ULink, main_default as UMain, mask_field_default as UMaskField, row_default as URow, section_default as USection, section_content_default as USectionContent, table_default as UTable, text_field_default as UTextField };
|
|
3181
|
+
export { autocomplete_field_default as UAutocompleteField, button_default as UButton, checkbox_default as UCheckbox, column_default as UColumn, container_default as UContainer, data_set_default as UDataSet, data_set_item_default as UDataSetItem, date_time_field_default as UDateTimeField, details_default as UDetails, dialog_default as UDialog, form_default as UForm, icon_button_default as UIconButton, img_default as UImg, link_default as ULink, main_default as UMain, mask_field_default as UMaskField, row_default as URow, section_default as USection, section_content_default as USectionContent, table_default as UTable, text_field_default as UTextField };
|
package/dist/composables.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useDialog, o as useToast, t as openDialog } from "./use-dialog-
|
|
1
|
+
import { i as useDialog, o as useToast, t as openDialog } from "./use-dialog-Czq2P-Z9.js";
|
|
2
2
|
import { computed, onActivated, onDeactivated, onMounted, onUnmounted, ref, toValue, watch } from "vue";
|
|
3
3
|
import { isDeepEqual } from "@nexdom/shared/utils";
|
|
4
4
|
import { onBeforeRouteLeave } from "vue-router";
|
package/dist/index.js
CHANGED
|
@@ -24,9 +24,18 @@ function createUimed() {
|
|
|
24
24
|
success: "#A9EFC5",
|
|
25
25
|
warning: "#FFE596",
|
|
26
26
|
error: "#D92D20",
|
|
27
|
-
info: "#9ACBE5"
|
|
27
|
+
info: "#9ACBE5",
|
|
28
|
+
"on-primary": "#000000",
|
|
29
|
+
"primary-text": "#007A4A",
|
|
30
|
+
"success-text": "#16783E",
|
|
31
|
+
"info-text": "#277096",
|
|
32
|
+
"warning-text": "#846300",
|
|
33
|
+
"error-text": "#C92A1E"
|
|
28
34
|
},
|
|
29
|
-
variables: {
|
|
35
|
+
variables: {
|
|
36
|
+
"border-color": "#D0D5DD",
|
|
37
|
+
"medium-emphasis-opacity": .7
|
|
38
|
+
}
|
|
30
39
|
} }
|
|
31
40
|
}
|
|
32
41
|
});
|
|
@@ -7,6 +7,19 @@ const colorToVuetifyColor = {
|
|
|
7
7
|
caution: "warning",
|
|
8
8
|
danger: "error"
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* The theme colors to use when a color is the text color, on the surface or background, instead
|
|
12
|
+
* of a fill. The fills are too light to reach WCAG AA's contrast as text, so each one has a darker
|
|
13
|
+
* shade, except `secondary`, which is almost white and gives way to the theme's text color.
|
|
14
|
+
*/
|
|
15
|
+
const colorToVuetifyTextColor = {
|
|
16
|
+
primary: "primary-text",
|
|
17
|
+
secondary: "on-surface",
|
|
18
|
+
positive: "success-text",
|
|
19
|
+
informative: "info-text",
|
|
20
|
+
caution: "warning-text",
|
|
21
|
+
danger: "error-text"
|
|
22
|
+
};
|
|
10
23
|
//#endregion
|
|
11
24
|
//#region src/composables/colors/use-vuetify-color.ts
|
|
12
25
|
function useVuetifyColor(color) {
|
|
@@ -45,7 +58,8 @@ function toast(options) {
|
|
|
45
58
|
const toastMessage = {
|
|
46
59
|
text,
|
|
47
60
|
color: color.value,
|
|
48
|
-
prependIcon: `$${color.value}
|
|
61
|
+
prependIcon: `$${color.value}`,
|
|
62
|
+
timerColor: `rgb(var(--v-theme-on-${color.value}))`
|
|
49
63
|
};
|
|
50
64
|
messages.value.push(toastMessage);
|
|
51
65
|
}
|
|
@@ -121,4 +135,4 @@ function dialog(options) {
|
|
|
121
135
|
}, (value) => value);
|
|
122
136
|
}
|
|
123
137
|
//#endregion
|
|
124
|
-
export { messages as a, useDialog as i, owners as n, useToast as o, requests as r, useVuetifyColor as s, openDialog as t };
|
|
138
|
+
export { messages as a, colorToVuetifyTextColor as c, useDialog as i, owners as n, useToast as o, requests as r, useVuetifyColor as s, openDialog as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexdom/uimed-vue",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.46",
|
|
4
4
|
"description": "A ui framework for NEXDOM applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lib",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"postinstall": "playwright install --with-deps chromium"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
+
"@axe-core/playwright": "^4.13.0",
|
|
55
56
|
"@commitlint/cli": "^21.2.1",
|
|
56
57
|
"@commitlint/config-conventional": "^21.2.0",
|
|
57
58
|
"@mdi/font": "^7.4.47",
|