@24city/web-console 0.1.3 → 0.2.1

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 (51) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/GUIDELINES.md +223 -0
  3. package/README.md +42 -10
  4. package/dist/account/index.js +2 -2
  5. package/dist/chunks/console-layout-BWz1qRog.js +210 -0
  6. package/dist/chunks/page-YBG0dEN1.js +111 -0
  7. package/dist/chunks/scale-smFifpMm.js +26 -0
  8. package/dist/chunks/{stale-build-DUKkQHuu.js → stale-build-DG-Tb2RA.js} +24 -20
  9. package/dist/chunks/status-tag-BrLUhH6Z.js +87 -0
  10. package/dist/chunks/text-link-BAKoHe5o.js +64 -0
  11. package/dist/chunks/unsupported-browser-Dwq1mNRy.js +48 -0
  12. package/dist/chunks/upgrade-modal-DgChxbLm.js +667 -0
  13. package/dist/chunks/{wallet-badge-BXu-WxJa.js → wallet-badge-dVrO6py9.js} +136 -136
  14. package/dist/chunks/waterfall-CQG8aVdx.js +613 -0
  15. package/dist/data/index.d.ts +2 -0
  16. package/dist/data/index.js +6 -0
  17. package/dist/data/metric-card.d.ts +41 -0
  18. package/dist/data/status-tag.d.ts +18 -0
  19. package/dist/index.d.ts +2 -0
  20. package/dist/index.js +160 -120
  21. package/dist/layout/index.js +1 -1
  22. package/dist/list/choice-cards.d.ts +29 -0
  23. package/dist/list/content-square.d.ts +50 -0
  24. package/dist/list/filter-dropdown.d.ts +43 -0
  25. package/dist/list/filter-panel.d.ts +94 -0
  26. package/dist/list/index.d.ts +7 -0
  27. package/dist/list/index.js +27 -0
  28. package/dist/list/list-toolbar.d.ts +56 -0
  29. package/dist/list/waterfall-layout.d.ts +11 -0
  30. package/dist/list/waterfall.d.ts +13 -0
  31. package/dist/page/index.d.ts +2 -0
  32. package/dist/page/index.js +19 -15
  33. package/dist/page/page.d.ts +21 -2
  34. package/dist/page/select-label.d.ts +11 -0
  35. package/dist/page/unsupported-browser.d.ts +2 -0
  36. package/dist/runtime/browser-support.d.ts +6 -0
  37. package/dist/runtime/index.d.ts +1 -0
  38. package/dist/runtime/index.js +38 -37
  39. package/dist/runtime/providers.d.ts +1 -1
  40. package/dist/styles.css +1973 -575
  41. package/dist/testing/guard.d.ts +20 -0
  42. package/dist/testing/guard.js +83 -36
  43. package/dist/theme/index.d.ts +1 -0
  44. package/dist/theme/index.js +29 -25
  45. package/dist/theme/scale.d.ts +34 -0
  46. package/package.json +13 -2
  47. package/dist/chunks/console-layout-D5YgsZYN.js +0 -208
  48. package/dist/chunks/error-boundary-D3qiD7ov.js +0 -35
  49. package/dist/chunks/page-BaitnD--.js +0 -89
  50. package/dist/chunks/text-link-FTsBp_QU.js +0 -54
  51. package/dist/chunks/upgrade-modal-J0X79nT2.js +0 -667
