@munet/ui 1.0.0

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.
Files changed (102) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/components/Button/LoadingBackground/index.d.ts +2 -0
  3. package/dist/components/Button/LoadingBackground/index.js +14 -0
  4. package/dist/components/Button/LoadingBackground/index.module.css +1 -0
  5. package/dist/components/Button/LoadingBackground/index.module.sass.js +7 -0
  6. package/dist/components/Button/index.d.ts +16 -0
  7. package/dist/components/Button/index.js +29 -0
  8. package/dist/components/CheckBox/FlagCheckBox.d.ts +35 -0
  9. package/dist/components/CheckBox/FlagCheckBox.js +41 -0
  10. package/dist/components/CheckBox/index.d.ts +26 -0
  11. package/dist/components/CheckBox/index.js +45 -0
  12. package/dist/components/DateFormat.d.ts +22 -0
  13. package/dist/components/DateFormat.js +23 -0
  14. package/dist/components/DropMenu/DropDown.d.ts +49 -0
  15. package/dist/components/DropMenu/DropDown.js +77 -0
  16. package/dist/components/DropMenu/index.d.ts +54 -0
  17. package/dist/components/DropMenu/index.js +48 -0
  18. package/dist/components/GlobalElementsContainer/ForegroundTask.d.ts +39 -0
  19. package/dist/components/GlobalElementsContainer/ForegroundTask.js +52 -0
  20. package/dist/components/GlobalElementsContainer/TaskManager.d.ts +45 -0
  21. package/dist/components/GlobalElementsContainer/TaskManager.js +90 -0
  22. package/dist/components/GlobalElementsContainer/TaskManager.module.css +1 -0
  23. package/dist/components/GlobalElementsContainer/TaskManager.module.sass.js +9 -0
  24. package/dist/components/GlobalElementsContainer/Toast.d.ts +14 -0
  25. package/dist/components/GlobalElementsContainer/Toast.js +41 -0
  26. package/dist/components/GlobalElementsContainer/ToastsDisplay.d.ts +2 -0
  27. package/dist/components/GlobalElementsContainer/ToastsDisplay.js +24 -0
  28. package/dist/components/GlobalElementsContainer/TransactionalDialog.d.ts +7 -0
  29. package/dist/components/GlobalElementsContainer/TransactionalDialog.js +45 -0
  30. package/dist/components/GlobalElementsContainer/index.d.ts +2 -0
  31. package/dist/components/GlobalElementsContainer/index.js +18 -0
  32. package/dist/components/Modal/index.d.ts +60 -0
  33. package/dist/components/Modal/index.js +124 -0
  34. package/dist/components/Modal/styles.module.css +1 -0
  35. package/dist/components/Modal/styles.module.sass.js +24 -0
  36. package/dist/components/NumberInput.d.ts +50 -0
  37. package/dist/components/NumberInput.js +60 -0
  38. package/dist/components/Qrcode.d.ts +18 -0
  39. package/dist/components/Qrcode.js +30 -0
  40. package/dist/components/Radio/index.d.ts +17 -0
  41. package/dist/components/Radio/index.js +34 -0
  42. package/dist/components/Range.css +1 -0
  43. package/dist/components/Range.vue.js +7 -0
  44. package/dist/components/Range.vue2.js +54 -0
  45. package/dist/components/ScrollText/index.d.ts +6 -0
  46. package/dist/components/ScrollText/index.js +48 -0
  47. package/dist/components/ScrollText/styles.module.css +1 -0
  48. package/dist/components/ScrollText/styles.module.sass.js +11 -0
  49. package/dist/components/Section/index.d.ts +12 -0
  50. package/dist/components/Section/index.js +35 -0
  51. package/dist/components/Select/index.d.ts +42 -0
  52. package/dist/components/Select/index.js +71 -0
  53. package/dist/components/Select/style.module.css +1 -0
  54. package/dist/components/Select/style.module.sass.js +33 -0
  55. package/dist/components/SubNaviBar/WhateverNaviBar.d.ts +21 -0
  56. package/dist/components/SubNaviBar/WhateverNaviBar.js +34 -0
  57. package/dist/components/TextInput/index.d.ts +45 -0
  58. package/dist/components/TextInput/index.js +106 -0
  59. package/dist/components/TextInput/style.module.css +1 -0
  60. package/dist/components/TextInput/style.module.sass.js +17 -0
  61. package/dist/components/TransitionOpacity.d.ts +15 -0
  62. package/dist/components/TransitionOpacity.js +26 -0
  63. package/dist/components/TransitionVertical.vue.js +97 -0
  64. package/dist/components/TransitionVertical.vue2.js +4 -0
  65. package/dist/components/WarningBackground/index.d.ts +14 -0
  66. package/dist/components/WarningBackground/index.js +22 -0
  67. package/dist/components/WarningBackground/index.module.css +1 -0
  68. package/dist/components/WarningBackground/index.module.sass.js +9 -0
  69. package/dist/components/Window/index.d.ts +89 -0
  70. package/dist/components/Window/index.js +169 -0
  71. package/dist/components/Window/styles.module.css +1 -0
  72. package/dist/components/Window/styles.module.sass.js +51 -0
  73. package/dist/controllers/toastController.d.ts +17 -0
  74. package/dist/controllers/toastController.js +13 -0
  75. package/dist/i18n/index.d.ts +26 -0
  76. package/dist/i18n/index.js +17 -0
  77. package/dist/index.d.ts +32 -0
  78. package/dist/index.js +86 -0
  79. package/dist/states/modal.d.ts +31 -0
  80. package/dist/states/modal.js +16 -0
  81. package/dist/themes/aquadx/components.module.css +1 -0
  82. package/dist/themes/aquadx/components.module.scss.js +31 -0
  83. package/dist/themes/aquadx/index.d.ts +6 -0
  84. package/dist/themes/aquadx/index.js +10 -0
  85. package/dist/themes/aquadx/vars.d.ts +5 -0
  86. package/dist/themes/aquadx/vars.js +7 -0
  87. package/dist/themes/base/composer.d.ts +19 -0
  88. package/dist/themes/base/composer.js +19 -0
  89. package/dist/themes/base/types.d.ts +21 -0
  90. package/dist/themes/dynamicLight/components.module.css +1 -0
  91. package/dist/themes/dynamicLight/components.module.scss.js +33 -0
  92. package/dist/themes/dynamicLight/index.d.ts +6 -0
  93. package/dist/themes/dynamicLight/index.js +10 -0
  94. package/dist/themes/dynamicLight/vars.d.ts +5 -0
  95. package/dist/themes/dynamicLight/vars.js +7 -0
  96. package/dist/themes/global.module.css +1 -0
  97. package/dist/themes/global.module.sass.js +4 -0
  98. package/dist/themes/index.d.ts +30 -0
  99. package/dist/themes/index.js +82 -0
  100. package/dist/utils/animation.d.ts +1 -0
  101. package/dist/utils/animation.js +4 -0
  102. package/package.json +51 -0
