@thestarweb/ui 1.7.1 → 2.0.0-beta.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.
Files changed (236) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +7 -0
  2. package/dist/components/base/button/button.vue.js +5 -0
  3. package/dist/components/base/button/button.vue_vue_type_script_setup_true_lang.js +35 -0
  4. package/dist/components/data/card/card.vue.js +5 -0
  5. package/dist/components/data/card/card.vue_vue_type_script_setup_true_lang.js +50 -0
  6. package/dist/components/data/pagination/pagination.vue.js +5 -0
  7. package/dist/components/data/pagination/pagination.vue_vue_type_script_setup_true_lang.js +101 -0
  8. package/dist/components/data/popover/popover.vue.js +5 -0
  9. package/dist/components/data/popover/popover.vue_vue_type_script_setup_true_lang.js +122 -0
  10. package/dist/components/data/popover/utils.js +68 -0
  11. package/dist/components/data/table/table.vue.js +5 -0
  12. package/dist/components/data/table/table.vue_vue_type_script_setup_true_lang.js +45 -0
  13. package/dist/components/data/tag/tag.vue.js +5 -0
  14. package/dist/components/data/tag/tag.vue_vue_type_script_setup_true_lang.js +21 -0
  15. package/dist/components/data/tree/tree-item.vue.js +5 -0
  16. package/dist/components/data/tree/tree-item.vue_vue_type_script_setup_true_lang.js +75 -0
  17. package/dist/components/data/tree/tree-raw.vue.js +5 -0
  18. package/dist/components/data/tree/tree-raw.vue_vue_type_script_setup_true_lang.js +104 -0
  19. package/dist/components/data/tree/tree.vue.js +4 -0
  20. package/dist/components/data/tree/tree.vue_vue_type_script_setup_true_lang.js +60 -0
  21. package/dist/components/data/tree/utils.js +66 -0
  22. package/dist/components/form/checkbox/checkbox.vue.js +5 -0
  23. package/dist/components/form/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +50 -0
  24. package/dist/components/form/input/input.vue.js +5 -0
  25. package/dist/components/form/input/input.vue_vue_type_script_setup_true_lang.js +34 -0
  26. package/dist/components/form/select/select.vue.js +5 -0
  27. package/dist/components/form/select/select.vue_vue_type_script_setup_true_lang.js +146 -0
  28. package/dist/components/form/slider/slider.vue.js +5 -0
  29. package/dist/components/form/slider/slider.vue_vue_type_script_setup_true_lang.js +67 -0
  30. package/dist/components/form/switch/switch.vue.js +5 -0
  31. package/dist/components/form/switch/switch.vue_vue_type_script_setup_true_lang.js +38 -0
  32. package/dist/components/layout/layout/index.js +9 -0
  33. package/dist/components/layout/layout/layout-dividing.vue.js +10 -0
  34. package/dist/components/layout/layout/layout-main.vue.js +10 -0
  35. package/dist/components/layout/layout/layout.vue.js +5 -0
  36. package/dist/components/layout/layout/layout.vue_vue_type_script_setup_true_lang.js +14 -0
  37. package/dist/components/layout/page/Page.vue.js +5 -0
  38. package/dist/components/layout/page/Page.vue_vue_type_script_setup_true_lang.js +60 -0
  39. package/dist/components/other/calendar/calendar.vue.js +5 -0
  40. package/dist/components/other/calendar/calendar.vue_vue_type_script_setup_true_lang.js +103 -0
  41. package/dist/components/other/menu/index.vue.js +5 -0
  42. package/dist/components/other/menu/index.vue_vue_type_script_setup_true_lang.js +22 -0
  43. package/dist/components/other/menu/menu-h/index.vue.js +5 -0
  44. package/dist/components/other/menu/menu-h/index.vue_vue_type_script_setup_true_lang.js +22 -0
  45. package/dist/components/other/menu/menu-h/menu-h-item.vue.js +5 -0
  46. package/dist/components/other/menu/menu-h/menu-h-item.vue_vue_type_script_setup_true_lang.js +30 -0
  47. package/dist/components/other/menu/menu-v/index.vue.js +4 -0
  48. package/dist/components/other/menu/menu-v/index.vue_vue_type_script_setup_true_lang.js +32 -0
  49. package/dist/context/is-mobile.js +10 -0
  50. package/dist/icons/arrow-down.svg_component.js +12 -0
  51. package/dist/icons/arrow-right.svg_component.js +12 -0
  52. package/dist/icons/home.svg_component.js +12 -0
  53. package/dist/icons/menu.svg_component.js +12 -0
  54. package/dist/index.js +19 -0
  55. package/dist/style.css +2 -0
  56. package/dist/utils/index.js +9 -0
  57. package/dist/utils/z-index.js +6 -0
  58. package/package.json +38 -81
  59. package/types/src/components/base/button/button.vue.d.ts +22 -0
  60. package/types/src/components/base/button/example/base.vue.d.ts +3 -0
  61. package/types/src/components/base/button/index.d.ts +1 -0
  62. package/types/src/components/base/index.d.ts +1 -0
  63. package/types/src/components/data/card/card.vue.d.ts +32 -0
  64. package/types/src/components/data/card/index.d.ts +1 -0
  65. package/types/src/components/data/index.d.ts +6 -0
  66. package/types/src/components/data/pagination/example/base.vue.d.ts +3 -0
  67. package/types/src/components/data/pagination/index.d.ts +1 -0
  68. package/types/src/components/data/pagination/pagination.vue.d.ts +21 -0
  69. package/types/src/components/data/popover/example/base.vue.d.ts +3 -0
  70. package/types/src/components/data/popover/index.d.ts +1 -0
  71. package/types/src/components/data/popover/popover.vue.d.ts +39 -0
  72. package/types/src/components/data/popover/type.d.ts +1 -0
  73. package/types/src/components/data/popover/utils.d.ts +12 -0
  74. package/types/src/components/data/table/example/base.vue.d.ts +3 -0
  75. package/types/src/components/data/table/example/render.vue.d.ts +3 -0
  76. package/types/src/components/data/table/index.d.ts +2 -0
  77. package/types/src/components/data/table/table.vue.d.ts +36 -0
  78. package/types/src/components/data/table/types.d.ts +12 -0
  79. package/types/src/components/data/tag/example/base.vue.d.ts +3 -0
  80. package/types/src/components/data/tag/index.d.ts +1 -0
  81. package/types/src/components/data/tag/tag.vue.d.ts +20 -0
  82. package/types/src/components/data/tree/example/base.vue.d.ts +3 -0
  83. package/types/src/components/data/tree/index.d.ts +2 -0
  84. package/types/src/components/data/tree/tree-item.vue.d.ts +36 -0
  85. package/types/src/components/data/tree/tree-raw.vue.d.ts +47 -0
  86. package/types/src/components/data/tree/tree.vue.d.ts +34 -0
  87. package/types/src/components/data/tree/type.d.ts +40 -0
  88. package/types/src/components/data/tree/utils.d.ts +10 -0
  89. package/types/src/components/form/checkbox/checkbox.vue.d.ts +32 -0
  90. package/types/src/components/form/checkbox/example/base.vue.d.ts +3 -0
  91. package/types/src/components/form/checkbox/example/group.vue.d.ts +3 -0
  92. package/types/src/components/form/checkbox/index.d.ts +1 -0
  93. package/types/src/components/form/index.d.ts +5 -0
  94. package/types/src/components/form/input/example/base.vue.d.ts +3 -0
  95. package/types/src/components/form/input/index.d.ts +1 -0
  96. package/types/src/components/form/input/input.vue.d.ts +17 -0
  97. package/types/src/components/form/select/example/base.vue.d.ts +3 -0
  98. package/types/src/components/form/select/example/tree-select.vue.d.ts +3 -0
  99. package/types/src/components/form/select/index.d.ts +2 -0
  100. package/types/src/components/form/select/select.vue.d.ts +25 -0
  101. package/types/src/components/form/select/types.d.ts +25 -0
  102. package/types/src/components/form/slider/example/base.vue.d.ts +3 -0
  103. package/types/src/components/form/slider/index.d.ts +1 -0
  104. package/types/src/components/form/slider/slider.vue.d.ts +19 -0
  105. package/types/src/components/form/switch/example/base.vue.d.ts +3 -0
  106. package/types/src/components/form/switch/index.d.ts +1 -0
  107. package/types/src/components/form/switch/switch.vue.d.ts +17 -0
  108. package/types/src/components/index.d.ts +5 -0
  109. package/types/src/components/layout/index.d.ts +2 -0
  110. package/types/src/components/layout/layout/index.d.ts +42 -0
  111. package/types/src/components/layout/layout/layout-dividing.vue.d.ts +3 -0
  112. package/types/src/components/layout/layout/layout-main.vue.d.ts +15 -0
  113. package/types/src/components/layout/layout/layout.vue.d.ts +18 -0
  114. package/types/src/components/layout/page/Page.vue.d.ts +39 -0
  115. package/types/src/components/layout/page/index.d.ts +1 -0
  116. package/types/src/components/other/calendar/calendar.vue.d.ts +41 -0
  117. package/types/src/components/other/calendar/index.d.ts +1 -0
  118. package/types/src/components/other/index.d.ts +2 -0
  119. package/types/src/components/other/menu/index.d.ts +2 -0
  120. package/types/src/components/other/menu/index.vue.d.ts +46 -0
  121. package/types/src/components/other/menu/menu-h/index.vue.d.ts +19 -0
  122. package/types/src/components/other/menu/menu-h/menu-h-item.vue.d.ts +27 -0
  123. package/types/src/components/other/menu/menu-v/index.vue.d.ts +24 -0
  124. package/types/src/components/other/menu/types.d.ts +6 -0
  125. package/types/src/components/other/view-control/index.d.ts +1 -0
  126. package/types/src/components/other/view-control/view-control.vue.d.ts +20 -0
  127. package/types/src/context/index.d.ts +1 -0
  128. package/types/src/context/is-mobile.d.ts +4 -0
  129. package/types/src/icons/index.d.ts +4 -0
  130. package/types/src/index.d.ts +3 -0
  131. package/types/src/types.d.ts +2 -0
  132. package/types/src/utils/index.d.ts +6 -0
  133. package/types/src/utils/z-index.d.ts +1 -0
  134. package/types/vite.config.d.ts +2 -0
  135. package/build-ts/main.js +0 -63
  136. package/dist/demo.html +0 -8
  137. package/dist/star-ui.common.js +0 -33776
  138. package/dist/star-ui.common.js.map +0 -1
  139. package/dist/star-ui.umd.js +0 -33786
  140. package/dist/star-ui.umd.js.map +0 -1
  141. package/dist/star-ui.umd.min.js +0 -299
  142. package/dist/star-ui.umd.min.js.map +0 -1
  143. package/readme.md +0 -16
  144. package/src/components/button.vue +0 -34
  145. package/src/components/calendar.vue +0 -244
  146. package/src/components/call-render.tsx +0 -22
  147. package/src/components/card.vue +0 -126
  148. package/src/components/common/base-popper.vue +0 -132
  149. package/src/components/content/context-menu-box/index.vue +0 -117
  150. package/src/components/content/index.ts +0 -5
  151. package/src/components/content/menu/index.vue +0 -86
  152. package/src/components/content/menu/menu-h/index.vue +0 -68
  153. package/src/components/content/menu/menu-h/menu-h-child.vue +0 -74
  154. package/src/components/content/menu/menu-h/menu-h-item.vue +0 -66
  155. package/src/components/content/menu/menu-v/index.vue +0 -56
  156. package/src/components/content/modals/confirm.vue +0 -45
  157. package/src/components/content/modals/modal.vue +0 -110
  158. package/src/components/content/page.vue +0 -134
  159. package/src/components/form/form/form-item.vue +0 -116
  160. package/src/components/form/form/form.vue +0 -109
  161. package/src/components/form/form/index.ts +0 -2
  162. package/src/components/form/index.ts +0 -1
  163. package/src/components/input.vue +0 -89
  164. package/src/components/layout/auto-direction/index.vue +0 -28
  165. package/src/components/layout/index.ts +0 -1
  166. package/src/components/layout-h.vue +0 -34
  167. package/src/components/layout-main.vue +0 -25
  168. package/src/components/layout-v.vue +0 -36
  169. package/src/components/line-h.vue +0 -29
  170. package/src/components/line-v.vue +0 -29
  171. package/src/components/select.vue +0 -265
  172. package/src/components/slider.vue +0 -171
  173. package/src/components/switch.vue +0 -95
  174. package/src/components/table.vue +0 -59
  175. package/src/components/tree/index.vue +0 -116
  176. package/src/components/tree/tree-item.vue +0 -157
  177. package/src/components/view-control.vue +0 -83
  178. package/src/directives/is-focus.ts +0 -10
  179. package/src/func/download.ts +0 -15
  180. package/src/func/index.ts +0 -2
  181. package/src/func/modal/index.ts +0 -72
  182. package/src/global-style.css +0 -127
  183. package/src/icon-font/iconfont.css +0 -75
  184. package/src/icon-font/iconfont.eot +0 -0
  185. package/src/icon-font/iconfont.json +0 -114
  186. package/src/icon-font/iconfont.svg +0 -62
  187. package/src/icon-font/iconfont.ttf +0 -0
  188. package/src/icon-font/iconfont.woff +0 -0
  189. package/src/icon-font/iconfont.woff2 +0 -0
  190. package/src/main.ts +0 -57
  191. package/src/outher/index.ts +0 -8
  192. package/src/reg.ts +0 -129
  193. package/src/shims-vue.d.ts +0 -8
  194. package/src/types.d.ts +0 -15
  195. package/src/utils.ts +0 -24
  196. package/types/components/button.vue.d.ts +0 -5
  197. package/types/components/calendar.vue.d.ts +0 -26
  198. package/types/components/call-render.d.ts +0 -6
  199. package/types/components/card.vue.d.ts +0 -13
  200. package/types/components/common/base-popper.vue.d.ts +0 -21
  201. package/types/components/content/context-menu-box/index.vue.d.ts +0 -20
  202. package/types/components/content/index.d.ts +0 -5
  203. package/types/components/content/menu/index.vue.d.ts +0 -12
  204. package/types/components/content/menu/menu-h/index.vue.d.ts +0 -8
  205. package/types/components/content/menu/menu-h/menu-h-child.vue.d.ts +0 -7
  206. package/types/components/content/menu/menu-h/menu-h-item.vue.d.ts +0 -8
  207. package/types/components/content/menu/menu-v/index.vue.d.ts +0 -9
  208. package/types/components/content/modals/confirm.vue.d.ts +0 -7
  209. package/types/components/content/modals/modal.vue.d.ts +0 -12
  210. package/types/components/content/page.vue.d.ts +0 -9
  211. package/types/components/form/form/form-item.vue.d.ts +0 -22
  212. package/types/components/form/form/form.vue.d.ts +0 -24
  213. package/types/components/form/form/index.d.ts +0 -2
  214. package/types/components/form/index.d.ts +0 -1
  215. package/types/components/input.vue.d.ts +0 -17
  216. package/types/components/layout/auto-direction/index.vue.d.ts +0 -4
  217. package/types/components/layout/index.d.ts +0 -1
  218. package/types/components/layout-h.vue.d.ts +0 -4
  219. package/types/components/layout-main.vue.d.ts +0 -4
  220. package/types/components/layout-v.vue.d.ts +0 -4
  221. package/types/components/line-h.vue.d.ts +0 -4
  222. package/types/components/line-v.vue.d.ts +0 -4
  223. package/types/components/select.vue.d.ts +0 -26
  224. package/types/components/slider.vue.d.ts +0 -29
  225. package/types/components/switch.vue.d.ts +0 -12
  226. package/types/components/table.vue.d.ts +0 -5
  227. package/types/components/tree/index.vue.d.ts +0 -15
  228. package/types/components/tree/tree-item.vue.d.ts +0 -18
  229. package/types/components/view-control.vue.d.ts +0 -16
  230. package/types/directives/is-focus.d.ts +0 -4
  231. package/types/func/download.d.ts +0 -1
  232. package/types/func/index.d.ts +0 -2
  233. package/types/func/modal/index.d.ts +0 -13
  234. package/types/main.d.ts +0 -75
  235. package/types/outher/index.d.ts +0 -5
  236. package/types/reg.d.ts +0 -45
