@arcblock/ux 3.0.25 → 3.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,88 +1,90 @@
1
- import { jsxs as t, jsx as r, Fragment as c } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as o, Fragment as u } from "react/jsx-runtime";
2
2
  import { useState as N } from "react";
3
3
  import C from "copy-to-clipboard";
4
4
  import e from "highlight.js/lib/core";
5
- import n from "highlight.js/lib/languages/javascript";
6
- import s from "highlight.js/lib/languages/typescript";
5
+ import s from "highlight.js/lib/languages/javascript";
6
+ import l from "highlight.js/lib/languages/typescript";
7
7
  import _ from "highlight.js/lib/languages/json";
8
8
  import z from "highlight.js/lib/languages/elixir";
9
9
  import F from "highlight.js/lib/languages/java";
10
10
  import M from "highlight.js/lib/languages/swift";
11
- import u from "highlight.js/lib/languages/objectivec";
11
+ import d from "highlight.js/lib/languages/objectivec";
12
12
  import f from "highlight.js/lib/languages/kotlin";
13
- import d from "highlight.js/lib/languages/protobuf";
14
- import h from "highlight.js/lib/languages/python";
15
- import x from "highlight.js/lib/languages/yaml";
16
- import y from "highlight.js/lib/languages/shell";
17
- import L from "highlight.js/lib/languages/diff";
18
- import b from "highlight.js/lib/languages/plaintext";
13
+ import h from "highlight.js/lib/languages/protobuf";
14
+ import x from "highlight.js/lib/languages/python";
15
+ import y from "highlight.js/lib/languages/yaml";
16
+ import L from "highlight.js/lib/languages/shell";
17
+ import b from "highlight.js/lib/languages/diff";
18
+ import w from "highlight.js/lib/languages/plaintext";
19
19
  import B from "highlight.js/lib/languages/markdown";
20
20
  import "highlight.js/styles/atom-one-dark.css";
21
- import { FileCopy as S, Check as T } from "@mui/icons-material";
22
- import o from "../Colors/themes/default.js";
23
- import { styled as A } from "../Theme/index.js";
24
- import E from "./LightBox.js";
25
- e.registerLanguage("javascript", n);
26
- e.registerLanguage("js", n);
27
- e.registerLanguage("jsx", n);
28
- e.registerLanguage("typescript", s);
29
- e.registerLanguage("ts", s);
30
- e.registerLanguage("tsx", s);
21
+ import { FileCopy as P, Check as S } from "@mui/icons-material";
22
+ import t from "../Colors/themes/default.js";
23
+ import { styled as T } from "../Theme/index.js";
24
+ import A from "./LightBox.js";
25
+ e.registerLanguage("javascript", s);
26
+ e.registerLanguage("js", s);
27
+ e.registerLanguage("jsx", s);
28
+ e.registerLanguage("typescript", l);
29
+ e.registerLanguage("ts", l);
30
+ e.registerLanguage("tsx", l);
31
31
  e.registerLanguage("json", _);
32
32
  e.registerLanguage("elixir", z);
33
33
  e.registerLanguage("java", F);
34
34
  e.registerLanguage("kotlin", f);
35
35
  e.registerLanguage("kt", f);
36
- e.registerLanguage("protobuf", d);
37
- e.registerLanguage("protobuffer", d);
38
- e.registerLanguage("python", h);
39
- e.registerLanguage("py", h);
40
- e.registerLanguage("yaml", x);
41
- e.registerLanguage("yml", x);
42
- e.registerLanguage("shell", y);
43
- e.registerLanguage("sh", y);
44
- e.registerLanguage("plaintext", b);
45
- e.registerLanguage("text", b);
46
- e.registerLanguage("patch", L);
47
- e.registerLanguage("diff", L);
36
+ e.registerLanguage("protobuf", h);
37
+ e.registerLanguage("protobuffer", h);
38
+ e.registerLanguage("python", x);
39
+ e.registerLanguage("py", x);
40
+ e.registerLanguage("yaml", y);
41
+ e.registerLanguage("yml", y);
42
+ e.registerLanguage("shell", L);
43
+ e.registerLanguage("sh", L);
44
+ e.registerLanguage("plaintext", w);
45
+ e.registerLanguage("text", w);
46
+ e.registerLanguage("patch", b);
47
+ e.registerLanguage("diff", b);
48
48
  e.registerLanguage("swift", M);
