@munet/ui 1.0.0 → 1.0.2

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/__uno.css ADDED
@@ -0,0 +1 @@
1
+ *,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.pointer-events-none{pointer-events:none}.absolute{position:absolute}.absolute\!{position:absolute!important}.fixed{position:fixed}.relative{position:relative}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-18{bottom:4.5rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-4{left:1rem}.left-50\%{left:50%}.right-0{right:0}.right-1{right:.25rem}.top-0{top:0}.top-25\%{top:25%}.top-50\%{top:50%}.z-1{z-index:1}.z-1001{z-index:1001}.z-1002{z-index:1002}.z-2{z-index:2}.z-40{z-index:40}.z-50{z-index:50}.z-80{z-index:80}.grid{display:grid}.m-auto{margin:auto}.m-t-0\!{margin-top:0!important}.m-t-4{margin-top:1rem}.mr-2{margin-right:.5rem}.ms{margin-inline-start:1rem}.hidden{display:none}.h-0{height:0}.h-10{height:2.5rem}.h-12{height:3rem}.h-1em{height:1em}.h-2{height:.5rem}.h-3\.5em{height:3.5em}.h-3em{height:3em}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.max-w-90dvw{max-width:90dvw}.max-w-90vw{max-width:90vw}.min-h-12{min-height:3rem}.min-w-10{min-width:2.5rem}.min-w-48{min-width:12rem}.min-w-max{min-width:max-content}.w-0{width:0}.w-5{width:1.25rem}.w-50{width:12.5rem}.w-full{width:100%}.flex{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.translate--50\%{--un-translate-x:-50%;--un-translate-y:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y--100\%{--un-translate-y:-100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-100\%{--un-translate-y:100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.resize{resize:both}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-14{gap:3.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.of-hidden,.overflow-hidden{overflow:hidden}.of-x-auto{overflow-x:auto}.of-y-hidden{overflow-y:hidden}.ws-pre-wrap{white-space:pre-wrap}.border{border-width:1px}.border-\[var\(--link-color\)\]\!{border-color:var(--link-color)!important}.border-red-600\!{--un-border-opacity:1 !important;border-color:rgb(220 38 38 / var(--un-border-opacity))!important}.border-transparent{border-color:transparent}.border-transparent\!{border-color:transparent!important}.rd-12px,.rounded-12px{border-radius:12px}.rd-2,.rd-lg,.rounded-lg{border-radius:.5rem}.rd-2xl{border-radius:1rem}.rd-md{border-radius:.375rem}.rd-xl{border-radius:.75rem}.rounded-full{border-radius:9999px}.rd-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.bg-\[var\(--link-color\)\]\!{background-color:var(--link-color)!important}.bg-blue-500{--un-bg-opacity:1;background-color:rgb(59 130 246 / var(--un-bg-opacity))}.bg-blue-600{--un-bg-opacity:1;background-color:rgb(37 99 235 / var(--un-bg-opacity))}.bg-gray-200{--un-bg-opacity:1;background-color:rgb(229 231 235 / var(--un-bg-opacity))}.bg-green-500{--un-bg-opacity:1;background-color:rgb(34 197 94 / var(--un-bg-opacity))}.bg-green-600{--un-bg-opacity:1;background-color:rgb(22 163 74 / var(--un-bg-opacity))}.bg-red-500{--un-bg-opacity:1;background-color:rgb(239 68 68 / var(--un-bg-opacity))}.bg-red-600{--un-bg-opacity:1;background-color:rgb(220 38 38 / var(--un-bg-opacity))}.bg-red-600\!{--un-bg-opacity:1 !important;background-color:rgb(220 38 38 / var(--un-bg-opacity))!important}.bg-transparent{background-color:transparent}.bg-transparent\!{background-color:transparent!important}.bg-yellow-600{--un-bg-opacity:1;background-color:rgb(202 138 4 / var(--un-bg-opacity))}.hover\:bg-\[var\(--link-color\)\]\/12\!:hover{background-color:var(--link-color)!important}.hover\:bg-red-4\/10\!:hover{background-color:#f871711a!important}.active\:bg-\[var\(--link-color\)\]\/18\!:active{background-color:var(--link-color)!important}[stroke-width~="4"]{stroke-width:4px}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-x-10{padding-left:2.5rem;padding-right:2.5rem}.px,.px-4,[px=""]{padding-left:1rem;padding-right:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.text-right{text-align:right}.text-1\.5em{font-size:1.5em}.text-2\.5{font-size:.625rem}.text-6{font-size:1.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-\[var\(--link-color\)\]\!{color:var(--link-color)!important}.text-gray-600{--un-text-opacity:1;color:rgb(75 85 99 / var(--un-text-opacity))}.text-red-4{--un-text-opacity:1;color:rgb(248 113 113 / var(--un-text-opacity))}.text-white\!{--un-text-opacity:1 !important;color:rgb(255 255 255 / var(--un-text-opacity))!important}.c-red-5{--un-text-opacity:1;color:rgb(239 68 68 / var(--un-text-opacity))}.font-600{font-weight:600}.font-bold{font-weight:700}.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.op-0,.opacity-0{opacity:0}.op-0\!,.opacity-0\!{opacity:0!important}.op-50,.opacity-50{opacity:.5}.op-60{opacity:.6}.op-90{opacity:.9}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.hover\:op-70:hover{opacity:.7}.shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.outline{outline-style:solid}.outline-none{outline:2px solid transparent;outline-offset:2px}.backdrop-blur-8{--un-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-blur-lg{--un-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-blur-sm{--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-300{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.transition-all-500{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.5s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-right{transition-property:right;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-250{transition-duration:.25s}.duration-500,[duration~="500"]{transition-duration:.5s}[duration~="300"]{transition-duration:.3s}.ease,.ease-in-out,.transition-ease,.transition-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}
@@ -4,13 +4,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4
4
  onContextmenu: PropType<() => any>;
5
5
  disabled: BooleanConstructor;
6
6
  ing: BooleanConstructor;
7
+ variant: PropType<"primary" | "secondary" | "ghost">;
8
+ danger: BooleanConstructor;
9
+ size: PropType<"small" | "medium">;
7
10
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
11
  onClick: PropType<() => any>;
9
12
  onContextmenu: PropType<() => any>;
10
13
  disabled: BooleanConstructor;
11
14
  ing: BooleanConstructor;
15
+ variant: PropType<"primary" | "secondary" | "ghost">;
16
+ danger: BooleanConstructor;
17
+ size: PropType<"small" | "medium">;
12
18
  }>> & Readonly<{}>, {
13
19
  disabled: boolean;
14
20
  ing: boolean;
21
+ danger: boolean;
15
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
23
  export default _default;
@@ -1,29 +1,46 @@
1
- import { defineComponent as o, createVNode as n } from "vue";
2
- import { theme as i } from "../../themes/index.js";
1
+ import { defineComponent as a, createVNode as t } from "vue";
2
+ import { theme as r } from "../../themes/index.js";
3
3
  import l from "./LoadingBackground/index.js";
4
- const m = /* @__PURE__ */ o({
4
+ const c = /* @__PURE__ */ a({
5
5
  props: {
6
6
  onClick: Function,
7
7
  onContextmenu: Function,
8
8
  disabled: Boolean,
9
- ing: Boolean
9
+ ing: Boolean,
10
+ variant: String,
11
+ danger: Boolean,
12
+ size: String
10
13
  },
11
14
  setup(e, {
12
- emit: a,
13
- slots: t
15
+ emit: u,
16
+ slots: n
14
17
  }) {
15
- return () => n("button", {
16
- class: "relative of-hidden",
18
+ const i = () => {
19
+ if (e.danger)
20
+ return "text-red-4 hover:bg-red-4/10!";
21
+ switch (e.variant) {
22
+ // case 'primary':
23
+ // return 'bg-[var(--link-color)]! border-[var(--link-color)]! text-white!';
24
+ // case 'secondary':
25
+ // return 'bg-transparent! border-[var(--link-color)]! text-[var(--link-color)]!';
26
+ // case 'ghost':
27
+ // return 'bg-transparent! border-transparent! text-[var(--link-color)]! hover:bg-[var(--link-color)]/12! active:bg-[var(--link-color)]/18!';
28
+ default:
29
+ return "";
30
+ }
31
+ }, o = () => e.size === "small" ? "h-8 text-sm px-2" : e.size === "medium" ? "h-10 text-base px-4" : "";
32
+ return () => t("button", {
33
+ class: ["relative of-hidden", i(), o()],
17
34
  disabled: e.disabled || e.ing,
18
35
  onClick: e.onClick,
19
36
  onContextmenu: e.onContextmenu
20
- }, [n("div", {
37
+ }, [t("div", {
21
38
  class: "z-2 inline-flex items-center justify-center"
22
- }, [t.default?.()]), e.ing && n(l, {
23
- class: ["absolute bottom-0 left-0 right-0 top-25% z-1", i.value.loadingBackground]
39
+ }, [n.default?.()]), e.ing && t(l, {
40
+ class: ["absolute bottom-0 left-0 right-0 top-25% z-1", r.value.loadingBackground]
24
41
  }, null)]);
25
42
  }
26
43
  });
27
44
  export {
28
- m as default
45
+ c as default
29
46
  };
@@ -1,6 +1,6 @@
1
1
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  value: {
3
- type: (DateConstructor | StringConstructor | NumberConstructor)[];
3
+ type: (StringConstructor | DateConstructor | NumberConstructor)[];
4
4
  required: true;
5
5
  };
6
6
  format: {
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
9
9
  };
10
10
  }>, () => string, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
11
  value: {
12
- type: (DateConstructor | StringConstructor | NumberConstructor)[];
12
+ type: (StringConstructor | DateConstructor | NumberConstructor)[];
13
13
  required: true;
14
14
  };
15
15
  format: {
@@ -19,6 +19,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
19
19
  type: NumberConstructor;
20
20
  default: number;
21
21
  };
22
+ align: {
23
+ type: PropType<"center" | "left" | "right">;
24
+ default: string;
25
+ };
22
26
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
27
  innerClass: (StringConstructor | ArrayConstructor)[];
24
28
  innerStyle: PropType<CSSProperties>;
@@ -39,11 +43,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
39
43
  type: NumberConstructor;
40
44
  default: number;
41
45
  };
46
+ align: {
47
+ type: PropType<"center" | "left" | "right">;
48
+ default: string;
49
+ };
42
50
  }>> & Readonly<{}>, {
43
51
  gap: number;
52
+ maxHeight: number;
44
53
  buttonIng: boolean;
45
54
  buttonText: string;
46
55
  autoPosition: boolean;
47
- maxHeight: number;
56
+ align: "right" | "left" | "center";
48
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
58
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, ref as s, computed as b, createVNode as a } from "vue";
2
- import { onClickOutside as v } from "@vueuse/core";
3
- import y from "../TransitionVertical.vue.js";
4
- import w from "../Button/index.js";
5
- const H = /* @__PURE__ */ p({
1
+ import { defineComponent as b, ref as l, onBeforeUnmount as x, createVNode as o, Fragment as y, Teleport as h } from "vue";
2
+ import { onClickOutside as S } from "@vueuse/core";
3
+ import B from "../TransitionVertical.vue.js";
4
+ import C from "../Button/index.js";
5
+ const z = /* @__PURE__ */ b({
6
6
  props: {
7
7
  innerClass: [String, Array],
8
8
  innerStyle: [Object, String],
@@ -22,56 +22,64 @@ const H = /* @__PURE__ */ p({
22
22
  maxHeight: {
23
23
  type: Number,
24
24
  default: 200
25
+ },
26
+ align: {
27
+ type: String,
28
+ default: "center"
25
29
  }
26
30
  },
27
- setup(o, {
28
- emit: x,
29
- slots: l,
30
- expose: f
31
+ setup(t, {
32
+ emit: $,
33
+ slots: s,
34
+ expose: p
31
35
  }) {
32
- const n = s(!1), i = s(null), r = s("bottom");
33
- v(i, (t) => n.value = !1);
34
- const m = () => {
35
- if (!o.autoPosition || !i.value) return;
36
- const t = i.value.getBoundingClientRect(), c = window.innerHeight - t.bottom, d = t.top;
37
- c < o.maxHeight && d > c ? r.value = "top" : r.value = "bottom";
38
- }, u = (t) => {
39
- const e = typeof t == "boolean" ? t : !n.value;
40
- e && m(), n.value = e;
41
- };
42
- f({
43
- setShow: (t) => {
44
- u(t);
45
- }
36
+ const i = l(!1), a = l(null), d = l(null), g = l("bottom"), c = l({});
37
+ S(a, (e) => i.value = !1, {
38
+ ignore: [d]
46
39
  });
47
- const g = b(() => {
48
- const t = o.innerStyle || {};
49
- if (!o.autoPosition) return t;
50
- const e = {
51
- position: "absolute",
40
+ const m = () => {
41
+ if (!t.autoPosition || !a.value) return;
42
+ const e = a.value.getBoundingClientRect(), r = window.innerHeight, v = r - e.bottom, w = e.top, n = {
43
+ position: "fixed",
52
44
  zIndex: 100
53
45
  };
54
- return r.value === "bottom" ? (e.top = `calc(100% + ${o.gap}px)`, e.transformOrigin = "top center") : (e.bottom = `calc(100% + ${o.gap}px)`, e.top = "auto", e.transformOrigin = "bottom center"), {
55
- ...t,
56
- ...e
46
+ t.align === "right" ? n.right = `${window.innerWidth - e.right}px` : t.align === "left" ? n.left = `${e.left}px` : (n.left = `${e.left + e.width / 2}px`, n.transform = "translateX(-50%)"), v < t.maxHeight && w > v ? (g.value = "top", n.bottom = `${r - e.top + t.gap}px`, n.transformOrigin = "bottom center") : (g.value = "bottom", n.top = `${e.bottom + t.gap}px`, n.transformOrigin = "top center"), c.value = {
47
+ ...t.innerStyle || {},
48
+ ...n
57
49
  };
58
- });
59
- return () => a("div", {
50
+ }, f = (e) => {
51
+ const r = typeof e == "boolean" ? e : !i.value;
52
+ r && m(), i.value = r;
53
+ }, u = () => {
54
+ i.value && m();
55
+ };
56
+ return window.addEventListener("resize", u), window.addEventListener("scroll", u, !0), x(() => {
57
+ window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0);
58
+ }), p({
59
+ setShow: (e) => {
60
+ f(e);
61
+ }
62
+ }), () => o(y, null, [o("div", {
60
63
  class: "relative",
61
- ref: i
62
- }, [l.trigger ? l.trigger(u) : a(w, {
63
- ing: o.buttonIng,
64
- onClick: () => u()
64
+ ref: a
65
+ }, [s.trigger ? s.trigger(f) : o(C, {
66
+ ing: t.buttonIng,
67
+ onClick: () => f()
68
+ }, {
69
+ default: () => [t.buttonText]
70
+ })]), o(h, {
71
+ to: "body"
65
72
  }, {
66
- default: () => [o.buttonText]
67
- }), a(y, null, {
68
- default: () => [n.value && a("div", {
69
- class: o.innerClass,
70
- style: g.value
71
- }, [l.default?.()])]
73
+ default: () => [o(B, null, {
74
+ default: () => [i.value && o("div", {
75
+ ref: d,
76
+ class: t.innerClass,
77
+ style: c.value
78
+ }, [s.default?.()])]
79
+ })]
72
80
  })]);
73
81
  }
74
82
  });
75
83
  export {
76
- H as default
84
+ z as default
77
85
  };
@@ -12,6 +12,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
12
  options: {
13
13
  type: PropType<{
14
14
  label: string;
15
+ desc?: string;
16
+ icon?: string;
17
+ disabled?: boolean;
15
18
  action: () => any;
16
19
  }[]>;
17
20
  default: () => never[];
@@ -20,6 +23,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
20
23
  type: PropType<string>;
21
24
  default: string;
22
25
  };
26
+ align: {
27
+ type: PropType<"center" | "left" | "right">;
28
+ default: string;
29
+ };
23
30
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
31
  buttonText: {
25
32
  type: PropType<string>;
@@ -33,6 +40,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
33
40
  options: {
34
41
  type: PropType<{
35
42
  label: string;
43
+ desc?: string;
44
+ icon?: string;
45
+ disabled?: boolean;
36
46
  action: () => any;
37
47
  }[]>;
38
48
  default: () => never[];
@@ -41,14 +51,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
41
51
  type: PropType<string>;
42
52
  default: string;
43
53
  };
54
+ align: {
55
+ type: PropType<"center" | "left" | "right">;
56
+ default: string;
57
+ };
44
58
  }>> & Readonly<{}>, {
45
59
  width: string;
46
60
  innerClass: string;
47
61
  options: {
48
62
  label: string;
63
+ desc?: string;
64
+ icon?: string;
65
+ disabled?: boolean;
49
66
  action: () => any;
50
67
  }[];
51
- buttonText: string;
52
68
  row: boolean;
69
+ buttonText: string;
70
+ align: "right" | "left" | "center";
53
71
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
54
72
  export default _default;
@@ -1,6 +1,6 @@
1
- import { defineComponent as a, ref as i, createVNode as r } from "vue";
2
- import u from "./DropDown.js";
3
- const s = /* @__PURE__ */ a({
1
+ import { defineComponent as s, ref as d, createVNode as l } from "vue";
2
+ import i from "./DropDown.js";
3
+ const c = /* @__PURE__ */ s({
4
4
  props: {
5
5
  buttonText: {
6
6
  type: String,
@@ -18,31 +18,42 @@ const s = /* @__PURE__ */ a({
18
18
  innerClass: {
19
19
  type: String,
20
20
  default: ""
21
+ },
22
+ align: {
23
+ type: String,
24
+ default: "center"
21
25
  }
22
26
  },
23
27
  setup(t, {
24
- slots: o
28
+ slots: a
25
29
  }) {
26
- const e = i();
27
- return () => r(u, {
30
+ const n = d();
31
+ return () => l(i, {
28
32
  buttonText: t.buttonText,
29
33
  innerStyle: {
30
34
  width: t.width
31
35
  },
32
- ref: e,
33
- innerClass: ["absolute top-full left-50% bg-dropMenu rounded-lg p-2 z-10 flex gap-2 translate-x--50% backdrop-blur-8", !t.row && "flex-col", t.innerClass]
36
+ ref: n,
37
+ align: t.align,
38
+ innerClass: ["bg-dropMenu rounded-lg p-2 flex gap-2 backdrop-blur-8", !t.row && "flex-col", t.innerClass]
34
39
  }, {
35
- default: () => t.options.map((n, l) => r("div", {
36
- key: l,
37
- class: "w-full min-w-max flex items-center justify-center px-4 py-2 rounded-lg bg-avatarMenuButton transition-colors",
40
+ default: () => t.options.map((e, r) => l("div", {
41
+ key: r,
42
+ class: ["w-full min-w-max flex items-center px-4 py-2 rounded-lg bg-avatarMenuButton transition-colors gap-2", e.disabled && "op-50 cursor-not-allowed"],
38
43
  onClick: () => {
39
- e.value?.setShow(!1), n.action();
44
+ e.disabled || (n.value?.setShow(!1), e.action());
40
45
  }
41
- }, [n.label])),
42
- trigger: o.trigger
46
+ }, [e.icon && l("span", {
47
+ class: [e.icon, "text-lg shrink-0"]
48
+ }, null), l("div", {
49
+ class: "flex flex-col"
50
+ }, [l("span", null, [e.label]), e.desc && l("span", {
51
+ class: "text-xs op-60"
52
+ }, [e.desc])])])),
53
+ trigger: a.trigger
43
54
  });
44
55
  }
45
56
  });
46
57
  export {
47
- s as default
58
+ c as default
48
59
  };
@@ -1,3 +1,4 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  min: {
3
4
  type: NumberConstructor;
@@ -19,6 +20,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
19
20
  type: NumberConstructor;
20
21
  default: number;
21
22
  };
23
+ onFocus: PropType<() => void>;
22
24
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
25
  min: {
24
26
  type: NumberConstructor;
@@ -40,6 +42,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
40
42
  type: NumberConstructor;
41
43
  default: number;
42
44
  };
45
+ onFocus: PropType<() => void>;
43
46
  }>> & Readonly<{}>, {
44
47
  value: number;
45
48
  step: number;
@@ -1,8 +1,8 @@
1
- import { defineComponent as o, ref as f, computed as d, shallowRef as i, watch as s, createVNode as p } from "vue";
2
- import { useVModel as c } from "@vueuse/core";
1
+ import { defineComponent as m, ref as f, computed as s, shallowRef as i, watch as c, createVNode as d } from "vue";
2
+ import { useVModel as p } from "@vueuse/core";
3
3
  import v from "./TextInput/index.js";
4
4
  import * as y from "lodash-es";
5
- const h = /* @__PURE__ */ o({
5
+ const F = /* @__PURE__ */ m({
6
6
  props: {
7
7
  min: {
8
8
  type: Number,
@@ -23,38 +23,40 @@ const h = /* @__PURE__ */ o({
23
23
  value: {
24
24
  type: Number,
25
25
  default: 0
26
- }
26
+ },
27
+ onFocus: Function
27
28
  },
28
29
  setup(e, {
29
- emit: m
30
+ emit: r
30
31
  }) {
31
- const l = c(e, "value", m), u = f(""), r = d({
32
+ const n = p(e, "value", r), u = f(""), o = s({
32
33
  get: () => u.value,
33
34
  set: (t) => {
34
- u.value = t, l.value = y.clamp(Number(t), e.min, e.max);
35
+ u.value = t, n.value = y.clamp(Number(t), e.min, e.max);
35
36
  }
36
37
  }), a = () => {
37
- u.value = l.value.toFixed(e.decimal);
38
- }, n = i();
39
- return s(() => e.value, () => {
40
- if (n?.value?.focused) {
38
+ u.value = n.value.toFixed(e.decimal);
39
+ }, l = i();
40
+ return c(() => e.value, () => {
41
+ if (l?.value?.focused) {
41
42
  console.log("focused, not refresh");
42
43
  return;
43
44
  }
44
45
  a();
45
46
  }, {
46
47
  immediate: !0
47
- }), () => p(v, {
48
- ref: n,
49
- value: r.value,
50
- "onUpdate:value": (t) => r.value = t,
48
+ }), () => d(v, {
49
+ ref: l,
50
+ value: o.value,
51
+ "onUpdate:value": (t) => o.value = t,
51
52
  type: "number",
52
53
  step: e.step,
53
54
  onBlur: a,
54
- onEnterPressed: a
55
+ onEnterPressed: a,
56
+ onFocus: e.onFocus
55
57
  }, null);
56
58
  }
57
59
  });
58
60
  export {
59
- h as default
61
+ F as default
60
62
  };
@@ -0,0 +1,25 @@
1
+ import { PropType } from 'vue';
2
+ type TriggerType = 'hover' | 'click';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ trigger: {
5
+ type: PropType<TriggerType>;
6
+ default: string;
7
+ };
8
+ offset: {
9
+ type: NumberConstructor;
10
+ default: number;
11
+ };
12
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ trigger: {
14
+ type: PropType<TriggerType>;
15
+ default: string;
16
+ };
17
+ offset: {
18
+ type: NumberConstructor;
19
+ default: number;
20
+ };
21
+ }>> & Readonly<{}>, {
22
+ trigger: TriggerType;
23
+ offset: number;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
25
+ export default _default;
@@ -0,0 +1,76 @@
1
+ import { defineComponent as R, ref as o, computed as y, onBeforeUnmount as B, createVNode as r, Fragment as H, Teleport as z, nextTick as W } from "vue";
2
+ import N from "../TransitionOpacity.js";
3
+ const $ = /* @__PURE__ */ R({
4
+ props: {
5
+ trigger: {
6
+ type: String,
7
+ default: "hover"
8
+ },
9
+ offset: {
10
+ type: Number,
11
+ default: 8
12
+ }
13
+ },
14
+ setup(i, {
15
+ slots: g
16
+ }) {
17
+ const t = o(!1), m = o("bottom"), d = o(0), p = o(0), a = o(null), u = o(null), s = o(null), c = y(() => i.trigger === "hover"), l = () => {
18
+ s.value !== null && (window.clearTimeout(s.value), s.value = null);
19
+ }, f = () => {
20
+ if (!a.value || !u.value) return;
21
+ const n = a.value.getBoundingClientRect(), e = u.value.getBoundingClientRect(), b = window.innerHeight, L = window.innerWidth, k = b - n.bottom, C = n.top;
22
+ k < e.height + i.offset && C > k ? (m.value = "top", d.value = Math.max(8, n.top - e.height - i.offset)) : (m.value = "bottom", d.value = Math.min(b - e.height - 8, n.bottom + i.offset));
23
+ const E = n.left + (n.width - e.width) / 2;
24
+ p.value = Math.min(Math.max(8, E), Math.max(8, L - e.width - 8));
25
+ }, w = () => {
26
+ if (l(), t.value) {
27
+ f();
28
+ return;
29
+ }
30
+ t.value = !0, W(() => {
31
+ f();
32
+ });
33
+ }, h = () => {
34
+ l(), t.value = !1;
35
+ }, x = () => {
36
+ l(), s.value = window.setTimeout(() => {
37
+ t.value = !1;
38
+ }, 120);
39
+ }, T = () => {
40
+ t.value ? h() : w();
41
+ }, v = () => {
42
+ t.value && f();
43
+ }, M = (n) => {
44
+ if (i.trigger !== "click" || !t.value) return;
45
+ const e = n.target;
46
+ e && (a.value?.contains(e) || u.value?.contains(e) || h());
47
+ };
48
+ return window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), document.addEventListener("click", M, !0), B(() => {
49
+ l(), window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0), document.removeEventListener("click", M, !0);
50
+ }), () => r(H, null, [r("div", {
51
+ ref: a,
52
+ class: "inline-flex",
53
+ onMouseenter: () => c.value && w(),
54
+ onMouseleave: () => c.value && x(),
55
+ onClick: () => i.trigger === "click" && T()
56
+ }, [g.trigger?.()]), r(z, {
57
+ to: "#app"
58
+ }, {
59
+ default: () => [r(N, null, {
60
+ default: () => [t.value && r("div", {
61
+ ref: u,
62
+ class: "fixed z-80 max-w-90vw rd-2 bg-dropMenu p-2 text-sm backdrop-blur-8",
63
+ style: {
64
+ top: `${d.value}px`,
65
+ left: `${p.value}px`
66
+ },
67
+ onMouseenter: () => c.value && l(),
68
+ onMouseleave: () => c.value && x()
69
+ }, [g.default?.()])]
70
+ })]
71
+ })]);
72
+ }
73
+ });
74
+ export {
75
+ $ as default
76
+ };
@@ -0,0 +1,33 @@
1
+ import { PropType } from 'vue';
2
+ declare const Progress: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ percentage: {
4
+ type: NumberConstructor;
5
+ default: number;
6
+ };
7
+ status: {
8
+ type: PropType<"default" | "success" | "error">;
9
+ default: string;
10
+ };
11
+ showIndicator: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ percentage: {
17
+ type: NumberConstructor;
18
+ default: number;
19
+ };
20
+ status: {
21
+ type: PropType<"default" | "success" | "error">;
22
+ default: string;
23
+ };
24
+ showIndicator: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>> & Readonly<{}>, {
29
+ status: "success" | "error" | "default";
30
+ percentage: number;
31
+ showIndicator: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
+ export default Progress;
@@ -0,0 +1,35 @@
1
+ import { defineComponent as s, computed as r, createVNode as t, createTextVNode as u } from "vue";
2
+ const d = /* @__PURE__ */ s({
3
+ props: {
4
+ percentage: {
5
+ type: Number,
6
+ default: 0
7
+ },
8
+ status: {
9
+ type: String,
10
+ default: "default"
11
+ },
12
+ showIndicator: {
13
+ type: Boolean,
14
+ default: !1
15
+ }
16
+ },
17
+ setup(e) {
18
+ const l = r(() => e.status === "success" ? "bg-green-500" : e.status === "error" ? "bg-red-500" : "bg-blue-500"), a = r(() => Math.min(100, Math.max(0, e.percentage)));
19
+ return () => t("div", {
20
+ class: "flex items-center gap-2 w-full"
21
+ }, [t("div", {
22
+ class: "flex-1 h-2 bg-gray-200 rounded-full overflow-hidden"
23
+ }, [t("div", {
24
+ class: [l.value, "h-full rounded-full"],
25
+ style: {
26
+ width: `${a.value}%`
27
+ }
28
+ }, null)]), e.showIndicator && t("span", {
29
+ class: "text-sm text-gray-600 min-w-10 text-right"
30
+ }, [a.value, u("%")])]);
31
+ }
32
+ });
33
+ export {
34
+ d as default
35
+ };