@@ -0,0 +1,60 @@
1
+ import { useIsMobile as e } from "../../../context/is-mobile.js";
2
+ import t from "../../other/menu/index.vue.js";
3
+ import n from "../../../icons/menu.svg_component.js";
4
+ import { createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, defineComponent as c, guardReactiveProps as l, normalizeClass as u, normalizeProps as d, openBlock as f, ref as p, renderSlot as m, unref as h, withCtx as g, withModifiers as _ } from "vue";
5
+ // src/components/layout/page/Page.vue?vue&type=script&setup=true&lang.ts
6
+ var v = { class: "star-ui su-page" }, y = { class: "su-ui su-page--header" }, b = {
7
+ key: 1,
8
+ class: "su-page--menu-box"
9
+ }, x = { class: "su-ui su-page--main" }, S = /*@__PURE__*/ c({
10
+ __name: "Page",
11
+ props: { menu: {} },
12
+ setup(c) {
13
+ let S = e(), C = p(!1);
14
+ return (e, p) => (f(), i("div", v, [
15
+ a("header", y, [
16
+ h(S) ? (f(), i("span", {
17
+ key: 0,
18
+ class: "star-ui-icon-font star-ui-icon-menu su-page--mobile-menu-open",
19
+ onClick: p[0] ||= (e) => C.value = !0
20
+ }, [s(h(n), { class: "star-ui-icon" })])) : r("", !0),
21
+ m(e.$slots, "header"),
22
+ h(S) ? r("", !0) : (f(), i("div", b, [s(h(t), {
23
+ menu: c.menu,
24
+ direction: "h"
25
+ }, o({ _: 2 }, [e.$slots.menu ? {
26
+ name: "default",
27
+ fn: g((t) => [m(e.$slots, "menu", d(l(t)))]),
28
+ key: "0"
29
+ } : e.$slots["menu-text"] ? {
30
+ name: "menu-text",
31
+ fn: g((t) => [m(e.$slots, "text", d(l(t)))]),
32
+ key: "1"
33
+ } : void 0]), 1032, ["menu"])]))
34
+ ]),
35
+ a("main", x, [m(e.$slots, "default")]),
36
+ h(S) ? (f(), i("div", {
37
+ key: 0,
38
+ class: u([
39
+ "su-ui",
40
+ "su-page--mobile-menu-box",
41
+ C.value ? "su-page--mobile-menu-box-open" : "su-page--mobile-menu-close"
42
+ ]),
43
+ onClick: p[2] ||= (e) => C.value = !1
44
+ }, [s(h(t), {
45
+ menu: c.menu,
46
+ direction: "v",
47
+ onClick: p[1] ||= _(() => {}, ["stop"])
48
+ }, o({ _: 2 }, [e.$slots.menu ? {
49
+ name: "default",
50
+ fn: g((t) => [m(e.$slots, "menu", d(l(t)))]),
51
+ key: "0"
52
+ } : e.$slots["menu-text"] ? {
53
+ name: "menu-text",
54
+ fn: g((t) => [m(e.$slots, "text", d(l(t)))]),
55
+ key: "1"
56
+ } : void 0]), 1032, ["menu"])], 2)) : r("", !0)
57
+ ]));
58
+ }
59
+ });
60
+ export { S as default };
@@ -0,0 +1,5 @@
1
+ import e from "./calendar.vue_vue_type_script_setup_true_lang.js";
2
+ /* empty css */
3
+ // src/components/other/calendar/calendar.vue
4
+ var t = e;
5
+ export { t as default };
@@ -0,0 +1,103 @@
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeProps as s, normalizeClass as c, normalizeStyle as l, openBlock as u, ref as d, renderList as f, renderSlot as p, shallowRef as m, toDisplayString as h } from "vue";
2
+ import g from "dayjs";
3
+ // src/components/other/calendar/calendar.vue?vue&type=script&setup=true&lang.ts
4
+ var _ = { class: "star-ui su-calendar star-ui-calendar" }, v = { class: "star-ui-calendar--display-month" }, y = { class: "star-ui-calendar--inner-head" }, b = ["onClick"], x = {
5
+ key: 0,
6
+ class: "star-ui-calendar--select"
7
+ }, S = { class: "star-ui-calendar--select-ctrl" }, C = { class: "star-ui-calendar--select-body" }, w = ["onClick"], T = {
8
+ key: 1,
9
+ class: "star-ui-calendar--select"
10
+ }, E = { class: "star-ui-calendar--select-body" }, D = ["onClick"], O = [
11
+ "Sun",
12
+ "Mon",
13
+ "Tue",
14
+ "Wed",
15
+ "Thu",
16
+ "Fri",
17
+ "Sat"
18
+ ], k = /*@__PURE__*/ o({
19
+ __name: "calendar",
20
+ props: {
21
+ displayMonth: {},
22
+ weekNames: { default: () => O },
23
+ weekOffset: { default: 0 }
24
+ },
25
+ emits: ["date-click"],
26
+ setup(o) {
27
+ let O = t(() => g(o.displayMonth)), k = t(() => O.value.year()), A = t(() => O.value.month()), j = m(g(o.displayMonth)), M = t(() => j.value.year()), N = d(!1), P = d(!1), F = t(() => {
28
+ let e = o.weekNames.map((e, t) => ({
29
+ display: e,
30
+ week: o.weekNames[t]
31
+ }));
32
+ return [...e.slice(o.weekOffset), ...e.slice(0, o.weekOffset)];
33
+ }), I = t(() => {
34
+ let e = [[]], t = e[0], n = g(j.value);
35
+ n = n.set("date", 1);
36
+ let r = n.day() - o.weekOffset;
37
+ r < 0 && (r += 7), n = n.add(-r, "days");
38
+ let i = !0;
39
+ for (; i || t.length < 7;) t.length == 7 && (t = [], e.push(t)), t.push({
40
+ display: n.date(),
41
+ isPrevious: i && j.value.month() != n.month(),
42
+ isNext: !i,
43
+ week: o.weekNames[n.day()],
44
+ date: g(n)
45
+ }), n = n.add(1, "days"), i = j.value.year() >= n.year() && j.value.month() >= n.month();
46
+ return e;
47
+ }), L = d(0);
48
+ return (t, o) => (u(), r("div", _, [
49
+ i("div", {
50
+ class: "star-ui-calendar--ctrl",
51
+ style: l({ opacity: N.value || P.value ? 0 : 1 })
52
+ }, [
53
+ i("div", { onClick: o[0] ||= (e) => j.value = j.value.add(-1, "y") }, "<<"),
54
+ i("div", { onClick: o[1] ||= (e) => j.value = j.value.add(-1, "M") }, "<"),
55
+ i("div", v, [
56
+ i("span", { onClick: o[2] ||= (e) => N.value = !0 }, h(j.value.format("YYYY")), 1),
57
+ o[8] ||= a(" - ", -1),
58
+ i("span", { onClick: o[3] ||= (e) => P.value = !0 }, h(j.value.format("MM")), 1)
59
+ ]),
60
+ i("div", { onClick: o[4] ||= (e) => j.value = j.value.add(1, "M") }, ">"),
61
+ i("div", { onClick: o[5] ||= (e) => j.value = j.value.add(1, "y") }, ">>")
62
+ ], 4),
63
+ i("table", {
64
+ cellspacing: "0",
65
+ cellpadding: "0",
66
+ style: l({ opacity: N.value || P.value ? 0 : 1 })
67
+ }, [i("tbody", null, [i("tr", y, [(u(!0), r(e, null, f(F.value, (e, t) => (u(), r("th", {
68
+ class: c(`star-ui-calendar--${e.week}`),
69
+ key: t
70
+ }, h(e.display), 3))), 128))]), (u(!0), r(e, null, f(I.value, (n, i) => (u(), r("tr", { key: i }, [(u(!0), r(e, null, f(n, (n, i) => (u(), r("td", {
71
+ key: i,
72
+ class: c([
73
+ "star-ui-calendar--inner-cell",
74
+ `star-ui-calendar--${n.week}`,
75
+ {
76
+ "star-ui-calendar--previous": n.isPrevious,
77
+ "star-ui-calendar--next": n.isNext
78
+ }
79
+ ]),
80
+ onClick: (e) => t.$emit("date-click", n.date)
81
+ }, [t.$slots.default ? p(t.$slots, "default", s({ ref_for: !0 }, n), void 0, void 0, 0) : (u(), r(e, { key: 1 }, [a(h(n.display), 1)], 64))], 10, b))), 128))]))), 128))])], 4),
82
+ N.value ? (u(), r("div", x, [i("div", S, [
83
+ i("div", { onClick: o[6] ||= (e) => j.value.add(-1, "y") }, "<<"),
84
+ o[9] ||= i("div", null, null, -1),
85
+ i("div", { onClick: o[7] ||= (e) => j.value.add(1, "y") }, ">>")
86
+ ]), i("div", C, [(u(), r(e, null, f(12, (e) => i("div", {
87
+ key: e,
88
+ class: c({ "now-sel": k.value + e - 6 + L.value * 12 === M.value }),
89
+ onClick: (t) => {
90
+ N.value = !1, L.value = 0, j.value = j.value.year(k.value + e - 6 + L.value * 12);
91
+ }
92
+ }, h(k.value + e - 6 + L.value * 12), 11, w)), 64))])])) : n("", !0),
93
+ P.value ? (u(), r("div", T, [i("div", E, [(u(), r(e, null, f(12, (e) => i("div", {
94
+ key: e,
95
+ class: c({ "now-sel": e - 1 === A.value }),
96
+ onClick: (t) => {
97
+ P.value = !1, j.value = j.value.month(e - 1);
98
+ }
99
+ }, h(e), 11, D)), 64))])])) : n("", !0)
100
+ ]));
101
+ }
102
+ });
103
+ export { k as default };
@@ -0,0 +1,5 @@
1
+ import e from "./index.vue_vue_type_script_setup_true_lang.js";
2
+ /* empty css */
3
+ // src/components/other/menu/index.vue
4
+ var t = e;
5
+ export { t as default };
@@ -0,0 +1,22 @@
1
+ import e from "./menu-h/index.vue.js";
2
+ import t from "./menu-v/index.vue.js";
3
+ import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, guardReactiveProps as u, normalizeProps as d, openBlock as f, renderSlot as p, resolveDynamicComponent as m, toDisplayString as h, withCtx as g } from "vue";
4
+ // src/components/other/menu/index.vue?vue&type=script&setup=true&lang.ts
5
+ var _ = ["href"], v = /*@__PURE__*/ l({
6
+ __name: "index",
7
+ props: {
8
+ menu: {},
9
+ direction: {}
10
+ },
11
+ setup(l) {
12
+ let v = r(() => l.direction === "h" ? e : t);
13
+ return (e, t) => (f(), i(m(v.value), {
14
+ menu: l.menu,
15
+ class: "star-ui su-menu star-ui-menu"
16
+ }, {
17
+ default: g((t) => [s("div", null, [e.$slots.item ? p(e.$slots, "default", d(u(t)), void 0, void 0, 0) : t.path ? (f(), o(n, { key: 1 }, [e.$slots.link ? p(e.$slots, "default", d(u(t)), void 0, void 0, 0) : a("", !0), s("a", { href: t.path }, [e.$slots.default ? p(e.$slots, "default", d(u(t)), void 0, void 0, 0) : (f(), o(n, { key: 1 }, [c(h(t.title), 1)], 64))], 8, _)], 64)) : e.$slots.default ? p(e.$slots, "default", d(u(t)), void 0, void 0, 2) : (f(), o(n, { key: 3 }, [c(h(t.title), 1)], 64))])]),
18
+ _: 3
19
+ }, 8, ["menu"]));
20
+ }
21
+ });
22
+ export { v as default };
@@ -0,0 +1,5 @@
1
+ import e from "./index.vue_vue_type_script_setup_true_lang.js";
2
+ /* empty css */
3
+ // src/components/other/menu/menu-h/index.vue
4
+ var t = e;
5
+ export { t as default };
@@ -0,0 +1,22 @@
1
+ import e from "./menu-h-item.vue.js";
2
+ import { Fragment as t, createBlock as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeProps as o, normalizeClass as s, openBlock as c, renderList as l, renderSlot as u, withCtx as d } from "vue";
3
+ // src/components/other/menu/menu-h/index.vue?vue&type=script&setup=true&lang.ts
4
+ var f = { class: /*@__PURE__*/ s([
5
+ "star-ui",
6
+ "star-ui-menu",
7
+ "star-ui-menu-h"
8
+ ]) }, p = { class: "star-ui star-ui-menu--item star-ui-menu-h--item" }, m = /*@__PURE__*/ a({
9
+ __name: "index",
10
+ props: { menu: {} },
11
+ setup(a) {
12
+ return (s, m) => (c(), r("div", f, [(c(!0), r(t, null, l(a.menu, (t) => (c(), n(e, {
13
+ key: t.path,
14
+ item: t,
15
+ childDirection: "bottom"
16
+ }, {
17
+ default: d((e) => [i("div", p, [u(s.$slots, "default", o({ ref_for: !0 }, e))])]),
18
+ _: 3
19
+ }, 8, ["item"]))), 128))]));
20
+ }
21
+ });
22
+ export { m as default };
@@ -0,0 +1,5 @@
1
+ import e from "./menu-h-item.vue_vue_type_script_setup_true_lang.js";
2
+ /* empty css */
3
+ // src/components/other/menu/menu-h/menu-h-item.vue
4
+ var t = e;
5
+ export { t as default };
@@ -0,0 +1,30 @@
1
+ import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, guardReactiveProps as a, mergeProps as o, normalizeClass as s, normalizeProps as c, openBlock as l, renderList as u, renderSlot as d, resolveComponent as f, withCtx as p } from "vue";
2
+ // src/components/other/menu/menu-h/menu-h-item.vue?vue&type=script&setup=true&lang.ts
3
+ var m = { class: "star-ui star-ui-menu--item-box star-ui-menu-h--item-box" }, h = /*@__PURE__*/ i({
4
+ __name: "menu-h-item",
5
+ props: {
6
+ item: {},
7
+ childDirection: { default: "right" }
8
+ },
9
+ setup(i) {
10
+ return (h, g) => {
11
+ let _ = f("MenuHItem", !0);
12
+ return l(), r("div", m, [d(h.$slots, "default", c(a(i.item))), i.item.children?.length ? (l(), r("div", {
13
+ key: 0,
14
+ class: s([
15
+ "star-ui",
16
+ "star-ui-menu--child-box",
17
+ "star-ui-menu-h--child-box",
18
+ `star-ui-menu-h--child-box-${i.childDirection}`
19
+ ])
20
+ }, [(l(!0), r(e, null, u(i.item.children, (e) => (l(), t(_, {
21
+ key: e.path,
22
+ item: e
23
+ }, {
24
+ default: p((e) => [d(h.$slots, "default", o({ ref_for: !0 }, e))]),
25
+ _: 2
26
+ }, 1032, ["item"]))), 128))], 2)) : n("", !0)]);
27
+ };
28
+ }
29
+ });
30
+ export { h as default };
@@ -0,0 +1,4 @@
1
+ import e from "./index.vue_vue_type_script_setup_true_lang.js";
2
+ // src/components/other/menu/menu-v/index.vue
3
+ var t = e;
4
+ export { t as default };
@@ -0,0 +1,32 @@
1
+ import e from "../../../../icons/home.svg_component.js";
2
+ import { Fragment as t, computed as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeProps as c, normalizeClass as l, openBlock as u, renderList as d, renderSlot as f, shallowRef as p, toDisplayString as m, unref as h } from "vue";
3
+ // src/components/other/menu/menu-v/index.vue?vue&type=script&setup=true&lang.ts
4
+ var g = { class: /*@__PURE__*/ l([
5
+ "star-ui",
6
+ "star-ui-menu",
7
+ "star-ui-menu-v"
8
+ ]) }, _ = ["onClick"], v = ["onClick"], y = /*@__PURE__*/ s({
9
+ __name: "index",
10
+ props: { menu: {} },
11
+ setup(s) {
12
+ let l = p([]), y = n(() => {
13
+ if (l.value.length == 0) return s.menu;
14
+ let e = l.value[l.value.length - 1], t = [...e.children || []];
15
+ return e.path && t.unshift(e), t;
16
+ });
17
+ function b(e) {
18
+ l.value = l.value.slice(0, e);
19
+ }
20
+ function x(e) {
21
+ e.children && e.children.length > 0 && (l.value.length == 0 || e != l.value[l.value.length - 1]) && l.value.push(e);
22
+ }
23
+ return (n, s) => (u(), r("div", g, [i("div", null, [i("span", { onClick: s[0] ||= (e) => b(0) }, [o(h(e), { class: "star-ui-icon" }), s[1] ||= a(">", -1)]), (u(!0), r(t, null, d(l.value, (e, t) => (u(), r("span", {
24
+ key: `${t}-${e.path || "nopath"}`,
25
+ onClick: (e) => b(t + 1)
26
+ }, m(e.title) + "> ", 9, _))), 128))]), (u(!0), r(t, null, d(y.value, (e) => (u(), r("div", {
27
+ key: e.path,
28
+ onClick: (t) => x(e)
29
+ }, [f(n.$slots, "default", c({ ref_for: !0 }, e))], 8, v))), 128))]));
30
+ }
31
+ });
32
+ export { y as default };
@@ -0,0 +1,10 @@
1
+ import { computed as e, inject as t, provide as n } from "vue";
2
+ // src/context/is-mobile.ts
3
+ var r = Symbol("SuViewCtrlInjectKeyIsMobile");
4
+ function i() {
5
+ return t(r, e(() => !1));
6
+ }
7
+ function a(e) {
8
+ n(r, e);
9
+ }
10
+ export { r as SuViewCtrlInjectKeyIsMobile, a as provideIsMobile, i as useIsMobile };
@@ -0,0 +1,12 @@
1
+ import { createElementBlock as e, createElementVNode as t, openBlock as n } from "vue";
2
+ // src/icons/arrow-down.svg?component
3
+ var r = {
4
+ viewBox: "0 0 1024 1024",
5
+ version: "1.1",
6
+ xmlns: "http://www.w3.org/2000/svg"
7
+ };
8
+ function i(i, a) {
9
+ return n(), e("svg", r, [...a[0] ||= [t("path", { d: "M904.533333 311.466667c-17.066667-17.066667-42.666667-17.066667-59.733333 0L512 644.266667 179.2 311.466667c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733333l362.666666 362.666667c8.533333 8.533333 19.2 12.8 29.866667 12.8s21.333333-4.266667 29.866667-12.8l362.666666-362.666667c17.066667-17.066667 17.066667-42.666667 0-59.733333z" }, null, -1)]]);
10
+ }
11
+ var a = { render: i };
12
+ export { a as default, i as render };
@@ -0,0 +1,12 @@
1
+ import { createElementBlock as e, createElementVNode as t, openBlock as n } from "vue";
2
+ // src/icons/arrow-right.svg?component
3
+ var r = {
4
+ viewBox: "0 0 1024 1024",
5
+ version: "1.1",
6
+ xmlns: "http://www.w3.org/2000/svg"
7
+ };
8
+ function i(i, a) {
9
+ return n(), e("svg", r, [...a[0] ||= [t("path", { d: "M731.733333 480l-384-341.333333c-17.066667-14.933333-44.8-14.933333-59.733333 4.266666-14.933333 17.066667-14.933333 44.8 4.266667 59.733334L640 512 292.266667 821.333333c-17.066667 14.933333-19.2 42.666667-4.266667 59.733334 8.533333 8.533333 19.2 14.933333 32 14.933333 10.666667 0 19.2-4.266667 27.733333-10.666667l384-341.333333c8.533333-8.533333 14.933333-19.2 14.933334-32s-4.266667-23.466667-14.933334-32z" }, null, -1)]]);
10
+ }
11
+ var a = { render: i };
12
+ export { a as default, i as render };
@@ -0,0 +1,12 @@
1
+ import { createElementBlock as e, createElementVNode as t, openBlock as n } from "vue";
2
+ // src/icons/home.svg?component
3
+ var r = {
4
+ viewBox: "0 0 1024 1024",
5
+ version: "1.1",
6
+ xmlns: "http://www.w3.org/2000/svg"
7
+ };
8
+ function i(i, a) {
9
+ return n(), e("svg", r, [...a[0] ||= [t("path", { d: "M96 480c-9.6 0-19.2-3.2-25.6-12.8-12.8-12.8-9.6-35.2 3.2-44.8l377.6-310.4c35.2-25.6 86.4-25.6 118.4 0l377.6 307.2c12.8 9.6 16 32 3.2 44.8-12.8 12.8-32 16-44.8 3.2L531.2 166.4c-9.6-6.4-28.8-6.4-38.4 0L115.2 473.6c-6.4 6.4-12.8 6.4-19.2 6.4zM816 928H608c-19.2 0-32-12.8-32-32v-150.4c0-22.4-38.4-44.8-67.2-44.8-28.8 0-64 19.2-64 44.8V896c0 19.2-12.8 32-32 32H211.2C163.2 928 128 892.8 128 848V544c0-19.2 12.8-32 32-32s32 12.8 32 32v304c0 9.6 6.4 16 19.2 16H384v-118.4c0-64 67.2-108.8 128-108.8s131.2 44.8 131.2 108.8V864h176c9.6 0 16 0 16-19.2V544c0-19.2 12.8-32 32-32s32 12.8 32 32v304C896 896 864 928 816 928z" }, null, -1)]]);
10
+ }
11
+ var a = { render: i };
12
+ export { a as default, i as render };
@@ -0,0 +1,12 @@
1
+ import { createElementBlock as e, createElementVNode as t, openBlock as n } from "vue";
2
+ // src/icons/menu.svg?component
3
+ var r = {
4
+ viewBox: "0 0 1024 1024",
5
+ version: "1.1",
6
+ xmlns: "http://www.w3.org/2000/svg"
7
+ };
8
+ function i(i, a) {
9
+ return n(), e("svg", r, [...a[0] ||= [t("path", { d: "M148.7872 57.4464h177.152c64.9216 0 118.0672 53.1456 118.0672 118.0672v295.2192H148.7872C83.8656 470.7328 30.72 417.5872 30.72 352.5632v-177.152C30.72 110.592 83.8656 57.4464 148.7872 57.4464z m0 531.3536h295.2192v295.2192c0 64.9216-53.1456 118.0672-118.0672 118.0672h-177.152C83.8656 1001.984 30.72 948.9408 30.72 883.9168v-177.152C30.72 641.9456 83.8656 588.8 148.7872 588.8z m0 0M768.7168 559.2064L562.0736 346.7264c-23.6544-17.7152-35.4304-53.1456-35.4304-82.6368s11.776-59.0848 35.4304-82.6368L686.08 57.4464C733.2864 10.24 810.0864 10.24 851.3536 57.4464l124.0064 124.0064c23.6544 23.6544 35.4304 53.1456 35.4304 82.6368s-11.776 59.0848-35.4304 82.6368L768.7168 559.2064z m0-478.208c-17.7152 0-29.4912 5.9392-41.3696 17.7152l-123.904 124.0064c-11.776 11.776-17.7152 23.6544-17.7152 41.3696s5.9392 29.4912 17.7152 41.3696l165.2736 165.2736 165.2736-165.2736c11.776-11.776 17.7152-23.6544 17.7152-41.3696s-5.9392-29.4912-17.7152-41.3696L809.984 98.7136c-11.776-11.776-23.552-17.7152-41.2672-17.7152z m0 0" }, null, -1), t("path", { d: "M562.0736 588.8h295.2192c64.9216 0 118.0672 53.1456 118.0672 118.0672v177.152c0 64.9216-53.1456 118.0672-118.0672 118.0672h-177.152c-64.9216 0-118.0672-53.1456-118.0672-118.0672V588.8z m0 0" }, null, -1)]]);
10
+ }
11
+ var a = { render: i };
12
+ export { a as default, i as render };
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ /* empty css */
2
+ import e from "./components/base/button/button.vue.js";
3
+ import t from "./components/data/card/card.vue.js";
4
+ import n from "./components/data/table/table.vue.js";
5
+ import r from "./components/form/input/input.vue.js";
6
+ import { SuViewCtrlInjectKeyIsMobile as i, provideIsMobile as a, useIsMobile as o } from "./context/is-mobile.js";
7
+ import s from "./components/data/popover/popover.vue.js";
8
+ import c from "./components/form/select/select.vue.js";
9
+ import l from "./components/form/switch/switch.vue.js";
10
+ import u from "./components/form/slider/slider.vue.js";
11
+ import d from "./components/form/checkbox/checkbox.vue.js";
12
+ import f from "./components/data/tree/tree.vue.js";
13
+ import p from "./components/data/tag/tag.vue.js";
14
+ import m from "./components/data/pagination/pagination.vue.js";
15
+ import h from "./components/other/menu/index.vue.js";
16
+ import g from "./components/other/calendar/calendar.vue.js";
17
+ import _ from "./components/layout/page/Page.vue.js";
18
+ import { Layout as v } from "./components/layout/layout/index.js";
19
+ export { e as Button, g as Calender, t as Card, d as CheckBox, r as Input, v as Layout, h as Menu, _ as Page, m as Pagination, s as Popover, c as Select, u as Slider, i as SuViewCtrlInjectKeyIsMobile, l as Switch, n as Table, p as Tag, f as Tree, a as provideIsMobile, o as useIsMobile };
package/dist/style.css ADDED
@@ -0,0 +1,2 @@
1
+ @layer star-ui-base{:root{--star-ui-background-color-primary:#fff;--star-ui-background-color-dark:#0c0440;--star-ui-primary-color:#0c81ff;--star-ui-primary-inner-text-color:#fff;--star-ui-success-color:#67c23a;--star-ui-success-inner-text-color:#fff;--star-ui-warning-color:#e6a23c;--star-ui-warning-inner-text-color:#fff;--star-ui-danger-color:#f56c6c;--star-ui-danger-inner-text-color:#fff;--star-ui-info-color:#909399;--star-ui-info-inner-text-color:#fff;--star-ui-disabled-color:#c0c4cc;--star-ui-text-color-primary:#222;--star-ui-text-color-label:#555;--star-ui-text-color-weak:#555;--star-ui-text-color-placeholder:#c0c4cc;--star-ui-text-color-in-dark:#fff;--star-ui-border-color-base:#e8eaec;--star-ui-border-color-bold:#a1a8af;--star-ui-border-radius-base:5px;--star-ui-mask-color:#00000080;--star-ui-table-head-color:#f8f8f9;--star-ui-line-color:#8af;--star-ui-regular-text-color:#606266;--star-ui-line-width:1px;--star-ui-input-border-color:#666;--star-ui-input-medium-font-size:16px;--star-ui-input-small-font-size:14px;--star-ui-input-mini-font-size:12px;--star-ui-input-default-width:280px;--star-ui-default-padding:5px}.dark-mode{--star-ui-background-color:#555}}@layer star-ui-common{.star-ui{box-sizing:border-box;margin:0;padding:0;position:relative}.star-ui-icon{fill:currentColor;vertical-align:middle;width:1em;height:1em}.star-ui-container{padding:var(--star-ui-default-padding)}.star-ui-placeholder{color:var(--star-ui-text-color-placeholder)}}@layer star-ui-size{.star-ui-size-medium{--font-size:var(--star-ui-input-medium-font-size);font-size:var(--font-size);--line-height:calc(var(--star-ui-input-medium-font-size) + 2px);line-height:var(--line-height);--padding:var(--star-ui-default-padding);padding:var(--padding);--border-radius:var(--star-ui-border-radius-base);border-radius:var(--border-radius);border:1px solid #0000}.star-ui-size-small{--font-size:var(--star-ui-input-small-font-size);font-size:var(--font-size);--line-height:calc(var(--star-ui-input-small-font-size) + 2px);line-height:var(--line-height);--padding:calc(var(--star-ui-default-padding) / 2);padding:var(--padding);--border-radius:var(--star-ui-border-radius-base);border-radius:var(--border-radius);border:1px solid #0000}.star-ui-size-mini{--font-size:var(--star-ui-input-mini-font-size);font-size:var(--font-size);--line-height:calc(var(--star-ui-input-mini-font-size) + 2px);line-height:var(--line-height);--padding:calc(var(--star-ui-default-padding) / 2);padding:var(--padding);--border-radius:var(--star-ui-border-radius-base);border-radius:var(--border-radius);border:1px solid #0000}}@layer star-ui-color{.star-ui-color-text-default{--bg-color:transparent;--text-color:var(--star-ui-text-color-primary)}.star-ui-color-text-primary{--bg-color:transparent;--text-color:var(--star-ui-primary-color)}.star-ui-color-text-success{--bg-color:transparent;--text-color:var(--star-ui-success-color)}.star-ui-bcolor-text-warning{--bg-color:transparent;--text-color:var(--star-ui-warning-color)}.star-ui-color-text-danger{--bg-color:transparent;--text-color:var(--star-ui-danger-color)}.star-ui-color-text-info{--bg-color:transparent;--text-color:var(--star-ui-info-color)}.star-ui-color-bg-default{--bg-color:transparent;--text-color:var(--star-ui-text-color-primary)}.star-ui-color-bg-primary{--bg-color:var(--star-ui-primary-color);--text-color:var(--star-ui-primary-inner-text-color)}.star-ui-color-bg-success{--bg-color:var(--star-ui-success-color);--text-color:var(--star-ui-success-inner-text-color)}.star-ui-color-bg-warning{--bg-color:var(--star-ui-warning-color);--text-color:var(--star-ui-warning-inner-text-color)}.star-ui-color-bg-danger{--bg-color:var(--star-ui-danger-color);--text-color:var(--star-ui-danger-inner-text-color)}.star-ui-color-bg-info{--bg-color:var(--star-ui-info-color);--text-color:var(--star-ui-info-inner-text-color)}.star-ui-block-theme-apply-bg{background-color:var(--bg-color)}.star-ui-block-theme-apply-text{color:var(--text-color)}}.star-ui-button{cursor:pointer;--main-color:var(--star-ui-background-color-primary);--button-bg-color:var(--bg-color);--button-text-color:var(--text-color);--button-border-color:var(--bg-color,var(--star-ui-border-color-bold));background:var(--button-bg-color);color:var(--button-text-color);border-color:var(--button-border-color);text-align:center}a.star-ui-button{text-decoration:none}.star-ui-button.star-ui-color-bg-default{--button-border-color:var(--star-ui-border-color-bold)}.star-ui-button:hover{background-color:hsl(from var(--button-bg-color) h calc(1.1 * s) calc(.95 * l) / alpha);color:hsl(from var(--button-text-color) h calc(1.1 * s) calc(.95 * l) / alpha);border-color:hsl(from var(--button-border-color) h calc(1.1 * s) calc(.95 * l) / alpha)}.star-ui-button:active{background-color:hsl(from var(--button-bg-color) h calc(1.2 * s) l / alpha);color:hsl(from var(--button-text-color) h calc(1.2 * s) l / alpha);border-color:hsl(from var(--button-border-color) h calc(1.2 * s) calc(.9 * l) / alpha)}.star-ui-button[disabled]{background-color:color-mix(in srgb, var(--button-bg-color), var(--star-ui-disabled-color));color:color-mix(in srgb, var(--button-text-color), var(--star-ui-disabled-color));border-color:color-mix(in srgb, var(--button-border-color), var(--star-ui-disabled-color));cursor:not-allowed}.star-ui-card{border:1px solid var(--star-ui-border-color-base);border-radius:var(--star-ui-border-radius-base);flex-direction:column;display:flex}.star-ui-card--inner-head{flex-direction:row;display:flex}.star-ui-card--inner-title{flex-grow:1}.star-ui-card--inner-button-collapsible{border:1px solid var(--star-ui-primary-color);border-radius:50%;width:0;height:0;margin:2px;padding:10px;display:inline-block}.star-ui-card--inner-button-collapsible:after{content:" ";border-color:var(--star-ui-primary-color);border-style:solid;border-left-width:5px;border-left-color:#0000;border-right-width:5px;border-right-color:#0000;width:0;height:0;padding:0;transition:border-top-width .5s,border-bottom-width .5s;position:absolute;top:8px;left:5px}.star-ui-card--inner-button-collapsible.hidden:after{border-top-width:0;border-bottom-width:5px}.star-ui-card--inner-button-collapsible.show:after{border-top-width:5px;border-bottom-width:0}.star-ui-card--inner-body{flex-grow:1;transition:height .5s;overflow:hidden}.star-ui-card--inner-body-inner{overflow:auto}.star-ui-table{width:100%}.star-ui-table--inner-thead{background-color:var(--star-ui-table-head-color)}.star-ui-table--inner-tr{border-bottom:1px solid #e8eaec}.star-ui-input{width:var(--star-ui-input-default-width);color:var(--star-ui-regular-text-color);border-color:var(--star-ui-border-color-base);--bg-color:transparent;background-color:var(--bg-color);flex-direction:row;display:inline-flex;overflow:hidden}.star-ui-input:hover,.star-ui-input:focus-within{border-color:var(--star-ui-primary-color)}.star-ui-input--inner,.star-ui-input--inner:hover,.star-ui-input--inner:active,.star-ui-input--inner:focus{color:unset;background:unset;width:100%;font-size:inherit;line-height:inherit;border-width:0;outline:none;flex:1;margin:0}.star-ui-input.disabled{border-color:var(--star-ui-border-color-base);background-color:color-mix(var(--bg-color), var(--star-ui-disabled-color));cursor:not-allowed}.star-ui-input.disabled .star-ui-input--inner{cursor:not-allowed}.star-ui-popper{--backgraund-color:var(--star-ui-background-color-primary);--border-color:var(--star-ui-border-color-bold);transition:all .2s;position:absolute}.star-ui-popper--position-fixed{position:fixed}.star-ui-popper.hidden{pointer-events:none;opacity:0}.star-ui-popper.visible{opacity:1}.star-ui-popper.pc:before{content:"";pointer-events:none;border:4px solid #0000;position:absolute}.star-ui-popper.pc.placement-x-before:before{border-left-color:var(--border-color);left:100%}.star-ui-popper.pc.placement-x-start:before{left:calc(var(--reference-width,10px) / 2);transform:translate(-50%)}.star-ui-popper.pc.placement-x-center:before{left:50%;transform:translate(-50%)}.star-ui-popper.pc.placement-x-end:before{right:calc(var(--reference-width,10px) / 2);transform:translate(50%)}.star-ui-popper.pc.placement-x-after:before{border-right-color:var(--border-color);right:100%}.star-ui-popper.pc.placement-y-before:before{border-top-color:var(--border-color);top:100%}.star-ui-popper.pc.placement-y-start:before{top:calc(var(--reference-height,10px) / 2);transform:translateY(-50%)}.star-ui-popper.pc.placement-y-center:before{top:50%;transform:translateY(-50%)}.star-ui-popper.pc.placement-y-end:before{bottom:calc(var(--reference-height,10px) / 2);transform:translateY(50%)}.star-ui-popper.pc.placement-y-after:before{border-bottom-color:var(--border-color);bottom:100%}.star-ui-popper-box{border-radius:var(--star-ui-border-radius-base);background:var(--backgraund-color);border:1px solid var(--border-color)}.star-ui-popper.mobile .star-ui-popper-box{border-bottom-right-radius:0;border-bottom-left-radius:0;transition:all .2s;position:fixed;bottom:0;left:0;right:0}.star-ui-popper.mobile.hidden .star-ui-popper-box{transform:translateY(100%)}.star-ui-popper.mobile.visible .star-ui-popper-box{transform:translateY(0)}.star-ui-popper-background{background-color:#00000080;width:100%;height:100%;position:fixed;top:0;left:0}.star-ui-checkbox{cursor:pointer;gap:var(--star-ui-default-padding);align-items:center;display:inline-flex}.star-ui-checkbox>input{display:none}.star-ui-checkbox--inner{--unchecked-background-color:transparent;--checked-background-color:var(--star-ui-primary-color);--checked-icon-color:var(--star-ui-background-color-primary);border-radius:inherit;border:inherit;border-color:var(--star-ui-border-color-base);--bg-color:var(--unchecked-background-color);background-color:var(--bg-color);width:1em;height:1em;display:inline-block;position:relative}input:checked+.star-ui-checkbox--inner,.star-ui-checkbox--inne-indeterminate{--bg-color:var(--checked-background-color)}.star-ui-checkbox--inner:after{content:"";border:0 solid var(--checked-icon-color);display:inline-block;position:absolute;top:50%;left:50%}input:checked+.star-ui-checkbox--inner:after{border-bottom-width:2px;border-left-width:2px;width:.5em;height:.15em;transform:translate(-50%,-70%)rotate(-45deg)}.star-ui-checkbox--inne-indeterminate:after{border-bottom-width:2px;width:.6em;height:0;transform:translate(-50%,-50%)}.star-ui-checkbox.disabled{cursor:not-allowed}.star-ui-checkbox.disabled .star-ui-checkbox--inner{background-color:color-mix(var(--bg-color), var(--star-ui-disabled-color))}.star-ui-tree-item-label{flex-direction:row;display:flex}.star-ui-tree-item-label>div{cursor:pointer;flex:1 1 0}.star-ui-tree-item-child{margin-left:1em}.star-ui-tree-expand-button{font-size:inherit;cursor:pointer;width:1em;height:100%;transition:all .2s;display:inline-block;transform:rotate(0)}.star-ui-tree-expand-button.expend{transform:rotate(90deg)}.star-ui-tree-expand-button.no-child{opacity:0;cursor:initial;pointer-events:none}.star-ui-tree--checkbox{margin-right:.2em;padding:0}.star-ui-tree-highlight-current .star-ui-tree-current{background-color:var(--star-ui-primary-color)}.star-ui-tag{display:inline-block}.star-ui-select{width:var(--star-ui-input-default-width);color:var(--star-ui-regular-text-color);border-color:var(--star-ui-border-color-base);--bg-color:transparent;background-color:var(--bg-color);cursor:pointer;flex-direction:row;display:inline-flex;position:relative;overflow:hidden}.star-ui-select--multiple-tag{border:0;margin:-2px 0;padding:2px 5px}.star-ui-select:hover,.star-ui-select--open{border-color:var(--star-ui-primary-color)}.star-ui-select.disabled{border-color:var(--star-ui-border-color-base);background-color:color-mix(var(--bg-color), var(--star-ui-disabled-color));cursor:not-allowed}.star-ui-select--append{align-items:center;display:inline-flex}.star-ui-select--dropdown-icon{transition:all .2s;transform:rotate(0)}.star-ui-select--open .star-ui-select--dropdown-icon{transform:rotate(180deg)}.star-ui-select--dropdown{max-height:200px;padding:var(--star-ui-default-padding);overflow:auto}.star-ui-select--dropdown.star-ui-select--list .star-ui-tree-expand-button{display:none}.star-ui-select--dropdown.star-ui-select--single .star-ui-tree-item-label:hover{background-color:var(--star-ui-primary-color)}.star-ui-select--content{gap:var(--padding);flex-wrap:wrap;flex:1 1 0;display:flex;position:relative}.star-ui-select--filter{background-color:#0000;border:none;outline:none;width:100%;position:absolute;top:0;left:0}.star-ui-switch{--active-color:var(--star-ui-primary-color);border-color:#0000;width:2.8em;display:inline-block;position:relative}.star-ui-switch:before{content:"​"}.star-ui-switch label{height:100%;display:contents}.star-ui-switch input{display:none}.star-ui-switch div{border:1px solid var(--star-ui-border-color-base);cursor:pointer;--current-color:transparent;background-color:var(--current-color);border-radius:1em;width:100%;height:80%;transition:all .2s;display:inline-block;position:absolute;top:10%}.star-ui-switch div span{--padding:2px;height:calc(100% - 2 * calc(var(--padding) + 1px));top:var(--padding);left:var(--padding);aspect-ratio:1;border:solid 1px var(--star-ui-border-color-base);background:var(--star-ui-background-color-primary);border-radius:50%;transition:all .2s;display:inline-block;position:absolute}.star-ui-switch input:checked+div{--current-color:var(--active-color)}.star-ui-switch input:checked+div span{transform:translateX(calc(2.8em - var(--padding) * 2 - 2px - 100%))}.star-ui-switch input:disabled+div{background-color:color-mix(in srgb, var(--current-color), var(--star-ui-disabled-color));cursor:not-allowed}.su-slider{padding:calc(var(--star-ui-input-medium-font-size));-webkit-user-select:none;user-select:none}.su-slider--inner-runway{background-color:var(--star-ui-border-color-bold);cursor:pointer;border-radius:100px;height:4px}.su-slider--inner-button-wrapper{width:var(--star-ui-input-medium-font-size);height:var(--star-ui-input-medium-font-size);border:1px solid var(--star-ui-border-color-base);margin-left:calc(2px - var(--star-ui-input-medium-font-size) / 2);top:calc(2px - var(--star-ui-input-medium-font-size) / 2);cursor:pointer;background-color:var(--star-ui-background-color-primary);border-radius:50%;display:inline-block;position:relative}.su-slider .su-slider--inner-button-wrapper:hover,.su-slider.su-slider-moving .su-slider--inner-button-wrapper{transform:scale(1.2)}.su-slider-disabled .su-slider--inner-runway,.su-slider-disabled .su-slider--inner-button-wrapper{cursor:not-allowed}.su-slider-disabled .su-slider--inner-button-wrapper:hover{transform:scale(1)}.su-slider-disabled .su-slider--inner-button-wrapper{background-color:color-mix(in srgb, var(--star-ui-background-color-primary), var(--star-ui-disabled-color))}.star-ui-pagination{gap:var(--star-ui-default-padding);flex-direction:row;display:flex}.star-ui-pagination--button{width:2em}.star-ui-menu-h--item-box{height:100%;padding:0;transition:background-color .5s;position:relative;overflow:visible}.star-ui-menu-h--item-box:hover{background-color:#80808066}.star-ui-menu-h--item{flex-direction:row;justify-content:center;align-items:center;height:100%;padding:8px;display:flex}.star-ui-menu-h--child-box{background-color:var(--star-ui-background-color);opacity:0;pointer-events:none;transition:opacity .5s;position:absolute}:hover>.star-ui-menu-h--child-box{opacity:1;pointer-events:auto;display:block}.star-ui-menu-h--child-box-right{top:0;left:100%}.star-ui-menu-h--child-box-left{top:0;right:100%}.star-ui-menu-h--child-box-bottom{top:100%;left:0}.star-ui-menu-h--child-box{border:solid 1px var(--star-ui-line-color)}.star-ui-menu-h--child-box>.star-ui-menu-h--item-box>.star-ui-menu-h--item{border-bottom:solid 1px var(--star-ui-line-color)}.star-ui-menu-h--child-box>.star-ui-menu-h--item-box:last-child>.star-ui-menu-h--item{border-bottom-width:0}.star-ui-menu-h{white-space:nowrap;flex-direction:row;padding:0;display:flex;position:relative;overflow:visible}.star-ui-menu-h>.star-ui-menu-h--item-box>.star-ui-menu-h--item a{border:2px solid #0000;padding:2px;line-height:2;transition:border .5s}.star-ui-menu-h>.star-ui-menu-h--item-box:hover>.star-ui-menu-h--item a{border-bottom-color:var(--star-ui-base-color)}.star-ui-menu a{color:inherit;text-decoration:none}.star-ui-calendar{text-align:center;border:1px solid #e8eaec;display:inline-block}.star-ui-calendar--ctrl{flex-direction:row;display:flex}.star-ui-calendar--ctrl>*{cursor:pointer;padding:5px}.star-ui-calendar--display-month{cursor:default;flex:1 0 auto}.star-ui-calendar--display-month>span{cursor:pointer}.star-ui-calendar th,.star-ui-calendar td{padding:5px 0}.star-ui-calendar--inner-head{background-color:var(--star-ui-table-head-color)}.star-ui-calendar--inner-cell{border:1px solid #e8eaec;width:42px}.star-ui-calendar--inner-cell.star-ui-calendar--Sat,.star-ui-calendar--inner-cell.star-ui-calendar--Sun{color:red}.star-ui-calendar--inner-cell.star-ui-calendar--previous,.star-ui-calendar--inner-cell.star-ui-calendar--next{opacity:.5}.star-ui-calendar--select{background-color:inherit;flex-direction:column;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.star-ui-calendar--select-body{flex-grow:1;grid-template-rows:repeat(3,1fr);grid-template-columns:repeat(4,1fr);align-items:center;display:grid}.star-ui-calendar--select-body>*{cursor:pointer}.star-ui-calendar--select-body>:hover{color:var(--star-ui-base-color)}.star-ui-calendar--select-ctrl{flex-direction:row;justify-content:space-between;align-items:center;height:20%;display:flex}.star-ui-calendar--select-ctrl>*{cursor:pointer;padding:0 15px}.star-ui-calendar .now-sel{color:var(--star-ui-primary-color);font-weight:700}.su-page{flex-direction:column;width:100%;height:100%;margin:0;padding:0;display:flex}.su-page--header{color:#e6eaf0;background:#000;flex-direction:row;align-items:center;display:flex}.su-page--header>h1{padding:0 20px;font-size:20px;line-height:22px}.su-page--menu-box{z-index:999999;flex:1;height:100%}.su-page--menu-box .star-ui-menu-h--child-box{color:var(--star-ui-text-color-primary)}.su-page--menu-box .su-menu{height:100%}.su-page--mobile-menu-open{margin-left:15px;font-size:20px}.su-page--mobile-menu-box{background-color:#80808080;width:100%;height:100%;transition:opacity .5s;position:absolute;top:0;left:0}.su-page--mobile-menu-close{pointer-events:none;opacity:0}.su-page--mobile-menu-box .star-ui-menu-v{background-color:var(--star-ui-background-color-primary);border-right:solid 1px var(--star-ui-line-color);width:80%;height:100%;margin-left:0;transition:margin-left .5s}.su-page--mobile-menu-close .star-ui-menu-v{margin-left:-100%}.su-page--main{flex:1;overflow:auto}.su-layout{width:100%;height:100%;padding:0;display:flex;overflow:hidden}.su-layout-h{flex-direction:row}.su-layout-v{flex-direction:column}.su-layout>*{flex:none}.star-ui-main{flex:1 1 0}.su-layout-dividing{background-color:var(--star-ui-border-color-base);flex:0 0 1px}
2
+ /*$vite$:1*/
@@ -0,0 +1,9 @@
1
+ import { getNewIndex as e } from "./z-index.js";
2
+ // src/utils/index.ts
3
+ function t(e) {
4
+ switch (typeof e) {
5
+ case "string": return (t) => t[e];
6
+ case "function": return e;
7
+ }
8
+ }
9
+ export { e as getNewIndex, t as getObjectKeyFn };
@@ -0,0 +1,6 @@
1
+ // src/utils/z-index.ts
2
+ var e = 1e3;
3
+ function t() {
4
+ return e++;
5
+ }
6
+ export { t as getNewIndex };
package/package.json CHANGED
@@ -1,81 +1,38 @@
1
- {
2
- "name": "@thestarweb/ui",
3
- "version": "1.7.1",
4
- "description": "A UI lib",
5
- "scripts": {
6
- "build": "vue-cli-service build --modern --target lib --name star-ui --dest dist/ src/main.ts",
7
- "tsc": "node ./build-ts/main.js&&tsc --p ./tsdconfig.json"
8
- },
9
- "author": "star_ss",
10
- "bugs": {
11
- "url": "https://github.com/thestarweb/star-ui/issues"
12
- },
13
- "homepage": "https://ui.thestarweb.cn",
14
- "keywords": [
15
- "UI",
16
- "Vue",
17
- "Vue3",
18
- "TypeScript"
19
- ],
20
- "license": "MIT",
21
- "main": "dist/star-ui.umd.min.js",
22
- "types": "types/main.d.ts",
23
- "repository": {
24
- "type": "git",
25
- "url": "git+https://github.com/thestarweb/star-ui.git"
26
- },
27
- "files": [
28
- "src",
29
- "dist",
30
- "types",
31
- "build-ts"
32
- ],
33
- "dependencies": {
34
- "core-js": "^3.15.2",
35
- "moment": "^2.29.1",
36
- "vue-class-component": "^8.0.0-0"
37
- },
38
- "peerDependencies": {
39
- "vue": "^3.1.5"
40
- },
41
- "devDependencies": {
42
- "@typescript-eslint/eslint-plugin": "^4.28.4",
43
- "@typescript-eslint/parser": "^4.28.4",
44
- "@vue/cli-plugin-babel": "^4.5.13",
45
- "@vue/cli-plugin-eslint": "^4.5.13",
46
- "@vue/cli-plugin-typescript": "^4.5.13",
47
- "@vue/cli-service": "^4.5.13",
48
- "@vue/compiler-sfc": "^3.1.5",
49
- "@vue/eslint-config-typescript": "^7.0.0",
50
- "eslint": "^6.7.2",
51
- "eslint-plugin-vue": "^7.14.0",
52
- "typescript": "~4.1.6",
53
- "vue": "^3.1.5",
54
- "vue-dts-gen": "^0.2.3",
55
- "vue-property-decorator": "^10.0.0-rc.3"
56
- },
57
- "eslintConfig": {
58
- "root": true,
59
- "env": {
60
- "node": true
61
- },
62
- "extends": [
63
- "plugin:vue/vue3-essential",
64
- "eslint:recommended",
65
- "@vue/typescript/recommended"
66
- ],
67
- "parserOptions": {
68
- "ecmaVersion": 2020
69
- },
70
- "rules": {
71
- "no-debugger": "off"
72
- }
73
- },
74
- "browserslist": [
75
- "Chrome >= 60",
76
- "Firefox >= 54",
77
- "Edge >= 15",
78
- "Safari >= 10.1",
79
- "iOS >= 10.3"
80
- ]
81
- }
1
+ {
2
+ "name": "@thestarweb/ui",
3
+ "version": "2.0.0-beta.2",
4
+ "private": false,
5
+ "scripts": {
6
+ "build": "vite build && vue-tsc"
7
+ },
8
+ "sideEffects": false,
9
+ "type": "module",
10
+ "main": "dist/index.mjs",
11
+ "types": "types/src/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.mjs",
15
+ "types": "./types/src/index.d.ts"
16
+ },
17
+ "./style.css": "./dist/style.css"
18
+ },
19
+ "dependencies": {
20
+ "dayjs": "^1.11.23",
21
+ "tslib": "^2.8.1",
22
+ "typescript": "^6.0.3",
23
+ "vue": "^3.5.44"
24
+ },
25
+ "peerDependencies": {
26
+ "vue": "^3.5.44"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^26.6.5",
30
+ "@vitejs/plugin-vue": "^6.0.10",
31
+ "vite": "^8.3.5",
32
+ "vue-tsc": "^3.3.13"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "types"
37
+ ]
38
+ }
@@ -0,0 +1,22 @@
1
+ import { Size, ThemeColor } from "../../../types.js";
2
+ type __VLS_Props = {
3
+ size?: Size;
4
+ theme?: "default" | ThemeColor;
5
+ disabled?: boolean;
6
+ href?: string;
7
+ };
8
+ declare const __VLS_template: () => {
9
+ __VLS_Slots: {
10
+ default?: (props: {}) => any;
11
+ };
12
+ };
13
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
14
+ declare const __VLS_base: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<{}, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Button } from "./button.vue";
@@ -0,0 +1 @@
1
+ export * from "./button/index.js";