@speckle/ui-components 2.12.666
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/.eslintrc.cjs +118 -0
- package/README.md +60 -0
- package/dist/components/SourceAppBadge.vue.d.ts +14 -0
- package/dist/components/common/Badge.vue.d.ts +65 -0
- package/dist/components/common/loading/Bar.vue.d.ts +13 -0
- package/dist/components/common/steps/Bullet.vue.d.ts +65 -0
- package/dist/components/common/steps/Number.vue.d.ts +57 -0
- package/dist/components/common/text/Link.vue.d.ts +106 -0
- package/dist/components/form/Button.vue.d.ts +256 -0
- package/dist/components/form/CardButton.vue.d.ts +24 -0
- package/dist/components/form/Checkbox.vue.d.ts +194 -0
- package/dist/components/form/TextArea.vue.d.ts +152 -0
- package/dist/components/form/TextInput.vue.d.ts +301 -0
- package/dist/components/form/select/Base.vue.d.ts +283 -0
- package/dist/components/form/select/SourceApps.vue.d.ts +126 -0
- package/dist/components/global/ToastRenderer.vue.d.ts +17 -0
- package/dist/composables/common/steps.d.ts +24 -0
- package/dist/composables/form/input.d.ts +6 -0
- package/dist/composables/form/select.d.ts +29 -0
- package/dist/composables/form/textInput.d.ts +44 -0
- package/dist/composables/layout/resize.d.ts +36 -0
- package/dist/helpers/common/components.d.ts +11 -0
- package/dist/helpers/common/validation.d.ts +23 -0
- package/dist/helpers/form/input.d.ts +9 -0
- package/dist/helpers/global/toast.d.ts +22 -0
- package/dist/helpers/tailwind.d.ts +19 -0
- package/dist/lib.cjs +1 -0
- package/dist/lib.d.ts +24 -0
- package/dist/lib.js +2155 -0
- package/dist/style.css +1 -0
- package/index.html +12 -0
- package/package.json +99 -0
- package/postcss.config.js +7 -0
- package/tailwind.config.cjs +14 -0
- package/tsconfig.json +31 -0
- package/tsconfig.node.json +10 -0
- package/utils/tailwind-configure.cjs +15 -0
- package/utils/tailwind-configure.d.ts +1 -0
- package/utils/tailwind-configure.js +13 -0
- package/vite.config.ts +48 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { Nullable } from '@speckle/shared';
|
|
3
|
+
import { ToastNotification } from '../../helpers/global/toast';
|
|
4
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
5
|
+
notification: {
|
|
6
|
+
type: __PropType<Nullable<ToastNotification>>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:notification"[], "update:notification", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
notification: {
|
|
11
|
+
type: __PropType<Nullable<ToastNotification>>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & {
|
|
15
|
+
"onUpdate:notification"?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ToRefs } from 'vue';
|
|
2
|
+
import { HorizontalOrVertical, StepCoreType } from '../../helpers/common/components';
|
|
3
|
+
import { TailwindBreakpoints } from '../../helpers/tailwind';
|
|
4
|
+
export declare function useStepsInternals(params: {
|
|
5
|
+
props: ToRefs<{
|
|
6
|
+
orientation?: HorizontalOrVertical;
|
|
7
|
+
steps: StepCoreType[];
|
|
8
|
+
modelValue?: number;
|
|
9
|
+
goVerticalBelow?: TailwindBreakpoints;
|
|
10
|
+
nonInteractive?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
emit: {
|
|
13
|
+
(e: 'update:modelValue', val: number): void;
|
|
14
|
+
};
|
|
15
|
+
}): {
|
|
16
|
+
value: import("vue").WritableComputedRef<number>;
|
|
17
|
+
isCurrentStep: (step: number) => boolean;
|
|
18
|
+
isFinishedStep: (step: number) => boolean;
|
|
19
|
+
switchStep: (newStep: number, e?: MouseEvent) => void;
|
|
20
|
+
getStepDisplayValue: (step: number) => string;
|
|
21
|
+
listClasses: import("vue").ComputedRef<string>;
|
|
22
|
+
linkClasses: import("vue").ComputedRef<string>;
|
|
23
|
+
orientation: import("vue").ComputedRef<HorizontalOrVertical>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { onKeyDown } from '@vueuse/core';
|
|
2
|
+
import { ModifierKeys } from '../../helpers/form/input';
|
|
3
|
+
/**
|
|
4
|
+
* onKeyDown wrapper that also checks for modifier keys being pressed
|
|
5
|
+
*/
|
|
6
|
+
export declare function onKeyboardShortcut(modifiers: ModifierKeys[], ...args: Parameters<typeof onKeyDown>): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref, ToRefs } from 'vue';
|
|
2
|
+
import { Nullable } from '@speckle/shared';
|
|
3
|
+
type GenericSelectValueType<T> = T | T[] | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* Common setup for FormSelectBase wrapping selector components
|
|
6
|
+
*/
|
|
7
|
+
export declare function useFormSelectChildInternals<T>(params: {
|
|
8
|
+
props: ToRefs<{
|
|
9
|
+
modelValue?: GenericSelectValueType<T>;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
emit: {
|
|
13
|
+
(e: 'update:modelValue', val: GenericSelectValueType<T>): void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @see {useWrappingContainerHiddenCount()}
|
|
17
|
+
*/
|
|
18
|
+
dynamicVisibility?: {
|
|
19
|
+
elementToWatchForChanges: Ref<Nullable<HTMLElement>>;
|
|
20
|
+
itemContainer: Ref<Nullable<HTMLElement>>;
|
|
21
|
+
};
|
|
22
|
+
}): {
|
|
23
|
+
selectedValue: import("vue").WritableComputedRef<GenericSelectValueType<T>>;
|
|
24
|
+
hiddenSelectedItemCount: Ref<number>;
|
|
25
|
+
isArrayValue: (v: GenericSelectValueType<T>) => v is T[];
|
|
26
|
+
isMultiItemArrayValue: (v: GenericSelectValueType<T>) => v is T[];
|
|
27
|
+
firstItem: (v: NonNullable<GenericSelectValueType<T>>) => T;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { RuleExpression } from 'vee-validate';
|
|
2
|
+
import { Ref, ToRefs } from 'vue';
|
|
3
|
+
import { Nullable } from '@speckle/shared';
|
|
4
|
+
export type InputColor = 'page' | 'foundation';
|
|
5
|
+
/**
|
|
6
|
+
* Common setup for text input & textarea fields
|
|
7
|
+
*/
|
|
8
|
+
export declare function useTextInputCore(params: {
|
|
9
|
+
props: ToRefs<{
|
|
10
|
+
name: string;
|
|
11
|
+
help?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
showLabel?: boolean;
|
|
14
|
+
rules?: RuleExpression<string>;
|
|
15
|
+
validateOnMount?: boolean;
|
|
16
|
+
validateOnValueUpdate?: boolean;
|
|
17
|
+
modelValue?: string;
|
|
18
|
+
autoFocus?: boolean;
|
|
19
|
+
showClear?: boolean;
|
|
20
|
+
useLabelInErrors?: boolean;
|
|
21
|
+
hideErrorMessage?: boolean;
|
|
22
|
+
color?: InputColor;
|
|
23
|
+
}>;
|
|
24
|
+
emit: {
|
|
25
|
+
(e: 'change', val: {
|
|
26
|
+
event?: Event;
|
|
27
|
+
value: string;
|
|
28
|
+
}): void;
|
|
29
|
+
(e: 'clear'): void;
|
|
30
|
+
};
|
|
31
|
+
inputEl: Ref<Nullable<HTMLInputElement | HTMLTextAreaElement>>;
|
|
32
|
+
}): {
|
|
33
|
+
coreClasses: import("vue").ComputedRef<string>;
|
|
34
|
+
title: import("vue").ComputedRef<string>;
|
|
35
|
+
value: Ref<string>;
|
|
36
|
+
helpTipId: import("vue").ComputedRef<string | undefined>;
|
|
37
|
+
helpTipClasses: import("vue").ComputedRef<string>;
|
|
38
|
+
helpTip: import("vue").ComputedRef<string | undefined>;
|
|
39
|
+
hideHelpTip: import("vue").ComputedRef<boolean | "" | undefined>;
|
|
40
|
+
errorMessage: import("vue").ComputedRef<string | undefined>;
|
|
41
|
+
clear: () => void;
|
|
42
|
+
focus: () => void;
|
|
43
|
+
labelClasses: import("vue").ComputedRef<string>;
|
|
44
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Nullable } from '@speckle/shared';
|
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Use this to calculate the number of hidden elements (e.g. user avatars) in a wrapping flex row that
|
|
5
|
+
* is styled to only show the first row. For example, there are 12 users total, there's only space for 5,
|
|
6
|
+
* and this composable will calculate the number of hidden ones to use for the "+X" label (+7 in the example)
|
|
7
|
+
*
|
|
8
|
+
* Note: The "hidden" items must wrap into another line, because we use their offset from the top of the parent
|
|
9
|
+
* to check if they're hidden (compared to items in the 1st row)
|
|
10
|
+
*/
|
|
11
|
+
export declare function useWrappingContainerHiddenCount(params: {
|
|
12
|
+
/**
|
|
13
|
+
* Element to watch for any changes
|
|
14
|
+
*/
|
|
15
|
+
elementToWatchForChanges: Ref<Nullable<HTMLElement>>;
|
|
16
|
+
/**
|
|
17
|
+
* The element that actually contains the potentially visible/hidden items as direct children
|
|
18
|
+
*/
|
|
19
|
+
itemContainer: Ref<Nullable<HTMLElement>>;
|
|
20
|
+
/**
|
|
21
|
+
* Allows you to pause calculations conditionally
|
|
22
|
+
*/
|
|
23
|
+
skipCalculation?: ComputedRef<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* If true, will track resizing of 'elementToWatchForChanges'.
|
|
26
|
+
* Default: false
|
|
27
|
+
*/
|
|
28
|
+
trackResize?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* If true, will track descendants being added/removed to 'elementToWatchForChanges'.
|
|
31
|
+
* Default: true
|
|
32
|
+
*/
|
|
33
|
+
trackMutations?: boolean;
|
|
34
|
+
}): {
|
|
35
|
+
hiddenItemCount: Ref<number>;
|
|
36
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type HorizontalOrVertical = 'horizontal' | 'vertical';
|
|
2
|
+
export interface StepCoreType {
|
|
3
|
+
name: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface BulletStepType extends StepCoreType {
|
|
8
|
+
}
|
|
9
|
+
export interface NumberStepType extends BulletStepType {
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GenericValidateFunction } from 'vee-validate';
|
|
2
|
+
export declare const VALID_HTTP_URL: RegExp;
|
|
3
|
+
export declare const VALID_EMAIL: RegExp;
|
|
4
|
+
/**
|
|
5
|
+
* Note about new validators:
|
|
6
|
+
* Make sure you use the word "Value" to refer to the value being validated in all error messages, cause the dynamic string replace
|
|
7
|
+
* that replaces that part with the actual field name works based on that
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* E-mail validation rule (not perfect, but e-mails should be validated by sending out confirmation e-mails anyway)
|
|
11
|
+
*/
|
|
12
|
+
export declare const isEmail: GenericValidateFunction<string>;
|
|
13
|
+
export declare const isOneOrMultipleEmails: GenericValidateFunction<string>;
|
|
14
|
+
export declare const isRequired: GenericValidateFunction<unknown>;
|
|
15
|
+
export declare const isSameAs: (otherFieldName: string, otherFieldDisplayName?: string) => GenericValidateFunction<unknown>;
|
|
16
|
+
export declare const isStringOfLength: (params: {
|
|
17
|
+
minLength?: number;
|
|
18
|
+
maxLength?: number;
|
|
19
|
+
}) => GenericValidateFunction<string>;
|
|
20
|
+
export declare const stringContains: (params: {
|
|
21
|
+
match: string | RegExp;
|
|
22
|
+
message: string;
|
|
23
|
+
}) => GenericValidateFunction<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OperatingSystem } from '@speckle/shared';
|
|
2
|
+
export declare enum ModifierKeys {
|
|
3
|
+
CtrlOrCmd = "cmd-or-ctrl",
|
|
4
|
+
AltOrOpt = "alt-or-opt",
|
|
5
|
+
Shift = "shift"
|
|
6
|
+
}
|
|
7
|
+
export declare const clientOs: OperatingSystem;
|
|
8
|
+
export declare const ModifierKeyTitles: Record<ModifierKeys, string>;
|
|
9
|
+
export declare function getKeyboardShortcutTitle(keys: Array<string | ModifierKeys>): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum ToastNotificationType {
|
|
2
|
+
Success = 0,
|
|
3
|
+
Warning = 1,
|
|
4
|
+
Danger = 2,
|
|
5
|
+
Info = 3
|
|
6
|
+
}
|
|
7
|
+
export type ToastNotification = {
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optionally provide extra text
|
|
11
|
+
*/
|
|
12
|
+
description?: string;
|
|
13
|
+
type: ToastNotificationType;
|
|
14
|
+
/**
|
|
15
|
+
* Optionally specify a CTA link on the right
|
|
16
|
+
*/
|
|
17
|
+
cta?: {
|
|
18
|
+
title: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
onClick?: (e: MouseEvent) => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* If you use concatenation or variables to build tailwind classes, PurgeCSS won't pick up on them
|
|
3
|
+
* during build and will not add them to the build. So you can use this function to just add string
|
|
4
|
+
* literals of tailwind classes so PurgeCSS picks up on them.
|
|
5
|
+
*
|
|
6
|
+
* While you could just define an unused array of these classes, eslint/TS will bother you about the unused
|
|
7
|
+
* variable so it's better to use this instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare function markClassesUsed(classes: string[]): void;
|
|
10
|
+
/**
|
|
11
|
+
* Default tailwind breakpoint set. Each value is the minimum width (in pixels) expected for each breakpoint.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum TailwindBreakpoints {
|
|
14
|
+
sm = 640,
|
|
15
|
+
md = 746,
|
|
16
|
+
lg = 1024,
|
|
17
|
+
xl = 1280,
|
|
18
|
+
'2xl' = 1536
|
|
19
|
+
}
|
package/dist/lib.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("lodash"),P=require("@heroicons/vue/24/outline"),E=require("@heroicons/vue/20/solid"),F=require("vee-validate"),R=require("nanoid"),L=require("@speckle/shared"),T=require("@vueuse/core"),j=require("@headlessui/vue"),O=require("@heroicons/vue/24/solid"),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}},emits:["click"],setup(t,{emit:n}){const o=t,a=e.resolveDynamicComponent("NuxtLink"),s=e.resolveDynamicComponent("RouterLink"),i=e.computed(()=>o.linkComponent?o.linkComponent:v.isObjectLike(a)?a:v.isObjectLike(s)?s:"a"),p=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),h=e.computed(()=>{const l=[];if(l.push("border-2"),o.disabled)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(" ")}),f=e.computed(()=>{const l=[];if(!o.text&&!o.link)if(o.disabled)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 o.disabled?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(" ")}),r=e.computed(()=>{const l=[];return l.push(o.rounded?"rounded-full":"rounded-md"),l.join(" ")}),y=e.computed(()=>{const l=[];if(!o.disabled)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(" ")}),c=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"}}),d=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"}}),g=e.computed(()=>{const l=[];return o.fullWidth&&l.push("w-full"),o.disabled&&l.push("cursor-not-allowed"),l.join(" ")}),B=e.computed(()=>{const l=[];return!o.disabled&&!o.link&&!o.text&&l.push("active:scale-[0.97]"),!o.disabled&&o.link&&l.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),l.join(" ")}),m=e.computed(()=>{const l=o.link||o.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",g.value,c.value,f.value,l?"":h.value,l?"":r.value,l?"":y.value,o.link?"":d.value,B.value].join(" ")}),b=e.computed(()=>{const l=[""];switch(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(" ")}),k=l=>{if(o.disabled){l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation();return}n("click",l)};return(l,D)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?e.unref(i):"button"),{href:t.to,to:t.to,type:e.unref(p),external:t.external,class:e.normalizeClass(e.unref(m)),disabled:t.disabled,role:"button",onClick:k},{default:e.withCtx(()=>[t.iconLeft?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{key:0,class:e.normalizeClass(`${e.unref(b)} ${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?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${e.unref(b)} ${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-c331f2ef"]]),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 I=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(I||{});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"},be={class:"ml-2 w-0 flex-1 flex flex-col"},ke={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 p,h;return!((p=o.notification)!=null&&p.description)&&!((h=o.notification)!=null&&h.cta)}),s=()=>{n("update:notification",null)},i=p=>{var h,f,r;(r=(f=(h=o.notification)==null?void 0:h.cta)==null?void 0:f.onClick)==null||r.call(f,p),s()};return(p,h)=>(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(I).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(I).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(I).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(I).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",be,[t.notification.title?(e.openBlock(),e.createElementBlock("p",ke,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(E.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(" ")}),p=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(" ")}),h=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",s.value].join(" ")),f=r=>{if(!o.clickableIcon){r.stopPropagation(),r.stopImmediatePropagation(),r.preventDefault();return}n("click-icon",r)};return(r,y)=>(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(h)),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(p)),onClick:y[0]||(y[0]=c=>f(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 _=(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))(_||{});function Y(t){const{props:{modelValue:n,steps:o,orientation:a,goVerticalBelow:s,nonInteractive:i},emit:p}=t,h=e.computed(()=>(a==null?void 0:a.value)==="vertical"?"vertical":"horizontal"),f=e.computed({get:()=>v.clamp((n==null?void 0:n.value)||0,-1,o.value.length),set:m=>p("update:modelValue",v.clamp(m,0,o.value.length))}),r=m=>`${m+1}`,y=m=>m===f.value,c=m=>m<f.value,d=(m,b)=>{var l;if(i!=null&&i.value){b==null||b.preventDefault(),b==null||b.stopPropagation(),b==null||b.stopImmediatePropagation();return}f.value=m;const k=o.value[f.value];(l=k==null?void 0:k.onClick)==null||l.call(k)},g=e.computed(()=>{const m=["flex"];return m.push("flex"),h.value==="vertical"||s!=null&&s.value?(m.push("flex-col space-y-4 justify-center"),(s==null?void 0:s.value)===_.sm?m.push("sm:flex-row sm:space-y-0 sm:justify-start sm:space-x-8 sm:items-center"):(s==null?void 0:s.value)===_.md?m.push("md:flex-row md:space-y-0 md:justify-start md:space-x-8 md:items-center"):(s==null?void 0:s.value)===_.lg?m.push("lg:flex-row lg:space-y-0 lg:justify-start lg:space-x-8 lg:items-center"):(s==null?void 0:s.value)===_.xl&&m.push("xl:flex-row xl:space-y-0 xl:justify-start xl:space-x-8 xl:items-center")):m.push("flex-row space-x-8 items-center"),m.join(" ")}),B=e.computed(()=>{const m=["flex items-center"];return i!=null&&i.value||m.push("cursor-pointer"),m.join(" ")});return{value:f,isCurrentStep:y,isFinishedStep:c,switchStep:d,getStepDisplayValue:r,listClasses:g,linkClasses:B,orientation:h}}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"},Ie={class:"flex flex-col"},_e={key:0,class:"label label--light text-foreground"},ze=["href","onClick"],Le={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},De={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:p,listClasses:h,linkClasses:f}=Y({props:e.toRefs(o),emit:n});return(r,y)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(h))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(c,d)=>(e.openBlock(),e.createElementBlock("li",{key:c.name},[e.unref(s)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:c.href,class:e.normalizeClass(e.unref(f)),onClick:g=>e.unref(i)(d,g)},[e.createElementVNode("div",Ne,[e.createElementVNode("div",$e,[e.createVNode(e.unref(E.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",Ie,[e.createElementVNode("div",null,e.toDisplayString(c.name),1),c.description?(e.openBlock(),e.createElementBlock("div",_e,e.toDisplayString(c.description),1)):e.createCommentVNode("",!0)])])],10,Ee)):e.unref(a)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:c.href,class:e.normalizeClass(e.unref(f)),"aria-current":"step",onClick:g=>e.unref(i)(d,g)},[e.createElementVNode("div",Le,[e.createElementVNode("div",De,e.toDisplayString(e.unref(p)(d)),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(f)),onClick:g=>e.unref(i)(d,g)},[e.createElementVNode("div",Ae,[e.createElementVNode("div",Me,e.toDisplayString(e.unref(p)(d)),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:p,linkClasses:h}=Y({props:e.toRefs(o),emit:n}),f=e.computed(()=>{const r=["ml-3 h6 font-medium leading-7"];return o.basic&&r.push("sr-only"),r.join(" ")});return(r,y)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(p),t.basic?"basic":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(c,d)=>(e.openBlock(),e.createElementBlock("li",{key:c.name},[e.unref(s)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:c.href,class:e.normalizeClass(e.unref(h)),onClick:g=>e.unref(i)(d,g)},[e.createElementVNode("span",We,[t.basic?(e.openBlock(),e.createElementBlock("span",He)):(e.openBlock(),e.createBlock(e.unref(E.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",e.unref(f)])},e.toDisplayString(c.name),3)],10,Ue)):e.unref(a)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:c.href,class:e.normalizeClass(e.unref(h)),"aria-current":"step",onClick:g=>e.unref(i)(d,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(f)])},e.toDisplayString(c.name),3)],10,Ke)):(e.openBlock(),e.createElementBlock("a",{key:2,href:c.href,class:e.normalizeClass(e.unref(h)),onClick:g=>e.unref(i)(d,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(f)])},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,p)=>(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=m=>`${m}-${R.nanoid()}`,a=e.computed(()=>n.value||n.name),{checked:s,errorMessage:i,handleChange:p}=F.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:a,initialValue:n.modelValue||void 0}),h=m=>{n.disabled||p(m)},f=e.computed(()=>n.label||n.name),r=e.computed(()=>i.value?"border-danger-lighter":"border-foreground-4 "),y=e.computed(()=>n.description||i.value),c=e.computed(()=>`${n.name}-description`),d=e.computed(()=>{const m=[];return n.inlineDescription?m.push("inline ml-2"):m.push("block"),i.value?m.push("text-danger"):m.push("text-foreground-2"),m.join(" ")}),g=e.ref(o("checkbox")),B=e.computed(()=>n.id||g.value);return(m,b)=>(e.openBlock(),e.createElementBlock("div",at,[e.createElementVNode("div",st,[e.createElementVNode("input",e.mergeProps({id:e.unref(B),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)]},m.$attrs,{onChange:h}),null,16,it)]),e.createElementVNode("div",ct,[e.createElementVNode("label",{for:e.unref(B),class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(e.unref(f)),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",dt,"*")):e.createCommentVNode("",!0)],10,ut),e.unref(y)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(c),class:e.normalizeClass(e.unref(d))},e.toDisplayString(e.unref(y)),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}),p=e.computed(()=>{const l=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||l.push("sr-only"),l.join(" ")}),h=e.computed(()=>{const l=["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?l.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):l.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(n.color)==="foundation"?l.push("bg-foundation shadow-sm hover:shadow"):l.push("bg-foundation-page"),l.join(" ")}),f=e.ref(R.nanoid()),r=e.computed(()=>e.unref(n.label)||e.unref(n.name)),y=e.computed(()=>{const l=i.value;return!l||!e.unref(n.useLabelInErrors)?l:l.replace("Value",r.value)}),c=e.computed(()=>y.value&&e.unref(n.hideErrorMessage)),d=e.computed(()=>y.value||e.unref(n.help)),g=e.computed(()=>!!d.value),B=e.computed(()=>g.value?`${e.unref(n.name)}-${f.value}`:void 0),m=e.computed(()=>{const l=["mt-2 text-sm"];return l.push(i.value?"text-danger":"text-foreground-2"),l.join(" ")}),b=()=>{var l;(l=o.value)==null||l.focus()},k=()=>{s.value="",a("change",{value:""}),a("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&b()}),{coreClasses:h,title:r,value:s,helpTipId:B,helpTipClasses:m,helpTip:d,hideHelpTip:c,errorMessage:y,clear:k,focus:b,labelClasses:p}}const ht=["for"],gt={class:"relative"},yt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],bt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),kt={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:p,value:h,helpTipId:f,helpTipClasses:r,helpTip:y,errorMessage:c,labelClasses:d,clear:g,focus:B}=ee({props:e.toRefs(a),emit:o,inputEl:s}),m=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:B}),(b,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(p)),1)],10,ht),e.createElementVNode("div",gt,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":k[0]||(k[0]=l=>e.isRef(h)?h.value=l:null),name:t.name,class:[e.unref(i),e.unref(m),"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(c)?"true":"false","aria-describedby":e.unref(f)},b.$attrs,{onChange:k[1]||(k[1]=l=>b.$emit("change",{event:l,value:e.unref(h)})),onInput:k[2]||(k[2]=l=>b.$emit("input",{event:l,value:e.unref(h)}))}),null,16,yt),[[e.vModelText,e.unref(h)]]),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]=(...l)=>e.unref(g)&&e.unref(g)(...l)),onKeydown:k[4]||(k[4]=(...l)=>e.unref(g)&&e.unref(g)(...l))},[bt,e.createVNode(e.unref(E.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(E.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",kt," * ")):e.createCommentVNode("",!0)]),e.unref(f)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(f),class:e.normalizeClass(e.unref(r))},e.toDisplayString(e.unref(y)),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}),It=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:p,title:h,value:f,helpTipId:r,helpTipClasses:y,helpTip:c,hideHelpTip:d,errorMessage:g,clear:B,focus:m,labelClasses:b}=ee({props:e.toRefs(a),emit:o,inputEl:i}),k=e.computed(()=>{const x=["h-5 w-5"];return g.value?x.push("text-danger"):x.push("text-foreground-2"),x.join(" ")}),l=e.computed(()=>["email","password"].includes(a.type)||a.customIcon),D=e.computed(()=>{const x=[];return l.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(" ")}),N=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:m}),(x,w)=>(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(h)),1)],10,Ct),e.createElementVNode("div",Bt,[e.unref(l)?(e.openBlock(),e.createElementBlock("div",Vt,[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(E.EnvelopeIcon),{key:1,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(E.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:i,"onUpdate:modelValue":w[0]||(w[0]=C=>e.isRef(f)?f.value=C:null),type:t.type,name:t.name,class:[e.unref(p),e.unref(D),e.unref(N),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:w[1]||(w[1]=C=>x.$emit("change",{event:C,value:e.unref(f)})),onInput:w[2]||(w[2]=C=>x.$emit("input",{event:C,value:e.unref(f)}))}),null,16,wt),[[e.vModelDynamic,e.unref(f)]]),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:w[3]||(w[3]=(...C)=>e.unref(B)&&e.unref(B)(...C)),onKeydown:w[4]||(w[4]=(...C)=>e.unref(B)&&e.unref(B)(...C))},[St,e.createVNode(e.unref(E.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(E.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(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(r),class:e.normalizeClass(e.unref(y))},e.toDisplayString(e.unref(c)),11,Nt)):e.createCommentVNode("",!0)],2))}}),_t=/^https?:\/\//,U=/^[\w-_.+]+@[\w-_.+]+$/,zt=t=>(t||"").match(U)?!0:"Value should be a valid e-mail address",Lt=t=>(t||"").split(",").map(a=>a.trim()).every(a=>a.match(U))||"Value should be one or multiple comma-delimited e-mail addresses",Dt=t=>(v.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=L.isNullOrUndefined(n)?"":n,v.isString(n)?!v.isUndefined(o)&&n.length<o?`Value needs to be at least ${o} characters long`:!v.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 v.isString(n)?o?v.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:_t,isEmail:zt,isOneOrMultipleEmails:Lt,isRequired:Dt,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||{},p=e.ref(0),h=()=>{const f=a.value;if(n!=null&&n.value||!f)return;const r=f.children;let y=0,c=0,d;for(const g of r){const B=g.offsetTop;v.isUndefined(d)?(d=B,y+=1):B===d&&(y+=1),c+=1}p.value=c-y};return s&&T.useResizeObserver(o,h),i&&T.useMutationObserver(o,h,{childList:!0,subtree:!0}),{hiddenItemCount:p}}function ne(t){const{props:n,emit:o,dynamicVisibility:a}=t;let s;if(a){const{elementToWatchForChanges:r,itemContainer:y}=a;s=te({skipCalculation:e.computed(()=>{var d;return!((d=n.multiple)!=null&&d.value)}),elementToWatchForChanges:r,itemContainer:y}).hiddenItemCount}else s=e.ref(0);const i=e.computed({get:()=>{var y,c;const r=(y=n.modelValue)==null?void 0:y.value;return(c=n.multiple)!=null&&c.value?v.isArray(r)?r:[]:v.isArray(r)?void 0:r},set:r=>{var y,c,d;if((y=n.multiple)!=null&&y.value&&!v.isArray(r)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((c=n.multiple)!=null&&c.value)&&v.isArray(r)){console.warn("Attempting to set array value in selector w/ multiple=false");return}o("update:modelValue",(d=n.multiple)!=null&&d.value?r||[]:r)}}),p=r=>v.isArray(r);return{selectedValue:i,hiddenSelectedItemCount:s,isArrayValue:p,isMultiItemArrayValue:r=>v.isArray(r)&&r.length>1,firstItem:r=>p(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(""),p=e.ref([]),h=e.ref(!1),f=e.ref(R.nanoid()),r=e.computed(()=>e.unref(n.label)||e.unref(n.name)),y=e.computed(()=>{const u=a.value;return!u||!e.unref(n.useLabelInErrors)?u:u.replace("Value",r.value)}),c=e.computed(()=>y.value||e.unref(n.help)),d=e.computed(()=>!!c.value),g=e.computed(()=>d.value?`${e.unref(n.name)}-${f.value}`:void 0),B=e.computed(()=>a.value?"text-danger":"text-foreground-2"),m=e.computed(()=>n.buttonStyle!=="simple"&&n.clearable&&!n.disabled),b=e.computed(()=>{const u=["relative flex group",n.showLabel?"mt-1":""];return n.buttonStyle!=="simple"&&(u.push("hover:shadow rounded-md"),u.push("outline outline-2 outline-primary-muted")),n.fixedHeight&&u.push("h-8"),u.join(" ")}),k=e.computed(()=>{const u=[];return n.buttonStyle!=="simple"&&u.push(w.value?"bg-foundation-disabled text-foreground-disabled":""),w.value&&u.push("cursor-not-allowed"),u.join(" ")}),l=e.computed(()=>{const u=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all",W.value?`w-6 ${k.value}`:"w-0"];return w.value||u.push("bg-primary-muted hover:bg-primary hover:text-foreground-on-primary"),u.join(" ")}),D=e.computed(()=>{const u=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",k.value];return n.buttonStyle!=="simple"&&(u.push("py-2 px-3"),w.value||u.push("bg-foundation text-foreground")),m.value&&W.value&&u.push("rounded-r-none"),u.join(" ")}),N=e.computed(()=>!!(n.search&&(n.filterPredicate||n.getSearchResults))),x=e.computed(()=>N.value&&n.getSearchResults),w=e.computed(()=>n.disabled||!n.items.length&&!x.value),C=e.computed({get:()=>{const u=o.value;return n.multiple?v.isArray(u)?u:[]:v.isArray(u)?void 0:u},set:u=>{if(n.multiple&&!v.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!n.multiple&&v.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}if(n.multiple)o.value=u||[];else{const S=o.value,V=n.allowUnset&&S&&u&&M(S)===M(u);o.value=V?void 0:u}}}),W=e.computed(()=>n.multiple?C.value.length!==0:!!C.value),ae=()=>{n.multiple?C.value=[]:C.value=void 0},se=e.computed(()=>{const u=i.value;return!N.value||!(u!=null&&u.length)?p.value:n.filterPredicate?p.value.filter(S=>{var V;return((V=n.filterPredicate)==null?void 0:V.call(n,S,u))||!1}):p.value}),H=u=>JSON.stringify(u),M=u=>n.by?u[n.by]:u,K=async()=>{if(console.log("triggerSearch"),!(!x.value||!n.getSearchResults)){h.value=!0;try{p.value=await n.getSearchResults(i.value)}finally{h.value=!1}}},ie=v.debounce(K,1e3);return e.watch(()=>n.items,u=>{p.value=u.slice()},{immediate:!0}),e.watch(i,()=>{x.value&&ie()}),e.onMounted(()=>{x.value&&!n.items.length&&K()}),(u,S)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(j.Listbox),{modelValue:e.unref(C),"onUpdate:modelValue":S[4]||(S[4]=V=>e.isRef(C)?C.value=V:null),name:t.name,multiple:t.multiple,by:t.by,disabled:e.unref(w),as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(j.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(j.ListboxButton),{class:e.normalizeClass(e.unref(D))},{default:e.withCtx(({open:V})=>[e.createElementVNode("div",qt,[e.createElementVNode("div",Ut,[!e.unref(C)||e.unref(v.isArray)(e.unref(C))&&!e.unref(C).length?e.renderSlot(u.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(u.$slots,"something-selected",{key:1,value:e.unref(C)},()=>[e.createTextVNode(e.toDisplayString(H(e.unref(C))),1)])]),e.createElementVNode("div",Wt,[V?(e.openBlock(),e.createBlock(e.unref(O.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(O.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),e.unref(m)?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(l)),disabled:t.disabled,onClick:S[0]||(S[0]=V=>ae())},[e.createVNode(e.unref(O.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(j.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:S[3]||(S[3]=V=>{var $;return($=s.value)==null?void 0:$.focus()})},{default:e.withCtx(()=>[e.unref(N)?(e.openBlock(),e.createElementBlock("label",Kt,[Xt,e.createElementVNode("div",Gt,[e.createElementVNode("div",Jt,[e.createVNode(e.unref(O.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:s,"onUpdate:modelValue":S[1]||(S[1]=V=>i.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:S[2]||(S[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(N)?"max-h-52":"max-h-60"]])},[e.unref(x)&&h.value?(e.openBlock(),e.createElementBlock("div",Yt,[e.createVNode(oe,{loading:!0})])):e.unref(x)&&!p.value.length?(e.openBlock(),e.createElementBlock("div",Zt,[e.renderSlot(u.$slots,"nothing-found",{},()=>[en])])):e.createCommentVNode("",!0),!e.unref(x)||!h.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(se),V=>(e.openBlock(),e.createBlock(e.unref(j.ListboxOption),{key:M(V),value:V},{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(u.$slots,"option",{item:V,active:$,selected:X},()=>[e.createTextVNode(e.toDisplayString(H(V)),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(O.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(B)])},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:p,isMultiItemArrayValue:h,firstItem:f}=ne({props:e.toRefs(o),emit:n,dynamicVisibility:{elementToWatchForChanges:a,itemContainer:s}}),r=(y,c)=>y.name.toLocaleLowerCase().includes(c.toLocaleLowerCase());return(y,c)=>(e.openBlock(),e.createBlock(le,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=d=>e.isRef(i)?i.value=d:null),multiple:t.multiple,items:t.items??e.unref(L.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:d})=>[e.unref(h)(d)?(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(d,g=>(e.openBlock(),e.createBlock(re,{key:g.name,"source-app":g},null,8,["source-app"]))),128))],512),e.unref(p)>0?(e.openBlock(),e.createElementBlock("div",on," +"+e.toDisplayString(e.unref(p)),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(f)(d).bgColor})},null,4),e.createElementVNode("span",rn,e.toDisplayString(e.unref(f)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",an,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",sn,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var z=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(z||{});const A=L.getClientOperatingSystem(),un={["cmd-or-ctrl"]:A===L.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:A===L.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function dn(t){const n=o=>Object.values(z).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===L.OperatingSystem.Mac?o.getModifierState("Meta"):o.getModifierState("Control"),i=o.getModifierState("Shift");for(const p of t)switch(p){case z.CtrlOrCmd:if(!s)return;break;case z.AltOrOpt:if(!a)return;break;case z.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=It;exports.GlobalToastRenderer=Be;exports.ModifierKeys=z;exports.SourceAppBadge=re;exports.TailwindBreakpoints=_;exports.ToastNotificationType=I;exports.ValidationHelpers=At;exports.clientOs=A;exports.getKeyboardShortcutTitle=dn;exports.onKeyboardShortcut=fn;exports.useFormSelectChildInternals=ne;exports.useWrappingContainerHiddenCount=te;
|
package/dist/lib.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import GlobalToastRenderer from './components/global/ToastRenderer.vue';
|
|
2
|
+
import { ToastNotification, ToastNotificationType } from './helpers/global/toast';
|
|
3
|
+
import FormButton from './components/form/Button.vue';
|
|
4
|
+
import CommonTextLink from './components/common/text/Link.vue';
|
|
5
|
+
import CommonBadge from './components/common/Badge.vue';
|
|
6
|
+
import { BulletStepType, NumberStepType, HorizontalOrVertical } from './helpers/common/components';
|
|
7
|
+
import { TailwindBreakpoints } from './helpers/tailwind';
|
|
8
|
+
import CommonStepsNumber from './components/common/steps/Number.vue';
|
|
9
|
+
import CommonStepsBullet from './components/common/steps/Bullet.vue';
|
|
10
|
+
import FormCardButton from './components/form/CardButton.vue';
|
|
11
|
+
import FormCheckbox from './components/form/Checkbox.vue';
|
|
12
|
+
import FormTextArea from './components/form/TextArea.vue';
|
|
13
|
+
import FormTextInput from './components/form/TextInput.vue';
|
|
14
|
+
import * as ValidationHelpers from './helpers/common/validation';
|
|
15
|
+
import { useWrappingContainerHiddenCount } from './composables/layout/resize';
|
|
16
|
+
import { useFormSelectChildInternals } from './composables/form/select';
|
|
17
|
+
import FormSelectSourceApps from './components/form/select/SourceApps.vue';
|
|
18
|
+
import FormSelectBase from './components/form/select/Base.vue';
|
|
19
|
+
import CommonLoadingBar from './components/common/loading/Bar.vue';
|
|
20
|
+
import SourceAppBadge from './components/SourceAppBadge.vue';
|
|
21
|
+
import { onKeyboardShortcut } from './composables/form/input';
|
|
22
|
+
import { ModifierKeys, getKeyboardShortcutTitle, clientOs } from './helpers/form/input';
|
|
23
|
+
export { GlobalToastRenderer, ToastNotificationType, FormButton, CommonTextLink, CommonBadge, TailwindBreakpoints, CommonStepsBullet, CommonStepsNumber, FormCardButton, FormCheckbox, FormTextArea, FormTextInput, ValidationHelpers, useWrappingContainerHiddenCount, useFormSelectChildInternals, FormSelectBase, FormSelectSourceApps, CommonLoadingBar, SourceAppBadge, onKeyboardShortcut, ModifierKeys, getKeyboardShortcutTitle, clientOs };
|
|
24
|
+
export type { ToastNotification, BulletStepType, NumberStepType, HorizontalOrVertical };
|