@@ -1,89 +0,0 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { Empty as m, Spin as f, Card as d, Button as N, Skeleton as i, Space as I, Typography as h } from "@douyinfe/semi-ui";
3
- import { IllustrationSuccess as b, IllustrationSuccessDark as v, IllustrationIdle as P, IllustrationIdleDark as x, IllustrationNotFound as C, IllustrationNotFoundDark as E, IllustrationNoAccess as T, IllustrationNoAccessDark as y, IllustrationFailure as D, IllustrationFailureDark as H, IllustrationNoContentDark as S, IllustrationNoContent as F } from "@douyinfe/semi-illustrations";
4
- const M = "_fullPage_8980g_3", w = "_fullPageCard_8980g_13", L = "_page_8980g_18", A = "_pageHeader_8980g_26", j = "_pageHeaderMain_8980g_34", $ = "_pageTitle_8980g_42", B = "_pageDescription_8980g_51", R = "_pageExtra_8980g_58", U = "_toolbar_8980g_77", q = "_status_8980g_86", z = "_statusExtra_8980g_90", G = "_skeleton_8980g_96", J = "_skeletonImage_8980g_100", K = "_skeletonText_8980g_105", O = "_loadingCard_8980g_117", a = {
5
- fullPage: M,
6
- fullPageCard: w,
7
- page: L,
8
- pageHeader: A,
9
- pageHeaderMain: j,
10
- pageTitle: $,
11
- pageDescription: B,
12
- pageExtra: R,
13
- toolbar: U,
14
- status: q,
15
- statusExtra: z,
16
- skeleton: G,
17
- skeletonImage: J,
18
- skeletonText: K,
19
- loadingCard: O
20
- }, Q = {
21
- error: [D, H],
22
- forbidden: [T, y],
23
- "not-found": [C, E],
24
- info: [P, x],
25
- success: [b, v]
26
- }, k = ({ status: t, title: s, description: r, extra: o, size: l = 140, className: c, children: g }) => {
27
- const [u, p] = t === "loading" ? [null, null] : Q[t], _ = { width: l, height: l };
28
- return /* @__PURE__ */ e(
29
- m,
30
- {
31
- className: c ? `${a.status} ${c}` : a.status,
32
- image: u ? /* @__PURE__ */ e(u, { style: _ }) : /* @__PURE__ */ e(f, { size: "large" }),
33
- darkModeImage: p ? /* @__PURE__ */ e(p, { style: _ }) : void 0,
34
- title: s,
35
- description: r,
36
- children: o || g ? /* @__PURE__ */ n("div", { className: a.statusExtra, children: [
37
- o,
38
- g
39
- ] }) : null
40
- }
41
- );
42
- }, Z = ({ title: t, description: s, extra: r, testId: o, children: l }) => /* @__PURE__ */ n("section", { className: a.page, "data-testid": o, children: [
43
- /* @__PURE__ */ n("div", { className: a.pageHeader, children: [
44
- /* @__PURE__ */ n("div", { className: a.pageHeaderMain, children: [
45
- /* @__PURE__ */ e(h.Title, { heading: 1, className: a.pageTitle, children: t }),
46
- s ? /* @__PURE__ */ e(h.Paragraph, { className: a.pageDescription, children: s }) : null
47
- ] }),
48
- r ? /* @__PURE__ */ e("div", { className: a.pageExtra, children: r }) : null
49
- ] }),
50
- l
51
- ] }), V = ({ children: t }) => /* @__PURE__ */ e("main", { className: a.fullPage, children: /* @__PURE__ */ e(d, { className: a.fullPageCard, bordered: !1, children: t }) }), ee = () => /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e("div", { "aria-busy": "true", children: /* @__PURE__ */ e(i, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(i.Paragraph, { rows: 4 }) }) }) }), ae = ({ children: t }) => /* @__PURE__ */ e("div", { className: a.toolbar, children: t }), te = ({ message: t = "当前会话或空间不可用,请重新登录。" }) => /* @__PURE__ */ e(d, { bordered: !1, children: /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(k, { status: "forbidden", title: "当前会话或空间不可用", description: t }) }) }), se = ({ rows: t = 3, image: s = !1 }) => /* @__PURE__ */ e("div", { "aria-busy": "true", children: /* @__PURE__ */ e(d, { bordered: !1, className: a.loadingCard, children: /* @__PURE__ */ e(
52
- i,
53
- {
54
- loading: !0,
55
- active: !0,
56
- placeholder: /* @__PURE__ */ n(I, { vertical: !0, align: "start", spacing: 12, className: a.skeleton, children: [
57
- s ? /* @__PURE__ */ e(i.Image, { className: a.skeletonImage }) : null,
58
- /* @__PURE__ */ e(i.Paragraph, { rows: t, className: a.skeletonText })
59
- ] })
60
- }
61
- ) }) }), le = ({ title: t, message: s, retryLabel: r = "重新加载", retrying: o = !1, onRetry: l }) => /* @__PURE__ */ e(d, { bordered: !1, children: /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
62
- k,
63
- {
64
- status: "error",
65
- title: t,
66
- description: s,
67
- extra: l ? /* @__PURE__ */ e(N, { theme: "solid", type: "primary", loading: o, onClick: l, children: r }) : void 0
68
- }
69
- ) }) }), re = ({ description: t, action: s }) => /* @__PURE__ */ e(d, { bordered: !1, children: /* @__PURE__ */ e(
70
- m,
71
- {
72
- className: a.status,
73
- image: /* @__PURE__ */ e(F, { style: { width: 120, height: 120 } }),
74
- darkModeImage: /* @__PURE__ */ e(S, { style: { width: 120, height: 120 } }),
75
- description: t,
76
- children: s ? /* @__PURE__ */ e("div", { className: a.statusExtra, children: s }) : null
77
- }
78
- ) });
79
- export {
80
- re as E,
81
- V as F,
82
- se as L,
83
- Z as P,
84
- te as S,
85
- ae as T,
86
- le as a,
87
- ee as b,
88
- k as c
89
- };
@@ -1,54 +0,0 @@
1
- import { jsx as n, jsxs as w } from "react/jsx-runtime";
2
- import { Button as m, Typography as x } from "@douyinfe/semi-ui";
3
- import { useNavigate as h } from "react-router";
4
- import { b as v } from "./context-CaVim6ZO.js";
5
- import { F as d, c as u } from "./page-BaitnD--.js";
6
- const E = () => {
7
- const { config: r } = v(), t = h();
8
- return /* @__PURE__ */ n(d, { children: /* @__PURE__ */ n(
9
- u,
10
- {
11
- status: "not-found",
12
- title: "页面不存在",
13
- description: "请检查地址,或返回产品首页继续。",
14
- extra: /* @__PURE__ */ n(m, { theme: "solid", type: "primary", onClick: () => t(r.routes.publicHome), children: "返回首页" })
15
- }
16
- ) });
17
- }, K = () => /* @__PURE__ */ n(d, { children: /* @__PURE__ */ n("div", { role: "alert", children: /* @__PURE__ */ n(
18
- u,
19
- {
20
- status: "error",
21
- title: "应用配置暂时无法加载",
22
- description: "启动检查未通过。请检查运行时配置和网络连接后重新加载。",
23
- extra: /* @__PURE__ */ n(m, { theme: "solid", type: "primary", onClick: () => window.location.reload(), children: "重新加载" })
24
- }
25
- ) }) }), N = "_link_1mzr6_2", b = "_danger_1mzr6_28", z = "_warning_1mzr6_33", T = "_icon_1mzr6_38", i = {
26
- link: N,
27
- danger: b,
28
- warning: z,
29
- icon: T
30
- }, P = ({ href: r, target: t, rel: s, download: p, onClick: a, icon: l, status: c, disabled: o = !1, className: g, children: _, ...y }) => {
31
- const f = [i.link, c === "danger" ? i.danger : c === "warning" ? i.warning : "", g ?? ""].filter(Boolean).join(" "), k = {
32
- href: r,
33
- target: t,
34
- rel: t === "_blank" ? s ?? "noreferrer" : s,
35
- download: p,
36
- onClick: o ? void 0 : a,
37
- onKeyDown: (e) => {
38
- r || o || !a || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), a(e));
39
- },
40
- role: r ? void 0 : "button",
41
- tabIndex: r || o ? void 0 : 0,
42
- "aria-disabled": o || void 0,
43
- "aria-label": y["aria-label"]
44
- };
45
- return /* @__PURE__ */ w(x.Text, { link: k, disabled: o, className: f, children: [
46
- l ? /* @__PURE__ */ n("span", { className: i.icon, children: l }) : null,
47
- _
48
- ] });
49
- };
50
- export {
51
- E as N,
52
- K as S,
53
- P as T
54
- };