@@ -0,0 +1,34 @@
1
+ import { defineComponent as u, useId as i, createVNode as o } from "vue";
2
+ import { useVModel as d } from "@vueuse/core";
3
+ const m = /* @__PURE__ */ u({
4
+ props: {
5
+ onClick: Function,
6
+ value: [String, Number, Boolean, Symbol],
7
+ k: {
8
+ type: [String, Number, Boolean, Symbol],
9
+ required: !0
10
+ }
11
+ },
12
+ setup(e, {
13
+ emit: t,
14
+ slots: a
15
+ }) {
16
+ const l = i(), n = d(e, "value", t);
17
+ return () => o("div", {
18
+ class: "flex gap-2 items-center"
19
+ }, [o("input", {
20
+ type: "radio",
21
+ id: l,
22
+ value: e.k,
23
+ checked: n.value === e.k,
24
+ onChange: () => {
25
+ console.log("radio changed", e.k), n.value = e.k, e.onClick?.();
26
+ }
27
+ }, null), o("label", {
28
+ for: l
29
+ }, [a.default?.()])]);
30
+ }
31
+ });
32
+ export {
33
+ m as default
34
+ };
@@ -0,0 +1 @@
1
+ .form_input-range[data-v-1216dbeb]{--height: 1.5em;min-height:var(--height);appearance:none;background:transparent;border-radius:4px;transition:background-color .2s ease;--thumb-width: 4px;--thumb-height: var(--height);--thumb-box-shadow: 0 0 0px #e6e6e6;--thumb-border: none;--thumb-border-radius: 999px;--thumb-background: oklch(80% .07 calc(var(--hue) + 0));--thumb-background-hover: oklch(90% .07 calc(var(--hue) + 0));--thumb-background-active: oklch(70% .07 calc(var(--hue) + 0));--track-height: calc(var(--height) - var(--track-value-padding) * 2);--track-box-shadow: none;--track-border: solid 2px oklch(.95 .01 var(--hue));--track-border-radius: 6px;--track-background: oklch(.97 .006 var(--hue));--track-background-hover: oklch(.97 .006 var(--hue));--track-background-active: oklch(.97 .006 var(--hue));--track-value-background: rgb(255, 255, 255);--track-value-background-hover: rgb(255, 255, 255);--track-value-background-active: rgb(255, 255, 255);--track-value-padding: 2px}.form_input-range.slider-progress[data-v-1216dbeb]{--range: calc(var(--max) - var(--min));--ratio: calc((var(--value) - var(--min)) / var(--range));--sx: calc(.5 * 0em + var(--ratio) * (100% - 0em))}.form_input-range[data-v-1216dbeb]:focus{outline:none}.form_input-range[data-v-1216dbeb]::-webkit-slider-thumb{appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height) * .5 - var(--thumb-height) * .5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-1216dbeb]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:var(--track-box-shadow);position:relative;cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out}.form_input-range[data-v-1216dbeb]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width) * 1.6);transform:scaleY(1.2)}.form_input-range[data-v-1216dbeb]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-1216dbeb]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-1216dbeb]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-1216dbeb]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-1216dbeb]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-1216dbeb]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-1216dbeb]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:none;box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding));transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-1216dbeb]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding) * 2)}.form_input-range[data-v-1216dbeb]::-moz-range-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width) * 1.6);transform:scaleY(1.2)}.form_input-range[data-v-1216dbeb]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-1216dbeb]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-1216dbeb]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-1216dbeb]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-1216dbeb]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-1216dbeb]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-1216dbeb]::-ms-fill-upper{background:transparent;border-color:transparent}.form_input-range[data-v-1216dbeb]::-ms-fill-lower{background:transparent;border-color:transparent}.form_input-range[data-v-1216dbeb]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-1216dbeb]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-1216dbeb]::-ms-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width) * 1.6);transform:scaleY(1.2)}.form_input-range[data-v-1216dbeb]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-1216dbeb]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-1216dbeb]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-1216dbeb]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius) 0 0 var(--track-border-radius);margin:0;background:var(--track-value-background);border:none;border-right-width:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding))}.form_input-range.slider-progress[data-v-1216dbeb]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-1216dbeb]:active::-ms-fill-lower{background:var(--track-value-background-active)}
@@ -0,0 +1,7 @@
1
+ import o from "./Range.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1216dbeb"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,54 @@
1
+ import { defineComponent as v, mergeModels as g, useModel as x, computed as r, ref as y, onMounted as M, watch as p, withDirectives as V, createElementBlock as k, openBlock as _, vModelText as C } from "vue";
2
+ const h = ["min", "max", "step"], S = /* @__PURE__ */ v({
3
+ __name: "Range",
4
+ props: /* @__PURE__ */ g({
5
+ min: { default: 0 },
6
+ max: { default: 100 },
7
+ step: { default: 1 },
8
+ disabled: { type: Boolean, default: !1 },
9
+ thumbColor: { default: "#9090906e" },
10
+ trackColor: { default: "gray" },
11
+ trackValueColor: { default: "red" }
12
+ }, {
13
+ modelValue: { required: !0 },
14
+ modelModifiers: {}
15
+ }),
16
+ emits: ["update:modelValue"],
17
+ setup(n) {
18
+ const t = n, s = x(n, "modelValue"), d = r(() => t.min * 1e4), i = r(() => t.max * 1e4), m = r(() => t.step * 1e4), e = y(), l = r({
19
+ get: () => s.value * 1e4,
20
+ set: (u) => {
21
+ s.value = u / 1e4, o();
22
+ }
23
+ });
24
+ M(() => o()), p(l, () => o(), { immediate: !0 }), p([d, i, m], () => o(), { immediate: !0 });
25
+ function o() {
26
+ e.value && (e.value.style.setProperty("--value", l.value.toString()), e.value.style.setProperty("--min", e.value.min ? e.value.min : t.min.toString()), e.value.style.setProperty("--max", e.value.max ? e.value.max : t.max.toString()));
27
+ }
28
+ function c(u) {
29
+ const a = u.target;
30
+ a.style.setProperty("--value", a.value);
31
+ }
32
+ return (u, a) => V((_(), k("input", {
33
+ ref_key: "sliderRef",
34
+ ref: e,
35
+ "onUpdate:modelValue": a[0] || (a[0] = (f) => l.value = f),
36
+ type: "range",
37
+ min: d.value,
38
+ max: i.value,
39
+ step: m.value,
40
+ class: "slider-progress form_input-range",
41
+ onInput: c
42
+ }, null, 40, h)), [
43
+ [
44
+ C,
45
+ l.value,
46
+ void 0,
47
+ { number: !0 }
48
+ ]
49
+ ]);
50
+ }
51
+ });
52
+ export {
53
+ S as default
54
+ };
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ title: StringConstructor;
3
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4
+ title: StringConstructor;
5
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,48 @@
1
+ import { defineComponent as d, ref as r, onMounted as p, nextTick as c, onBeforeUnmount as h, watch as m, createVNode as n } from "vue";
2
+ import s from "./styles.module.sass.js";
3
+ const b = /* @__PURE__ */ d({
4
+ props: {
5
+ title: String
6
+ },
7
+ setup(v, {
8
+ slots: u
9
+ }) {
10
+ const e = r(), l = r(), a = r(!1), o = r(0);
11
+ let t = null;
12
+ const i = () => {
13
+ if (!e.value || !l.value) return;
14
+ o.value = e.value.offsetWidth;
15
+ const f = l.value.scrollWidth;
16
+ l.value.innerText.includes("でらっくす譜面") && console.log(o.value, f), a.value = f > o.value;
17
+ };
18
+ return p(() => {
19
+ c(() => {
20
+ i(), e.value && typeof ResizeObserver < "u" && (t = new ResizeObserver(() => {
21
+ i();
22
+ }), t.observe(e.value));
23
+ });
24
+ }), h(() => {
25
+ t && (t.disconnect(), t = null);
26
+ }), m(() => u.default?.(), () => {
27
+ c(() => {
28
+ i();
29
+ });
30
+ }, {
31
+ flush: "post"
32
+ }), () => n("div", {
33
+ title: v.title
34
+ }, [n("div", {
35
+ ref: e,
36
+ class: s.wrap
37
+ }, [n("div", {
38
+ ref: l,
39
+ class: [s.item, a.value && s.scrolling],
40
+ style: {
41
+ "--wrap-width": o.value + "px"
42
+ }
43
+ }, [u.default?.()])])]);
44
+ }
45
+ });
46
+ export {
47
+ b as default
48
+ };
@@ -0,0 +1 @@
1
+ @keyframes styles-module_XCRMn{0%{transform:translate(0)}10%{transform:translate(0)}90%{transform:translate(calc(-100% + var(--wrap-width, 100%)))}to{transform:translate(calc(-100% + var(--wrap-width, 100%)))}}.styles-module_Rqv1U{max-width:100%;display:inline-block;vertical-align:top;overflow:hidden;white-space:nowrap;position:relative}.styles-module_-P9Py{display:inline-block;white-space:nowrap}.styles-module_-P9Py.styles-module_761Cy{will-change:transform;animation:styles-module_XCRMn linear 4s alternate infinite}
@@ -0,0 +1,11 @@
1
+ const s = "styles-module_Rqv1U", l = "styles-module_-P9Py", t = "styles-module_761Cy", e = {
2
+ wrap: s,
3
+ item: l,
4
+ scrolling: t
5
+ };
6
+ export {
7
+ e as default,
8
+ l as item,
9
+ t as scrolling,
10
+ s as wrap
11
+ };
@@ -0,0 +1,12 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ title: StringConstructor;
3
+ icon: StringConstructor;
4
+ expend: BooleanConstructor;
5
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
6
+ title: StringConstructor;
7
+ icon: StringConstructor;
8
+ expend: BooleanConstructor;
9
+ }>> & Readonly<{}>, {
10
+ expend: boolean;
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { defineComponent as a, ref as o, createVNode as e, withDirectives as r, vShow as s } from "vue";
2
+ import d from "../TransitionVertical.vue.js";
3
+ import { theme as i } from "../../themes/index.js";
4
+ const p = /* @__PURE__ */ a({
5
+ props: {
6
+ title: String,
7
+ icon: String,
8
+ expend: Boolean
9
+ },
10
+ setup(l, {
11
+ emit: u,
12
+ slots: n
13
+ }) {
14
+ const t = o(l.expend || !1);
15
+ return () => e("div", {
16
+ class: [i.value.section, t.value && i.value.expend]
17
+ }, [e("div", {
18
+ class: ["w-full flex items-center justify-between rounded-12px px-4 py-3 outline-none transition-colors", i.value.trigger],
19
+ onClick: () => t.value = !t.value
20
+ }, [e("div", {
21
+ class: ["flex gap-1.5"]
22
+ }, [e("div", {
23
+ class: ["text-6", l.icon]
24
+ }, null), l.title]), e("div", {
25
+ class: ["i-solar:alt-arrow-down-linear transform duration-250", t.value && "rotate-180"]
26
+ }, null)]), e(d, null, {
27
+ default: () => [r(e("div", {
28
+ class: "grid gap-2 p-4"
29
+ }, [n.default?.(t)]), [[s, t.value]])]
30
+ })]);
31
+ }
32
+ });
33
+ export {
34
+ p as default
35
+ };
@@ -0,0 +1,42 @@
1
+ import { PropType, VNode } from 'vue';
2
+ import { JSX } from 'vue/jsx-runtime';
3
+ export interface SelectOption {
4
+ label: string | number | (() => VNode | string | number | JSX.Element);
5
+ value: string | number;
6
+ disabled?: boolean;
7
+ }
8
+ export interface SelectExposed {
9
+ open: () => void;
10
+ close: () => void;
11
+ }
12
+ declare const Select: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
+ value: (StringConstructor | NumberConstructor)[];
14
+ options: {
15
+ type: PropType<SelectOption[]>;
16
+ default: () => never[];
17
+ };
18
+ placeholder: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ disabled: BooleanConstructor;
23
+ onChange: PropType<(value: any) => void>;
24
+ }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
+ value: (StringConstructor | NumberConstructor)[];
26
+ options: {
27
+ type: PropType<SelectOption[]>;
28
+ default: () => never[];
29
+ };
30
+ placeholder: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ disabled: BooleanConstructor;
35
+ onChange: PropType<(value: any) => void>;
36
+ }>> & Readonly<{}>, {
37
+ disabled: boolean;
38
+ placeholder: string;
39
+ options: SelectOption[];
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
41
+ export type SelectInstance = InstanceType<typeof Select> & SelectExposed;
42
+ export default Select;
@@ -0,0 +1,71 @@
1
+ import { defineComponent as C, inject as k, computed as d, ref as c, createVNode as o, createTextVNode as H } from "vue";
2
+ import { useVModel as M, onClickOutside as O } from "@vueuse/core";
3
+ import t from "./style.module.sass.js";
4
+ import { theme as B } from "../../themes/index.js";
5
+ import D from "../TransitionVertical.vue.js";
6
+ const P = /* @__PURE__ */ C({
7
+ props: {
8
+ value: [String, Number],
9
+ options: {
10
+ type: Array,
11
+ default: () => []
12
+ },
13
+ placeholder: {
14
+ type: String,
15
+ default: "请选择"
16
+ },
17
+ disabled: Boolean,
18
+ onChange: Function
19
+ },
20
+ setup(a, {
21
+ emit: f,
22
+ expose: b
23
+ }) {
24
+ const s = M(a, "value", f), m = k("disabled"), n = d(() => a.disabled || m?.value), l = c(!1), u = c(null), r = c("bottom"), i = d(() => a.options.find((e) => e.value === s.value)), g = (e) => typeof e == "function" ? e() : e, w = d(() => {
25
+ if (!i.value) return a.placeholder;
26
+ const e = i.value.label;
27
+ return typeof e == "function" ? e() : e;
28
+ }), v = () => {
29
+ if (!u.value) return;
30
+ const e = u.value.getBoundingClientRect(), p = window.innerHeight - e.bottom, x = e.top;
31
+ p < 500 && x > p ? r.value = "top" : r.value = "bottom";
32
+ }, h = () => {
33
+ n.value || (l.value || v(), l.value = !l.value);
34
+ }, y = (e) => {
35
+ e.disabled || n.value || (s.value = e.value, l.value = !1, a.onChange?.(e.value));
36
+ };
37
+ return O(u, () => {
38
+ l.value = !1;
39
+ }), b({
40
+ open: () => {
41
+ n.value || (v(), l.value = !0);
42
+ },
43
+ close: () => {
44
+ l.value = !1;
45
+ }
46
+ }), () => o("div", {
47
+ ref: u,
48
+ class: [t.select, B.value.textInput, n.value && t.disabled, l.value && t.open]
49
+ }, [o("div", {
50
+ class: [t.trigger, !i.value && t.placeholder],
51
+ onClick: h
52
+ }, [o("span", {
53
+ class: t.text
54
+ }, [w.value]), o("span", {
55
+ class: [t.arrow, l.value && t.arrowOpen, "i-solar:alt-arrow-down-linear"]
56
+ }, null)]), o(D, null, {
57
+ default: () => [l.value && o("div", {
58
+ class: [t.dropdown, "bg-dropMenu backdrop-blur-8", r.value === "top" && t.dropdownTop]
59
+ }, [a.options.length === 0 ? o("div", {
60
+ class: t.empty
61
+ }, [H("暂无选项")]) : a.options.map((e) => o("div", {
62
+ key: e.value,
63
+ class: [t.option, "bg-avatarMenuButton", e.value === s.value && t.selected, e.disabled && t.optionDisabled],
64
+ onClick: () => y(e)
65
+ }, [g(e.label)]))])]
66
+ })]);
67
+ }
68
+ });
69
+ export {
70
+ P as default
71
+ };
@@ -0,0 +1 @@
1
+ .style-module_94I2l{position:relative;width:100%;min-width:120px}.style-module_94I2l:not(.style-module_9bHA-) .style-module_DmzNq:hover{background-color:var(--hover-bg)}.style-module_94I2l:not(.style-module_9bHA-).style-module_-mLRw .style-module_DmzNq{background-color:var(--focus--bg);border:2px solid var(--border-hover-c)}.style-module_94I2l.style-module_9bHA- .style-module_DmzNq{opacity:.5}.style-module_DmzNq{border-radius:12px;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:var(--bg);transition:all .3s;box-sizing:border-box;border:2px solid transparent;display:flex;align-items:center;justify-content:space-between;gap:.5em;min-height:2.8em}.style-module_DmzNq.style-module_UCaPN .style-module_C29oV{opacity:.5}.style-module_C29oV{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.style-module_ivRiG{transition:transform .3s;opacity:.6}.style-module_ivRiG.style-module_7Qg9z{transform:rotate(180deg)}.style-module_wPfBh{position:absolute;top:calc(100% + 8px);left:0;right:0;border-radius:12px;padding:8px;z-index:1000;max-height:500px;overflow-y:auto}.style-module_wPfBh::-webkit-scrollbar{width:6px}.style-module_wPfBh::-webkit-scrollbar-thumb{background-color:var(--border-hover-c);border-radius:3px}.style-module_wPfBh.style-module_NPikf{top:auto;bottom:calc(100% + 8px)}.style-module_s8wSl{padding:.5em 1em;transition:all .2s;display:flex;align-items:center;justify-content:space-between;font-weight:500;border-radius:8px}.style-module_s8wSl.style-module_y9cdC{color:var(--border-hover-c);font-weight:600}.style-module_s8wSl.style-module_rfohl{opacity:.4}.style-module_EVBKA{padding:1.5em 1.2em;text-align:center;opacity:.5;font-weight:500}
@@ -0,0 +1,33 @@
1
+ const e = "style-module_94I2l", o = "style-module_9bHA-", t = "style-module_DmzNq", l = "style-module_-mLRw", s = "style-module_UCaPN", d = "style-module_C29oV", n = "style-module_ivRiG", c = "style-module_7Qg9z", r = "style-module_wPfBh", p = "style-module_NPikf", m = "style-module_s8wSl", y = "style-module_y9cdC", u = "style-module_rfohl", _ = "style-module_EVBKA", a = {
2
+ select: e,
3
+ disabled: o,
4
+ trigger: t,
5
+ open: l,
6
+ placeholder: s,
7
+ text: d,
8
+ arrow: n,
9
+ arrowOpen: c,
10
+ dropdown: r,
11
+ dropdownTop: p,
12
+ option: m,
13
+ selected: y,
14
+ optionDisabled: u,
15
+ empty: _
16
+ };
17
+ export {
18
+ n as arrow,
19
+ c as arrowOpen,
20
+ a as default,
21
+ o as disabled,
22
+ r as dropdown,
23
+ p as dropdownTop,
24
+ _ as empty,
25
+ l as open,
26
+ m as option,
27
+ u as optionDisabled,
28
+ s as placeholder,
29
+ e as select,
30
+ y as selected,
31
+ d as text,
32
+ t as trigger
33
+ };
@@ -0,0 +1,21 @@
1
+ import { PropType } from 'vue';
2
+ export type NaviItem = {
3
+ name: string;
4
+ onClick: () => any;
5
+ selected: boolean;
6
+ icon?: string;
7
+ hidden?: boolean;
8
+ disabled?: boolean;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
+ items: {
12
+ type: PropType<NaviItem[]>;
13
+ required: true;
14
+ };
15
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ items: {
17
+ type: PropType<NaviItem[]>;
18
+ required: true;
19
+ };
20
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { defineComponent as t, createVNode as a, Transition as r } from "vue";
2
+ import { theme as s } from "../../themes/index.js";
3
+ const d = /* @__PURE__ */ t({
4
+ props: {
5
+ items: {
6
+ type: Array,
7
+ required: !0
8
+ }
9
+ },
10
+ setup(l, {
11
+ emit: o
12
+ }) {
13
+ return () => a(r, {
14
+ mode: "out-in",
15
+ enterActiveClass: "transition-all-500",
16
+ leaveActiveClass: "transition-all-500",
17
+ enterFromClass: "op-0 translate-y-100%",
18
+ leaveToClass: "op-0 translate-y--100%"
19
+ }, {
20
+ default: () => [a("div", {
21
+ class: ["h-8 flex items-center of-x-auto of-y-hidden gap-2", s.value.subNaviBar],
22
+ key: "navi"
23
+ }, [l.items.filter((e) => !e.hidden).map((e) => a("div", {
24
+ onClick: () => !e.disabled && e.onClick(),
25
+ class: ["h-full px-3 py-2 flex items-center rd-md shrink-0 transition-colors", e.selected && s.value.active, e.disabled && ["op-50 cursor-not-allowed", s.value.disabled]]
26
+ }, [e.icon && a("span", {
27
+ class: ["mr-2", e.icon]
28
+ }, null), e.name]))])]
29
+ });
30
+ }
31
+ });
32
+ export {
33
+ d as default
34
+ };
@@ -0,0 +1,45 @@
1
+ import { PropType, Ref } from 'vue';
2
+ export interface TextInputExposed {
3
+ insertText: (text: string) => void;
4
+ focused: Ref<boolean>;
5
+ }
6
+ declare const TextInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ value: StringConstructor;
8
+ type: StringConstructor;
9
+ step: NumberConstructor;
10
+ placeholder: StringConstructor;
11
+ disabled: BooleanConstructor;
12
+ textarea: BooleanConstructor;
13
+ height: StringConstructor;
14
+ saveButtonText: StringConstructor;
15
+ typeFocus: BooleanConstructor;
16
+ limit: NumberConstructor;
17
+ ing: BooleanConstructor;
18
+ onSaveButtonClick: PropType<() => void>;
19
+ onEnterPressed: PropType<() => void>;
20
+ onBlur: PropType<() => void>;
21
+ onFocus: PropType<() => void>;
22
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ value: StringConstructor;
24
+ type: StringConstructor;
25
+ step: NumberConstructor;
26
+ placeholder: StringConstructor;
27
+ disabled: BooleanConstructor;
28
+ textarea: BooleanConstructor;
29
+ height: StringConstructor;
30
+ saveButtonText: StringConstructor;
31
+ typeFocus: BooleanConstructor;
32
+ limit: NumberConstructor;
33
+ ing: BooleanConstructor;
34
+ onSaveButtonClick: PropType<() => void>;
35
+ onEnterPressed: PropType<() => void>;
36
+ onBlur: PropType<() => void>;
37
+ onFocus: PropType<() => void>;
38
+ }>> & Readonly<{}>, {
39
+ textarea: boolean;
40
+ disabled: boolean;
41
+ ing: boolean;
42
+ typeFocus: boolean;
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
+ export type TextInputInstance = InstanceType<typeof TextInput> & TextInputExposed;
45
+ export default TextInput;
@@ -0,0 +1,106 @@
1
+ import { defineComponent as T, inject as C, computed as s, shallowRef as E, ref as w, createVNode as u, withDirectives as f, vModelText as k, vModelDynamic as V, Transition as P } from "vue";
2
+ import { modalShowing as R } from "../../states/modal.js";
3
+ import { useVModel as D, useFocus as I, onStartTyping as M, useElementSize as N } from "@vueuse/core";
4
+ import n from "./style.module.sass.js";
5
+ import j from "../Button/index.js";
6
+ import { theme as A } from "../../themes/index.js";
7
+ const q = /* @__PURE__ */ T({
8
+ props: {
9
+ value: String,
10
+ type: String,
11
+ step: Number,
12
+ placeholder: String,
13
+ disabled: Boolean,
14
+ textarea: Boolean,
15
+ height: String,
16
+ saveButtonText: String,
17
+ typeFocus: Boolean,
18
+ limit: Number,
19
+ ing: Boolean,
20
+ onSaveButtonClick: Function,
21
+ onEnterPressed: Function,
22
+ onBlur: Function,
23
+ onFocus: Function
24
+ },
25
+ setup(e, {
26
+ emit: h,
27
+ expose: g
28
+ }) {
29
+ const l = D(e, "value", h), B = C("disabled"), i = s(() => e.disabled || B?.value), o = E(null), {
30
+ focused: x
31
+ } = I(o), b = (t) => {
32
+ if (t.key === "Enter" && !i.value) {
33
+ if (t.preventDefault(), e.onEnterPressed) {
34
+ e.onEnterPressed();
35
+ return;
36
+ }
37
+ if (!e.saveButtonText)
38
+ return;
39
+ e.onSaveButtonClick?.();
40
+ }
41
+ };
42
+ g({
43
+ insertText: (t) => {
44
+ if (o.value) {
45
+ const a = o.value, r = a.selectionStart || 0, y = a.selectionEnd || 0, m = a.value;
46
+ a.value = m.slice(0, r) + t + m.slice(y), a.setSelectionRange(r + t.length, r + t.length), l.value = a.value, a.focus();
47
+ }
48
+ },
49
+ focused: x
50
+ }), M(() => {
51
+ e.typeFocus && (R.value || o.value?.focus());
52
+ });
53
+ const c = s(() => e.limit ? (l.value?.length || 0) >= e.limit : !1), v = s(() => e.saveButtonText ? !c.value : !1), d = w(null), {
54
+ width: F
55
+ } = N(d), S = s(() => v.value ? `calc(${F.value}px + 3.2rem)` : "0.5rem");
56
+ return () => u("div", {
57
+ class: ["flex", n.wrapper, A.value.textInput, i.value && n.disabled]
58
+ }, [e.textarea ? f(u("textarea", {
59
+ ref: o,
60
+ "onUpdate:modelValue": (t) => l.value = t,
61
+ placeholder: e.placeholder,
62
+ disabled: i.value,
63
+ onBlur: e.onBlur,
64
+ onFocus: e.onFocus,
65
+ style: {
66
+ height: e.height
67
+ },
68
+ class: "min-h-12 cst"
69
+ }, null), [[k, l.value]]) : f(u("input", {
70
+ ref: o,
71
+ "onUpdate:modelValue": (t) => l.value = t,
72
+ type: e.type,
73
+ placeholder: e.placeholder,
74
+ disabled: i.value,
75
+ onBlur: e.onBlur,
76
+ onFocus: e.onFocus,
77
+ onKeypress: b,
78
+ class: "min-h-12",
79
+ step: e.step
80
+ }, null), [[V, l.value]]), e.limit && u("div", {
81
+ style: {
82
+ right: S.value
83
+ },
84
+ class: ["absolute bottom-1 text-2.5 op-60 pointer-events-none transition-right", c.value && "c-red-5 font-bold"]
85
+ }, [e.limit - (l.value?.length || 0)]), u(P, {
86
+ enterActiveClass: n.active,
87
+ leaveActiveClass: n.active,
88
+ enterFromClass: n.from,
89
+ enterToClass: n.to,
90
+ leaveFromClass: n.to,
91
+ leaveToClass: n.from
92
+ }, {
93
+ default: () => [v.value && u(j, {
94
+ ref: d,
95
+ ing: e.ing,
96
+ class: ["absolute! right-1", n.save, !e.textarea && "top-0 bottom-0 m-auto", e.textarea && "bottom-1"],
97
+ onClick: e.onSaveButtonClick
98
+ }, {
99
+ default: () => [e.saveButtonText]
100
+ })]
101
+ })]);
102
+ }
103
+ });
104
+ export {
105
+ q as default
106
+ };
@@ -0,0 +1 @@
1
+ @keyframes style-module_5AGLI{0%{inset:0;opacity:1;border-radius:12px}to{inset:-8px;opacity:0;border-radius:16px}}.style-module_puEjq{position:relative}.style-module_puEjq:not(.style-module_na7EZ):has(input:focus,textarea:focus):after{content:"";display:block;position:absolute;border:2px solid var(--border-hover-c);opacity:0;pointer-events:none;animation:style-module_5AGLI .5s}.style-module_puEjq:not(.style-module_na7EZ) input:hover,.style-module_puEjq:not(.style-module_na7EZ) textarea:hover{background-color:var(--hover-bg)}.style-module_puEjq:not(.style-module_na7EZ) input:focus,.style-module_puEjq:not(.style-module_na7EZ) textarea:focus{background-color:var(--focus--bg);border:2px solid var(--border-hover-c)}.style-module_puEjq input,.style-module_puEjq textarea{border-radius:12px;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:var(--bg);transition:all .3s;box-sizing:border-box;position:relative;border:2px solid transparent;width:100%;height:100%;resize:none}.style-module_puEjq input[type=number]{-moz-appearance:textfield;appearance:textfield}.style-module_puEjq input[type=number]::-webkit-outer-spin-button,.style-module_puEjq input[type=number]::-webkit-inner-spin-button{appearance:none;margin:0}.style-module_yBvTN.style-module_tS7wi{transform:scale(.4)!important;opacity:0!important}.style-module_yBvTN.style-module_SyE72{transform:scale(1);opacity:1}.style-module_yBvTN.style-module_k0ati{transition:all .2s!important}
@@ -0,0 +1,17 @@
1
+ const e = "style-module_puEjq", t = "style-module_na7EZ", s = "style-module_yBvTN", o = "style-module_tS7wi", l = "style-module_SyE72", a = "style-module_k0ati", d = {
2
+ wrapper: e,
3
+ disabled: t,
4
+ save: s,
5
+ from: o,
6
+ to: l,
7
+ active: a
8
+ };
9
+ export {
10
+ a as active,
11
+ d as default,
12
+ t as disabled,
13
+ o as from,
14
+ s as save,
15
+ l as to,
16
+ e as wrapper
17
+ };
@@ -0,0 +1,15 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ mode: {
4
+ type: PropType<"out-in" | "in-out" | "default">;
5
+ default: string;
6
+ };
7
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
+ mode: {
9
+ type: PropType<"out-in" | "in-out" | "default">;
10
+ default: string;
11
+ };
12
+ }>> & Readonly<{}>, {
13
+ mode: "default" | "out-in" | "in-out";
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ export default _default;