vuiii 0.1.3-alpha → 0.1.6-alpha
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/dist/components/FormFields.vue.d.ts +1 -1
- package/dist/components/Icon.vue.d.ts +4 -4
- package/dist/components/Select.vue.d.ts +1 -1
- package/dist/hooks/useLoadData.d.ts +21 -0
- package/dist/hooks/{useAction.d.ts → useSubmitAction.d.ts} +13 -10
- package/dist/index.d.ts +3 -1
- package/dist/style.css +1 -1
- package/dist/vuiii.es.js +201 -188
- package/dist/vuiii.umd.js +1 -1
- package/package.json +4 -3
|
@@ -12,7 +12,7 @@ export declare type FormField = {
|
|
|
12
12
|
props?: Record<string, unknown>;
|
|
13
13
|
value?: FormFieldValue;
|
|
14
14
|
};
|
|
15
|
-
export declare type FormFieldsStructure<T extends any = any> = Record<
|
|
15
|
+
export declare type FormFieldsStructure<T extends any = any> = Record<keyof T | string, FormField>;
|
|
16
16
|
declare const _default: import("vue").DefineComponent<{
|
|
17
17
|
fields: {
|
|
18
18
|
type: PropType<FormFieldsStructure<any>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { AsyncComponentLoader, Component } from 'vue';
|
|
2
|
+
declare type IconComponent = string | Component | AsyncComponentLoader | undefined;
|
|
3
|
+
declare type IconResolver = (name: string) => IconComponent;
|
|
2
4
|
export declare function registerCustomIconResolver(resolver: IconResolver): void;
|
|
3
5
|
declare const _default: import("vue").DefineComponent<{
|
|
4
6
|
name: {
|
|
5
7
|
type: StringConstructor;
|
|
6
8
|
required: true;
|
|
7
9
|
};
|
|
8
|
-
}, unknown, {
|
|
9
|
-
component: any;
|
|
10
|
-
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
11
|
name: {
|
|
12
12
|
type: StringConstructor;
|
|
13
13
|
required: true;
|
|
@@ -72,8 +72,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
72
|
};
|
|
73
73
|
allowEmpty: BooleanConstructor;
|
|
74
74
|
}>>, {
|
|
75
|
-
value: string | number | Record<string, any>;
|
|
76
75
|
size: "small" | "normal";
|
|
76
|
+
value: string | number | Record<string, any>;
|
|
77
77
|
optionLabelKey: Extractor;
|
|
78
78
|
optionValueKey: Extractor;
|
|
79
79
|
optionDisabledKey: Extractor;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Router } from 'vue-router';
|
|
3
|
+
export declare const useLoadData: <D = unknown, P = unknown>(source: (params: P) => D | Promise<D>, options?: {
|
|
4
|
+
onSuccess?: (({ data, params, router }: {
|
|
5
|
+
data: D;
|
|
6
|
+
params: P;
|
|
7
|
+
router: Router;
|
|
8
|
+
}) => void) | undefined;
|
|
9
|
+
onError?: (({ error, params, router }: {
|
|
10
|
+
error: Error;
|
|
11
|
+
params: P;
|
|
12
|
+
router: Router;
|
|
13
|
+
}) => boolean | void) | undefined;
|
|
14
|
+
successMessage?: string | ((data: D, params: P) => string) | undefined;
|
|
15
|
+
errorMessage?: string | ((error: Error, params: P) => string) | undefined;
|
|
16
|
+
immediate?: boolean | undefined;
|
|
17
|
+
}) => {
|
|
18
|
+
load: () => Promise<D>;
|
|
19
|
+
isLoading: Ref<boolean>;
|
|
20
|
+
data: Ref<D>;
|
|
21
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { RouteLocationRaw, Router } from 'vue-router';
|
|
3
3
|
import { useModal } from '../modal';
|
|
4
|
+
import { Snackbar } from '../snackbar';
|
|
4
5
|
export declare type ValidationErrors<T = any> = {
|
|
5
6
|
[key in keyof T]?: any;
|
|
6
7
|
};
|
|
@@ -9,27 +10,29 @@ export declare type ValidationResults<T = any> = {
|
|
|
9
10
|
errors: ValidationErrors<T>;
|
|
10
11
|
};
|
|
11
12
|
declare type ConfirmParams = Parameters<ReturnType<typeof useModal>['confirm']>[0];
|
|
12
|
-
export declare function
|
|
13
|
-
validator?: (data:
|
|
14
|
-
confirm?: ((data:
|
|
13
|
+
export declare function useSubmitAction<D = unknown, R = unknown>(action: (data: D) => any | Promise<any>, params?: {
|
|
14
|
+
validator?: (data: D) => boolean | Promise<ValidationResults<D> | boolean>;
|
|
15
|
+
confirm?: ((data: D) => ConfirmParams) | ConfirmParams;
|
|
15
16
|
onSuccess?: (params: {
|
|
16
17
|
result: R;
|
|
17
|
-
data:
|
|
18
|
+
data: D;
|
|
18
19
|
router: Router;
|
|
20
|
+
snackbar: Snackbar;
|
|
19
21
|
}) => void;
|
|
20
22
|
onError?: (params: {
|
|
21
23
|
error: Error;
|
|
22
|
-
data:
|
|
24
|
+
data: D;
|
|
23
25
|
router: Router;
|
|
26
|
+
snackbar: Snackbar;
|
|
24
27
|
}) => boolean | void;
|
|
25
|
-
redirectOnSuccess?: RouteLocationRaw | ((result: R, data:
|
|
26
|
-
successMessage?: ((result: R, data:
|
|
27
|
-
errorMessage?: ((error: Error, data:
|
|
28
|
+
redirectOnSuccess?: RouteLocationRaw | ((result: R, data: D) => RouteLocationRaw) | undefined;
|
|
29
|
+
successMessage?: ((result: R, data: D) => string) | string;
|
|
30
|
+
errorMessage?: ((error: Error, data: D) => string) | string;
|
|
28
31
|
immediate?: boolean;
|
|
29
32
|
}): {
|
|
30
|
-
submit: (data?:
|
|
33
|
+
submit: (data?: D) => Promise<any>;
|
|
31
34
|
isSubmitting: Ref<boolean>;
|
|
32
35
|
result: Ref<R>;
|
|
33
|
-
errors: Ref<ValidationErrors<
|
|
36
|
+
errors: Ref<ValidationErrors<D>>;
|
|
34
37
|
};
|
|
35
38
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -12,10 +12,12 @@ export { default as FormFields } from './components/FormFields.vue';
|
|
|
12
12
|
export { default as FormGroup } from './components/FormGroup.vue';
|
|
13
13
|
export { default as Icon, registerCustomIconResolver } from './components/Icon.vue';
|
|
14
14
|
export { default as Input } from './components/Input.vue';
|
|
15
|
+
export { default as ModalLayout } from './components/modal/ModalLayout.vue';
|
|
15
16
|
export { default as Select } from './components/Select.vue';
|
|
16
17
|
export type { TableColumns } from './components/Table.vue';
|
|
17
18
|
export { default as Table } from './components/Table.vue';
|
|
18
19
|
export { default as Textarea } from './components/Textarea.vue';
|
|
19
|
-
export {
|
|
20
|
+
export { useLoadData } from './hooks/useLoadData';
|
|
21
|
+
export { useSubmitAction } from './hooks/useSubmitAction';
|
|
20
22
|
export { modal, useModal } from './modal';
|
|
21
23
|
export { snackbar, useSnackbar } from './snackbar';
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.link{cursor:pointer;color:var(--vui-color-primary);text-decoration:none}.link:hover{color:var(--vui-color-primary--darker);text-decoration:underline}.link.link--danger,.link.link--danger:hover{color:var(--vui-color-danger--darker)}.IconSpinner[data-v-683816b2]{will-change:transform;-webkit-animation:animation-683816b2 .7s infinite linear;animation:animation-683816b2 .7s infinite linear}@-webkit-keyframes animation-683816b2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes animation-683816b2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.Icon[data-v-3f9f02d0]{display:inline-block;vertical-align:middle;width:1.5rem;aspect-ratio:1 / 1;flex:none}.Breadcrumbs[data-v-357000f6]{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;opacity:.5}.Breadcrumbs__breadcrumb[data-v-357000f6]{display:flex;align-items:center;font-size:.85rem;gap:.5rem}.Breadcrumbs__link[data-v-357000f6]:hover{text-decoration:underline}.Breadcrumbs__arrow[data-v-357000f6]{width:1rem}:root{--vui-color-gray: rgb(212 212 216);--vui-color-gray--light: rgb(229, 229, 229);--vui-color-gray--lighter: rgb(245, 245, 245);--vui-color-gray--lightest: rgb(250, 250, 250);--vui-color-gray--dark: rgb(163, 163, 163);--vui-color-gray--darker: rgb(115, 115, 115);--vui-color-gray--darkest: rgb(82, 82, 82);--vui-color-primary: rgb(79 70 229);--vui-color-primary-shadow: rgb(67 56 202/.25);--vui-color-primary--darker: rgb(67 56 202);--vui-color-danger: rgb(225 29 72);--vui-color-danger-shadow: rgb(225 29 72/.25);--vui-color-danger--darker: rgb(190 18 60);--vui-color-success: rgb(77 124 15);--vui-color-success-shadow: rgb(77 124 15/.25);--vui-color-success--darker: rgb(63 98 18);--vui-shadow: 0 1px 3px 0 rgb(0 0 0/.1), 0 1px 2px -1px rgb(0 0 0/.1));--vui-field-height: 3rem;--vui-field-ringSize: 4px;--vui-field-borderRadius: .375rem;--vui-field-fontSize: .96rem;--vui-field-borderColor: rgb(212 212 216);--vui-field-borderColor--active: rgb(67 56 202);--vui-field-ringColor: rgb(79 70 229/.1);--vui-field-transition: box-shadow .15s, transform .15s, box-shadow .15s, border-color .15s, background-color .15s;--vui-field-fontSize--small: .85rem;--vui-field-height--small: 2.25rem;--vui-field-ringSize--small: 2px;--vui-fontSize-base: 1rem;--vui-fontSize-small: .85rem}.button{--bgColor: var(--vui-button-bgColor, transparent);--textColor: var(--vui-button-textColor, black);--borderRadius: var(--vui-button-borderRadius, var(--vui-field-borderRadius));--borderWidth: var(--vui-button-borderWidth, 1px);--borderColor: var(--vui-button-borderColor, var(--vui-color-gray));--height: var(--vui-button-height, var(--vui-field-height));--padding: var(--vui-button-padding, 2rem);--fontSize: var(--vui-button-fontSize, var(--vui-field-fontSize));--shadow: var(--vui-button-shadow, var(--vui-shadow));--transition: var(--vui-button-transition, var(--vui-field-transition));--shadow: var(--vui-button-shadow, var(--vui-field-shadow));--ringColor: var(--vui-button-ringColor, rgb(0 0 0/.05));--ringSize: 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;gap:.5rem;align-items:center;align-self:center;justify-content:center;padding:0 var(--padding);min-height:var(--height);cursor:pointer;font-size:var(--fontSize);outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:var(--borderRadius);box-shadow:0 0 0 var(--ringSize) var(--ringColor),var(--shadow);transition:var(--transition);position:relative;background-color:var(--bgColor);border:var(--borderWidth) solid var(--borderColor);color:var(--textColor)}.button:hover{--bgColor: var(--vui-button-bgColor--hover, var(--vui-button-bgColor, transparent));--borderColor: var(--vui-button-borderColor--hover, var(--vui-color-gray--dark));--textColor: var(--vui-button-textColor--hover, var(--vui-button-textColor, black))}.button:focus{--shadow: var(--vui-button-shadow--focus, var(--vui-field-shadow--focus));--ringSize: var(--vui-button-ringSize, var(--vui-field-ringSize));--borderColor: var(--vui-button-borderColor--focus, var(--vui-field-borderColor--focus));--bgColor: var(--vui-button-bgColor--focus, var(--vui-button-bgColor))}.button.button--small{--height: var(--vui-button-height--small, var(--vui-field-height--small));--padding: var(--vui-button-padding--small, 1rem);--fontSize: var(--vui-button-fontSize--small, var(--vui-field-fontSize--small)) }.button.button--small:focus{--ringSize: var(--vui-field-ringSize--small)}.button.button--primary{--bgColor: var(--vui-button-bgColor--primary, var(--vui-color-primary));--borderColor: var(--vui-button-borderColor--primary, transparent);--textColor: var(--vui-button-textColor--primary, white);--ringColor: var(--vui-button-ringColor--primary, var(--vui-color-primary-shadow)) }.button.button--primary:hover{--bgColor: var(--vui-button-bgColor--primary--hover, var(--vui-button-bgColor--primary, var(--vui-color-primary--darker)));--borderColor: var(--vui-button-borderColor--primary--hover, var(--vui-button-borderColor--primary, transparent));--textColor: var(--vui-button-textColor--primary--hover, var(--vui-button-textColor--primary, white))}.button.button--secondary{--bgColor: var(--vui-button-bgColor--secondary, var(--vui-color-gray));--borderColor: var(--vui-button-borderColor--secondary, transparent);--textColor: var(--vui-button-textColor--secondary, black);--ringColor: var(--vui-button-ringColor--secondary, var(--vui-color-secondary-shadow)) }.button.button--secondary:hover{--bgColor: var(--vui-button-bgColor--secondary--hover, var(--vui-button-bgColor--secondary, var(--vui-color-gray--dark)));--borderColor: var(--vui-button-borderColor--secondary--hover, var(--vui-button-borderColor--secondary, transparent));--textColor: var(--vui-button-textColor--secondary--hover, var(--vui-button-textColor--secondary, black))}.button.button--danger{--bgColor: var(--vui-button-bgColor--danger, var(--vui-color-danger));--borderColor: var(--vui-button-borderColor--danger, transparent);--textColor: var(--vui-button-textColor--danger, white);--ringColor: var(--vui-button-ringColor--danger, var(--vui-color-danger-shadow)) }.button.button--danger:hover{--bgColor: var(--vui-button-bgColor--danger--hover, var(--vui-button-bgColor--danger, var(--vui-color-danger--darker)));--borderColor: var(--vui-button-borderColor--danger--hover, var(--vui-button-borderColor--danger, transparent));--textColor: var(--vui-button-textColor--danger--hover, var(--vui-button-textColor--danger, white))}.button:disabled,.button.button--disabled{opacity:.65;pointer-events:none}.Button--block[data-v-4c3e5fdd]{width:100%}.Button__icon--small[data-v-4c3e5fdd]{width:.75rem}.Button__icon--normal[data-v-4c3e5fdd]{width:1.35rem}.Button__icon--prefix.Button__icon--normal[data-v-4c3e5fdd]{margin-left:-.125rem}.Button__icon--suffix.Button__icon--normal[data-v-4c3e5fdd]{margin-right:-.125rem}.input{--bgColor: var(--vui-input-bgColor, white);--borderRadus: var(--vui-input-borderRadius, var(--vui-field-borderRadius));--borderWidth: var(--vui-input-borderWidth, 1px);--borderColor: var(--vui-input-borderColor, var(--vui-color-gray));--height: var(--vui-input-height, var(--vui-field-height));--padding: var(--vui-input-padding, 1rem);--fontSize: var(--vui-input-fontSize, var(--vui-field-fontSize));--transition: var(--vui-input-transition, var(--vui-field-transition));--shadow: var(--vui-input-shadow, var(--vui-field-shadow));--ringColor: var(--vui-input-ringColor, var(--vui-field-ringColor));--ringSize: 0;width:100%;background-color:var(--bgColor);border:var(--borderWidth) solid var(--borderColor);border-radius:var(--borderRadus);padding:0 var(--padding);min-height:var(--height);font-size:var(--fontSize);transition:var(--transition);box-shadow:0 0 0 var(--ringSize) var(--ringColor),var(--shadow)}.input::-moz-placeholder{color:var(--vui-input-placeholderColor, var(--vui-color-gray--dark))}.input:-ms-input-placeholder{color:var(--vui-input-placeholderColor, var(--vui-color-gray--dark))}.input::placeholder{color:var(--vui-input-placeholderColor, var(--vui-color-gray--dark))}.input:focus,.input:focus-within{--shadow: var(--vui-input-shadow--focus, var(--vui-field-shadow--focus, var(--vui-input-shadow, var(--vui-field-shadow))));--ringSize: var(--vui-input-ringSize, var(--vui-field-ringSize));--borderColor: var(--vui-input-borderColor--focus, var(--vui-field-borderColor--focus, var(--vui-input-borderColor, var(--vui-color-gray))));--bgColor: var(--vui-input-bgColor--focus, var(--vui-input-bgColor, white));outline:none}.input:disabled,.input.input--disabled{--borderColor: var(--vui-color-gray--light);opacity:.6;pointer-events:none}.input.input--small{--height: var(--vui-input-height--small, var(--vui-field-height--small));--fontSize: var(--vui-input-fontSize--small, var(--vui-field-fontSize--small)) }.input.input--small:focus,.input.input--small:focus-within{--ringSize: var(--vui-field-ringSize--small)}.input.input--valid{color:var(--vui-color-success);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2356B981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right calc(.415em + .25rem) center;background-size:calc(.83em + .5rem) calc(.83em + .5rem)}.input.input--invalid{--borderColor: var(--vui-color-danger);--ringColor: var(--vui-color-danger-shadow);color:var(--vui-color-success);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right calc(.415em + .25rem) center;background-size:calc(.83em + .5rem) calc(.83em + .5rem)}.input.input--invalid:focus,.input.input--invalid:focus-within{outline:none}.input .input__nested{padding:0 var(--padding);line-height:1;background:transparent;border:none;border-radius:var(--borderRadus);min-height:calc(var(--height) - 2px);outline:none;cursor:inherit}.input .input__nested::-moz-placeholder{color:var(--vui-color-gray--dark)}.input .input__nested:-ms-input-placeholder{color:var(--vui-color-gray--dark)}.input .input__nested::placeholder{color:var(--vui-color-gray--dark)}select.input{padding-right:2.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1792 1792"><path d="M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z"/></svg>');background-position:right .75rem center;background-size:1.2rem;text-overflow:ellipsis}@supports (-moz-appearance:none){select.input{line-height:3}}select.input.input--small{padding-right:2rem;background-size:1rem}input[type=number].input{-moz-appearance:textfield}input.input[type=number]::-webkit-outer-spin-button,input.input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}input[type=checkbox].input,input[type=radio].input{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1.25rem;height:1.25rem;min-height:0;padding:0;background:white;cursor:pointer;flex:none}input.input[type=checkbox]:checked,input.input[type=radio]:checked{background-repeat:no-repeat;background-position:center;background-color:var(--vui-color-primary);border-color:var(--vui-color-primary)}input.input[type=checkbox]:disabled,input.input[type=radio]:disabled{cursor:default}input[type=checkbox].input{border-radius:.25rem}input.input[type=checkbox]:checked{background-image:url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="white" d="M20.405 40.983L38.79 59.368 81.217 16.94l14.142 14.143L38.79 87.652 6.263 55.125l14.142-14.142z"/></svg>');background-size:.75rem}input[type=radio].input{border-radius:100%}input.input[type=radio]:checked{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 1 1"><circle r=".5" cx=".5" cy=".5" /></svg>');background-size:.5rem}textarea.input{padding-top:.75rem;padding-bottom:.75rem;vertical-align:middle;line-height:1.25;resize:vertical}.Checkbox[data-v-6d3aac34]{display:inline-flex;align-items:flex-start;vertical-align:top;cursor:pointer}--disabled.Checkbox[data-v-6d3aac34]{opacity:.5}.Checkbox__input[data-v-6d3aac34]{margin-top:1px}.Checkbox__switch[data-v-6d3aac34]{padding:3px;margin-top:-1px;width:2.25rem;border-radius:999px;transition:all .15s ease-out;background:rgb(115,115,115)}--active.Checkbox__switch[data-v-6d3aac34]{background:var(--vui-color-primary)}.Checkbox__switchDot[data-v-6d3aac34]{width:1.25rem;aspect-ratio:1 / 1;background:white;border-radius:999px;transition:all .15s ease-out}.Checkbox__switch--active .Checkbox__switchDot[data-v-6d3aac34]{transform:translate(.75rem)}.Checkbox__label[data-v-6d3aac34]{margin-left:.5rem;line-height:1.375}.Checkbox__required[data-v-6d3aac34]{line-height:1;color:var(--vui-color-danger)}.CheckboxGroup>*+*{margin-top:.5rem}.FormGroup[data-v-4214535a]{width:100%}.FormGroup--invalid[data-v-4214535a] .input,.FormGroup--invalid[data-v-4214535a] .input:hover{--borderColor: var(--vui-field-borderColor--invalid, rgb(190 18 60) );--ringColor: var(--vui-field-ringColor--invalid, rgb(225 29 72/.2) )}.FormGroup__header[data-v-4214535a]{display:flex;align-items:center;margin-bottom:.5rem;gap:.25rem}.FormGroup__label[data-v-4214535a]{font-size:.8rem;font-weight:600;letter-spacing:.05rem;text-transform:uppercase}.FormGroup__required[data-v-4214535a]{line-height:1;color:var(--vui-color-danger)}.FormGroup__description[data-v-4214535a]{font-size:.8rem;margin-bottom:.75rem;max-width:48rem;color:#737373}.FormGroup__hint[data-v-4214535a]{font-size:.8rem;margin-top:.5rem;max-width:48rem;color:#737373}.FormGroup__error[data-v-4214535a]{font-size:.8rem;margin-top:.5rem;max-width:48rem;color:var(--vui-color-danger)}.FormFields>*+*[data-v-319aedc6]{margin-top:2rem}.Form>*+*[data-v-5366fc3a]{margin-top:2rem}.Form__buttons[data-v-5366fc3a]{display:flex;align-items:center;margin-top:2rem}.Form__buttons>*+*[data-v-5366fc3a]{margin-left:1rem}.Input.Input{cursor:text;display:flex;align-items:center;padding-left:0;padding-right:0;line-height:1}.Input__icon{display:flex;align-items:center;justify-content:center;width:3rem;opacity:.35}.Input__icon--right{margin-left:-1rem}.Input__icon--left{margin-right:-1rem}.Input__nestedInput{flex:auto;align-self:stretch;width:100%}.table{min-width:100%}.table thead tr{border-bottom:1px solid var(--vui-color-gray)}.table thead th{padding:.75rem 1.5rem;font-size:.8rem;font-weight:600;text-align:left;letter-spacing:.025em;color:#404040;text-transform:uppercase}:is(.table tbody)>*+*{border-top:1px solid var(--vui-color-gray)}.table tbody td{padding:1rem 1.5rem}.table.table--hover tbody tr:hover td{background-color:#00000006}.link{cursor:pointer;color:var(--vui-color-primary);text-decoration:none}.link:hover{color:var(--vui-color-primary--darker);text-decoration:underline}.link.link--danger,.link.link--danger:hover{color:var(--vui-color-danger--darker)}.muted{color:var(--vui-color-gray-darker)}.ModalLayout{position:relative;display:flex;flex-direction:column;align-items:stretch;margin:auto;min-height:-webkit-fit-content;min-height:-moz-fit-content;min-height:fit-content;background-color:#fff;border-radius:4px;box-shadow:0 2px 10px #0000001a}.ModalLayout.isScrollable{min-height:auto;max-height:calc(100vh - 3rem)}.ModalLayout__header{flex:0 0 auto;padding:1.25rem 4rem 1.25rem 1.5rem}.ModalLayout__header .ModalLayout.isPlain{padding:0}.ModalLayout__title{font-size:larger}.ModalLayout__close{position:absolute;z-index:1;top:0;right:0;display:flex;justify-content:center;align-items:center;width:4rem;height:4.3rem;font-size:1.85rem;opacity:.4}.ModalLayout__close:hover{opacity:1;cursor:pointer}.ModalLayout__closeIcon{width:1.5rem;height:1.5rem}.ModalLayout__body{flex:1 0 auto;padding:1.5rem;border-radius:4px}.ModalLayout.hasHeader .ModalLayout__body{padding-top:0;border-top-right-radius:0;border-top-left-radius:0}.ModalLayout.hasFooter .ModalLayout__body{padding-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.ModalLayout.isScrollable .ModalLayout__body{flex:1 1 auto;overflow:auto;padding:1.5rem;-ms-scroll-chaining:none;overscroll-behavior:contain;overflow-y:scroll;-webkit-overflow-scrolling:touch}.ModalLayout.isScrollable.hasHeader .ModalLayout__body{border-top:1px solid rgba(0,0,0,.1)}.ModalLayout.isScrollable.hasFooter .ModalLayout__body{border-bottom:1px solid rgba(0,0,0,.1)}.ModalLayout.isPlain .ModalLayout__body{padding:0}.ModalLayout__footer{flex:0 0 auto;padding:1.25rem 1.5rem}.ModalLayout.isPlain .ModalLayout__footer{padding:0}.ModalLayoutDialog__buttons{display:flex;align-items:center;justify-content:flex-end;margin-top:1rem}.ModalLayoutDialog__buttons>*+*{margin-left:.5rem}.ModalStack{position:fixed;z-index:1050}.ModalStack__backdrop{background:rgba(0,0,0,.35);position:fixed;z-index:1;top:0;left:0;width:100%;height:100%}.ModalStack__modalWrapper{position:fixed;z-index:2;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;width:auto;height:auto;padding:1.5rem;overflow:auto}.ModalStack__modalScroller{overflow:auto;position:relative;height:100vh;display:flex;justify-content:center;width:100%}.ModalStack__modal{transition:filter .15s}.ModalStack__modal:not(.isActive){filter:brightness(80%)}.ModalStack__modal-enter-active,.ModalStack__modal-leave-active{transition:opacity .15s;pointer-events:none}.ModalStack__modal-enter-from,.ModalStack__modal-leave-to{opacity:0;pointer-events:none}.ModalStack__backdrop-enter-active,.ModalStack__backdrop-leave-active{transition:opacity .15s;pointer-events:none}.ModalStack__backdrop-enter-from,.ModalStack__backdrop-leave-to{opacity:0;pointer-events:none}.Snackbar{position:fixed;bottom:0;right:0;z-index:10;margin:2rem}.Snackbar__transition-enter-from,.Snackbar__transition-leave-to{opacity:0;transform:translateY(.5rem)}.Snackbar__transition-enter-active,.Snackbar__transition-leave-active{transition:all .15s ease-out}.Snackbar__transition-enter-to,.Snackbar__transition-leave-from{opacity:1}.Snackbar__message{position:absolute;bottom:0;right:0;display:flex;justify-content:flex-end;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:48rem;pointer-events:none;word-break:break-word}.Snackbar__messageWrapper{padding-top:.5rem;transition:transform .15s ease-in}.Snackbar__messageBlock{display:inline-flex;align-items:flex-start;padding:.75rem 1.5rem;color:#fff;border-radius:.25rem;cursor:default;pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Snackbar__messageBlock--success{background-color:#000}.Snackbar__messageBlock--error{background-color:var(--vui-color-danger)}.Snackbar__messageClose{display:inline-flex;justify-content:center;align-items:center;padding:.75rem;margin:-.75rem -.75rem -.75rem .75rem;font-size:.85rem;font-weight:600;opacity:.5;cursor:pointer}.Snackbar__messageClose:hover{opacity:1}.Snackbar__messageCloseIcon{width:1rem}
|
|
1
|
+
.link{cursor:pointer;color:var(--vui-color-primary);text-decoration:none}.link:hover{color:var(--vui-color-primary--darker);text-decoration:underline}.link.link--danger,.link.link--danger:hover{color:var(--vui-color-danger--darker)}.IconSpinner[data-v-683816b2]{will-change:transform;-webkit-animation:animation-683816b2 .7s infinite linear;animation:animation-683816b2 .7s infinite linear}@-webkit-keyframes animation-683816b2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes animation-683816b2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.Icon[data-v-cc79c81e]{display:inline-block;vertical-align:middle;width:1.5rem;aspect-ratio:1 / 1;flex:none}.Breadcrumbs[data-v-357000f6]{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;opacity:.5}.Breadcrumbs__breadcrumb[data-v-357000f6]{display:flex;align-items:center;font-size:.85rem;gap:.5rem}.Breadcrumbs__link[data-v-357000f6]:hover{text-decoration:underline}.Breadcrumbs__arrow[data-v-357000f6]{width:1rem}:root{--vui-color-gray: rgb(212 212 216);--vui-color-gray--light: rgb(229, 229, 229);--vui-color-gray--lighter: rgb(245, 245, 245);--vui-color-gray--lightest: rgb(250, 250, 250);--vui-color-gray--dark: rgb(163, 163, 163);--vui-color-gray--darker: rgb(115, 115, 115);--vui-color-gray--darkest: rgb(82, 82, 82);--vui-color-primary: rgb(79 70 229);--vui-color-primary-shadow: rgb(67 56 202/.25);--vui-color-primary--darker: rgb(67 56 202);--vui-color-danger: rgb(225 29 72);--vui-color-danger-shadow: rgb(225 29 72/.25);--vui-color-danger--darker: rgb(190 18 60);--vui-color-success: rgb(77 124 15);--vui-color-success-shadow: rgb(77 124 15/.25);--vui-color-success--darker: rgb(63 98 18);--vui-shadow: 0 1px 3px 0 rgb(0 0 0/.1), 0 1px 2px -1px rgb(0 0 0/.1));--vui-field-height: 3rem;--vui-field-ringSize: 4px;--vui-field-borderRadius: .375rem;--vui-field-fontSize: .96rem;--vui-field-borderColor: rgb(212 212 216);--vui-field-borderColor--active: rgb(67 56 202);--vui-field-ringColor: rgb(79 70 229/.1);--vui-field-transition: box-shadow .15s, transform .15s, box-shadow .15s, border-color .15s, background-color .15s;--vui-field-fontSize--small: .85rem;--vui-field-height--small: 2.25rem;--vui-field-ringSize--small: 2px;--vui-fontSize-base: 1rem;--vui-fontSize-small: .85rem}.button{--bgColor: var(--vui-button-bgColor, transparent);--textColor: var(--vui-button-textColor, black);--borderRadius: var(--vui-button-borderRadius, var(--vui-field-borderRadius));--borderWidth: var(--vui-button-borderWidth, 1px);--borderColor: var(--vui-button-borderColor, var(--vui-color-gray));--height: var(--vui-button-height, var(--vui-field-height));--padding: var(--vui-button-padding, 2rem);--fontSize: var(--vui-button-fontSize, var(--vui-field-fontSize));--shadow: var(--vui-button-shadow, var(--vui-shadow));--transition: var(--vui-button-transition, var(--vui-field-transition));--shadow: var(--vui-button-shadow, var(--vui-field-shadow));--ringColor: var(--vui-button-ringColor, rgb(0 0 0/.05));--ringSize: 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;gap:.5rem;align-items:center;align-self:center;justify-content:center;padding:0 var(--padding);min-height:var(--height);cursor:pointer;font-size:var(--fontSize);outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:var(--borderRadius);box-shadow:0 0 0 var(--ringSize) var(--ringColor),var(--shadow);transition:var(--transition);position:relative;background-color:var(--bgColor);border:var(--borderWidth) solid var(--borderColor);color:var(--textColor)}.button:hover{--bgColor: var(--vui-button-bgColor--hover, var(--vui-button-bgColor, transparent));--borderColor: var(--vui-button-borderColor--hover, var(--vui-color-gray--dark));--textColor: var(--vui-button-textColor--hover, var(--vui-button-textColor, black))}.button:focus{--shadow: var(--vui-button-shadow--focus, var(--vui-field-shadow--focus));--ringSize: var(--vui-button-ringSize, var(--vui-field-ringSize));--borderColor: var(--vui-button-borderColor--focus, var(--vui-field-borderColor--focus));--bgColor: var(--vui-button-bgColor--focus, var(--vui-button-bgColor))}.button.button--small{--height: var(--vui-button-height--small, var(--vui-field-height--small));--padding: var(--vui-button-padding--small, 1rem);--fontSize: var(--vui-button-fontSize--small, var(--vui-field-fontSize--small)) }.button.button--small:focus{--ringSize: var(--vui-field-ringSize--small)}.button.button--primary{--bgColor: var(--vui-button-bgColor--primary, var(--vui-color-primary));--borderColor: var(--vui-button-borderColor--primary, transparent);--textColor: var(--vui-button-textColor--primary, white);--ringColor: var(--vui-button-ringColor--primary, var(--vui-color-primary-shadow)) }.button.button--primary:hover{--bgColor: var(--vui-button-bgColor--primary--hover, var(--vui-button-bgColor--primary, var(--vui-color-primary--darker)));--borderColor: var(--vui-button-borderColor--primary--hover, var(--vui-button-borderColor--primary, transparent));--textColor: var(--vui-button-textColor--primary--hover, var(--vui-button-textColor--primary, white))}.button.button--secondary{--bgColor: var(--vui-button-bgColor--secondary, var(--vui-color-gray));--borderColor: var(--vui-button-borderColor--secondary, transparent);--textColor: var(--vui-button-textColor--secondary, black);--ringColor: var(--vui-button-ringColor--secondary, var(--vui-color-secondary-shadow)) }.button.button--secondary:hover{--bgColor: var(--vui-button-bgColor--secondary--hover, var(--vui-button-bgColor--secondary, var(--vui-color-gray--dark)));--borderColor: var(--vui-button-borderColor--secondary--hover, var(--vui-button-borderColor--secondary, transparent));--textColor: var(--vui-button-textColor--secondary--hover, var(--vui-button-textColor--secondary, black))}.button.button--danger{--bgColor: var(--vui-button-bgColor--danger, var(--vui-color-danger));--borderColor: var(--vui-button-borderColor--danger, transparent);--textColor: var(--vui-button-textColor--danger, white);--ringColor: var(--vui-button-ringColor--danger, var(--vui-color-danger-shadow)) }.button.button--danger:hover{--bgColor: var(--vui-button-bgColor--danger--hover, var(--vui-button-bgColor--danger, var(--vui-color-danger--darker)));--borderColor: var(--vui-button-borderColor--danger--hover, var(--vui-button-borderColor--danger, transparent));--textColor: var(--vui-button-textColor--danger--hover, var(--vui-button-textColor--danger, white))}.button:disabled,.button.button--disabled{opacity:.65;pointer-events:none}.Button--block[data-v-4c3e5fdd]{width:100%}.Button__icon--small[data-v-4c3e5fdd]{width:.75rem}.Button__icon--normal[data-v-4c3e5fdd]{width:1.35rem}.Button__icon--prefix.Button__icon--normal[data-v-4c3e5fdd]{margin-left:-.125rem}.Button__icon--suffix.Button__icon--normal[data-v-4c3e5fdd]{margin-right:-.125rem}.input{--bgColor: var(--vui-input-bgColor, white);--borderRadus: var(--vui-input-borderRadius, var(--vui-field-borderRadius));--borderWidth: var(--vui-input-borderWidth, 1px);--borderColor: var(--vui-input-borderColor, var(--vui-color-gray));--height: var(--vui-input-height, var(--vui-field-height));--padding: var(--vui-input-padding, 1rem);--fontSize: var(--vui-input-fontSize, var(--vui-field-fontSize));--transition: var(--vui-input-transition, var(--vui-field-transition));--shadow: var(--vui-input-shadow, var(--vui-field-shadow));--ringColor: var(--vui-input-ringColor, var(--vui-field-ringColor));--ringSize: 0;width:100%;background-color:var(--bgColor);border:var(--borderWidth) solid var(--borderColor);border-radius:var(--borderRadus);padding:0 var(--padding);min-height:var(--height);font-size:var(--fontSize);transition:var(--transition);box-shadow:0 0 0 var(--ringSize) var(--ringColor),var(--shadow)}.input::-moz-placeholder{color:var(--vui-input-placeholderColor, var(--vui-color-gray--dark))}.input:-ms-input-placeholder{color:var(--vui-input-placeholderColor, var(--vui-color-gray--dark))}.input::placeholder{color:var(--vui-input-placeholderColor, var(--vui-color-gray--dark))}.input:focus,.input:focus-within{--shadow: var(--vui-input-shadow--focus, var(--vui-field-shadow--focus, var(--vui-input-shadow, var(--vui-field-shadow))));--ringSize: var(--vui-input-ringSize, var(--vui-field-ringSize));--borderColor: var(--vui-input-borderColor--focus, var(--vui-field-borderColor--focus, var(--vui-input-borderColor, var(--vui-color-gray))));--bgColor: var(--vui-input-bgColor--focus, var(--vui-input-bgColor, white));outline:none}.input:disabled,.input.input--disabled{--borderColor: var(--vui-color-gray--light);opacity:.6;pointer-events:none}.input.input--small{--height: var(--vui-input-height--small, var(--vui-field-height--small));--fontSize: var(--vui-input-fontSize--small, var(--vui-field-fontSize--small)) }.input.input--small:focus,.input.input--small:focus-within{--ringSize: var(--vui-field-ringSize--small)}.input.input--valid{color:var(--vui-color-success);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2356B981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right calc(.415em + .25rem) center;background-size:calc(.83em + .5rem) calc(.83em + .5rem)}.input.input--invalid{--borderColor: var(--vui-color-danger);--ringColor: var(--vui-color-danger-shadow);color:var(--vui-color-success);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right calc(.415em + .25rem) center;background-size:calc(.83em + .5rem) calc(.83em + .5rem)}.input.input--invalid:focus,.input.input--invalid:focus-within{outline:none}.input .input__nested{padding:0 var(--padding);line-height:1;background:transparent;border:none;border-radius:var(--borderRadus);min-height:calc(var(--height) - 2px);outline:none;cursor:inherit}.input .input__nested::-moz-placeholder{color:var(--vui-color-gray--dark)}.input .input__nested:-ms-input-placeholder{color:var(--vui-color-gray--dark)}.input .input__nested::placeholder{color:var(--vui-color-gray--dark)}select.input{padding-right:2.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1792 1792"><path d="M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z"/></svg>');background-position:right .75rem center;background-size:1.2rem;text-overflow:ellipsis}@supports (-moz-appearance:none){select.input{line-height:3}}select.input.input--small{padding-right:2rem;background-size:1rem}input[type=number].input{-moz-appearance:textfield}input.input[type=number]::-webkit-outer-spin-button,input.input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}input[type=checkbox].input,input[type=radio].input{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1.25rem;height:1.25rem;min-height:0;padding:0;background:white;cursor:pointer;flex:none}input.input[type=checkbox]:checked,input.input[type=radio]:checked{background-repeat:no-repeat;background-position:center;background-color:var(--vui-color-primary);border-color:var(--vui-color-primary)}input.input[type=checkbox]:disabled,input.input[type=radio]:disabled{cursor:default}input[type=checkbox].input{border-radius:.25rem}input.input[type=checkbox]:checked{background-image:url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="white" d="M20.405 40.983L38.79 59.368 81.217 16.94l14.142 14.143L38.79 87.652 6.263 55.125l14.142-14.142z"/></svg>');background-size:.75rem}input[type=radio].input{border-radius:100%}input.input[type=radio]:checked{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 1 1"><circle r=".5" cx=".5" cy=".5" /></svg>');background-size:.5rem}textarea.input{padding-top:.75rem;padding-bottom:.75rem;vertical-align:middle;line-height:1.25;resize:vertical}.Checkbox[data-v-6d3aac34]{display:inline-flex;align-items:flex-start;vertical-align:top;cursor:pointer}--disabled.Checkbox[data-v-6d3aac34]{opacity:.5}.Checkbox__input[data-v-6d3aac34]{margin-top:1px}.Checkbox__switch[data-v-6d3aac34]{padding:3px;margin-top:-1px;width:2.25rem;border-radius:999px;transition:all .15s ease-out;background:rgb(115,115,115)}--active.Checkbox__switch[data-v-6d3aac34]{background:var(--vui-color-primary)}.Checkbox__switchDot[data-v-6d3aac34]{width:1.25rem;aspect-ratio:1 / 1;background:white;border-radius:999px;transition:all .15s ease-out}.Checkbox__switch--active .Checkbox__switchDot[data-v-6d3aac34]{transform:translate(.75rem)}.Checkbox__label[data-v-6d3aac34]{margin-left:.5rem;line-height:1.375}.Checkbox__required[data-v-6d3aac34]{line-height:1;color:var(--vui-color-danger)}.CheckboxGroup>*+*{margin-top:.5rem}.FormGroup[data-v-4214535a]{width:100%}.FormGroup--invalid[data-v-4214535a] .input,.FormGroup--invalid[data-v-4214535a] .input:hover{--borderColor: var(--vui-field-borderColor--invalid, rgb(190 18 60) );--ringColor: var(--vui-field-ringColor--invalid, rgb(225 29 72/.2) )}.FormGroup__header[data-v-4214535a]{display:flex;align-items:center;margin-bottom:.5rem;gap:.25rem}.FormGroup__label[data-v-4214535a]{font-size:.8rem;font-weight:600;letter-spacing:.05rem;text-transform:uppercase}.FormGroup__required[data-v-4214535a]{line-height:1;color:var(--vui-color-danger)}.FormGroup__description[data-v-4214535a]{font-size:.8rem;margin-bottom:.75rem;max-width:48rem;color:#737373}.FormGroup__hint[data-v-4214535a]{font-size:.8rem;margin-top:.5rem;max-width:48rem;color:#737373}.FormGroup__error[data-v-4214535a]{font-size:.8rem;margin-top:.5rem;max-width:48rem;color:var(--vui-color-danger)}.FormFields>*+*[data-v-6e4bafe2]{margin-top:2rem}.Form>*+*[data-v-c8cb4f5a]{margin-top:2rem}.Form__buttons[data-v-c8cb4f5a]{display:flex;align-items:center;margin-top:2rem}.Form__buttons>*+*[data-v-c8cb4f5a]{margin-left:1rem}.Input.Input{cursor:text;display:flex;align-items:center;padding-left:0;padding-right:0;line-height:1}.Input__icon{display:flex;align-items:center;justify-content:center;width:3rem;opacity:.35}.Input__icon--right{margin-left:-1rem}.Input__icon--left{margin-right:-1rem}.Input__nestedInput{flex:auto;align-self:stretch;width:100%}.ModalLayout{position:relative;display:flex;flex-direction:column;align-items:stretch;margin:auto;min-height:-webkit-fit-content;min-height:-moz-fit-content;min-height:fit-content;background-color:#fff;border-radius:4px;box-shadow:0 2px 10px #0000001a}.ModalLayout.isScrollable{min-height:auto;max-height:calc(100vh - 3rem)}.ModalLayout__header{flex:0 0 auto;padding:1.25rem 4rem 1.25rem 1.5rem}.ModalLayout__header .ModalLayout.isPlain{padding:0}.ModalLayout__title{font-size:larger}.ModalLayout__close{position:absolute;z-index:1;top:0;right:0;display:flex;justify-content:center;align-items:center;width:4rem;height:4.3rem;font-size:1.85rem;opacity:.4}.ModalLayout__close:hover{opacity:1;cursor:pointer}.ModalLayout__closeIcon{width:1.5rem;height:1.5rem}.ModalLayout__body{flex:1 0 auto;padding:1.5rem;border-radius:4px}.ModalLayout.hasHeader .ModalLayout__body{padding-top:0;border-top-right-radius:0;border-top-left-radius:0}.ModalLayout.hasFooter .ModalLayout__body{padding-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.ModalLayout.isScrollable .ModalLayout__body{flex:1 1 auto;overflow:auto;padding:1.5rem;-ms-scroll-chaining:none;overscroll-behavior:contain;overflow-y:scroll;-webkit-overflow-scrolling:touch}.ModalLayout.isScrollable.hasHeader .ModalLayout__body{border-top:1px solid rgba(0,0,0,.1)}.ModalLayout.isScrollable.hasFooter .ModalLayout__body{border-bottom:1px solid rgba(0,0,0,.1)}.ModalLayout.isPlain .ModalLayout__body{padding:0}.ModalLayout__footer{flex:0 0 auto;padding:1.25rem 1.5rem}.ModalLayout.isPlain .ModalLayout__footer{padding:0}.table{min-width:100%}.table thead tr{border-bottom:1px solid var(--vui-color-gray)}.table thead th{padding:.75rem 1.5rem;font-size:.8rem;font-weight:600;text-align:left;letter-spacing:.025em;color:#404040;text-transform:uppercase}:is(.table tbody)>*+*{border-top:1px solid var(--vui-color-gray)}.table tbody td{padding:1rem 1.5rem}.table.table--hover tbody tr:hover td{background-color:#00000006}.link{cursor:pointer;color:var(--vui-color-primary);text-decoration:none}.link:hover{color:var(--vui-color-primary--darker);text-decoration:underline}.link.link--danger,.link.link--danger:hover{color:var(--vui-color-danger--darker)}.muted{color:var(--vui-color-gray-darker)}.ModalLayoutDialog__buttons{display:flex;align-items:center;justify-content:flex-end;margin-top:1rem}.ModalLayoutDialog__buttons>*+*{margin-left:.5rem}.ModalStack{position:fixed;z-index:1050}.ModalStack__backdrop{background:rgba(0,0,0,.35);position:fixed;z-index:1;top:0;left:0;width:100%;height:100%}.ModalStack__modalWrapper{position:fixed;z-index:2;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;width:auto;height:auto;padding:1.5rem;overflow:auto}.ModalStack__modalScroller{overflow:auto;position:relative;height:100vh;display:flex;justify-content:center;width:100%}.ModalStack__modal{transition:filter .15s}.ModalStack__modal:not(.isActive){filter:brightness(80%)}.ModalStack__modal-enter-active,.ModalStack__modal-leave-active{transition:opacity .15s;pointer-events:none}.ModalStack__modal-enter-from,.ModalStack__modal-leave-to{opacity:0;pointer-events:none}.ModalStack__backdrop-enter-active,.ModalStack__backdrop-leave-active{transition:opacity .15s;pointer-events:none}.ModalStack__backdrop-enter-from,.ModalStack__backdrop-leave-to{opacity:0;pointer-events:none}.Snackbar{position:fixed;bottom:0;right:0;z-index:10;margin:2rem}.Snackbar__transition-enter-from,.Snackbar__transition-leave-to{opacity:0;transform:translateY(.5rem)}.Snackbar__transition-enter-active,.Snackbar__transition-leave-active{transition:all .15s ease-out}.Snackbar__transition-enter-to,.Snackbar__transition-leave-from{opacity:1}.Snackbar__message{position:absolute;bottom:0;right:0;display:flex;justify-content:flex-end;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:48rem;pointer-events:none;word-break:break-word}.Snackbar__messageWrapper{padding-top:.5rem;transition:transform .15s ease-in}.Snackbar__messageBlock{display:inline-flex;align-items:flex-start;padding:.75rem 1.5rem;color:#fff;border-radius:.25rem;cursor:default;pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Snackbar__messageBlock--success{background-color:#000}.Snackbar__messageBlock--error{background-color:var(--vui-color-danger)}.Snackbar__messageClose{display:inline-flex;justify-content:center;align-items:center;padding:.75rem;margin:-.75rem -.75rem -.75rem .75rem;font-size:.85rem;font-weight:600;opacity:.5;cursor:pointer}.Snackbar__messageClose:hover{opacity:1}.Snackbar__messageCloseIcon{width:1rem}
|
package/dist/vuiii.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { openBlock, createElementBlock, createElementVNode, pushScopeId, popScopeId, defineComponent, createBlock, resolveDynamicComponent, resolveComponent, Fragment, renderList, createVNode, withCtx, createTextVNode, toDisplayString, mergeProps, renderSlot, normalizeClass, createCommentVNode, withDirectives, vShow, withModifiers, normalizeProps, guardReactiveProps,
|
|
32
|
+
import { openBlock, createElementBlock, createElementVNode, pushScopeId, popScopeId, defineComponent, shallowRef, watch, createBlock, resolveDynamicComponent, unref, resolveComponent, Fragment, renderList, createVNode, withCtx, createTextVNode, toDisplayString, mergeProps, renderSlot, normalizeClass, createCommentVNode, withDirectives, vShow, withModifiers, normalizeProps, guardReactiveProps, useSlots, useAttrs, computed, normalizeStyle, createSlots, ref, onMounted, onBeforeUnmount, Transition, TransitionGroup, reactive, createApp, h, getCurrentInstance } from "vue";
|
|
33
33
|
import { useRouter } from "vue-router";
|
|
34
34
|
var style = "";
|
|
35
35
|
var _export_sfc = (sfc, props) => {
|
|
@@ -55,11 +55,11 @@ const _hoisted_2$n = /* @__PURE__ */ createElementVNode("path", {
|
|
|
55
55
|
const _hoisted_3$l = [
|
|
56
56
|
_hoisted_2$n
|
|
57
57
|
];
|
|
58
|
-
function _sfc_render$
|
|
58
|
+
function _sfc_render$n(_ctx, _cache) {
|
|
59
59
|
return openBlock(), createElementBlock("svg", _hoisted_1$t, _hoisted_3$l);
|
|
60
60
|
}
|
|
61
|
-
var arrowNarrowDown = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$
|
|
62
|
-
var
|
|
61
|
+
var arrowNarrowDown = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$n]]);
|
|
62
|
+
var __glob_4_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
63
63
|
__proto__: null,
|
|
64
64
|
"default": arrowNarrowDown
|
|
65
65
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -79,11 +79,11 @@ const _hoisted_2$m = /* @__PURE__ */ createElementVNode("path", {
|
|
|
79
79
|
const _hoisted_3$k = [
|
|
80
80
|
_hoisted_2$m
|
|
81
81
|
];
|
|
82
|
-
function _sfc_render$
|
|
82
|
+
function _sfc_render$m(_ctx, _cache) {
|
|
83
83
|
return openBlock(), createElementBlock("svg", _hoisted_1$s, _hoisted_3$k);
|
|
84
84
|
}
|
|
85
|
-
var arrowNarrowLeft = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$
|
|
86
|
-
var
|
|
85
|
+
var arrowNarrowLeft = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$m]]);
|
|
86
|
+
var __glob_4_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
87
87
|
__proto__: null,
|
|
88
88
|
"default": arrowNarrowLeft
|
|
89
89
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -103,11 +103,11 @@ const _hoisted_2$l = /* @__PURE__ */ createElementVNode("path", {
|
|
|
103
103
|
const _hoisted_3$j = [
|
|
104
104
|
_hoisted_2$l
|
|
105
105
|
];
|
|
106
|
-
function _sfc_render$
|
|
106
|
+
function _sfc_render$l(_ctx, _cache) {
|
|
107
107
|
return openBlock(), createElementBlock("svg", _hoisted_1$r, _hoisted_3$j);
|
|
108
108
|
}
|
|
109
|
-
var arrowNarrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$
|
|
110
|
-
var
|
|
109
|
+
var arrowNarrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$l]]);
|
|
110
|
+
var __glob_4_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
111
111
|
__proto__: null,
|
|
112
112
|
"default": arrowNarrowRight
|
|
113
113
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -127,11 +127,11 @@ const _hoisted_2$k = /* @__PURE__ */ createElementVNode("path", {
|
|
|
127
127
|
const _hoisted_3$i = [
|
|
128
128
|
_hoisted_2$k
|
|
129
129
|
];
|
|
130
|
-
function _sfc_render$
|
|
130
|
+
function _sfc_render$k(_ctx, _cache) {
|
|
131
131
|
return openBlock(), createElementBlock("svg", _hoisted_1$q, _hoisted_3$i);
|
|
132
132
|
}
|
|
133
|
-
var arrowNarrowUp = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$
|
|
134
|
-
var
|
|
133
|
+
var arrowNarrowUp = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$k]]);
|
|
134
|
+
var __glob_4_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
135
135
|
__proto__: null,
|
|
136
136
|
"default": arrowNarrowUp
|
|
137
137
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -151,11 +151,11 @@ const _hoisted_2$j = /* @__PURE__ */ createElementVNode("path", {
|
|
|
151
151
|
const _hoisted_3$h = [
|
|
152
152
|
_hoisted_2$j
|
|
153
153
|
];
|
|
154
|
-
function _sfc_render$
|
|
154
|
+
function _sfc_render$j(_ctx, _cache) {
|
|
155
155
|
return openBlock(), createElementBlock("svg", _hoisted_1$p, _hoisted_3$h);
|
|
156
156
|
}
|
|
157
|
-
var checkCircle = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$
|
|
158
|
-
var
|
|
157
|
+
var checkCircle = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$j]]);
|
|
158
|
+
var __glob_4_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
159
159
|
__proto__: null,
|
|
160
160
|
"default": checkCircle
|
|
161
161
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -175,11 +175,11 @@ const _hoisted_2$i = /* @__PURE__ */ createElementVNode("path", {
|
|
|
175
175
|
const _hoisted_3$g = [
|
|
176
176
|
_hoisted_2$i
|
|
177
177
|
];
|
|
178
|
-
function _sfc_render$
|
|
178
|
+
function _sfc_render$i(_ctx, _cache) {
|
|
179
179
|
return openBlock(), createElementBlock("svg", _hoisted_1$o, _hoisted_3$g);
|
|
180
180
|
}
|
|
181
|
-
var check = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$
|
|
182
|
-
var
|
|
181
|
+
var check = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$i]]);
|
|
182
|
+
var __glob_4_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
183
183
|
__proto__: null,
|
|
184
184
|
"default": check
|
|
185
185
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -199,11 +199,11 @@ const _hoisted_2$h = /* @__PURE__ */ createElementVNode("path", {
|
|
|
199
199
|
const _hoisted_3$f = [
|
|
200
200
|
_hoisted_2$h
|
|
201
201
|
];
|
|
202
|
-
function _sfc_render$
|
|
202
|
+
function _sfc_render$h(_ctx, _cache) {
|
|
203
203
|
return openBlock(), createElementBlock("svg", _hoisted_1$n, _hoisted_3$f);
|
|
204
204
|
}
|
|
205
|
-
var chevronLeft = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$
|
|
206
|
-
var
|
|
205
|
+
var chevronLeft = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$h]]);
|
|
206
|
+
var __glob_4_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
207
207
|
__proto__: null,
|
|
208
208
|
"default": chevronLeft
|
|
209
209
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -223,11 +223,11 @@ const _hoisted_2$g = /* @__PURE__ */ createElementVNode("path", {
|
|
|
223
223
|
const _hoisted_3$e = [
|
|
224
224
|
_hoisted_2$g
|
|
225
225
|
];
|
|
226
|
-
function _sfc_render$
|
|
226
|
+
function _sfc_render$g(_ctx, _cache) {
|
|
227
227
|
return openBlock(), createElementBlock("svg", _hoisted_1$m, _hoisted_3$e);
|
|
228
228
|
}
|
|
229
|
-
var chevronRight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$
|
|
230
|
-
var
|
|
229
|
+
var chevronRight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$g]]);
|
|
230
|
+
var __glob_4_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
231
231
|
__proto__: null,
|
|
232
232
|
"default": chevronRight
|
|
233
233
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -247,11 +247,11 @@ const _hoisted_2$f = /* @__PURE__ */ createElementVNode("path", {
|
|
|
247
247
|
const _hoisted_3$d = [
|
|
248
248
|
_hoisted_2$f
|
|
249
249
|
];
|
|
250
|
-
function _sfc_render$
|
|
250
|
+
function _sfc_render$f(_ctx, _cache) {
|
|
251
251
|
return openBlock(), createElementBlock("svg", _hoisted_1$l, _hoisted_3$d);
|
|
252
252
|
}
|
|
253
|
-
var exclamationCircle = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$
|
|
254
|
-
var
|
|
253
|
+
var exclamationCircle = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$f]]);
|
|
254
|
+
var __glob_4_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
255
255
|
__proto__: null,
|
|
256
256
|
"default": exclamationCircle
|
|
257
257
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -271,11 +271,11 @@ const _hoisted_2$e = /* @__PURE__ */ createElementVNode("path", {
|
|
|
271
271
|
const _hoisted_3$c = [
|
|
272
272
|
_hoisted_2$e
|
|
273
273
|
];
|
|
274
|
-
function _sfc_render$
|
|
274
|
+
function _sfc_render$e(_ctx, _cache) {
|
|
275
275
|
return openBlock(), createElementBlock("svg", _hoisted_1$k, _hoisted_3$c);
|
|
276
276
|
}
|
|
277
|
-
var exclamation = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
278
|
-
var
|
|
277
|
+
var exclamation = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$e]]);
|
|
278
|
+
var __glob_4_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
279
279
|
__proto__: null,
|
|
280
280
|
"default": exclamation
|
|
281
281
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -295,11 +295,11 @@ const _hoisted_2$d = /* @__PURE__ */ createElementVNode("path", {
|
|
|
295
295
|
const _hoisted_3$b = [
|
|
296
296
|
_hoisted_2$d
|
|
297
297
|
];
|
|
298
|
-
function _sfc_render$
|
|
298
|
+
function _sfc_render$d(_ctx, _cache) {
|
|
299
299
|
return openBlock(), createElementBlock("svg", _hoisted_1$j, _hoisted_3$b);
|
|
300
300
|
}
|
|
301
|
-
var plus = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$
|
|
302
|
-
var
|
|
301
|
+
var plus = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$d]]);
|
|
302
|
+
var __glob_4_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
303
303
|
__proto__: null,
|
|
304
304
|
"default": plus
|
|
305
305
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -319,11 +319,11 @@ const _hoisted_2$c = /* @__PURE__ */ createElementVNode("path", {
|
|
|
319
319
|
const _hoisted_3$a = [
|
|
320
320
|
_hoisted_2$c
|
|
321
321
|
];
|
|
322
|
-
function _sfc_render$
|
|
322
|
+
function _sfc_render$c(_ctx, _cache) {
|
|
323
323
|
return openBlock(), createElementBlock("svg", _hoisted_1$i, _hoisted_3$a);
|
|
324
324
|
}
|
|
325
|
-
var search = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$
|
|
326
|
-
var
|
|
325
|
+
var search = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c]]);
|
|
326
|
+
var __glob_4_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
327
327
|
__proto__: null,
|
|
328
328
|
"default": search
|
|
329
329
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -346,11 +346,11 @@ const _hoisted_2$b = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
|
|
|
346
346
|
const _hoisted_3$9 = [
|
|
347
347
|
_hoisted_2$b
|
|
348
348
|
];
|
|
349
|
-
function _sfc_render$
|
|
349
|
+
function _sfc_render$b(_ctx, _cache) {
|
|
350
350
|
return openBlock(), createElementBlock("svg", _hoisted_1$h, _hoisted_3$9);
|
|
351
351
|
}
|
|
352
|
-
var spinner = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$
|
|
353
|
-
var
|
|
352
|
+
var spinner = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$b], ["__scopeId", "data-v-683816b2"]]);
|
|
353
|
+
var __glob_4_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
354
354
|
__proto__: null,
|
|
355
355
|
"default": spinner
|
|
356
356
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -370,11 +370,11 @@ const _hoisted_2$a = /* @__PURE__ */ createElementVNode("path", {
|
|
|
370
370
|
const _hoisted_3$8 = [
|
|
371
371
|
_hoisted_2$a
|
|
372
372
|
];
|
|
373
|
-
function _sfc_render$
|
|
373
|
+
function _sfc_render$a(_ctx, _cache) {
|
|
374
374
|
return openBlock(), createElementBlock("svg", _hoisted_1$g, _hoisted_3$8);
|
|
375
375
|
}
|
|
376
|
-
var trash = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$
|
|
377
|
-
var
|
|
376
|
+
var trash = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$a]]);
|
|
377
|
+
var __glob_4_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
378
378
|
__proto__: null,
|
|
379
379
|
"default": trash
|
|
380
380
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -395,11 +395,11 @@ const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("path", {
|
|
|
395
395
|
const _hoisted_3$7 = [
|
|
396
396
|
_hoisted_2$9
|
|
397
397
|
];
|
|
398
|
-
function _sfc_render$
|
|
398
|
+
function _sfc_render$9(_ctx, _cache) {
|
|
399
399
|
return openBlock(), createElementBlock("svg", _hoisted_1$f, _hoisted_3$7);
|
|
400
400
|
}
|
|
401
|
-
var x = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$
|
|
402
|
-
var
|
|
401
|
+
var x = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$9]]);
|
|
402
|
+
var __glob_4_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
403
403
|
__proto__: null,
|
|
404
404
|
"default": x
|
|
405
405
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -422,32 +422,25 @@ function resolveIconComponent(name) {
|
|
|
422
422
|
}
|
|
423
423
|
return component;
|
|
424
424
|
}
|
|
425
|
-
const icons = { "../icons/arrow-narrow-down.vue":
|
|
426
|
-
const _sfc_main$f = defineComponent({
|
|
425
|
+
const icons = { "../icons/arrow-narrow-down.vue": __glob_4_0, "../icons/arrow-narrow-left.vue": __glob_4_1, "../icons/arrow-narrow-right.vue": __glob_4_2, "../icons/arrow-narrow-up.vue": __glob_4_3, "../icons/check-circle.vue": __glob_4_4, "../icons/check.vue": __glob_4_5, "../icons/chevron-left.vue": __glob_4_6, "../icons/chevron-right.vue": __glob_4_7, "../icons/exclamation-circle.vue": __glob_4_8, "../icons/exclamation.vue": __glob_4_9, "../icons/plus.vue": __glob_4_10, "../icons/search.vue": __glob_4_11, "../icons/spinner.vue": __glob_4_12, "../icons/trash.vue": __glob_4_13, "../icons/x.vue": __glob_4_14 };
|
|
426
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
427
|
+
name: "Icon",
|
|
427
428
|
props: {
|
|
428
429
|
name: {
|
|
429
430
|
type: String,
|
|
430
431
|
required: true
|
|
431
432
|
}
|
|
432
433
|
},
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
setup(__props) {
|
|
435
|
+
const props = __props;
|
|
436
|
+
const component = shallowRef(void 0);
|
|
437
|
+
watch(() => props.name, () => component.value = resolveIconComponent(props.name), { immediate: true });
|
|
438
|
+
return (_ctx, _cache) => {
|
|
439
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(component)), { class: "Icon" });
|
|
436
440
|
};
|
|
437
|
-
},
|
|
438
|
-
watch: {
|
|
439
|
-
name: {
|
|
440
|
-
immediate: true,
|
|
441
|
-
handler() {
|
|
442
|
-
this.component = resolveIconComponent(this.name);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
441
|
}
|
|
446
442
|
});
|
|
447
|
-
|
|
448
|
-
return openBlock(), createBlock(resolveDynamicComponent(__spreadValues({}, _ctx.component)), { class: "Icon" });
|
|
449
|
-
}
|
|
450
|
-
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$9], ["__scopeId", "data-v-3f9f02d0"]]);
|
|
443
|
+
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cc79c81e"]]);
|
|
451
444
|
var Breadcrumbs_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
452
445
|
const _sfc_main$e = defineComponent({
|
|
453
446
|
components: {
|
|
@@ -753,13 +746,9 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
753
746
|
createVNode(_component_Checkbox, {
|
|
754
747
|
disabled: option.disabled,
|
|
755
748
|
"model-value": _ctx.checkedValues[option.value],
|
|
749
|
+
caption: option.label,
|
|
756
750
|
"onUpdate:modelValue": ($event) => _ctx.toggleCheckedValue(option.value)
|
|
757
|
-
},
|
|
758
|
-
default: withCtx(() => [
|
|
759
|
-
createTextVNode(toDisplayString(option.label), 1)
|
|
760
|
-
]),
|
|
761
|
-
_: 2
|
|
762
|
-
}, 1032, ["disabled", "model-value", "onUpdate:modelValue"])
|
|
751
|
+
}, null, 8, ["disabled", "model-value", "caption", "onUpdate:modelValue"])
|
|
763
752
|
]);
|
|
764
753
|
}), 128))
|
|
765
754
|
]);
|
|
@@ -900,7 +889,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
900
889
|
};
|
|
901
890
|
}
|
|
902
891
|
});
|
|
903
|
-
var FormFields = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
892
|
+
var FormFields = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-6e4bafe2"]]);
|
|
904
893
|
var Form_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
905
894
|
const _hoisted_1$8 = { class: "Form" };
|
|
906
895
|
const _hoisted_2$6 = ["disabled"];
|
|
@@ -949,11 +938,11 @@ const _sfc_main$8 = defineComponent({
|
|
|
949
938
|
setup(__props, { emit: emits }) {
|
|
950
939
|
const props = __props;
|
|
951
940
|
const router = useRouter();
|
|
952
|
-
function
|
|
941
|
+
function handleSubmit() {
|
|
953
942
|
var _a;
|
|
954
943
|
(_a = props.submit) == null ? void 0 : _a.call(props, props.modelValue);
|
|
955
944
|
}
|
|
956
|
-
function
|
|
945
|
+
function handleCancel() {
|
|
957
946
|
var _a;
|
|
958
947
|
typeof props.cancel === "function" ? (_a = props.cancel) == null ? void 0 : _a.call(props) : props.cancel && router.push(props.cancel);
|
|
959
948
|
}
|
|
@@ -962,7 +951,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
962
951
|
__props.modelValue ? (openBlock(), createElementBlock("form", {
|
|
963
952
|
key: 0,
|
|
964
953
|
disabled: __props.submitting,
|
|
965
|
-
onSubmit: _cache[3] || (_cache[3] = withModifiers(($event) =>
|
|
954
|
+
onSubmit: _cache[3] || (_cache[3] = withModifiers(($event) => handleSubmit == null ? void 0 : handleSubmit(), ["prevent"]))
|
|
966
955
|
}, [
|
|
967
956
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.structure, (block, index) => {
|
|
968
957
|
return openBlock(), createElementBlock("div", { key: index }, [
|
|
@@ -976,9 +965,9 @@ const _sfc_main$8 = defineComponent({
|
|
|
976
965
|
}, null, 8, ["fields", "model-value", "errors"])
|
|
977
966
|
]);
|
|
978
967
|
}), 128)),
|
|
979
|
-
renderSlot(_ctx.$slots, "buttons", normalizeProps(guardReactiveProps({ cancel, submit })), () => [
|
|
980
|
-
submit || cancel ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
981
|
-
submit ? (openBlock(), createBlock(Button, {
|
|
968
|
+
renderSlot(_ctx.$slots, "buttons", normalizeProps(guardReactiveProps({ cancel: __props.cancel, submit: __props.submit })), () => [
|
|
969
|
+
__props.submit || __props.cancel ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
970
|
+
__props.submit ? (openBlock(), createBlock(Button, {
|
|
982
971
|
key: 0,
|
|
983
972
|
variant: "primary",
|
|
984
973
|
type: "submit",
|
|
@@ -986,11 +975,11 @@ const _sfc_main$8 = defineComponent({
|
|
|
986
975
|
disabled: __props.submitting,
|
|
987
976
|
"prefix-icon": __props.submitting ? "spinner" : void 0
|
|
988
977
|
}, null, 8, ["label", "disabled", "prefix-icon"])) : createCommentVNode("", true),
|
|
989
|
-
cancel ? (openBlock(), createBlock(Button, {
|
|
978
|
+
__props.cancel ? (openBlock(), createBlock(Button, {
|
|
990
979
|
key: 1,
|
|
991
980
|
label: __props.cancelLabel,
|
|
992
981
|
disabled: __props.submitting,
|
|
993
|
-
onClick: _cache[2] || (_cache[2] = ($event) =>
|
|
982
|
+
onClick: _cache[2] || (_cache[2] = ($event) => handleCancel())
|
|
994
983
|
}, null, 8, ["label", "disabled"])) : createCommentVNode("", true)
|
|
995
984
|
])) : createCommentVNode("", true)
|
|
996
985
|
], true)
|
|
@@ -1002,7 +991,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
1002
991
|
};
|
|
1003
992
|
}
|
|
1004
993
|
});
|
|
1005
|
-
var Form = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
994
|
+
var Form = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-c8cb4f5a"]]);
|
|
1006
995
|
var Input_vue_vue_type_style_index_0_lang = "";
|
|
1007
996
|
const sizes$1 = ["normal", "small"];
|
|
1008
997
|
const _sfc_main$7 = defineComponent({
|
|
@@ -1076,8 +1065,87 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1076
1065
|
], 2);
|
|
1077
1066
|
}
|
|
1078
1067
|
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3]]);
|
|
1068
|
+
var ModalLayout_vue_vue_type_style_index_0_lang = "";
|
|
1069
|
+
const _hoisted_1$6 = {
|
|
1070
|
+
key: 1,
|
|
1071
|
+
class: "ModalLayout__header"
|
|
1072
|
+
};
|
|
1073
|
+
const _hoisted_2$4 = { class: "ModalLayout__title" };
|
|
1074
|
+
const _hoisted_3$2 = { class: "ModalLayout__body" };
|
|
1075
|
+
const _hoisted_4 = {
|
|
1076
|
+
key: 2,
|
|
1077
|
+
class: "ModalLayout__footer"
|
|
1078
|
+
};
|
|
1079
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1080
|
+
name: "ModalLayout",
|
|
1081
|
+
props: {
|
|
1082
|
+
title: {
|
|
1083
|
+
type: String,
|
|
1084
|
+
default: ""
|
|
1085
|
+
},
|
|
1086
|
+
width: {
|
|
1087
|
+
type: [Number, String],
|
|
1088
|
+
default: 600
|
|
1089
|
+
},
|
|
1090
|
+
hideCloser: Boolean,
|
|
1091
|
+
scroll: Boolean,
|
|
1092
|
+
plain: Boolean
|
|
1093
|
+
},
|
|
1094
|
+
setup(__props) {
|
|
1095
|
+
const props = __props;
|
|
1096
|
+
const slots = useSlots();
|
|
1097
|
+
useAttrs();
|
|
1098
|
+
const hasHeader = computed(() => {
|
|
1099
|
+
return Boolean(slots.header || props.title);
|
|
1100
|
+
});
|
|
1101
|
+
const hasFooter = computed(() => {
|
|
1102
|
+
return Boolean(slots.footer);
|
|
1103
|
+
});
|
|
1104
|
+
const computedStyle = computed(() => {
|
|
1105
|
+
const maxWidth = props.width + (Number(props.width) ? "px" : "");
|
|
1106
|
+
if (maxWidth && maxWidth !== "auto") {
|
|
1107
|
+
return {
|
|
1108
|
+
width: "100%",
|
|
1109
|
+
maxWidth
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
return {};
|
|
1113
|
+
});
|
|
1114
|
+
function close() {
|
|
1115
|
+
window.dispatchEvent(new KeyboardEvent("keydown", { "key": "Escape" }));
|
|
1116
|
+
}
|
|
1117
|
+
return (_ctx, _cache) => {
|
|
1118
|
+
return openBlock(), createElementBlock("div", {
|
|
1119
|
+
class: normalizeClass(["ModalLayout", { hasHeader: unref(hasHeader), hasFooter: unref(hasFooter), isScrollable: _ctx.$props.scroll, isPlain: _ctx.$props.plain }]),
|
|
1120
|
+
style: normalizeStyle(unref(computedStyle))
|
|
1121
|
+
}, [
|
|
1122
|
+
!__props.hideCloser ? (openBlock(), createElementBlock("div", {
|
|
1123
|
+
key: 0,
|
|
1124
|
+
class: "ModalLayout__close",
|
|
1125
|
+
onClick: _cache[0] || (_cache[0] = ($event) => close())
|
|
1126
|
+
}, [
|
|
1127
|
+
createVNode(Icon, {
|
|
1128
|
+
name: "x",
|
|
1129
|
+
class: "ModalLayout__closeIcon"
|
|
1130
|
+
})
|
|
1131
|
+
])) : createCommentVNode("", true),
|
|
1132
|
+
unref(hasHeader) ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
1133
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1134
|
+
createElementVNode("div", _hoisted_2$4, toDisplayString(__props.title), 1)
|
|
1135
|
+
])
|
|
1136
|
+
])) : createCommentVNode("", true),
|
|
1137
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
1138
|
+
renderSlot(_ctx.$slots, "default")
|
|
1139
|
+
]),
|
|
1140
|
+
unref(hasFooter) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
1141
|
+
renderSlot(_ctx.$slots, "footer")
|
|
1142
|
+
])) : createCommentVNode("", true)
|
|
1143
|
+
], 6);
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1079
1147
|
const sizes = ["normal", "small"];
|
|
1080
|
-
const _sfc_main$
|
|
1148
|
+
const _sfc_main$5 = defineComponent({
|
|
1081
1149
|
mixins: [transformInputAttrs],
|
|
1082
1150
|
props: {
|
|
1083
1151
|
value: {
|
|
@@ -1121,9 +1189,9 @@ const _sfc_main$6 = defineComponent({
|
|
|
1121
1189
|
}
|
|
1122
1190
|
}
|
|
1123
1191
|
});
|
|
1124
|
-
const _hoisted_1$
|
|
1125
|
-
const _hoisted_2$
|
|
1126
|
-
const _hoisted_3$
|
|
1192
|
+
const _hoisted_1$5 = ["value"];
|
|
1193
|
+
const _hoisted_2$3 = ["disabled"];
|
|
1194
|
+
const _hoisted_3$1 = ["disabled", "value"];
|
|
1127
1195
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1128
1196
|
return openBlock(), createElementBlock("select", mergeProps({ class: "Select input" }, _ctx.normalizedAttrs, {
|
|
1129
1197
|
class: [_ctx.$attrs.class, { "input--small": _ctx.size === "small" }],
|
|
@@ -1134,20 +1202,20 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1134
1202
|
disabled: !_ctx.allowEmpty,
|
|
1135
1203
|
selected: "",
|
|
1136
1204
|
value: void 0
|
|
1137
|
-
}, toDisplayString(_ctx.placeholder), 9, _hoisted_2$
|
|
1205
|
+
}, toDisplayString(_ctx.placeholder), 9, _hoisted_2$3)) : createCommentVNode("", true),
|
|
1138
1206
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.normalizedOptions, (option) => {
|
|
1139
1207
|
return openBlock(), createElementBlock("option", {
|
|
1140
1208
|
key: option.value,
|
|
1141
1209
|
disabled: option.disabled,
|
|
1142
1210
|
value: option.value
|
|
1143
|
-
}, toDisplayString(option.label), 9, _hoisted_3$
|
|
1211
|
+
}, toDisplayString(option.label), 9, _hoisted_3$1);
|
|
1144
1212
|
}), 128))
|
|
1145
|
-
], 16, _hoisted_1$
|
|
1213
|
+
], 16, _hoisted_1$5);
|
|
1146
1214
|
}
|
|
1147
|
-
var Select = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1215
|
+
var Select = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$2]]);
|
|
1148
1216
|
var table = "";
|
|
1149
1217
|
var typography = "";
|
|
1150
|
-
const _sfc_main$
|
|
1218
|
+
const _sfc_main$4 = defineComponent({
|
|
1151
1219
|
props: {
|
|
1152
1220
|
items: {
|
|
1153
1221
|
type: Array,
|
|
@@ -1183,11 +1251,11 @@ const _sfc_main$5 = defineComponent({
|
|
|
1183
1251
|
}
|
|
1184
1252
|
}
|
|
1185
1253
|
});
|
|
1186
|
-
const _hoisted_1$
|
|
1187
|
-
const _hoisted_2$
|
|
1254
|
+
const _hoisted_1$4 = { class: "table table--hover" };
|
|
1255
|
+
const _hoisted_2$2 = ["width"];
|
|
1188
1256
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1189
1257
|
const _component_router_link = resolveComponent("router-link");
|
|
1190
|
-
return openBlock(), createElementBlock("table", _hoisted_1$
|
|
1258
|
+
return openBlock(), createElementBlock("table", _hoisted_1$4, [
|
|
1191
1259
|
createElementVNode("thead", null, [
|
|
1192
1260
|
createElementVNode("tr", null, [
|
|
1193
1261
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.normalizedColumns, (column, key) => {
|
|
@@ -1195,7 +1263,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1195
1263
|
key,
|
|
1196
1264
|
style: normalizeStyle({ textAlign: column.align || "left" }),
|
|
1197
1265
|
width: column.width
|
|
1198
|
-
}, toDisplayString(column.label), 13, _hoisted_2$
|
|
1266
|
+
}, toDisplayString(column.label), 13, _hoisted_2$2);
|
|
1199
1267
|
}), 128))
|
|
1200
1268
|
])
|
|
1201
1269
|
]),
|
|
@@ -1231,8 +1299,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1231
1299
|
])
|
|
1232
1300
|
]);
|
|
1233
1301
|
}
|
|
1234
|
-
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1235
|
-
const _sfc_main$
|
|
1302
|
+
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$1]]);
|
|
1303
|
+
const _sfc_main$3 = defineComponent({
|
|
1236
1304
|
mixins: [transformInputAttrs],
|
|
1237
1305
|
props: {
|
|
1238
1306
|
value: {
|
|
@@ -1241,95 +1309,14 @@ const _sfc_main$4 = defineComponent({
|
|
|
1241
1309
|
}
|
|
1242
1310
|
}
|
|
1243
1311
|
});
|
|
1244
|
-
const _hoisted_1$
|
|
1312
|
+
const _hoisted_1$3 = ["value"];
|
|
1245
1313
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1246
1314
|
return openBlock(), createElementBlock("textarea", mergeProps(_ctx.normalizedAttrs, {
|
|
1247
1315
|
class: ["Textarea input", _ctx.$attrs.class],
|
|
1248
1316
|
value: _ctx.value
|
|
1249
|
-
}), null, 16, _hoisted_1$
|
|
1317
|
+
}), null, 16, _hoisted_1$3);
|
|
1250
1318
|
}
|
|
1251
|
-
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1252
|
-
var ModalLayout_vue_vue_type_style_index_0_lang = "";
|
|
1253
|
-
const _hoisted_1$3 = {
|
|
1254
|
-
key: 1,
|
|
1255
|
-
class: "ModalLayout__header"
|
|
1256
|
-
};
|
|
1257
|
-
const _hoisted_2$2 = { class: "ModalLayout__title" };
|
|
1258
|
-
const _hoisted_3$1 = { class: "ModalLayout__body" };
|
|
1259
|
-
const _hoisted_4 = {
|
|
1260
|
-
key: 2,
|
|
1261
|
-
class: "ModalLayout__footer"
|
|
1262
|
-
};
|
|
1263
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1264
|
-
name: "ModalLayout",
|
|
1265
|
-
props: {
|
|
1266
|
-
title: {
|
|
1267
|
-
type: String,
|
|
1268
|
-
default: ""
|
|
1269
|
-
},
|
|
1270
|
-
width: {
|
|
1271
|
-
type: [Number, String],
|
|
1272
|
-
default: 600
|
|
1273
|
-
},
|
|
1274
|
-
hideCloser: Boolean,
|
|
1275
|
-
scroll: Boolean,
|
|
1276
|
-
plain: Boolean
|
|
1277
|
-
},
|
|
1278
|
-
setup(__props) {
|
|
1279
|
-
const props = __props;
|
|
1280
|
-
const slots = useSlots();
|
|
1281
|
-
useAttrs();
|
|
1282
|
-
getCurrentInstance();
|
|
1283
|
-
getCurrentScope();
|
|
1284
|
-
const hasHeader = computed(() => {
|
|
1285
|
-
return Boolean(slots.header || props.title);
|
|
1286
|
-
});
|
|
1287
|
-
const hasFooter = computed(() => {
|
|
1288
|
-
return Boolean(slots.footer);
|
|
1289
|
-
});
|
|
1290
|
-
const computedStyle = computed(() => {
|
|
1291
|
-
const maxWidth = props.width + (Number(props.width) ? "px" : "");
|
|
1292
|
-
if (maxWidth && maxWidth !== "auto") {
|
|
1293
|
-
return {
|
|
1294
|
-
width: "100%",
|
|
1295
|
-
maxWidth
|
|
1296
|
-
};
|
|
1297
|
-
}
|
|
1298
|
-
return {};
|
|
1299
|
-
});
|
|
1300
|
-
function close() {
|
|
1301
|
-
window.dispatchEvent(new KeyboardEvent("keydown", { "key": "Escape" }));
|
|
1302
|
-
}
|
|
1303
|
-
return (_ctx, _cache) => {
|
|
1304
|
-
return openBlock(), createElementBlock("div", {
|
|
1305
|
-
class: normalizeClass(["ModalLayout", { hasHeader: unref(hasHeader), hasFooter: unref(hasFooter), isScrollable: _ctx.$props.scroll, isPlain: _ctx.$props.plain }]),
|
|
1306
|
-
style: normalizeStyle(unref(computedStyle))
|
|
1307
|
-
}, [
|
|
1308
|
-
!__props.hideCloser ? (openBlock(), createElementBlock("div", {
|
|
1309
|
-
key: 0,
|
|
1310
|
-
class: "ModalLayout__close",
|
|
1311
|
-
onClick: _cache[0] || (_cache[0] = ($event) => close())
|
|
1312
|
-
}, [
|
|
1313
|
-
createVNode(Icon, {
|
|
1314
|
-
name: "x",
|
|
1315
|
-
class: "ModalLayout__closeIcon"
|
|
1316
|
-
})
|
|
1317
|
-
])) : createCommentVNode("", true),
|
|
1318
|
-
unref(hasHeader) ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1319
|
-
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1320
|
-
createElementVNode("div", _hoisted_2$2, toDisplayString(__props.title), 1)
|
|
1321
|
-
])
|
|
1322
|
-
])) : createCommentVNode("", true),
|
|
1323
|
-
createElementVNode("div", _hoisted_3$1, [
|
|
1324
|
-
renderSlot(_ctx.$slots, "default")
|
|
1325
|
-
]),
|
|
1326
|
-
unref(hasFooter) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
1327
|
-
renderSlot(_ctx.$slots, "footer")
|
|
1328
|
-
])) : createCommentVNode("", true)
|
|
1329
|
-
], 6);
|
|
1330
|
-
};
|
|
1331
|
-
}
|
|
1332
|
-
});
|
|
1319
|
+
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render]]);
|
|
1333
1320
|
var ModalLayoutDialog_vue_vue_type_style_index_0_lang = "";
|
|
1334
1321
|
const _hoisted_1$2 = { class: "ModalLayoutDialog__buttons" };
|
|
1335
1322
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -1352,7 +1339,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1352
1339
|
setup(__props) {
|
|
1353
1340
|
return (_ctx, _cache) => {
|
|
1354
1341
|
var _a;
|
|
1355
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1342
|
+
return openBlock(), createBlock(_sfc_main$6, {
|
|
1356
1343
|
ref: "root",
|
|
1357
1344
|
class: "ModalLayoutDialog",
|
|
1358
1345
|
width: "480",
|
|
@@ -1692,8 +1679,8 @@ function useSnackbar() {
|
|
|
1692
1679
|
var _a;
|
|
1693
1680
|
return (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$snackbar;
|
|
1694
1681
|
}
|
|
1695
|
-
function
|
|
1696
|
-
const
|
|
1682
|
+
function useSubmitAction(action, params = {}) {
|
|
1683
|
+
const snackbar2 = useSnackbar();
|
|
1697
1684
|
const modal2 = useModal();
|
|
1698
1685
|
const router = useRouter();
|
|
1699
1686
|
const isSubmitting = ref(false);
|
|
@@ -1701,7 +1688,7 @@ function useAction(action, params = {}) {
|
|
|
1701
1688
|
const errors = ref(Object.freeze({}));
|
|
1702
1689
|
const submit = async (data) => {
|
|
1703
1690
|
var _a;
|
|
1704
|
-
if (params.confirm) {
|
|
1691
|
+
if (params.confirm && modal2) {
|
|
1705
1692
|
const confirmed = await modal2.confirm(typeof params.confirm === "function" ? params.confirm(data) : params.confirm);
|
|
1706
1693
|
if (!confirmed) {
|
|
1707
1694
|
return;
|
|
@@ -1723,10 +1710,12 @@ function useAction(action, params = {}) {
|
|
|
1723
1710
|
try {
|
|
1724
1711
|
result.value = await action(data);
|
|
1725
1712
|
} catch (error) {
|
|
1726
|
-
|
|
1713
|
+
if (params.errorMessage && snackbar2) {
|
|
1714
|
+
snackbar2.error(typeof params.errorMessage === "function" ? params.errorMessage(error, data) : params.errorMessage || error.message);
|
|
1715
|
+
}
|
|
1727
1716
|
isSubmitting.value = false;
|
|
1728
1717
|
if (params.onError) {
|
|
1729
|
-
const hasErrorBeenResolved = params.onError({ error, data, router });
|
|
1718
|
+
const hasErrorBeenResolved = params.onError({ error, data, router, snackbar: snackbar2 });
|
|
1730
1719
|
if (hasErrorBeenResolved) {
|
|
1731
1720
|
return;
|
|
1732
1721
|
}
|
|
@@ -1734,10 +1723,10 @@ function useAction(action, params = {}) {
|
|
|
1734
1723
|
throw error;
|
|
1735
1724
|
}
|
|
1736
1725
|
isSubmitting.value = false;
|
|
1737
|
-
if (params.successMessage) {
|
|
1738
|
-
|
|
1726
|
+
if (params.successMessage && snackbar2) {
|
|
1727
|
+
snackbar2.success(typeof params.successMessage === "function" ? params.successMessage(result.value, data) : params.successMessage);
|
|
1739
1728
|
}
|
|
1740
|
-
(_a = params.onSuccess) == null ? void 0 : _a.call(params, { result: result.value, data, router });
|
|
1729
|
+
(_a = params.onSuccess) == null ? void 0 : _a.call(params, { result: result.value, data, router, snackbar: snackbar2 });
|
|
1741
1730
|
if (params.redirectOnSuccess) {
|
|
1742
1731
|
router.push(typeof params.redirectOnSuccess === "function" ? params.redirectOnSuccess(result.value, data) : params.redirectOnSuccess);
|
|
1743
1732
|
}
|
|
@@ -1753,4 +1742,28 @@ function useAction(action, params = {}) {
|
|
|
1753
1742
|
isSubmitting
|
|
1754
1743
|
};
|
|
1755
1744
|
}
|
|
1756
|
-
|
|
1745
|
+
const useLoadData = (source, options = {}) => {
|
|
1746
|
+
const {
|
|
1747
|
+
isSubmitting: isLoading,
|
|
1748
|
+
submit: load,
|
|
1749
|
+
result: data
|
|
1750
|
+
} = useSubmitAction(source, {
|
|
1751
|
+
onSuccess: ({ router, data: data2, result }) => {
|
|
1752
|
+
var _a;
|
|
1753
|
+
return (_a = options.onSuccess) == null ? void 0 : _a.call(options, { data: result, params: data2, router });
|
|
1754
|
+
},
|
|
1755
|
+
onError: ({ router, error, data: data2 }) => {
|
|
1756
|
+
var _a;
|
|
1757
|
+
return (_a = options.onError) == null ? void 0 : _a.call(options, { error, params: data2, router });
|
|
1758
|
+
},
|
|
1759
|
+
successMessage: options.successMessage,
|
|
1760
|
+
errorMessage: options.errorMessage,
|
|
1761
|
+
immediate: options.immediate
|
|
1762
|
+
});
|
|
1763
|
+
return {
|
|
1764
|
+
load,
|
|
1765
|
+
isLoading,
|
|
1766
|
+
data
|
|
1767
|
+
};
|
|
1768
|
+
};
|
|
1769
|
+
export { Breadcrumbs, Button, Checkbox, CheckboxGroup, Form, FormFields, FormGroup, Icon, Input, _sfc_main$6 as ModalLayout, Select, Table, Textarea, modal, registerCustomIconResolver, snackbar, useLoadData, useModal, useSnackbar, useSubmitAction };
|
package/dist/vuiii.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(c,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(c=typeof globalThis!="undefined"?globalThis:c||self,e(c.vui={},c.Vue,c.VueRouter))})(this,function(c,e,h){"use strict";var rn=Object.defineProperty,ln=Object.defineProperties;var sn=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var x=(c,e,h)=>e in c?rn(c,e,{enumerable:!0,configurable:!0,writable:!0,value:h}):c[e]=h,y=(c,e)=>{for(var h in e||(e={}))A.call(e,h)&&x(c,h,e[h]);if(E)for(var h of E(e))T.call(e,h)&&x(c,h,e[h]);return c},B=(c,e)=>ln(c,sn(e));var D=(c,e)=>{var h={};for(var b in c)A.call(c,b)&&e.indexOf(b)<0&&(h[b]=c[b]);if(c!=null&&E)for(var b of E(c))e.indexOf(b)<0&&T.call(c,b)&&(h[b]=c[b]);return h};var b="",u=(t,o)=>{const n=t.__vccOpts||t;for(const[a,l]of o)n[a]=l;return n};const P={},G={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},q=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16 17l-4 4m0 0l-4-4m4 4V3"},null,-1)];function K(t,o){return e.openBlock(),e.createElementBlock("svg",G,q)}var R=u(P,[["render",K]]),U=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));const H={},W={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},X=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 16l-4-4m0 0l4-4m-4 4h18"},null,-1)];function Y(t,o){return e.openBlock(),e.createElementBlock("svg",W,X)}var J=u(H,[["render",Y]]),Q=Object.freeze(Object.defineProperty({__proto__:null,default:J},Symbol.toStringTag,{value:"Module"}));const Z={},v={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ee=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"},null,-1)];function te(t,o){return e.openBlock(),e.createElementBlock("svg",v,ee)}var oe=u(Z,[["render",te]]),ne=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"}));const re={},le={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},se=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7l4-4m0 0l4 4m-4-4v18"},null,-1)];function ae(t,o){return e.openBlock(),e.createElementBlock("svg",le,se)}var ce=u(re,[["render",ae]]),ie=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"}));const de={},_e={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},pe=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)];function me(t,o){return e.openBlock(),e.createElementBlock("svg",_e,pe)}var ue=u(de,[["render",me]]),fe=Object.freeze(Object.defineProperty({__proto__:null,default:ue},Symbol.toStringTag,{value:"Module"}));const he={},ke={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ge=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)];function be(t,o){return e.openBlock(),e.createElementBlock("svg",ke,ge)}var ye=u(he,[["render",be]]),$e=Object.freeze(Object.defineProperty({__proto__:null,default:ye},Symbol.toStringTag,{value:"Module"}));const Be={},we={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Se=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19l-7-7 7-7"},null,-1)];function Ce(t,o){return e.openBlock(),e.createElementBlock("svg",we,Se)}var Ve=u(Be,[["render",Ce]]),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:Ve},Symbol.toStringTag,{value:"Module"}));const Ne={},Me={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},je=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 5l7 7-7 7"},null,-1)];function Ie(t,o){return e.openBlock(),e.createElementBlock("svg",Me,je)}var ze=u(Ne,[["render",Ie]]),Oe=Object.freeze(Object.defineProperty({__proto__:null,default:ze},Symbol.toStringTag,{value:"Module"}));const Fe={},Le={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},xe=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)];function Ae(t,o){return e.openBlock(),e.createElementBlock("svg",Le,xe)}var Te=u(Fe,[["render",Ae]]),De=Object.freeze(Object.defineProperty({__proto__:null,default:Te},Symbol.toStringTag,{value:"Module"}));const Pe={},Ge={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},qe=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1)];function Ke(t,o){return e.openBlock(),e.createElementBlock("svg",Ge,qe)}var Re=u(Pe,[["render",Ke]]),Ue=Object.freeze(Object.defineProperty({__proto__:null,default:Re},Symbol.toStringTag,{value:"Module"}));const He={},We={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Xe=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"},null,-1)];function Ye(t,o){return e.openBlock(),e.createElementBlock("svg",We,Xe)}var Je=u(He,[["render",Ye]]),Qe=Object.freeze(Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"}));const Ze={},ve={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},et=[e.createElementVNode("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)];function tt(t,o){return e.openBlock(),e.createElementBlock("svg",ve,et)}var ot=u(Ze,[["render",tt]]),nt=Object.freeze(Object.defineProperty({__proto__:null,default:ot},Symbol.toStringTag,{value:"Module"})),yn="";const rt={},lt=t=>(e.pushScopeId("data-v-683816b2"),t=t(),e.popScopeId(),t),st={class:"IconSpinner",fill:"none",stroke:"currentColor",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg"},at=[lt(()=>e.createElementVNode("path",{d:"M23.5 12.5c0 6.1-4.9 11-11 11s-11-4.9-11-11 4.9-11 11-11","shape-rendering":"geometricPrecision",style:{"stroke-width":"2","stroke-miterlimit":"10",stroke:"currentColor",fill:"none"},"vector-effect":"non-scaling-stroke"},null,-1))];function ct(t,o){return e.openBlock(),e.createElementBlock("svg",st,at)}var it=u(rt,[["render",ct],["__scopeId","data-v-683816b2"]]),dt=Object.freeze(Object.defineProperty({__proto__:null,default:it},Symbol.toStringTag,{value:"Module"}));const _t={},pt={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},mt=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"},null,-1)];function ut(t,o){return e.openBlock(),e.createElementBlock("svg",pt,mt)}var ft=u(_t,[["render",ut]]),ht=Object.freeze(Object.defineProperty({__proto__:null,default:ft},Symbol.toStringTag,{value:"Module"}));const kt={},gt={"aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},bt=[e.createElementVNode("path",{d:"M6 18L18 6M6 6l12 12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)];function yt(t,o){return e.openBlock(),e.createElementBlock("svg",gt,bt)}var $t=u(kt,[["render",yt]]),Bt=Object.freeze(Object.defineProperty({__proto__:null,default:$t},Symbol.toStringTag,{value:"Module"}));function wt(t,o){var n;return(n=Object.entries(t).map(([a,l])=>({path:a,source:l})).find(a=>a.path.endsWith(`/${o}`)))==null?void 0:n.source.default}var Sn="";let N;function St(t){N=t}function Ct(t){let o;return N&&(o=N(t)),o||(o=wt(Vt,`${t}.vue`)),o}const Vt={"../icons/arrow-narrow-down.vue":U,"../icons/arrow-narrow-left.vue":Q,"../icons/arrow-narrow-right.vue":ne,"../icons/arrow-narrow-up.vue":ie,"../icons/check-circle.vue":fe,"../icons/check.vue":$e,"../icons/chevron-left.vue":Ee,"../icons/chevron-right.vue":Oe,"../icons/exclamation-circle.vue":De,"../icons/exclamation.vue":Ue,"../icons/plus.vue":Qe,"../icons/search.vue":nt,"../icons/spinner.vue":dt,"../icons/trash.vue":ht,"../icons/x.vue":Bt},Et=e.defineComponent({props:{name:{type:String,required:!0}},data(){return{component:void 0}},watch:{name:{immediate:!0,handler(){this.component=Ct(this.name)}}}});function Nt(t,o,n,a,l,_){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(y({},t.component)),{class:"Icon"})}var $=u(Et,[["render",Nt],["__scopeId","data-v-3f9f02d0"]]),Cn="";const Mt=e.defineComponent({components:{Icon:$},props:{breadcrumbs:{type:Object,default:()=>({})}}}),jt={class:"Breadcrumbs"};function It(t,o,n,a,l,_){const s=e.resolveComponent("router-link"),r=e.resolveComponent("Icon");return e.openBlock(),e.createElementBlock("div",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.breadcrumbs,(d,m,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"Breadcrumbs__breadcrumb"},[e.createVNode(s,{to:d,class:"Breadcrumbs__link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m),1)]),_:2},1032,["to"]),e.createVNode(r,{name:"chevron-right",class:"Breadcrumbs__arrow"})]))),128))])}var zt=u(Mt,[["render",It],["__scopeId","data-v-357000f6"]]),Vn="",En="";const Ot=["normal","small"],Ft=["default","primary","secondary","danger"],Lt=e.defineComponent({components:{Icon:$},inheritAttrs:!1,props:{size:{type:String,default:"normal",validator:t=>Ot.includes(t)},variant:{type:String,default:"default",validator:t=>Ft.includes(t)},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},label:{type:String,default:""},active:Boolean,loading:Boolean,block:Boolean,disabled:Boolean},computed:{component(){return this.$attrs.to?"router-link":this.$attrs.href?"a":"button"},classModifiers(){const t=[this.size,this.variant];return this.active&&t.push("active"),this.loading&&t.push("loading"),this.disabled&&t.push("disabled"),t.map(o=>`button--${o}`)},normalizedAttrs(){return y({type:this.component==="button"?"button":void 0},this.$attrs)}}}),xt={key:1};function At(t,o,n,a,l,_){const s=e.resolveComponent("Icon");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),e.mergeProps({class:["Button button",[t.classModifiers,{"Button--block":t.block},{"button--disabled":t.$attrs.disabled}]]},t.normalizedAttrs),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix",{},()=>[t.prefixIcon&&!t.loading?(e.openBlock(),e.createBlock(s,{key:0,class:e.normalizeClass(["Button__icon Button__icon--prefix",[`Button__icon--${t.size}`]]),name:t.prefixIcon},null,8,["class","name"])):e.createCommentVNode("",!0)],!0),t.loading?(e.openBlock(),e.createBlock(s,{key:0,class:e.normalizeClass(["Button__icon Button__icon--prefix",[`Button__icon--${t.size}`]]),name:"spinner"},null,8,["class"])):e.createCommentVNode("",!0),t.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",xt,[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"suffix",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(s,{key:0,class:e.normalizeClass(["Button__icon Button__icon--suffix",[`Button__icon--${t.size}`]]),name:t.suffixIcon},null,8,["class","name"])):e.createCommentVNode("",!0)],!0)]),_:3},16,["class"])}var S=u(Lt,[["render",At],["__scopeId","data-v-4c3e5fdd"]]),Nn="";const C=e.defineComponent({emits:["update:modelValue"],computed:{normalizedAttrs(){const t=l=>l.getAttribute("type")==="number"?l.valueAsNumber:l.getAttribute("type")==="checkbox"?l.checked:l.value,a=this.$attrs,{class:o}=a,n=D(a,["class"]);return B(y({},n),{onInput:l=>this.$emit("update:modelValue",t(l.target))})}}});var Mn="";const Tt=e.defineComponent({mixins:[C],inheritAttrs:!1,props:{modelValue:Boolean,required:Boolean,switch:Boolean,caption:{type:String,default:""}}}),Dt=t=>(e.pushScopeId("data-v-6d3aac34"),t=t(),e.popScopeId(),t),Pt=["checked","required"],Gt=[Dt(()=>e.createElementVNode("div",{class:"Checkbox__switchDot"},null,-1))],qt={key:1,class:"Checkbox__label"},Kt={key:0,class:"Checkbox__required"};function Rt(t,o,n,a,l,_){return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["Checkbox",[t.$attrs.class,{"Checkbox--disabled":t.$attrs.disabled}]])},[e.withDirectives(e.createElementVNode("input",e.mergeProps(t.normalizedAttrs,{checked:t.modelValue,class:"Checkbox__input input",required:t.required,type:"checkbox"}),null,16,Pt),[[e.vShow,!t.$props.switch]]),t.$props.switch?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["Checkbox__switch",{"Checkbox__switch--active":t.modelValue}])},Gt,2)):e.createCommentVNode("",!0),t.$slots.default||t.caption?(e.openBlock(),e.createElementBlock("div",qt,[t.required?(e.openBlock(),e.createElementBlock("span",Kt,"*")):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.caption),1)],!0)])):e.createCommentVNode("",!0)],2)}var j=u(Tt,[["render",Rt],["__scopeId","data-v-6d3aac34"]]);function V(t,o){return typeof o=="function"?o(t):o||o===0?t[o]:t}function I(t,o={}){return Array.isArray(t)?t.map(n=>({value:V(n,o.value),label:V(n,o.label),description:o.description&&V(n,o.description),disabled:o.disabled&&V(n,o.disabled)})):Object.entries(t||{}).reduce((n,[a,l])=>n.concat({value:a,label:l}),[])}var In="";const Ut=e.defineComponent({components:{Checkbox:j},props:{modelValue:{type:Array,default:()=>[]},options:{type:[Array,Object],required:!0},optionLabelKey:{type:[Function,String,Number],default:void 0},optionValueKey:{type:[Function,String,Number],default:void 0},optionDisabledKey:{type:[Function,String,Number],default:void 0}},emits:["update:modelValue"],computed:{normalizedOptions(){return I(this.options,{value:this.optionValueKey,label:this.optionLabelKey,disabled:this.optionDisabledKey})},checkedValues(){return this.modelValue.reduce((t,o)=>B(y({},t),{[o]:!0}),{})}},methods:{toggleCheckedValue(t){const o=B(y({},this.checkedValues),{[t]:!this.checkedValues[t]}),n=Object.entries(o).filter(([a,l])=>l).map(([a])=>a);this.$emit("update:modelValue",n)}}}),Ht={class:"CheckboxGroup"};function Wt(t,o,n,a,l,_){const s=e.resolveComponent("Checkbox");return e.openBlock(),e.createElementBlock("div",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedOptions,r=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[e.createVNode(s,{disabled:r.disabled,"model-value":t.checkedValues[r.value],"onUpdate:modelValue":d=>t.toggleCheckedValue(r.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["disabled","model-value","onUpdate:modelValue"])]))),128))])}var Xt=u(Ut,[["render",Wt]]),zn="";const Yt=e.defineComponent({props:{label:{type:String,default:""},error:{type:[String,Array,Boolean],default:""},description:{type:String,default:""},hint:{type:String,default:""},required:Boolean},computed:{errorMessage(){return Array.isArray(this.error)?this.error.filter(Boolean).join(" "):typeof this.error=="string"?this.error:""}}}),Jt={key:0,class:"FormGroup__header"},Qt={class:"FormGroup__label"},Zt={key:0,class:"FormGroup__required"},vt={key:1,class:"FormGroup__description"},eo={key:2,class:"FormGroup__hint"},to={key:3,class:"FormGroup__error"};function oo(t,o,n,a,l,_){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["FormGroup",{"FormGroup--invalid":t.error}])},[t.label?(e.openBlock(),e.createElementBlock("div",Jt,[e.createElementVNode("label",Qt,e.toDisplayString(t.label),1),t.required?(e.openBlock(),e.createElementBlock("div",Zt,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.$slots.description||t.description?(e.openBlock(),e.createElementBlock("div",vt,[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),t.$slots.hint||t.hint?(e.openBlock(),e.createElementBlock("div",eo,[e.renderSlot(t.$slots,"hint",{},()=>[e.createTextVNode(e.toDisplayString(t.hint),1)],!0)])):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("div",to,e.toDisplayString(t.errorMessage),1)):e.createCommentVNode("",!0)],2)}var z=u(Yt,[["render",oo],["__scopeId","data-v-4214535a"]]),On="";const no={class:"FormFields"},ro=e.defineComponent({name:"FormFields",props:{fields:{type:Object,default:()=>({})},modelValue:{type:Object,default:()=>({})},errors:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t;function a(_){var r;return(((r=n.fields[_].value)==null?void 0:r.getter)||(d=>d[_]))(n.modelValue)}function l(_,s){var m;const d=(((m=n.fields[_].value)==null?void 0:m.setter)||((p,i)=>B(y({},i),{[_]:p})))(s,n.modelValue);o("update:modelValue",d)}return(_,s)=>(e.openBlock(),e.createElementBlock("div",no,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fields,(r,d)=>{var m;return e.openBlock(),e.createBlock(z,{key:d,label:r.label,description:r.description,hint:r.hint,required:r.required,error:(m=t.errors)==null?void 0:m[d]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),e.mergeProps({"model-value":a(String(d))},r.props,{"onUpdate:modelValue":p=>l(String(d),p)}),null,16,["model-value","onUpdate:modelValue"]))]),_:2},1032,["label","description","hint","required","error"])}),128))]))}});var O=u(ro,[["__scopeId","data-v-319aedc6"]]),Fn="";const lo={class:"Form"},so=["disabled"],ao={key:0,class:"Form__title"},co={key:0,class:"Form__buttons"},io=e.defineComponent({name:"Form",props:{structure:{type:Object,default:()=>({})},modelValue:{type:Object,default:()=>{}},errors:{type:Object,default:()=>({})},submit:{type:Function,default:void 0},submitLabel:{type:String,default:"Submit"},cancel:{type:[Function,Object],default:void 0},cancelLabel:{type:String,default:"Cancel"},submitting:Boolean},emits:["update:modelValue","change","submit","cancel"],setup(t,{emit:o}){const n=t,a=h.useRouter();function l(){var s;(s=n.submit)==null||s.call(n,n.modelValue)}function _(){var s;typeof n.cancel=="function"?(s=n.cancel)==null||s.call(n):n.cancel&&a.push(n.cancel)}return(s,r)=>(e.openBlock(),e.createElementBlock("div",lo,[t.modelValue?(e.openBlock(),e.createElementBlock("form",{key:0,disabled:t.submitting,onSubmit:r[3]||(r[3]=e.withModifiers(d=>l==null?void 0:l(),["prevent"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.structure,(d,m)=>(e.openBlock(),e.createElementBlock("div",{key:m},[d.title?(e.openBlock(),e.createElementBlock("div",ao,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0),e.createVNode(O,{fields:d.fields,"model-value":t.modelValue,errors:t.errors,"onUpdate:modelValue":r[0]||(r[0]=p=>o("update:modelValue",p)),onChange:r[1]||(r[1]=p=>o("change",p))},null,8,["fields","model-value","errors"])]))),128)),e.renderSlot(s.$slots,"buttons",e.normalizeProps(e.guardReactiveProps({cancel:_,submit:l})),()=>[l||_?(e.openBlock(),e.createElementBlock("div",co,[l?(e.openBlock(),e.createBlock(S,{key:0,variant:"primary",type:"submit",label:t.submitLabel,disabled:t.submitting,"prefix-icon":t.submitting?"spinner":void 0},null,8,["label","disabled","prefix-icon"])):e.createCommentVNode("",!0),_?(e.openBlock(),e.createBlock(S,{key:1,label:t.cancelLabel,disabled:t.submitting,onClick:r[2]||(r[2]=d=>_())},null,8,["label","disabled"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],!0)],40,so)):(e.openBlock(),e.createBlock($,{key:1,name:"spinner"}))]))}});var _o=u(io,[["__scopeId","data-v-5366fc3a"]]),Ln="";const po=["normal","small"],mo=e.defineComponent({components:{Icon:$},mixins:[C],inheritAttrs:!1,props:{modelValue:{type:[Number,String],default:""},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},size:{type:String,default:"normal",validator:t=>po.includes(t)},invalid:Boolean},computed:{hasPrefix(){return Boolean(this.$slots.prefix||this.prefixIcon)},hasSuffix(){return Boolean(this.$slots.suffix||this.suffixIcon)}}}),uo={class:"Input__icon Input__icon--left"},fo=["aria-label","value"],ho={class:"Input__icon Input__icon--right"};function ko(t,o,n,a,l,_){const s=e.resolveComponent("Icon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["Input input",[t.$attrs.class,{"input--invalid":t.invalid,"input--disabled":t.$attrs.disabled,"input--small":t.size==="small"}]]),onClick:o[0]||(o[0]=r=>t.$refs.input.focus())},[t.hasPrefix?e.renderSlot(t.$slots,"prefix",{key:0},()=>[e.createElementVNode("div",uo,[e.createVNode(s,{name:t.prefixIcon},null,8,["name"])])]):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({ref:"input","aria-label":t.$attrs.placeholder||"input"},t.normalizedAttrs,{class:"Input__nestedInput input__nested",value:t.modelValue}),null,16,fo),t.hasSuffix?e.renderSlot(t.$slots,"suffix",{key:1},()=>[e.createElementVNode("div",ho,[e.createVNode(s,{name:t.suffixIcon},null,8,["name"])])]):e.createCommentVNode("",!0)],2)}var go=u(mo,[["render",ko]]);const bo=["normal","small"],yo=e.defineComponent({mixins:[C],props:{value:{type:[String,Number,Object],default:""},options:{type:[Array,Object],required:!0},optionLabelKey:{type:[Function,String,Number],default:void 0},optionValueKey:{type:[Function,String,Number],default:void 0},optionDisabledKey:{type:[Function,String,Number],default:void 0},placeholder:{type:String,default:""},size:{type:String,default:"normal",validator:t=>bo.includes(t)},allowEmpty:Boolean},computed:{normalizedOptions(){return I(this.options,{value:this.optionValueKey,label:this.optionLabelKey,disabled:this.optionDisabledKey})}}}),$o=["value"],Bo=["disabled"],wo=["disabled","value"];function So(t,o,n,a,l,_){return e.openBlock(),e.createElementBlock("select",e.mergeProps({class:"Select input"},t.normalizedAttrs,{class:[t.$attrs.class,{"input--small":t.size==="small"}],value:t.value}),[t.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,disabled:!t.allowEmpty,selected:"",value:void 0},e.toDisplayString(t.placeholder),9,Bo)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedOptions,s=>(e.openBlock(),e.createElementBlock("option",{key:s.value,disabled:s.disabled,value:s.value},e.toDisplayString(s.label),9,wo))),128))],16,$o)}var Co=u(yo,[["render",So]]),xn="",An="";const Vo=e.defineComponent({props:{items:{type:Array,default:()=>[]},columns:{type:Object,default:null},rowClass:{type:[String,Function],default:null}},computed:{normalizedColumns(){return Object.entries(this.columns).reduce((t,[o,n])=>B(y({},t),{[o]:typeof n=="string"?{label:n}:n}),{})}},methods:{formatValue(t,o){const n=this.normalizedColumns[o],a=typeof n.value=="function"?n.value(t):t[o];return n.format?n.format(a):a},resolveRowClass(t){return typeof this.rowClass=="function"?this.rowClass(t):this.rowClass}}}),Eo={class:"table table--hover"},No=["width"];function Mo(t,o,n,a,l,_){const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("table",Eo,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedColumns,(r,d)=>(e.openBlock(),e.createElementBlock("th",{key:d,style:e.normalizeStyle({textAlign:r.align||"left"}),width:r.width},e.toDisplayString(r.label),13,No))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(r,d)=>(e.openBlock(),e.createElementBlock("tr",{key:d,class:e.normalizeClass(t.resolveRowClass(r))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedColumns,(m,p)=>(e.openBlock(),e.createElementBlock("td",{key:p,style:e.normalizeStyle({textAlign:m.align||"left"})},[e.renderSlot(t.$slots,p,e.normalizeProps(e.guardReactiveProps({item:r})),()=>[m.href?(e.openBlock(),e.createBlock(s,{key:0,class:"link",to:m.href(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.formatValue(r,p)),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.formatValue(r,p)),1)],64))])],4))),128))],2))),128))])])}var jo=u(Vo,[["render",Mo]]);const Io=e.defineComponent({mixins:[C],props:{value:{type:String,default:""}}}),zo=["value"];function Oo(t,o,n,a,l,_){return e.openBlock(),e.createElementBlock("textarea",e.mergeProps(t.normalizedAttrs,{class:["Textarea input",t.$attrs.class],value:t.value}),null,16,zo)}var Fo=u(Io,[["render",Oo]]),Tn="";const Lo={key:1,class:"ModalLayout__header"},xo={class:"ModalLayout__title"},Ao={class:"ModalLayout__body"},To={key:2,class:"ModalLayout__footer"},Do=e.defineComponent({name:"ModalLayout",props:{title:{type:String,default:""},width:{type:[Number,String],default:600},hideCloser:Boolean,scroll:Boolean,plain:Boolean},setup(t){const o=t,n=e.useSlots();e.useAttrs(),e.getCurrentInstance(),e.getCurrentScope();const a=e.computed(()=>Boolean(n.header||o.title)),l=e.computed(()=>Boolean(n.footer)),_=e.computed(()=>{const r=o.width+(Number(o.width)?"px":"");return r&&r!=="auto"?{width:"100%",maxWidth:r}:{}});function s(){window.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"}))}return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ModalLayout",{hasHeader:e.unref(a),hasFooter:e.unref(l),isScrollable:r.$props.scroll,isPlain:r.$props.plain}]),style:e.normalizeStyle(e.unref(_))},[t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"ModalLayout__close",onClick:d[0]||(d[0]=m=>s())},[e.createVNode($,{name:"x",class:"ModalLayout__closeIcon"})])),e.unref(a)?(e.openBlock(),e.createElementBlock("div",Lo,[e.renderSlot(r.$slots,"header",{},()=>[e.createElementVNode("div",xo,e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ao,[e.renderSlot(r.$slots,"default")]),e.unref(l)?(e.openBlock(),e.createElementBlock("div",To,[e.renderSlot(r.$slots,"footer")])):e.createCommentVNode("",!0)],6))}});var Dn="";const Po={class:"ModalLayoutDialog__buttons"},Go=e.defineComponent({name:"ModalLayoutDialog",props:{title:{type:String,default:""},message:{type:String,default:""},buttons:{type:Array,default:()=>[]}},emits:["close"],setup(t){return(o,n)=>{var a;return e.openBlock(),e.createBlock(Do,{ref:"root",class:"ModalLayoutDialog",width:"480",title:o.$props.title},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$props.message)+" ",1)]),_:2},[(a=o.$props.buttons)!=null&&a.length?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",Po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.$props.buttons,(l,_)=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"ModalLayoutDialog__buttonWrapper"},[e.createVNode(S,{type:"button",variant:l.variant,"prefix-icon":l.icon,autofocus:"",onClick:s=>o.$emit("close",l.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["variant","prefix-icon","onClick"])]))),128))])])}:void 0]),1032,["title"])}}});var Pn="";const qo={class:"ModalStack"},Ko={key:0,class:"ModalStack__backdrop"},Ro=["onClick"],Uo=e.defineComponent({name:"ModalStack",props:{modals:{type:Array,default:()=>[]}},emits:["closeModal"],setup(t,{emit:o}){const n=t,a=e.ref({}),l=e.computed(()=>n.modals.length?n.modals[n.modals.length-1]:null);function _(p){return i=>a.value[p]=i}function s(p,i){var g;const f=()=>{o("closeModal",{modal:p,result:i})},k=a.value[p.id].$refs.root;(g=k.$attrs)!=null&&g.onBeforeClose?k.$attrs.onBeforeClose(f):f()}function r(){l.value&&s(l.value)}function d(p){l.value&&p.key==="Escape"&&!p.defaultPrevented&&(p.preventDefault(),r())}function m(p,i){p.target===p.currentTarget&&s(i)}return e.onMounted(()=>{window.addEventListener("keydown",d)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",d)}),(p,i)=>(e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(e.Transition,{name:"ModalStack__backdrop"},{default:e.withCtx(()=>[n.modals.length?(e.openBlock(),e.createElementBlock("div",Ko)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{name:"ModalStack__modal"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.modals,f=>{var k;return e.openBlock(),e.createElementBlock("div",{key:f.id,class:"ModalStack__modalWrapper",onClick:g=>m(g,f)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),e.mergeProps(f.props,{ref_for:!0,ref:_(f.id),class:["ModalStack__modal",{isActive:((k=e.unref(l))==null?void 0:k.id)===f.id}],onClose:g=>s(f,g)}),null,16,["class","onClose"]))],8,Ro)}),128))]),_:1})]))}}),Ho={cancelLabel:"Cancel",confirmLabel:"OK"},Wo=(t,o={})=>{let n=1;o=y(y({},Ho),o);const a=e.reactive({modals:[]}),l=(i,f)=>{var k;a.modals=a.modals.filter(({id:g})=>g!==i.id),i.resolve(f),(k=i.focusElement)==null||k.focus()},_=e.createApp({parent:t,data(){return a},render(){return e.h(Uo,{modals:a.modals,onCloseModal:({modal:i,result:f})=>l(i,f)})}}),s=document.createElement("div");document.body.appendChild(s),_.mount(s);const r=(i,f)=>{var g;const k=document.activeElement;return(g=k.blur)==null||g.call(k),new Promise(w=>{a.modals.push({id:n++,component:i,props:f,resolve:w,focusElement:k})})},d=i=>r(Go,i),m=i=>{typeof i=="string"&&(i={message:i});const{title:f,message:k,confirmVariant:g,confirmLabel:w=o.confirmLabel,confirmIcon:M}=i;return d({title:f,message:k,buttons:[{variant:g||"primary",label:w||"",icon:M}]})},p=i=>{typeof i=="string"&&(i={message:i});const{title:f,message:k,cancelLabel:g=o.cancelLabel,cancelVariant:w,cancelIcon:M,confirmLabel:tn=o.confirmLabel,confirmVariant:on,confirmIcon:nn}=i;return d({title:f,message:k,buttons:[{variant:w||"secondary",label:g||"",icon:M,value:!1},{variant:on||"primary",label:tn||"",icon:nn,value:!0}]})};t.config.globalProperties.$modal={open:r,dialog:d,alert:m,confirm:p}};function F(){var t;return(t=e.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$modal}var Gn="";const Xo={class:"Snackbar"},Yo=["onClick"],Jo=e.defineComponent({name:"SnackbarStack",props:{messages:{type:Array,default:()=>[]}},emits:["remove-message"],setup(t,{emit:o}){const n=t,a=e.computed(()=>[...n.messages].reverse());return(l,_)=>(e.openBlock(),e.createElementBlock("div",Xo,[e.createVNode(e.TransitionGroup,{name:"Snackbar__transition"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(s,r)=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:"Snackbar__message"},[e.createElementVNode("div",{class:"Snackbar__messageWrapper",style:e.normalizeStyle({transform:`translateY(-${100*r}%)`})},[e.createElementVNode("div",{class:e.normalizeClass(["Snackbar__messageBlock",`Snackbar__messageBlock--${s.type}`])},[e.createElementVNode("div",null,e.toDisplayString(s.text),1),e.createElementVNode("div",{class:"Snackbar__messageClose",onClick:d=>l.$emit("remove-message",s.id)},[e.createVNode($,{class:"Snackbar__messageCloseIcon",name:"x"})],8,Yo)],2)],4)]))),128))]),_:1})]))}}),Qo=1e4,Zo=5,vo=t=>{let o=1;const n=e.reactive({messages:[]}),a=r=>{n.messages=n.messages.filter(({id:d})=>d!==r)},l=e.createApp({parent:t,data(){return n},render(){return e.h(Jo,{messages:this.messages,onRemoveMessage:a})}}),_=document.createElement("div");document.body.appendChild(_),l.mount(_);const s=(r,d="success",m=Qo)=>{const p=o++;n.messages.push({text:r,type:d,id:p}),n.messages.length>Zo&&n.messages.shift(),m>0&&setTimeout(()=>a(p),m)};t.config.globalProperties.$snackbar={success:r=>s(r,"success"),error:r=>s(r,"error",0)}};function L(){var t;return(t=e.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$snackbar}function en(t,o={}){const n=L(),a=F(),l=h.useRouter(),_=e.ref(!1),s=e.ref(),r=e.ref(Object.freeze({})),d=async m=>{var p;if(!(o.confirm&&!await a.confirm(typeof o.confirm=="function"?o.confirm(m):o.confirm))){if(o.validator){const i=await o.validator(m);if(!i||typeof i=="object"&&(r.value=(i==null?void 0:i.errors)||{},!(i!=null&&i.isValid)))return}_.value=!0;try{s.value=await t(m)}catch(i){if(n.error(typeof o.errorMessage=="function"?o.errorMessage(i,m):o.errorMessage||i.message),_.value=!1,o.onError&&o.onError({error:i,data:m,router:l}))return;throw i}return _.value=!1,o.successMessage&&n.success(typeof o.successMessage=="function"?o.successMessage(s.value,m):o.successMessage),(p=o.onSuccess)==null||p.call(o,{result:s.value,data:m,router:l}),o.redirectOnSuccess&&l.push(typeof o.redirectOnSuccess=="function"?o.redirectOnSuccess(s.value,m):o.redirectOnSuccess),s.value}};return o.immediate&&e.onMounted(d),{submit:d,errors:r,result:s,isSubmitting:_}}c.Breadcrumbs=zt,c.Button=S,c.Checkbox=j,c.CheckboxGroup=Xt,c.Form=_o,c.FormFields=O,c.FormGroup=z,c.Icon=$,c.Input=go,c.Select=Co,c.Table=jo,c.Textarea=Fo,c.modal=Wo,c.registerCustomIconResolver=St,c.snackbar=vo,c.useAction=en,c.useModal=F,c.useSnackbar=L,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(c,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(c=typeof globalThis!="undefined"?globalThis:c||self,e(c.vui={},c.Vue,c.VueRouter))})(this,function(c,e,h){"use strict";var nn=Object.defineProperty,rn=Object.defineProperties;var ln=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var D=(c,e,h)=>e in c?nn(c,e,{enumerable:!0,configurable:!0,writable:!0,value:h}):c[e]=h,y=(c,e)=>{for(var h in e||(e={}))T.call(e,h)&&D(c,h,e[h]);if(E)for(var h of E(e))P.call(e,h)&&D(c,h,e[h]);return c},B=(c,e)=>rn(c,ln(e));var G=(c,e)=>{var h={};for(var b in c)T.call(c,b)&&e.indexOf(b)<0&&(h[b]=c[b]);if(c!=null&&E)for(var b of E(c))e.indexOf(b)<0&&P.call(c,b)&&(h[b]=c[b]);return h};var b="",u=(t,o)=>{const n=t.__vccOpts||t;for(const[a,s]of o)n[a]=s;return n};const q={},R={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},K=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16 17l-4 4m0 0l-4-4m4 4V3"},null,-1)];function U(t,o){return e.openBlock(),e.createElementBlock("svg",R,K)}var H=u(q,[["render",U]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"}));const X={},Y={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},J=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 16l-4-4m0 0l4-4m-4 4h18"},null,-1)];function Q(t,o){return e.openBlock(),e.createElementBlock("svg",Y,J)}var Z=u(X,[["render",Q]]),v=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));const ee={},te={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},oe=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"},null,-1)];function ne(t,o){return e.openBlock(),e.createElementBlock("svg",te,oe)}var re=u(ee,[["render",ne]]),le=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));const se={},ae={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ce=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7l4-4m0 0l4 4m-4-4v18"},null,-1)];function ie(t,o){return e.openBlock(),e.createElementBlock("svg",ae,ce)}var de=u(se,[["render",ie]]),_e=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"}));const me={},pe={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ue=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)];function fe(t,o){return e.openBlock(),e.createElementBlock("svg",pe,ue)}var he=u(me,[["render",fe]]),ke=Object.freeze(Object.defineProperty({__proto__:null,default:he},Symbol.toStringTag,{value:"Module"}));const ge={},be={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ye=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)];function $e(t,o){return e.openBlock(),e.createElementBlock("svg",be,ye)}var Be=u(ge,[["render",$e]]),we=Object.freeze(Object.defineProperty({__proto__:null,default:Be},Symbol.toStringTag,{value:"Module"}));const Se={},Ce={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ve=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19l-7-7 7-7"},null,-1)];function Ee(t,o){return e.openBlock(),e.createElementBlock("svg",Ce,Ve)}var Me=u(Se,[["render",Ee]]),Ne=Object.freeze(Object.defineProperty({__proto__:null,default:Me},Symbol.toStringTag,{value:"Module"}));const je={},Ie={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ze=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 5l7 7-7 7"},null,-1)];function Oe(t,o){return e.openBlock(),e.createElementBlock("svg",Ie,ze)}var Le=u(je,[["render",Oe]]),Fe=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"}));const Ae={},xe={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},De=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)];function Te(t,o){return e.openBlock(),e.createElementBlock("svg",xe,De)}var Pe=u(Ae,[["render",Te]]),Ge=Object.freeze(Object.defineProperty({__proto__:null,default:Pe},Symbol.toStringTag,{value:"Module"}));const qe={},Re={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ke=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1)];function Ue(t,o){return e.openBlock(),e.createElementBlock("svg",Re,Ke)}var He=u(qe,[["render",Ue]]),We=Object.freeze(Object.defineProperty({__proto__:null,default:He},Symbol.toStringTag,{value:"Module"}));const Xe={},Ye={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Je=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"},null,-1)];function Qe(t,o){return e.openBlock(),e.createElementBlock("svg",Ye,Je)}var Ze=u(Xe,[["render",Qe]]),ve=Object.freeze(Object.defineProperty({__proto__:null,default:Ze},Symbol.toStringTag,{value:"Module"}));const et={},tt={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},ot=[e.createElementVNode("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)];function nt(t,o){return e.openBlock(),e.createElementBlock("svg",tt,ot)}var rt=u(et,[["render",nt]]),lt=Object.freeze(Object.defineProperty({__proto__:null,default:rt},Symbol.toStringTag,{value:"Module"})),bn="";const st={},at=t=>(e.pushScopeId("data-v-683816b2"),t=t(),e.popScopeId(),t),ct={class:"IconSpinner",fill:"none",stroke:"currentColor",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg"},it=[at(()=>e.createElementVNode("path",{d:"M23.5 12.5c0 6.1-4.9 11-11 11s-11-4.9-11-11 4.9-11 11-11","shape-rendering":"geometricPrecision",style:{"stroke-width":"2","stroke-miterlimit":"10",stroke:"currentColor",fill:"none"},"vector-effect":"non-scaling-stroke"},null,-1))];function dt(t,o){return e.openBlock(),e.createElementBlock("svg",ct,it)}var _t=u(st,[["render",dt],["__scopeId","data-v-683816b2"]]),mt=Object.freeze(Object.defineProperty({__proto__:null,default:_t},Symbol.toStringTag,{value:"Module"}));const pt={},ut={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},ft=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"},null,-1)];function ht(t,o){return e.openBlock(),e.createElementBlock("svg",ut,ft)}var kt=u(pt,[["render",ht]]),gt=Object.freeze(Object.defineProperty({__proto__:null,default:kt},Symbol.toStringTag,{value:"Module"}));const bt={},yt={"aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},$t=[e.createElementVNode("path",{d:"M6 18L18 6M6 6l12 12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)];function Bt(t,o){return e.openBlock(),e.createElementBlock("svg",yt,$t)}var wt=u(bt,[["render",Bt]]),St=Object.freeze(Object.defineProperty({__proto__:null,default:wt},Symbol.toStringTag,{value:"Module"}));function Ct(t,o){var n;return(n=Object.entries(t).map(([a,s])=>({path:a,source:s})).find(a=>a.path.endsWith(`/${o}`)))==null?void 0:n.source.default}var wn="";let M;function Vt(t){M=t}function Et(t){let o;return M&&(o=M(t)),o||(o=Ct(Mt,`${t}.vue`)),o}const Mt={"../icons/arrow-narrow-down.vue":W,"../icons/arrow-narrow-left.vue":v,"../icons/arrow-narrow-right.vue":le,"../icons/arrow-narrow-up.vue":_e,"../icons/check-circle.vue":ke,"../icons/check.vue":we,"../icons/chevron-left.vue":Ne,"../icons/chevron-right.vue":Fe,"../icons/exclamation-circle.vue":Ge,"../icons/exclamation.vue":We,"../icons/plus.vue":ve,"../icons/search.vue":lt,"../icons/spinner.vue":mt,"../icons/trash.vue":gt,"../icons/x.vue":St};var $=u(e.defineComponent({name:"Icon",props:{name:{type:String,required:!0}},setup(t){const o=t,n=e.shallowRef(void 0);return e.watch(()=>o.name,()=>n.value=Et(o.name),{immediate:!0}),(a,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n)),{class:"Icon"}))}}),[["__scopeId","data-v-cc79c81e"]]),Cn="";const Nt=e.defineComponent({components:{Icon:$},props:{breadcrumbs:{type:Object,default:()=>({})}}}),jt={class:"Breadcrumbs"};function It(t,o,n,a,s,_){const l=e.resolveComponent("router-link"),r=e.resolveComponent("Icon");return e.openBlock(),e.createElementBlock("div",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.breadcrumbs,(i,p,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"Breadcrumbs__breadcrumb"},[e.createVNode(l,{to:i,class:"Breadcrumbs__link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p),1)]),_:2},1032,["to"]),e.createVNode(r,{name:"chevron-right",class:"Breadcrumbs__arrow"})]))),128))])}var zt=u(Nt,[["render",It],["__scopeId","data-v-357000f6"]]),Vn="",En="";const Ot=["normal","small"],Lt=["default","primary","secondary","danger"],Ft=e.defineComponent({components:{Icon:$},inheritAttrs:!1,props:{size:{type:String,default:"normal",validator:t=>Ot.includes(t)},variant:{type:String,default:"default",validator:t=>Lt.includes(t)},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},label:{type:String,default:""},active:Boolean,loading:Boolean,block:Boolean,disabled:Boolean},computed:{component(){return this.$attrs.to?"router-link":this.$attrs.href?"a":"button"},classModifiers(){const t=[this.size,this.variant];return this.active&&t.push("active"),this.loading&&t.push("loading"),this.disabled&&t.push("disabled"),t.map(o=>`button--${o}`)},normalizedAttrs(){return y({type:this.component==="button"?"button":void 0},this.$attrs)}}}),At={key:1};function xt(t,o,n,a,s,_){const l=e.resolveComponent("Icon");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),e.mergeProps({class:["Button button",[t.classModifiers,{"Button--block":t.block},{"button--disabled":t.$attrs.disabled}]]},t.normalizedAttrs),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix",{},()=>[t.prefixIcon&&!t.loading?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(["Button__icon Button__icon--prefix",[`Button__icon--${t.size}`]]),name:t.prefixIcon},null,8,["class","name"])):e.createCommentVNode("",!0)],!0),t.loading?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(["Button__icon Button__icon--prefix",[`Button__icon--${t.size}`]]),name:"spinner"},null,8,["class"])):e.createCommentVNode("",!0),t.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",At,[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"suffix",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(["Button__icon Button__icon--suffix",[`Button__icon--${t.size}`]]),name:t.suffixIcon},null,8,["class","name"])):e.createCommentVNode("",!0)],!0)]),_:3},16,["class"])}var S=u(Ft,[["render",xt],["__scopeId","data-v-4c3e5fdd"]]),Mn="";const C=e.defineComponent({emits:["update:modelValue"],computed:{normalizedAttrs(){const t=s=>s.getAttribute("type")==="number"?s.valueAsNumber:s.getAttribute("type")==="checkbox"?s.checked:s.value,a=this.$attrs,{class:o}=a,n=G(a,["class"]);return B(y({},n),{onInput:s=>this.$emit("update:modelValue",t(s.target))})}}});var Nn="";const Dt=e.defineComponent({mixins:[C],inheritAttrs:!1,props:{modelValue:Boolean,required:Boolean,switch:Boolean,caption:{type:String,default:""}}}),Tt=t=>(e.pushScopeId("data-v-6d3aac34"),t=t(),e.popScopeId(),t),Pt=["checked","required"],Gt=[Tt(()=>e.createElementVNode("div",{class:"Checkbox__switchDot"},null,-1))],qt={key:1,class:"Checkbox__label"},Rt={key:0,class:"Checkbox__required"};function Kt(t,o,n,a,s,_){return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["Checkbox",[t.$attrs.class,{"Checkbox--disabled":t.$attrs.disabled}]])},[e.withDirectives(e.createElementVNode("input",e.mergeProps(t.normalizedAttrs,{checked:t.modelValue,class:"Checkbox__input input",required:t.required,type:"checkbox"}),null,16,Pt),[[e.vShow,!t.$props.switch]]),t.$props.switch?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["Checkbox__switch",{"Checkbox__switch--active":t.modelValue}])},Gt,2)):e.createCommentVNode("",!0),t.$slots.default||t.caption?(e.openBlock(),e.createElementBlock("div",qt,[t.required?(e.openBlock(),e.createElementBlock("span",Rt,"*")):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.caption),1)],!0)])):e.createCommentVNode("",!0)],2)}var j=u(Dt,[["render",Kt],["__scopeId","data-v-6d3aac34"]]);function V(t,o){return typeof o=="function"?o(t):o||o===0?t[o]:t}function I(t,o={}){return Array.isArray(t)?t.map(n=>({value:V(n,o.value),label:V(n,o.label),description:o.description&&V(n,o.description),disabled:o.disabled&&V(n,o.disabled)})):Object.entries(t||{}).reduce((n,[a,s])=>n.concat({value:a,label:s}),[])}var In="";const Ut=e.defineComponent({components:{Checkbox:j},props:{modelValue:{type:Array,default:()=>[]},options:{type:[Array,Object],required:!0},optionLabelKey:{type:[Function,String,Number],default:void 0},optionValueKey:{type:[Function,String,Number],default:void 0},optionDisabledKey:{type:[Function,String,Number],default:void 0}},emits:["update:modelValue"],computed:{normalizedOptions(){return I(this.options,{value:this.optionValueKey,label:this.optionLabelKey,disabled:this.optionDisabledKey})},checkedValues(){return this.modelValue.reduce((t,o)=>B(y({},t),{[o]:!0}),{})}},methods:{toggleCheckedValue(t){const o=B(y({},this.checkedValues),{[t]:!this.checkedValues[t]}),n=Object.entries(o).filter(([a,s])=>s).map(([a])=>a);this.$emit("update:modelValue",n)}}}),Ht={class:"CheckboxGroup"};function Wt(t,o,n,a,s,_){const l=e.resolveComponent("Checkbox");return e.openBlock(),e.createElementBlock("div",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedOptions,r=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[e.createVNode(l,{disabled:r.disabled,"model-value":t.checkedValues[r.value],caption:r.label,"onUpdate:modelValue":i=>t.toggleCheckedValue(r.value)},null,8,["disabled","model-value","caption","onUpdate:modelValue"])]))),128))])}var Xt=u(Ut,[["render",Wt]]),zn="";const Yt=e.defineComponent({props:{label:{type:String,default:""},error:{type:[String,Array,Boolean],default:""},description:{type:String,default:""},hint:{type:String,default:""},required:Boolean},computed:{errorMessage(){return Array.isArray(this.error)?this.error.filter(Boolean).join(" "):typeof this.error=="string"?this.error:""}}}),Jt={key:0,class:"FormGroup__header"},Qt={class:"FormGroup__label"},Zt={key:0,class:"FormGroup__required"},vt={key:1,class:"FormGroup__description"},eo={key:2,class:"FormGroup__hint"},to={key:3,class:"FormGroup__error"};function oo(t,o,n,a,s,_){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["FormGroup",{"FormGroup--invalid":t.error}])},[t.label?(e.openBlock(),e.createElementBlock("div",Jt,[e.createElementVNode("label",Qt,e.toDisplayString(t.label),1),t.required?(e.openBlock(),e.createElementBlock("div",Zt,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.$slots.description||t.description?(e.openBlock(),e.createElementBlock("div",vt,[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),t.$slots.hint||t.hint?(e.openBlock(),e.createElementBlock("div",eo,[e.renderSlot(t.$slots,"hint",{},()=>[e.createTextVNode(e.toDisplayString(t.hint),1)],!0)])):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("div",to,e.toDisplayString(t.errorMessage),1)):e.createCommentVNode("",!0)],2)}var z=u(Yt,[["render",oo],["__scopeId","data-v-4214535a"]]),On="";const no={class:"FormFields"},ro=e.defineComponent({name:"FormFields",props:{fields:{type:Object,default:()=>({})},modelValue:{type:Object,default:()=>({})},errors:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t;function a(_){var r;return(((r=n.fields[_].value)==null?void 0:r.getter)||(i=>i[_]))(n.modelValue)}function s(_,l){var p;const i=(((p=n.fields[_].value)==null?void 0:p.setter)||((m,d)=>B(y({},d),{[_]:m})))(l,n.modelValue);o("update:modelValue",i)}return(_,l)=>(e.openBlock(),e.createElementBlock("div",no,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fields,(r,i)=>{var p;return e.openBlock(),e.createBlock(z,{key:i,label:r.label,description:r.description,hint:r.hint,required:r.required,error:(p=t.errors)==null?void 0:p[i]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),e.mergeProps({"model-value":a(String(i))},r.props,{"onUpdate:modelValue":m=>s(String(i),m)}),null,16,["model-value","onUpdate:modelValue"]))]),_:2},1032,["label","description","hint","required","error"])}),128))]))}});var O=u(ro,[["__scopeId","data-v-6e4bafe2"]]),Ln="";const lo={class:"Form"},so=["disabled"],ao={key:0,class:"Form__title"},co={key:0,class:"Form__buttons"},io=e.defineComponent({name:"Form",props:{structure:{type:Object,default:()=>({})},modelValue:{type:Object,default:()=>{}},errors:{type:Object,default:()=>({})},submit:{type:Function,default:void 0},submitLabel:{type:String,default:"Submit"},cancel:{type:[Function,Object],default:void 0},cancelLabel:{type:String,default:"Cancel"},submitting:Boolean},emits:["update:modelValue","change","submit","cancel"],setup(t,{emit:o}){const n=t,a=h.useRouter();function s(){var l;(l=n.submit)==null||l.call(n,n.modelValue)}function _(){var l;typeof n.cancel=="function"?(l=n.cancel)==null||l.call(n):n.cancel&&a.push(n.cancel)}return(l,r)=>(e.openBlock(),e.createElementBlock("div",lo,[t.modelValue?(e.openBlock(),e.createElementBlock("form",{key:0,disabled:t.submitting,onSubmit:r[3]||(r[3]=e.withModifiers(i=>s==null?void 0:s(),["prevent"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.structure,(i,p)=>(e.openBlock(),e.createElementBlock("div",{key:p},[i.title?(e.openBlock(),e.createElementBlock("div",ao,e.toDisplayString(i.title),1)):e.createCommentVNode("",!0),e.createVNode(O,{fields:i.fields,"model-value":t.modelValue,errors:t.errors,"onUpdate:modelValue":r[0]||(r[0]=m=>o("update:modelValue",m)),onChange:r[1]||(r[1]=m=>o("change",m))},null,8,["fields","model-value","errors"])]))),128)),e.renderSlot(l.$slots,"buttons",e.normalizeProps(e.guardReactiveProps({cancel:t.cancel,submit:t.submit})),()=>[t.submit||t.cancel?(e.openBlock(),e.createElementBlock("div",co,[t.submit?(e.openBlock(),e.createBlock(S,{key:0,variant:"primary",type:"submit",label:t.submitLabel,disabled:t.submitting,"prefix-icon":t.submitting?"spinner":void 0},null,8,["label","disabled","prefix-icon"])):e.createCommentVNode("",!0),t.cancel?(e.openBlock(),e.createBlock(S,{key:1,label:t.cancelLabel,disabled:t.submitting,onClick:r[2]||(r[2]=i=>_())},null,8,["label","disabled"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],!0)],40,so)):(e.openBlock(),e.createBlock($,{key:1,name:"spinner"}))]))}});var _o=u(io,[["__scopeId","data-v-c8cb4f5a"]]),Fn="";const mo=["normal","small"],po=e.defineComponent({components:{Icon:$},mixins:[C],inheritAttrs:!1,props:{modelValue:{type:[Number,String],default:""},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},size:{type:String,default:"normal",validator:t=>mo.includes(t)},invalid:Boolean},computed:{hasPrefix(){return Boolean(this.$slots.prefix||this.prefixIcon)},hasSuffix(){return Boolean(this.$slots.suffix||this.suffixIcon)}}}),uo={class:"Input__icon Input__icon--left"},fo=["aria-label","value"],ho={class:"Input__icon Input__icon--right"};function ko(t,o,n,a,s,_){const l=e.resolveComponent("Icon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["Input input",[t.$attrs.class,{"input--invalid":t.invalid,"input--disabled":t.$attrs.disabled,"input--small":t.size==="small"}]]),onClick:o[0]||(o[0]=r=>t.$refs.input.focus())},[t.hasPrefix?e.renderSlot(t.$slots,"prefix",{key:0},()=>[e.createElementVNode("div",uo,[e.createVNode(l,{name:t.prefixIcon},null,8,["name"])])]):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({ref:"input","aria-label":t.$attrs.placeholder||"input"},t.normalizedAttrs,{class:"Input__nestedInput input__nested",value:t.modelValue}),null,16,fo),t.hasSuffix?e.renderSlot(t.$slots,"suffix",{key:1},()=>[e.createElementVNode("div",ho,[e.createVNode(l,{name:t.suffixIcon},null,8,["name"])])]):e.createCommentVNode("",!0)],2)}var go=u(po,[["render",ko]]),An="";const bo={key:1,class:"ModalLayout__header"},yo={class:"ModalLayout__title"},$o={class:"ModalLayout__body"},Bo={key:2,class:"ModalLayout__footer"},L=e.defineComponent({name:"ModalLayout",props:{title:{type:String,default:""},width:{type:[Number,String],default:600},hideCloser:Boolean,scroll:Boolean,plain:Boolean},setup(t){const o=t,n=e.useSlots();e.useAttrs();const a=e.computed(()=>Boolean(n.header||o.title)),s=e.computed(()=>Boolean(n.footer)),_=e.computed(()=>{const r=o.width+(Number(o.width)?"px":"");return r&&r!=="auto"?{width:"100%",maxWidth:r}:{}});function l(){window.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"}))}return(r,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ModalLayout",{hasHeader:e.unref(a),hasFooter:e.unref(s),isScrollable:r.$props.scroll,isPlain:r.$props.plain}]),style:e.normalizeStyle(e.unref(_))},[t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"ModalLayout__close",onClick:i[0]||(i[0]=p=>l())},[e.createVNode($,{name:"x",class:"ModalLayout__closeIcon"})])),e.unref(a)?(e.openBlock(),e.createElementBlock("div",bo,[e.renderSlot(r.$slots,"header",{},()=>[e.createElementVNode("div",yo,e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",$o,[e.renderSlot(r.$slots,"default")]),e.unref(s)?(e.openBlock(),e.createElementBlock("div",Bo,[e.renderSlot(r.$slots,"footer")])):e.createCommentVNode("",!0)],6))}}),wo=["normal","small"],So=e.defineComponent({mixins:[C],props:{value:{type:[String,Number,Object],default:""},options:{type:[Array,Object],required:!0},optionLabelKey:{type:[Function,String,Number],default:void 0},optionValueKey:{type:[Function,String,Number],default:void 0},optionDisabledKey:{type:[Function,String,Number],default:void 0},placeholder:{type:String,default:""},size:{type:String,default:"normal",validator:t=>wo.includes(t)},allowEmpty:Boolean},computed:{normalizedOptions(){return I(this.options,{value:this.optionValueKey,label:this.optionLabelKey,disabled:this.optionDisabledKey})}}}),Co=["value"],Vo=["disabled"],Eo=["disabled","value"];function Mo(t,o,n,a,s,_){return e.openBlock(),e.createElementBlock("select",e.mergeProps({class:"Select input"},t.normalizedAttrs,{class:[t.$attrs.class,{"input--small":t.size==="small"}],value:t.value}),[t.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,disabled:!t.allowEmpty,selected:"",value:void 0},e.toDisplayString(t.placeholder),9,Vo)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedOptions,l=>(e.openBlock(),e.createElementBlock("option",{key:l.value,disabled:l.disabled,value:l.value},e.toDisplayString(l.label),9,Eo))),128))],16,Co)}var No=u(So,[["render",Mo]]),xn="",Dn="";const jo=e.defineComponent({props:{items:{type:Array,default:()=>[]},columns:{type:Object,default:null},rowClass:{type:[String,Function],default:null}},computed:{normalizedColumns(){return Object.entries(this.columns).reduce((t,[o,n])=>B(y({},t),{[o]:typeof n=="string"?{label:n}:n}),{})}},methods:{formatValue(t,o){const n=this.normalizedColumns[o],a=typeof n.value=="function"?n.value(t):t[o];return n.format?n.format(a):a},resolveRowClass(t){return typeof this.rowClass=="function"?this.rowClass(t):this.rowClass}}}),Io={class:"table table--hover"},zo=["width"];function Oo(t,o,n,a,s,_){const l=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("table",Io,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedColumns,(r,i)=>(e.openBlock(),e.createElementBlock("th",{key:i,style:e.normalizeStyle({textAlign:r.align||"left"}),width:r.width},e.toDisplayString(r.label),13,zo))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(r,i)=>(e.openBlock(),e.createElementBlock("tr",{key:i,class:e.normalizeClass(t.resolveRowClass(r))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.normalizedColumns,(p,m)=>(e.openBlock(),e.createElementBlock("td",{key:m,style:e.normalizeStyle({textAlign:p.align||"left"})},[e.renderSlot(t.$slots,m,e.normalizeProps(e.guardReactiveProps({item:r})),()=>[p.href?(e.openBlock(),e.createBlock(l,{key:0,class:"link",to:p.href(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.formatValue(r,m)),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.formatValue(r,m)),1)],64))])],4))),128))],2))),128))])])}var Lo=u(jo,[["render",Oo]]);const Fo=e.defineComponent({mixins:[C],props:{value:{type:String,default:""}}}),Ao=["value"];function xo(t,o,n,a,s,_){return e.openBlock(),e.createElementBlock("textarea",e.mergeProps(t.normalizedAttrs,{class:["Textarea input",t.$attrs.class],value:t.value}),null,16,Ao)}var Do=u(Fo,[["render",xo]]),Tn="";const To={class:"ModalLayoutDialog__buttons"},Po=e.defineComponent({name:"ModalLayoutDialog",props:{title:{type:String,default:""},message:{type:String,default:""},buttons:{type:Array,default:()=>[]}},emits:["close"],setup(t){return(o,n)=>{var a;return e.openBlock(),e.createBlock(L,{ref:"root",class:"ModalLayoutDialog",width:"480",title:o.$props.title},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$props.message)+" ",1)]),_:2},[(a=o.$props.buttons)!=null&&a.length?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",To,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.$props.buttons,(s,_)=>(e.openBlock(),e.createElementBlock("span",{key:_,class:"ModalLayoutDialog__buttonWrapper"},[e.createVNode(S,{type:"button",variant:s.variant,"prefix-icon":s.icon,autofocus:"",onClick:l=>o.$emit("close",s.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["variant","prefix-icon","onClick"])]))),128))])])}:void 0]),1032,["title"])}}});var Pn="";const Go={class:"ModalStack"},qo={key:0,class:"ModalStack__backdrop"},Ro=["onClick"],Ko=e.defineComponent({name:"ModalStack",props:{modals:{type:Array,default:()=>[]}},emits:["closeModal"],setup(t,{emit:o}){const n=t,a=e.ref({}),s=e.computed(()=>n.modals.length?n.modals[n.modals.length-1]:null);function _(m){return d=>a.value[m]=d}function l(m,d){var g;const f=()=>{o("closeModal",{modal:m,result:d})},k=a.value[m.id].$refs.root;(g=k.$attrs)!=null&&g.onBeforeClose?k.$attrs.onBeforeClose(f):f()}function r(){s.value&&l(s.value)}function i(m){s.value&&m.key==="Escape"&&!m.defaultPrevented&&(m.preventDefault(),r())}function p(m,d){m.target===m.currentTarget&&l(d)}return e.onMounted(()=>{window.addEventListener("keydown",i)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",i)}),(m,d)=>(e.openBlock(),e.createElementBlock("div",Go,[e.createVNode(e.Transition,{name:"ModalStack__backdrop"},{default:e.withCtx(()=>[n.modals.length?(e.openBlock(),e.createElementBlock("div",qo)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{name:"ModalStack__modal"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.modals,f=>{var k;return e.openBlock(),e.createElementBlock("div",{key:f.id,class:"ModalStack__modalWrapper",onClick:g=>p(g,f)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),e.mergeProps(f.props,{ref_for:!0,ref:_(f.id),class:["ModalStack__modal",{isActive:((k=e.unref(s))==null?void 0:k.id)===f.id}],onClose:g=>l(f,g)}),null,16,["class","onClose"]))],8,Ro)}),128))]),_:1})]))}}),Uo={cancelLabel:"Cancel",confirmLabel:"OK"},Ho=(t,o={})=>{let n=1;o=y(y({},Uo),o);const a=e.reactive({modals:[]}),s=(d,f)=>{var k;a.modals=a.modals.filter(({id:g})=>g!==d.id),d.resolve(f),(k=d.focusElement)==null||k.focus()},_=e.createApp({parent:t,data(){return a},render(){return e.h(Ko,{modals:a.modals,onCloseModal:({modal:d,result:f})=>s(d,f)})}}),l=document.createElement("div");document.body.appendChild(l),_.mount(l);const r=(d,f)=>{var g;const k=document.activeElement;return(g=k.blur)==null||g.call(k),new Promise(w=>{a.modals.push({id:n++,component:d,props:f,resolve:w,focusElement:k})})},i=d=>r(Po,d),p=d=>{typeof d=="string"&&(d={message:d});const{title:f,message:k,confirmVariant:g,confirmLabel:w=o.confirmLabel,confirmIcon:N}=d;return i({title:f,message:k,buttons:[{variant:g||"primary",label:w||"",icon:N}]})},m=d=>{typeof d=="string"&&(d={message:d});const{title:f,message:k,cancelLabel:g=o.cancelLabel,cancelVariant:w,cancelIcon:N,confirmLabel:en=o.confirmLabel,confirmVariant:tn,confirmIcon:on}=d;return i({title:f,message:k,buttons:[{variant:w||"secondary",label:g||"",icon:N,value:!1},{variant:tn||"primary",label:en||"",icon:on,value:!0}]})};t.config.globalProperties.$modal={open:r,dialog:i,alert:p,confirm:m}};function F(){var t;return(t=e.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$modal}var Gn="";const Wo={class:"Snackbar"},Xo=["onClick"],Yo=e.defineComponent({name:"SnackbarStack",props:{messages:{type:Array,default:()=>[]}},emits:["remove-message"],setup(t,{emit:o}){const n=t,a=e.computed(()=>[...n.messages].reverse());return(s,_)=>(e.openBlock(),e.createElementBlock("div",Wo,[e.createVNode(e.TransitionGroup,{name:"Snackbar__transition"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(l,r)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"Snackbar__message"},[e.createElementVNode("div",{class:"Snackbar__messageWrapper",style:e.normalizeStyle({transform:`translateY(-${100*r}%)`})},[e.createElementVNode("div",{class:e.normalizeClass(["Snackbar__messageBlock",`Snackbar__messageBlock--${l.type}`])},[e.createElementVNode("div",null,e.toDisplayString(l.text),1),e.createElementVNode("div",{class:"Snackbar__messageClose",onClick:i=>s.$emit("remove-message",l.id)},[e.createVNode($,{class:"Snackbar__messageCloseIcon",name:"x"})],8,Xo)],2)],4)]))),128))]),_:1})]))}}),Jo=1e4,Qo=5,Zo=t=>{let o=1;const n=e.reactive({messages:[]}),a=r=>{n.messages=n.messages.filter(({id:i})=>i!==r)},s=e.createApp({parent:t,data(){return n},render(){return e.h(Yo,{messages:this.messages,onRemoveMessage:a})}}),_=document.createElement("div");document.body.appendChild(_),s.mount(_);const l=(r,i="success",p=Jo)=>{const m=o++;n.messages.push({text:r,type:i,id:m}),n.messages.length>Qo&&n.messages.shift(),p>0&&setTimeout(()=>a(m),p)};t.config.globalProperties.$snackbar={success:r=>l(r,"success"),error:r=>l(r,"error",0)}};function A(){var t;return(t=e.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$snackbar}function x(t,o={}){const n=A(),a=F(),s=h.useRouter(),_=e.ref(!1),l=e.ref(),r=e.ref(Object.freeze({})),i=async p=>{var m;if(!(o.confirm&&a&&!await a.confirm(typeof o.confirm=="function"?o.confirm(p):o.confirm))){if(o.validator){const d=await o.validator(p);if(!d||typeof d=="object"&&(r.value=(d==null?void 0:d.errors)||{},!(d!=null&&d.isValid)))return}_.value=!0;try{l.value=await t(p)}catch(d){if(o.errorMessage&&n&&n.error(typeof o.errorMessage=="function"?o.errorMessage(d,p):o.errorMessage||d.message),_.value=!1,o.onError&&o.onError({error:d,data:p,router:s,snackbar:n}))return;throw d}return _.value=!1,o.successMessage&&n&&n.success(typeof o.successMessage=="function"?o.successMessage(l.value,p):o.successMessage),(m=o.onSuccess)==null||m.call(o,{result:l.value,data:p,router:s,snackbar:n}),o.redirectOnSuccess&&s.push(typeof o.redirectOnSuccess=="function"?o.redirectOnSuccess(l.value,p):o.redirectOnSuccess),l.value}};return o.immediate&&e.onMounted(i),{submit:i,errors:r,result:l,isSubmitting:_}}const vo=(t,o={})=>{const{isSubmitting:n,submit:a,result:s}=x(t,{onSuccess:({router:_,data:l,result:r})=>{var i;return(i=o.onSuccess)==null?void 0:i.call(o,{data:r,params:l,router:_})},onError:({router:_,error:l,data:r})=>{var i;return(i=o.onError)==null?void 0:i.call(o,{error:l,params:r,router:_})},successMessage:o.successMessage,errorMessage:o.errorMessage,immediate:o.immediate});return{load:a,isLoading:n,data:s}};c.Breadcrumbs=zt,c.Button=S,c.Checkbox=j,c.CheckboxGroup=Xt,c.Form=_o,c.FormFields=O,c.FormGroup=z,c.Icon=$,c.Input=go,c.ModalLayout=L,c.Select=No,c.Table=Lo,c.Textarea=Do,c.modal=Ho,c.registerCustomIconResolver=Vt,c.snackbar=Zo,c.useLoadData=vo,c.useModal=F,c.useSnackbar=A,c.useSubmitAction=x,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuiii",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6-alpha",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite",
|
|
6
6
|
"build": "vite build && vue-tsc --emitDeclarationOnly --declaration",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
24
|
"dependencies": {},
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@babel/runtime": "^7.18.3",
|
|
26
27
|
"@types/node": "^17.0.35",
|
|
27
28
|
"@typescript-eslint/parser": "^5.25.0",
|
|
28
29
|
"@vitejs/plugin-vue": "^2.3.3",
|
|
@@ -38,8 +39,8 @@
|
|
|
38
39
|
"prettier": "^2.6.2",
|
|
39
40
|
"typescript": "^4.5.4",
|
|
40
41
|
"vite": "^2.9.9",
|
|
41
|
-
"vue-tsc": "^0.34.16",
|
|
42
42
|
"vue": "^3.2.36",
|
|
43
|
-
"vue-router": "^4.0.15"
|
|
43
|
+
"vue-router": "^4.0.15",
|
|
44
|
+
"vue-tsc": "^0.34.16"
|
|
44
45
|
}
|
|
45
46
|
}
|