@speckle/ui-components 2.14.7 → 2.14.8-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/InfiniteLoading.vue.d.ts +35 -0
- package/dist/components/layout/Dialog.vue.d.ts +33 -0
- package/dist/components/layout/Disclosure.vue.d.ts +35 -0
- package/dist/components/layout/GridListToggle.vue.d.ts +17 -0
- package/dist/components/layout/Menu.vue.d.ts +25 -0
- package/dist/components/layout/Panel.vue.d.ts +70 -0
- package/dist/components/layout/Tabs.vue.d.ts +14 -0
- package/dist/composables/common/window.d.ts +26 -0
- package/dist/helpers/global/components.d.ts +14 -0
- package/dist/helpers/layout/components.d.ts +13 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +13 -2
- package/dist/lib.js +1381 -848
- package/dist/style.css +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
3
|
+
settings: {
|
|
4
|
+
type: __PropType<{
|
|
5
|
+
target?: string | undefined;
|
|
6
|
+
distance?: number | undefined;
|
|
7
|
+
top?: boolean | undefined;
|
|
8
|
+
identifier?: any;
|
|
9
|
+
firstload?: boolean | undefined;
|
|
10
|
+
} | undefined>;
|
|
11
|
+
required: false;
|
|
12
|
+
};
|
|
13
|
+
allowRetry: {
|
|
14
|
+
type: __PropType<boolean | undefined>;
|
|
15
|
+
required: false;
|
|
16
|
+
};
|
|
17
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "infinite"[], "infinite", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
settings: {
|
|
19
|
+
type: __PropType<{
|
|
20
|
+
target?: string | undefined;
|
|
21
|
+
distance?: number | undefined;
|
|
22
|
+
top?: boolean | undefined;
|
|
23
|
+
identifier?: any;
|
|
24
|
+
firstload?: boolean | undefined;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
required: false;
|
|
27
|
+
};
|
|
28
|
+
allowRetry: {
|
|
29
|
+
type: __PropType<boolean | undefined>;
|
|
30
|
+
required: false;
|
|
31
|
+
};
|
|
32
|
+
}>> & {
|
|
33
|
+
onInfinite?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
}, {}>;
|
|
35
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
type MaxWidthValue = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
open: {
|
|
5
|
+
type: __PropType<boolean>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
maxWidth: {
|
|
9
|
+
type: __PropType<MaxWidthValue | undefined>;
|
|
10
|
+
required: false;
|
|
11
|
+
};
|
|
12
|
+
hideCloser: {
|
|
13
|
+
type: __PropType<boolean | undefined>;
|
|
14
|
+
required: false;
|
|
15
|
+
};
|
|
16
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:open" | "fully-closed")[], "update:open" | "fully-closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
open: {
|
|
18
|
+
type: __PropType<boolean>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
maxWidth: {
|
|
22
|
+
type: __PropType<MaxWidthValue | undefined>;
|
|
23
|
+
required: false;
|
|
24
|
+
};
|
|
25
|
+
hideCloser: {
|
|
26
|
+
type: __PropType<boolean | undefined>;
|
|
27
|
+
required: false;
|
|
28
|
+
};
|
|
29
|
+
}>> & {
|
|
30
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
"onFully-closed"?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { ConcreteComponent } from 'vue';
|
|
3
|
+
type DisclosureColor = 'default' | 'danger';
|
|
4
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
5
|
+
title: {
|
|
6
|
+
type: __PropType<string>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
icon: {
|
|
10
|
+
type: __PropType<ConcreteComponent | undefined>;
|
|
11
|
+
required: false;
|
|
12
|
+
};
|
|
13
|
+
color: {
|
|
14
|
+
type: __PropType<DisclosureColor | undefined>;
|
|
15
|
+
required: false;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
title: {
|
|
20
|
+
type: __PropType<string>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
icon: {
|
|
24
|
+
type: __PropType<ConcreteComponent | undefined>;
|
|
25
|
+
required: false;
|
|
26
|
+
};
|
|
27
|
+
color: {
|
|
28
|
+
type: __PropType<DisclosureColor | undefined>;
|
|
29
|
+
required: false;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
}>>, {
|
|
33
|
+
color: DisclosureColor | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { GridListToggleValue } from '../../helpers/layout/components';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: __PropType<GridListToggleValue | undefined>;
|
|
6
|
+
required: false;
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:modelValue")[], "click" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: __PropType<GridListToggleValue | undefined>;
|
|
11
|
+
required: false;
|
|
12
|
+
};
|
|
13
|
+
}>> & {
|
|
14
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { LayoutMenuItem } from '../../helpers/layout/components';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
open: {
|
|
5
|
+
type: __PropType<boolean | undefined>;
|
|
6
|
+
required: false;
|
|
7
|
+
};
|
|
8
|
+
items: {
|
|
9
|
+
type: __PropType<LayoutMenuItem[][]>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:open" | "chosen")[], "update:open" | "chosen", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
open: {
|
|
14
|
+
type: __PropType<boolean | undefined>;
|
|
15
|
+
required: false;
|
|
16
|
+
};
|
|
17
|
+
items: {
|
|
18
|
+
type: __PropType<LayoutMenuItem[][]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>> & {
|
|
22
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
onChosen?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
}, {}>;
|
|
25
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
/**
|
|
3
|
+
* Use a `<form/>` element as a wrapper that will emit 'submit' events out from the component when they occur
|
|
4
|
+
*/
|
|
5
|
+
form: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Add a ring outline on hover
|
|
11
|
+
*/
|
|
12
|
+
ring: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Add a primary-colored glow on hover
|
|
18
|
+
*/
|
|
19
|
+
fancyGlow: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
customPadding: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
noShadow: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
/**
|
|
33
|
+
* Use a `<form/>` element as a wrapper that will emit 'submit' events out from the component when they occur
|
|
34
|
+
*/
|
|
35
|
+
form: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Add a ring outline on hover
|
|
41
|
+
*/
|
|
42
|
+
ring: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Add a primary-colored glow on hover
|
|
48
|
+
*/
|
|
49
|
+
fancyGlow: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
customPadding: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
noShadow: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
}>> & {
|
|
62
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
form: boolean;
|
|
65
|
+
ring: boolean;
|
|
66
|
+
fancyGlow: boolean;
|
|
67
|
+
customPadding: boolean;
|
|
68
|
+
noShadow: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { LayoutTabItem } from '../../helpers/layout/components';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
items: {
|
|
5
|
+
type: __PropType<LayoutTabItem<any>[]>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
items: {
|
|
10
|
+
type: __PropType<LayoutTabItem<any>[]>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}>;
|
|
14
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Nullable } from '@speckle/shared';
|
|
2
|
+
import { MaybeRef } from '@vueuse/core';
|
|
3
|
+
export declare enum ThrottleOrDebounce {
|
|
4
|
+
Throttle = 0,
|
|
5
|
+
Debounce = 1
|
|
6
|
+
}
|
|
7
|
+
export declare enum HorizontalDirection {
|
|
8
|
+
Left = 0,
|
|
9
|
+
Right = 1
|
|
10
|
+
}
|
|
11
|
+
export declare function useWindowResizeHandler(handler: (e: UIEvent) => void, options?: Partial<{
|
|
12
|
+
wait: number;
|
|
13
|
+
throttleOrDebounce: ThrottleOrDebounce;
|
|
14
|
+
}>): void;
|
|
15
|
+
export declare function useOnBeforeWindowUnload(handler: (e: BeforeUnloadEvent) => void): void;
|
|
16
|
+
export declare function useResponsiveHorizontalDirectionCalculation(params: {
|
|
17
|
+
el: MaybeRef<Nullable<HTMLElement>>;
|
|
18
|
+
defaultDirection?: HorizontalDirection;
|
|
19
|
+
/**
|
|
20
|
+
* Stop recalculation below this screen size. Defaults to el.width * 2
|
|
21
|
+
*/
|
|
22
|
+
stopUpdatesBelowWidth?: MaybeRef<number>;
|
|
23
|
+
}): {
|
|
24
|
+
direction: import("vue").ComputedRef<HorizontalDirection>;
|
|
25
|
+
recalculateDirection: () => void;
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type InfiniteLoaderState = {
|
|
2
|
+
/**
|
|
3
|
+
* Informs the component that this loading has been successful
|
|
4
|
+
*/
|
|
5
|
+
loaded: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Informs the component that all of the data has been loaded successfully
|
|
8
|
+
*/
|
|
9
|
+
complete: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Inform the component that this loading failed, the content of the `error` slot will be displayed
|
|
12
|
+
*/
|
|
13
|
+
error: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum GridListToggleValue {
|
|
2
|
+
Grid = "grid",
|
|
3
|
+
List = "list"
|
|
4
|
+
}
|
|
5
|
+
export type LayoutTabItem<I extends string = string> = {
|
|
6
|
+
title: string;
|
|
7
|
+
id: I;
|
|
8
|
+
};
|
|
9
|
+
export type LayoutMenuItem<I extends string = string> = {
|
|
10
|
+
title: string;
|
|
11
|
+
id: I;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
package/dist/lib.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),I=require("@heroicons/vue/24/solid"),P=require("@heroicons/vue/24/outline"),N=require("@heroicons/vue/20/solid"),F=require("vee-validate"),R=require("nanoid"),j=require("@speckle/shared"),T=require("@vueuse/core"),O=require("@headlessui/vue"),ce=require("vue-tippy");const ue={key:2,style:{margin:"0 !important",width:"0.01px"}},de=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,a=e.resolveDynamicComponent("NuxtLink"),s=e.resolveDynamicComponent("RouterLink"),i=e.computed(()=>o.linkComponent?o.linkComponent:C.isObjectLike(a)?a:C.isObjectLike(s)?s:"a"),h=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),u=e.computed(()=>o.disabled||o.loading),m=e.computed(()=>o.loading?I.ArrowPathIcon:o.iconLeft),r=e.computed(()=>{const l=[];if(l.push("border-2"),u.value)l.push(o.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(o.color){case"invert":l.push(o.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":l.push(o.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":l.push(o.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":l.push(o.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":l.push(o.outlined?"border-warning":"bg-warning border-warning");break;case"success":l.push(o.outlined?"border-success":"bg-success border-success");break;case"default":default:l.push(o.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return l.join(" ")}),k=e.computed(()=>{const l=[];if(!o.text&&!o.link)if(u.value)l.push((o.outlined,"text-foreground-disabled"));else switch(o.color){case"invert":l.push(o.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":l.push((o.outlined,"text-foreground"));break;case"danger":l.push(o.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":l.push(o.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"success":l.push(o.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":l.push((o.outlined,"text-foreground hover:text-primary"));break;case"default":default:l.push(o.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else u.value?l.push("text-foreground-disabled"):o.color==="invert"?l.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):o.color==="secondary"?l.push("text-foreground-2 hover:text-primary-focus"):o.color==="success"?l.push("text-success"):o.color==="warning"?l.push("text-warning"):o.color==="danger"?l.push("text-danger"):l.push("text-primary hover:text-primary-focus");return l.join(" ")}),c=e.computed(()=>{const l=[];return l.push(o.rounded?"rounded-full":"rounded-md"),l.join(" ")}),f=e.computed(()=>{const l=[];if(!u.value)switch(o.color){case"invert":l.push("hover:ring-4 ring-white/50");break;case"danger":l.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":l.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"success":l.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:l.push("hover:ring-2");break}return l.join(" ")}),g=e.computed(()=>{switch(o.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-base font-medium xxx-tracking-wide"}}),V=e.computed(()=>{switch(o.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),p=e.computed(()=>{const l=[];return o.fullWidth&&l.push("w-full"),u.value&&l.push("cursor-not-allowed"),l.join(" ")}),b=e.computed(()=>{const l=[];return!u.value&&!o.link&&!o.text&&l.push("active:scale-[0.97]"),!u.value&&o.link&&l.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),l.join(" ")}),v=e.computed(()=>{const l=o.link||o.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",p.value,g.value,k.value,l?"":r.value,l?"":c.value,l?"":f.value,o.link?"":V.value,b.value].join(" ")}),y=e.computed(()=>{const l=[""];switch(o.loading&&l.push("animate-spin"),o.size){case"xs":l.push("h-3 w-3");break;case"sm":l.push("h-4 w-4");break;case"lg":l.push("h-6 w-6");break;case"xl":l.push("h-8 w-8");break;case"base":default:l.push("h-5 w-5");break}return l.join(" ")}),$=l=>{if(u.value){l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation();return}n("click",l)};return(l,x)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?e.unref(i):"button"),{href:t.to,to:t.to,type:e.unref(h),external:t.external,class:e.normalizeClass(e.unref(v)),disabled:e.unref(u),role:"button",onClick:$},{default:e.withCtx(()=>[e.unref(m)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m)),{key:0,class:e.normalizeClass(`${e.unref(y)} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",ue," ")):e.renderSlot(l.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${e.unref(y)} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const q=(t,n)=>{const o=t.__vccOpts||t;for(const[a,s]of n)o[a]=s;return o},G=q(de,[["__scopeId","data-v-521f798e"]]),J=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,a=s=>{if(o.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}n("click",s)};return(s,i)=>(e.openBlock(),e.createBlock(G,{link:"",to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:a},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var z=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(z||{});const fe={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},me={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},pe={key:0,class:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5"},he={class:"p-4"},ge={class:"flex items-start"},ye={class:"flex-shrink-0"},ke={class:"ml-2 w-0 flex-1 flex flex-col"},be={key:0,class:"text-foreground font-bold"},ve={key:1,class:"label label--light text-foreground-2"},xe={key:2,class:"flex justify-start mt-2"},Ce=e.createElementVNode("span",{class:"sr-only"},"Close",-1),Be=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:n}){const o=t,a=e.computed(()=>{var h,u;return!((h=o.notification)!=null&&h.description)&&!((u=o.notification)!=null&&u.cta)}),s=()=>{n("update:notification",null)},i=h=>{var u,m,r;(r=(m=(u=o.notification)==null?void 0:u.cta)==null?void 0:m.onClick)==null||r.call(m,h),s()};return(h,u)=>(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",me,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",he,[e.createElementVNode("div",ge,[e.createElementVNode("div",ye,[t.notification.type===e.unref(z).Success?(e.openBlock(),e.createBlock(e.unref(P.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(z).Danger?(e.openBlock(),e.createBlock(e.unref(P.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(z).Warning?(e.openBlock(),e.createBlock(e.unref(P.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(z).Info?(e.openBlock(),e.createBlock(e.unref(P.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ke,[t.notification.title?(e.openBlock(),e.createElementBlock("p",be,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",ve,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(J,{to:t.notification.cta.url,class:"label",primary:"",onClick:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-4 flex flex-shrink-0",{"self-center":e.unref(a)}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:s},[Ce,e.createVNode(e.unref(N.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Ve=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),we=[Ve],Q=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:n}){const o=t,a=e.computed(()=>o.colorClasses||"bg-blue-100 text-blue-800"),s=e.computed(()=>o.dotIconColorClasses||"text-blue-400"),i=e.computed(()=>{const r=["inline-flex items-center",a.value,o.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return o.rounded?(r.push("rounded"),r.push(o.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(r.push("rounded-full"),r.push(o.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),r.join(" ")}),h=e.computed(()=>{const r=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return o.clickableIcon?r.push("cursor-pointer"):r.push("cursor-default"),r.join(" ")}),u=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",s.value].join(" ")),m=r=>{if(!o.clickableIcon){r.stopPropagation(),r.stopImmediatePropagation(),r.preventDefault();return}n("click-icon",r)};return(r,k)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(i))},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(e.unref(u)),fill:"currentColor",viewBox:"0 0 8 8"},we,2)):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(h)),onClick:k[0]||(k[0]=c=>m(c))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",e.unref(s)])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});var D=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(D||{});function Y(t){const{props:{modelValue:n,steps:o,orientation:a,goVerticalBelow:s,nonInteractive:i},emit:h}=t,u=e.computed(()=>(a==null?void 0:a.value)==="vertical"?"vertical":"horizontal"),m=e.computed({get:()=>C.clamp((n==null?void 0:n.value)||0,-1,o.value.length),set:p=>h("update:modelValue",C.clamp(p,0,o.value.length))}),r=p=>`${p+1}`,k=p=>p===m.value,c=p=>p<m.value,f=(p,b)=>{var y;if(i!=null&&i.value){b==null||b.preventDefault(),b==null||b.stopPropagation(),b==null||b.stopImmediatePropagation();return}m.value=p;const v=o.value[m.value];(y=v==null?void 0:v.onClick)==null||y.call(v)},g=e.computed(()=>{const p=["flex"];return p.push("flex"),u.value==="vertical"||s!=null&&s.value?(p.push("flex-col space-y-4 justify-center"),(s==null?void 0:s.value)===D.sm?p.push("sm:flex-row sm:space-y-0 sm:justify-start sm:space-x-8 sm:items-center"):(s==null?void 0:s.value)===D.md?p.push("md:flex-row md:space-y-0 md:justify-start md:space-x-8 md:items-center"):(s==null?void 0:s.value)===D.lg?p.push("lg:flex-row lg:space-y-0 lg:justify-start lg:space-x-8 lg:items-center"):(s==null?void 0:s.value)===D.xl&&p.push("xl:flex-row xl:space-y-0 xl:justify-start xl:space-x-8 xl:items-center")):p.push("flex-row space-x-8 items-center"),p.join(" ")}),V=e.computed(()=>{const p=["flex items-center"];return i!=null&&i.value||p.push("cursor-pointer"),p.join(" ")});return{value:m,isCurrentStep:k,isFinishedStep:c,switchStep:f,getStepDisplayValue:r,listClasses:g,linkClasses:V,orientation:u}}const Se=["aria-label"],Ee=["href","onClick"],Ne={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},$e={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},_e={class:"flex flex-col"},Ie={key:0,class:"label label--light text-foreground"},ze=["href","onClick"],De={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Le={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},je={class:"flex flex-col"},Oe={key:0,class:"label label--light text-foreground"},Pe=["href","onClick"],Ae={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},Me={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},Te={class:"flex flex-col"},Fe={key:0,class:"label label--light"},Re=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,{isCurrentStep:a,isFinishedStep:s,switchStep:i,getStepDisplayValue:h,listClasses:u,linkClasses:m}=Y({props:e.toRefs(o),emit:n});return(r,k)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(u))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(c,f)=>(e.openBlock(),e.createElementBlock("li",{key:c.name},[e.unref(s)(f)?(e.openBlock(),e.createElementBlock("a",{key:0,href:c.href,class:e.normalizeClass(e.unref(m)),onClick:g=>e.unref(i)(f,g)},[e.createElementVNode("div",Ne,[e.createElementVNode("div",$e,[e.createVNode(e.unref(N.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",_e,[e.createElementVNode("div",null,e.toDisplayString(c.name),1),c.description?(e.openBlock(),e.createElementBlock("div",Ie,e.toDisplayString(c.description),1)):e.createCommentVNode("",!0)])])],10,Ee)):e.unref(a)(f)?(e.openBlock(),e.createElementBlock("a",{key:1,href:c.href,class:e.normalizeClass(e.unref(m)),"aria-current":"step",onClick:g=>e.unref(i)(f,g)},[e.createElementVNode("div",De,[e.createElementVNode("div",Le,e.toDisplayString(e.unref(h)(f)),1),e.createElementVNode("div",je,[e.createElementVNode("div",null,e.toDisplayString(c.name),1),c.description?(e.openBlock(),e.createElementBlock("div",Oe,e.toDisplayString(c.description),1)):e.createCommentVNode("",!0)])])],10,ze)):(e.openBlock(),e.createElementBlock("a",{key:2,href:c.href,class:e.normalizeClass(e.unref(m)),onClick:g=>e.unref(i)(f,g)},[e.createElementVNode("div",Ae,[e.createElementVNode("div",Me,e.toDisplayString(e.unref(h)(f)),1),e.createElementVNode("div",Te,[e.createElementVNode("div",null,e.toDisplayString(c.name),1),c.description?(e.openBlock(),e.createElementBlock("div",Fe,e.toDisplayString(c.description),1)):e.createCommentVNode("",!0)])])],10,Pe))]))),128))],2)],8,Se))}}),Z=t=>(e.pushScopeId("data-v-56fc6520"),t=t(),e.popScopeId(),t),qe=["aria-label"],Ue=["href","onClick"],We={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},He={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Ke=["href","onClick"],Xe={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Ge={key:0,class:"h-3 w-3 rounded-full bg-foreground"},Je=Z(()=>e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1)),Qe=Z(()=>e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1)),Ye=["href","onClick"],Ze={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},et={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},tt={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},nt=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,{isCurrentStep:a,isFinishedStep:s,switchStep:i,listClasses:h,linkClasses:u}=Y({props:e.toRefs(o),emit:n}),m=e.computed(()=>{const r=["ml-3 h6 font-medium leading-7"];return o.basic&&r.push("sr-only"),r.join(" ")});return(r,k)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(h),t.basic?"basic":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(c,f)=>(e.openBlock(),e.createElementBlock("li",{key:c.name},[e.unref(s)(f)?(e.openBlock(),e.createElementBlock("a",{key:0,href:c.href,class:e.normalizeClass(e.unref(u)),onClick:g=>e.unref(i)(f,g)},[e.createElementVNode("span",We,[t.basic?(e.openBlock(),e.createElementBlock("span",He)):(e.openBlock(),e.createBlock(e.unref(N.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",e.unref(m)])},e.toDisplayString(c.name),3)],10,Ue)):e.unref(a)(f)?(e.openBlock(),e.createElementBlock("a",{key:1,href:c.href,class:e.normalizeClass(e.unref(u)),"aria-current":"step",onClick:g=>e.unref(i)(f,g)},[e.createElementVNode("span",Xe,[t.basic?(e.openBlock(),e.createElementBlock("span",Ge)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Je,Qe],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",e.unref(m)])},e.toDisplayString(c.name),3)],10,Ke)):(e.openBlock(),e.createElementBlock("a",{key:2,href:c.href,class:e.normalizeClass(e.unref(u)),onClick:g=>e.unref(i)(f,g)},[e.createElementVNode("div",Ze,[t.basic?(e.openBlock(),e.createElementBlock("span",et)):(e.openBlock(),e.createElementBlock("div",tt))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",e.unref(m)])},e.toDisplayString(c.name),3)],10,Ye))]))),128))],2)],8,qe))}});const ot=q(nt,[["__scopeId","data-v-56fc6520"]]),lt=["disabled"],rt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:n}){const o=t,a=e.computed(()=>{const i=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return o.disabled?i.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(i.push(o.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),i.push("ring-outline-2 hover:ring-4")),i.join(" ")}),s=i=>{if(o.disabled){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation();return}n("update:modelValue",!o.modelValue),n("click",i)};return(i,h)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(e.unref(a)),disabled:t.disabled,onClick:s},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,lt))}}),at={class:"relative flex items-start"},st={class:"flex h-6 items-center"},it=["id","checked","aria-describedby","name","value","disabled"],ct={class:"ml-2 text-sm",style:{"padding-top":"2px"}},ut=["for"],dt={key:0,class:"text-danger ml-1"},ft=["id"],mt=e.defineComponent({inheritAttrs:!1}),pt=e.defineComponent({...mt,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,o=p=>`${p}-${R.nanoid()}`,a=e.computed(()=>n.value||n.name),{checked:s,errorMessage:i,handleChange:h}=F.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:a,initialValue:n.modelValue||void 0}),u=p=>{n.disabled||h(p)},m=e.computed(()=>n.label||n.name),r=e.computed(()=>i.value?"border-danger-lighter":"border-foreground-4 "),k=e.computed(()=>n.description||i.value),c=e.computed(()=>`${n.name}-description`),f=e.computed(()=>{const p=[];return n.inlineDescription?p.push("inline ml-2"):p.push("block"),i.value?p.push("text-danger"):p.push("text-foreground-2"),p.join(" ")}),g=e.ref(o("checkbox")),V=e.computed(()=>n.id||g.value);return(p,b)=>(e.openBlock(),e.createElementBlock("div",at,[e.createElementVNode("div",st,[e.createElementVNode("input",e.mergeProps({id:e.unref(V),checked:e.unref(s),"aria-describedby":e.unref(c),name:t.name,value:e.unref(a),disabled:t.disabled,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",e.unref(r)]},p.$attrs,{onChange:u}),null,16,it)]),e.createElementVNode("div",ct,[e.createElementVNode("label",{for:e.unref(V),class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(e.unref(m)),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",dt,"*")):e.createCommentVNode("",!0)],10,ut),e.unref(k)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(c),class:e.normalizeClass(e.unref(f))},e.toDisplayString(e.unref(k)),11,ft)):e.createCommentVNode("",!0)])]))}});function ee(t){const{props:n,inputEl:o,emit:a}=t,{value:s,errorMessage:i}=F.useField(n.name,n.rules,{validateOnMount:e.unref(n.validateOnMount),validateOnValueUpdate:e.unref(n.validateOnValueUpdate),initialValue:e.unref(n.modelValue)||void 0}),h=e.computed(()=>{const y=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||y.push("sr-only"),y.join(" ")}),u=e.computed(()=>{const y=["block w-full rounded focus:outline-none text-foreground transition-all","disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted","placeholder:text-foreground-2"];return i.value?y.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):y.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(n.color)==="foundation"?y.push("bg-foundation shadow-sm hover:shadow"):y.push("bg-foundation-page"),y.join(" ")}),m=e.ref(R.nanoid()),r=e.computed(()=>e.unref(n.label)||e.unref(n.name)),k=e.computed(()=>{const y=i.value;return!y||!e.unref(n.useLabelInErrors)?y:y.replace("Value",r.value)}),c=e.computed(()=>k.value&&e.unref(n.hideErrorMessage)),f=e.computed(()=>k.value||e.unref(n.help)),g=e.computed(()=>!!f.value),V=e.computed(()=>g.value?`${e.unref(n.name)}-${m.value}`:void 0),p=e.computed(()=>{const y=["mt-2 text-sm"];return y.push(i.value?"text-danger":"text-foreground-2"),y.join(" ")}),b=()=>{var y;(y=o.value)==null||y.focus()},v=()=>{s.value="",a("change",{value:""}),a("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&b()}),{coreClasses:u,title:r,value:s,helpTipId:V,helpTipClasses:p,helpTip:f,hideHelpTip:c,errorMessage:k,clear:v,focus:b,labelClasses:h}}const ht=["for"],gt={class:"relative"},yt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],kt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),bt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},vt=["id"],xt=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"}},emits:["update:modelValue","change","input","clear"],setup(t,{expose:n,emit:o}){const a=t,s=e.ref(null),{coreClasses:i,title:h,value:u,helpTipId:m,helpTipClasses:r,helpTip:k,errorMessage:c,labelClasses:f,clear:g,focus:V}=ee({props:e.toRefs(a),emit:o,inputEl:s}),p=e.computed(()=>{const b=["pl-2"];return a.showClear&&c.value?b.push("pr-12"):(a.showClear||c.value)&&b.push("pr-8"),b.join(" ")});return n({focus:V}),(b,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(f))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(h)),1)],10,ht),e.createElementVNode("div",gt,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":v[0]||(v[0]=y=>e.isRef(u)?u.value=y:null),name:t.name,class:[e.unref(i),e.unref(p),"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(c)?"true":"false","aria-describedby":e.unref(m)},b.$attrs,{onChange:v[1]||(v[1]=y=>b.$emit("change",{event:y,value:e.unref(u)})),onInput:v[2]||(v[2]=y=>b.$emit("input",{event:y,value:e.unref(u)}))}),null,16,yt),[[e.vModelText,e.unref(u)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:v[3]||(v[3]=(...y)=>e.unref(g)&&e.unref(g)(...y)),onKeydown:v[4]||(v[4]=(...y)=>e.unref(g)&&e.unref(g)(...y))},[kt,e.createVNode(e.unref(N.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(c)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(N.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(c)?(e.openBlock(),e.createElementBlock("div",bt," * ")):e.createCommentVNode("",!0)]),e.unref(m)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(m),class:e.normalizeClass(e.unref(r))},e.toDisplayString(e.unref(k)),11,vt)):e.createCommentVNode("",!0)],2))}}),Ct=["for"],Bt={class:"relative"},Vt={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},wt=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],St=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Et={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},Nt=["id"],$t=e.defineComponent({inheritAttrs:!1}),_t=e.defineComponent({...$t,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:n,emit:o}){const a=t,s=e.useSlots(),i=e.ref(null),{coreClasses:h,title:u,value:m,helpTipId:r,helpTipClasses:k,helpTip:c,hideHelpTip:f,errorMessage:g,clear:V,focus:p,labelClasses:b}=ee({props:e.toRefs(a),emit:o,inputEl:i}),v=e.computed(()=>{const x=["h-5 w-5"];return g.value?x.push("text-danger"):x.push("text-foreground-2"),x.join(" ")}),y=e.computed(()=>["email","password"].includes(a.type)||a.customIcon),$=e.computed(()=>{const x=[];return y.value?x.push("pl-8"):x.push("pl-2"),s["input-right"]||(g.value||a.showClear)&&(g.value&&a.showClear?x.push("pr-12"):x.push("pr-8")),x.join(" ")}),l=e.computed(()=>{switch(a.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return n({focus:p}),(x,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(b))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(u)),1)],10,Ct),e.createElementVNode("div",Bt,[e.unref(y)?(e.openBlock(),e.createElementBlock("div",Vt,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(e.unref(v)),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(N.EnvelopeIcon),{key:1,class:e.normalizeClass(e.unref(v)),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(N.KeyIcon),{key:2,class:e.normalizeClass(e.unref(v)),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:i,"onUpdate:modelValue":S[0]||(S[0]=B=>e.isRef(m)?m.value=B:null),type:t.type,name:t.name,class:[e.unref(h),e.unref($),e.unref(l),t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(g)?"true":"false","aria-describedby":e.unref(r),role:"textbox"},x.$attrs,{onChange:S[1]||(S[1]=B=>x.$emit("change",{event:B,value:e.unref(m)})),onInput:S[2]||(S[2]=B=>x.$emit("input",{event:B,value:e.unref(m)}))}),null,16,wt),[[e.vModelDynamic,e.unref(m)]]),e.renderSlot(x.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:S[3]||(S[3]=(...B)=>e.unref(V)&&e.unref(V)(...B)),onKeydown:S[4]||(S[4]=(...B)=>e.unref(V)&&e.unref(V)(...B))},[St,e.createVNode(e.unref(N.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(N.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(g)?(e.openBlock(),e.createElementBlock("div",Et," * ")):e.createCommentVNode("",!0)])]),e.unref(r)&&!e.unref(f)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(r),class:e.normalizeClass(e.unref(k))},e.toDisplayString(e.unref(c)),11,Nt)):e.createCommentVNode("",!0)],2))}}),It=/^https?:\/\//,U=/^[\w-_.+]+@[\w-_.+]+$/,zt=t=>(t||"").match(U)?!0:"Value should be a valid e-mail address",Dt=t=>(t||"").split(",").map(a=>a.trim()).every(a=>a.match(U))||"Value should be one or multiple comma-delimited e-mail addresses",Lt=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),jt=(t,n)=>(o,a)=>o===a.form[t]?!0:`Value must be the same as in field '${n||t}'`,Ot=t=>n=>{const{minLength:o,maxLength:a}=t;return n=j.isNullOrUndefined(n)?"":n,C.isString(n)?!C.isUndefined(o)&&n.length<o?`Value needs to be at least ${o} characters long`:!C.isUndefined(a)&&n.length>a?`Value needs to be no more than ${a} characters long`:!0:"Value should be a text string"},Pt=t=>n=>{const{match:o,message:a}=t;return C.isString(n)?o?C.isString(o)?n.includes(o)?!0:a:o.test(n)?!0:a:!0:"Value should be a text string"},At=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:U,VALID_HTTP_URL:It,isEmail:zt,isOneOrMultipleEmails:Dt,isRequired:Lt,isSameAs:jt,isStringOfLength:Ot,stringContains:Pt},Symbol.toStringTag,{value:"Module"}));function te(t){const{skipCalculation:n,elementToWatchForChanges:o,itemContainer:a,trackResize:s=!1,trackMutations:i=!0}=t||{},h=e.ref(0),u=()=>{const m=a.value;if(n!=null&&n.value||!m)return;const r=m.children;let k=0,c=0,f;for(const g of r){const V=g.offsetTop;C.isUndefined(f)?(f=V,k+=1):V===f&&(k+=1),c+=1}h.value=c-k};return s&&T.useResizeObserver(o,u),i&&T.useMutationObserver(o,u,{childList:!0,subtree:!0}),{hiddenItemCount:h}}function ne(t){const{props:n,emit:o,dynamicVisibility:a}=t;let s;if(a){const{elementToWatchForChanges:r,itemContainer:k}=a;s=te({skipCalculation:e.computed(()=>{var f;return!((f=n.multiple)!=null&&f.value)}),elementToWatchForChanges:r,itemContainer:k}).hiddenItemCount}else s=e.ref(0);const i=e.computed({get:()=>{var k,c;const r=(k=n.modelValue)==null?void 0:k.value;return(c=n.multiple)!=null&&c.value?C.isArray(r)?r:[]:C.isArray(r)?void 0:r},set:r=>{var k,c,f;if((k=n.multiple)!=null&&k.value&&!C.isArray(r)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((c=n.multiple)!=null&&c.value)&&C.isArray(r)){console.warn("Attempting to set array value in selector w/ multiple=false");return}o("update:modelValue",(f=n.multiple)!=null&&f.value?r||[]:r)}}),h=r=>C.isArray(r);return{selectedValue:i,hiddenSelectedItemCount:s,isArrayValue:h,isMultiItemArrayValue:r=>C.isArray(r)&&r.length>1,firstItem:r=>h(r)?r[0]:r}}const Mt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Tt=Mt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Ft=[Tt],Rt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Ft,2))}});const oe=q(Rt,[["__scopeId","data-v-60cf597b"]]),qt={class:"flex items-center justify-between w-full"},Ut={class:"block truncate grow text-left"},Wt={class:"pointer-events-none shrink-0 ml-1 flex items-center"},Ht=["disabled"],Kt={key:0,class:"flex flex-col mx-1 mb-1"},Xt=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),Gt={class:"relative"},Jt={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Qt=["placeholder"],Yt={key:0,class:"px-1"},Zt={key:1},en=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),tn={class:e.normalizeClass(["block truncate"])},nn=["id"],le=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,{value:o,errorMessage:a}=F.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,validateOnValueUpdate:n.validateOnValueUpdate,initialValue:n.modelValue}),s=e.ref(null),i=e.ref(""),h=e.ref([]),u=e.ref(!1),m=e.ref(R.nanoid()),r=e.computed(()=>e.unref(n.label)||e.unref(n.name)),k=e.computed(()=>{const d=a.value;return!d||!e.unref(n.useLabelInErrors)?d:d.replace("Value",r.value)}),c=e.computed(()=>k.value||e.unref(n.help)),f=e.computed(()=>!!c.value),g=e.computed(()=>f.value?`${e.unref(n.name)}-${m.value}`:void 0),V=e.computed(()=>a.value?"text-danger":"text-foreground-2"),p=e.computed(()=>n.buttonStyle!=="simple"&&n.clearable&&!n.disabled),b=e.computed(()=>{const d=["relative flex group",n.showLabel?"mt-1":""];return n.buttonStyle!=="simple"&&(d.push("hover:shadow rounded-md"),d.push("outline outline-2 outline-primary-muted")),n.fixedHeight&&d.push("h-8"),d.join(" ")}),v=e.computed(()=>{const d=[];return n.buttonStyle!=="simple"&&d.push(S.value?"bg-foundation-disabled text-foreground-disabled":""),S.value&&d.push("cursor-not-allowed"),d.join(" ")}),y=e.computed(()=>{const d=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all",W.value?`w-6 ${v.value}`:"w-0"];return S.value||d.push("bg-primary-muted hover:bg-primary hover:text-foreground-on-primary"),d.join(" ")}),$=e.computed(()=>{const d=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",v.value];return n.buttonStyle!=="simple"&&(d.push("py-2 px-3"),S.value||d.push("bg-foundation text-foreground")),p.value&&W.value&&d.push("rounded-r-none"),d.join(" ")}),l=e.computed(()=>!!(n.search&&(n.filterPredicate||n.getSearchResults))),x=e.computed(()=>l.value&&n.getSearchResults),S=e.computed(()=>n.disabled||!n.items.length&&!x.value),B=e.computed({get:()=>{const d=o.value;return n.multiple?C.isArray(d)?d:[]:C.isArray(d)?void 0:d},set:d=>{if(n.multiple&&!C.isArray(d)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!n.multiple&&C.isArray(d)){console.warn("Attempting to set array value in selector w/ multiple=false");return}if(n.multiple)o.value=d||[];else{const E=o.value,w=n.allowUnset&&E&&d&&M(E)===M(d);o.value=w?void 0:d}}}),W=e.computed(()=>n.multiple?B.value.length!==0:!!B.value),ae=()=>{n.multiple?B.value=[]:B.value=void 0},se=e.computed(()=>{const d=i.value;return!l.value||!(d!=null&&d.length)?h.value:n.filterPredicate?h.value.filter(E=>{var w;return((w=n.filterPredicate)==null?void 0:w.call(n,E,d))||!1}):h.value}),H=d=>JSON.stringify(d),M=d=>n.by?d[n.by]:d,K=async()=>{if(console.log("triggerSearch"),!(!x.value||!n.getSearchResults)){u.value=!0;try{h.value=await n.getSearchResults(i.value)}finally{u.value=!1}}},ie=C.debounce(K,1e3);return e.watch(()=>n.items,d=>{h.value=d.slice()},{immediate:!0}),e.watch(i,()=>{x.value&&ie()}),e.onMounted(()=>{x.value&&!n.items.length&&K()}),(d,E)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(O.Listbox),{modelValue:e.unref(B),"onUpdate:modelValue":E[4]||(E[4]=w=>e.isRef(B)?B.value=w:null),name:t.name,multiple:t.multiple,by:t.by,disabled:e.unref(S),as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(O.ListboxLabel),{class:e.normalizeClass(["block label text-foreground",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(b))},[e.createVNode(e.unref(O.ListboxButton),{class:e.normalizeClass(e.unref($))},{default:e.withCtx(({open:w})=>[e.createElementVNode("div",qt,[e.createElementVNode("div",Ut,[!e.unref(B)||e.unref(C.isArray)(e.unref(B))&&!e.unref(B).length?e.renderSlot(d.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(d.$slots,"something-selected",{key:1,value:e.unref(B)},()=>[e.createTextVNode(e.toDisplayString(H(e.unref(B))),1)])]),e.createElementVNode("div",Wt,[w?(e.openBlock(),e.createBlock(e.unref(I.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(I.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),e.unref(p)?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(y)),disabled:t.disabled,onClick:E[0]||(E[0]=w=>ae())},[e.createVNode(e.unref(I.XMarkIcon),{class:"w-3 h-3"})],10,Ht)),[[e.unref(ce.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(O.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:E[3]||(E[3]=w=>{var _;return(_=s.value)==null?void 0:_.focus()})},{default:e.withCtx(()=>[e.unref(l)?(e.openBlock(),e.createElementBlock("label",Kt,[Xt,e.createElementVNode("div",Gt,[e.createElementVNode("div",Jt,[e.createVNode(e.unref(I.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:s,"onUpdate:modelValue":E[1]||(E[1]=w=>i.value=w),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:E[2]||(E[2]=e.withModifiers(()=>{},["stop"]))},null,40,Qt),[[e.vModelText,i.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[e.unref(l)?"max-h-52":"max-h-60"]])},[e.unref(x)&&u.value?(e.openBlock(),e.createElementBlock("div",Yt,[e.createVNode(oe,{loading:!0})])):e.unref(x)&&!h.value.length?(e.openBlock(),e.createElementBlock("div",Zt,[e.renderSlot(d.$slots,"nothing-found",{},()=>[en])])):e.createCommentVNode("",!0),!e.unref(x)||!u.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(se),w=>(e.openBlock(),e.createBlock(e.unref(O.ListboxOption),{key:M(w),value:w},{default:e.withCtx(({active:_,selected:X})=>[e.createElementVNode("li",{class:e.normalizeClass([_?"text-primary":"text-foreground","relative transition cursor-pointer select-none py-1.5 pl-3",t.hideCheckmarks?"":"pr-9"])},[e.createElementVNode("span",tn,[e.renderSlot(d.$slots,"option",{item:w,active:_,selected:X},()=>[e.createTextVNode(e.toDisplayString(H(w)),1)])]),!t.hideCheckmarks&&X?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([_?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(I.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"]),e.unref(g)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(g),class:e.normalizeClass(["mt-2 ml-3 text-sm",e.unref(V)])},e.toDisplayString(e.unref(c)),11,nn)):e.createCommentVNode("",!0)]))}}),re=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(Q,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),on={key:0,class:"text-foreground-2 normal"},ln={key:1,class:"flex items-center"},rn={class:"truncate"},an={class:"flex items-center"},sn={class:"truncate"},cn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,a=e.ref(null),s=e.ref(null),{selectedValue:i,hiddenSelectedItemCount:h,isMultiItemArrayValue:u,firstItem:m}=ne({props:e.toRefs(o),emit:n,dynamicVisibility:{elementToWatchForChanges:a,itemContainer:s}}),r=(k,c)=>k.name.toLocaleLowerCase().includes(c.toLocaleLowerCase());return(k,c)=>(e.openBlock(),e.createBlock(le,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=f=>e.isRef(i)?i.value=f:null),multiple:t.multiple,items:t.items??e.unref(j.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":r,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:f})=>[e.unref(u)(f)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:a,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:s,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,g=>(e.openBlock(),e.createBlock(re,{key:g.name,"source-app":g},null,8,["source-app"]))),128))],512),e.unref(h)>0?(e.openBlock(),e.createElementBlock("div",on," +"+e.toDisplayString(e.unref(h)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(m)(f).bgColor})},null,4),e.createElementVNode("span",rn,e.toDisplayString(e.unref(m)(f).name),1)]))]),option:e.withCtx(({item:f})=>[e.createElementVNode("div",an,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:f.bgColor})},null,4),e.createElementVNode("span",sn,e.toDisplayString(f.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var L=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(L||{});const A=j.getClientOperatingSystem(),un={["cmd-or-ctrl"]:A===j.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:A===j.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function dn(t){const n=o=>Object.values(L).includes(o);return t.map(o=>n(o)?un[o]:o).join("+")}function fn(t,...n){T.onKeyDown(n[0],o=>{const a=o.getModifierState("Alt"),s=A===j.OperatingSystem.Mac?o.getModifierState("Meta"):o.getModifierState("Control"),i=o.getModifierState("Shift");for(const h of t)switch(h){case L.CtrlOrCmd:if(!s)return;break;case L.AltOrOpt:if(!a)return;break;case L.Shift:if(!i)return;break}n[1](o)},n[2])}exports.CommonBadge=Q;exports.CommonLoadingBar=oe;exports.CommonStepsBullet=ot;exports.CommonStepsNumber=Re;exports.CommonTextLink=J;exports.FormButton=G;exports.FormCardButton=rt;exports.FormCheckbox=pt;exports.FormSelectBase=le;exports.FormSelectSourceApps=cn;exports.FormTextArea=xt;exports.FormTextInput=_t;exports.GlobalToastRenderer=Be;exports.ModifierKeys=L;exports.SourceAppBadge=re;exports.TailwindBreakpoints=D;exports.ToastNotificationType=z;exports.ValidationHelpers=At;exports.clientOs=A;exports.getKeyboardShortcutTitle=dn;exports.onKeyboardShortcut=fn;exports.useFormSelectChildInternals=ne;exports.useWrappingContainerHiddenCount=te;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("lodash"),$=require("@heroicons/vue/24/solid"),z=require("@heroicons/vue/24/outline"),_=require("@heroicons/vue/20/solid"),U=require("vee-validate"),W=require("nanoid"),T=require("@speckle/shared"),M=require("@vueuse/core"),E=require("@headlessui/vue"),pe=require("vue-tippy"),he=require("v3-infinite-loading");const ge={key:2,style:{margin:"0 !important",width:"0.01px"}},ye=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,r=e.resolveDynamicComponent("NuxtLink"),l=e.resolveDynamicComponent("RouterLink"),a=e.computed(()=>o.linkComponent?o.linkComponent:o.external?"a":b.isObjectLike(r)?r:b.isObjectLike(l)?l:"a"),s=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),i=e.computed(()=>o.disabled||o.loading),m=e.computed(()=>o.loading?$.ArrowPathIcon:o.iconLeft),u=e.computed(()=>{const c=[];if(c.push("border-2"),i.value)c.push(o.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(o.color){case"invert":c.push(o.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":c.push(o.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":c.push(o.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":c.push(o.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":c.push(o.outlined?"border-warning":"bg-warning border-warning");break;case"success":c.push(o.outlined?"border-success":"bg-success border-success");break;case"default":default:c.push(o.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return c.join(" ")}),v=e.computed(()=>{const c=[];if(!o.text&&!o.link)if(i.value)c.push((o.outlined,"text-foreground-disabled"));else switch(o.color){case"invert":c.push(o.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":c.push((o.outlined,"text-foreground"));break;case"danger":c.push(o.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":c.push(o.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"success":c.push(o.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":c.push((o.outlined,"text-foreground hover:text-primary"));break;case"default":default:c.push(o.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else i.value?c.push("text-foreground-disabled"):o.color==="invert"?c.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):o.color==="secondary"?c.push("text-foreground-2 hover:text-primary-focus"):o.color==="success"?c.push("text-success"):o.color==="warning"?c.push("text-warning"):o.color==="danger"?c.push("text-danger"):c.push("text-primary hover:text-primary-focus");return c.join(" ")}),f=e.computed(()=>{const c=[];return c.push(o.rounded?"rounded-full":"rounded-md"),c.join(" ")}),d=e.computed(()=>{const c=[];if(!i.value)switch(o.color){case"invert":c.push("hover:ring-4 ring-white/50");break;case"danger":c.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":c.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"success":c.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:c.push("hover:ring-2");break}return c.join(" ")}),p=e.computed(()=>{switch(o.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-base font-medium xxx-tracking-wide"}}),C=e.computed(()=>{switch(o.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),h=e.computed(()=>{const c=[];return o.fullWidth&&c.push("w-full"),i.value&&c.push("cursor-not-allowed"),c.join(" ")}),x=e.computed(()=>{const c=[];return!i.value&&!o.link&&!o.text&&c.push("active:scale-[0.97]"),!i.value&&o.link&&c.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),c.join(" ")}),k=e.computed(()=>{const c=o.link||o.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",h.value,p.value,v.value,c?"":u.value,c?"":f.value,c?"":d.value,o.link?"":C.value,x.value].join(" ")}),y=e.computed(()=>{const c=[""];switch(o.loading&&c.push("animate-spin"),o.size){case"xs":c.push("h-3 w-3");break;case"sm":c.push("h-4 w-4");break;case"lg":c.push("h-6 w-6");break;case"xl":c.push("h-8 w-8");break;case"base":default:c.push("h-5 w-5");break}return c.join(" ")}),I=c=>{if(i.value){c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation();return}n("click",c)};return(c,B)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?e.unref(a):"button"),{href:t.to,to:t.to,type:e.unref(s),external:t.external,class:e.normalizeClass(e.unref(k)),disabled:e.unref(i),role:"button",onClick:I},{default:e.withCtx(()=>[e.unref(m)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m)),{key:0,class:e.normalizeClass(`${e.unref(y)} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",ge," ")):e.renderSlot(c.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${e.unref(y)} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const H=(t,n)=>{const o=t.__vccOpts||t;for(const[r,l]of n)o[r]=l;return o},F=H(ye,[["__scopeId","data-v-da9a3400"]]),Z=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,r=l=>{if(o.disabled){l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation();return}n("click",l)};return(l,a)=>(e.openBlock(),e.createBlock(F,{link:"",to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:r},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var P=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(P||{});const ve={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},ke={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},xe={key:0,class:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5"},be={class:"p-4"},Ce={class:"flex items-start"},Be={class:"flex-shrink-0"},we={class:"ml-2 w-0 flex-1 flex flex-col"},Ve={key:0,class:"text-foreground font-bold"},Ee={key:1,class:"label label--light text-foreground-2"},Se={key:2,class:"flex justify-start mt-2"},Ne=e.createElementVNode("span",{class:"sr-only"},"Close",-1),$e=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:n}){const o=t,r=e.computed(()=>{var s,i;return!((s=o.notification)!=null&&s.description)&&!((i=o.notification)!=null&&i.cta)}),l=()=>{n("update:notification",null)},a=s=>{var i,m,u;(u=(m=(i=o.notification)==null?void 0:i.cta)==null?void 0:m.onClick)==null||u.call(m,s),l()};return(s,i)=>(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",ke,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",be,[e.createElementVNode("div",Ce,[e.createElementVNode("div",Be,[t.notification.type===e.unref(P).Success?(e.openBlock(),e.createBlock(e.unref(z.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(P).Danger?(e.openBlock(),e.createBlock(e.unref(z.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(P).Warning?(e.openBlock(),e.createBlock(e.unref(z.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(P).Info?(e.openBlock(),e.createBlock(e.unref(z.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",we,[t.notification.title?(e.openBlock(),e.createElementBlock("p",Ve,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",Ee,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Se,[e.createVNode(Z,{to:t.notification.cta.url,class:"label",primary:"",onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-4 flex flex-shrink-0",{"self-center":e.unref(r)}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:l},[Ne,e.createVNode(e.unref(_.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),_e=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Ie=[_e],ee=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:n}){const o=t,r=e.computed(()=>o.colorClasses||"bg-blue-100 text-blue-800"),l=e.computed(()=>o.dotIconColorClasses||"text-blue-400"),a=e.computed(()=>{const u=["inline-flex items-center",r.value,o.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return o.rounded?(u.push("rounded"),u.push(o.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(u.push("rounded-full"),u.push(o.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),u.join(" ")}),s=e.computed(()=>{const u=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return o.clickableIcon?u.push("cursor-pointer"):u.push("cursor-default"),u.join(" ")}),i=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",l.value].join(" ")),m=u=>{if(!o.clickableIcon){u.stopPropagation(),u.stopImmediatePropagation(),u.preventDefault();return}n("click-icon",u)};return(u,v)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a))},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(e.unref(i)),fill:"currentColor",viewBox:"0 0 8 8"},Ie,2)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(s)),onClick:v[0]||(v[0]=f=>m(f))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",e.unref(l)])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});var j=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(j||{});function te(t){const{props:{modelValue:n,steps:o,orientation:r,goVerticalBelow:l,nonInteractive:a},emit:s}=t,i=e.computed(()=>(r==null?void 0:r.value)==="vertical"?"vertical":"horizontal"),m=e.computed({get:()=>b.clamp((n==null?void 0:n.value)||0,-1,o.value.length),set:h=>s("update:modelValue",b.clamp(h,0,o.value.length))}),u=h=>`${h+1}`,v=h=>h===m.value,f=h=>h<m.value,d=(h,x)=>{var y;if(a!=null&&a.value){x==null||x.preventDefault(),x==null||x.stopPropagation(),x==null||x.stopImmediatePropagation();return}m.value=h;const k=o.value[m.value];(y=k==null?void 0:k.onClick)==null||y.call(k)},p=e.computed(()=>{const h=["flex"];return h.push("flex"),i.value==="vertical"||l!=null&&l.value?(h.push("flex-col space-y-4 justify-center"),(l==null?void 0:l.value)===j.sm?h.push("sm:flex-row sm:space-y-0 sm:justify-start sm:space-x-8 sm:items-center"):(l==null?void 0:l.value)===j.md?h.push("md:flex-row md:space-y-0 md:justify-start md:space-x-8 md:items-center"):(l==null?void 0:l.value)===j.lg?h.push("lg:flex-row lg:space-y-0 lg:justify-start lg:space-x-8 lg:items-center"):(l==null?void 0:l.value)===j.xl&&h.push("xl:flex-row xl:space-y-0 xl:justify-start xl:space-x-8 xl:items-center")):h.push("flex-row space-x-8 items-center"),h.join(" ")}),C=e.computed(()=>{const h=["flex items-center"];return a!=null&&a.value||h.push("cursor-pointer"),h.join(" ")});return{value:m,isCurrentStep:v,isFinishedStep:f,switchStep:d,getStepDisplayValue:u,listClasses:p,linkClasses:C,orientation:i}}const Le=["aria-label"],ze=["href","onClick"],De={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Pe={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},je={class:"flex flex-col"},Oe={key:0,class:"label label--light text-foreground"},Te=["href","onClick"],Me={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ae={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Re={class:"flex flex-col"},Fe={key:0,class:"label label--light text-foreground"},qe=["href","onClick"],Ue={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},We={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},He={class:"flex flex-col"},Ge={key:0,class:"label label--light"},Ke=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,{isCurrentStep:r,isFinishedStep:l,switchStep:a,getStepDisplayValue:s,listClasses:i,linkClasses:m}=te({props:e.toRefs(o),emit:n});return(u,v)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(i))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(f,d)=>(e.openBlock(),e.createElementBlock("li",{key:f.name},[e.unref(l)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:f.href,class:e.normalizeClass(e.unref(m)),onClick:p=>e.unref(a)(d,p)},[e.createElementVNode("div",De,[e.createElementVNode("div",Pe,[e.createVNode(e.unref(_.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",je,[e.createElementVNode("div",null,e.toDisplayString(f.name),1),f.description?(e.openBlock(),e.createElementBlock("div",Oe,e.toDisplayString(f.description),1)):e.createCommentVNode("",!0)])])],10,ze)):e.unref(r)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:f.href,class:e.normalizeClass(e.unref(m)),"aria-current":"step",onClick:p=>e.unref(a)(d,p)},[e.createElementVNode("div",Me,[e.createElementVNode("div",Ae,e.toDisplayString(e.unref(s)(d)),1),e.createElementVNode("div",Re,[e.createElementVNode("div",null,e.toDisplayString(f.name),1),f.description?(e.openBlock(),e.createElementBlock("div",Fe,e.toDisplayString(f.description),1)):e.createCommentVNode("",!0)])])],10,Te)):(e.openBlock(),e.createElementBlock("a",{key:2,href:f.href,class:e.normalizeClass(e.unref(m)),onClick:p=>e.unref(a)(d,p)},[e.createElementVNode("div",Ue,[e.createElementVNode("div",We,e.toDisplayString(e.unref(s)(d)),1),e.createElementVNode("div",He,[e.createElementVNode("div",null,e.toDisplayString(f.name),1),f.description?(e.openBlock(),e.createElementBlock("div",Ge,e.toDisplayString(f.description),1)):e.createCommentVNode("",!0)])])],10,qe))]))),128))],2)],8,Le))}}),ne=t=>(e.pushScopeId("data-v-56fc6520"),t=t(),e.popScopeId(),t),Xe=["aria-label"],Je=["href","onClick"],Qe={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},Ye={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Ze=["href","onClick"],et={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},tt={key:0,class:"h-3 w-3 rounded-full bg-foreground"},nt=ne(()=>e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1)),ot=ne(()=>e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1)),lt=["href","onClick"],rt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},at={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},st={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},it=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,{isCurrentStep:r,isFinishedStep:l,switchStep:a,listClasses:s,linkClasses:i}=te({props:e.toRefs(o),emit:n}),m=e.computed(()=>{const u=["ml-3 h6 font-medium leading-7"];return o.basic&&u.push("sr-only"),u.join(" ")});return(u,v)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(s),t.basic?"basic":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(f,d)=>(e.openBlock(),e.createElementBlock("li",{key:f.name},[e.unref(l)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:f.href,class:e.normalizeClass(e.unref(i)),onClick:p=>e.unref(a)(d,p)},[e.createElementVNode("span",Qe,[t.basic?(e.openBlock(),e.createElementBlock("span",Ye)):(e.openBlock(),e.createBlock(e.unref(_.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",e.unref(m)])},e.toDisplayString(f.name),3)],10,Je)):e.unref(r)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:f.href,class:e.normalizeClass(e.unref(i)),"aria-current":"step",onClick:p=>e.unref(a)(d,p)},[e.createElementVNode("span",et,[t.basic?(e.openBlock(),e.createElementBlock("span",tt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[nt,ot],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",e.unref(m)])},e.toDisplayString(f.name),3)],10,Ze)):(e.openBlock(),e.createElementBlock("a",{key:2,href:f.href,class:e.normalizeClass(e.unref(i)),onClick:p=>e.unref(a)(d,p)},[e.createElementVNode("div",rt,[t.basic?(e.openBlock(),e.createElementBlock("span",at)):(e.openBlock(),e.createElementBlock("div",st))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",e.unref(m)])},e.toDisplayString(f.name),3)],10,lt))]))),128))],2)],8,Xe))}});const ct=H(it,[["__scopeId","data-v-56fc6520"]]),ut=["disabled"],dt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:n}){const o=t,r=e.computed(()=>{const a=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return o.disabled?a.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(a.push(o.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),a.push("ring-outline-2 hover:ring-4")),a.join(" ")}),l=a=>{if(o.disabled){a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation();return}n("update:modelValue",!o.modelValue),n("click",a)};return(a,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(e.unref(r)),disabled:t.disabled,onClick:l},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,ut))}}),ft={class:"relative flex items-start"},mt={class:"flex h-6 items-center"},pt=["id","checked","aria-describedby","name","value","disabled"],ht={class:"ml-2 text-sm",style:{"padding-top":"2px"}},gt=["for"],yt={key:0,class:"text-danger ml-1"},vt=["id"],kt=e.defineComponent({inheritAttrs:!1}),xt=e.defineComponent({...kt,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,o=h=>`${h}-${W.nanoid()}`,r=e.computed(()=>n.value||n.name),{checked:l,errorMessage:a,handleChange:s}=U.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:r,initialValue:n.modelValue||void 0}),i=h=>{n.disabled||s(h)},m=e.computed(()=>n.label||n.name),u=e.computed(()=>a.value?"border-danger-lighter":"border-foreground-4 "),v=e.computed(()=>n.description||a.value),f=e.computed(()=>`${n.name}-description`),d=e.computed(()=>{const h=[];return n.inlineDescription?h.push("inline ml-2"):h.push("block"),a.value?h.push("text-danger"):h.push("text-foreground-2"),h.join(" ")}),p=e.ref(o("checkbox")),C=e.computed(()=>n.id||p.value);return(h,x)=>(e.openBlock(),e.createElementBlock("div",ft,[e.createElementVNode("div",mt,[e.createElementVNode("input",e.mergeProps({id:e.unref(C),checked:e.unref(l),"aria-describedby":e.unref(f),name:t.name,value:e.unref(r),disabled:t.disabled,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",e.unref(u)]},h.$attrs,{onChange:i}),null,16,pt)]),e.createElementVNode("div",ht,[e.createElementVNode("label",{for:e.unref(C),class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(e.unref(m)),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",yt,"*")):e.createCommentVNode("",!0)],10,gt),e.unref(v)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(f),class:e.normalizeClass(e.unref(d))},e.toDisplayString(e.unref(v)),11,vt)):e.createCommentVNode("",!0)])]))}});function oe(t){const{props:n,inputEl:o,emit:r}=t,{value:l,errorMessage:a}=U.useField(n.name,n.rules,{validateOnMount:e.unref(n.validateOnMount),validateOnValueUpdate:e.unref(n.validateOnValueUpdate),initialValue:e.unref(n.modelValue)||void 0}),s=e.computed(()=>{const y=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||y.push("sr-only"),y.join(" ")}),i=e.computed(()=>{const y=["block w-full rounded focus:outline-none text-foreground transition-all","disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted","placeholder:text-foreground-2"];return a.value?y.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):y.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(n.color)==="foundation"?y.push("bg-foundation shadow-sm hover:shadow"):y.push("bg-foundation-page"),y.join(" ")}),m=e.ref(W.nanoid()),u=e.computed(()=>e.unref(n.label)||e.unref(n.name)),v=e.computed(()=>{const y=a.value;return!y||!e.unref(n.useLabelInErrors)?y:y.replace("Value",u.value)}),f=e.computed(()=>v.value&&e.unref(n.hideErrorMessage)),d=e.computed(()=>v.value||e.unref(n.help)),p=e.computed(()=>!!d.value),C=e.computed(()=>p.value?`${e.unref(n.name)}-${m.value}`:void 0),h=e.computed(()=>{const y=["mt-2 text-sm"];return y.push(a.value?"text-danger":"text-foreground-2"),y.join(" ")}),x=()=>{var y;(y=o.value)==null||y.focus()},k=()=>{l.value="",r("change",{value:""}),r("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&x()}),{coreClasses:i,title:u,value:l,helpTipId:C,helpTipClasses:h,helpTip:d,hideHelpTip:f,errorMessage:v,clear:k,focus:x,labelClasses:s}}const bt=["for"],Ct={class:"relative"},Bt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],wt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Vt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},Et=["id"],St=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"}},emits:["update:modelValue","change","input","clear"],setup(t,{expose:n,emit:o}){const r=t,l=e.ref(null),{coreClasses:a,title:s,value:i,helpTipId:m,helpTipClasses:u,helpTip:v,errorMessage:f,labelClasses:d,clear:p,focus:C}=oe({props:e.toRefs(r),emit:o,inputEl:l}),h=e.computed(()=>{const x=["pl-2"];return r.showClear&&f.value?x.push("pr-12"):(r.showClear||f.value)&&x.push("pr-8"),x.join(" ")});return n({focus:C}),(x,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(d))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(s)),1)],10,bt),e.createElementVNode("div",Ct,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:l,"onUpdate:modelValue":k[0]||(k[0]=y=>e.isRef(i)?i.value=y:null),name:t.name,class:[e.unref(a),e.unref(h),"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(f)?"true":"false","aria-describedby":e.unref(m)},x.$attrs,{onChange:k[1]||(k[1]=y=>x.$emit("change",{event:y,value:e.unref(i)})),onInput:k[2]||(k[2]=y=>x.$emit("input",{event:y,value:e.unref(i)}))}),null,16,Bt),[[e.vModelText,e.unref(i)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:k[3]||(k[3]=(...y)=>e.unref(p)&&e.unref(p)(...y)),onKeydown:k[4]||(k[4]=(...y)=>e.unref(p)&&e.unref(p)(...y))},[wt,e.createVNode(e.unref(_.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(_.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",Vt," * ")):e.createCommentVNode("",!0)]),e.unref(m)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(m),class:e.normalizeClass(e.unref(u))},e.toDisplayString(e.unref(v)),11,Et)):e.createCommentVNode("",!0)],2))}}),Nt=["for"],$t={class:"relative"},_t={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},It=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Lt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),zt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},Dt=["id"],Pt=e.defineComponent({inheritAttrs:!1}),jt=e.defineComponent({...Pt,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:n,emit:o}){const r=t,l=e.useSlots(),a=e.ref(null),{coreClasses:s,title:i,value:m,helpTipId:u,helpTipClasses:v,helpTip:f,hideHelpTip:d,errorMessage:p,clear:C,focus:h,labelClasses:x}=oe({props:e.toRefs(r),emit:o,inputEl:a}),k=e.computed(()=>{const B=["h-5 w-5"];return p.value?B.push("text-danger"):B.push("text-foreground-2"),B.join(" ")}),y=e.computed(()=>["email","password"].includes(r.type)||r.customIcon),I=e.computed(()=>{const B=[];return y.value?B.push("pl-8"):B.push("pl-2"),l["input-right"]||(p.value||r.showClear)&&(p.value&&r.showClear?B.push("pr-12"):B.push("pr-8")),B.join(" ")}),c=e.computed(()=>{switch(r.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return n({focus:h}),(B,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(x))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,Nt),e.createElementVNode("div",$t,[e.unref(y)?(e.openBlock(),e.createElementBlock("div",_t,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(_.EnvelopeIcon),{key:1,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(_.KeyIcon),{key:2,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:a,"onUpdate:modelValue":S[0]||(S[0]=w=>e.isRef(m)?m.value=w:null),type:t.type,name:t.name,class:[e.unref(s),e.unref(I),e.unref(c),t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(p)?"true":"false","aria-describedby":e.unref(u),role:"textbox"},B.$attrs,{onChange:S[1]||(S[1]=w=>B.$emit("change",{event:w,value:e.unref(m)})),onInput:S[2]||(S[2]=w=>B.$emit("input",{event:w,value:e.unref(m)}))}),null,16,It),[[e.vModelDynamic,e.unref(m)]]),e.renderSlot(B.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:S[3]||(S[3]=(...w)=>e.unref(C)&&e.unref(C)(...w)),onKeydown:S[4]||(S[4]=(...w)=>e.unref(C)&&e.unref(C)(...w))},[Lt,e.createVNode(e.unref(_.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(_.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(p)?(e.openBlock(),e.createElementBlock("div",zt," * ")):e.createCommentVNode("",!0)])]),e.unref(u)&&!e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(v))},e.toDisplayString(e.unref(f)),11,Dt)):e.createCommentVNode("",!0)],2))}}),Ot=/^https?:\/\//,G=/^[\w-_.+]+@[\w-_.+]+$/,Tt=t=>(t||"").match(G)?!0:"Value should be a valid e-mail address",Mt=t=>(t||"").split(",").map(r=>r.trim()).every(r=>r.match(G))||"Value should be one or multiple comma-delimited e-mail addresses",At=t=>(b.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Rt=(t,n)=>(o,r)=>o===r.form[t]?!0:`Value must be the same as in field '${n||t}'`,Ft=t=>n=>{const{minLength:o,maxLength:r}=t;return n=T.isNullOrUndefined(n)?"":n,b.isString(n)?!b.isUndefined(o)&&n.length<o?`Value needs to be at least ${o} characters long`:!b.isUndefined(r)&&n.length>r?`Value needs to be no more than ${r} characters long`:!0:"Value should be a text string"},qt=t=>n=>{const{match:o,message:r}=t;return b.isString(n)?o?b.isString(o)?n.includes(o)?!0:r:o.test(n)?!0:r:!0:"Value should be a text string"},Ut=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:G,VALID_HTTP_URL:Ot,isEmail:Tt,isOneOrMultipleEmails:Mt,isRequired:At,isSameAs:Rt,isStringOfLength:Ft,stringContains:qt},Symbol.toStringTag,{value:"Module"}));function le(t){const{skipCalculation:n,elementToWatchForChanges:o,itemContainer:r,trackResize:l=!1,trackMutations:a=!0}=t||{},s=e.ref(0),i=()=>{const m=r.value;if(n!=null&&n.value||!m)return;const u=m.children;let v=0,f=0,d;for(const p of u){const C=p.offsetTop;b.isUndefined(d)?(d=C,v+=1):C===d&&(v+=1),f+=1}s.value=f-v};return l&&M.useResizeObserver(o,i),a&&M.useMutationObserver(o,i,{childList:!0,subtree:!0}),{hiddenItemCount:s}}function re(t){const{props:n,emit:o,dynamicVisibility:r}=t;let l;if(r){const{elementToWatchForChanges:u,itemContainer:v}=r;l=le({skipCalculation:e.computed(()=>{var d;return!((d=n.multiple)!=null&&d.value)}),elementToWatchForChanges:u,itemContainer:v}).hiddenItemCount}else l=e.ref(0);const a=e.computed({get:()=>{var v,f;const u=(v=n.modelValue)==null?void 0:v.value;return(f=n.multiple)!=null&&f.value?b.isArray(u)?u:[]:b.isArray(u)?void 0:u},set:u=>{var v,f,d;if((v=n.multiple)!=null&&v.value&&!b.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((f=n.multiple)!=null&&f.value)&&b.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}o("update:modelValue",(d=n.multiple)!=null&&d.value?u||[]:u)}}),s=u=>b.isArray(u);return{selectedValue:a,hiddenSelectedItemCount:l,isArrayValue:s,isMultiItemArrayValue:u=>b.isArray(u)&&u.length>1,firstItem:u=>s(u)?u[0]:u}}const Wt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Ht=Wt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Gt=[Ht],Kt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Gt,2))}});const K=H(Kt,[["__scopeId","data-v-60cf597b"]]),Xt={class:"flex items-center justify-between w-full"},Jt={class:"block truncate grow text-left"},Qt={class:"pointer-events-none shrink-0 ml-1 flex items-center"},Yt=["disabled"],Zt={key:0,class:"flex flex-col mx-1 mb-1"},en=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),tn={class:"relative"},nn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},on=["placeholder"],ln={key:0,class:"px-1"},rn={key:1},an=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),sn={class:e.normalizeClass(["block truncate"])},cn=["id"],ae=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,{value:o,errorMessage:r}=U.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,validateOnValueUpdate:n.validateOnValueUpdate,initialValue:n.modelValue}),l=e.ref(null),a=e.ref(""),s=e.ref([]),i=e.ref(!1),m=e.ref(W.nanoid()),u=e.computed(()=>e.unref(n.label)||e.unref(n.name)),v=e.computed(()=>{const g=r.value;return!g||!e.unref(n.useLabelInErrors)?g:g.replace("Value",u.value)}),f=e.computed(()=>v.value||e.unref(n.help)),d=e.computed(()=>!!f.value),p=e.computed(()=>d.value?`${e.unref(n.name)}-${m.value}`:void 0),C=e.computed(()=>r.value?"text-danger":"text-foreground-2"),h=e.computed(()=>n.buttonStyle!=="simple"&&n.clearable&&!n.disabled),x=e.computed(()=>{const g=["relative flex group",n.showLabel?"mt-1":""];return n.buttonStyle!=="simple"&&(g.push("hover:shadow rounded-md"),g.push("outline outline-2 outline-primary-muted")),n.fixedHeight&&g.push("h-8"),g.join(" ")}),k=e.computed(()=>{const g=[];return n.buttonStyle!=="simple"&&g.push(S.value?"bg-foundation-disabled text-foreground-disabled":""),S.value&&g.push("cursor-not-allowed"),g.join(" ")}),y=e.computed(()=>{const g=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all",X.value?`w-6 ${k.value}`:"w-0"];return S.value||g.push("bg-primary-muted hover:bg-primary hover:text-foreground-on-primary"),g.join(" ")}),I=e.computed(()=>{const g=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",k.value];return n.buttonStyle!=="simple"&&(g.push("py-2 px-3"),S.value||g.push("bg-foundation text-foreground")),h.value&&X.value&&g.push("rounded-r-none"),g.join(" ")}),c=e.computed(()=>!!(n.search&&(n.filterPredicate||n.getSearchResults))),B=e.computed(()=>c.value&&n.getSearchResults),S=e.computed(()=>n.disabled||!n.items.length&&!B.value),w=e.computed({get:()=>{const g=o.value;return n.multiple?b.isArray(g)?g:[]:b.isArray(g)?void 0:g},set:g=>{if(n.multiple&&!b.isArray(g)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!n.multiple&&b.isArray(g)){console.warn("Attempting to set array value in selector w/ multiple=false");return}if(n.multiple)o.value=g||[];else{const N=o.value,V=n.allowUnset&&N&&g&&q(N)===q(g);o.value=V?void 0:g}}}),X=e.computed(()=>n.multiple?w.value.length!==0:!!w.value),de=()=>{n.multiple?w.value=[]:w.value=void 0},fe=e.computed(()=>{const g=a.value;return!c.value||!(g!=null&&g.length)?s.value:n.filterPredicate?s.value.filter(N=>{var V;return((V=n.filterPredicate)==null?void 0:V.call(n,N,g))||!1}):s.value}),J=g=>JSON.stringify(g),q=g=>n.by?g[n.by]:g,Q=async()=>{if(console.log("triggerSearch"),!(!B.value||!n.getSearchResults)){i.value=!0;try{s.value=await n.getSearchResults(a.value)}finally{i.value=!1}}},me=b.debounce(Q,1e3);return e.watch(()=>n.items,g=>{s.value=g.slice()},{immediate:!0}),e.watch(a,()=>{B.value&&me()}),e.onMounted(()=>{B.value&&!n.items.length&&Q()}),(g,N)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Listbox),{modelValue:e.unref(w),"onUpdate:modelValue":N[4]||(N[4]=V=>e.isRef(w)?w.value=V:null),name:t.name,multiple:t.multiple,by:t.by,disabled:e.unref(S),as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxLabel),{class:e.normalizeClass(["block label text-foreground",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(x))},[e.createVNode(e.unref(E.ListboxButton),{class:e.normalizeClass(e.unref(I))},{default:e.withCtx(({open:V})=>[e.createElementVNode("div",Xt,[e.createElementVNode("div",Jt,[!e.unref(w)||e.unref(b.isArray)(e.unref(w))&&!e.unref(w).length?e.renderSlot(g.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(g.$slots,"something-selected",{key:1,value:e.unref(w)},()=>[e.createTextVNode(e.toDisplayString(J(e.unref(w))),1)])]),e.createElementVNode("div",Qt,[V?(e.openBlock(),e.createBlock(e.unref($.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref($.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),e.unref(h)?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(y)),disabled:t.disabled,onClick:N[0]||(N[0]=V=>de())},[e.createVNode(e.unref($.XMarkIcon),{class:"w-3 h-3"})],10,Yt)),[[e.unref(pe.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:N[3]||(N[3]=V=>{var D;return(D=l.value)==null?void 0:D.focus()})},{default:e.withCtx(()=>[e.unref(c)?(e.openBlock(),e.createElementBlock("label",Zt,[en,e.createElementVNode("div",tn,[e.createElementVNode("div",nn,[e.createVNode(e.unref($.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:l,"onUpdate:modelValue":N[1]||(N[1]=V=>a.value=V),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:N[2]||(N[2]=e.withModifiers(()=>{},["stop"]))},null,40,on),[[e.vModelText,a.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[e.unref(c)?"max-h-52":"max-h-60"]])},[e.unref(B)&&i.value?(e.openBlock(),e.createElementBlock("div",ln,[e.createVNode(K,{loading:!0})])):e.unref(B)&&!s.value.length?(e.openBlock(),e.createElementBlock("div",rn,[e.renderSlot(g.$slots,"nothing-found",{},()=>[an])])):e.createCommentVNode("",!0),!e.unref(B)||!i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(fe),V=>(e.openBlock(),e.createBlock(e.unref(E.ListboxOption),{key:q(V),value:V},{default:e.withCtx(({active:D,selected:Y})=>[e.createElementVNode("li",{class:e.normalizeClass([D?"text-primary":"text-foreground","relative transition cursor-pointer select-none py-1.5 pl-3",t.hideCheckmarks?"":"pr-9"])},[e.createElementVNode("span",sn,[e.renderSlot(g.$slots,"option",{item:V,active:D,selected:Y},()=>[e.createTextVNode(e.toDisplayString(J(V)),1)])]),!t.hideCheckmarks&&Y?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([D?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref($.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"]),e.unref(p)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(p),class:e.normalizeClass(["mt-2 ml-3 text-sm",e.unref(C)])},e.toDisplayString(e.unref(f)),11,cn)):e.createCommentVNode("",!0)]))}}),se=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(ee,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),un={key:0,class:"text-foreground-2 normal"},dn={key:1,class:"flex items-center"},fn={class:"truncate"},mn={class:"flex items-center"},pn={class:"truncate"},hn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,r=e.ref(null),l=e.ref(null),{selectedValue:a,hiddenSelectedItemCount:s,isMultiItemArrayValue:i,firstItem:m}=re({props:e.toRefs(o),emit:n,dynamicVisibility:{elementToWatchForChanges:r,itemContainer:l}}),u=(v,f)=>v.name.toLocaleLowerCase().includes(f.toLocaleLowerCase());return(v,f)=>(e.openBlock(),e.createBlock(ae,{modelValue:e.unref(a),"onUpdate:modelValue":f[0]||(f[0]=d=>e.isRef(a)?a.value=d:null),multiple:t.multiple,items:t.items??e.unref(T.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":u,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:d})=>[e.unref(i)(d)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:r,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:l,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d,p=>(e.openBlock(),e.createBlock(se,{key:p.name,"source-app":p},null,8,["source-app"]))),128))],512),e.unref(s)>0?(e.openBlock(),e.createElementBlock("div",un," +"+e.toDisplayString(e.unref(s)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",dn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(m)(d).bgColor})},null,4),e.createElementVNode("span",fn,e.toDisplayString(e.unref(m)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",mn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",pn,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var O=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(O||{});const A=T.getClientOperatingSystem(),gn={["cmd-or-ctrl"]:A===T.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:A===T.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function yn(t){const n=o=>Object.values(O).includes(o);return t.map(o=>n(o)?gn[o]:o).join("+")}function vn(t,...n){M.onKeyDown(n[0],o=>{const r=o.getModifierState("Alt"),l=A===T.OperatingSystem.Mac?o.getModifierState("Meta"):o.getModifierState("Control"),a=o.getModifierState("Shift");for(const s of t)switch(s){case O.CtrlOrCmd:if(!l)return;break;case O.AltOrOpt:if(!r)return;break;case O.Shift:if(!a)return;break}n[1](o)},n[2])}const kn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),xn={class:"fixed inset-0 z-10 overflow-y-auto"},bn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Cn={class:"relative"},Bn=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean}},emits:["update:open","fully-closed"],setup(t,{emit:n}){const o=t,r=e.computed({get:()=>o.open,set:s=>n("update:open",s)}),l=e.computed(()=>{switch(o.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),a=e.computed(()=>{const s=["px-4 pt-4 pb-4 w-full","sm:my-8 sm:w-full sm:max-w-xl sm:p-6"];return l.value>=1&&s.push("md:max-w-2xl"),l.value>=2&&s.push("lg:max-w-4xl"),l.value>=3&&s.push("xl:max-w-6xl"),l.value>=4&&s.push("2xl:max-w-7xl"),s.join(" ")});return(s,i)=>(e.openBlock(),e.createBlock(e.unref(E.TransitionRoot),{as:"template",show:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Dialog),{as:"div",class:"relative z-40",onClose:i[2]||(i[2]=m=>r.value=!1)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e.withCtx(()=>[kn]),_:1}),e.createElementVNode("div",xn,[e.createElementVNode("div",bn,[e.createVNode(e.unref(E.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:i[1]||(i[1]=m=>s.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(E.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",e.unref(a)])},{default:e.withCtx(()=>[e.createElementVNode("div",Cn,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")]),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"absolute top-0 right-0 text-foreground",onClick:i[0]||(i[0]=m=>r.value=!1)},[e.createVNode(e.unref(z.XMarkIcon),{class:"h-6 w-6"})]))])]),_:3},8,["class"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),wn={class:"inline-flex items-center space-x-2"},Vn={class:"label-light"},En=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const n=t,o=e.computed(()=>{const l=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1"];switch(n.color){case"danger":l.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:l.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return l.join(" ")}),r=e.computed(()=>{const l=["mt-4 px-3 py-1 border-x "];switch(n.color){case"danger":l.push("border-danger-lighter");break;case"default":default:l.push("border-primary-muted");break}return l.join(" ")});return(l,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Disclosure),null,{default:e.withCtx(({open:s})=>[e.createVNode(e.unref(E.DisclosureButton),{class:e.normalizeClass(e.unref(o))},{default:e.withCtx(()=>[e.createElementVNode("div",wn,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref($.ChevronUpIcon),{class:e.normalizeClass([s?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(E.DisclosurePanel),{class:e.normalizeClass(e.unref(r))},{default:e.withCtx(()=>[e.createElementVNode("div",Vn,[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var L=(t=>(t.Grid="grid",t.List="list",t))(L||{});const Sn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:n}){const o=t,r=e.computed({get:()=>o.modelValue||L.Grid,set:s=>n("update:modelValue",s)}),l=e.computed(()=>r.value===L.Grid?$.Bars3Icon:$.Squares2X2Icon),a=s=>{n("click",s);const i=r.value===L.Grid?L.List:L.Grid;r.value=i};return(s,i)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:a},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l)),{class:"h-6 w-6"}))]))}});var ie=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(ie||{}),R=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(R||{});function ce(t,n){if(!M.isClient)return;const{wait:o=100,throttleOrDebounce:r=0}=n||{},l=o?r===0?b.throttle(t,o):b.debounce(t,o):t;e.onMounted(()=>window.addEventListener("resize",l)),e.onBeforeUnmount(()=>window.removeEventListener("resize",l))}function Nn(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ue(t){const{el:n,defaultDirection:o}=t,r=e.ref(b.isUndefined(o)?1:o),l=e.computed(()=>{const s=e.unref(t.stopUpdatesBelowWidth);if(!b.isUndefined(s))return s;const i=e.unref(n);return i!=null&&i.offsetWidth?i.offsetWidth*2:void 0}),a=()=>{if(!M.isClient)return;const s=e.unref(n);if(!s)return;const i=s.getBoundingClientRect(),m=i.x+i.width>window.innerWidth,u=i.x<0;m&&u||!b.isUndefined(l.value)&&window.innerWidth<l.value||(m?r.value=0:u&&(r.value=1))};return ce(()=>a()),e.watch(()=>e.unref(n),s=>{s&&a()}),{direction:e.computed(()=>r.value),recalculateDirection:a}}const $n=["onClick"],_n=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:n}){const o=t,r=e.ref(null),{direction:l}=ue({el:e.computed(()=>{var d;return((d=r.value)==null?void 0:d.el)||null}),defaultDirection:R.Left,stopUpdatesBelowWidth:300}),a=e.ref(null),s=e.ref(!1),i=e.computed({get:()=>o.open||!1,set:d=>n("update:open",d)}),m=d=>{const{active:p,disabled:C}=d,h=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return p?h.push("bg-primary text-foreground-on-primary"):C?h.push("text-foreground-disabled"):h.push("text-foreground"),h.join(" ")},u=(d,p)=>{n("chosen",{item:d,event:p})},v=()=>{var d;return(d=a.value)==null?void 0:d.el.click()},f=d=>{const p=!!d;return s.value=p,p};return e.watch(s,(d,p)=>{d!==p&&(i.value=d)}),e.watch(i,d=>{(d&&!s.value||!d&&s.value)&&v()}),(d,p)=>(e.openBlock(),e.createBlock(e.unref(E.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:C})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(E.MenuButton),{ref_key:"menuButton",ref:a,class:"hidden",onClick:p[0]||(p[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(C?"pointer-events-none":"")},[e.renderSlot(d.$slots,"default",{toggle:v,open:f(C)})],2)]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.MenuItems),{ref_key:"menuItems",ref:r,class:e.normalizeClass(["absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(l)===e.unref(R).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(h,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h,k=>(e.openBlock(),e.createBlock(e.unref(E.MenuItem),{key:k.id,disabled:k.disabled},{default:e.withCtx(({active:y,disabled:I})=>[e.createElementVNode("button",{class:e.normalizeClass(m({active:y,disabled:I})),onClick:c=>u(k,c)},[e.renderSlot(d.$slots,"item",{item:k},()=>[e.createTextVNode(e.toDisplayString(k.title),1)])],10,$n)]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),In={class:"flex flex-col space-y-4"},Ln={class:"flex space-x-6"},zn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const n=t,o=e.ref(null),r=e.computed(()=>o.value&&n.items.find(a=>a.id===o.value)||n.items[0]),l=a=>{o.value=a.id};return(a,s)=>(e.openBlock(),e.createElementBlock("div",In,[e.createElementVNode("div",Ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,i=>(e.openBlock(),e.createBlock(F,{key:i.id,link:"",color:e.unref(r).id===i.id?"default":"secondary",onClick:m=>l(i)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(a.$slots,"default",{activeItem:e.unref(r)})]))}}),Dn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Pn={class:"inline-flex items-center space-x-1"},jn=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),On={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Tn={class:"inline-flex items-center space-x-1"},Mn=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),An=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const n=e.ref(null),o=e.ref(!1);return M.isClient&&e.onMounted(()=>{const r=setInterval(()=>{var l;(l=n.value)!=null&&l.isConnected&&(o.value=!0,clearInterval(r))},200)}),(r,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:n},[o.value?(e.openBlock(),e.createBlock(e.unref(he),e.mergeProps({key:0},r.$props.settings||{},{onInfinite:l[0]||(l[0]=a=>r.$emit("infinite",a))}),{spinner:e.withCtx(()=>[e.createVNode(K,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",Dn,[e.createElementVNode("div",Pn,[e.createVNode(e.unref(z.CheckIcon),{class:"w-5 h-5 text-success"}),jn])])]),error:e.withCtx(({retry:a})=>[e.createElementVNode("div",On,[e.createElementVNode("div",Tn,[e.createVNode(e.unref(z.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),Mn]),t.allowRetry?(e.openBlock(),e.createBlock(F,{key:0,onClick:a},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Rn={class:"relative group"},Fn={key:0,class:"absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"},qn=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1}},emits:["submit"],setup(t,{emit:n}){const o=t,r=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:px-6"),l=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:p-6"),a=e.computed(()=>{const s=["rounded-lg"];return o.noShadow||s.push("shadow"),o.ring&&s.push("ring-outline-2 hover:ring-2"),s.join(" ")});return(s,i)=>(e.openBlock(),e.createElementBlock("div",Rn,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",Fn)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.form?"form":"div"),{class:e.normalizeClass(["relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",e.unref(a)]),onSubmit:i[0]||(i[0]=m=>n("submit",m))},{default:e.withCtx(()=>[s.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r))},[e.renderSlot(s.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",e.unref(l)])},[e.renderSlot(s.$slots,"default")],2),s.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r))},[e.renderSlot(s.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}});exports.CommonBadge=ee;exports.CommonLoadingBar=K;exports.CommonStepsBullet=ct;exports.CommonStepsNumber=Ke;exports.CommonTextLink=Z;exports.FormButton=F;exports.FormCardButton=dt;exports.FormCheckbox=xt;exports.FormSelectBase=ae;exports.FormSelectSourceApps=hn;exports.FormTextArea=St;exports.FormTextInput=jt;exports.GlobalToastRenderer=$e;exports.GridListToggleValue=L;exports.HorizontalDirection=R;exports.InfiniteLoading=An;exports.LayoutDialog=Bn;exports.LayoutDisclosure=En;exports.LayoutGridListToggle=Sn;exports.LayoutMenu=_n;exports.LayoutPanel=qn;exports.LayoutTabs=zn;exports.ModifierKeys=O;exports.SourceAppBadge=se;exports.TailwindBreakpoints=j;exports.ThrottleOrDebounce=ie;exports.ToastNotificationType=P;exports.ValidationHelpers=Ut;exports.clientOs=A;exports.getKeyboardShortcutTitle=yn;exports.onKeyboardShortcut=vn;exports.useFormSelectChildInternals=re;exports.useOnBeforeWindowUnload=Nn;exports.useResponsiveHorizontalDirectionCalculation=ue;exports.useWindowResizeHandler=ce;exports.useWrappingContainerHiddenCount=le;
|
package/dist/lib.d.ts
CHANGED
|
@@ -20,5 +20,16 @@ import CommonLoadingBar from './components/common/loading/Bar.vue';
|
|
|
20
20
|
import SourceAppBadge from './components/SourceAppBadge.vue';
|
|
21
21
|
import { onKeyboardShortcut } from './composables/form/input';
|
|
22
22
|
import { ModifierKeys, getKeyboardShortcutTitle, clientOs } from './helpers/form/input';
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
import LayoutDialog from './components/layout/Dialog.vue';
|
|
24
|
+
import LayoutDisclosure from './components/layout/Disclosure.vue';
|
|
25
|
+
import LayoutGridListToggle from './components/layout/GridListToggle.vue';
|
|
26
|
+
import { GridListToggleValue } from './helpers/layout/components';
|
|
27
|
+
import { ThrottleOrDebounce, HorizontalDirection, useWindowResizeHandler, useOnBeforeWindowUnload, useResponsiveHorizontalDirectionCalculation } from './composables/common/window';
|
|
28
|
+
import LayoutMenu from './components/layout/Menu.vue';
|
|
29
|
+
import { LayoutMenuItem, LayoutTabItem } from './helpers/layout/components';
|
|
30
|
+
import LayoutTabs from './components/layout/Tabs.vue';
|
|
31
|
+
import InfiniteLoading from './components/InfiniteLoading.vue';
|
|
32
|
+
import { InfiniteLoaderState } from './helpers/global/components';
|
|
33
|
+
import LayoutPanel from './components/layout/Panel.vue';
|
|
34
|
+
export { GlobalToastRenderer, ToastNotificationType, FormButton, CommonTextLink, CommonBadge, TailwindBreakpoints, CommonStepsBullet, CommonStepsNumber, FormCardButton, FormCheckbox, FormTextArea, FormTextInput, ValidationHelpers, useWrappingContainerHiddenCount, useFormSelectChildInternals, FormSelectBase, FormSelectSourceApps, CommonLoadingBar, SourceAppBadge, onKeyboardShortcut, ModifierKeys, getKeyboardShortcutTitle, clientOs, LayoutDialog, LayoutDisclosure, LayoutGridListToggle, GridListToggleValue, ThrottleOrDebounce, HorizontalDirection, useWindowResizeHandler, useOnBeforeWindowUnload, useResponsiveHorizontalDirectionCalculation, LayoutMenu, LayoutTabs, InfiniteLoading, LayoutPanel };
|
|
35
|
+
export type { ToastNotification, BulletStepType, NumberStepType, HorizontalOrVertical, LayoutMenuItem, LayoutTabItem, InfiniteLoaderState };
|