xtreme-ui 0.0.36 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/base/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/base/Avatar/Avatar.js +18 -8
- package/dist/components/base/Avatar/Avatar.js.map +1 -1
- package/dist/components/base/Button/Button.d.ts.map +1 -1
- package/dist/components/base/Button/Button.js +44 -32
- package/dist/components/base/Button/Button.js.map +1 -1
- package/dist/components/base/Button/button.module.scss.js +25 -25
- package/dist/components/base/Button/types.d.ts +2 -1
- package/dist/components/base/Button/types.d.ts.map +1 -1
- package/dist/components/base/Button/types.js.map +1 -1
- package/dist/components/base/Icon/Icon.d.ts.map +1 -1
- package/dist/components/base/Icon/Icon.js +13 -4
- package/dist/components/base/Icon/Icon.js.map +1 -1
- package/dist/components/base/Lottie/Lottie.d.ts.map +1 -1
- package/dist/components/base/Lottie/Lottie.js +29 -27
- package/dist/components/base/Lottie/Lottie.js.map +1 -1
- package/dist/components/base/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/base/ProgressBar/ProgressBar.js +16 -8
- package/dist/components/base/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/base/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/base/Spinner/Spinner.js +23 -14
- package/dist/components/base/Spinner/Spinner.js.map +1 -1
- package/dist/components/base/Textfield/Textfield.d.ts.map +1 -1
- package/dist/components/base/Textfield/Textfield.js +37 -29
- package/dist/components/base/Textfield/Textfield.js.map +1 -1
- package/dist/components/base/Textfield/textfield.module.scss.js +2 -2
- package/dist/components/context/Data/DataContext.d.ts +6 -0
- package/dist/components/context/Data/DataContext.d.ts.map +1 -0
- package/dist/components/context/{DataContext.js → Data/DataContext.js} +1 -1
- package/dist/components/context/Data/DataContext.js.map +1 -0
- package/dist/components/context/Data/type.d.ts +10 -0
- package/dist/components/context/Data/type.d.ts.map +1 -0
- package/dist/components/context/Theme/ThemeContext.js +14 -14
- package/dist/components/context/Theme/ThemeContext.js.map +1 -1
- package/dist/components/context/Theme/type.d.ts +5 -5
- package/dist/components/context/Theme/type.d.ts.map +1 -1
- package/dist/components/context/Theme/type.js +8 -3
- package/dist/components/context/Theme/type.js.map +1 -1
- package/dist/components/context/index.js +1 -1
- package/dist/components/context/index.js.map +1 -1
- package/dist/components/context/useContext.d.ts +2 -2
- package/dist/components/context/useContext.d.ts.map +1 -1
- package/dist/components/context/useContext.js +3 -3
- package/dist/components/context/useContext.js.map +1 -1
- package/dist/components/layout/Navigation/Navigation.d.ts.map +1 -1
- package/dist/components/layout/Navigation/Navigation.js +42 -34
- package/dist/components/layout/Navigation/Navigation.js.map +1 -1
- package/dist/components/layout/Navigation/navigation.module.scss.js +2 -2
- package/dist/components/layout/Sider/Sider.d.ts.map +1 -1
- package/dist/components/layout/Sider/Sider.js +13 -5
- package/dist/components/layout/Sider/Sider.js.map +1 -1
- package/dist/components/layout/ThemePicker/ThemePicker.d.ts +4 -0
- package/dist/components/layout/ThemePicker/ThemePicker.d.ts.map +1 -0
- package/dist/components/layout/ThemePicker/ThemePicker.js +77 -0
- package/dist/components/layout/ThemePicker/ThemePicker.js.map +1 -0
- package/dist/components/layout/ThemePicker/themePicker.module.scss.js +41 -0
- package/dist/components/layout/ThemePicker/themePicker.module.scss.js.map +1 -0
- package/dist/components/layout/ThemePicker/type.d.ts +15 -0
- package/dist/components/layout/ThemePicker/type.d.ts.map +1 -0
- package/dist/components/layout/ThemePicker/type.js +7 -0
- package/dist/components/layout/ThemePicker/type.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -19
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/helper/themeController.d.ts.map +1 -1
- package/dist/utils/helper/themeController.js +15 -9
- package/dist/utils/helper/themeController.js.map +1 -1
- package/package.json +18 -18
- package/dist/components/context/DataContext.d.ts +0 -13
- package/dist/components/context/DataContext.d.ts.map +0 -1
- package/dist/components/context/DataContext.js.map +0 -1
|
@@ -4,19 +4,19 @@ import { forwardRef as N, useMemo as y } from "react";
|
|
|
4
4
|
import T from "clsx";
|
|
5
5
|
import { Icon as w } from "../Icon/Icon.js";
|
|
6
6
|
import e from "./textfield.module.scss.js";
|
|
7
|
-
const C = N((
|
|
7
|
+
const C = N((f, m) => {
|
|
8
8
|
const {
|
|
9
9
|
className: u,
|
|
10
10
|
type: t = "text",
|
|
11
11
|
textarea: r,
|
|
12
12
|
placeholder: p,
|
|
13
|
-
autoComplete:
|
|
14
|
-
autoFocus:
|
|
13
|
+
autoComplete: i = "off",
|
|
14
|
+
autoFocus: n,
|
|
15
15
|
icon: o,
|
|
16
16
|
iconType: d = "regular",
|
|
17
17
|
value: s,
|
|
18
|
-
onChange:
|
|
19
|
-
} =
|
|
18
|
+
onChange: c
|
|
19
|
+
} = f, l = y(() => {
|
|
20
20
|
if (r === !0)
|
|
21
21
|
return null;
|
|
22
22
|
if (o)
|
|
@@ -34,30 +34,38 @@ const C = N((m, f) => {
|
|
|
34
34
|
s && e.hasValue,
|
|
35
35
|
u
|
|
36
36
|
);
|
|
37
|
-
return /* @__PURE__ */ h(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
return /* @__PURE__ */ h(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref: m,
|
|
41
|
+
className: x,
|
|
42
|
+
role: "textfield",
|
|
43
|
+
children: [
|
|
44
|
+
!!l && !r && /* @__PURE__ */ a(w, { className: e.icon, code: l, type: d }),
|
|
45
|
+
r ? /* @__PURE__ */ a(
|
|
46
|
+
"textarea",
|
|
47
|
+
{
|
|
48
|
+
className: e.input,
|
|
49
|
+
autoFocus: n,
|
|
50
|
+
autoComplete: i,
|
|
51
|
+
value: s,
|
|
52
|
+
onChange: c
|
|
53
|
+
}
|
|
54
|
+
) : /* @__PURE__ */ a(
|
|
55
|
+
"input",
|
|
56
|
+
{
|
|
57
|
+
className: e.input,
|
|
58
|
+
type: t,
|
|
59
|
+
autoFocus: n,
|
|
60
|
+
autoComplete: i,
|
|
61
|
+
value: s,
|
|
62
|
+
onChange: c
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ a("span", { className: e.placeholder, children: p })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
61
69
|
});
|
|
62
70
|
C.displayName = "Textfield";
|
|
63
71
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textfield.js","sources":["../../../../src/components/base/Textfield/Textfield.tsx"],"sourcesContent":["import { forwardRef, useMemo } from 'react';\n\nimport clsx from 'clsx';\n\nimport { Icon } from '../Icon/Icon';\n\nimport styles from './textfield.module.scss';\nimport { TTextfieldProps } from './types';\n\nexport const Textfield = forwardRef<HTMLInputElement, TTextfieldProps>((props, ref) => {\n\tconst {\n\t\tclassName,\n\t\ttype = 'text',\n\t\ttextarea,\n\t\tplaceholder,\n\t\tautoComplete = 'off',\n\t\tautoFocus,\n\t\ticon,\n\t\ticonType = 'regular',\n\t\tvalue,\n\t\tonChange,\n\t} = props;\n\n\tconst localIconName = useMemo(() => {\n\t\tif (textarea === true) return null;\n\t\tif (icon) return icon;\n\t\tif (type === 'number') return '23';\n\t\tif (type === 'search') return 'f002';\n\t\tif (type === 'password') return 'f30d';\n\t}, [textarea, icon, type]);\n\n\tconst TextfieldClsx = clsx(\n\t\tstyles.textfield,\n\t\tlocalIconName && styles.withIcon,\n\t\ttextarea && styles.textarea,\n\t\tvalue && styles.hasValue,\n\t\tclassName,\n\t);\n\n\treturn (\n\t\t<div
|
|
1
|
+
{"version":3,"file":"Textfield.js","sources":["../../../../src/components/base/Textfield/Textfield.tsx"],"sourcesContent":["import { forwardRef, useMemo } from 'react';\n\nimport clsx from 'clsx';\n\nimport { Icon } from '../Icon/Icon';\n\nimport styles from './textfield.module.scss';\nimport { TTextfieldProps } from './types';\n\nexport const Textfield = forwardRef<HTMLInputElement, TTextfieldProps>((props, ref) => {\n\tconst {\n\t\tclassName,\n\t\ttype = 'text',\n\t\ttextarea,\n\t\tplaceholder,\n\t\tautoComplete = 'off',\n\t\tautoFocus,\n\t\ticon,\n\t\ticonType = 'regular',\n\t\tvalue,\n\t\tonChange,\n\t} = props;\n\n\tconst localIconName = useMemo(() => {\n\t\tif (textarea === true) return null;\n\t\tif (icon) return icon;\n\t\tif (type === 'number') return '23';\n\t\tif (type === 'search') return 'f002';\n\t\tif (type === 'password') return 'f30d';\n\t}, [textarea, icon, type]);\n\n\tconst TextfieldClsx = clsx(\n\t\tstyles.textfield,\n\t\tlocalIconName && styles.withIcon,\n\t\ttextarea && styles.textarea,\n\t\tvalue && styles.hasValue,\n\t\tclassName,\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={TextfieldClsx}\n\t\t\trole='textfield'\n\t\t>\n\t\t\t{!!localIconName && !textarea && (\n\t\t\t\t<Icon className={styles.icon} code={localIconName} type={iconType} />\n\t\t\t)}\n\t\t\t{\n\t\t\t\t!textarea ?\n\t\t\t\t\t<input\n\t\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\tautoFocus={autoFocus}\n\t\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t/> :\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\t\tautoFocus={autoFocus}\n\t\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t/>\n\t\t\t}\n\t\t\t<span className={styles.placeholder}>{placeholder}</span>\n\t\t</div>\n\t);\n});\n\nTextfield.displayName = 'Textfield';\n"],"names":["Textfield","forwardRef","props","ref","className","type","textarea","placeholder","autoComplete","autoFocus","icon","iconType","value","onChange","localIconName","useMemo","TextfieldClsx","clsx","styles","jsxs","jsx","Icon"],"mappings":";;;;;;AASO,MAAMA,IAAYC,EAA8C,CAACC,GAAOC,MAAQ;AAChF,QAAA;AAAA,IACL,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,UAAAC;AAAA,EACG,IAAAX,GAEEY,IAAgBC,EAAQ,MAAM;AACnC,QAAIT,MAAa;AAAa,aAAA;AAC1B,QAAAI;AAAa,aAAAA;AACjB,QAAIL,MAAS;AAAiB,aAAA;AAC9B,QAAIA,MAAS;AAAiB,aAAA;AAC9B,QAAIA,MAAS;AAAmB,aAAA;AAAA,EAC9B,GAAA,CAACC,GAAUI,GAAML,CAAI,CAAC,GAEnBW,IAAgBC;AAAA,IACrBC,EAAO;AAAA,IACPJ,KAAiBI,EAAO;AAAA,IACxBZ,KAAYY,EAAO;AAAA,IACnBN,KAASM,EAAO;AAAA,IAChBd;AAAA,EAAA;AAIA,SAAA,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,KAAAhB;AAAA,MACA,WAAWa;AAAA,MACX,MAAK;AAAA,MAEJ,UAAA;AAAA,QAAA,CAAC,CAACF,KAAiB,CAACR,KACnB,gBAAAc,EAAAC,GAAA,EAAK,WAAWH,EAAO,MAAM,MAAMJ,GAAe,MAAMH,EAAU,CAAA;AAAA,QAGlEL,IASA,gBAAAc;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAWF,EAAO;AAAA,YAClB,WAAAT;AAAA,YACA,cAAAD;AAAA,YACA,OAAAI;AAAA,YACA,UAAAC;AAAA,UAAA;AAAA,QACD,IAdA,gBAAAO;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAWF,EAAO;AAAA,YAClB,MAAAb;AAAA,YACA,WAAAI;AAAA,YACA,cAAAD;AAAA,YACA,OAAAI;AAAA,YACA,UAAAC;AAAA,UAAA;AAAA,QAAA;AAAA,QAUF,gBAAAO,EAAA,QAAA,EAAK,WAAWF,EAAO,aAAc,UAAYX,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGrD,CAAC;AAEDP,EAAU,cAAc;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const t = "
|
|
2
|
+
const t = "_textfield_21xqz_1", e = "_icon_21xqz_28", _ = "_input_21xqz_38", c = "_placeholder_21xqz_51", n = "_withIcon_21xqz_76", o = "_textarea_21xqz_86", a = "_hasValue_21xqz_95", l = {
|
|
3
3
|
textfield: t,
|
|
4
4
|
icon: e,
|
|
5
5
|
input: _,
|
|
@@ -9,7 +9,7 @@ const t = "_textfield_1jh3x_1", e = "_icon_1jh3x_27", _ = "_input_1jh3x_36", c =
|
|
|
9
9
|
hasValue: a
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
l as default,
|
|
13
13
|
a as hasValue,
|
|
14
14
|
e as icon,
|
|
15
15
|
_ as input,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TDataInitialType, TDataProviderProps } from './type';
|
|
3
|
+
declare const DataContext: import("react").Context<TDataInitialType>;
|
|
4
|
+
declare const DataProvider: ({ children }: TDataProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { DataProvider, DataContext };
|
|
6
|
+
//# sourceMappingURL=DataContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataContext.d.ts","sourceRoot":"","sources":["../../../../src/components/context/Data/DataContext.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAO9D,QAAA,MAAM,WAAW,2CAA6B,CAAC;AAC/C,QAAA,MAAM,YAAY,iBAAkB,kBAAkB,4CAQrD,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as d } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as a, useState as i } from "react";
|
|
4
|
-
import { defaultSiderMode as e } from "
|
|
4
|
+
import { defaultSiderMode as e } from "../../layout/Sider/types.js";
|
|
5
5
|
const s = {
|
|
6
6
|
siderMode: e,
|
|
7
7
|
setSiderMode: () => null
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataContext.js","sources":["../../../../src/components/context/Data/DataContext.tsx"],"sourcesContent":["import { useState, createContext } from 'react';\n\nimport { TSiderModes, defaultSiderMode } from '#components/layout/Sider/types';\n\nimport { TDataInitialType, TDataProviderProps } from './type';\n\nconst DataDefault: TDataInitialType = {\n\tsiderMode: defaultSiderMode,\n\tsetSiderMode: () => null,\n};\n\nconst DataContext = createContext(DataDefault);\nconst DataProvider = ({ children }: TDataProviderProps) => {\n\tconst [siderMode, setSiderMode] = useState<TSiderModes>(defaultSiderMode);\n\n\treturn (\n\t\t<DataContext.Provider value={{ siderMode, setSiderMode }}>\n\t\t\t{children}\n\t\t</DataContext.Provider>\n\t);\n};\n\nexport { DataProvider, DataContext };\n"],"names":["DataDefault","defaultSiderMode","DataContext","createContext","DataProvider","children","siderMode","setSiderMode","useState","jsx"],"mappings":";;;;AAMA,MAAMA,IAAgC;AAAA,EACrC,WAAWC;AAAA,EACX,cAAc,MAAM;AACrB,GAEMC,IAAcC,EAAcH,CAAW,GACvCI,IAAe,CAAC,EAAE,UAAAC,QAAmC;AAC1D,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAsBP,CAAgB;AAGvE,SAAA,gBAAAQ,EAACP,EAAY,UAAZ,EAAqB,OAAO,EAAE,WAAAI,GAAW,cAAAC,EAAa,GACrD,UAAAF,EACF,CAAA;AAEF;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TSiderModes } from '../../layout/Sider/types';
|
|
3
|
+
export type TDataInitialType = {
|
|
4
|
+
siderMode: TSiderModes;
|
|
5
|
+
setSiderMode: (mode: TSiderModes) => void;
|
|
6
|
+
};
|
|
7
|
+
export type TDataProviderProps = {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/components/context/Data/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,MAAM,MAAM,gBAAgB,GAAG;IAC9B,SAAS,EAAE,WAAW,CAAC;IACvB,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C,CAAA;AACD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACvB,CAAA"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { createContext as
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as u, useState as h, useEffect as a } from "react";
|
|
4
4
|
import { win as o } from "../../../utils/helper/domHelper.js";
|
|
5
5
|
import "../../../utils/helper/themeController.js";
|
|
6
6
|
import { defaultScheme as d, defaultColor as p } from "./type.js";
|
|
7
|
-
var c,
|
|
8
|
-
const
|
|
9
|
-
|
|
7
|
+
var c, l;
|
|
8
|
+
const r = {
|
|
9
|
+
themeScheme: ((c = o) == null ? void 0 : c.__themeScheme) ?? d,
|
|
10
10
|
setThemeScheme: () => null,
|
|
11
|
-
|
|
11
|
+
themeColor: ((l = o) == null ? void 0 : l.__themeColor) ?? p,
|
|
12
12
|
setThemeColor: () => null
|
|
13
|
-
}, x =
|
|
14
|
-
const [n,
|
|
13
|
+
}, x = u(r), D = ({ children: s }) => {
|
|
14
|
+
const [n, C] = h(r.themeScheme), [f, _] = h(r.themeColor), S = (m) => {
|
|
15
15
|
var e, t;
|
|
16
|
-
return (t = (e = o) == null ? void 0 : e.__setPreferredThemeScheme) == null ? void 0 : t.call(e,
|
|
17
|
-
},
|
|
16
|
+
return (t = (e = o) == null ? void 0 : e.__setPreferredThemeScheme) == null ? void 0 : t.call(e, m);
|
|
17
|
+
}, T = (m) => {
|
|
18
18
|
var e, t;
|
|
19
|
-
return (t = (e = o) == null ? void 0 : e.__setPreferredThemeColor) == null ? void 0 : t.call(e,
|
|
19
|
+
return (t = (e = o) == null ? void 0 : e.__setPreferredThemeColor) == null ? void 0 : t.call(e, m);
|
|
20
20
|
};
|
|
21
|
-
return
|
|
22
|
-
o && (o.__onThemeSchemeChange =
|
|
23
|
-
}, []), /* @__PURE__ */
|
|
21
|
+
return a(() => {
|
|
22
|
+
o && (o.__onThemeSchemeChange = C, o.__onThemeColorChange = _);
|
|
23
|
+
}, []), /* @__PURE__ */ i(x.Provider, { value: { themeScheme: n, setThemeScheme: S, themeColor: f, setThemeColor: T }, children: s });
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
26
|
x as ThemeContext,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.js","sources":["../../../../src/components/context/Theme/ThemeContext.tsx"],"sourcesContent":["import { createContext, useEffect, useState } from 'react';\n\nimport { win } from '#utils/index';\n\nimport { TThemeColor, TThemeInitialType, TThemeProviderProps, TThemeScheme, defaultColor, defaultScheme } from './type';\n\nconst ThemeDefault: TThemeInitialType = {\n\
|
|
1
|
+
{"version":3,"file":"ThemeContext.js","sources":["../../../../src/components/context/Theme/ThemeContext.tsx"],"sourcesContent":["import { createContext, useEffect, useState } from 'react';\n\nimport { win } from '#utils/index';\n\nimport { TThemeColor, TThemeInitialType, TThemeProviderProps, TThemeScheme, defaultColor, defaultScheme } from './type';\n\nconst ThemeDefault: TThemeInitialType = {\n\tthemeScheme: win?.__themeScheme ?? defaultScheme,\n\tsetThemeScheme: () => null,\n\tthemeColor: win?.__themeColor ?? defaultColor,\n\tsetThemeColor: () => null,\n};\n\nconst ThemeContext = createContext(ThemeDefault);\nconst ThemeProvider = ({ children }: TThemeProviderProps) => {\n\tconst [themeScheme, setScheme] = useState<TThemeScheme>(ThemeDefault.themeScheme);\n\tconst [themeColor, setColor] = useState<TThemeColor>(ThemeDefault.themeColor);\n\n\tconst setThemeScheme = (val: TThemeScheme) => win?.__setPreferredThemeScheme?.(val);\n\tconst setThemeColor = (val: TThemeColor) => win?.__setPreferredThemeColor?.(val);\n\n\tuseEffect(() => {\n\t\tif (win) {\n\t\t\twin.__onThemeSchemeChange = setScheme;\n\t\t\twin.__onThemeColorChange = setColor;\n\t\t}\n\t}, []);\n\n\treturn (\n\t\t<ThemeContext.Provider value={{ themeScheme, setThemeScheme, themeColor, setThemeColor }}>\n\t\t\t{children}\n\t\t</ThemeContext.Provider>\n\t);\n};\n\nexport { ThemeProvider, ThemeContext };\n"],"names":["ThemeDefault","_a","win","defaultScheme","_b","defaultColor","ThemeContext","createContext","ThemeProvider","children","themeScheme","setScheme","useState","themeColor","setColor","setThemeScheme","val","setThemeColor","useEffect","jsx"],"mappings":";;;;;;;AAMA,MAAMA,IAAkC;AAAA,EACvC,eAAaC,IAAAC,MAAA,gBAAAD,EAAK,kBAAiBE;AAAA,EACnC,gBAAgB,MAAM;AAAA,EACtB,cAAYC,IAAAF,MAAA,gBAAAE,EAAK,iBAAgBC;AAAA,EACjC,eAAe,MAAM;AACtB,GAEMC,IAAeC,EAAcP,CAAY,GACzCQ,IAAgB,CAAC,EAAE,UAAAC,QAAoC;AAC5D,QAAM,CAACC,GAAaC,CAAS,IAAIC,EAAuBZ,EAAa,WAAW,GAC1E,CAACa,GAAYC,CAAQ,IAAIF,EAAsBZ,EAAa,UAAU,GAEtEe,IAAiB,CAACC,MAAsB;;AAAA,YAAAZ,KAAAH,IAAAC,MAAA,gBAAAD,EAAK,8BAAL,gBAAAG,EAAA,KAAAH,GAAiCe;AAAA,KACzEC,IAAgB,CAACD,MAAqB;;AAAA,YAAAZ,KAAAH,IAAAC,MAAA,gBAAAD,EAAK,6BAAL,gBAAAG,EAAA,KAAAH,GAAgCe;AAAA;AAE5E,SAAAE,EAAU,MAAM;AACf,IAAIhB,MACHA,EAAI,wBAAwBS,GAC5BT,EAAI,uBAAuBY;AAAA,EAE7B,GAAG,CAAE,CAAA,GAGJ,gBAAAK,EAACb,EAAa,UAAb,EAAsB,OAAO,EAAE,aAAAI,GAAa,gBAAAK,GAAgB,YAAAF,GAAY,eAAAI,KACvE,UAAAR,EACF,CAAA;AAEF;"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type TThemeInitialType = {
|
|
3
|
-
|
|
3
|
+
themeScheme: TThemeScheme;
|
|
4
4
|
setThemeScheme: (scheme: TThemeScheme) => void;
|
|
5
|
-
|
|
5
|
+
themeColor: TThemeColor;
|
|
6
6
|
setThemeColor: (color: TThemeColor) => void;
|
|
7
7
|
};
|
|
8
8
|
export type TThemeProviderProps = {
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
declare enum EThemeScheme {
|
|
11
|
+
export declare enum EThemeScheme {
|
|
12
12
|
light = "light",
|
|
13
13
|
dark = "dark",
|
|
14
14
|
system = "system"
|
|
15
15
|
}
|
|
16
16
|
export type TThemeScheme = keyof typeof EThemeScheme;
|
|
17
17
|
export declare const defaultScheme = EThemeScheme.system;
|
|
18
|
-
declare enum EThemeColor {
|
|
18
|
+
export declare enum EThemeColor {
|
|
19
19
|
red = "red",
|
|
20
20
|
pink = "pink",
|
|
21
21
|
orange = "orange",
|
|
22
|
+
green = "green",
|
|
22
23
|
blue = "blue",
|
|
23
24
|
violet = "violet",
|
|
24
25
|
black = "black"
|
|
25
26
|
}
|
|
26
27
|
export type TThemeColor = keyof typeof EThemeColor;
|
|
27
28
|
export declare const defaultColor = EThemeColor.violet;
|
|
28
|
-
export {};
|
|
29
29
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/components/context/Theme/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,iBAAiB,GAAG;IAC/B,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/components/context/Theme/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,YAAY,CAAC;IAC1B,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC5C,CAAA;AACD,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACvB,CAAA;AAED,oBAAY,YAAY;IACvB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;CACjB;AACD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,YAAY,CAAC;AACrD,eAAO,MAAM,aAAa,sBAAsB,CAAC;AAEjD,oBAAY,WAAW;IACtB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CACf;AACD,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,WAAW,CAAC;AACnD,eAAO,MAAM,YAAY,qBAAqB,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
var n = /* @__PURE__ */ ((t) => (t.light = "light", t.dark = "dark", t.system = "system", t))(n || {});
|
|
3
|
+
const r = "system";
|
|
4
|
+
var a = /* @__PURE__ */ ((t) => (t.red = "red", t.pink = "pink", t.orange = "orange", t.green = "green", t.blue = "blue", t.violet = "violet", t.black = "black", t))(a || {});
|
|
5
|
+
const s = "violet";
|
|
3
6
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
a as EThemeColor,
|
|
8
|
+
n as EThemeScheme,
|
|
9
|
+
s as defaultColor,
|
|
10
|
+
r as defaultScheme
|
|
6
11
|
};
|
|
7
12
|
//# sourceMappingURL=type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sources":["../../../../src/components/context/Theme/type.ts"],"sourcesContent":["import { ReactNode } from 'react';\n\nexport type TThemeInitialType = {\n\
|
|
1
|
+
{"version":3,"file":"type.js","sources":["../../../../src/components/context/Theme/type.ts"],"sourcesContent":["import { ReactNode } from 'react';\n\nexport type TThemeInitialType = {\n\tthemeScheme: TThemeScheme,\n\tsetThemeScheme: (scheme: TThemeScheme) => void,\n\tthemeColor: TThemeColor,\n\tsetThemeColor: (color: TThemeColor) => void,\n}\nexport type TThemeProviderProps = {\n children?: ReactNode\n}\n\nexport enum EThemeScheme {\n\tlight = 'light',\n\tdark = 'dark',\n\tsystem = 'system',\n}\nexport type TThemeScheme = keyof typeof EThemeScheme;\nexport const defaultScheme = EThemeScheme.system;\n\nexport enum EThemeColor {\n\tred = 'red',\n\tpink = 'pink',\n\torange = 'orange',\n\tgreen = 'green',\n\tblue = 'blue',\n\tviolet = 'violet',\n\tblack = 'black',\n}\nexport type TThemeColor = keyof typeof EThemeColor;\nexport const defaultColor = EThemeColor.violet;\n"],"names":["EThemeScheme","defaultScheme","EThemeColor","defaultColor"],"mappings":";AAYY,IAAAA,sBAAAA,OACXA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UAHEA,IAAAA,KAAA,CAAA,CAAA;AAML,MAAMC,IAAgB;AAEjB,IAAAC,sBAAAA,OACXA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,QAAQ,SAPGA,IAAAA,KAAA,CAAA,CAAA;AAUL,MAAMC,IAAe;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { DataProvider as e } from "./DataContext.js";
|
|
3
|
+
import { DataProvider as e } from "./Data/DataContext.js";
|
|
4
4
|
import { ThemeProvider as i } from "./Theme/ThemeContext.js";
|
|
5
5
|
const n = ({ children: o }) => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(e, { children: o }) });
|
|
6
6
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/context/index.tsx"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport { DataProvider } from './DataContext';\nimport { ThemeProvider } from './Theme/ThemeContext';\n\nexport const XProvider = ({ children }: XProviderProps) => {\n\treturn (\n\t\t<ThemeProvider>\n\t\t\t<DataProvider>\n\t\t\t\t{children}\n\t\t\t</DataProvider>\n\t\t</ThemeProvider>\n\t);\n};\n\ninterface XProviderProps {\n children?: ReactNode\n}\n"],"names":["XProvider","children","jsx","ThemeProvider","DataProvider"],"mappings":";;;;AAKO,MAAMA,IAAY,CAAC,EAAE,UAAAC,QAEzB,gBAAAC,EAAAC,GAAA,EACA,UAAC,gBAAAD,EAAAE,GAAA,EACC,UAAAH,GACF,EACD,CAAA;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/context/index.tsx"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport { DataProvider } from './Data/DataContext';\nimport { ThemeProvider } from './Theme/ThemeContext';\n\nexport const XProvider = ({ children }: XProviderProps) => {\n\treturn (\n\t\t<ThemeProvider>\n\t\t\t<DataProvider>\n\t\t\t\t{children}\n\t\t\t</DataProvider>\n\t\t</ThemeProvider>\n\t);\n};\n\ninterface XProviderProps {\n children?: ReactNode\n}\n"],"names":["XProvider","children","jsx","ThemeProvider","DataProvider"],"mappings":";;;;AAKO,MAAMA,IAAY,CAAC,EAAE,UAAAC,QAEzB,gBAAAC,EAAAC,GAAA,EACA,UAAC,gBAAAD,EAAAE,GAAA,EACC,UAAAH,GACF,EACD,CAAA;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TDataInitialType } from './
|
|
1
|
+
import { TDataInitialType } from './Data/type';
|
|
2
2
|
import { TThemeInitialType } from './Theme/type';
|
|
3
3
|
export declare const useXData: () => TDataInitialType;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const useXTheme: () => TThemeInitialType;
|
|
5
5
|
//# sourceMappingURL=useContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/useContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/useContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,eAAO,MAAM,QAAQ,QAAO,gBAA2C,CAAC;AACxE,eAAO,MAAM,SAAS,QAAO,iBAA6C,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useContext as t } from "react";
|
|
3
|
-
import { DataContext as e } from "./DataContext.js";
|
|
3
|
+
import { DataContext as e } from "./Data/DataContext.js";
|
|
4
4
|
import { ThemeContext as o } from "./Theme/ThemeContext.js";
|
|
5
5
|
const s = () => t(e), a = () => t(o);
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
s as useXData,
|
|
8
|
+
a as useXTheme
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=useContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContext.js","sources":["../../../src/components/context/useContext.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { DataContext
|
|
1
|
+
{"version":3,"file":"useContext.js","sources":["../../../src/components/context/useContext.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { DataContext } from './Data/DataContext';\nimport { TDataInitialType } from './Data/type';\nimport { ThemeContext } from './Theme/ThemeContext';\nimport { TThemeInitialType } from './Theme/type';\n\nexport const useXData = (): TDataInitialType => useContext(DataContext);\nexport const useXTheme = (): TThemeInitialType => useContext(ThemeContext);\n"],"names":["useXData","useContext","DataContext","useXTheme","ThemeContext"],"mappings":";;;;AAOa,MAAAA,IAAW,MAAwBC,EAAWC,CAAW,GACzDC,IAAY,MAAyBF,EAAWG,CAAY;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Navigation/Navigation.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Navigation/Navigation.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,UAAU,6GAmDrB,CAAC"}
|
|
@@ -11,40 +11,48 @@ const $ = j((h, p) => {
|
|
|
11
11
|
);
|
|
12
12
|
return L(() => {
|
|
13
13
|
n === s && l("/");
|
|
14
|
-
}, [n, s]), /* @__PURE__ */ f(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
14
|
+
}, [n, s]), /* @__PURE__ */ f(
|
|
15
|
+
"section",
|
|
16
|
+
{
|
|
17
|
+
ref: p,
|
|
18
|
+
className: y,
|
|
19
|
+
role: "navigation",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ c("div", { className: i.brand, children: g }),
|
|
22
|
+
/* @__PURE__ */ c("div", { className: i.routeList, children: x.map((a, b) => {
|
|
23
|
+
var m;
|
|
24
|
+
return /* @__PURE__ */ f(
|
|
25
|
+
e,
|
|
26
|
+
{
|
|
27
|
+
className: d(
|
|
28
|
+
i.route,
|
|
29
|
+
(a == null ? void 0 : a.href) === n && i.loading,
|
|
30
|
+
(a == null ? void 0 : a.href) === s && i.active
|
|
31
|
+
),
|
|
32
|
+
[v]: a == null ? void 0 : a.href,
|
|
33
|
+
onClick: () => {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
n !== s && l(a == null ? void 0 : a.href);
|
|
36
|
+
}, 150);
|
|
37
|
+
},
|
|
38
|
+
children: [
|
|
39
|
+
(a == null ? void 0 : a.icon) && /* @__PURE__ */ c(
|
|
40
|
+
T,
|
|
41
|
+
{
|
|
42
|
+
className: (m = i) == null ? void 0 : m.icon,
|
|
43
|
+
code: a == null ? void 0 : a.icon,
|
|
44
|
+
type: (a == null ? void 0 : a.href) === s ? "duotone" : "thin"
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ c("span", { className: i.label, children: a == null ? void 0 : a.name })
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
`route-${a == null ? void 0 : a.href}-${b}`
|
|
51
|
+
);
|
|
52
|
+
}) })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
48
56
|
});
|
|
49
57
|
$.displayName = "Navigation";
|
|
50
58
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.js","sources":["../../../../src/components/layout/Navigation/Navigation.tsx"],"sourcesContent":["import { forwardRef, useEffect, useState } from 'react';\n\nimport clsx from 'clsx';\n\nimport { Icon } from '#components/base/Icon/Icon';\n\nimport styles from './navigation.module.scss';\nimport { TNavigationProps } from './types';\n\nexport const Navigation = forwardRef<HTMLDivElement, TNavigationProps>((props, ref) => {\n\tconst { className, children, hrefPropName = 'href', routes = [], pathname = '', as: Tag = 'a' as const } = props;\n\tconst [loading, setLoading] = useState<string>('/');\n\n\tconst NavigationClsx = clsx(\n\t\tstyles.navigation,\n\t\tclassName,\n\t);\n\n\tuseEffect(() => {\n\t\tif (loading === pathname)\n\t\t\tsetLoading('/');\n\t}, [loading, pathname]);\n\n\treturn (\n\t\t<section
|
|
1
|
+
{"version":3,"file":"Navigation.js","sources":["../../../../src/components/layout/Navigation/Navigation.tsx"],"sourcesContent":["import { forwardRef, useEffect, useState } from 'react';\n\nimport clsx from 'clsx';\n\nimport { Icon } from '#components/base/Icon/Icon';\n\nimport styles from './navigation.module.scss';\nimport { TNavigationProps } from './types';\n\nexport const Navigation = forwardRef<HTMLDivElement, TNavigationProps>((props, ref) => {\n\tconst { className, children, hrefPropName = 'href', routes = [], pathname = '', as: Tag = 'a' as const } = props;\n\tconst [loading, setLoading] = useState<string>('/');\n\n\tconst NavigationClsx = clsx(\n\t\tstyles.navigation,\n\t\tclassName,\n\t);\n\n\tuseEffect(() => {\n\t\tif (loading === pathname)\n\t\t\tsetLoading('/');\n\t}, [loading, pathname]);\n\n\treturn (\n\t\t<section\n\t\t\tref={ref}\n\t\t\tclassName={NavigationClsx}\n\t\t\trole='navigation'\n\t\t>\n\t\t\t<div className={styles.brand}>{children}</div>\n\t\t\t<div className={styles.routeList}>\n\t\t\t\t{\n\t\t\t\t\troutes.map((route, i) => (\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tkey={`route-${route?.href}-${i}`}\n\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\tstyles.route,\n\t\t\t\t\t\t\t\troute?.href === loading && styles.loading,\n\t\t\t\t\t\t\t\troute?.href === pathname && styles.active,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{...({ [hrefPropName]: route?.href })}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetTimeout(() => { if (loading !== pathname) setLoading(route?.href); }, 150);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\troute?.icon &&\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tclassName={styles?.icon}\n\t\t\t\t\t\t\t\t\tcode={route?.icon}\n\t\t\t\t\t\t\t\t\ttype={route?.href === pathname ? 'duotone' : 'thin'}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span className={styles.label}>{route?.name}</span>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t))\n\t\t\t\t}\n\t\t\t</div>\n\t\t</section>\n\t);\n});\n\nNavigation.displayName = 'Navigation';\n"],"names":["Navigation","forwardRef","props","ref","className","children","hrefPropName","routes","pathname","Tag","loading","setLoading","useState","NavigationClsx","clsx","styles","useEffect","jsxs","jsx","route","i","Icon","_a"],"mappings":";;;;;;AASO,MAAMA,IAAaC,EAA6C,CAACC,GAAOC,MAAQ;AACtF,QAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,cAAAC,IAAe,QAAQ,QAAAC,IAAS,CAAA,GAAI,UAAAC,IAAW,IAAI,IAAIC,IAAM,QAAiBP,GACrG,CAACQ,GAASC,CAAU,IAAIC,EAAiB,GAAG,GAE5CC,IAAiBC;AAAA,IACtBC,EAAO;AAAA,IACPX;AAAA,EAAA;AAGD,SAAAY,EAAU,MAAM;AACf,IAAIN,MAAYF,KACfG,EAAW,GAAG;AAAA,EAAA,GACb,CAACD,GAASF,CAAQ,CAAC,GAGrB,gBAAAS;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,KAAAd;AAAA,MACA,WAAWU;AAAA,MACX,MAAK;AAAA,MAEL,UAAA;AAAA,QAAA,gBAAAK,EAAC,OAAI,EAAA,WAAWH,EAAO,OAAQ,UAAAV,GAAS;AAAA,QACxC,gBAAAa,EAAC,SAAI,WAAWH,EAAO,WAErB,UAAOR,EAAA,IAAI,CAACY,GAAOC,MAClB;;AAAA,iCAAAH;AAAA,YAACR;AAAA,YAAA;AAAA,cAEA,WAAWK;AAAA,gBACVC,EAAO;AAAA,iBACPI,KAAA,gBAAAA,EAAO,UAAST,KAAWK,EAAO;AAAA,iBAClCI,KAAA,gBAAAA,EAAO,UAASX,KAAYO,EAAO;AAAA,cACpC;AAAA,cACO,CAACT,CAAY,GAAGa,KAAA,gBAAAA,EAAO;AAAA,cAC9B,SAAS,MAAM;AACd,2BAAW,MAAM;AAAE,kBAAIT,MAAYF,KAAUG,EAAWQ,KAAA,gBAAAA,EAAO,IAAI;AAAA,mBAAM,GAAG;AAAA,cAC7E;AAAA,cAGC,UAAA;AAAA,iBAAAA,KAAA,gBAAAA,EAAO,SACP,gBAAAD;AAAA,kBAACG;AAAA,kBAAA;AAAA,oBACA,YAAWC,IAAAP,MAAA,gBAAAO,EAAQ;AAAA,oBACnB,MAAMH,KAAA,gBAAAA,EAAO;AAAA,oBACb,OAAMA,KAAA,gBAAAA,EAAO,UAASX,IAAW,YAAY;AAAA,kBAAA;AAAA,gBAC9C;AAAA,kCAEA,QAAK,EAAA,WAAWO,EAAO,OAAQ,iCAAO,MAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAnBvC,SAASI,KAAA,gBAAAA,EAAO,IAAI,IAAIC,CAAC;AAAA,UAqB/B;AAAA,SAAA,GAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH,CAAC;AAEDpB,EAAW,cAAc;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const o = "
|
|
2
|
+
const o = "_navigation_158kh_1", t = "_brand_158kh_9", _ = "_routeList_158kh_18", n = "_route_158kh_18", a = "_icon_158kh_60", e = "_label_158kh_66", i = "_loading_158kh_79", c = "_barberPole_158kh_1", s = "_active_158kh_94", r = {
|
|
3
3
|
navigation: o,
|
|
4
4
|
brand: t,
|
|
5
5
|
routeList: _,
|
|
@@ -14,7 +14,7 @@ export {
|
|
|
14
14
|
s as active,
|
|
15
15
|
c as barberPole,
|
|
16
16
|
t as brand,
|
|
17
|
-
|
|
17
|
+
r as default,
|
|
18
18
|
a as icon,
|
|
19
19
|
e as label,
|
|
20
20
|
i as loading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sider.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Sider/Sider.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Sider.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Sider/Sider.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,KAAK,wGAsChB,CAAC"}
|
|
@@ -20,11 +20,19 @@ const g = h((t, s) => {
|
|
|
20
20
|
m && e.miniRightSider,
|
|
21
21
|
d
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */ f(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
return /* @__PURE__ */ f(
|
|
24
|
+
"section",
|
|
25
|
+
{
|
|
26
|
+
ref: s,
|
|
27
|
+
className: c,
|
|
28
|
+
role: "sider",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ i("div", { className: e.leftSiderContainer, children: n }),
|
|
31
|
+
/* @__PURE__ */ i("div", { className: e.rightSiderContainer, children: a }),
|
|
32
|
+
/* @__PURE__ */ i("div", { className: e.content, children: o })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
28
36
|
});
|
|
29
37
|
g.displayName = "Sider";
|
|
30
38
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sider.js","sources":["../../../../src/components/layout/Sider/Sider.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport clsx from 'clsx';\n\nimport { useXData } from '#components/context/useContext';\n\nimport styles from './sider.module.scss';\nimport { TSiderProps } from './types';\n\nexport const Sider = forwardRef<HTMLDivElement, TSiderProps>((props, ref) => {\n\tconst {\n\t\tclassName,\n\t\tchildren,\n\t\tleftSider,\n\t\tshowMiniLeftSider = true,\n\t\trightSider,\n\t\tshowMiniRightSider = false,\n\t} = props;\n\n\tconst { siderMode } = useXData();\n\n\tconst SiderClsx = clsx(\n\t\tstyles.sider,\n\t\tsiderMode === 'left' && styles.leftOpen,\n\t\tshowMiniLeftSider && styles.miniLeftSider,\n\t\tsiderMode === 'right' && styles.rightOpen,\n\t\tshowMiniRightSider && styles.miniRightSider,\n\t\tclassName,\n\t);\n\n\treturn (\n\t\t<section
|
|
1
|
+
{"version":3,"file":"Sider.js","sources":["../../../../src/components/layout/Sider/Sider.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport clsx from 'clsx';\n\nimport { useXData } from '#components/context/useContext';\n\nimport styles from './sider.module.scss';\nimport { TSiderProps } from './types';\n\nexport const Sider = forwardRef<HTMLDivElement, TSiderProps>((props, ref) => {\n\tconst {\n\t\tclassName,\n\t\tchildren,\n\t\tleftSider,\n\t\tshowMiniLeftSider = true,\n\t\trightSider,\n\t\tshowMiniRightSider = false,\n\t} = props;\n\n\tconst { siderMode } = useXData();\n\n\tconst SiderClsx = clsx(\n\t\tstyles.sider,\n\t\tsiderMode === 'left' && styles.leftOpen,\n\t\tshowMiniLeftSider && styles.miniLeftSider,\n\t\tsiderMode === 'right' && styles.rightOpen,\n\t\tshowMiniRightSider && styles.miniRightSider,\n\t\tclassName,\n\t);\n\n\treturn (\n\t\t<section\n\t\t\tref={ref}\n\t\t\tclassName={SiderClsx}\n\t\t\trole='sider'\n\t\t>\n\t\t\t<div className={styles.leftSiderContainer}>\n\t\t\t\t{leftSider}\n\t\t\t</div>\n\t\t\t<div className={styles.rightSiderContainer}>\n\t\t\t\t{rightSider}\n\t\t\t</div>\n\t\t\t<div className={styles.content}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</section>\n\t);\n});\n\nSider.displayName = 'Sider';\n"],"names":["Sider","forwardRef","props","ref","className","children","leftSider","showMiniLeftSider","rightSider","showMiniRightSider","siderMode","useXData","SiderClsx","clsx","styles","jsxs","jsx"],"mappings":";;;;;;AASO,MAAMA,IAAQC,EAAwC,CAACC,GAAOC,MAAQ;AACtE,QAAA;AAAA,IACL,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,YAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,EAClB,IAAAP,GAEE,EAAE,WAAAQ,MAAcC,KAEhBC,IAAYC;AAAA,IACjBC,EAAO;AAAA,IACPJ,MAAc,UAAUI,EAAO;AAAA,IAC/BP,KAAqBO,EAAO;AAAA,IAC5BJ,MAAc,WAAWI,EAAO;AAAA,IAChCL,KAAsBK,EAAO;AAAA,IAC7BV;AAAA,EAAA;AAIA,SAAA,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,KAAAZ;AAAA,MACA,WAAWS;AAAA,MACX,MAAK;AAAA,MAEL,UAAA;AAAA,QAAA,gBAAAI,EAAC,OAAI,EAAA,WAAWF,EAAO,oBACrB,UACFR,GAAA;AAAA,QACC,gBAAAU,EAAA,OAAA,EAAI,WAAWF,EAAO,qBACrB,UACFN,GAAA;AAAA,QACC,gBAAAQ,EAAA,OAAA,EAAI,WAAWF,EAAO,SACrB,UAAAT,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH,CAAC;AAEDL,EAAM,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/ThemePicker/ThemePicker.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAqC,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQ9E,eAAO,MAAM,WAAW,8GAoEtB,CAAC"}
|