vuiii 0.1.0-alpha → 0.1.3-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.
@@ -10,7 +10,7 @@ export declare type ValidationResults<T = any> = {
10
10
  };
11
11
  declare type ConfirmParams = Parameters<ReturnType<typeof useModal>['confirm']>[0];
12
12
  export declare function useAction<T = unknown, R = unknown>(action: (data: T) => any | Promise<any>, params?: {
13
- validator?: (data: T) => Promise<ValidationResults<T>>;
13
+ validator?: (data: T) => boolean | Promise<ValidationResults<T> | boolean>;
14
14
  confirm?: ((data: T) => ConfirmParams) | ConfirmParams;
15
15
  onSuccess?: (params: {
16
16
  result: R;
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-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));--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:box-shadow .15s,background-color .15s;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{--ringSize: var(--vui-field-ringSize)}.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{--ringSize: var(--vui-field-ringSize);--ringColor: var(--vui-input-ringColor, var(--vui-field-ringColor));--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));width:100%;background-color:#fff;border:var(--borderWidth) solid var(--borderColor);border-radius:var(--borderRadus);padding:0 var(--padding);min-height:var(--height);font-size:var(--fontSize);transition:box-shadow .15s,border-color .15s,background-color .15s}.input::-moz-placeholder{color:var(--vui-color-gray--dark)}.input:-ms-input-placeholder{color:var(--vui-color-gray--dark)}.input::placeholder{color:var(--vui-color-gray--dark)}.input:focus,.input:focus-within{--borderColor: var(--vui-input-borderColor--active, var(--vui-field-borderColor--active));outline:none;box-shadow:0 0 0 var(--ringSize) var(--ringColor)}.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-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}
@@ -1709,10 +1709,15 @@ function useAction(action, params = {}) {
1709
1709
  }
1710
1710
  if (params.validator) {
1711
1711
  const validationResult = await params.validator(data);
1712
- errors.value = validationResult.errors;
1713
- if (!validationResult.isValid) {
1712
+ if (!validationResult) {
1714
1713
  return;
1715
1714
  }
1715
+ if (typeof validationResult === "object") {
1716
+ errors.value = (validationResult == null ? void 0 : validationResult.errors) || {};
1717
+ if (!(validationResult == null ? void 0 : validationResult.isValid)) {
1718
+ return;
1719
+ }
1720
+ }
1716
1721
  }
1717
1722
  isSubmitting.value = true;
1718
1723
  try {
@@ -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 R(t,o){return e.openBlock(),e.createElementBlock("svg",G,q)}var K=u(P,[["render",R]]),U=Object.freeze(Object.defineProperty({__proto__:null,default:K},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 Re(t,o){return e.openBlock(),e.createElementBlock("svg",Ge,qe)}var Ke=u(Pe,[["render",Re]]),Ue=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},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,d){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,d){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,(i,m,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"Breadcrumbs__breadcrumb"},[e.createVNode(s,{to:i,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,d){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"},Rt={key:0,class:"Checkbox__required"};function Kt(t,o,n,a,l,d){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(Tt,[["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,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,d){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":i=>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,d){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(d){var r;return(((r=n.fields[d].value)==null?void 0:r.getter)||(i=>i[d]))(n.modelValue)}function l(d,s){var m;const i=(((m=n.fields[d].value)==null?void 0:m.setter)||((p,_)=>B(y({},_),{[d]:p})))(s,n.modelValue);o("update:modelValue",i)}return(d,s)=>(e.openBlock(),e.createElementBlock("div",no,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fields,(r,i)=>{var m;return e.openBlock(),e.createBlock(z,{key:i,label:r.label,description:r.description,hint:r.hint,required:r.required,error:(m=t.errors)==null?void 0:m[i]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),e.mergeProps({"model-value":a(String(i))},r.props,{"onUpdate:modelValue":p=>l(String(i),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 d(){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(i=>l==null?void 0:l(),["prevent"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.structure,(i,m)=>(e.openBlock(),e.createElementBlock("div",{key:m},[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]=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:d,submit:l})),()=>[l||d?(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),d?(e.openBlock(),e.createBlock(S,{key:1,label:t.cancelLabel,disabled:t.submitting,onClick:r[2]||(r[2]=i=>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,d){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,d){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,d){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,i)=>(e.openBlock(),e.createElementBlock("th",{key:i,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,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,(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,d){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)),d=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,i)=>(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(d))},[t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"ModalLayout__close",onClick:i[0]||(i[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,d)=>(e.openBlock(),e.createElementBlock("span",{key:d,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"},Ro={key:0,class:"ModalStack__backdrop"},Ko=["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 d(p){return _=>a.value[p]=_}function s(p,_){var g;const f=()=>{o("closeModal",{modal:p,result:_})},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 i(p){l.value&&p.key==="Escape"&&!p.defaultPrevented&&(p.preventDefault(),r())}function m(p,_){p.target===p.currentTarget&&s(_)}return e.onMounted(()=>{window.addEventListener("keydown",i)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",i)}),(p,_)=>(e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(e.Transition,{name:"ModalStack__backdrop"},{default:e.withCtx(()=>[n.modals.length?(e.openBlock(),e.createElementBlock("div",Ro)):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:d(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,Ko)}),128))]),_:1})]))}}),Ho={cancelLabel:"Cancel",confirmLabel:"OK"},Wo=(t,o={})=>{let n=1;o=y(y({},Ho),o);const a=e.reactive({modals:[]}),l=(_,f)=>{var k;a.modals=a.modals.filter(({id:g})=>g!==_.id),_.resolve(f),(k=_.focusElement)==null||k.focus()},d=e.createApp({parent:t,data(){return a},render(){return e.h(Uo,{modals:a.modals,onCloseModal:({modal:_,result:f})=>l(_,f)})}}),s=document.createElement("div");document.body.appendChild(s),d.mount(s);const r=(_,f)=>{var g;const k=document.activeElement;return(g=k.blur)==null||g.call(k),new Promise(w=>{a.modals.push({id:n++,component:_,props:f,resolve:w,focusElement:k})})},i=_=>r(Go,_),m=_=>{typeof _=="string"&&(_={message:_});const{title:f,message:k,confirmVariant:g,confirmLabel:w=o.confirmLabel,confirmIcon:M}=_;return i({title:f,message:k,buttons:[{variant:g||"primary",label:w||"",icon:M}]})},p=_=>{typeof _=="string"&&(_={message:_});const{title:f,message:k,cancelLabel:g=o.cancelLabel,cancelVariant:w,cancelIcon:M,confirmLabel:tn=o.confirmLabel,confirmVariant:on,confirmIcon:nn}=_;return i({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:i,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,d)=>(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:i=>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:i})=>i!==r)},l=e.createApp({parent:t,data(){return n},render(){return e.h(Jo,{messages:this.messages,onRemoveMessage:a})}}),d=document.createElement("div");document.body.appendChild(d),l.mount(d);const s=(r,i="success",m=Qo)=>{const p=o++;n.messages.push({text:r,type:i,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(),d=e.ref(!1),s=e.ref(),r=e.ref(Object.freeze({})),i=async m=>{var p;if(!(o.confirm&&!await a.confirm(typeof o.confirm=="function"?o.confirm(m):o.confirm))){if(o.validator){const _=await o.validator(m);if(r.value=_.errors,!_.isValid)return}d.value=!0;try{s.value=await t(m)}catch(_){if(n.error(typeof o.errorMessage=="function"?o.errorMessage(_,m):o.errorMessage||_.message),d.value=!1,o.onError&&o.onError({error:_,data:m,router:l}))return;throw _}return d.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(i),{submit:i,errors:r,result:s,isSubmitting:d}}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 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"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vuiii",
3
- "version": "0.1.0-alpha",
3
+ "version": "0.1.3-alpha",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build && vue-tsc --emitDeclarationOnly --declaration",
@@ -9,17 +9,17 @@
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
- "main": "./dist/vui.umd.js",
13
- "module": "./dist/vui.es.js",
12
+ "main": "./dist/vuiii.umd.js",
13
+ "module": "./dist/vuiii.es.js",
14
14
  "exports": {
15
15
  ".": {
16
- "import": "./dist/vui.es.js",
17
- "require": "./dist/vui.umd.js"
16
+ "import": "./dist/vuiii.es.js",
17
+ "require": "./dist/vuiii.umd.js"
18
18
  },
19
19
  "./style.css": "./dist/style.css"
20
20
  },
21
- "unpkg": "./dist/vui.umd.js",
22
- "jsdelivr": "./dist/vui.umd.js",
21
+ "unpkg": "./dist/vuiii.umd.js",
22
+ "jsdelivr": "./dist/vuiii.umd.js",
23
23
  "types": "./dist/index.d.ts",
24
24
  "dependencies": {},
25
25
  "devDependencies": {