49
- e.registerLanguage("objectivec", u);
50
- e.registerLanguage("oc", u);
49
+ e.registerLanguage("objectivec", d);
50
+ e.registerLanguage("oc", d);
51
51
  e.registerLanguage("markdown", B);
52
- function ge({
53
- code: w = "",
54
- language: i = "text",
52
+ function le({
53
+ code: r = "",
54
+ language: a = "text",
55
55
  children: k = null,
56
56
  dark: j = !0,
57
57
  ...v
58
58
  }) {
59
- const [g, l] = N(!1), p = w || k, $ = () => {
60
- g || (C(p), l(!0), setTimeout(() => {
61
- l(!1);
59
+ const [g, p] = N(!1), c = r || k, $ = () => {
60
+ g || (C(c), p(!0), setTimeout(() => {
61
+ p(!1);
62
62
  }, 1500));
63
- }, m = /* @__PURE__ */ t(H, { ...v, children: [
64
- /* @__PURE__ */ r("span", { className: "codeblock__inner", children: /* @__PURE__ */ r(
63
+ }, m = /* @__PURE__ */ i(E, { ...v, children: [
64
+ /* @__PURE__ */ o("span", { className: "codeblock__inner", children: /* @__PURE__ */ o(
65
65
  "code",
66
66
  {
67
- className: `hljs ${i}`,
68
- dangerouslySetInnerHTML: { __html: e.highlightAuto(p, [i]).value }
67
+ className: `hljs ${a}`,
68
+ dangerouslySetInnerHTML: { __html: e.highlightAuto(c, [a]).value }
69
69
  }
70
70
  ) }),
71
- /* @__PURE__ */ t("div", { className: "copy-button", onClick: $, children: [
72
- /* @__PURE__ */ r("span", { className: "default-text", children: i }),
73
- /* @__PURE__ */ r("span", { className: "hover-text", children: g ? /* @__PURE__ */ t(c, { children: [
74
- /* @__PURE__ */ r(T, { className: "copy-icon" }),
75
- /* @__PURE__ */ r("span", { className: "button-lang-text", children: "copied" })
76
- ] }) : /* @__PURE__ */ t(c, { children: [
77
- /* @__PURE__ */ r(S, { className: "copy-icon" }),
78
- /* @__PURE__ */ r("span", { className: "button-lang-text", children: "copy" })
71
+ /* @__PURE__ */ i("div", { className: "copy-button", onClick: $, children: [
72
+ /* @__PURE__ */ o("span", { className: "default-text", children: a }),
73
+ /* @__PURE__ */ o("span", { className: "hover-text", children: g ? /* @__PURE__ */ i(u, { children: [
74
+ /* @__PURE__ */ o(S, { className: "copy-icon" }),
75
+ /* @__PURE__ */ o("span", { className: "button-lang-text", children: "copied" })
76
+ ] }) : /* @__PURE__ */ i(u, { children: [
77
+ /* @__PURE__ */ o(P, { className: "copy-icon" }),
78
+ /* @__PURE__ */ o("span", { className: "button-lang-text", children: "copy" })
79
79
  ] }) })
80
80
  ] })
81
81
  ] });
82
- return j ? m : /* @__PURE__ */ r(E, { children: m });
82
+ return j ? m : /* @__PURE__ */ o(A, { children: m });
83
83
  }
84
- const a = "source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important", H = A("pre")`
85
- font-family: ${a};
84
+ const n = "source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important", E = T("pre", {
85
+ shouldForwardProp: (r) => r !== "sx"
86
+ })`
87
+ font-family: ${n};
86
88
  display: block;
87
89
  font-size: 14px;
88
90
  line-height: 1.42857143;
@@ -91,9 +93,10 @@ const a = "source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !imp
91
93
  word-wrap: break-word;
92
94
  text-align: left;
93
95
  border-radius: 5px;
94
- border: 1px solid #dedede;
95
- background: #222;
96
- color: ${o.common.white};
96
+ border: 1px solid;
97
+ border-color: ${({ theme: r }) => r.palette.divider};
98
+ background: ${({ theme: r }) => r.palette.background.default};
99
+ color: ${({ theme: r }) => r.palette.common.white};
97
100
  position: relative;
98
101
 
99
102
  .codeblock__inner {
@@ -120,7 +123,7 @@ const a = "source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !imp
120
123
 
121
124
  .copy-icon {
122
125
  font-size: 16px;
123
- color: ${o.common.white};
126
+ color: ${t.common.white};
124
127
  }
125
128
 
126
129
  .hover-text {
@@ -128,20 +131,20 @@ const a = "source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !imp
128
131
  }
129
132
  .default-text {
130
133
  font-size: 12px;
131
- color: ${o.common.white};
134
+ color: ${t.common.white};
132
135
  }
133
136
  }
134
137
 
135
138
  &:hover {
136
139
  .copy-button {
137
140
  display: flex;
138
- background: ${o.primary.main};
141
+ background: ${t.primary.main};
139
142
 
140
143
  .hover-text {
141
144
  display: flex;
142
145
  justify-content: center;
143
146
  align-items: center;
144
- color: ${o.common.white};
147
+ color: ${t.common.white};
145
148
  }
146
149
  .default-text {
147
150
  display: none;
@@ -153,17 +156,17 @@ const a = "source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !imp
153
156
  .button-lang-text {
154
157
  margin-left: 4px;
155
158
  font-size: 12px;
156
- color: ${o.common.white};
159
+ color: ${t.common.white};
157
160
  }
158
161
 
159
162
  code {
160
163
  counter-reset: line;
161
164
  counter-increment: line;
162
165
  padding: 16px;
163
- font-family: ${a};
164
- color: ${o.common.white};
166
+ font-family: ${n};
167
+ color: ${t.common.white};
165
168
  * {
166
- font-family: ${a};
169
+ font-family: ${n};
167
170
  }
168
171
  }
169
172
 
@@ -172,5 +175,5 @@ const a = "source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !imp
172
175
  }
173
176
  `;
174
177
  export {
175
- ge as default
178
+ le as default
176
179
  };
@@ -8,7 +8,7 @@ export interface ConfigProviderProps extends Omit<LocaleProviderProps, 'translat
8
8
  /**
9
9
  * 集中化配置
10
10
  */
11
- export declare function ConfigProvider({ children, theme, injectFirst, darkSchemeClass, prefer, disableBlockletTheme, enableColorScheme, locale, fallbackLocale, translations, languages, onLoadingTranslation, }: ConfigProviderProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ConfigProvider({ children, theme, injectFirst, darkSchemeClass, prefer, disableBlockletTheme, enableColorScheme, disableStyleCache, locale, fallbackLocale, translations, languages, onLoadingTranslation, }: ConfigProviderProps): import("react/jsx-runtime").JSX.Element;
12
12
  export declare function useConfig(): {
13
13
  mode: import('@mui/material').PaletteMode;
14
14
  toggleMode: () => void;
@@ -1,9 +1,9 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { LocaleProvider as p, useLocaleContext as C } from "../Locale/context.js";
3
- import x, { useColorScheme as a } from "../Theme/theme-provider.js";
4
- import { useTheme as d } from "@mui/material";
2
+ import { LocaleProvider as C, useLocaleContext as x } from "../Locale/context.js";
3
+ import a, { useColorScheme as d } from "../Theme/theme-provider.js";
4
+ import { useTheme as v } from "@mui/material";
5
5
  import "../Theme/theme.js";
6
- function T({
6
+ function j({
7
7
  children: o,
8
8
  // theme provider
9
9
  theme: e,
@@ -12,15 +12,16 @@ function T({
12
12
  prefer: i,
13
13
  disableBlockletTheme: n = !1,
14
14
  enableColorScheme: c,
15
+ disableStyleCache: f,
15
16
  // locale provider
16
- locale: f,
17
- fallbackLocale: s,
18
- translations: l = {},
19
- languages: u,
20
- onLoadingTranslation: h
17
+ locale: s,
18
+ fallbackLocale: l,
19
+ translations: u = {},
20
+ languages: h,
21
+ onLoadingTranslation: p
21
22
  }) {
22
23
  return /* @__PURE__ */ t(
23
- x,
24
+ a,
24
25
  {
25
26
  theme: e,
26
27
  injectFirst: r,
@@ -28,22 +29,23 @@ function T({
28
29
  prefer: i,
29
30
  disableBlockletTheme: n,
30
31
  enableColorScheme: c,
32
+ disableStyleCache: f,
31
33
  children: /* @__PURE__ */ t(
32
- p,
34
+ C,
33
35
  {
34
- locale: f,
35
- fallbackLocale: s,
36
- translations: l,
37
- onLoadingTranslation: h,
38
- languages: u,
36
+ locale: s,
37
+ fallbackLocale: l,
38
+ translations: u,
39
+ onLoadingTranslation: p,
40
+ languages: h,
39
41
  children: o
40
42
  }
41
43
  )
42
44
  }
43
45
  );
44
46
  }
45
- function j() {
46
- const o = d(), e = C(), r = a();
47
+ function b() {
48
+ const o = v(), e = x(), r = d();
47
49
  return {
48
50
  theme: o,
49
51
  ...e,
@@ -51,6 +53,6 @@ function j() {
51
53
  };
52
54
  }
53
55
  export {
54
- T as ConfigProvider,
55
- j as useConfig
56
+ j as ConfigProvider,
57
+ b as useConfig
56
58
  };
@@ -0,0 +1,11 @@
1
+ export interface NftInfo {
2
+ address: string;
3
+ data: Record<string, any>;
4
+ display: Record<string, any>;
5
+ issuer: string;
6
+ }
7
+ export default function NftPreview({ visible, onClose, nft, }: {
8
+ visible: boolean;
9
+ onClose: () => void;
10
+ nft: NftInfo | null;
11
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,60 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import n from "@mui/material/Modal";
3
+ import r from "@emotion/styled";
4
+ import a, { getNFTData as s } from "./index.js";
5
+ function f({
6
+ visible: e,
7
+ onClose: o,
8
+ nft: i
9
+ }) {
10
+ return !e || !i ? null : /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t(n, { open: e, onClose: o, children: /* @__PURE__ */ t(h, { onClick: o, children: /* @__PURE__ */ t(a, { data: s(i), address: i.address, inset: !0 }) }) }) });
11
+ }
12
+ const d = r.div`
13
+ position: relative;
14
+ width: 100%;
15
+ height: 100%;
16
+ cursor: pointer;
17
+
18
+ &:hover {
19
+ .mask {
20
+ opacity: 1;
21
+ }
22
+ }
23
+
24
+ .mask {
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ width: 100%;
32
+ height: 100%;
33
+ background: rgba(0, 0, 0, 0.6);
34
+ opacity: 0;
35
+ transition: opacity 0.2s;
36
+ }
37
+ `, h = r.div`
38
+ display: flex;
39
+ justify-content: center;
40
+ align-items: center;
41
+ height: 100vh;
42
+ width: 100vw;
43
+
44
+ img,
45
+ object {
46
+ max-width: 90vw;
47
+ max-height: 75vh;
48
+ }
49
+
50
+ .nft-display--inset {
51
+ > .MuiBox-root,
52
+ .nft-display__loading {
53
+ width: 75vmin;
54
+ height: 75vmin;
55
+ }
56
+ }
57
+ `;
58
+ export {
59
+ f as default
60
+ };
@@ -126,7 +126,7 @@ const o = i("nav", {
126
126
  ".navmenu-item__desc": {
127
127
  fontSize: "12px",
128
128
  lineHeight: 1,
129
- color: t.palette.grey[500]
129
+ color: t.palette.text.secondary
130
130
  },
131
131
  "&:hover": {
132
132
  background: t.palette.action.hover,
@@ -15,5 +15,6 @@ export interface RelativeTimeProps {
15
15
  placement?: TooltipProps['placement'];
16
16
  sx?: SxProps;
17
17
  format?: string;
18
+ mode?: 'all' | 'daysLeft';
18
19
  }
19
- export default function RelativeTime({ value, locale, withoutSuffix, from, to, type, tz, relativeRange, enableTooltip, useShortTimezone, disableTimezone, placement, format, ...rest }: RelativeTimeProps): import("react/jsx-runtime").JSX.Element;
20
+ export default function RelativeTime({ value, locale, withoutSuffix, from, to, type, tz, relativeRange, enableTooltip, useShortTimezone, disableTimezone, placement, format, mode, ...rest }: RelativeTimeProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
- import { jsx as i, jsxs as M, Fragment as F } from "react/jsx-runtime";
2
- import { Tooltip as O, Box as f } from "@mui/material";
1
+ import { jsxs as I, jsx as n, Fragment as F } from "react/jsx-runtime";
2
+ import { Box as a, Tooltip as M } from "@mui/material";
3
3
  import { useEffect as R, useMemo as $ } from "react";
4
- import r from "dayjs";
4
+ import c from "dayjs";
5
5
  import "dayjs/locale/zh-cn";
6
6
  import k from "dayjs/plugin/utc";
7
7
  import B from "dayjs/plugin/timezone";
@@ -9,13 +9,13 @@ import E from "dayjs/plugin/relativeTime";
9
9
  import H from "dayjs/plugin/updateLocale";
10
10
  import N from "dayjs/plugin/localizedFormat";
11
11
  import { create as Z } from "zustand";
12
- import { formatToDatetime as D, setDateTool as q } from "../Util/index.js";
13
- r.extend(N);
14
- r.extend(k);
15
- r.extend(B);
16
- r.extend(H);
17
- r.extend(E);
18
- r.updateLocale("zh-cn", {
12
+ import { formatToDatetime as O, setDateTool as q } from "../Util/index.js";
13
+ c.extend(N);
14
+ c.extend(k);
15
+ c.extend(B);
16
+ c.extend(H);
17
+ c.extend(E);
18
+ c.updateLocale("zh-cn", {
19
19
  // copy with https://github.com/iamkun/dayjs/blob/dev/src/locale/zh-cn.js
20
20
  relativeTime: {
21
21
  future: "%s后",
@@ -33,7 +33,7 @@ r.updateLocale("zh-cn", {
33
33
  yy: "%d 年"
34
34
  }
35
35
  });
36
- q(r);
36
+ q(c);
37
37
  const j = {
38
38
  en: {
39
39
  utc: "UTC Timezone",
@@ -47,123 +47,123 @@ const j = {
47
47
  shortUTC: "UTC",
48
48
  shortLocal: "当前时区"
49
49
  }
50
- }, z = Z((t) => ({
50
+ }, A = Z((t) => ({
51
51
  isUtc: !1,
52
- setIsUtc: (e) => t({ isUtc: e })
52
+ setIsUtc: (o) => t({ isUtc: o })
53
53
  }));
54
54
  function w({
55
55
  value: t,
56
- locale: e = "en",
57
- withoutSuffix: m = !1,
58
- from: a = "",
59
- to: h = "",
60
- type: o = "relative",
61
- tz: s,
62
- relativeRange: L,
63
- format: C
56
+ locale: o = "en",
57
+ withoutSuffix: p = !1,
58
+ from: d = "",
59
+ to: u = "",
60
+ type: i = "relative",
61
+ tz: l,
62
+ relativeRange: y,
63
+ format: U
64
64
  }) {
65
- const u = (/* @__PURE__ */ new Date()).getTimezoneOffset(), U = u > 0 ? "-" : "+", v = Math.abs(u) / 60, c = u === 0, x = z((g) => g.isUtc), T = z((g) => g.setIsUtc);
65
+ const x = (/* @__PURE__ */ new Date()).getTimezoneOffset(), C = x > 0 ? "-" : "+", v = Math.abs(x) / 60, g = x === 0, r = A((L) => L.isUtc), T = A((L) => L.setIsUtc);
66
66
  if (R(() => {
67
- T(c);
68
- }, [c]), !t)
69
- return { innerContent: "-", popContent: "-", isUtc: x, setIsUtc: T, sign: U, hoursOffset: v };
70
- const d = e === "zh" ? "zh-cn" : "en-us";
71
- let n = r(t).locale(d);
72
- o === "utc" && (n = r(t).utc().locale(d)), s && (n = n.tz(s));
73
- const p = D(t, { locale: d, tz: s, format: C });
74
- let l;
75
- if (a)
76
- l = n.from(a, m);
77
- else if (h)
78
- l = n.to(h, m);
79
- else if (L) {
80
- const g = n.diff(r());
81
- Math.abs(g) > L && (l = p);
67
+ T(g);
68
+ }, [g]), !t)
69
+ return { innerContent: "-", popContent: "-", isUtc: r, setIsUtc: T, sign: C, hoursOffset: v };
70
+ const m = o === "zh" ? "zh-cn" : "en-us";
71
+ let s = c(t).locale(m);
72
+ i === "utc" && (s = c(t).utc().locale(m)), l && (s = s.tz(l));
73
+ const f = O(t, { locale: m, tz: l, format: U });
74
+ let e;
75
+ if (d)
76
+ e = s.from(d, p);
77
+ else if (u)
78
+ e = s.to(u, p);
79
+ else if (y) {
80
+ const L = s.diff(c());
81
+ Math.abs(L) > y && (e = f);
82
82
  }
83
- l || (l = n.fromNow(m));
84
- let y = l, b = p;
85
- return o === "absolute" && (y = p, b = l), o === "utc" && (x ? (y = D(t, { locale: d, tz: s, isUtc: !0, format: C }), b = D(t, { locale: d, tz: s, isUtc: !0, format: C })) : (y = p, b = l)), { innerContent: y, popContent: b, isUtc: x, setIsUtc: T, sign: U, hoursOffset: v, relativeString: l, absoluteString: p };
83
+ e || (e = s.fromNow(p));
84
+ let h = e, b = f;
85
+ return i === "absolute" && (h = f, b = e), i === "utc" && (r ? (h = O(t, { locale: m, tz: l, isUtc: !0, format: U }), b = O(t, { locale: m, tz: l, isUtc: !0, format: U })) : (h = f, b = e)), { innerContent: h, popContent: b, isUtc: r, setIsUtc: T, sign: C, hoursOffset: v, relativeString: e, absoluteString: f };
86
86
  }
87
- function A({
87
+ function z({
88
88
  locale: t,
89
- isUtc: e = !1,
90
- setIsUtc: m,
91
- useShortTimezone: a = !0
89
+ isUtc: o = !1,
90
+ setIsUtc: p,
91
+ useShortTimezone: d = !0
92
92
  }) {
93
- const h = $(() => {
94
- const o = a ? "shortUTC" : "utc", s = a ? "shortLocal" : "local";
95
- return e ? `${j[t][o]}` : `${j[t][s]}`;
96
- }, [t, a, e]);
97
- return /* @__PURE__ */ i(
98
- f,
93
+ const u = $(() => {
94
+ const i = d ? "shortUTC" : "utc", l = d ? "shortLocal" : "local";
95
+ return o ? `${j[t][i]}` : `${j[t][l]}`;
96
+ }, [t, d, o]);
97
+ return /* @__PURE__ */ n(
98
+ a,
99
99
  {
100
100
  component: "span",
101
101
  sx: {
102
102
  color: "inherit",
103
103
  cursor: "pointer",
104
104
  border: "1px solid",
105
- fontSize: "0.8rem",
106
105
  borderColor: "divider",
107
106
  borderRadius: "20px",
108
107
  padding: "4px 8px",
109
108
  lineHeight: 1
110
109
  },
111
- onClick: () => m(!e),
112
- children: h
110
+ onClick: () => p(!o),
111
+ children: u
113
112
  }
114
113
  );
115
114
  }
116
115
  function et({
117
116
  value: t,
118
- locale: e = "en",
119
- withoutSuffix: m = !1,
120
- from: a = "",
121
- to: h = "",
122
- type: o = "relative",
123
- tz: s = void 0,
124
- relativeRange: L = void 0,
125
- enableTooltip: C = !0,
126
- useShortTimezone: I = !1,
127
- disableTimezone: u = !1,
128
- placement: U = "top-end",
117
+ locale: o = "en",
118
+ withoutSuffix: p = !1,
119
+ from: d = "",
120
+ to: u = "",
121
+ type: i = "relative",
122
+ tz: l = void 0,
123
+ relativeRange: y = void 0,
124
+ enableTooltip: U = !0,
125
+ useShortTimezone: D = !1,
126
+ disableTimezone: x = !1,
127
+ placement: C = "top-end",
129
128
  format: v = "lll",
130
- ...c
129
+ mode: g = "all",
130
+ ...r
131
131
  }) {
132
- const { innerContent: x, popContent: T, isUtc: d, setIsUtc: n, relativeString: p } = w({
132
+ const { innerContent: T, popContent: m, isUtc: s, setIsUtc: f, relativeString: e } = w({
133
133
  value: t,
134
- locale: e,
135
- withoutSuffix: m,
136
- from: a,
137
- to: h,
138
- type: o === "all" ? "utc" : o,
139
- tz: s,
140
- relativeRange: L,
134
+ locale: o,
135
+ withoutSuffix: p,
136
+ from: d,
137
+ to: u,
138
+ type: i === "all" ? "utc" : i,
139
+ tz: l,
140
+ relativeRange: y,
141
141
  format: v
142
- });
143
- return o === "all" ? /* @__PURE__ */ i(O, { title: void 0, placement: U, enterTouchDelay: 0, children: /* @__PURE__ */ M(
144
- f,
142
+ }), h = /* @__PURE__ */ I(
143
+ a,
145
144
  {
146
- ...c,
145
+ ...r,
147
146
  sx: [
148
147
  {
149
148
  display: "inline-flex",
150
149
  alignItems: "center",
151
150
  gap: 0.5
152
151
  },
153
- ...Array.isArray(c.sx) ? c.sx : [c.sx]
152
+ ...Array.isArray(r.sx) ? r.sx : [r.sx]
154
153
  ],
155
154
  children: [
156
- /* @__PURE__ */ i(f, { component: "span", ...c, sx: {}, children: x }),
157
- /* @__PURE__ */ i(f, { component: "span", sx: { color: "inherit" }, children: "·" }),
158
- /* @__PURE__ */ i(f, { component: "span", sx: { color: "text.secondary" }, children: p }),
159
- !u && /* @__PURE__ */ M(F, { children: [
160
- /* @__PURE__ */ i(f, { component: "span", sx: { color: "inherit" }, children: "·" }),
161
- /* @__PURE__ */ i(A, { locale: e, isUtc: d, setIsUtc: n, useShortTimezone: I })
155
+ /* @__PURE__ */ n(a, { component: "span", ...r, sx: {}, children: T }),
156
+ /* @__PURE__ */ n(a, { component: "span", sx: { color: "inherit" }, children: "·" }),
157
+ /* @__PURE__ */ n(a, { component: "span", sx: { color: "inherit" }, children: e }),
158
+ !x && /* @__PURE__ */ I(F, { children: [
159
+ /* @__PURE__ */ n(a, { component: "span", sx: { color: "inherit" }, children: "·" }),
160
+ /* @__PURE__ */ n(z, { locale: o, isUtc: s, setIsUtc: f, useShortTimezone: D })
162
161
  ] })
163
162
  ]
164
163
  }
165
- ) }) : /* @__PURE__ */ i(O, { title: C ? T : void 0, placement: U, enterTouchDelay: 0, children: /* @__PURE__ */ M(
166
- f,
164
+ );
165
+ return g === "daysLeft" ? /* @__PURE__ */ n(M, { title: h, placement: C, enterTouchDelay: 0, children: /* @__PURE__ */ n(a, { component: "span", children: e }) }) : i === "all" && g === "all" ? /* @__PURE__ */ n(M, { title: void 0, placement: C, enterTouchDelay: 0, children: h }) : /* @__PURE__ */ n(M, { title: U ? m : void 0, placement: C, enterTouchDelay: 0, children: /* @__PURE__ */ I(
166
+ a,
167
167
  {
168
168
  sx: {
169
169
  display: "inline-flex",
@@ -171,8 +171,8 @@ function et({
171
171
  gap: 1
172
172
  },
173
173
  children: [
174
- /* @__PURE__ */ i(f, { component: "span", ...c, children: x }),
175
- o === "utc" && !u && /* @__PURE__ */ i(A, { locale: e, isUtc: d, setIsUtc: n, useShortTimezone: I })
174
+ /* @__PURE__ */ n(a, { component: "span", ...r, children: T }),
175
+ i === "utc" && !x && /* @__PURE__ */ n(z, { locale: o, isUtc: s, setIsUtc: f, useShortTimezone: D })
176
176
  ]
177
177
  }
178
178
  ) });