@opens/ui 1.0.3 → 1.0.5
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.
|
@@ -1,26 +1,32 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
1
2
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
3
|
label: {
|
|
3
|
-
type:
|
|
4
|
-
|
|
4
|
+
type: __PropType<string>;
|
|
5
|
+
required: false;
|
|
5
6
|
};
|
|
6
7
|
icon: {
|
|
7
|
-
type:
|
|
8
|
-
|
|
8
|
+
type: __PropType<string>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
isOpen: {
|
|
12
|
+
type: __PropType<boolean>;
|
|
13
|
+
required: false;
|
|
9
14
|
};
|
|
10
15
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select-all" | "deselect-all")[], "select-all" | "deselect-all", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
16
|
label: {
|
|
12
|
-
type:
|
|
13
|
-
|
|
17
|
+
type: __PropType<string>;
|
|
18
|
+
required: false;
|
|
14
19
|
};
|
|
15
20
|
icon: {
|
|
16
|
-
type:
|
|
17
|
-
|
|
21
|
+
type: __PropType<string>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
isOpen: {
|
|
25
|
+
type: __PropType<boolean>;
|
|
26
|
+
required: false;
|
|
18
27
|
};
|
|
19
28
|
}>> & {
|
|
20
29
|
"onSelect-all"?: (...args: any[]) => any;
|
|
21
30
|
"onDeselect-all"?: (...args: any[]) => any;
|
|
22
|
-
}, {
|
|
23
|
-
label: string;
|
|
24
|
-
icon: string;
|
|
25
|
-
}>;
|
|
31
|
+
}, {}>;
|
|
26
32
|
export default _sfc_main;
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
1
2
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
3
|
label: {
|
|
3
|
-
type:
|
|
4
|
-
|
|
4
|
+
type: __PropType<string>;
|
|
5
|
+
required: false;
|
|
5
6
|
};
|
|
6
7
|
icon: {
|
|
7
|
-
type:
|
|
8
|
-
|
|
8
|
+
type: __PropType<string>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
isOpen: {
|
|
12
|
+
type: __PropType<boolean>;
|
|
13
|
+
required: false;
|
|
9
14
|
};
|
|
10
15
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
16
|
label: {
|
|
12
|
-
type:
|
|
13
|
-
|
|
17
|
+
type: __PropType<string>;
|
|
18
|
+
required: false;
|
|
14
19
|
};
|
|
15
20
|
icon: {
|
|
16
|
-
type:
|
|
17
|
-
|
|
21
|
+
type: __PropType<string>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
isOpen: {
|
|
25
|
+
type: __PropType<boolean>;
|
|
26
|
+
required: false;
|
|
18
27
|
};
|
|
19
|
-
}>>, {
|
|
20
|
-
label: string;
|
|
21
|
-
icon: string;
|
|
22
|
-
}>;
|
|
28
|
+
}>>, {}>;
|
|
23
29
|
export default _sfc_main;
|
package/dist/yunique_ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k={class:"simple-input"},B={class:"yu-flex yu-h-full yu-pl-2"},V={class:"material-icons yu-text-gray-700 yu-my-auto"},E=["placeholder","type","maxlength"],m=e.defineComponent({__name:"icon-text-input",props:{value:null,label:null,icon:null,placeholder:null,type:null,tooltip:null,caract:null,invalid:{type:Boolean}},emits:["blur","focus","input"],setup(t,{emit:l}){const o=t;e.ref(!1);const u=e.ref(o.value);e.ref(!1);const a=e.ref(o.type),r=e.ref(!1);e.watch(r,s=>{if(!s){l("blur");return}l("focus")});function y(){return!(r.value||u.value)}function c(s){l("input",s.target.value)}return(s,n)=>(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",B,[e.createElementVNode("i",V,e.toDisplayString(t.icon),1),e.createElementVNode("p",{class:e.normalizeClass(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition",{"yu-translate-y-2 yu-text-sm":y(),"yu-translate-y-0 yu-text-xs":!y()}])},e.toDisplayString(t.label),3)]),e.withDirectives(e.createElementVNode("input",{class:"yu-pl-8 yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800",placeholder:t.placeholder,onInput:c,onFocus:n[0]||(n[0]=i=>r.value=!0),onBlur:n[1]||(n[1]=i=>r.value=!1),"onUpdate:modelValue":n[2]||(n[2]=i=>u.value=i),type:a.value||t.type,onKeyup:n[3]||(n[3]=e.withKeys(i=>s.$emit("keyup-enter"),["enter"])),maxlength:t.caract},null,40,E),[[e.vModelDynamic,u.value]])]))}}),S=["disabled"],d=e.defineComponent({__name:"text-input",props:{modelValue:null,label:null,invalid:{type:Boolean},disabled:{type:Boolean}},emits:["update:model-value","blur","press-enter"],setup(t,{emit:l}){const o=t,u=e.ref(o.modelValue),a=e.ref(!1);function r(){return!(a.value||u.value)}function y(s){l(s)}function c(s){const n=s.target;l("update:model-value",n.value)}return(s,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["simple-input",{"yu-border-red-500":t.invalid}])},[e.createElementVNode("p",{class:e.normalizeClass(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition",{"yu-translate-y-1/4 yu-text-sm":r(),"yu-translate-x-0 yu-text-xs":!r()}])},e.toDisplayString(t.label),3),e.withDirectives(e.createElementVNode("input",{class:"yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800 dark:yu-text-gray-200","onUpdate:modelValue":n[0]||(n[0]=i=>u.value=i),type:"text",disabled:t.disabled,onInput:c,onKeyup:n[1]||(n[1]=e.withKeys(i=>y("press-enter"),["enter"])),onFocus:n[2]||(n[2]=i=>a.value=!0),onBlur:n[3]||(n[3]=i=>a.value=!1)},null,40,S),[[e.vModelText,u.value]])],2))}}),N=["checked"],f=e.defineComponent({__name:"switch-checkbox",props:{modelValue:{type:Boolean},invalid:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","change","input"],setup(t,{emit:l}){const o=t,u=e.ref(o.modelValue);return e.ref(!1),e.watch(u,a=>{l("update:modelValue",a)}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"yu-relative yu-inline-block yu-w-10 yu-align-middle yu-select-none yu-transition yu-duration-200 yu-ease-in",onClick:r[0]||(r[0]=y=>u.value=!u.value)},[e.createElementVNode("input",{class:"yu-absolute yu-block yu-w-6 yu-h-6 yu-bg-white yu-border-4 yu-rounded-full yu-appearance-none yu-cursor-pointer toggle-checkbox checked:yu-right-0 checked:yu-border-primary-500",type:"checkbox",checked:u.value},null,8,N),e.createElementVNode("label",{class:e.normalizeClass(["yu-block yu-h-6 yu-overflow-hidden yu-bg-gray-300 yu-rounded-full yu-cursor-pointer yu-toggle-label",{"yu-bg-primary-500":u.value}]),for:"toggle"},null,2)]))}}),g=e.defineComponent({__name:"button-primary",props:{large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},warning:{type:Boolean,default:!1},alert:{type:Boolean,default:!1},success:{type:Boolean,default:!1}},setup(t){return(l,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-bg-primary yu-px-5 yu-p-2 yu-w-fit yu-text-base yu-text-white yu-rounded-md yu-transition-all yu-font-plus yu-font-bold yu-truncate hover:yu-brightness-90 active:yu-scale-95",{"!yu-px-7 !yu-p-4":t.large,"!yu-px-3 !yu-p-1":t.small,"!yu-bg-red-500":t.warning,"!yu-bg-yellow-400":t.alert,"!yu-bg-green-400":t.success}])},[e.renderSlot(l.$slots,"default")],2))}}),v=e.defineComponent({__name:"button-secondary",props:{large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},warning:{type:Boolean,default:!1},alert:{type:Boolean,default:!1},success:{type:Boolean,default:!1}},setup(t){return(l,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-text-primary yu-bg-primary yu-text-base yu-w-fit yu-px-5 yu-p-2 yu-rounded-md yu-transition-all yu-font-plus yu-font-bold yu-truncate !yu-bg-opacity-5 group hover:!yu-bg-opacity-10 active:yu-scale-95 active:!yu-bg-opacity-20",{"!yu-text-lg":t.large,"!yu-text-sm":t.small,"!yu-text-red-500 !yu-bg-red-500":t.warning,"!yu-text-yellow-400 !yu-bg-yellow-400":t.alert,"!yu-text-green-400 !yu-bg-green-400":t.success}])},[e.renderSlot(l.$slots,"default")],2))}}),C={class:"yu-transition yu-text-gray-900 yu-font-plus yu-text-sm yu-p-2 yu-font-semibold yu-rounded-md yu-cursor-pointer yu-flex yu-items-center active:yu-scale-95 hover:yu-bg-primary-500 hover:!yu-bg-opacity-10 hover:yu-text-primary-400"};function _(t,l){return e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,"default")])}const b=(t,l)=>{const o=t.__vccOpts||t;for(const[u,a]of l)o[u]=a;return o};var D={};const p=b(D,[["render",_]]),z={class:"yu-relative yu-w-full"},I={class:"yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2"},T={class:"yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-flex yu-flex-col yu-gap-1 yu-shadow-md yu-absolute yu-z-10"},x=e.defineComponent({__name:"simple-dropdown",props:{label:{type:String,default:"Dropdown"},icon:{type:String,default:null}},setup(t){const l=e.ref(!1);return(o,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",z,[e.createElementVNode("button",{class:e.normalizeClass(["yu-ml-auto yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95",{"!yu-bg-primary-500 !yu-bg-opacity-10":l.value}]),onClick:u[0]||(u[0]=a=>l.value=!l.value)},[e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit",{"yu-text-primary-500":l.value}])},e.toDisplayString(t.icon),3),[[e.vShow,t.icon]]),e.createElementVNode("div",I,e.toDisplayString(t.label),1),e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto",{"yu-text-primary-500 yu-rotate-180":l.value}])}," keyboard_arrow_down",2)],2),e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("div",{class:"yu-w-full yu-rounded-md yu-p-2",onClick:u[1]||(u[1]=a=>l.value=!1)},[e.renderSlot(o.$slots,"default")])],512),[[e.vShow,l.value]])])]))}}),M={class:"yu-w-fit yu-relative"},P={class:"yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2"},K={class:"yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-shadow-md yu-z-10 yu-absolute"},L={class:"yu-w-full yu-rounded-md yu-p-2 yu-flex yu-flex-col yu-gap-1"},U=e.createElementVNode("div",{class:"yu-text-gray-700 yu-text-xs"},"Selecionar todos",-1),h=e.defineComponent({__name:"select-dropdown",props:{label:{type:String,default:"Dropdown"},icon:{type:String,default:"input"}},emits:["select-all","deselect-all"],setup(t,{emit:l}){const o=e.ref(!1),u=e.ref(!1),a=()=>{if(u.value=!u.value,u.value){l("select-all");return}l("deselect-all")};return(r,y)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("button",{class:e.normalizeClass(["yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95",{"!yu-bg-primary-500 !yu-bg-opacity-10":o.value}]),onClick:y[0]||(y[0]=c=>o.value=!o.value)},[e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit",{"yu-text-primary-500":o.value}])},e.toDisplayString(t.icon),3),e.createElementVNode("div",P,e.toDisplayString(t.label),1),e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto",{"yu-text-primary-500 yu-rotate-180":o.value}])}," keyboard_arrow_down",2)],2),e.withDirectives(e.createElementVNode("div",K,[e.createElementVNode("div",L,[e.createVNode(d,{label:"Dropdown"}),e.createVNode(p,{onClick:y[2]||(y[2]=c=>a())},{default:e.withCtx(()=>[U,e.withDirectives(e.createElementVNode("input",{class:"yu-ml-auto yu-accent-primary-500 yu-border-2 yu-cursor-pointer",type:"checkbox","onUpdate:modelValue":y[1]||(y[1]=c=>u.value=c)},null,512),[[e.vModelCheckbox,u.value]])]),_:1}),e.renderSlot(r.$slots,"default")])],512),[[e.vShow,o.value]])]))}}),j={class:"yu-border yu-border-gray-100 yu-rounded-md yu-py-4 yu-px-3 yu-bg-white yu-flex yu-flex-col yu-justify-center yu-shadow-2xl yu-shadow-gray-100"},q={class:"yu-flex yu-gap-5 yu-px-2"},F={class:"yu-flex yu-flex-col"},O={class:"yu-font-plus yu-flex yu-text-xl yu-text-gray-800 yu-font-bold yu-items-center"},A={class:"yu-font-plus yu-text-xs yu-text-gray-400"},G={class:"yu-font-plus yu-text-gray-400 yu-font-medium yu-text-sm"},w=e.defineComponent({__name:"stat-card",props:{icon:{type:String,default:"assignment"},bad:{type:Boolean,default:!1},good:{type:Boolean,default:!1},comparison:{type:Number,default:0},total:{type:Number,default:100}},setup(t){return(l,o)=>(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",q,[e.createElementVNode("i",{class:e.normalizeClass(["yu-aspect-square material-icons yu-bg-yellow-100 yu-text-yellow-500 yu-h-14 yu-w-14 yu-place-items-center yu-rounded-full !yu-text-1xl !yu-grid",{"!yu-text-red-500 !yu-bg-red-100":t.bad,"!yu-text-green-500 !yu-bg-green-100":t.good}])},e.toDisplayString(t.icon),3),e.createElementVNode("div",F,[e.createElementVNode("div",O,[e.createTextVNode(e.toDisplayString(t.comparison),1),e.createElementVNode("span",A,"/"+e.toDisplayString(t.total),1)]),e.createElementVNode("p",G,[e.renderSlot(l.$slots,"default")])])])]))}}),H={class:"yu-border yu-border-gray-100 yu-rounded-md yu-py-5 yu-px-5 yu-bg-white yu-shadow-md yu-shadow-gray-100"},J={class:"yu-font-plus yu-text-gray-800 yu-font-semibold yu-text-lg"},Q={class:"yu-mt-2 yu-flex yu-flex-col"};function R(t,l){return e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",J,[e.renderSlot(t.$slots,"heading")]),e.createElementVNode("div",Q,[e.renderSlot(t.$slots,"list")])])}var W={};const $=b(W,[["render",R]]);const X={install:t=>{t.component("TextInput",d),t.component("IconTextInput",m),t.component("SwitchCheckbox",f),t.component("ButtonPrimary",g),t.component("ButtonSecondary",v),t.component("SimpleDropdown",x),t.component("SelectDropdown",h),t.component("SimpleDropdownItem",p),t.component("StatCard",w),t.component("ListCard",$)}};exports.ButtonPrimary=g;exports.ButtonSecondary=v;exports.IconTextInput=m;exports.ListCard=$;exports.SelectDropdown=h;exports.SimpleDropdown=x;exports.SimpleDropdownItem=p;exports.StatCard=w;exports.SwitchCheckbox=f;exports.TextInput=d;exports.default=X;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B={class:"simple-input"},V={class:"yu-flex yu-h-full yu-pl-2"},k={class:"material-icons yu-text-gray-700 yu-my-auto"},E=["placeholder","type","maxlength"],m=e.defineComponent({__name:"icon-text-input",props:{value:null,label:null,icon:null,placeholder:null,type:null,tooltip:null,caract:null,invalid:{type:Boolean}},emits:["blur","focus","input"],setup(t,{emit:u}){const o=t;e.ref(!1);const l=e.ref(o.value);e.ref(!1);const n=e.ref(o.type),r=e.ref(!1);e.watch(r,y=>{if(!y){u("blur");return}u("focus")});function s(){return!(r.value||l.value)}function i(y){u("input",y.target.value)}return(y,a)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",V,[e.createElementVNode("i",k,e.toDisplayString(t.icon),1),e.createElementVNode("p",{class:e.normalizeClass(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition",{"yu-translate-y-2 yu-text-sm":s(),"yu-translate-y-0 yu-text-xs":!s()}])},e.toDisplayString(t.label),3)]),e.withDirectives(e.createElementVNode("input",{class:"yu-pl-8 yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800",placeholder:t.placeholder,onInput:i,onFocus:a[0]||(a[0]=c=>r.value=!0),onBlur:a[1]||(a[1]=c=>r.value=!1),"onUpdate:modelValue":a[2]||(a[2]=c=>l.value=c),type:n.value||t.type,onKeyup:a[3]||(a[3]=e.withKeys(c=>y.$emit("keyup-enter"),["enter"])),maxlength:t.caract},null,40,E),[[e.vModelDynamic,l.value]])]))}}),S=["disabled"],d=e.defineComponent({__name:"text-input",props:{modelValue:null,label:null,invalid:{type:Boolean},disabled:{type:Boolean}},emits:["update:model-value","blur","press-enter"],setup(t,{emit:u}){const o=t,l=e.ref(o.modelValue),n=e.ref(!1);function r(){return!(n.value||l.value)}function s(y){u(y)}function i(y){const a=y.target;u("update:model-value",a.value)}return(y,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["simple-input",{"yu-border-red-500":t.invalid}])},[e.createElementVNode("p",{class:e.normalizeClass(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition",{"yu-translate-y-1/4 yu-text-sm":r(),"yu-translate-x-0 yu-text-xs":!r()}])},e.toDisplayString(t.label),3),e.withDirectives(e.createElementVNode("input",{class:"yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800 dark:yu-text-gray-200","onUpdate:modelValue":a[0]||(a[0]=c=>l.value=c),type:"text",disabled:t.disabled,onInput:i,onKeyup:a[1]||(a[1]=e.withKeys(c=>s("press-enter"),["enter"])),onFocus:a[2]||(a[2]=c=>n.value=!0),onBlur:a[3]||(a[3]=c=>n.value=!1)},null,40,S),[[e.vModelText,l.value]])],2))}}),N=["checked"],f=e.defineComponent({__name:"switch-checkbox",props:{modelValue:{type:Boolean},invalid:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","change","input"],setup(t,{emit:u}){const o=t,l=e.ref(o.modelValue);return e.ref(!1),e.watch(l,n=>{u("update:modelValue",n)}),(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:"yu-relative yu-inline-block yu-w-10 yu-align-middle yu-select-none yu-transition yu-duration-200 yu-ease-in",onClick:r[0]||(r[0]=s=>l.value=!l.value)},[e.createElementVNode("input",{class:"yu-absolute yu-block yu-w-6 yu-h-6 yu-bg-white yu-border-4 yu-rounded-full yu-appearance-none yu-cursor-pointer toggle-checkbox checked:yu-right-0 checked:yu-border-primary-500",type:"checkbox",checked:l.value},null,8,N),e.createElementVNode("label",{class:e.normalizeClass(["yu-block yu-h-6 yu-overflow-hidden yu-bg-gray-300 yu-rounded-full yu-cursor-pointer yu-toggle-label",{"yu-bg-primary-500":l.value}]),for:"toggle"},null,2)]))}}),g=e.defineComponent({__name:"button-primary",props:{large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},warning:{type:Boolean,default:!1},alert:{type:Boolean,default:!1},success:{type:Boolean,default:!1}},setup(t){return(u,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-bg-primary yu-px-5 yu-p-2 yu-w-fit yu-text-base yu-text-white yu-rounded-md yu-transition-all yu-font-plus yu-font-bold yu-truncate hover:yu-brightness-90 active:yu-scale-95",{"!yu-px-7 !yu-p-4":t.large,"!yu-px-3 !yu-p-1":t.small,"!yu-bg-red-500":t.warning,"!yu-bg-yellow-400":t.alert,"!yu-bg-green-400":t.success}])},[e.renderSlot(u.$slots,"default")],2))}}),v=e.defineComponent({__name:"button-secondary",props:{large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},warning:{type:Boolean,default:!1},alert:{type:Boolean,default:!1},success:{type:Boolean,default:!1}},setup(t){return(u,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-text-primary yu-bg-primary yu-text-base yu-w-fit yu-px-5 yu-p-2 yu-rounded-md yu-transition-all yu-font-plus yu-font-bold yu-truncate !yu-bg-opacity-5 group hover:!yu-bg-opacity-10 active:yu-scale-95 active:!yu-bg-opacity-20",{"!yu-text-lg":t.large,"!yu-text-sm":t.small,"!yu-text-red-500 !yu-bg-red-500":t.warning,"!yu-text-yellow-400 !yu-bg-yellow-400":t.alert,"!yu-text-green-400 !yu-bg-green-400":t.success}])},[e.renderSlot(u.$slots,"default")],2))}}),C={class:"yu-transition yu-text-gray-900 yu-font-plus yu-text-sm yu-p-2 yu-font-semibold yu-rounded-md yu-cursor-pointer yu-flex yu-items-center active:yu-scale-95 hover:yu-bg-primary-500 hover:!yu-bg-opacity-10 hover:yu-text-primary-400"};function _(t,u){return e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,"default")])}const b=(t,u)=>{const o=t.__vccOpts||t;for(const[l,n]of u)o[l]=n;return o};var D={};const p=b(D,[["render",_]]),z={class:"yu-relative yu-w-full"},I={class:"yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2"},T={class:"yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-flex yu-flex-col yu-gap-1 yu-shadow-md yu-absolute yu-z-10"},O={class:"yu-w-full yu-rounded-md yu-p-2"},x=e.defineComponent({__name:"simple-dropdown",props:{label:null,icon:null,isOpen:{type:Boolean}},setup(t){const u=t;e.watch(()=>u.isOpen,l=>{o.value=l,console.log(l)});const o=e.ref(!1);return(l,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",z,[e.createElementVNode("button",{class:e.normalizeClass(["yu-w-full yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95",{"!yu-bg-primary-500 !yu-bg-opacity-10":o.value}]),onClick:n[0]||(n[0]=r=>o.value=!o.value)},[e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit",{"yu-text-primary-500":o.value}])},e.toDisplayString(t.icon),3),[[e.vShow,t.icon]]),e.createElementVNode("div",I,e.toDisplayString(t.label),1),e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto",{"yu-text-primary-500 yu-rotate-180":o.value}])}," keyboard_arrow_down",2)],2),e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("div",O,[e.renderSlot(l.$slots,"default")])],512),[[e.vShow,o.value]])])]))}}),M={class:"yu-w-fit yu-relative"},P={class:"yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2"},K={class:"yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-shadow-md yu-z-10 yu-absolute"},L={class:"yu-w-full yu-rounded-md yu-p-2 yu-flex yu-flex-col yu-gap-1"},U=e.createElementVNode("div",{class:"yu-text-gray-700 yu-text-xs"},"Selecionar todos",-1),h=e.defineComponent({__name:"select-dropdown",props:{label:null,icon:null,isOpen:{type:Boolean}},emits:["select-all","deselect-all"],setup(t,{emit:u}){const o=t;e.watch(()=>o.isOpen,s=>{l.value=s,console.log(s)});const l=e.ref(!1),n=e.ref(!1),r=()=>{if(n.value=!n.value,n.value){u("select-all");return}u("deselect-all")};return(s,i)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("button",{class:e.normalizeClass(["yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95",{"!yu-bg-primary-500 !yu-bg-opacity-10":l.value}]),onClick:i[0]||(i[0]=y=>l.value=!l.value)},[e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit",{"yu-text-primary-500":l.value}])},e.toDisplayString(t.icon),3),e.createElementVNode("div",P,e.toDisplayString(t.label),1),e.createElementVNode("i",{class:e.normalizeClass(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto",{"yu-text-primary-500 yu-rotate-180":l.value}])}," keyboard_arrow_down",2)],2),e.withDirectives(e.createElementVNode("div",K,[e.createElementVNode("div",L,[e.createVNode(d,{label:"Dropdown"}),e.createVNode(p,{onClick:i[2]||(i[2]=y=>r())},{default:e.withCtx(()=>[U,e.withDirectives(e.createElementVNode("input",{class:"yu-ml-auto yu-accent-primary-500 yu-border-2 yu-cursor-pointer",type:"checkbox","onUpdate:modelValue":i[1]||(i[1]=y=>n.value=y)},null,512),[[e.vModelCheckbox,n.value]])]),_:1}),e.renderSlot(s.$slots,"default")])],512),[[e.vShow,l.value]])]))}}),j={class:"yu-border yu-border-gray-100 yu-rounded-md yu-py-4 yu-px-3 yu-bg-white yu-flex yu-flex-col yu-justify-center yu-shadow-2xl yu-shadow-gray-100"},q={class:"yu-flex yu-gap-5 yu-px-2"},F={class:"yu-flex yu-flex-col"},A={class:"yu-font-plus yu-flex yu-text-xl yu-text-gray-800 yu-font-bold yu-items-center"},G={class:"yu-font-plus yu-text-xs yu-text-gray-400"},H={class:"yu-font-plus yu-text-gray-400 yu-font-medium yu-text-sm"},w=e.defineComponent({__name:"stat-card",props:{icon:{type:String,default:"assignment"},bad:{type:Boolean,default:!1},good:{type:Boolean,default:!1},comparison:{type:Number,default:0},total:{type:Number,default:100}},setup(t){return(u,o)=>(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",q,[e.createElementVNode("i",{class:e.normalizeClass(["yu-aspect-square material-icons yu-bg-yellow-100 yu-text-yellow-500 yu-h-14 yu-w-14 yu-place-items-center yu-rounded-full !yu-text-1xl !yu-grid",{"!yu-text-red-500 !yu-bg-red-100":t.bad,"!yu-text-green-500 !yu-bg-green-100":t.good}])},e.toDisplayString(t.icon),3),e.createElementVNode("div",F,[e.createElementVNode("div",A,[e.createTextVNode(e.toDisplayString(t.comparison),1),e.createElementVNode("span",G,"/"+e.toDisplayString(t.total),1)]),e.createElementVNode("p",H,[e.renderSlot(u.$slots,"default")])])])]))}}),J={class:"yu-border yu-border-gray-100 yu-rounded-md yu-py-5 yu-px-5 yu-bg-white yu-shadow-md yu-shadow-gray-100"},Q={class:"yu-font-plus yu-text-gray-800 yu-font-semibold yu-text-lg"},R={class:"yu-mt-2 yu-flex yu-flex-col"};function W(t,u){return e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",Q,[e.renderSlot(t.$slots,"heading")]),e.createElementVNode("div",R,[e.renderSlot(t.$slots,"list")])])}var X={};const $=b(X,[["render",W]]);const Y={install:t=>{t.component("TextInput",d),t.component("IconTextInput",m),t.component("SwitchCheckbox",f),t.component("ButtonPrimary",g),t.component("ButtonSecondary",v),t.component("SimpleDropdown",x),t.component("SelectDropdown",h),t.component("SimpleDropdownItem",p),t.component("StatCard",w),t.component("ListCard",$)}};exports.ButtonPrimary=g;exports.ButtonSecondary=v;exports.IconTextInput=m;exports.ListCard=$;exports.SelectDropdown=h;exports.SimpleDropdown=x;exports.SimpleDropdownItem=p;exports.StatCard=w;exports.SwitchCheckbox=f;exports.TextInput=d;exports.default=Y;
|
package/dist/yunique_ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const N = { class: "simple-input" },
|
|
1
|
+
import { defineComponent as b, ref as i, watch as h, openBlock as f, createElementBlock as m, createElementVNode as t, toDisplayString as p, normalizeClass as r, withDirectives as x, withKeys as _, vModelDynamic as C, vModelText as V, renderSlot as v, vShow as w, createVNode as $, withCtx as I, vModelCheckbox as D, createTextVNode as T } from "vue";
|
|
2
|
+
const N = { class: "simple-input" }, O = { class: "yu-flex yu-h-full yu-pl-2" }, P = { class: "material-icons yu-text-gray-700 yu-my-auto" }, z = ["placeholder", "type", "maxlength"], E = /* @__PURE__ */ b({
|
|
3
3
|
__name: "icon-text-input",
|
|
4
4
|
props: {
|
|
5
5
|
value: null,
|
|
@@ -12,48 +12,48 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
|
|
|
12
12
|
invalid: { type: Boolean }
|
|
13
13
|
},
|
|
14
14
|
emits: ["blur", "focus", "input"],
|
|
15
|
-
setup(e, { emit:
|
|
15
|
+
setup(e, { emit: l }) {
|
|
16
16
|
const o = e;
|
|
17
17
|
i(!1);
|
|
18
|
-
const
|
|
18
|
+
const u = i(o.value);
|
|
19
19
|
i(!1);
|
|
20
20
|
const n = i(o.type), s = i(!1);
|
|
21
|
-
|
|
22
|
-
if (!
|
|
23
|
-
|
|
21
|
+
h(s, (y) => {
|
|
22
|
+
if (!y) {
|
|
23
|
+
l("blur");
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
l("focus");
|
|
27
27
|
});
|
|
28
|
-
function
|
|
29
|
-
return !(s.value ||
|
|
28
|
+
function c() {
|
|
29
|
+
return !(s.value || u.value);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
31
|
+
function d(y) {
|
|
32
|
+
l("input", y.target.value);
|
|
33
33
|
}
|
|
34
|
-
return (
|
|
35
|
-
t("div",
|
|
36
|
-
t("i",
|
|
34
|
+
return (y, a) => (f(), m("div", N, [
|
|
35
|
+
t("div", O, [
|
|
36
|
+
t("i", P, p(e.icon), 1),
|
|
37
37
|
t("p", {
|
|
38
|
-
class:
|
|
39
|
-
},
|
|
38
|
+
class: r(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition", { "yu-translate-y-2 yu-text-sm": c(), "yu-translate-y-0 yu-text-xs": !c() }])
|
|
39
|
+
}, p(e.label), 3)
|
|
40
40
|
]),
|
|
41
41
|
x(t("input", {
|
|
42
42
|
class: "yu-pl-8 yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800",
|
|
43
43
|
placeholder: e.placeholder,
|
|
44
|
-
onInput:
|
|
45
|
-
onFocus: a[0] || (a[0] = (
|
|
46
|
-
onBlur: a[1] || (a[1] = (
|
|
47
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
44
|
+
onInput: d,
|
|
45
|
+
onFocus: a[0] || (a[0] = (g) => s.value = !0),
|
|
46
|
+
onBlur: a[1] || (a[1] = (g) => s.value = !1),
|
|
47
|
+
"onUpdate:modelValue": a[2] || (a[2] = (g) => u.value = g),
|
|
48
48
|
type: n.value || e.type,
|
|
49
|
-
onKeyup: a[3] || (a[3] = _((
|
|
49
|
+
onKeyup: a[3] || (a[3] = _((g) => y.$emit("keyup-enter"), ["enter"])),
|
|
50
50
|
maxlength: e.caract
|
|
51
|
-
}, null, 40,
|
|
52
|
-
[C,
|
|
51
|
+
}, null, 40, z), [
|
|
52
|
+
[C, u.value]
|
|
53
53
|
])
|
|
54
54
|
]));
|
|
55
55
|
}
|
|
56
|
-
}),
|
|
56
|
+
}), K = ["disabled"], B = /* @__PURE__ */ b({
|
|
57
57
|
__name: "text-input",
|
|
58
58
|
props: {
|
|
59
59
|
modelValue: null,
|
|
@@ -62,39 +62,39 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
|
|
|
62
62
|
disabled: { type: Boolean }
|
|
63
63
|
},
|
|
64
64
|
emits: ["update:model-value", "blur", "press-enter"],
|
|
65
|
-
setup(e, { emit:
|
|
66
|
-
const
|
|
65
|
+
setup(e, { emit: l }) {
|
|
66
|
+
const u = i(e.modelValue), n = i(!1);
|
|
67
67
|
function s() {
|
|
68
|
-
return !(n.value ||
|
|
68
|
+
return !(n.value || u.value);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
70
|
+
function c(y) {
|
|
71
|
+
l(y);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const a =
|
|
75
|
-
|
|
73
|
+
function d(y) {
|
|
74
|
+
const a = y.target;
|
|
75
|
+
l("update:model-value", a.value);
|
|
76
76
|
}
|
|
77
|
-
return (
|
|
78
|
-
class:
|
|
77
|
+
return (y, a) => (f(), m("div", {
|
|
78
|
+
class: r(["simple-input", { "yu-border-red-500": e.invalid }])
|
|
79
79
|
}, [
|
|
80
80
|
t("p", {
|
|
81
|
-
class:
|
|
82
|
-
},
|
|
81
|
+
class: r(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition", { "yu-translate-y-1/4 yu-text-sm": s(), "yu-translate-x-0 yu-text-xs": !s() }])
|
|
82
|
+
}, p(e.label), 3),
|
|
83
83
|
x(t("input", {
|
|
84
84
|
class: "yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800 dark:yu-text-gray-200",
|
|
85
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
85
|
+
"onUpdate:modelValue": a[0] || (a[0] = (g) => u.value = g),
|
|
86
86
|
type: "text",
|
|
87
87
|
disabled: e.disabled,
|
|
88
|
-
onInput:
|
|
89
|
-
onKeyup: a[1] || (a[1] = _((
|
|
90
|
-
onFocus: a[2] || (a[2] = (
|
|
91
|
-
onBlur: a[3] || (a[3] = (
|
|
92
|
-
}, null, 40,
|
|
93
|
-
[V,
|
|
88
|
+
onInput: d,
|
|
89
|
+
onKeyup: a[1] || (a[1] = _((g) => c("press-enter"), ["enter"])),
|
|
90
|
+
onFocus: a[2] || (a[2] = (g) => n.value = !0),
|
|
91
|
+
onBlur: a[3] || (a[3] = (g) => n.value = !1)
|
|
92
|
+
}, null, 40, K), [
|
|
93
|
+
[V, u.value]
|
|
94
94
|
])
|
|
95
95
|
], 2));
|
|
96
96
|
}
|
|
97
|
-
}),
|
|
97
|
+
}), M = ["checked"], U = /* @__PURE__ */ b({
|
|
98
98
|
__name: "switch-checkbox",
|
|
99
99
|
props: {
|
|
100
100
|
modelValue: { type: Boolean },
|
|
@@ -102,26 +102,26 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
|
|
|
102
102
|
disabled: { type: Boolean }
|
|
103
103
|
},
|
|
104
104
|
emits: ["update:modelValue", "change", "input"],
|
|
105
|
-
setup(e, { emit:
|
|
106
|
-
const
|
|
107
|
-
return i(!1),
|
|
108
|
-
|
|
109
|
-
}), (n, s) => (
|
|
105
|
+
setup(e, { emit: l }) {
|
|
106
|
+
const u = i(e.modelValue);
|
|
107
|
+
return i(!1), h(u, (n) => {
|
|
108
|
+
l("update:modelValue", n);
|
|
109
|
+
}), (n, s) => (f(), m("div", {
|
|
110
110
|
class: "yu-relative yu-inline-block yu-w-10 yu-align-middle yu-select-none yu-transition yu-duration-200 yu-ease-in",
|
|
111
|
-
onClick: s[0] || (s[0] = (
|
|
111
|
+
onClick: s[0] || (s[0] = (c) => u.value = !u.value)
|
|
112
112
|
}, [
|
|
113
113
|
t("input", {
|
|
114
114
|
class: "yu-absolute yu-block yu-w-6 yu-h-6 yu-bg-white yu-border-4 yu-rounded-full yu-appearance-none yu-cursor-pointer toggle-checkbox checked:yu-right-0 checked:yu-border-primary-500",
|
|
115
115
|
type: "checkbox",
|
|
116
|
-
checked:
|
|
117
|
-
}, null, 8,
|
|
116
|
+
checked: u.value
|
|
117
|
+
}, null, 8, M),
|
|
118
118
|
t("label", {
|
|
119
|
-
class:
|
|
119
|
+
class: r(["yu-block yu-h-6 yu-overflow-hidden yu-bg-gray-300 yu-rounded-full yu-cursor-pointer yu-toggle-label", { "yu-bg-primary-500": u.value }]),
|
|
120
120
|
for: "toggle"
|
|
121
121
|
}, null, 2)
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), F = /* @__PURE__ */ b({
|
|
125
125
|
__name: "button-primary",
|
|
126
126
|
props: {
|
|
127
127
|
large: {
|
|
@@ -146,13 +146,13 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
setup(e) {
|
|
149
|
-
return (
|
|
150
|
-
class:
|
|
149
|
+
return (l, o) => (f(), m("button", {
|
|
150
|
+
class: r(["yu-bg-primary yu-px-5 yu-p-2 yu-w-fit yu-text-base yu-text-white yu-rounded-md yu-transition-all yu-font-plus yu-font-bold yu-truncate hover:yu-brightness-90 active:yu-scale-95", { "!yu-px-7 !yu-p-4": e.large, "!yu-px-3 !yu-p-1": e.small, "!yu-bg-red-500": e.warning, "!yu-bg-yellow-400": e.alert, "!yu-bg-green-400": e.success }])
|
|
151
151
|
}, [
|
|
152
|
-
|
|
152
|
+
v(l.$slots, "default")
|
|
153
153
|
], 2));
|
|
154
154
|
}
|
|
155
|
-
}),
|
|
155
|
+
}), L = /* @__PURE__ */ b({
|
|
156
156
|
__name: "button-secondary",
|
|
157
157
|
props: {
|
|
158
158
|
large: {
|
|
@@ -177,128 +177,123 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
|
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
setup(e) {
|
|
180
|
-
return (
|
|
181
|
-
class:
|
|
180
|
+
return (l, o) => (f(), m("button", {
|
|
181
|
+
class: r(["yu-text-primary yu-bg-primary yu-text-base yu-w-fit yu-px-5 yu-p-2 yu-rounded-md yu-transition-all yu-font-plus yu-font-bold yu-truncate !yu-bg-opacity-5 group hover:!yu-bg-opacity-10 active:yu-scale-95 active:!yu-bg-opacity-20", { "!yu-text-lg": e.large, "!yu-text-sm": e.small, "!yu-text-red-500 !yu-bg-red-500": e.warning, "!yu-text-yellow-400 !yu-bg-yellow-400": e.alert, "!yu-text-green-400 !yu-bg-green-400": e.success }])
|
|
182
182
|
}, [
|
|
183
|
-
|
|
183
|
+
v(l.$slots, "default")
|
|
184
184
|
], 2));
|
|
185
185
|
}
|
|
186
|
-
}),
|
|
187
|
-
function
|
|
188
|
-
return
|
|
189
|
-
|
|
186
|
+
}), j = { class: "yu-transition yu-text-gray-900 yu-font-plus yu-text-sm yu-p-2 yu-font-semibold yu-rounded-md yu-cursor-pointer yu-flex yu-items-center active:yu-scale-95 hover:yu-bg-primary-500 hover:!yu-bg-opacity-10 hover:yu-text-primary-400" };
|
|
187
|
+
function q(e, l) {
|
|
188
|
+
return f(), m("div", j, [
|
|
189
|
+
v(e.$slots, "default")
|
|
190
190
|
]);
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const k = (e, l) => {
|
|
193
193
|
const o = e.__vccOpts || e;
|
|
194
|
-
for (const [
|
|
195
|
-
o[
|
|
194
|
+
for (const [u, n] of l)
|
|
195
|
+
o[u] = n;
|
|
196
196
|
return o;
|
|
197
197
|
};
|
|
198
|
-
var
|
|
199
|
-
const S = /* @__PURE__ */
|
|
198
|
+
var A = {};
|
|
199
|
+
const S = /* @__PURE__ */ k(A, [["render", q]]), G = { class: "yu-relative yu-w-full" }, H = { class: "yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2" }, J = { class: "yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-flex yu-flex-col yu-gap-1 yu-shadow-md yu-absolute yu-z-10" }, Q = { class: "yu-w-full yu-rounded-md yu-p-2" }, R = /* @__PURE__ */ b({
|
|
200
200
|
__name: "simple-dropdown",
|
|
201
201
|
props: {
|
|
202
|
-
label:
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
},
|
|
206
|
-
icon: {
|
|
207
|
-
type: String,
|
|
208
|
-
default: null
|
|
209
|
-
}
|
|
202
|
+
label: null,
|
|
203
|
+
icon: null,
|
|
204
|
+
isOpen: { type: Boolean }
|
|
210
205
|
},
|
|
211
206
|
setup(e) {
|
|
212
|
-
const
|
|
213
|
-
|
|
207
|
+
const l = e;
|
|
208
|
+
h(() => l.isOpen, (u) => {
|
|
209
|
+
o.value = u, console.log(u);
|
|
210
|
+
});
|
|
211
|
+
const o = i(!1);
|
|
212
|
+
return (u, n) => (f(), m("div", null, [
|
|
214
213
|
t("div", G, [
|
|
215
214
|
t("button", {
|
|
216
|
-
class:
|
|
217
|
-
onClick:
|
|
215
|
+
class: r(["yu-w-full yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95", { "!yu-bg-primary-500 !yu-bg-opacity-10": o.value }]),
|
|
216
|
+
onClick: n[0] || (n[0] = (s) => o.value = !o.value)
|
|
218
217
|
}, [
|
|
219
218
|
x(t("i", {
|
|
220
|
-
class:
|
|
221
|
-
},
|
|
222
|
-
[
|
|
219
|
+
class: r(["material-icons yu-text-gray-700 yu-h-fit", { "yu-text-primary-500": o.value }])
|
|
220
|
+
}, p(e.icon), 3), [
|
|
221
|
+
[w, e.icon]
|
|
223
222
|
]),
|
|
224
|
-
t("div", H,
|
|
223
|
+
t("div", H, p(e.label), 1),
|
|
225
224
|
t("i", {
|
|
226
|
-
class:
|
|
225
|
+
class: r(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto", { "yu-text-primary-500 yu-rotate-180": o.value }])
|
|
227
226
|
}, " keyboard_arrow_down", 2)
|
|
228
227
|
], 2),
|
|
229
228
|
x(t("div", J, [
|
|
230
|
-
t("div",
|
|
231
|
-
|
|
232
|
-
onClick: l[1] || (l[1] = (n) => u.value = !1)
|
|
233
|
-
}, [
|
|
234
|
-
g(o.$slots, "default")
|
|
229
|
+
t("div", Q, [
|
|
230
|
+
v(u.$slots, "default")
|
|
235
231
|
])
|
|
236
232
|
], 512), [
|
|
237
|
-
[
|
|
233
|
+
[w, o.value]
|
|
238
234
|
])
|
|
239
235
|
])
|
|
240
236
|
]));
|
|
241
237
|
}
|
|
242
|
-
}),
|
|
238
|
+
}), W = { class: "yu-w-fit yu-relative" }, X = { class: "yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2" }, Y = { class: "yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-shadow-md yu-z-10 yu-absolute" }, Z = { class: "yu-w-full yu-rounded-md yu-p-2 yu-flex yu-flex-col yu-gap-1" }, ee = /* @__PURE__ */ t("div", { class: "yu-text-gray-700 yu-text-xs" }, "Selecionar todos", -1), te = /* @__PURE__ */ b({
|
|
243
239
|
__name: "select-dropdown",
|
|
244
240
|
props: {
|
|
245
|
-
label:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
},
|
|
249
|
-
icon: {
|
|
250
|
-
type: String,
|
|
251
|
-
default: "input"
|
|
252
|
-
}
|
|
241
|
+
label: null,
|
|
242
|
+
icon: null,
|
|
243
|
+
isOpen: { type: Boolean }
|
|
253
244
|
},
|
|
254
245
|
emits: ["select-all", "deselect-all"],
|
|
255
|
-
setup(e, { emit:
|
|
256
|
-
const o =
|
|
257
|
-
|
|
258
|
-
|
|
246
|
+
setup(e, { emit: l }) {
|
|
247
|
+
const o = e;
|
|
248
|
+
h(() => o.isOpen, (c) => {
|
|
249
|
+
u.value = c, console.log(c);
|
|
250
|
+
});
|
|
251
|
+
const u = i(!1), n = i(!1), s = () => {
|
|
252
|
+
if (n.value = !n.value, n.value) {
|
|
253
|
+
l("select-all");
|
|
259
254
|
return;
|
|
260
255
|
}
|
|
261
|
-
|
|
256
|
+
l("deselect-all");
|
|
262
257
|
};
|
|
263
|
-
return (
|
|
258
|
+
return (c, d) => (f(), m("div", W, [
|
|
264
259
|
t("button", {
|
|
265
|
-
class:
|
|
266
|
-
onClick:
|
|
260
|
+
class: r(["yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95", { "!yu-bg-primary-500 !yu-bg-opacity-10": u.value }]),
|
|
261
|
+
onClick: d[0] || (d[0] = (y) => u.value = !u.value)
|
|
267
262
|
}, [
|
|
268
263
|
t("i", {
|
|
269
|
-
class:
|
|
270
|
-
},
|
|
271
|
-
t("div",
|
|
264
|
+
class: r(["material-icons yu-text-gray-700 yu-h-fit", { "yu-text-primary-500": u.value }])
|
|
265
|
+
}, p(e.icon), 3),
|
|
266
|
+
t("div", X, p(e.label), 1),
|
|
272
267
|
t("i", {
|
|
273
|
-
class:
|
|
268
|
+
class: r(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto", { "yu-text-primary-500 yu-rotate-180": u.value }])
|
|
274
269
|
}, " keyboard_arrow_down", 2)
|
|
275
270
|
], 2),
|
|
276
|
-
x(t("div",
|
|
277
|
-
t("div",
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
onClick:
|
|
271
|
+
x(t("div", Y, [
|
|
272
|
+
t("div", Z, [
|
|
273
|
+
$(B, { label: "Dropdown" }),
|
|
274
|
+
$(S, {
|
|
275
|
+
onClick: d[2] || (d[2] = (y) => s())
|
|
281
276
|
}, {
|
|
282
|
-
default:
|
|
283
|
-
|
|
277
|
+
default: I(() => [
|
|
278
|
+
ee,
|
|
284
279
|
x(t("input", {
|
|
285
280
|
class: "yu-ml-auto yu-accent-primary-500 yu-border-2 yu-cursor-pointer",
|
|
286
281
|
type: "checkbox",
|
|
287
|
-
"onUpdate:modelValue":
|
|
282
|
+
"onUpdate:modelValue": d[1] || (d[1] = (y) => n.value = y)
|
|
288
283
|
}, null, 512), [
|
|
289
|
-
[
|
|
284
|
+
[D, n.value]
|
|
290
285
|
])
|
|
291
286
|
]),
|
|
292
287
|
_: 1
|
|
293
288
|
}),
|
|
294
|
-
|
|
289
|
+
v(c.$slots, "default")
|
|
295
290
|
])
|
|
296
291
|
], 512), [
|
|
297
|
-
[
|
|
292
|
+
[w, u.value]
|
|
298
293
|
])
|
|
299
294
|
]));
|
|
300
295
|
}
|
|
301
|
-
}),
|
|
296
|
+
}), ue = { class: "yu-border yu-border-gray-100 yu-rounded-md yu-py-4 yu-px-3 yu-bg-white yu-flex yu-flex-col yu-justify-center yu-shadow-2xl yu-shadow-gray-100" }, le = { class: "yu-flex yu-gap-5 yu-px-2" }, oe = { class: "yu-flex yu-flex-col" }, ne = { class: "yu-font-plus yu-flex yu-text-xl yu-text-gray-800 yu-font-bold yu-items-center" }, ae = { class: "yu-font-plus yu-text-xs yu-text-gray-400" }, ye = { class: "yu-font-plus yu-text-gray-400 yu-font-medium yu-text-sm" }, se = /* @__PURE__ */ b({
|
|
302
297
|
__name: "stat-card",
|
|
303
298
|
props: {
|
|
304
299
|
icon: {
|
|
@@ -323,51 +318,51 @@ const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-
|
|
|
323
318
|
}
|
|
324
319
|
},
|
|
325
320
|
setup(e) {
|
|
326
|
-
return (
|
|
327
|
-
t("div",
|
|
321
|
+
return (l, o) => (f(), m("div", ue, [
|
|
322
|
+
t("div", le, [
|
|
328
323
|
t("i", {
|
|
329
|
-
class:
|
|
330
|
-
},
|
|
331
|
-
t("div",
|
|
332
|
-
t("div",
|
|
333
|
-
T(
|
|
334
|
-
t("span", ae, "/" +
|
|
324
|
+
class: r(["yu-aspect-square material-icons yu-bg-yellow-100 yu-text-yellow-500 yu-h-14 yu-w-14 yu-place-items-center yu-rounded-full !yu-text-1xl !yu-grid", { "!yu-text-red-500 !yu-bg-red-100": e.bad, "!yu-text-green-500 !yu-bg-green-100": e.good }])
|
|
325
|
+
}, p(e.icon), 3),
|
|
326
|
+
t("div", oe, [
|
|
327
|
+
t("div", ne, [
|
|
328
|
+
T(p(e.comparison), 1),
|
|
329
|
+
t("span", ae, "/" + p(e.total), 1)
|
|
335
330
|
]),
|
|
336
|
-
t("p",
|
|
337
|
-
|
|
331
|
+
t("p", ye, [
|
|
332
|
+
v(l.$slots, "default")
|
|
338
333
|
])
|
|
339
334
|
])
|
|
340
335
|
])
|
|
341
336
|
]));
|
|
342
337
|
}
|
|
343
|
-
}),
|
|
344
|
-
function de(e,
|
|
345
|
-
return
|
|
346
|
-
t("div", re, [
|
|
347
|
-
g(e.$slots, "heading")
|
|
348
|
-
]),
|
|
338
|
+
}), re = { class: "yu-border yu-border-gray-100 yu-rounded-md yu-py-5 yu-px-5 yu-bg-white yu-shadow-md yu-shadow-gray-100" }, ie = { class: "yu-font-plus yu-text-gray-800 yu-font-semibold yu-text-lg" }, ce = { class: "yu-mt-2 yu-flex yu-flex-col" };
|
|
339
|
+
function de(e, l) {
|
|
340
|
+
return f(), m("div", re, [
|
|
349
341
|
t("div", ie, [
|
|
350
|
-
|
|
342
|
+
v(e.$slots, "heading")
|
|
343
|
+
]),
|
|
344
|
+
t("div", ce, [
|
|
345
|
+
v(e.$slots, "list")
|
|
351
346
|
])
|
|
352
347
|
]);
|
|
353
348
|
}
|
|
354
|
-
var
|
|
355
|
-
const
|
|
356
|
-
const
|
|
349
|
+
var pe = {};
|
|
350
|
+
const fe = /* @__PURE__ */ k(pe, [["render", de]]);
|
|
351
|
+
const ge = {
|
|
357
352
|
install: (e) => {
|
|
358
|
-
e.component("TextInput",
|
|
353
|
+
e.component("TextInput", B), e.component("IconTextInput", E), e.component("SwitchCheckbox", U), e.component("ButtonPrimary", F), e.component("ButtonSecondary", L), e.component("SimpleDropdown", R), e.component("SelectDropdown", te), e.component("SimpleDropdownItem", S), e.component("StatCard", se), e.component("ListCard", fe);
|
|
359
354
|
}
|
|
360
355
|
};
|
|
361
356
|
export {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
357
|
+
F as ButtonPrimary,
|
|
358
|
+
L as ButtonSecondary,
|
|
359
|
+
E as IconTextInput,
|
|
360
|
+
fe as ListCard,
|
|
361
|
+
te as SelectDropdown,
|
|
362
|
+
R as SimpleDropdown,
|
|
368
363
|
S as SimpleDropdownItem,
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
364
|
+
se as StatCard,
|
|
365
|
+
U as SwitchCheckbox,
|
|
366
|
+
B as TextInput,
|
|
367
|
+
ge as default
|
|
373
368
|
};
|