@feedmepos/ui-library 0.0.2 → 0.0.4
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/{segmented-button/FmSegmentedButton.vue.d.ts → button-group/FmButtonGroup.vue.d.ts} +10 -10
- package/dist/components/date-picker/FmDatePicker.vue.d.ts +9 -0
- package/dist/components/date-range-picker/FmDateRangePicker.vue.d.ts +13 -0
- package/dist/components/form/stepper-field/FmStepperField.vue.d.ts +8 -8
- package/dist/federation/FmButtonGroup.vue_vue_type_script_setup_true_lang-658ba5f6.js +1 -0
- package/dist/federation/FmDatePicker-6608acc7.css +1 -0
- package/dist/federation/{FmDateRangePicker-fbfec16c.css → FmDateRangePicker-2b4b8a36.css} +1 -1
- package/dist/federation/{FmSelect-f4606242.css → FmSelect-a5b3f313.css} +1 -1
- package/dist/federation/{FmStepperField-c090d8f0.css → FmStepperField-9d4fae3f.css} +1 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-09dbbc0b.js +1 -0
- package/dist/federation/FmTextarea.vue_vue_type_style_index_0_lang-021e2db6.js +1 -0
- package/dist/federation/__federation_expose_FmButtonGroup-3363a7b4.js +1 -0
- package/dist/federation/__federation_expose_FmDatePicker-c542d446.js +1 -0
- package/dist/federation/__federation_expose_FmDateRangePicker-6e0116bd.js +1 -0
- package/dist/federation/__federation_expose_FmSelect-b616883a.js +1 -0
- package/dist/federation/__federation_expose_FmStepperField-bdfe1136.js +1 -0
- package/dist/federation/{__federation_expose_FmTextField-8c2d6628.js → __federation_expose_FmTextField-58939c24.js} +1 -1
- package/dist/federation/{__federation_expose_FmTextarea-5ac95bc3.js → __federation_expose_FmTextarea-5184a353.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/index-389cc317.js +11 -0
- package/dist/feedmepos-ui-library.js +1269 -1253
- package/dist/feedmepos-ui-library.umd.cjs +6 -6
- package/dist/index.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/federation/FmDatePicker-750315ee.css +0 -1
- package/dist/federation/FmSegmentedButton.vue_vue_type_script_setup_true_lang-4d380f2f.js +0 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-5d5d5bb4.js +0 -1
- package/dist/federation/FmTextarea.vue_vue_type_style_index_0_lang-15e0775a.js +0 -1
- package/dist/federation/__federation_expose_FmDatePicker-d996afce.js +0 -1
- package/dist/federation/__federation_expose_FmDateRangePicker-1d6f07d7.js +0 -1
- package/dist/federation/__federation_expose_FmSegmentedButton-a3067813.js +0 -1
- package/dist/federation/__federation_expose_FmSelect-72ee36cc.js +0 -1
- package/dist/federation/__federation_expose_FmStepperField-7bafc481.js +0 -1
- package/dist/federation/index-863f6b27.js +0 -11
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ButtonGroupItem {
|
|
2
2
|
icon?: string | null;
|
|
3
3
|
label?: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
7
|
-
modelValue:
|
|
6
|
+
export interface FmButtonGroupProps {
|
|
7
|
+
modelValue: ButtonGroupItem | null;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
-
items:
|
|
9
|
+
items: ButtonGroupItem[];
|
|
10
10
|
}
|
|
11
11
|
declare const _default: import("vue").DefineComponent<{
|
|
12
12
|
modelValue: {
|
|
13
|
-
type: import("vue").PropType<
|
|
13
|
+
type: import("vue").PropType<ButtonGroupItem | null>;
|
|
14
14
|
required: true;
|
|
15
15
|
};
|
|
16
16
|
disabled: {
|
|
17
17
|
type: import("vue").PropType<boolean>;
|
|
18
18
|
};
|
|
19
19
|
items: {
|
|
20
|
-
type: import("vue").PropType<
|
|
20
|
+
type: import("vue").PropType<ButtonGroupItem[]>;
|
|
21
21
|
required: true;
|
|
22
22
|
};
|
|
23
23
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
-
"update:modelValue": (item:
|
|
24
|
+
"update:modelValue": (item: ButtonGroupItem) => void;
|
|
25
25
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
26
|
modelValue: {
|
|
27
|
-
type: import("vue").PropType<
|
|
27
|
+
type: import("vue").PropType<ButtonGroupItem | null>;
|
|
28
28
|
required: true;
|
|
29
29
|
};
|
|
30
30
|
disabled: {
|
|
31
31
|
type: import("vue").PropType<boolean>;
|
|
32
32
|
};
|
|
33
33
|
items: {
|
|
34
|
-
type: import("vue").PropType<
|
|
34
|
+
type: import("vue").PropType<ButtonGroupItem[]>;
|
|
35
35
|
required: true;
|
|
36
36
|
};
|
|
37
37
|
}>> & {
|
|
38
|
-
"onUpdate:modelValue"?: ((item:
|
|
38
|
+
"onUpdate:modelValue"?: ((item: ButtonGroupItem) => any) | undefined;
|
|
39
39
|
}, {}, {}>;
|
|
40
40
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export interface FmDatePickerProps {
|
|
2
|
+
modelValue: string;
|
|
2
3
|
label: string;
|
|
3
4
|
disabled: boolean;
|
|
4
5
|
}
|
|
@@ -13,6 +14,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
14
|
required: true;
|
|
14
15
|
default: boolean;
|
|
15
16
|
};
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: import("vue").PropType<string>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
16
21
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
22
|
"update:modelValue": (...args: any[]) => void;
|
|
18
23
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,6 +31,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
31
|
required: true;
|
|
27
32
|
default: boolean;
|
|
28
33
|
};
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: import("vue").PropType<string>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
29
38
|
}>> & {
|
|
30
39
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
31
40
|
}, {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
export type DateRange = {
|
|
2
|
+
startDate: string | null;
|
|
3
|
+
endDate: string | null;
|
|
4
|
+
};
|
|
1
5
|
export interface FmDateRangePickerProps {
|
|
6
|
+
modelValue: DateRange | null;
|
|
2
7
|
label: string;
|
|
3
8
|
disabled: boolean;
|
|
4
9
|
}
|
|
@@ -13,6 +18,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
18
|
required: true;
|
|
14
19
|
default: boolean;
|
|
15
20
|
};
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: import("vue").PropType<DateRange | null>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
16
25
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
26
|
"update:modelValue": (...args: any[]) => void;
|
|
18
27
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,6 +35,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
35
|
required: true;
|
|
27
36
|
default: boolean;
|
|
28
37
|
};
|
|
38
|
+
modelValue: {
|
|
39
|
+
type: import("vue").PropType<DateRange | null>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
29
42
|
}>> & {
|
|
30
43
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
31
44
|
}, {
|
|
@@ -32,6 +32,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
32
32
|
disabled: {
|
|
33
33
|
type: import("vue").PropType<boolean>;
|
|
34
34
|
};
|
|
35
|
+
modelValue: {
|
|
36
|
+
type: import("vue").PropType<number | null>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
35
39
|
min: {
|
|
36
40
|
type: import("vue").PropType<number>;
|
|
37
41
|
default: number;
|
|
@@ -40,10 +44,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
40
44
|
type: import("vue").PropType<number>;
|
|
41
45
|
required: true;
|
|
42
46
|
};
|
|
43
|
-
modelValue: {
|
|
44
|
-
type: import("vue").PropType<number | null>;
|
|
45
|
-
required: true;
|
|
46
|
-
};
|
|
47
47
|
leadingIcon: {
|
|
48
48
|
type: import("vue").PropType<string>;
|
|
49
49
|
default: string;
|
|
@@ -112,6 +112,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
112
112
|
disabled: {
|
|
113
113
|
type: import("vue").PropType<boolean>;
|
|
114
114
|
};
|
|
115
|
+
modelValue: {
|
|
116
|
+
type: import("vue").PropType<number | null>;
|
|
117
|
+
required: true;
|
|
118
|
+
};
|
|
115
119
|
min: {
|
|
116
120
|
type: import("vue").PropType<number>;
|
|
117
121
|
default: number;
|
|
@@ -120,10 +124,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
120
124
|
type: import("vue").PropType<number>;
|
|
121
125
|
required: true;
|
|
122
126
|
};
|
|
123
|
-
modelValue: {
|
|
124
|
-
type: import("vue").PropType<number | null>;
|
|
125
|
-
required: true;
|
|
126
|
-
};
|
|
127
127
|
leadingIcon: {
|
|
128
128
|
type: import("vue").PropType<string>;
|
|
129
129
|
default: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as d,__tla as N}from"./__federation_fn_import.js";import V,{__tla as J}from"./__federation_expose_FmIcon-e5ab92a8.js";let k,M=Promise.all([(()=>{try{return N}catch{}})(),(()=>{try{return J}catch{}})()]).then(async()=>{let c,p,y,l,r,f,n,g,i,b,_,v;({defineComponent:c}=await d("vue")),{renderList:p,Fragment:y,openBlock:l,createElementBlock:r,createBlock:f,createCommentVNode:n,toDisplayString:g,normalizeClass:i}=await d("vue"),b={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},_=["v-wave","disabled","onClick","onMousedown"],{ref:v}=await d("vue"),k=c({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(x,{emit:S}){const w=x,B=o=>{S("update:modelValue",o)},h=v(null),s=o=>{h.value=o},t=o=>o.disabled||w.disabled,m=o=>JSON.stringify(o)===JSON.stringify(w.modelValue);return(o,a)=>(l(),r("div",b,[(l(!0),r(y,null,p(o.items,(e,C)=>(l(),r("button",{key:C,"v-wave":t(e),class:i(["border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[7px]",{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":m(e),"hover:bg-fm-color-neutral-white cursor-not-allowed":t(e)}]),disabled:t(e),onClick:u=>B(e),onMousedown:u=>s(e),onMouseup:a[0]||(a[0]=u=>s(null)),onMouseleave:a[1]||(a[1]=u=>s(null))},[e.icon?(l(),f(V,{key:0,name:e.icon,size:"md",color:t(e)?"neutral-gray-200":m(e)?"primary":"",outline:JSON.stringify(h.value)!==JSON.stringify(e)&&!m(e)},null,8,["name","color","outline"])):n("",!0),e.label?(l(),r("span",{key:1,class:i(["fm-typo-body-lg-700",[t(e)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},g(e.label),3)):n("",!0)],42,_))),128))]))}})});export{k as _,M as __tla};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-date-picker__container[data-v-1722ccfe]{height:48px;border-radius:8px;border-width:1px;border-color:var(--fm-color-neutral-gray-300);padding:11px 7px;cursor:pointer;background-color:var(--fm-color-neutral-white)}.fm-date-picker__container[data-v-1722ccfe]:hover:not(.fm-date-picker__container--opened):not(.fm-date-picker__container--disabled){border-color:var(--fm-color-neutral-gray-400)}.fm-date-picker__container--opened[data-v-1722ccfe]{border-width:2px;border-color:var(--fm-color-primary);padding:10px 6px}.fm-date-picker__container--disabled[data-v-1722ccfe]{cursor:not-allowed;border-color:var(--fm-color-neutral-gray-200)}.fm-calendar[data-v-1722ccfe]{z-index:20;background-color:var(--fm-color-neutral-white)}.fm-calendar__row[data-v-1722ccfe]{display:flex;height:48px;width:100%}.fm-calendar__cell[data-v-1722ccfe]{display:flex;height:48px;width:48px;align-items:center;justify-content:center}.fm-calendar__cell__button[data-v-1722ccfe]{height:100%;width:100%;border-radius:9999px}.fm-calendar__cell__button[data-v-1722ccfe]:hover:not(.fm-calendar__cell__button--selected){background-color:var(--fm-color-opacity-sm)}.fm-calendar__cell__button--selected[data-v-1722ccfe]{background-color:var(--fm-color-primary);color:var(--fm-color-neutral-white)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.fm-date-picker__container[data-v-
|
|
1
|
+
.fm-date-picker__container[data-v-fdf144e1]{margin-top:.25rem;height:48px;border-radius:8px;border-width:1px;border-color:var(--fm-color-neutral-gray-300);padding:11px 7px;cursor:pointer;background-color:var(--fm-color-neutral-white)}.fm-date-picker__container[data-v-fdf144e1]:hover:not(.fm-date-picker__container--opened):not(.fm-date-picker__container--disabled){border-color:var(--fm-color-neutral-gray-400)}.fm-date-picker__container--opened[data-v-fdf144e1]{border-width:2px;border-color:var(--fm-color-primary);padding:10px 6px}.fm-date-picker__container--disabled[data-v-fdf144e1]{cursor:not-allowed;border-color:var(--fm-color-neutral-gray-200)}.fm-calendar[data-v-fdf144e1]{z-index:20;background-color:var(--fm-color-neutral-white)}.fm-calendar__row[data-v-fdf144e1]{display:flex;height:48px;width:100%}.fm-calendar__cell[data-v-fdf144e1]{display:flex;height:48px;width:48px;align-items:center;justify-content:center}.fm-calendar__cell__button[data-v-fdf144e1]{height:100%;width:100%;border-radius:9999px}.fm-calendar__cell__button[data-v-fdf144e1]:hover:not(.fm-calendar__cell__button--selected):not(.fm-calendar__cell__button--selected-start):not(.fm-calendar__cell__button--selected-between):not(.fm-calendar__cell__button--selected-end){border-radius:9999px;background-color:var(--fm-color-opacity-sm)}.fm-calendar__cell__button--selected[data-v-fdf144e1]{font-size:1rem;font-weight:700;line-height:1.5;letter-spacing:.005em;text-decoration-line:none;background-color:var(--fm-color-primary);color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-start[data-v-fdf144e1]{border-radius:9999px 0 0 9999px;font-size:1rem;font-weight:700;line-height:1.5;letter-spacing:.005em;text-decoration-line:none;background-color:var(--fm-color-primary);color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-between[data-v-fdf144e1]{border-radius:0;background-color:var(--fm-color-system-orange-100)}.fm-calendar__cell__button--selected-end[data-v-fdf144e1]{border-radius:0 9999px 9999px 0;font-size:1rem;font-weight:700;line-height:1.5;letter-spacing:.005em;text-decoration-line:none;background-color:var(--fm-color-primary);color:var(--fm-color-neutral-white)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.fm-select[data-v-
|
|
1
|
+
.fm-select[data-v-bf7b3ea7]{display:flex;flex-direction:column;gap:4px}.fm-select__container[data-v-bf7b3ea7]{height:48px;width:100%;display:flex;gap:8px;align-items:center;justify-content:space-between;padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-300);border-radius:8px;background-color:var(--fm-color-neutral-white);cursor:pointer;position:relative}.fm-select__container--expanded[data-v-bf7b3ea7]:not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-primary);padding:10px 6px}.fm-select__container--invalid[data-v-bf7b3ea7]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-red-300);padding:10px 6px}.fm-select__container--valid[data-v-bf7b3ea7]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-green-300);padding:10px 6px}.fm-select__container--warning[data-v-bf7b3ea7]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-orange-300);padding:10px 6px}.fm-select__container[data-v-bf7b3ea7]:hover:not(.fm-select__container--expanded):not(.fm-select__container--disabled){padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-400)}.fm-select__container--disabled[data-v-bf7b3ea7]{padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-200);cursor:not-allowed}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.fm-stepper-field[data-v-
|
|
1
|
+
.fm-stepper-field[data-v-cb3498f4]{display:flex;flex-direction:column;gap:4px}.fm-stepper-field__container[data-v-cb3498f4]{height:48px;width:100%;display:flex;gap:8px;align-items:center;padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-300);border-radius:8px;background-color:var(--fm-color-neutral-white);cursor:text;position:relative}.fm-stepper-field__container--focused[data-v-cb3498f4]{outline:none;border:2px solid var(--fm-color-primary);padding:10px 6px}.fm-stepper-field__container--focused>.fm-stepper-field__stepper__container[data-v-cb3498f4]{right:6px}.fm-stepper-field__container--invalid[data-v-cb3498f4]:not(.fm-stepper-field__container--focused){outline:none;border:2px solid var(--fm-color-system-red-300);padding:10px 6px}.fm-stepper-field__container--invalid:not(.fm-stepper-field__container--focused)>.fm-stepper-field__stepper__container[data-v-cb3498f4]{right:6px}.fm-stepper-field__container--valid[data-v-cb3498f4]:not(.fm-stepper-field__container--focused){outline:none;border:2px solid var(--fm-color-system-green-300);padding:10px 6px}.fm-stepper-field__container--valid:not(.fm-stepper-field__container--focused)>.fm-stepper-field__stepper__container[data-v-cb3498f4]{right:6px}.fm-stepper-field__container[data-v-cb3498f4]:hover:not(.fm-stepper-field__container--focused):not(.fm-stepper-field__container--invalid){padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-400)}.fm-stepper-field__container:hover:not(.fm-stepper-field__container--focused):not(.fm-stepper-field__container--invalid)>.fm-stepper-field__stepper__container[data-v-cb3498f4]{right:7px}.fm-stepper-field--input[data-v-cb3498f4]{height:100%;width:100%;border:none;outline:none;padding:0}.fm-stepper-field__stepper__container[data-v-cb3498f4]{width:24px;height:40px;position:absolute;right:7px;display:flex;flex-direction:column;gap:4px}.fm-stepper-field__stepper__item[data-v-cb3498f4]{cursor:pointer;height:18px;width:100%;background-color:var(--fm-color-neutral-gray-100);border-radius:4px;display:flex;justify-content:center;align-items:center}.fm-stepper-field__helper-container[data-v-cb3498f4]{display:flex;justify-content:space-between;align-items:center;gap:16px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as c,__tla as A}from"./__federation_fn_import.js";import f,{__tla as G}from"./__federation_expose_FmIcon-e5ab92a8.js";import{u as Q,a as H,__tla as J}from"./useValidation-7d75492a.js";let V,K=Promise.all([(()=>{try{return A}catch{}})(),(()=>{try{return G}catch{}})(),(()=>{try{return J}catch{}})()]).then(async()=>{const{defineComponent:B}=await c("vue"),{renderSlot:i,toDisplayString:t,normalizeClass:r,createElementVNode:o,openBlock:l,createElementBlock:a,createCommentVNode:d,createBlock:y,unref:p,createTextVNode:T,renderList:I,Fragment:w,createVNode:M}=await c("vue"),L={class:"fm-text-field"},q={class:"fm-text-field--label"},F={key:0},N=["value","inputMode","type","placeholder","required","minlength","maxlength","disabled","readOnly"],$={key:0},S={key:0,class:"fm-text-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},z={key:0},E={key:1},{computed:O,ref:P,watch:D}=await c("vue");var h=(n=>(n.required="*",n.optional="(optional)",n))(h||{});V=B({__name:"FmTextField",props:{required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:""},helperText:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},leadingIcon:{default:()=>({name:"",color:""})},trailingIcon:{default:()=>({name:"",color:""})},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},label:{},modelValue:{},rules:{default:()=>[]}},emits:["update:modelValue"],setup(n,{emit:x}){const _=n,u=P(!1),{validate:b,errorMessages:s,resetValidation:g}=Q(_),{isPristine:v}=H(b,g,x,""),j=e=>{v.value=!1,e.target.value||g(),x("update:modelValue",e.target.value)};D(()=>_.modelValue,()=>{v.value||b()});const k=O(()=>s.value.length===0);return(e,m)=>(l(),a("label",L,[o("div",null,[o("div",q,[i(e.$slots,"label"),o("span",{class:r({"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!e.disabled,"text-fm-color-typo-disabled":e.disabled})},t(e.label),3),e.labelMark!=="none"?(l(),a("span",{key:0,class:r({"fm-color-typo-tertiary fm-typo-body-md-400":e.labelMark==="optional","fm-color-typo-error fm-typo-body-lg-700":e.labelMark==="required"})},t(h[e.labelMark]),3)):d("",!0)])]),o("div",{class:r({"fm-text-field__container":!0,"fm-text-field__container--focused":u.value,"fm-text-field__container--invalid":!!e.modelValue&&!k.value,"fm-text-field__container--valid":e.showValidBorder&&e.showSuccess&&!!e.modelValue&&k.value,"fm-text-field__container--disabled":e.disabled})},[i(e.$slots,"prepend",{},()=>[e.prependText?(l(),a("div",F,t(e.prependText),1)):d("",!0),e.leadingIcon.name?(l(),y(f,{key:1,name:e.leadingIcon.name,size:"md",color:e.leadingIcon.color??(e.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):d("",!0)]),o("input",{class:r({"fm-text-field--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!e.disabled,"fm-color-typo-disabled":e.disabled}),value:e.modelValue,inputMode:e.inputmode,type:e.inputmode,placeholder:e.placeholder,required:e.required,minlength:e.minLength,maxlength:e.maxLength,disabled:e.disabled,readOnly:e.readonly,onInput:j,onFocus:m[0]||(m[0]=()=>u.value=!0),onBlur:m[1]||(m[1]=()=>u.value=!1)},null,42,N),i(e.$slots,"append",{},()=>[e.appendText?(l(),a("div",$,t(e.appendText),1)):d("",!0),e.trailingIcon.name?(l(),y(f,{key:1,name:e.trailingIcon.name,size:"md",color:e.trailingIcon.color??(e.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):d("",!0)])],2),e.helperText||p(s).length>0?(l(),a("div",S,[p(s).length===0?(l(),a("div",z,[i(e.$slots,"helper-text",{},()=>[T(t(e.helperText),1)])])):(l(),a("div",E,[(l(!0),a(w,null,I(p(s),C=>(l(),a("div",{key:C,class:"flex gap-4 items-center text-fm-color-typo-error"},[M(f,{name:"error",color:"#FF3B30",size:"sm"}),o("span",null,t(C),1)]))),128))])),o("div",{class:r({"fm-color-typo-disabled":e.disabled})},t(e.maxLength?`${e.modelValue.length} / ${e.maxLength}`:""),3)])):d("",!0)]))}})});export{V as _,K as __tla};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as u,__tla as D}from"./__federation_fn_import.js";import I,{__tla as j}from"./__federation_expose_FmIcon-e5ab92a8.js";import{u as H,a as A,__tla as G}from"./useValidation-7d75492a.js";let g,J=Promise.all([(()=>{try{return D}catch{}})(),(()=>{try{return j}catch{}})(),(()=>{try{return G}catch{}})()]).then(async()=>{const{defineComponent:V}=await u("vue"),{renderSlot:c,toDisplayString:r,normalizeClass:o,createElementVNode:a,openBlock:l,createElementBlock:t,createCommentVNode:p,unref:i,createTextVNode:k,renderList:B,Fragment:w,createVNode:L}=await u("vue"),q={class:"fm-textarea"},F={htmlFor:"{this.name}"},M={class:"fm-textarea--label"},N=["value","placeholder","required","minlength","maxlength","readOnly","disabled"],S={key:0,class:"fm-color-typo-secondary fm-textarea__helper-container fm-typo-body-sm-400"},T={key:0},$={key:1},{computed:C,ref:z,watch:E}=await u("vue");var f=(d=>(d.required="*",d.optional="(optional)",d))(f||{});g=V({__name:"FmTextarea",props:{label:{default:""},modelValue:{default:""},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:""},helperText:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(d,{emit:y}){const h=d,m=z(!1),{validate:_,errorMessages:n,resetValidation:O}=H(h),{isPristine:b}=A(_,O,y,""),P=e=>{b.value=!1,y("update:modelValue",e.target.value)},v=C(()=>n.value.length===0);return E(()=>h.modelValue,()=>{b.value||_()}),(e,s)=>(l(),t("div",q,[a("label",F,[a("div",M,[c(e.$slots,"label"),a("span",{class:o({"fm-typo-body-lg-400":!0,"fm-color-typo-primary":!e.disabled,"fm-color-typo-disabled":e.disabled})},r(e.label),3),e.labelMark!=="none"?(l(),t("span",{key:0,class:o({"fm-color-typo-tertiary fm-typo-body-md-400":e.labelMark==="optional","fm-color-typo-error fm-typo-body-lg-700":e.labelMark==="required"})},r(f[e.labelMark]),3)):p("",!0)])]),a("div",{class:o({"fm-textarea__container":!0,"fm-textarea__container--focused":m.value,"fm-textarea__container--invalid":!!e.modelValue&&!v.value,"fm-textarea__container--valid":e.showValidBorder&&e.showSuccess&&!!e.modelValue&&v.value,"fm-textarea__container--disabled":e.disabled})},[a("textarea",{class:o({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!e.disabled,"fm-color-typo-disabled":e.disabled}),value:e.modelValue,placeholder:e.placeholder,required:e.required,minlength:e.minLength,maxlength:e.maxLength,readOnly:e.readonly,disabled:e.disabled,onInput:P,onFocus:s[0]||(s[0]=()=>m.value=!0),onBlur:s[1]||(s[1]=()=>m.value=!1)},null,42,N)],2),e.helperText||i(n).length>0?(l(),t("div",S,[i(n).length===0?(l(),t("div",T,[c(e.$slots,"helper-text",{},()=>[k(r(e.helperText),1)])])):(l(),t("div",$,[(l(!0),t(w,null,B(i(n),x=>(l(),t("div",{key:x,class:"flex gap-4 items-center text-fm-color-typo-error"},[L(I,{name:"error",color:"#FF3B30",size:"sm"}),a("span",null,r(x),1)]))),128))])),a("div",{class:o({"fm-color-typo-disabled":e.disabled})},r(e.maxLength?`${e.modelValue.length} / ${e.maxLength}`:""),3)])):p("",!0)]))}})});export{g as _,J as __tla};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,__tla as a}from"./FmButtonGroup.vue_vue_type_script_setup_true_lang-658ba5f6.js";let _=Promise.all([(()=>{try{return a}catch{}})()]).then(async()=>{});export{_ as __tla,t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as g,__tla as W}from"./__federation_fn_import.js";import{d as h}from"./dayjs.min-5433e12a.js";import E,{__tla as X}from"./__federation_expose_FmIcon-e5ab92a8.js";import{_ as G}from"./_plugin-vue_export-helper-c27b6911.js";let V,H=Promise.all([(()=>{try{return W}catch{}})(),(()=>{try{return X}catch{}})()]).then(async()=>{const{defineComponent:B}=await g("vue"),{toDisplayString:u,normalizeClass:m,openBlock:o,createElementBlock:r,createCommentVNode:w,createElementVNode:t,createVNode:M,renderList:b,Fragment:k,pushScopeId:J,popScopeId:K}=await g("vue"),O={class:"relative"},S={class:"w-full"},A={class:"flex h-10 justify-between p-2"},F={class:"fm-typo-body-lg-400"},I={class:"flex gap-1 items-center justify-center"},L={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},N=["onClick"],{ref:s,computed:P,onMounted:j,onUnmounted:q}=await g("vue"),z=B({__name:"FmDatePicker",props:{modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(R,{emit:U}){const n=R,_=s([]),f=s(null),i=s(!1),p=s(h()),Y=s(null),y=s(null),$=e=>{f.value=e,U("update:modelValue",e.format("YYYY-MM-DD")),i.value=!1},C=()=>{_.value=[];const e=h(p.value).startOf("month"),l=e.endOf("month"),c=e.month();let a=e.startOf("week"),d=[];for(;a.isBefore(l.endOf("week"));)a.day()===0&&d.length>0&&(_.value.push(d),d=[]),d.push({date:a,isCurrentMonth:a.month()===c}),a=a.add(1,"day");d.length>0&&_.value.push(d)},Q=()=>{n.disabled||(i.value=!i.value,requestAnimationFrame(()=>{var l;const e=(l=Y.value)==null?void 0:l.getBoundingClientRect();y.value.style.top=`${e.height+4}px`,y.value.style.left="0px"}))},x=e=>{const l=e.path||e.composedPath();for(const c of l)if(c==Y.value||c==y.value)return;i.value=!1},D=e=>{p.value=e?p.value.add(1,"month"):p.value.subtract(1,"month"),C()},T=P(()=>Array.from(Array(7),(e,l)=>h().day(l).format("ddd")));return j(()=>{window.addEventListener("click",x),C(),n.modelValue&&(f.value=h(n.modelValue,"YYYY-MM-DD"))}),q(()=>{window.removeEventListener("click",x)}),(e,l)=>{var c;return o(),r("div",O,[t("label",{ref_key:"buttonEl",ref:Y,onClick:Q},[e.label?(o(),r("div",{key:0,class:m(["fm-typo-body-lg-400 mb-4",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},u(n.label),3)):w("",!0),t("div",{class:m(["fm-date-picker__container",{"fm-date-picker__container--opened":i.value,"fm-date-picker__container--disabled":n.disabled}])},[t("div",{class:m(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":f.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},u(((c=f.value)==null?void 0:c.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),t("div",{ref_key:"dropdownEl",ref:y,class:m(["absolute bg-fm-color-white fm-calendar gap-6 p-3 rounded-lg shadow-light-neutral-300 w-[360px]",[i.value?"block":"hidden"]])},[t("div",S,[t("div",A,[t("div",F,u(p.value.format("MMMM YYYY")),1),t("div",I,[M(E,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:l[0]||(l[0]=()=>D(!1))}),M(E,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:l[1]||(l[1]=()=>D(!0))})])]),t("div",null,[t("div",L,[(o(!0),r(k,null,b(T.value,a=>(o(),r("div",{key:a,class:"fm-calendar__cell"},u(a),1))),128))]),t("div",null,[(o(!0),r(k,null,b(_.value,(a,d)=>(o(),r("div",{key:d,class:"fm-calendar__row fm-typo-body-lg-400"},[(o(!0),r(k,null,b(a,v=>(o(),r("div",{key:v.date.date(),class:"fm-calendar__cell"},[v.isCurrentMonth?(o(),r("button",{key:0,class:m(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":f.value===v.date}]),onClick:()=>$(v.date)},u(v.date.date()),11,N)):w("",!0)]))),128))]))),128))])])])],2)])}}});V=G(z,[["__scopeId","data-v-1722ccfe"]])});export{H as __tla,V as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as M,__tla as ee}from"./__federation_fn_import.js";import{d as D}from"./dayjs.min-5433e12a.js";import S,{__tla as te}from"./__federation_expose_FmIcon-e5ab92a8.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";let A,le=Promise.all([(()=>{try{return ee}catch{}})(),(()=>{try{return te}catch{}})()]).then(async()=>{const{defineComponent:O}=await M("vue"),{toDisplayString:i,normalizeClass:s,createElementVNode:l,createVNode:w,renderList:Y,Fragment:h,openBlock:u,createElementBlock:c,createCommentVNode:F,pushScopeId:I,popScopeId:L}=await M("vue"),N=v=>(I("data-v-fdf144e1"),v=v(),L(),v),P={class:"flex gap-1 items-center relative w-full"},j=N(()=>l("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),R={class:"w-full"},q={class:"flex h-10 justify-between p-2"},z={class:"fm-typo-body-lg-400"},U={class:"flex gap-1 items-center justify-center"},$={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},G=["onClick"],{ref:m,computed:H,onMounted:J,onUnmounted:K}=await M("vue"),Q=O({__name:"FmDateRangePicker",props:{modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(v,{emit:g}){const n=v,y=m([]),e=m({startDate:null,endDate:null}),f=m(!1),p=m(D()),k=m(null),x=m(null),b=m(null),T=t=>{var a,o;if(e.value.startDate&&e.value.endDate){e.value={startDate:null,endDate:null},g("update:modelValue",{startDate:null,endDate:null});return}if(!e.value.startDate&&!e.value.endDate)e.value.startDate=t;else if(t.isBefore(e.value.startDate)){const r=e.value.startDate;e.value={startDate:t,endDate:r}}else e.value.endDate=t;g("update:modelValue",{startDate:(a=e.value.startDate)==null?void 0:a.format("YYYY-MM-DD"),endDate:(o=e.value.endDate)==null?void 0:o.format("YYYY-MM-DD")}),e.value.startDate&&e.value.endDate&&(f.value=!1)},C=()=>{y.value=[];const t=D(p.value).startOf("month"),a=t.endOf("month"),o=t.month();let r=t.startOf("week"),d=[];for(;r.isBefore(a.endOf("week"));)r.day()===0&&d.length>0&&(y.value.push(d),d=[]),d.push({date:r,isCurrentMonth:r.month()===o}),r=r.add(1,"day");d.length>0&&y.value.push(d)},V=()=>{n.disabled||(f.value=!f.value,requestAnimationFrame(()=>{var a;const t=(a=k.value)==null?void 0:a.getBoundingClientRect();b.value.style.top=`${t.height+4}px`,b.value.style.left="0px"}))},B=t=>{const a=t.path||t.composedPath();for(const o of a)if(o==k.value||o==x.value||o==b.value)return;f.value=!1},E=t=>{p.value=t?p.value.add(1,"month"):p.value.subtract(1,"month"),C()},W=H(()=>Array.from(Array(7),(t,a)=>D().day(a).format("ddd"))),X=t=>{var a,o,r,d;return{"fm-calendar__cell__button--selected":((a=e.value.startDate)==null?void 0:a.isSame(t))&&!e.value.endDate||((o=e.value.endDate)==null?void 0:o.isSame(t))&&!e.value.startDate,"fm-calendar__cell__button--selected-start":((r=e.value.startDate)==null?void 0:r.isSame(t))&&e.value.endDate,"fm-calendar__cell__button--selected-end":((d=e.value.endDate)==null?void 0:d.isSame(t))&&e.value.startDate,"fm-calendar__cell__button--selected-between":e.value.startDate&&e.value.endDate&&t.isAfter(e.value.startDate)&&t.isBefore(e.value.endDate)}};return J(()=>{var t;window.addEventListener("click",B),C(),(t=n.modelValue)!=null&&t.startDate&&n.modelValue.endDate&&(e.value={startDate:D(n.modelValue.startDate,"YYYY-MM-DD"),endDate:D(n.modelValue.endDate,"YYYY-MM-DD")})}),K(()=>{window.removeEventListener("click",B)}),(t,a)=>{var o,r;return u(),c("div",P,[l("label",{ref_key:"startButtonEl",ref:k,class:"w-full",onClick:V},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},i(n.label),3),l("div",{class:s(["fm-date-picker__container",{"fm-date-picker__container--opened":f.value,"fm-date-picker__container--disabled":n.disabled}])},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":e.value.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},i(((o=e.value.startDate)==null?void 0:o.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),j,l("label",{ref_key:"endButtonEl",ref:x,class:"w-full",onClick:V},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},i(n.label),3),l("div",{class:s(["fm-date-picker__container",{"fm-date-picker__container--opened":f.value,"fm-date-picker__container--disabled":n.disabled}])},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":e.value.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},i(((r=e.value.endDate)==null?void 0:r.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),l("div",{ref_key:"dropdownEl",ref:b,class:s(["absolute bg-fm-color-white fm-calendar gap-6 p-3 rounded-lg shadow-light-300 w-[360px]",[f.value?"block":"hidden"]])},[l("div",R,[l("div",q,[l("div",z,i(p.value.format("MMMM YYYY")),1),l("div",U,[w(S,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:a[0]||(a[0]=()=>E(!1))}),w(S,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:a[1]||(a[1]=()=>E(!0))})])]),l("div",null,[l("div",$,[(u(!0),c(h,null,Y(W.value,d=>(u(),c("div",{key:d,class:"fm-calendar__cell"},i(d),1))),128))]),l("div",null,[(u(!0),c(h,null,Y(y.value,(d,Z)=>(u(),c("div",{key:Z,class:"fm-calendar__row fm-typo-body-lg-400"},[(u(!0),c(h,null,Y(d,_=>(u(),c("div",{key:_.date.date(),class:"fm-calendar__cell"},[_.isCurrentMonth?(u(),c("button",{key:0,class:s(["fm-calendar__cell__button",X(_.date)]),onClick:()=>T(_.date)},i(_.date.date()),11,G)):F("",!0)]))),128))]))),128))])])])],2)])}}});A=ae(Q,[["__scopeId","data-v-fdf144e1"]])});export{le as __tla,A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as c,__tla as z}from"./__federation_fn_import.js";import E,{__tla as F}from"./__federation_expose_FmIcon-e5ab92a8.js";import $,{__tla as D}from"./__federation_expose_FmMenu-921093d0.js";import R,{__tla as U}from"./__federation_expose_FmMenuItem-d331a359.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";let h,q=Promise.all([(()=>{try{return z}catch{}})(),(()=>{try{return F}catch{}})(),(()=>{try{return D}catch{}})(),(()=>{try{return U}catch{}})()]).then(async()=>{const{defineComponent:V}=await c("vue"),{renderSlot:x,toDisplayString:p,normalizeClass:s,openBlock:m,createElementBlock:i,createCommentVNode:w,createElementVNode:o,createVNode:f,renderList:g,Fragment:C,createBlock:S,withCtx:_,pushScopeId:L,popScopeId:P}=await c("vue"),k={class:"w-[280px]"},{computed:b,ref:N,toRaw:u}=await c("vue"),B=V({__name:"FmSelect",props:{modelValue:{},label:{},items:{},disabled:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-left"},placeholder:{default:""}},emits:["update:modelValue"],setup(J,{emit:v}){const t=J,d=N(!1),O=(e,a)=>{if(t.multiselect){let l=[];e?l=[...u(t.modelValue),a.value]:(l=[...t.modelValue],l=l.filter(r=>JSON.stringify(u(r))!==JSON.stringify(a.value))),v("update:modelValue",l)}else d.value=!1,v("update:modelValue",a.value)},I=b(()=>{const e=y.value.map(a=>a.label).join(", ");return e===""?t.placeholder:e}),y=b(()=>t.multiselect?t.items.filter(e=>u(t.modelValue).some(a=>n(a,e.value))):t.items.filter(e=>n(t.modelValue,e.value))),n=(e,a)=>JSON.stringify(e)===JSON.stringify(a);return(e,a)=>(m(),i("div",null,[o("label",null,[x(e.$slots,"label",{},()=>[e.label?(m(),i("div",{key:0,class:s(["fm-typo-body-lg-400 mb-4",{"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!e.disabled,"text-fm-color-typo-disabled":e.disabled}])},p(e.label),3)):w("",!0)],!0)]),f($,{disabled:e.disabled,"is-open":d.value,placement:e.placement,onDropdownChanged:a[0]||(a[0]=l=>d.value=l)},{"menu-button":_(()=>[o("label",{class:s([`${e.disabled?"cursor-not-allowed":"cursor-pointer"} fm-select`])},[o("div",{class:s({"fm-select__container":!0,"fm-select__container--expanded":d.value,"fm-select__container--disabled":e.disabled})},[o("div",{class:s({"fm-typo-body-lg-400 w-full h-full overflow-hidden text-ellipsis whitespace-nowrap":!0,"text-fm-color-typo-tertiary":!e.modelValue,"text-fm-color-typo-primary":!!e.modelValue})},p(I.value),3),f(E,{name:d.value?"expand_less":"expand_more",size:"md",color:e.disabled?"#C7C7CC":"black"},null,8,["name","color"])],2)],2)]),"menu-content":_(()=>[o("div",k,[(m(!0),i(C,null,g(e.items,l=>(m(),S(R,{key:l.value,"has-checkbox":e.multiselect,label:l.label,value:l.value,"model-value":y.value.some(r=>n(r.value,l.value)),"onUpdate:modelValue":r=>O(r,l)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))])]),_:1},8,["disabled","is-open","placement"])]))}});h=j(B,[["__scopeId","data-v-bf7b3ea7"]])});export{q as __tla,h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as x,__tla as Z}from"./__federation_fn_import.js";import c,{__tla as ee}from"./__federation_expose_FmIcon-e5ab92a8.js";import{u as le,a as te,__tla as ae}from"./useValidation-7d75492a.js";import{_ as re}from"./_plugin-vue_export-helper-c27b6911.js";let F,oe=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return ee}catch{}})(),(()=>{try{return ae}catch{}})()]).then(async()=>{const{defineComponent:M}=await x("vue"),{renderSlot:m,toDisplayString:s,createTextVNode:w,createElementVNode:d,openBlock:t,createElementBlock:r,createCommentVNode:p,createBlock:k,normalizeClass:V,createVNode:y,unref:C,renderList:N,Fragment:z,pushScopeId:ne,popScopeId:de}=await x("vue"),A={class:"fm-stepper-field"},q={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},D={key:0},$=["inputMode","value","placeholder","required","readOnly"],G={key:0},L={key:0,class:"fm-stepper-field__stepper__container"},O={key:0,class:"fm-stepper-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},P={key:0},K={key:1},{onMounted:R,ref:f,watch:U}=await x("vue"),Y=M({__name:"FmStepperField",props:{label:{default:""},modelValue:{},required:{type:Boolean},disabled:{type:Boolean},placeholder:{default:""},helperText:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},step:{default:1},min:{default:0},max:{},leadingIcon:{default:""},trailingIcon:{default:""},useGrouping:{type:Boolean,default:!0},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},rules:{default:()=>[]},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""}},emits:["update:modelValue"],setup(j,{emit:b}){const o=j,{validate:_,errorMessages:h,resetValidation:H}=le(o),{isPristine:J}=te(_,H,b,null),B=f(null),g=f(!1),u=f(!0);let I;const n=f(""),v=e=>{if(e!==""){const l=+e.replace(/,/g,"");return isNaN(l)?null:l}return null},i=e=>I.format(e),T=e=>e>o.max?o.max:e<o.min?o.min:e,S=(e,l)=>{e.preventDefault(),J.value=!1;let a=(v(n.value)??0)+l;a=T(a),u.value=_().length===0,n.value=i(a),E()},E=()=>{const e=v(n.value);b("update:modelValue",e)},Q=()=>{const e=v(n.value);e&&(n.value=i(T(e))),u.value=_().length===0,g.value=!1,E()},W=()=>{var l;const e=v((l=B.value)==null?void 0:l.value);n.value=e!=null?i(e):""},X=e=>{if(![...Array(10).keys()].map(l=>l.toString()).includes(e.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key)){e.preventDefault();return}};return U(()=>o.modelValue,e=>{n.value=e!=null?i(e):"",u.value=_().length===0}),R(()=>{I=new Intl.NumberFormat("en-MY",{useGrouping:o.useGrouping}),n.value=o.modelValue!=null?i(o.modelValue):""}),(e,l)=>(t(),r("label",A,[d("div",q,[m(e.$slots,"label",{},()=>[w(s(e.label),1)],!0)]),d("div",{class:V({"fm-stepper-field__container":!0,"fm-stepper-field__container--focused":g.value,"fm-stepper-field__container--invalid":!u.value&&!!e.modelValue,"fm-stepper-field__container--valid":e.showValidBorder&&u.value&&!!e.modelValue})},[m(e.$slots,"prepend",{},()=>[e.prependText?(t(),r("div",D,s(e.prependText),1)):p("",!0),e.leadingIcon?(t(),k(c,{key:1,name:e.leadingIcon,size:"md",color:e.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):p("",!0)],!0),d("input",{ref_key:"inputEl",ref:B,class:"fm-stepper-field--input",type:"text",inputMode:e.inputmode,value:n.value,placeholder:e.placeholder,required:e.required,readOnly:e.readonly,onInput:W,onFocus:l[0]||(l[0]=()=>g.value=!0),onBlur:Q,onKeydown:X},null,40,$),m(e.$slots,"append",{},()=>[d("div",{class:V({"mr-32":e.showSteppers})},[e.appendText?(t(),r("div",G,s(e.appendText),1)):p("",!0),e.trailingIcon?(t(),k(c,{key:1,name:e.trailingIcon,size:"md",color:e.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):p("",!0)],2)],!0),e.showSteppers?(t(),r("div",L,[d("div",{class:"fm-stepper-field__stepper__item",onMousedown:l[1]||(l[1]=a=>S(a,e.step))},[y(c,{name:"expand_less",size:"md",color:e.disabled?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),d("div",{class:"fm-stepper-field__stepper__item",onMousedown:l[2]||(l[2]=a=>S(a,-e.step))},[y(c,{name:"expand_more",size:"md",color:e.disabled?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)])):p("",!0)],2),e.helperText||C(h).length>0?(t(),r("div",O,[C(h).length===0?(t(),r("div",P,[m(e.$slots,"helper-text",{},()=>[w(s(e.helperText),1)],!0)])):(t(),r("div",K,[(t(!0),r(z,null,N(C(h),a=>(t(),r("div",{key:a,class:"flex gap-4 items-center text-fm-color-typo-error"},[y(c,{name:"error",color:"#FF3B30",size:"sm"}),d("span",null,s(a),1)]))),128))]))])):p("",!0)]))}});F=re(Y,[["__scopeId","data-v-cb3498f4"]])});export{oe as __tla,F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,__tla as a}from"./FmTextField.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import{_ as t,__tla as a}from"./FmTextField.vue_vue_type_style_index_0_lang-09dbbc0b.js";let _=Promise.all([(()=>{try{return a}catch{}})()]).then(async()=>{});export{_ as __tla,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,__tla as a}from"./FmTextarea.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import{_ as t,__tla as a}from"./FmTextarea.vue_vue_type_style_index_0_lang-021e2db6.js";let _=Promise.all([(()=>{try{return a}catch{}})()]).then(async()=>{});export{_ as __tla,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as
|
|
1
|
+
import{_ as d}from"./preload-helper-cf010ec4.js";let _,m,l,h=(async()=>{const o=new Set(["Module","__esModule","default","_export_sfc"]);let y={"./FmBreadcrumb":()=>(_(["FmBreadcrumb-7a206e9b.css"]),t("./__federation_expose_FmBreadcrumb-3527b347.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmButton":()=>(_(["FmButton-ef253cc5.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmButton-a3ca7654.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmButtonGroup":()=>(_(["FmIcon-99d8fba2.css"]),t("./__federation_expose_FmButtonGroup-3363a7b4.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmCard":()=>(_(["FmCard-6145e534.css"]),t("./__federation_expose_FmCard-d703409e.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmCardActions":()=>(_([]),t("./__federation_expose_FmCardActions-1186c3c0.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmCardSection":()=>(_([]),t("./__federation_expose_FmCardSection-449a49ea.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmCardTitle":()=>(_([]),t("./__federation_expose_FmCardTitle-034ff583.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmLineChart":()=>(_([]),t("./__federation_expose_FmLineChart-443455d3.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmDatePicker":()=>(_(["FmDatePicker-6608acc7.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmDatePicker-c542d446.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmDateRangePicker":()=>(_(["FmDateRangePicker-2b4b8a36.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmDateRangePicker-6e0116bd.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmDialog":()=>(_(["FmDialog-5cb5a1f8.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmDialog-104bb604.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmCheckbox":()=>(_(["FmCheckbox-53f405a9.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmCheckbox-08a0fd35.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmField":()=>(_(["FmField-f4b1b24a.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmField-41eeed18.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmForm":()=>(_([]),t("./__federation_expose_FmForm-62b67e4b.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmRadio":()=>(_(["FmRadio-e0e6e213.css"]),t("./__federation_expose_FmRadio-1a3bdb18.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmRadioGroup":()=>(_(["FmIcon-99d8fba2.css"]),t("./__federation_expose_FmRadioGroup-0a8b3b0f.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmSelect":()=>(_(["FmSelect-a5b3f313.css","FmIcon-99d8fba2.css","FmMenu-2c4b2c1b.css","FmMenuItem-68412e0d.css","FmCheckbox-53f405a9.css"]),t("./__federation_expose_FmSelect-b616883a.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmStepperField":()=>(_(["FmStepperField-9d4fae3f.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmStepperField-bdfe1136.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmSwitch":()=>(_(["FmSwitch-7605f854.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmSwitch-f75dd36e.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmTextField":()=>(_(["FmTextField-409a3efd.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmTextField-58939c24.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmTextarea":()=>(_(["FmTextarea-0e3eab40.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmTextarea-5184a353.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmIcon":()=>(_(["FmIcon-99d8fba2.css"]),t("./__federation_expose_FmIcon-e5ab92a8.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmList":()=>(_(["FmList-0bec0eff.css"]),t("./__federation_expose_FmList-6bab2481.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmListItem":()=>(_(["FmListItem-3af8b220.css"]),t("./__federation_expose_FmListItem-b4a2ef3a.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmMenu":()=>(_(["FmMenu-2c4b2c1b.css"]),t("./__federation_expose_FmMenu-921093d0.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmMenuItem":()=>(_(["FmMenuItem-68412e0d.css","FmIcon-99d8fba2.css","FmCheckbox-53f405a9.css"]),t("./__federation_expose_FmMenuItem-d331a359.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmProgressIndicator":()=>(_(["FmProgressIndicator-8a19d8bc.css","FmButton-ef253cc5.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmProgressIndicator-e9c20870.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmProgressIndicatorGroup":()=>(_(["FmProgressIndicator-8a19d8bc.css","FmButton-ef253cc5.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmProgressIndicatorGroup-34eb72b1.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmSnackbar":()=>(_(["FmSnackbar-1bbe14e3.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmSnackbar-7af29a69.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmSpacer":()=>(_([]),t("./__federation_expose_FmSpacer-a0a89a0a.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmTimeInput":()=>(_(["FmTimeInput-0f7c002b.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmTimeInput-852280ab.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmTimePicker":()=>(_(["FmTimePicker-504e884c.css","FmButton-ef253cc5.css","FmIcon-99d8fba2.css","FmField-f4b1b24a.css","FmTimeInput-0f7c002b.css","FmMenu-2c4b2c1b.css"]),t("./__federation_expose_FmTimePicker-37afdf20.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e)),"./FmTooltip":()=>(_(["FmButton-ef253cc5.css","FmIcon-99d8fba2.css"]),t("./__federation_expose_FmTooltip-fdd5c38c.js").then(e=>Object.keys(e).every(r=>o.has(r))?()=>e.default:()=>e))},a;a={},_=e=>{const r=import.meta.url;if(typeof r>"u"){console.warn('The remote style takes effect only when the build.target option in the vite.config.ts file is higher than that of "es2020".');return}const i=r.substring(0,r.lastIndexOf("feedmepos-ui-components.js"));e.forEach(c=>{const s=i+c;if(s in a)return;a[s]=!0;const n=document.head.appendChild(document.createElement("link"));n.href=s,n.rel="stylesheet"})};async function t(e){return d(()=>import(e).then(async r=>(await r.__tla,r)),[])}m=e=>y[e](),l=e=>{globalThis.__federation_shared__=globalThis.__federation_shared__||{},Object.entries(e).forEach(([r,i])=>{const c=Object.keys(i)[0],s=Object.values(i)[0],n=s.scope||"default";globalThis.__federation_shared__[n]=globalThis.__federation_shared__[n]||{};const u=globalThis.__federation_shared__[n];(u[r]=u[r]||{})[c]=s})}})();export{h as __tla,_ as dynamicLoadingCss,m as get,l as init};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{importShared as n,__tla as Hi}from"./__federation_fn_import.js";import{c as Ji,a as Ki,_ as Qi,__tla as Xi}from"./FmBreadcrumb.vue_vue_type_style_index_0_lang-4abc649e.js";import{_ as P,__tla as Yi}from"./FmCard.vue_vue_type_style_index_0_lang-fc184594.js";import{_ as $,__tla as Zi}from"./FmCardSection.vue_vue_type_script_setup_true_lang-b8e33ddd.js";import{_ as en,__tla as tn}from"./FmCardTitle.vue_vue_type_script_setup_true_lang-4f3b50b7.js";import{_ as ln,__tla as an}from"./FmLine.vue_vue_type_script_setup_true_lang-2809cd69.js";import p,{__tla as on}from"./__federation_expose_FmButton-a3ca7654.js";import{_ as gt,__tla as nn}from"./FmCardActions.vue_vue_type_script_setup_true_lang-315cfb3c.js";import _t,{__tla as rn}from"./__federation_expose_FmDatePicker-c542d446.js";import ht,{__tla as sn}from"./__federation_expose_FmDateRangePicker-6e0116bd.js";import{_ as ye,__tla as un}from"./FmCheckbox.vue_vue_type_style_index_0_lang-fcb61ef1.js";import dn,{__tla as cn}from"./__federation_expose_FmField-41eeed18.js";import C,{__tla as pn}from"./__federation_expose_FmRadio-1a3bdb18.js";import{_ as Re,__tla as mn}from"./FmRadioGroup.vue_vue_type_script_setup_true_lang-7c5da177.js";import Pe,{__tla as vn}from"./__federation_expose_FmSelect-b616883a.js";import $e,{__tla as bn}from"./__federation_expose_FmStepperField-bdfe1136.js";import y,{__tla as fn}from"./__federation_expose_FmSwitch-f75dd36e.js";import{_ as J,__tla as gn}from"./FmTextField.vue_vue_type_style_index_0_lang-09dbbc0b.js";import{_ as ne,__tla as _n}from"./FmTextarea.vue_vue_type_style_index_0_lang-021e2db6.js";import re,{__tla as hn}from"./__federation_expose_FmIcon-e5ab92a8.js";import xn,{__tla as yn}from"./__federation_expose_FmList-6bab2481.js";import Ie,{__tla as Vn}from"./__federation_expose_FmListItem-b4a2ef3a.js";import wn,{__tla as kn}from"./__federation_expose_FmMenu-921093d0.js";import Bn,{__tla as Cn}from"./__federation_expose_FmMenuItem-d331a359.js";import R,{_ as F,a as We,__tla as Sn}from"./__federation_expose_FmProgressIndicator-e9c20870.js";import L,{__tla as Nn}from"./__federation_expose_FmSnackbar-7af29a69.js";import{_ as Fn,__tla as Tn}from"./FmTimePicker.vue_vue_type_style_index_0_lang-6b998386.js";import{_ as W,__tla as En}from"./FmTooltip.vue_vue_type_script_setup_true_lang-dbdc719e.js";import{_ as Un,__tla as Dn}from"./FmDialog.vue_vue_type_style_index_0_lang-2c81e20e.js";import Ln,{__tla as On}from"./__federation_expose_FmSpacer-a0a89a0a.js";import{_ as zn,__tla as An}from"./FmForm.vue_vue_type_script_setup_true_lang-c41065d5.js";import{_ as se,__tla as Mn}from"./FmButtonGroup.vue_vue_type_script_setup_true_lang-658ba5f6.js";Promise.all([(()=>{try{return Hi}catch{}})(),(()=>{try{return Xi}catch{}})(),(()=>{try{return Yi}catch{}})(),(()=>{try{return Zi}catch{}})(),(()=>{try{return tn}catch{}})(),(()=>{try{return an}catch{}})(),(()=>{try{return on}catch{}})(),(()=>{try{return nn}catch{}})(),(()=>{try{return rn}catch{}})(),(()=>{try{return sn}catch{}})(),(()=>{try{return un}catch{}})(),(()=>{try{return cn}catch{}})(),(()=>{try{return pn}catch{}})(),(()=>{try{return mn}catch{}})(),(()=>{try{return vn}catch{}})(),(()=>{try{return bn}catch{}})(),(()=>{try{return fn}catch{}})(),(()=>{try{return gn}catch{}})(),(()=>{try{return _n}catch{}})(),(()=>{try{return hn}catch{}})(),(()=>{try{return yn}catch{}})(),(()=>{try{return Vn}catch{}})(),(()=>{try{return kn}catch{}})(),(()=>{try{return Cn}catch{}})(),(()=>{try{return Sn}catch{}})(),(()=>{try{return Nn}catch{}})(),(()=>{try{return Tn}catch{}})(),(()=>{try{return En}catch{}})(),(()=>{try{return Dn}catch{}})(),(()=>{try{return On}catch{}})(),(()=>{try{return An}catch{}})(),(()=>{try{return Mn}catch{}})()]).then(async()=>{(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const e of l)if(e.type==="childList")for(const i of e.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function t(l){const e={};return l.integrity&&(e.integrity=l.integrity),l.referrerPolicy&&(e.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?e.credentials="include":l.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function o(l){if(l.ep)return;l.ep=!0;const e=t(l);fetch(l.href,e)}})();const xt=Ji({history:Ki(),routes:[]}),je={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},yt=a=>"config"in a&&"globalProperties"in a.config,Vt=a=>{let t;return a==="vue2"?t=!1:a==="vue3"?t=!0:t=yt(a),t?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},Ge=a=>typeof a=="string"&&a!=="auto",qe=(a,t)=>{a.dataset.vWaveBoundary=Ge(t)?t:"true"},wt=({borderTopLeftRadius:a,borderTopRightRadius:t,borderBottomLeftRadius:o,borderBottomRightRadius:l},e)=>{const i=document.createElement(e);return i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.display="block",i.style.position="absolute",i.style.borderRadius=`${a} ${t} ${l} ${o}`,i.style.overflow="hidden",i.style.pointerEvents="none",i.style.webkitMaskImage="-webkit-radial-gradient(white, black)",i},kt=(a,t,o,l)=>{const e=document.createElement("div");return e.style.position="absolute",e.style.width=`${o}px`,e.style.height=`${o}px`,e.style.top=`${t}px`,e.style.left=`${a}px`,e.style.background=l.color,e.style.borderRadius="50%",e.style.opacity=`${l.initialOpacity}`,e.style.transform="translate(-50%,-50%) scale(0)",e.style.transition=`transform ${l.duration}s ${l.easing}, opacity ${l.duration}s ${l.easing}`,e};function ue(a,t,o,l){const e=a-o,i=t-l;return Math.sqrt(e*e+i*i)}function Bt(a,t,{width:o,height:l}){const e=ue(a,t,0,0),i=ue(a,t,o,0),B=ue(a,t,0,l),u=ue(a,t,o,l);return Math.max(e,i,B,u)}const Ct=({x:a,y:t},{top:o,left:l})=>({x:a-l,y:t-o}),Ve="vWaveCountInternal";function St(a){const t=we(a);He(a,t+1)}function Nt(a){const t=we(a);He(a,t-1)}function He(a,t){a.dataset[Ve]=t.toString()}function we(a){var t;return parseInt((t=a.dataset[Ve])!==null&&t!==void 0?t:"0",10)}function Ft(a){delete a.dataset[Ve]}const ke=(a,t,o)=>{const l=t.getBoundingClientRect(),e=window.getComputedStyle(t),{x:i,y:B}=Ct(a,l),u=2.05*Bt(i,B,l),c=wt(e,o.tagName),h=kt(i,B,u,o);St(t);let N="";e.position==="static"&&(t.style.position&&(N=t.style.position),t.style.position="relative"),c.appendChild(h),t.appendChild(c);let w=!1;const x=qi=>{typeof qi<"u"&&(document.removeEventListener("pointerup",x),document.removeEventListener("pointercancel",x)),w?ji():w=!0},ji=()=>{h.style.transition=`opacity ${o.dissolveDuration}s linear`,h.style.opacity="0",setTimeout(()=>{c.remove(),Nt(t),we(t)===0&&(Ft(t),t.style.position=N)},o.dissolveDuration*1e3)};document.addEventListener("pointerup",x),document.addEventListener("pointercancel",x);const Gi=setTimeout(()=>{document.removeEventListener("pointercancel",Me),requestAnimationFrame(()=>{h.style.transform="translate(-50%,-50%) scale(1)",h.style.opacity=`${o.finalOpacity}`,setTimeout(()=>x(),o.duration*1e3)})},o.cancellationPeriod),Me=()=>{clearTimeout(Gi),c.remove(),document.removeEventListener("pointerup",x),document.removeEventListener("pointercancel",x),document.removeEventListener("pointercancel",Me)};document.addEventListener("pointercancel",Me)},K=new WeakMap,Je=(a={},t="vue3")=>{const o=Object.assign(Object.assign({},je),a),l=Vt(t),e=u=>{const c=u.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${c}"]`).forEach(h=>ke(u,h,Object.assign(Object.assign({},o),K.get(h))))},i={[l.mounted](u,{value:c={}}){var h;K.set(u,c),qe(u,(h=c&&c.trigger)!==null&&h!==void 0?h:o.trigger),u.addEventListener("pointerdown",N=>{if(K.get(u)===!1)return;const w=Object.assign(Object.assign({},o),K.get(u));if(w.trigger===!1)return ke(N,u,w);if(Ge(w.trigger))return;const x=u.querySelector('[data-v-wave-trigger="true"]');!x&&w.trigger===!0||x&&!N.composedPath().includes(x)||ke(N,u,w)})},[l.updated](u,{value:c={}}){var h;K.set(u,c),qe(u,(h=c&&c.trigger)!==null&&h!==void 0?h:o.trigger)}},B={[l.mounted](u,{arg:c="true"}){u.dataset.vWaveTrigger=c,c!=="true"&&u.addEventListener("pointerdown",e)},[l.updated](u,{arg:c="true"}){u.dataset.vWaveTrigger=c,c==="true"?u.removeEventListener("pointerdown",e):u.addEventListener("pointerdown",e)}};return{wave:i,vWave:i,waveTrigger:B,vWaveTrigger:B}},Tt={install(a,t={}){if(this.installed)return;this.installed=!0;const o=Object.assign(Object.assign({},je),t),{vWave:l,vWaveTrigger:e}=Je(o,a);a.directive(o.directive,l),a.directive(`${o.directive}-trigger`,e)},installed:!1,createLocalWaveDirective:Je},{defineComponent:Et}=await n("vue"),{toDisplayString:Ke,createElementVNode:Be,withCtx:Q,createVNode:Qe,renderSlot:Ut,openBlock:Dt,createBlock:Lt}=await n("vue"),Ot={class:"fm-typo-title-sm-700 mb-4"},zt={class:""},r=Et({__name:"DemoSection",props:{title:{type:String,required:!0},description:{type:String,default:void 0}},setup(a){return(t,o)=>(Dt(),Lt(P,{variant:"outlined",title:a.title},{header:Q(()=>[Qe(en,null,{actions:Q(()=>[]),default:Q(()=>[Be("div",null,[Be("div",Ot,Ke(a.title),1),Be("div",zt,Ke(a.description??a.title),1)])]),_:1})]),default:Q(()=>[Qe($,null,{default:Q(()=>[Ut(t.$slots,"default")]),_:3})]),_:3},8,["title"]))}}),{defineComponent:At}=await n("vue"),{createVNode:Xe,withCtx:Mt,openBlock:Rt,createElementBlock:Pt}=await n("vue"),$t=At({__name:"Breadcrumb",setup(a){const t=[{label:"Home",route:"/",disabled:!0},{label:"Marketing",route:"/marketing"},{label:"My campaign",route:"/marketing/campaign"},{label:"Create campaign",route:"/marketing/campaign/create"}];return(o,l)=>(Rt(),Pt("div",null,[Xe(r,{title:"Breadcrumb",description:"Basic usage"},{default:Mt(()=>[Xe(Qi,{items:t})]),_:1})]))}}),{defineComponent:It}=await n("vue"),{createVNode:Ye,withCtx:Wt,openBlock:jt,createElementBlock:Gt}=await n("vue"),qt=It({__name:"Line",setup(a){const t=[{label:"Dataset 1",data:[65,59,80,81,56,55,40,65,59,80,81,56],fill:!0,color:"fm-color-system-green-300"}];return(o,l)=>(jt(),Gt("div",null,[Ye(r,{title:"Line chart",description:"Basic line chart usage"},{default:Wt(()=>[Ye(ln,{name:"Total product sales",paragraph:"Included sales: Jun 2023 - Aug 2023","x-axis":{categories:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},datasets:t})]),_:1})]))}}),{defineComponent:Ht}=await n("vue"),{createVNode:g,createElementVNode:de,withCtx:ce,openBlock:Jt,createElementBlock:Kt}=await n("vue"),Qt={class:"flex flex-col gap-24"},Xt={class:"gap-24 grid grid-cols-6"},Yt={class:"gap-24 grid grid-cols-6"},Zt={class:"flex gap-24"},el={class:"flex gap-24"},tl=Ht({__name:"Button",setup(a){return(t,o)=>(Jt(),Kt("div",Qt,[g(r,{title:"Basic button",description:"Different button variant"},{default:ce(()=>[de("div",Xt,[g(p,{variant:"primary",label:"Primary"}),g(p,{variant:"secondary",label:"Secondary"}),g(p,{variant:"tertiary",label:"Tertiary"}),g(p,{variant:"destructive",label:"Destructive"}),g(p,{variant:"fab",label:"FAB"})])]),_:1}),g(r,{title:"Size",description:"Different button size"},{default:ce(()=>[de("div",Yt,[g(p,{variant:"primary",label:"md",size:"md"}),g(p,{variant:"primary",label:"lg"})])]),_:1}),g(r,{title:"With icons",description:""},{default:ce(()=>[de("div",Zt,[g(p,{variant:"primary",label:"button",size:"md",icon:"home"}),g(p,{variant:"secondary",label:"button",size:"md",icon:"home"}),g(p,{variant:"tertiary",label:"button",size:"md",icon:"home"}),g(p,{variant:"destructive",label:"button",size:"md",icon:"home"}),g(p,{variant:"fab",label:"button",size:"md",icon:"home"}),g(p,{variant:"fab",size:"md",icon:"home"})])]),_:1}),g(r,{title:"Disabled",description:""},{default:ce(()=>[de("div",el,[g(p,{variant:"primary",disabled:"",label:"button",size:"md"}),g(p,{variant:"secondary",disabled:"",label:"button",size:"md"}),g(p,{variant:"tertiary",disabled:"",label:"button",size:"md"}),g(p,{variant:"destructive",disabled:"",label:"button",size:"md"}),g(p,{variant:"fab",disabled:"",label:"button",size:"md"}),g(p,{variant:"fab",disabled:"",size:"md",icon:"home"})])]),_:1})]))}}),ll=`
|
|
2
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
3
|
+
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
4
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
5
|
+
nisi ut aliquip ex ea commodo consequat.
|
|
6
|
+
`,al=`
|
|
7
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
8
|
+
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
9
|
+
`;function d(a=!1){return a?ll:al}const{defineComponent:ol}=await n("vue"),{unref:G,toDisplayString:q,createElementVNode:v,withCtx:f,createVNode:m,openBlock:il,createElementBlock:nl}=await n("vue"),rl={class:"flex flex-col gap-24"},sl={class:"gap-24 grid grid-cols-3"},ul={class:"gap-24 grid grid-cols-3"},dl=v("img",{src:"https://cdn.quasar.dev/img/mountains.jpg"},null,-1),cl=v("div",{class:"mb-8"}," Title ",-1),pl=v("img",{src:"https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg"},null,-1),ml=v("div",{class:"flex"},[v("div",{class:"grow"},[v("div",{class:"mb-8"}," Basic Tee "),v("div",{class:"text-fm-color-typo-secondary"}," Aspen white ")]),v("div",{class:"fm-typo-body-lg-700"}," $35 ")],-1),vl={class:"gap-24 grid grid-cols-2"},bl=v("div",{class:"grow"},[v("img",{src:"https://cdn.quasar.dev/img/mountains.jpg",class:"h-full w-full",style:{"object-fit":"fill"}})],-1),fl=v("div",{class:"grow"},[v("img",{src:"https://cdn.quasar.dev/img/mountains.jpg",class:"h-full w-full",style:{"object-fit":"fill"}})],-1),gl=v("div",{class:"basis-1/3"},[v("img",{src:"https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg",class:"h-full w-full",style:{"object-fit":"fill"}})],-1),_l=v("div",{class:"fm-typo-title-sm-700 mb-16"}," Basic Tee 6-pack ",-1),hl={class:"text-fm-color-typo-secondary"},xl=v("div",null," Color ",-1),yl=v("div",null," Size ",-1),Vl=ol({__name:"Card",setup(a){return(t,o)=>(il(),nl("div",rl,[m(r,{title:"Card",description:"Card basic usage"},{default:f(()=>[v("div",sl,[m(P,{class:"h-fit"},{default:f(()=>[m($,null,{default:f(()=>[v("div",null,q(G(d)()),1)]),_:1})]),_:1}),m(P,{title:"Title"},{default:f(()=>[m($,null,{default:f(()=>[v("div",null,q(G(d)()),1)]),_:1})]),_:1}),m(P,{title:"Title"},{actions:f(()=>[m(gt,null,{default:f(()=>[m(p,{label:"Cancel",size:"md",variant:"secondary"}),m(p,{label:"Confirm",size:"md"})]),_:1})]),default:f(()=>[m($,null,{default:f(()=>[v("div",null,q(G(d)()),1)]),_:1})]),_:1})])]),_:1}),m(r,{title:"Media card",description:"Cards with media content"},{default:f(()=>[v("div",ul,[m(P,{class:"h-fit"},{default:f(()=>[dl,m($,null,{default:f(()=>[cl,v("div",null,q(G(d)()),1)]),_:1})]),_:1}),m(P,{class:"h-fit"},{actions:f(()=>[m(gt,{alignment:"center"},{default:f(()=>[m(p,{label:"Add to cart",size:"md",class:"w-full"})]),_:1})]),default:f(()=>[pl,m($,null,{default:f(()=>[ml]),_:1})]),_:1})])]),_:1}),m(r,{title:"Horizontal card",description:"Cards with horizontal layout"},{default:f(()=>[v("div",vl,[m(P,{class:"h-fit",horizontal:""},{default:f(()=>[bl,m($,null,{default:f(()=>[v("div",null,q(G(d)()),1)]),_:1})]),_:1}),m(P,{class:"h-fit",horizontal:""},{default:f(()=>[fl,m($,{class:"flex flex-col gap-16 items-center justify-center",padding:"p-8"},{default:f(()=>[m(p,{icon:"home",variant:"tertiary"}),m(p,{icon:"add",variant:"tertiary"}),m(p,{icon:"warning",variant:"tertiary"})]),_:1})]),_:1})])]),_:1}),m(r,{title:"Advance",description:"Advance usage for card component"},{default:f(()=>[m(P,{horizontal:""},{default:f(()=>[gl,m($,{class:"basis-2/3 flex flex-col gap-24"},{default:f(()=>[v("div",null,[_l,v("div",hl,q(G(d)(!0)),1)]),xl,yl,m(p,{label:"Add to cart"})]),_:1})]),_:1})]),_:1})]))}}),{defineComponent:wl}=await n("vue"),{createVNode:Ce,createElementVNode:kl,withCtx:Bl,openBlock:Cl,createElementBlock:Sl}=await n("vue"),Nl={class:"flex flex-col gap-24"},Fl={class:"gap-24 grid grid-cols-3"},{ref:Tl}=await n("vue"),El=wl({__name:"DatePicker",setup(a){const t=Tl("2023-10-26");return(o,l)=>(Cl(),Sl("div",Nl,[Ce(r,{title:"Date picker",description:"Basic usage"},{default:Bl(()=>[kl("div",Fl,[Ce(_t,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value=e),label:"Single date picker",disabled:!1},null,8,["modelValue"]),Ce(_t,{modelValue:t.value,"onUpdate:modelValue":l[1]||(l[1]=e=>t.value=e),label:"Disabled",disabled:!0},null,8,["modelValue"])])]),_:1})]))}}),{defineComponent:Ul}=await n("vue"),{createVNode:Se,createElementVNode:Dl,withCtx:Ll,openBlock:Ol,createElementBlock:zl}=await n("vue"),Al={class:"flex flex-col gap-24"},Ml={class:"gap-24 grid grid-cols-3"},{ref:Rl}=await n("vue"),Pl=Ul({__name:"DateRangePicker",setup(a){const t=Rl({startDate:"2023-10-01",endDate:"2023-10-31"});return(o,l)=>(Ol(),zl("div",Al,[Se(r,{title:"Date picker",description:"Basic usage"},{default:Ll(()=>[Dl("div",Ml,[Se(ht,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value=e),label:"Date range picker",disabled:!1},null,8,["modelValue"]),Se(ht,{modelValue:t.value,"onUpdate:modelValue":l[1]||(l[1]=e=>t.value=e),label:"Disabled",disabled:!0},null,8,["modelValue"])])]),_:1})]))}}),{defineComponent:$l}=await n("vue"),{unref:pe,createVNode:X,withCtx:Il,openBlock:Wl,createElementBlock:jl}=await n("vue"),Gl={class:"flex flex-col gap-24"},{ref:ql}=await n("vue"),Hl=$l({__name:"Checkbox",setup(a){const t=ql(!1);return(o,l)=>(Wl(),jl("div",Gl,[X(r,{title:"Radio",description:"Basic usage"},{default:Il(()=>[X(ye,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value=e),name:"v1",label:"Option 1",value:"1",sublabel:pe(d)(),indeterminate:!1},null,8,["modelValue","sublabel"]),X(ye,{modelValue:t.value,"onUpdate:modelValue":l[1]||(l[1]=e=>t.value=e),name:"v2",label:"Option 2",value:"2",sublabel:pe(d)(),indeterminate:!1},null,8,["modelValue","sublabel"]),X(ye,{modelValue:t.value,"onUpdate:modelValue":l[2]||(l[2]=e=>t.value=e),disabled:!0,name:"v3",label:"Option 3",value:"3",sublabel:pe(d)(),indeterminate:!1},null,8,["modelValue","sublabel"]),X(ye,{modelValue:t.value,"onUpdate:modelValue":l[3]||(l[3]=e=>t.value=e),name:"v4",label:"Option 4",value:"4",sublabel:pe(d)(),indeterminate:!0},null,8,["modelValue","sublabel"])]),_:1})]))}}),{defineComponent:Jl}=await n("vue"),{createElementVNode:Kl,withCtx:Ze,createVNode:et,openBlock:Ql,createElementBlock:Xl}=await n("vue"),Yl={class:"flex flex-col gap-24"},Zl=Kl("div",null," test ",-1),ea=Jl({__name:"Field",setup(a){function t(){confirm("form field clicked")}return(o,l)=>(Ql(),Xl("div",Yl,[et(r,{title:"Form field",description:"Wrapper to make your component part of form"},{default:Ze(()=>[et(dn,{class:"text-fm-color-typo-warning",onClick:t},{default:Ze(()=>[Zl]),_:1})]),_:1})]))}}),{defineComponent:ta}=await n("vue"),{unref:T,createVNode:k,withCtx:Y,createElementVNode:tt,openBlock:la,createElementBlock:aa}=await n("vue"),oa={class:"flex flex-col gap-24"},{ref:ia}=await n("vue"),na=ta({__name:"Radio",setup(a){const t=ia("");return(o,l)=>(la(),aa("div",oa,[k(r,{title:"Radio",description:"Radio Group"},{default:Y(()=>[tt("div",null,[k(Re,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value=e)},{default:Y(()=>[k(C,{value:"1",label:"Bluetooth",sublabel:T(d)()},null,8,["sublabel"]),k(C,{value:"2",label:"WiFi",sublabel:T(d)()},null,8,["sublabel"]),k(C,{value:"3",label:"NFC",sublabel:T(d)()},null,8,["sublabel"]),k(C,{value:"4",label:"Hotspot",sublabel:T(d)()},null,8,["sublabel"])]),_:1},8,["modelValue"])])]),_:1}),k(r,{title:"Radio",description:"Radio Group Inline"},{default:Y(()=>[tt("div",null,[k(Re,{modelValue:t.value,"onUpdate:modelValue":l[1]||(l[1]=e=>t.value=e),inline:""},{default:Y(()=>[k(C,{value:"1",label:"Bluetooth",sublabel:T(d)()},null,8,["sublabel"]),k(C,{value:"2",label:"WiFi",sublabel:T(d)()},null,8,["sublabel"]),k(C,{value:"3",label:"NFC",sublabel:T(d)()},null,8,["sublabel"]),k(C,{value:"4",label:"Hotspot",sublabel:T(d)()},null,8,["sublabel"])]),_:1},8,["modelValue"])])]),_:1}),k(r,{title:"Radio",description:"Radio"},{default:Y(()=>[k(C,{modelValue:t.value,"onUpdate:modelValue":l[2]||(l[2]=e=>t.value=e),value:"1",label:"Bluetooth",sublabel:T(d)()},null,8,["modelValue","sublabel"]),k(C,{modelValue:t.value,"onUpdate:modelValue":l[3]||(l[3]=e=>t.value=e),value:"2",label:"WiFi",sublabel:T(d)()},null,8,["modelValue","sublabel"]),k(C,{modelValue:t.value,"onUpdate:modelValue":l[4]||(l[4]=e=>t.value=e),value:"3",label:"NFC",sublabel:T(d)()},null,8,["modelValue","sublabel"]),k(C,{modelValue:t.value,"onUpdate:modelValue":l[5]||(l[5]=e=>t.value=e),value:"4",label:"Hotspot",sublabel:T(d)()},null,8,["modelValue","sublabel"])]),_:1})]))}}),{defineComponent:ra}=await n("vue"),{createVNode:me,toDisplayString:lt,createElementVNode:at,withCtx:ot,openBlock:sa,createElementBlock:ua}=await n("vue"),da={class:"flex flex-col gap-24"},{ref:it}=await n("vue"),ca=ra({__name:"Select",setup(a){const t=it(3),o=it([3,"4"]);return(l,e)=>(sa(),ua("div",da,[me(r,{title:"Select",description:"Single selection"},{default:ot(()=>[me(Pe,{modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=i=>t.value=i),label:"Select",items:[{label:"Object",value:{first:"something"}},{label:"Array",value:["array","1"]},{label:"Number",value:3},{label:"String",value:"4"},{label:"1",value:"5"},{label:"2",value:"6"}]},null,8,["modelValue"]),at("div",null,lt(t.value),1)]),_:1}),me(r,{title:"Select",description:"Multiple selection"},{default:ot(()=>[me(Pe,{modelValue:o.value,"onUpdate:modelValue":e[1]||(e[1]=i=>o.value=i),label:"Select",items:[{label:"Object",value:{first:"something"}},{label:"Array",value:["array","1"]},{label:"Number",value:3},{label:"String",value:"4"},{label:"1",value:"5"},{label:"2",value:"6"}],multiselect:""},null,8,["modelValue"]),at("div",null,lt(o.value),1)]),_:1})]))}}),{defineComponent:pa}=await n("vue"),{createVNode:Ne,createElementVNode:Fe,toDisplayString:ma,createTextVNode:va,withCtx:ba,openBlock:fa,createElementBlock:ga}=await n("vue"),_a=Fe("h1",{class:"mt-8"}," Without steppers ",-1),{ref:ha}=await n("vue"),xa=pa({__name:"Stepper",setup(a){const t=ha(null);return(o,l)=>(fa(),ga("div",null,[Ne(r,{title:"Text field",description:""},{default:ba(()=>[Fe("div",null,[Ne($e,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value=e),label:"Number",placeholder:"Placeholder",step:30,min:0,max:999,"helper-text":"Helper",rules:[e=>e<=100||"More than 100",e=>e<=50||"More than 50"],"prepend-text":"RM","append-text":"%"},null,8,["modelValue","rules"])]),_a,Fe("div",null,[Ne($e,{modelValue:t.value,"onUpdate:modelValue":l[1]||(l[1]=e=>t.value=e),label:"Number",placeholder:"Placeholder",step:30,min:0,max:999,"helper-text":"Helper",rules:[e=>e<=100||"More than 100",e=>e<=50||"More than 50"],"show-steppers":!1},null,8,["modelValue","rules"])]),va(" "+ma(t.value),1)]),_:1})]))}}),{defineComponent:ya}=await n("vue"),{createVNode:b,createElementVNode:ve,withCtx:Z,unref:nt,openBlock:Va,createElementBlock:wa}=await n("vue"),ka={class:"flex flex-col gap-24"},Ba={class:"flex gap-24"},Ca={class:"flex flex-col"},Sa={class:"flex gap-24"},Na={class:"flex gap-24"},{ref:Fa}=await n("vue"),Ta=ya({__name:"Switch",setup(a){const t=Fa({bluetooth:!1,wifi:!1,nfc:!0,hotspot:!0});return(o,l)=>(Va(),wa("div",ka,[b(r,{title:"Switch",description:"Basic usage"},{default:Z(()=>[ve("div",Ba,[b(y,{modelValue:t.value.bluetooth,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value.bluetooth=e),value:"bluetooth",label:"Bluetooth",disabled:"","show-icon":""},null,8,["modelValue"]),b(y,{modelValue:t.value.wifi,"onUpdate:modelValue":l[1]||(l[1]=e=>t.value.wifi=e),value:"wifi",label:"WiFi"},null,8,["modelValue"]),b(y,{modelValue:t.value.nfc,"onUpdate:modelValue":l[2]||(l[2]=e=>t.value.nfc=e),value:"nfc",label:"NFC"},null,8,["modelValue"]),b(y,{modelValue:t.value.hotspot,"onUpdate:modelValue":l[3]||(l[3]=e=>t.value.hotspot=e),value:"hotspot",label:"Hotspot"},null,8,["modelValue"])])]),_:1}),b(r,{title:"Switch",description:"Vertical"},{default:Z(()=>[ve("div",Ca,[b(y,{modelValue:t.value.bluetooth,"onUpdate:modelValue":l[4]||(l[4]=e=>t.value.bluetooth=e),value:"bluetooth",label:"Bluetooth"},null,8,["modelValue"]),b(y,{modelValue:t.value.wifi,"onUpdate:modelValue":l[5]||(l[5]=e=>t.value.wifi=e),value:"wifi",label:"WiFi"},null,8,["modelValue"]),b(y,{modelValue:t.value.nfc,"onUpdate:modelValue":l[6]||(l[6]=e=>t.value.nfc=e),value:"nfc",label:"NFC"},null,8,["modelValue"]),b(y,{modelValue:t.value.hotspot,"onUpdate:modelValue":l[7]||(l[7]=e=>t.value.hotspot=e),value:"hotspot",label:"Hotspot"},null,8,["modelValue"])])]),_:1}),b(r,{title:"Label position",description:"Change label position"},{default:Z(()=>[b(y,{modelValue:t.value.bluetooth,"onUpdate:modelValue":l[8]||(l[8]=e=>t.value.bluetooth=e),value:"bluetooth",label:"Bluetooth","label-placement":"right"},null,8,["modelValue"]),b(y,{modelValue:t.value.wifi,"onUpdate:modelValue":l[9]||(l[9]=e=>t.value.wifi=e),value:"wifi",label:"WiFi","label-placement":"right",sublabel:nt(d)(!0)},null,8,["modelValue","sublabel"]),b(y,{modelValue:t.value.nfc,"onUpdate:modelValue":l[10]||(l[10]=e=>t.value.nfc=e),value:"nfc",label:"NFC","label-placement":"right"},null,8,["modelValue"]),b(y,{modelValue:t.value.hotspot,"onUpdate:modelValue":l[11]||(l[11]=e=>t.value.hotspot=e),value:"hotspot",label:"Hotspot","label-placement":"right",sublabel:nt(d)(!0)},null,8,["modelValue","sublabel"])]),_:1}),b(r,{title:"Disabled switch"},{default:Z(()=>[ve("div",Sa,[b(y,{modelValue:t.value.bluetooth,"onUpdate:modelValue":l[12]||(l[12]=e=>t.value.bluetooth=e),value:"bluetooth",label:"Bluetooth",disabled:""},null,8,["modelValue"]),b(y,{modelValue:t.value.wifi,"onUpdate:modelValue":l[13]||(l[13]=e=>t.value.wifi=e),value:"wifi",label:"WiFi",disabled:""},null,8,["modelValue"]),b(y,{modelValue:t.value.nfc,"onUpdate:modelValue":l[14]||(l[14]=e=>t.value.nfc=e),value:"nfc",label:"NFC",disabled:""},null,8,["modelValue"]),b(y,{modelValue:t.value.hotspot,"onUpdate:modelValue":l[15]||(l[15]=e=>t.value.hotspot=e),value:"hotspot",label:"Hotspot",disabled:""},null,8,["modelValue"])])]),_:1}),b(r,{title:"Icon switch",description:"Switch with icon"},{default:Z(()=>[ve("div",Na,[b(y,{modelValue:t.value.bluetooth,"onUpdate:modelValue":l[16]||(l[16]=e=>t.value.bluetooth=e),value:"bluetooth",label:"Bluetooth",disabled:"","show-icon":""},null,8,["modelValue"]),b(y,{modelValue:t.value.wifi,"onUpdate:modelValue":l[17]||(l[17]=e=>t.value.wifi=e),value:"wifi",label:"WiFi","show-icon":""},null,8,["modelValue"]),b(y,{modelValue:t.value.nfc,"onUpdate:modelValue":l[18]||(l[18]=e=>t.value.nfc=e),value:"nfc",label:"NFC",disabled:"","show-icon":""},null,8,["modelValue"]),b(y,{modelValue:t.value.hotspot,"onUpdate:modelValue":l[19]||(l[19]=e=>t.value.hotspot=e),value:"hotspot",label:"Hotspot","show-icon":""},null,8,["modelValue"])])]),_:1})]))}}),{defineComponent:Ea}=await n("vue"),{createVNode:ee,createElementVNode:rt,withCtx:st,openBlock:Ua,createElementBlock:Da}=await n("vue"),{ref:ut}=await n("vue"),La=Ea({__name:"TextField",setup(a){const t=ut(""),o=ut("");return(l,e)=>(Ua(),Da("div",null,[ee(r,{title:"Text field",description:""},{default:st(()=>[rt("div",null,[ee(J,{modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=i=>t.value=i),label:"something",disabled:!1,"input-state":"success","helper-text":"something",rules:[i=>!!i.includes("t")||"nothing"]},null,8,["modelValue","rules"]),ee(J,{modelValue:t.value,"onUpdate:modelValue":e[1]||(e[1]=i=>t.value=i),label:"something",disabled:!1,"input-state":"warning"},null,8,["modelValue"])])]),_:1}),ee(r,{title:"Text area",description:""},{default:st(()=>[rt("div",null,[ee(ne,{modelValue:o.value,"onUpdate:modelValue":e[2]||(e[2]=i=>o.value=i),label:"textarea",disabled:!1,"input-state":"error",rules:[i=>!!i.includes("t")||"nothing"]},null,8,["modelValue","rules"])])]),_:1})]))}}),{defineComponent:Oa}=await n("vue"),{createVNode:te,createElementVNode:za,withCtx:Aa,openBlock:Ma,createElementBlock:Ra}=await n("vue"),Pa={class:"flex flex-col gap-24"},$a={class:"gap-24 grid grid-cols-12"},Ia=Oa({__name:"Icon",setup(a){return(t,o)=>(Ma(),Ra("div",Pa,[te(r,{title:"Icon",description:"Basic icon styling"},{default:Aa(()=>[za("div",$a,[te(re,{name:"visibility",outline:!0,size:"sm",color:"primary"}),te(re,{name:"visibility",outline:!1,color:"system-success-300"}),te(re,{name:"visibility",outline:!0,size:"lg",color:"#F12345"}),te(re,{name:"visibility",outline:!1,color:"#F12345",size:"xl"})])]),_:1})]))}}),{defineComponent:Wa}=await n("vue"),{createVNode:H,createElementVNode:V,withCtx:le,openBlock:ja,createElementBlock:Ga}=await n("vue"),qa={class:"flex flex-col gap-24"},Ha={class:"flex gap-24"},Ja=V("div",{class:"grow"},[V("div",null,"Leslie Alexander"),V("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," leslie.alexander@example.com ")],-1),Ka=V("div",{class:"flex flex-col items-end"},[V("div",null," Co-Founder / CEO "),V("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," Last seen 3h ago ")],-1),Qa=V("div",{class:"grow"},[V("div",null,"Michael Foster"),V("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," michael.foster@example.com ")],-1),Xa=V("div",{class:"flex flex-col items-end"},[V("div",null," Co-Founder / CEO "),V("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," Last seen 3h ago ")],-1),Ya=V("div",{class:"grow"},[V("div",null,"Dries Vincent"),V("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," dries.vincent@example.com ")],-1),Za=V("div",{class:"flex flex-col items-end"},[V("div",null," Co-Founder / CEO "),V("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," Last seen 3h ago ")],-1),eo=Wa({__name:"List",setup(a){return(t,o)=>(ja(),Ga("div",qa,[H(r,{title:"Switch",description:"Basic usage"},{default:le(()=>[V("div",Ha,[H(xn,{class:"w-full",disabled:""},{default:le(()=>[H(Ie,{tag:"a"},{default:le(()=>[H(re,{name:"hexagon"}),Ja,Ka]),_:1}),H(Ie,{tag:"label"},{default:le(()=>[Qa,Xa]),_:1}),H(Ie,{tag:"label"},{default:le(()=>[Ya,Za]),_:1})]),_:1})])]),_:1})]))}}),{defineComponent:to}=await n("vue"),{createElementVNode:U,toDisplayString:dt,createVNode:Te,renderList:lo,Fragment:ao,openBlock:Ee,createElementBlock:ct,createBlock:oo,withCtx:Ue}=await n("vue"),io={class:"flex flex-col gap-24"},no=U("div",{class:"bg-fm-color-system-warning-100 p-16"},[U("h1",null," Notes "),U("ul",null,[U("li",null,"\u2022 The dropdown will close whenever it detects scrolling"),U("li",null,"\u2022 Multi select must use checkbox per design guidelines")])],-1),ro={class:"bg-fm-color-neutral-gray-100 mb-16 min-h-[40px] p-8 whitespace-pre"},so={class:"w-[280px]"},{ref:be}=await n("vue"),uo=to({__name:"Menu",setup(a){const t=be([{label:"Grid",icon:"grid_view",selected:!1},{label:"List",icon:"view_list",selected:!1},{label:"Thumbnails",icon:"gallery_thumbnail",selected:!1}]),o=be(!1),l=be(!1),e=be(),i=B=>{e.value=B,t.value.forEach(u=>{u.selected=JSON.stringify(u)===JSON.stringify(B)}),l.value=!1};return(B,u)=>(Ee(),ct("div",io,[Te(r,{title:"Menu",description:"Basic usage WIP: Menu item clicking logic needs some work still, sorry for the wait"},{default:Ue(()=>[no,U("div",ro,[U("div",null,[U("code",null,dt(JSON.stringify(t.value,null,4)),1)]),U("div",null,[U("code",null,dt(JSON.stringify(e.value,null,4)),1)])]),Te(wn,{disabled:o.value,"is-open":l.value,onDropdownChanged:u[0]||(u[0]=c=>l.value=c)},{"menu-button":Ue(()=>[Te(p,{label:"Open Menu"})]),"menu-content":Ue(()=>[U("div",so,[(Ee(!0),ct(ao,null,lo(t.value,(c,h)=>(Ee(),oo(Bn,{key:h,modelValue:c.selected,"onUpdate:modelValue":N=>c.selected=N,label:c.label,icon:c.icon,onClick:N=>i(c)},null,8,["modelValue","onUpdate:modelValue","label","icon","onClick"]))),128))])]),_:1},8,["disabled","is-open"])]),_:1})]))}}),{defineComponent:co}=await n("vue"),{createVNode:s,withCtx:O,createElementVNode:_,openBlock:po,createElementBlock:mo}=await n("vue"),vo={class:"flex flex-col gap-24"},bo={class:"flex gap-5 items-center m-3"},fo=_("div",null,"5 Steps",-1),go={class:"flex gap-5 items-center m-3"},_o=_("div",null,"4 Steps",-1),ho={class:"flex gap-5 items-center m-3"},xo=_("div",null,"3 Steps",-1),yo={class:"flex gap-10"},Vo=_("div",null,"Horizontal",-1),wo={class:"flex gap-10 mt-10"},ko=_("div",null,"Vertical",-1),Bo={class:"p-3"},Co={class:"p-3"},So=_("div",{class:"fm-typo-title-sm-700 gap-1"}," Campaign Detail ",-1),No=_("div",{class:"fm-typo-title-sm-700 gap-1"}," Campaign Trigger ",-1),Fo=_("div",{class:"fm-typo-title-sm-700 gap-1"}," Campaign Configuration ",-1),To=_("div",{class:"fm-typo-title-sm-700 gap-1"}," Create campaign ",-1),Eo=_("div",{class:"fm-typo-title-sm-700"}," Campaign Summary ",-1),Uo=_("div",{class:"flex flex-col gap-5 items-start p-0 self-stretch"},[_("div",{class:"bg-fm-color-neutral-gray-100 self-stretch",style:{height:"1px"}})],-1),Do=_("div",{class:"flex flex-col gap-5 items-start p-0 self-stretch"},[_("div",{class:"flex flex-col gap-1 items-start p-0 self-stretch"},[_("div",{class:"fm-typo-body-md-400"}," Field Name "),_("div",{class:"fm-typo-body-md-700"}," Value ")])],-1),{ref:Lo}=await n("vue"),Oo=co({__name:"ProgressIndicator",setup(a){const t=Lo(""),o=[{titleText:"Title",supportingText:"Supporting text",status:"active"},{titleText:"Title",status:"default",validateStep:()=>typeof t.value<"u"&&t.value.length!=0},{titleText:"Title",status:"default"},{titleText:"Title",status:"default",submitForm:()=>{console.log("Form submitted")}}];return(l,e)=>(po(),mo("div",vo,[s(r,{title:"Progress Indicator (Mobile)",description:"Stepper in mobile will replaced by a stepper header. "},{default:O(()=>[s(F,{"current-step":2,"total-steps":3,"title-text":"Title","supporting-text":"Supporting Text"})]),_:1}),s(r,{title:"Radial Progress Indicator",description:""},{default:O(()=>[_("div",bo,[fo,s(F,{"title-text":"","supporting-text":"","current-step":1,"total-steps":5}),s(F,{"title-text":"","supporting-text":"","current-step":2,"total-steps":5}),s(F,{"title-text":"","supporting-text":"","current-step":3,"total-steps":5}),s(F,{"title-text":"","supporting-text":"","current-step":4,"total-steps":5}),s(F,{"title-text":"","supporting-text":"","current-step":5,"total-steps":5})]),_("div",go,[_o,s(F,{"title-text":"","supporting-text":"","current-step":1,"total-steps":4}),s(F,{"title-text":"","supporting-text":"","current-step":2,"total-steps":4}),s(F,{"title-text":"","supporting-text":"","current-step":3,"total-steps":4}),s(F,{"title-text":"","supporting-text":"","current-step":4,"total-steps":4})]),_("div",ho,[xo,s(F,{"title-text":"","supporting-text":"","current-step":1,"total-steps":3}),s(F,{"title-text":"","supporting-text":"","current-step":2,"total-steps":3}),s(F,{"title-text":"","supporting-text":"","current-step":3,"total-steps":3})])]),_:1}),s(r,{title:"Progress Indicator",description:"Different orientation"},{default:O(()=>[_("div",yo,[Vo,s(R,{orientation:"horizontal","title-text":"Title","supporting-text":"Supporting text",status:"default"}),s(R,{orientation:"horizontal","title-text":"Title","supporting-text":"Supporting text",status:"active"}),s(R,{orientation:"horizontal","title-text":"Title","supporting-text":"Supporting text",status:"completed"}),s(R,{orientation:"horizontal","title-text":"Title","supporting-text":"Supporting text",status:"error"}),s(R,{orientation:"horizontal","title-text":"Title","supporting-text":"Supporting text",status:"disabled"})]),_("div",wo,[ko,s(R,{orientation:"vertical","title-text":"Title","supporting-text":"Supporting text",status:"default"}),s(R,{orientation:"vertical","title-text":"Title","supporting-text":"Supporting text",status:"active"}),s(R,{orientation:"vertical","title-text":"Title","supporting-text":"Supporting text",status:"completed"}),s(R,{orientation:"vertical","title-text":"Title","supporting-text":"Supporting text",status:"error"}),s(R,{orientation:"vertical","title-text":"Title","supporting-text":"Supporting text",status:"disabled"})])]),_:1}),s(r,{title:"Progress Indicator Group",description:"Stepper arrangement can be in horizontal or vertical depends on varies situation."},{default:O(()=>[_("div",Bo,[s(We,{orientation:"horizontal",steps:o})]),_("div",Co,[s(We,{orientation:"vertical",steps:o})])]),_:1}),s(r,{title:"Basic Usage",description:""},{default:O(()=>[s(We,{orientation:"horizontal",steps:o},{step1:O(()=>[So,s(J,{modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=i=>t.value=i),required:"",label:"Field 1"},null,8,["modelValue"]),s(ne,{modelValue:t.value,"onUpdate:modelValue":e[1]||(e[1]=i=>t.value=i),label:"textarea",disabled:!1},null,8,["modelValue"])]),step2:O(()=>[No,s(J,{modelValue:t.value,"onUpdate:modelValue":e[2]||(e[2]=i=>t.value=i),label:"Field 1"},null,8,["modelValue"])]),step3:O(()=>[Fo,s(ne,{modelValue:t.value,"onUpdate:modelValue":e[3]||(e[3]=i=>t.value=i),label:"textarea",disabled:!1},null,8,["modelValue"])]),step4:O(()=>[To,s(ne,{modelValue:t.value,"onUpdate:modelValue":e[4]||(e[4]=i=>t.value=i),label:"textarea",disabled:!1},null,8,["modelValue"]),s(J,{modelValue:t.value,"onUpdate:modelValue":e[5]||(e[5]=i=>t.value=i),label:"Field 1"},null,8,["modelValue"])]),card:O(()=>[Eo,Uo,Do]),_:1})]),_:1})]))}}),{defineComponent:zo}=await n("vue"),{unref:D,createVNode:S,createElementVNode:De,withCtx:Le,openBlock:Ao,createElementBlock:Mo}=await n("vue"),Ro={class:"flex flex-col gap-24"},Po={class:"gap-24 grid grid-cols-3"},$o={class:"gap-24 grid grid-cols-3"},Io={class:"gap-24 grid grid-cols-3"},Wo=zo({__name:"Snackbar",setup(a){function t(l){confirm(`Snackbar action pressed!
|
|
10
|
+
${l}.`)}function o(l){confirm(`Snackbar dismissed!
|
|
11
|
+
${l}.`)}return(l,e)=>(Ao(),Mo("div",Ro,[S(r,{title:"Snackbar",description:"Basic usage"},{default:Le(()=>[De("div",Po,[S(L,{title:"Info",description:D(d)(),variant:"info"},null,8,["description"]),S(L,{title:"success",description:D(d)(),variant:"success"},null,8,["description"]),S(L,{title:"warning",description:D(d)(),variant:"warning"},null,8,["description"]),S(L,{title:"error",description:D(d)(),variant:"error"},null,8,["description"]),S(L,{title:"neutral ",description:D(d)(),variant:"neutral"},null,8,["description"])])]),_:1}),S(r,{title:"Advance snackbar",description:"Snackbar with action"},{default:Le(()=>[De("div",$o,[S(L,{title:"Info",description:D(d)(),dismissable:"",variant:"info",action:"press me",onOnAction:e[0]||(e[0]=()=>t("info")),onOnDismiss:e[1]||(e[1]=()=>o("info"))},null,8,["description"]),S(L,{title:"success",description:D(d)(),dismissable:"",variant:"success",action:"press me",onOnAction:e[2]||(e[2]=()=>t("success")),onOnDismiss:e[3]||(e[3]=()=>o("success"))},null,8,["description"]),S(L,{title:"warning",description:D(d)(),dismissable:"",variant:"warning",action:"press me",onOnAction:e[4]||(e[4]=()=>t("warning")),onOnDismiss:e[5]||(e[5]=()=>o("warning"))},null,8,["description"]),S(L,{title:"error",description:D(d)(),dismissable:"",variant:"error",action:"press me",onOnAction:e[6]||(e[6]=()=>t("error")),onOnDismiss:e[7]||(e[7]=()=>o("error"))},null,8,["description"]),S(L,{title:"neutral",description:D(d)(),dismissable:"",variant:"neutral",action:"press me",onOnAction:e[8]||(e[8]=()=>t("neutral")),onOnDismiss:e[9]||(e[9]=()=>o("neutral"))},null,8,["description"])])]),_:1}),S(r,{title:"Custom snackbar",description:"Snackbar with custom color"},{default:Le(()=>[De("div",Io,[S(L,{title:"Custom snackbar",color:"secondary-blue-pea","bg-color":"secondary-citrus",description:D(d)()},null,8,["description"])])]),_:1})]))}}),{defineComponent:jo}=await n("vue"),{createVNode:Go,toDisplayString:qo,createElementVNode:Oe,withCtx:Ho,openBlock:Jo,createBlock:Ko}=await n("vue"),Qo={style:{width:"fit-content"}},Xo={class:"flex flex-col gap-16 items-center justify-center"},Yo={class:"fm-typo-body-xl-700"},{ref:Zo}=await n("vue"),ei=jo({__name:"TimePicker",setup(a){const t=Zo(null);return(o,l)=>(Jo(),Ko(r,{title:"Time picker"},{default:Ho(()=>[Oe("div",Qo,[Oe("div",Xo,[Go(Fn,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value=e)},null,8,["modelValue"]),Oe("div",Yo,qo(t.value),1)])])]),_:1}))}}),{defineComponent:ti}=await n("vue"),{createTextVNode:I,withCtx:z,createVNode:A,createElementVNode:pt,openBlock:li,createElementBlock:ai}=await n("vue"),oi={class:"flex flex-col gap-24"},ii={class:"gap-24 grid grid-cols-4"},ni={class:"gap-24 grid grid-cols-4"},ri=ti({__name:"Tooltip",setup(a){return(t,o)=>(li(),ai("div",oi,[A(r,{title:"Tooltip",description:"Basic usage"},{default:z(()=>[pt("div",ii,[A(W,{"has-arrow":!0,variant:"plain",beak:"top","content-text":"Top tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Top tooltip ")]),_:1},8,["action-buttons"]),A(W,{"has-arrow":!0,variant:"plain",beak:"right","content-text":"Right tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Right tooltip ")]),_:1},8,["action-buttons"]),A(W,{"has-arrow":!0,variant:"plain",beak:"bottom","content-text":"Bottom tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Bottom tooltip ")]),_:1},8,["action-buttons"]),A(W,{"has-arrow":!0,variant:"plain",beak:"left","content-text":"Left tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Left tooltip ")]),_:1},8,["action-buttons"])])]),_:1}),A(r,{title:"Tooltip",description:"Tooltip with actions"},{default:z(()=>[pt("div",ni,[A(W,{"has-arrow":!0,variant:"rich",beak:"top","content-text":"Top tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Top tooltip ")]),_:1},8,["action-buttons"]),A(W,{"has-arrow":!0,variant:"rich",beak:"right","content-text":"Right tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Right tooltip ")]),_:1},8,["action-buttons"]),A(W,{"has-arrow":!0,variant:"rich",beak:"bottom","content-text":"Bottom tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Bottom tooltip ")]),_:1},8,["action-buttons"]),A(W,{"has-arrow":!0,variant:"rich",beak:"left","content-text":"Left tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:z(()=>[I(" Left tooltip ")]),_:1},8,["action-buttons"])])]),_:1})]))}}),{defineComponent:si}=await n("vue"),{createVNode:j,createElementVNode:fe,withCtx:ge,openBlock:ui,createBlock:di}=await n("vue"),ci=fe("div",null,"Header",-1),pi={class:"bg-fm-color-opacity-md overflow-auto w-[500px]"},mi=fe("div",{class:"h-[300px] w-min"}," this is spacer ",-1),vi=fe("div",{class:"h-[300px] w-min"}," this is spacer ",-1),{ref:mt}=await n("vue"),bi=si({__name:"Dialog",setup(a){const t=mt(!1),o=mt("");return(l,e)=>(ui(),di(r,{title:"Icon",description:"Basic icon styling"},{default:ge(()=>[j(p,{label:"Open",onClick:e[0]||(e[0]=i=>t.value=!0)}),j(Un,{modelValue:t.value,"onUpdate:modelValue":e[3]||(e[3]=i=>t.value=i),overlay:!0},{"dialog-header":ge(()=>[ci]),"dialog-content":ge(()=>[fe("div",pi,[mi,j(Pe,{modelValue:o.value,"onUpdate:modelValue":e[1]||(e[1]=i=>o.value=i),label:"Select",items:[{label:"Object",value:{first:"something"}},{label:"Array",value:["array","1"]},{label:"Number",value:3},{label:"String",value:"4"},{label:"1",value:"4"},{label:"2",value:"5"}]},null,8,["modelValue"]),vi])]),"dialog-footer":ge(()=>[j(p,{class:"sm:w-full xs:w-full",variant:"tertiary",label:"Label",size:"md"}),j(Ln,{class:"sm:hidden xs:hidden"}),j(p,{class:"sm:w-full xs:w-full",variant:"secondary",label:"Label",size:"md"}),j(p,{class:"sm:w-full xs:w-full",variant:"primary",label:"Close",size:"md",onClick:e[2]||(e[2]=i=>t.value=!1)})]),_:1},8,["modelValue"])]),_:1}))}}),{defineComponent:fi}=await n("vue"),{toDisplayString:gi,createElementVNode:_e,createTextVNode:_i,createVNode:E,withCtx:ze,openBlock:hi,createElementBlock:xi}=await n("vue"),yi={class:"bg-fm-color-neutral-gray-100 min-h-[40px] p-8 whitespace-pre"},Vi={class:"flex gap-8 items-center"},{ref:wi}=await n("vue"),ki=fi({__name:"Form",setup(a){const t=wi({textField:"",radioGroup:null,stepper:null,textarea:""});return(o,l)=>(hi(),xi("div",null,[E(r,{title:"Form",description:"Basic usage"},{default:ze(()=>[_e("div",null,[_i(" Value: "),_e("div",yi,[_e("code",null,gi(JSON.stringify(t.value,null,4)),1)])]),E(zn,{class:"flex flex-col gap-16"},{default:ze(()=>[E(J,{modelValue:t.value.textField,"onUpdate:modelValue":l[0]||(l[0]=e=>t.value.textField=e),label:"Text Field",rules:[e=>!!e.includes("t")||"Must have a 't'"]},null,8,["modelValue","rules"]),E(Re,{modelValue:t.value.radioGroup,"onUpdate:modelValue":l[1]||(l[1]=e=>t.value.radioGroup=e),disabled:!1},{default:ze(()=>[E(C,{value:"bluetooth",label:"Bluetooth"}),E(C,{value:"wifi",label:"WiFi"}),E(C,{value:"nfc",label:"NFC"}),E(C,{value:"hotspot",label:"Hotspot"})]),_:1},8,["modelValue"]),E($e,{modelValue:t.value.stepper,"onUpdate:modelValue":l[2]||(l[2]=e=>t.value.stepper=e),label:"Number",placeholder:"Placeholder",step:30,min:0,max:999,"helper-text":"Helper",rules:[e=>e<=100||"More than 100",e=>e<=50||"More than 50",e=>!!e||"This field is required"],"prepend-text":"RM","append-text":"%"},null,8,["modelValue","rules"]),E(ne,{modelValue:t.value.textarea,"onUpdate:modelValue":l[3]||(l[3]=e=>t.value.textarea=e),label:"Textarea",rules:[e=>!!e.includes("t")||"Must have a 't'"]},null,8,["modelValue","rules"]),_e("div",Vi,[E(p,{type:"submit",label:"Submit"}),E(p,{type:"reset",label:"Reset"})])]),_:1})]),_:1})]))}}),{defineComponent:Bi}=await n("vue"),{createVNode:M,withCtx:ae,openBlock:Ci,createElementBlock:Si}=await n("vue"),Ni={class:"flex flex-col gap-24"},{ref:oe}=await n("vue"),Fi=Bi({__name:"ButtonGroup",setup(a){const t=[{label:"Grid"},{label:"List"},{label:"Thumbnails"}],o=[{icon:"grid_view"},{icon:"view_list"},{icon:"gallery_thumbnail"}],l=[{label:"Grid",icon:"grid_view"},{label:"List",icon:"view_list"},{label:"Thumbnails",icon:"gallery_thumbnail"}],e=[{label:"Grid",icon:"grid_view"},{label:"List (Disabled)",icon:"view_list",disabled:!0},{label:"Thumbnails",icon:"gallery_thumbnail"}],i=oe(t[0]),B=oe(o[0]),u=oe(l[0]),c=oe(null),h=oe(null);return(N,w)=>(Ci(),Si("div",Ni,[M(r,{title:"Button Group (Label)",description:"Label only"},{default:ae(()=>[M(se,{modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=x=>i.value=x),items:t},null,8,["modelValue"])]),_:1}),M(r,{title:"Button Group (Icon)",description:"Icon only"},{default:ae(()=>[M(se,{modelValue:B.value,"onUpdate:modelValue":w[1]||(w[1]=x=>B.value=x),items:o},null,8,["modelValue"])]),_:1}),M(r,{title:"Button Group (Both)",description:"Both"},{default:ae(()=>[M(se,{modelValue:u.value,"onUpdate:modelValue":w[2]||(w[2]=x=>u.value=x),items:l},null,8,["modelValue"])]),_:1}),M(r,{title:"Button Group (Disabled)",description:"Disabled state for the whole group"},{default:ae(()=>[M(se,{modelValue:c.value,"onUpdate:modelValue":w[3]||(w[3]=x=>c.value=x),items:l,disabled:""},null,8,["modelValue"])]),_:1}),M(r,{title:"Button Group (Individually Disabled)",description:"Disabled state for the an individual button"},{default:ae(()=>[M(se,{modelValue:h.value,"onUpdate:modelValue":w[4]||(w[4]=x=>h.value=x),items:e},null,8,["modelValue"])]),_:1})]))}}),{defineComponent:Ti}=await n("vue"),{renderList:vt,Fragment:bt,openBlock:ie,createElementBlock:he,toDisplayString:ft,createElementVNode:xe,normalizeClass:Ei,resolveDynamicComponent:Ui,createBlock:Di}=await n("vue"),Li={class:"divide-x flex h-screen",style:{"background-color":"#f7f7f7"}},Oi={class:"h-full overflow-y-auto px-24",style:{"min-width":"200px"}},zi={class:"fm-typo-body-lg-700 mb-8 text-fm-color-typo-tertiary"},Ai=["onClick"],Mi={class:"grow h-full overflow-y-auto p-16"},{ref:Ri,computed:Pi,onMounted:$i}=await n("vue"),Ii=Ti({__name:"App",setup(a){const t=[{title:"Application",children:{FmButton:{label:"Button",component:tl},FmButtonGroup:{label:"Button Group",component:Fi},FmCard:{label:"Card",component:Vl},FmIcon:{label:"Icon",component:Ia},FmSnackbar:{label:"Snackbar",component:Wo},FmList:{label:"List & list item",component:eo},FmProgressIndicator:{label:"Progress indicator",component:Oo},FmBreadcrumb:{label:"Breadcrumb",component:$t},FmDialog:{label:"Dialog",component:bi}}},{title:"Form",children:{FmForm:{label:"Form",component:ki},FmFormField:{label:"Form field",component:ea},FmTextField:{label:"Input",component:La},FmStepper:{label:"Stepper",component:xa},FmSwitch:{label:"Switch",component:Ta},FmRadio:{label:"Radio",component:na},FmCheckbox:{label:"Checkbox",component:Hl},FmSelect:{label:"Select",component:ca},FmDatePicker:{label:"Date picker",component:El},FmDateRangePicker:{label:"Date range picker",component:Pl},FmTimePicker:{label:"Time picker",component:ei}}},{title:"Chart",children:{FmLineChart:{label:"Line chart",component:qt}}},{title:"Utility",children:{FmMenu:{label:"Menu",component:uo},FmTooltip:{label:"Tooltip",component:ri}}}],o=Ri("FmButton");function l(i){window.location.hash=i,o.value=i}const e=Pi(()=>t.reduce((i,B)=>({...i,...B.children}),{})[o.value].component);return $i(()=>{const[,i]=window.location.hash.split("/");i&&l(i)}),(i,B)=>(ie(),he("div",Li,[xe("div",Oi,[(ie(),he(bt,null,vt(t,(u,c)=>xe("div",{key:c,class:"mt-24"},[xe("div",zi,ft(u.title),1),(ie(!0),he(bt,null,vt(u.children,(h,N)=>(ie(),he("div",{key:N,class:Ei([o.value===N?"cursor-not-allowed fm-typo-body-lg-700 text-fm-color-primary":"cursor-pointer","py-4"]),onClick:()=>l(N)},ft(h.label),11,Ai))),128))])),64))]),xe("div",Mi,[(ie(),Di(Ui(e.value)))])]))}}),{createApp:Wi}=await n("vue"),Ae=Wi(Ii);Ae.use(xt),Ae.use(Tt,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),Ae.mount("#app")});
|