@apple-pie/slice 0.1.24 → 0.1.26
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/cjs/chunks/{AudioBubble-C8HdYBY8.js → AudioBubble-Bqb2Jexf.js} +1 -0
- package/dist/cjs/chunks/{Avatar-CUaQ3kN1.js → Avatar-Dg8ZHnw6.js} +1 -0
- package/dist/cjs/chunks/{AvatarGroup-B3M7o4Hh.js → AvatarGroup-F8eSiMwn.js} +2 -1
- package/dist/cjs/chunks/{Badge-CY_DG6cD.js → Badge-DjPJ_iJX.js} +1 -0
- package/dist/cjs/chunks/{Button-DmWbooXb.js → Button-D3wZtdtj.js} +2 -1
- package/dist/cjs/chunks/{ButtonBar-RSBwFaU-.js → ButtonBar-EH8fHFhS.js} +6 -5
- package/dist/cjs/chunks/{Camera-CLm3aQR8.js → Camera-BnsGhOrt.js} +2 -1
- package/dist/cjs/chunks/{CheckBox-DDINn56u.js → CheckBox-CEWLxffo.js} +2 -1
- package/dist/cjs/chunks/{Chip-DRSg6kLh.js → Chip-BrQgOmJc.js} +2 -1
- package/dist/cjs/chunks/{DivInput-DO3Dgbjp.js → DivInput-DWPwVUs_.js} +1 -0
- package/dist/cjs/chunks/{Dot-_HCJ3qxd.js → Dot-fKIwhjYA.js} +1 -0
- package/dist/cjs/chunks/{DrggablePanel-CERavfv3.js → DrggablePanel-Duv0nmOm.js} +22 -16
- package/dist/cjs/chunks/{DropDown-Cy2o78yw.js → DropDown-Bf_pm-Go.js} +2 -1
- package/dist/cjs/chunks/{ErrorSummary-BfVHS893.js → ErrorSummary-K_rPxGWK.js} +1 -0
- package/dist/cjs/chunks/{FileIcon-xoD-xIme.js → FileIcon-DgRlhqzv.js} +1 -0
- package/dist/cjs/chunks/{FileList-DjTXjXnK.js → FileList-DobAcOSH.js} +2 -1
- package/dist/cjs/chunks/{_types-Sa2RAJ2U.js → FlexDiv-C-3ahI-j.js} +79 -9
- package/dist/cjs/chunks/{Grouper-RYRxazG9.js → Grouper-D9G8PKoM.js} +2 -1
- package/dist/cjs/chunks/{Icon-BB-t50Yt.js → Icon-fRM3E0N6.js} +20 -3
- package/dist/cjs/chunks/{IconButton-BUw3YUsI.js → IconButton-Cf2RBUKA.js} +7 -6
- package/dist/cjs/chunks/{Label-NzMpkZo2.js → Label-Bxp2pCXf.js} +1 -0
- package/dist/cjs/chunks/{Overlay-BX6vXX9F.js → Overlay-DDOvMM6L.js} +1 -0
- package/dist/cjs/chunks/{Pager-BN37VYEC.js → Pager-DO197OyC.js} +1 -0
- package/dist/cjs/chunks/{ProgressIndicator-8QZwTSyY.js → ProgressIndicator-t-jv4OhI.js} +2 -1
- package/dist/cjs/chunks/{PromptInput-D1wP5-uN.js → PromptInput-B1WG22xz.js} +2 -1
- package/dist/cjs/chunks/{RadioButton-Cvqum7dU.js → RadioButton-BAIMCshV.js} +2 -1
- package/dist/cjs/chunks/{RadioButtonList-CPHTioGa.js → RadioButtonList-Bsg5oFaC.js} +2 -1
- package/dist/cjs/chunks/{Slider-CnXBacf-.js → Slider-BAcaZUs2.js} +1 -0
- package/dist/cjs/chunks/{Spacer-CtxV2Pww.js → Spacer-CyZAUR5N.js} +1 -0
- package/dist/cjs/chunks/{Switch-Cbn0ql3B.js → Switch-Crm-nHYI.js} +1 -0
- package/dist/cjs/chunks/{TabBar-CnD3E-qa.js → TabBar-BfyfjmPQ.js} +2 -1
- package/dist/cjs/chunks/{TextArea-CtJi771p.js → TextArea-CHNWsfWH.js} +2 -1
- package/dist/cjs/chunks/{TextField-B2u_CZKk.js → TextField-2xzSdIx3.js} +2 -1
- package/dist/cjs/chunks/{Tip-DAxoyMyA.js → Tip-DceuNR6k.js} +1 -0
- package/dist/cjs/chunks/{Toast-D2fpwdjF.js → Toast-C8Hc9ZKI.js} +2 -1
- package/dist/cjs/chunks/{UploadArea-BS2BPuhZ.js → UploadArea-UFWRQ-nW.js} +2 -1
- package/dist/cjs/chunks/{_types-BD6txsj1.js → _types-VoADvwjb.js} +1 -0
- package/dist/cjs/components/AudioBubble/index.js +4 -3
- package/dist/cjs/components/Avatar/index.js +1 -1
- package/dist/cjs/components/AvatarGroup/index.js +2 -2
- package/dist/cjs/components/Badge/index.js +1 -1
- package/dist/cjs/components/Button/index.js +5 -5
- package/dist/cjs/components/ButtonBar/index.js +5 -4
- package/dist/cjs/components/Camera/index.js +5 -4
- package/dist/cjs/components/CheckBox/index.js +5 -4
- package/dist/cjs/components/Chip/index.js +5 -5
- package/dist/cjs/components/DivInput/index.js +1 -1
- package/dist/cjs/components/Dot/index.js +1 -1
- package/dist/cjs/components/DraggablePanel/index.js +4 -3
- package/dist/cjs/components/DropDown/index.js +5 -4
- package/dist/cjs/components/ErrorSummary/index.js +3 -2
- package/dist/cjs/components/FileIcon/index.js +3 -2
- package/dist/cjs/components/FileList/index.js +6 -6
- package/dist/cjs/components/FlexDiv/index.js +9 -4
- package/dist/cjs/components/Grouper/index.js +5 -4
- package/dist/cjs/components/Icon/index.js +4 -4
- package/dist/cjs/components/IconButton/index.js +5 -5
- package/dist/cjs/components/Label/index.js +1 -1
- package/dist/cjs/components/Overlay/index.js +1 -1
- package/dist/cjs/components/Pager/index.js +1 -1
- package/dist/cjs/components/Progress/index.js +5 -5
- package/dist/cjs/components/PromptInput/index.js +9 -8
- package/dist/cjs/components/RadioButton/index.js +5 -4
- package/dist/cjs/components/RadioButtonList/index.js +5 -5
- package/dist/cjs/components/Slider/index.js +1 -1
- package/dist/cjs/components/Spacer/index.js +1 -1
- package/dist/cjs/components/Switch/index.js +1 -1
- package/dist/cjs/components/TabBar/index.js +7 -6
- package/dist/cjs/components/TextArea/index.js +6 -5
- package/dist/cjs/components/Textfield/index.js +7 -6
- package/dist/cjs/components/Tip/index.js +1 -1
- package/dist/cjs/components/Toast/index.js +4 -4
- package/dist/cjs/components/UploadArea/index.js +7 -7
- package/dist/cjs/hooks/useAudioRecorder.js +1 -0
- package/dist/cjs/hooks/useDoubleClick.js +1 -0
- package/dist/cjs/hooks/useKeyboardShortcuts.js +1 -0
- package/dist/cjs/hooks/useLastUpdated.js +1 -0
- package/dist/cjs/hooks/useLocalStore.js +1 -0
- package/dist/cjs/hooks/useMdStreamBuffer.js +1 -0
- package/dist/cjs/hooks/useMicrophone.js +1 -0
- package/dist/cjs/hooks/useObserveResize.js +1 -0
- package/dist/cjs/hooks/useObserveTheme.js +9 -7
- package/dist/cjs/hooks/useTheme.js +2 -0
- package/dist/cjs/hooks/useToolTip.js +18 -5
- package/dist/cjs/hooks/useTrackRenders.js +1 -0
- package/dist/cjs/hooks/useWindow.js +2 -0
- package/dist/cjs/hooks.js +1 -0
- package/dist/cjs/index.js +11 -6
- package/dist/cjs/providers/ThemeProvider.js +37 -16
- package/dist/cjs/providers/themeServer.js +24 -0
- package/dist/cjs/providers.js +3 -2
- package/dist/esm/chunks/{AudioBubble-DFh3Vxl6.mjs → AudioBubble-DZfzkdlq.mjs} +1 -0
- package/dist/esm/chunks/{Avatar-C8uV7ROZ.mjs → Avatar-m5-zleDk.mjs} +1 -0
- package/dist/esm/chunks/{AvatarGroup-Bt1Lkn5S.mjs → AvatarGroup-DlgP4lTS.mjs} +2 -1
- package/dist/esm/chunks/{Badge-D-U1jomY.mjs → Badge-CC0zSLMf.mjs} +1 -0
- package/dist/esm/chunks/{Button-sEYjFcR2.mjs → Button-YER9dCLE.mjs} +5 -4
- package/dist/esm/chunks/{ButtonBar-DSR2lhhN.mjs → ButtonBar-BH4pcEpN.mjs} +6 -5
- package/dist/esm/chunks/{Camera-DSSiOeJd.mjs → Camera-BJJpDuuA.mjs} +3 -2
- package/dist/esm/chunks/{CheckBox-B6zWSySW.mjs → CheckBox-Cf2l3-D9.mjs} +2 -1
- package/dist/esm/chunks/{Chip-BBKJ6wG4.mjs → Chip-DWp7p2BF.mjs} +2 -1
- package/dist/esm/chunks/{DivInput-cIMIH07H.mjs → DivInput-WJltaCra.mjs} +1 -0
- package/dist/esm/chunks/{Dot-Cj6gWj4_.mjs → Dot-DZE134mJ.mjs} +1 -0
- package/dist/esm/chunks/{DrggablePanel-CQcIbxpX.mjs → DrggablePanel-DA7pYWg6.mjs} +22 -16
- package/dist/esm/chunks/{DropDown-DFUc_rjP.mjs → DropDown-BQ2tNN3_.mjs} +2 -1
- package/dist/esm/chunks/{ErrorSummary-Mz9siVxm.mjs → ErrorSummary-EzCqVifm.mjs} +1 -0
- package/dist/esm/chunks/{FileIcon-DeW-ZBiv.mjs → FileIcon-Cufsp1gn.mjs} +1 -0
- package/dist/esm/chunks/{FileList-0Dzx15hl.mjs → FileList-BQ9X5YnB.mjs} +4 -3
- package/dist/esm/chunks/{_types-DOQAaLqq.mjs → FlexDiv-BFrVoFhC.mjs} +82 -13
- package/dist/esm/chunks/{Grouper-B04WxD6K.mjs → Grouper-CvPYEsF_.mjs} +3 -2
- package/dist/esm/chunks/{Icon-KDwlMXzH.mjs → Icon-DI32kOA1.mjs} +20 -3
- package/dist/esm/chunks/{IconButton-oAB8ZFTf.mjs → IconButton-Dciw5CLn.mjs} +9 -8
- package/dist/esm/chunks/{Label-BD7VlTDw.mjs → Label-CvCDAg1y.mjs} +1 -0
- package/dist/esm/chunks/{Overlay-3KkyDm1f.mjs → Overlay-DiSvgIQP.mjs} +1 -0
- package/dist/esm/chunks/{Pager-DmiwYLl5.mjs → Pager-BoDLaKFh.mjs} +1 -0
- package/dist/esm/chunks/{ProgressIndicator-CxsZm_As.mjs → ProgressIndicator-CB_oazMD.mjs} +2 -1
- package/dist/esm/chunks/{PromptInput-D4Q-DWjz.mjs → PromptInput-plgRiAb7.mjs} +3 -2
- package/dist/esm/chunks/{RadioButton-B0jvM5VW.mjs → RadioButton-B6ImCUYY.mjs} +2 -1
- package/dist/esm/chunks/{RadioButtonList-DBRAv87_.mjs → RadioButtonList-Cf6gk8yp.mjs} +2 -1
- package/dist/esm/chunks/{Slider-CONGTXUE.mjs → Slider-Cav86rU6.mjs} +1 -0
- package/dist/esm/chunks/{Spacer-C5fcJYq-.mjs → Spacer-C5651N0N.mjs} +1 -0
- package/dist/esm/chunks/{Switch-CyoaJwSX.mjs → Switch-RfA431T4.mjs} +1 -0
- package/dist/esm/chunks/{TabBar-DmO1ixBz.mjs → TabBar-0zpJ9GtN.mjs} +4 -3
- package/dist/esm/chunks/{TextArea-DaB8g-fZ.mjs → TextArea-B64bIPHm.mjs} +2 -1
- package/dist/esm/chunks/{TextField-BGeEJXUJ.mjs → TextField-BZeoN_ye.mjs} +4 -3
- package/dist/esm/chunks/{Tip-DrQvxDsH.mjs → Tip-C5LB54J9.mjs} +1 -0
- package/dist/esm/chunks/{Toast-C5XSDgno.mjs → Toast-Bl4s4tRo.mjs} +2 -1
- package/dist/esm/chunks/{UploadArea-Gpq-MhqB.mjs → UploadArea-D3g2g1LK.mjs} +4 -3
- package/dist/esm/chunks/{_types-C2C2Zwd0.mjs → _types-DeEhv4Y5.mjs} +1 -0
- package/dist/esm/components/AudioBubble/index.mjs +5 -3
- package/dist/esm/components/Avatar/index.mjs +1 -1
- package/dist/esm/components/AvatarGroup/index.mjs +2 -2
- package/dist/esm/components/Badge/index.mjs +1 -1
- package/dist/esm/components/Button/index.mjs +7 -5
- package/dist/esm/components/ButtonBar/index.mjs +5 -3
- package/dist/esm/components/Camera/index.mjs +7 -5
- package/dist/esm/components/CheckBox/index.mjs +5 -3
- package/dist/esm/components/Chip/index.mjs +5 -3
- package/dist/esm/components/DivInput/index.mjs +1 -1
- package/dist/esm/components/Dot/index.mjs +1 -1
- package/dist/esm/components/DraggablePanel/index.mjs +5 -3
- package/dist/esm/components/DropDown/index.mjs +5 -3
- package/dist/esm/components/ErrorSummary/index.mjs +5 -3
- package/dist/esm/components/FileIcon/index.mjs +5 -1
- package/dist/esm/components/FileList/index.mjs +8 -6
- package/dist/esm/components/FlexDiv/index.mjs +1 -1
- package/dist/esm/components/Grouper/index.mjs +7 -5
- package/dist/esm/components/Icon/index.mjs +6 -4
- package/dist/esm/components/IconButton/index.mjs +6 -4
- package/dist/esm/components/Label/index.mjs +1 -1
- package/dist/esm/components/Overlay/index.mjs +1 -1
- package/dist/esm/components/Pager/index.mjs +1 -1
- package/dist/esm/components/Progress/index.mjs +6 -4
- package/dist/esm/components/PromptInput/index.mjs +12 -10
- package/dist/esm/components/RadioButton/index.mjs +5 -3
- package/dist/esm/components/RadioButtonList/index.mjs +6 -4
- package/dist/esm/components/Slider/index.mjs +1 -1
- package/dist/esm/components/Spacer/index.mjs +1 -1
- package/dist/esm/components/Switch/index.mjs +1 -1
- package/dist/esm/components/TabBar/index.mjs +9 -7
- package/dist/esm/components/TextArea/index.mjs +8 -6
- package/dist/esm/components/Textfield/index.mjs +11 -9
- package/dist/esm/components/Tip/index.mjs +1 -1
- package/dist/esm/components/Toast/index.mjs +6 -4
- package/dist/esm/components/UploadArea/index.mjs +9 -7
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -0
- package/dist/esm/hooks/useDoubleClick.mjs +1 -0
- package/dist/esm/hooks/useKeyboardShortcuts.mjs +1 -0
- package/dist/esm/hooks/useLastUpdated.mjs +1 -0
- package/dist/esm/hooks/useLocalStore.mjs +1 -0
- package/dist/esm/hooks/useMdStreamBuffer.mjs +1 -0
- package/dist/esm/hooks/useMicrophone.mjs +1 -0
- package/dist/esm/hooks/useObserveResize.mjs +1 -0
- package/dist/esm/hooks/useObserveTheme.mjs +11 -4
- package/dist/esm/hooks/useTheme.mjs +7 -0
- package/dist/esm/hooks/useToolTip.mjs +19 -6
- package/dist/esm/hooks/useTrackRenders.mjs +1 -0
- package/dist/esm/hooks/useWindow.mjs +2 -0
- package/dist/esm/hooks.mjs +6 -0
- package/dist/esm/index.mjs +37 -37
- package/dist/esm/providers/ThemeProvider.mjs +42 -19
- package/dist/esm/providers/themeServer.mjs +24 -0
- package/dist/esm/providers.mjs +2 -0
- package/dist/types/components/ButtonBar/_types.d.ts +2 -1
- package/dist/types/components/FlexDiv/FlexDiv.d.ts +2 -0
- package/dist/types/components/FlexDiv/_types.d.ts +77 -0
- package/dist/types/components/FlexDiv/index.d.ts +1 -1
- package/dist/types/components/Icon/_types.d.ts +2 -1
- package/dist/types/components/Icon/iconRegistry.d.ts +1 -1
- package/dist/types/components/IconButton/_types.d.ts +3 -1
- package/dist/types/hooks/useWindow/useWindow.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/providers/ThemeProvider.d.ts +5 -0
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/providers/themeServer.d.ts +19 -0
- package/dist/types/stores/window/windowStore.d.ts +2 -2
- package/package.json +2 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), styleInject_es = require("../chunks/style-inject.es-CMuL-BfJ.js"), theme_themes = require("../theme/themes.js");
|
|
@@ -17,39 +18,59 @@ styleInject_es.styleInject("[data-slice-theme-scope] {\n\t--motion-magnet: cubic
|
|
|
17
18
|
|
|
18
19
|
styleInject_es.styleInject('.slice-global-body {\n\t/* apply themed background color */\n\tbackground-color: var(--core-surface-primary);\n\t/* remove gaps */\n\tmargin: 0;\n\tpadding: 0;\n\t/* base medium body font style with pref. for theme google font */\n\tfont-family: "Funnel Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",\n\t\tRoboto, Helvetica, Arial, sans-serif;\n\tfont-weight: 360;\n\tfont-size: 15px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n\t-webkit-font-smoothing: antialiased;\n}\n');
|
|
19
20
|
|
|
20
|
-
const
|
|
21
|
+
const ThemeContext = React.createContext({
|
|
22
|
+
initialTheme: theme_themes.lightTheme.name
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
function setDocumentTheme(name) {
|
|
26
|
+
"undefined" != typeof document && (document.documentElement.dataset.sliceTheme = name,
|
|
27
|
+
document.cookie = `slice-theme=${encodeURIComponent(name)}; path=/; max-age=31536000; samesite=lax`);
|
|
28
|
+
}
|
|
21
29
|
|
|
22
30
|
exports.ThemeProvider = function(props) {
|
|
23
|
-
const {children: children, theme: theme, system: system, global: global} = props
|
|
31
|
+
const {children: children, theme: theme, system: system, global: global, initialTheme: initialTheme} = props, contextValue = React.useMemo(() => ({
|
|
32
|
+
initialTheme: null != initialTheme ? initialTheme : theme_themes.lightTheme.name
|
|
33
|
+
}), [ initialTheme ]);
|
|
24
34
|
return React.useEffect(() => {
|
|
25
|
-
if (theme) {
|
|
35
|
+
if (theme || initialTheme) {
|
|
26
36
|
const newTheme = function(theme) {
|
|
27
37
|
if (theme) return theme.includes("dark") ? theme_themes.darkTheme : theme_themes.lightTheme;
|
|
28
|
-
}(theme);
|
|
38
|
+
}(null != theme ? theme : initialTheme);
|
|
29
39
|
if (!newTheme) return;
|
|
30
|
-
|
|
40
|
+
setDocumentTheme(newTheme.name);
|
|
31
41
|
}
|
|
32
|
-
}, [ theme ]), React.useEffect(() => {
|
|
42
|
+
}, [ theme, initialTheme ]), React.useEffect(() => {
|
|
43
|
+
if (!system) return;
|
|
44
|
+
const darkModeMediaQuery = "undefined" == typeof globalThis || "function" != typeof globalThis.matchMedia ? null : globalThis.matchMedia("(prefers-color-scheme: dark)");
|
|
45
|
+
if (!darkModeMediaQuery) return;
|
|
33
46
|
const handleSystemThemeChange = e => {
|
|
34
47
|
if (system) {
|
|
35
|
-
|
|
36
|
-
document.documentElement.dataset.sliceTheme = autoTheme.name;
|
|
48
|
+
setDocumentTheme((e.matches ? theme_themes.darkTheme : theme_themes.lightTheme).name);
|
|
37
49
|
}
|
|
38
50
|
};
|
|
39
51
|
if (system) {
|
|
40
|
-
|
|
41
|
-
document.documentElement.dataset.sliceTheme = autoTheme.name;
|
|
52
|
+
setDocumentTheme((darkModeMediaQuery.matches ? theme_themes.darkTheme : theme_themes.lightTheme).name);
|
|
42
53
|
}
|
|
43
54
|
return darkModeMediaQuery.addEventListener("change", handleSystemThemeChange), () => {
|
|
44
55
|
darkModeMediaQuery.removeEventListener("change", handleSystemThemeChange);
|
|
45
56
|
};
|
|
46
57
|
}, [ system ]), React.useEffect(() => {
|
|
47
|
-
if (global)
|
|
58
|
+
if (global) {
|
|
59
|
+
if ("undefined" != typeof document) return document.body.classList.add("slice-global-body"),
|
|
60
|
+
() => {
|
|
61
|
+
document.body.classList.remove("slice-global-body");
|
|
62
|
+
};
|
|
63
|
+
} else {
|
|
64
|
+
if ("undefined" == typeof document) return;
|
|
48
65
|
document.body.classList.remove("slice-global-body");
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
66
|
+
}
|
|
67
|
+
}, [ global ]), jsxRuntime.jsx(ThemeContext.Provider, {
|
|
68
|
+
value: contextValue,
|
|
69
|
+
children: jsxRuntime.jsx("div", {
|
|
70
|
+
"data-slice-theme-scope": !0,
|
|
71
|
+
children: children
|
|
72
|
+
})
|
|
54
73
|
});
|
|
74
|
+
}, exports.useThemeContext = function() {
|
|
75
|
+
return React.useContext(ThemeContext);
|
|
55
76
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function normalizeThemeName(theme) {
|
|
4
|
+
if (theme) return theme.includes("dark") ? "darkMode" : "lightMode";
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the startup Slice theme from an explicit theme value, cookie value,
|
|
9
|
+
* or fallback theme in that order.
|
|
10
|
+
*/ exports.getThemeHtmlAttributes =
|
|
11
|
+
/**
|
|
12
|
+
* Return the root HTML attributes needed to render the active Slice theme
|
|
13
|
+
* before client hydration.
|
|
14
|
+
*/
|
|
15
|
+
function(theme) {
|
|
16
|
+
var _a;
|
|
17
|
+
return {
|
|
18
|
+
"data-slice-theme": null !== (_a = normalizeThemeName(theme)) && void 0 !== _a ? _a : "lightMode"
|
|
19
|
+
};
|
|
20
|
+
}, exports.resolveInitialTheme = function(options = {}) {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
const {theme: theme, cookieTheme: cookieTheme, fallbackTheme: fallbackTheme = "lightMode"} = options;
|
|
23
|
+
return null !== (_b = null !== (_a = normalizeThemeName(theme)) && void 0 !== _a ? _a : normalizeThemeName(cookieTheme)) && void 0 !== _b ? _b : fallbackTheme;
|
|
24
|
+
};
|
package/dist/cjs/providers.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var providers_ThemeProvider = require("./providers/ThemeProvider.js");
|
|
3
|
+
var providers_ThemeProvider = require("./providers/ThemeProvider.js"), providers_themeServer = require("./providers/themeServer.js");
|
|
4
4
|
|
|
5
5
|
require("react/jsx-runtime"), require("react"), require("./chunks/style-inject.es-CMuL-BfJ.js"),
|
|
6
6
|
require("./theme/themes.js"), require("./theme/colors.js"), require("./theme/corners.js"),
|
|
7
7
|
require("./theme/elevations.js"), require("./theme/motion.js"), require("./theme/type.js"),
|
|
8
|
-
exports.ThemeProvider = providers_ThemeProvider.ThemeProvider
|
|
8
|
+
exports.ThemeProvider = providers_ThemeProvider.ThemeProvider, exports.getThemeHtmlAttributes = providers_themeServer.getThemeHtmlAttributes,
|
|
9
|
+
exports.resolveInitialTheme = providers_themeServer.resolveInitialTheme;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
import React, { useMemo } from "react";
|
|
6
7
|
|
|
7
|
-
import { A as Avatar } from "./Avatar-
|
|
8
|
+
import { A as Avatar } from "./Avatar-m5-zleDk.mjs";
|
|
8
9
|
|
|
9
10
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
10
11
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
@@ -6,13 +7,13 @@ import { motion } from "motion/react";
|
|
|
6
7
|
|
|
7
8
|
import React, { forwardRef, useState, useRef, useCallback, useEffect, useImperativeHandle, useMemo } from "react";
|
|
8
9
|
|
|
9
|
-
import { B as Badge } from "./Badge-
|
|
10
|
+
import { B as Badge } from "./Badge-CC0zSLMf.mjs";
|
|
10
11
|
|
|
11
|
-
import { D as Dot } from "./Dot-
|
|
12
|
+
import { D as Dot } from "./Dot-DZE134mJ.mjs";
|
|
12
13
|
|
|
13
|
-
import { I as Icon } from "./Icon-
|
|
14
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
14
15
|
|
|
15
|
-
import { P as ProgressIndicator } from "./ProgressIndicator-
|
|
16
|
+
import { P as ProgressIndicator } from "./ProgressIndicator-CB_oazMD.mjs";
|
|
16
17
|
|
|
17
18
|
import { T as ToolTipType } from "./sharedTypes-tn9-uJvb.mjs";
|
|
18
19
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -6,7 +7,7 @@ import React, { useState, useEffect, useCallback, useMemo, useRef } from "react"
|
|
|
6
7
|
|
|
7
8
|
import { s as setStyle } from "./misc-BeEWwOaJ.mjs";
|
|
8
9
|
|
|
9
|
-
import { I as Icon } from "./Icon-
|
|
10
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
10
11
|
|
|
11
12
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
12
13
|
|
|
@@ -15,7 +16,7 @@ var css_wrapper = "ButtonBar-module_wrapper__FYZ3s flexBox-module_rowStart__4tcx
|
|
|
15
16
|
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.ButtonBar-module_wrapper__FYZ3s {\n\tborder-radius: var(--bb-border-radius);\n\tborder: var(--bb-border-size) solid var(--bb-border-color);\n\toverflow: hidden;\n}\n\n.ButtonBar-module_label__UcAS1 {\n\tcolor: var(--bb-label-color);\n\tpadding-right: 4px;\n}\n\n.ButtonBar-module_button__bMR3h {\n\theight: var(--bb-button-size);\n\twidth: var(--bb-button-size);\n\tmin-height: var(--bb-button-size);\n\tmin-width: var(--bb-button-size);\n\tcursor: pointer;\n\tbackground: var(--bb-bg-color);\n\tborder: 0;\n\tborder-right: var(--bb-border-size) solid var(--bb-border-color);\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tappearance: none;\n\t-webkit-appearance: none;\n\t&:first-child {\n\t\tpadding-left: 4px;\n\t}\n\t&:last-child {\n\t\tborder-right: none;\n\t\tpadding-right: 4px;\n\t}\n\t&:hover {\n\t\tbackground: var(--bb-bg-color-hover);\n\t}\n}\n\n.ButtonBar-module_selected__wKvmi {\n\tbackground: var(--bb-bg-color-active);\n\tcolor: var(--core-link-primary);\n}\n");
|
|
16
17
|
|
|
17
18
|
const ButtonBar = React.memo(function(props) {
|
|
18
|
-
const {buttons: buttons = [], selected: selected, toggle: toggle = !0, buttonSize: buttonSize =
|
|
19
|
+
const {buttons: buttons = [], selected: selected, toggle: toggle = !0, buttonSize: buttonSize = "m", frameSize: frameSize = 36, iconSize: iconSize = 20, borderWidth: borderWidth, borderSize: borderSize = 0, borderRadius: borderRadius = 100, borderColor: borderColor = "var(--core-outline-primary)", backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, backgroundColorActive: backgroundColorActive, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-outline-primary)", bgColorActive: bgColorActive = "var(--core-outline-primary)", labelColor: labelColor = "var(--core-text-primary)", onClick: onClick = button => null, onChange: onChange = button => null, onToolTip: onToolTip = () => null} = props, divAttributes = __rest(props, [ "buttons", "selected", "toggle", "buttonSize", "frameSize", "iconSize", "borderWidth", "borderSize", "borderRadius", "borderColor", "backgroundColor", "backgroundColorHover", "backgroundColorActive", "bgColor", "bgColorHover", "bgColorActive", "labelColor", "onClick", "onChange", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, resolvedBackgroundColorActive = null != backgroundColorActive ? backgroundColorActive : bgColorActive, [hovered, setHovered] = useState(-1), [selectedIndex, setSelectedIndex] = useState(selected);
|
|
19
20
|
useEffect(() => setSelectedIndex(selected), [ selected ]);
|
|
20
21
|
const handleMouseEnter = useCallback(index => {
|
|
21
22
|
setHovered(index);
|
|
@@ -23,7 +24,7 @@ const ButtonBar = React.memo(function(props) {
|
|
|
23
24
|
setHovered(-1);
|
|
24
25
|
}, []), handleClick = useCallback((button, index) => {
|
|
25
26
|
onClick(button), toggle && (setSelectedIndex(index), onChange(button));
|
|
26
|
-
}, [ onChange, onClick, toggle ]), buttonClass = useCallback(index => toggle && selectedIndex === index ? css_selected : "", [ selectedIndex, toggle ]), iconColor = useCallback(index => toggle && selectedIndex === index ? "var(--core-text-special)" : hovered === index ? "var(--core-text-primary)" : "var(--core-text-secondary)", [ selectedIndex, hovered, toggle ]), cssVars = useMemo(() => ({
|
|
27
|
+
}, [ onChange, onClick, toggle ]), buttonClass = useCallback(index => toggle && selectedIndex === index ? css_selected : "", [ selectedIndex, toggle ]), iconColor = useCallback(index => toggle && selectedIndex === index ? "var(--core-text-special)" : hovered === index ? "var(--core-text-primary)" : "var(--core-text-secondary)", [ selectedIndex, hovered, toggle ]), size = useMemo(() => buttonSize ? "s" === buttonSize ? 24 : "m" === buttonSize ? 36 : "l" === buttonSize ? 44 : "xl" === buttonSize ? 56 : void 0 : frameSize, [ frameSize, buttonSize ]), cssVars = useMemo(() => ({
|
|
27
28
|
"--bb-border-size": `${resolvedBorderWidth}px`,
|
|
28
29
|
"--bb-border-radius": setStyle(borderRadius),
|
|
29
30
|
"--bb-border-color": borderColor,
|
|
@@ -31,8 +32,8 @@ const ButtonBar = React.memo(function(props) {
|
|
|
31
32
|
"--bb-bg-color-hover": resolvedBackgroundColorHover,
|
|
32
33
|
"--bb-bg-color-active": resolvedBackgroundColorActive,
|
|
33
34
|
"--bb-label-color": labelColor,
|
|
34
|
-
"--bb-button-size": `${
|
|
35
|
-
}), [ resolvedBorderWidth, borderRadius, borderColor, resolvedBackgroundColor, labelColor, resolvedBackgroundColorHover,
|
|
35
|
+
"--bb-button-size": `${size}px`
|
|
36
|
+
}), [ resolvedBorderWidth, borderRadius, borderColor, resolvedBackgroundColor, labelColor, resolvedBackgroundColorHover, size, resolvedBackgroundColorActive ]), barButtons = useMemo(() => null == buttons ? void 0 : buttons.map((button, index) => jsx(BarButton, {
|
|
36
37
|
classNames: `${css_button} ${buttonClass(index)}`,
|
|
37
38
|
onMouseEnter: () => handleMouseEnter(index),
|
|
38
39
|
onMouseLeave: handleMouseLeave,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
@@ -14,9 +15,9 @@ import { a as addOpacity } from "./colors-FQ0uNQcW.mjs";
|
|
|
14
15
|
|
|
15
16
|
import "../hooks/useWindow.mjs";
|
|
16
17
|
|
|
17
|
-
import { A as Avatar } from "./Avatar-
|
|
18
|
+
import { A as Avatar } from "./Avatar-m5-zleDk.mjs";
|
|
18
19
|
|
|
19
|
-
import { I as Icon } from "./Icon-
|
|
20
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
20
21
|
|
|
21
22
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
22
23
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
@@ -8,7 +9,7 @@ import React, { useState, useEffect, useMemo, useCallback } from "react";
|
|
|
8
9
|
|
|
9
10
|
import { a as accessibleKeyDown } from "./misc-BeEWwOaJ.mjs";
|
|
10
11
|
|
|
11
|
-
import { I as Icon } from "./Icon-
|
|
12
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
12
13
|
|
|
13
14
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
14
15
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
@@ -6,7 +7,7 @@ import React, { useState, useCallback, useMemo } from "react";
|
|
|
6
7
|
|
|
7
8
|
import { s as setStyle, a as accessibleKeyDown } from "./misc-BeEWwOaJ.mjs";
|
|
8
9
|
|
|
9
|
-
import { I as Icon } from "./Icon-
|
|
10
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
10
11
|
|
|
11
12
|
import { T as ToolTipType } from "./sharedTypes-tn9-uJvb.mjs";
|
|
12
13
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
@@ -20,6 +21,21 @@ var css_panel = "DraggablePanel-module_panel__vuq2R flexBox-module_columnStart__
|
|
|
20
21
|
|
|
21
22
|
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.DraggablePanel-module_panel__vuq2R {\n\tposition: relative;\n\tbackground-color: var(--panel-bg);\n}\n\n.DraggablePanel-module_content__SBL0T {\n\twidth: 100%;\n\theight: 100%;\n\toverflow: hidden;\n}\n\n.DraggablePanel-module_handle__LPZw8 {\n\twidth: var(--drag-handle-width);\n\theight: var(--drag-handle-height);\n\tmin-width: var(--drag-handle-width);\n\tmin-height: var(--drag-handle-height);\n\tborder-radius: var(--drag-handle-radius);\n\tborder: var(--drag-handle-border) solid var(--drag-handle-border-color);\n\tbackground: var(--drag-handle-bg);\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translateX(-50%) translateY(-50%);\n\tz-index: 15000;\n}\n");
|
|
22
23
|
|
|
24
|
+
function normalizeConstraintValue(value, containerWidth, fallback) {
|
|
25
|
+
let normalized = value;
|
|
26
|
+
return normalized <= 1 && normalized >= 0 && (normalized = containerWidth ? containerWidth * normalized : fallback),
|
|
27
|
+
normalized > 1 && normalized < 50 && (normalized = 50), normalized;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function resolveConstraints(sizeConstraints, containerWidth) {
|
|
31
|
+
const initial = normalizeConstraintValue(sizeConstraints.initial, containerWidth, 50), min = normalizeConstraintValue(sizeConstraints.min, containerWidth, initial);
|
|
32
|
+
return {
|
|
33
|
+
initial: min > initial ? min : initial,
|
|
34
|
+
min: min,
|
|
35
|
+
max: normalizeConstraintValue(sizeConstraints.max, containerWidth, initial)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
23
39
|
const DraggablePanel = React.memo(props => {
|
|
24
40
|
const theme = useTheme(), {children: children, sizeConstraints: sizeConstraints = {
|
|
25
41
|
initial: 250,
|
|
@@ -29,7 +45,7 @@ const DraggablePanel = React.memo(props => {
|
|
|
29
45
|
width: 10,
|
|
30
46
|
color: "transparent",
|
|
31
47
|
offsetX: !0
|
|
32
|
-
}, borderRight: borderRight = "1px solid var(--core-outline-primary)", borderLeft: borderLeft = null, bgColor: bgColor = "transparent", drags: drags = !0, isTouchDevice: isTouchDevice = !1, disableOnContext: disableOnContext = !0, dragHandle: dragHandle = !0, dragHandleStyle: dragHandleStyle, containerRef: containerRef, onResize: onResize = () => null, onResizeStart: onResizeStart = () => null, onResizeEnd: onResizeEnd = () => null} = props, divAttributes = __rest(props, [ "children", "sizeConstraints", "dragsRight", "isClosed", "resizeHandle", "borderRight", "borderLeft", "bgColor", "drags", "isTouchDevice", "disableOnContext", "dragHandle", "dragHandleStyle", "containerRef", "onResize", "onResizeStart", "onResizeEnd" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", handle = useRef(null), div = useRef(null), [isDragging, setIsDragging] = useState(!1), isOver = useRef(!1), gripper = Object.assign({}, resizeHandle), containerSize = useObserveResize(containerRef), [handleHighlight, setHandleHighlight] = useState(!1), [lastWidth, setLastWidth] = useState(null), [panelClosed, setPanelClosed] = useState(isClosed), [constraints, setConstraints] = useState(sizeConstraints), [contWidth, setContWidth] = useState(void 0), timer = useRef(null), startX = useRef(0), startWidth = useRef(0), divWidth = useRef(0), divHeight = useRef(0), deltaWidth = useRef(0), handleWindowResize = useCallback(() => {
|
|
48
|
+
}, borderRight: borderRight = "1px solid var(--core-outline-primary)", borderLeft: borderLeft = null, bgColor: bgColor = "transparent", drags: drags = !0, isTouchDevice: isTouchDevice = !1, disableOnContext: disableOnContext = !0, dragHandle: dragHandle = !0, dragHandleStyle: dragHandleStyle, containerRef: containerRef, onResize: onResize = () => null, onResizeStart: onResizeStart = () => null, onResizeEnd: onResizeEnd = () => null} = props, divAttributes = __rest(props, [ "children", "sizeConstraints", "dragsRight", "isClosed", "resizeHandle", "borderRight", "borderLeft", "bgColor", "drags", "isTouchDevice", "disableOnContext", "dragHandle", "dragHandleStyle", "containerRef", "onResize", "onResizeStart", "onResizeEnd" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", handle = useRef(null), div = useRef(null), [isDragging, setIsDragging] = useState(!1), isOver = useRef(!1), gripper = Object.assign({}, resizeHandle), containerSize = useObserveResize(containerRef), panelSize = useObserveResize(div), [handleHighlight, setHandleHighlight] = useState(!1), [lastWidth, setLastWidth] = useState(null), [panelClosed, setPanelClosed] = useState(isClosed), [constraints, setConstraints] = useState(() => resolveConstraints(sizeConstraints)), [contWidth, setContWidth] = useState(void 0), timer = useRef(null), closed = panelSize.width <= 1, startX = useRef(0), startWidth = useRef(0), divWidth = useRef(0), divHeight = useRef(0), deltaWidth = useRef(0), handleWindowResize = useCallback(() => {
|
|
33
49
|
(null == containerRef ? void 0 : containerRef.current) || setContWidth(window.innerWidth);
|
|
34
50
|
}, [ containerRef ]), handleMouseOver = useCallback(() => {
|
|
35
51
|
isOver.current = !0, setHighlight(!0);
|
|
@@ -57,17 +73,7 @@ const DraggablePanel = React.memo(props => {
|
|
|
57
73
|
}, []);
|
|
58
74
|
useEffect(() => {
|
|
59
75
|
if (!contWidth) return;
|
|
60
|
-
const
|
|
61
|
-
min: min,
|
|
62
|
-
max: max,
|
|
63
|
-
initial: initial
|
|
64
|
-
};
|
|
65
|
-
for (const [key, value] of Object.entries(sizeConstraints)) {
|
|
66
|
-
let calc = value;
|
|
67
|
-
calc <= 1 && calc >= 0 && (calc = contWidth * value), calc > 1 && calc < 50 && (calc = 50),
|
|
68
|
-
relativeConstraints[key] = calc;
|
|
69
|
-
}
|
|
70
|
-
relativeConstraints.min < relativeConstraints.initial && (relativeConstraints.initial = relativeConstraints.min),
|
|
76
|
+
const relativeConstraints = resolveConstraints(sizeConstraints, contWidth);
|
|
71
77
|
setConstraints(relativeConstraints), adjustCurrentWidth(relativeConstraints);
|
|
72
78
|
}, [ sizeConstraints, contWidth, adjustCurrentWidth ]);
|
|
73
79
|
const setHighlight = useCallback(state => {
|
|
@@ -154,8 +160,8 @@ const DraggablePanel = React.memo(props => {
|
|
|
154
160
|
height: "100%",
|
|
155
161
|
maxWidth: drags ? constraints.max : "unset",
|
|
156
162
|
transition: isDragging ? "" : transition,
|
|
157
|
-
borderRight: !
|
|
158
|
-
borderLeft: !
|
|
163
|
+
borderRight: !closed && borderRight && drags ? borderRight : "none",
|
|
164
|
+
borderLeft: !closed && borderLeft && drags ? borderLeft : "none"
|
|
159
165
|
})
|
|
160
166
|
}, rest, {
|
|
161
167
|
children: [ jsxs("div", {
|
|
@@ -163,7 +169,7 @@ const DraggablePanel = React.memo(props => {
|
|
|
163
169
|
style: Object.assign(Object.assign({
|
|
164
170
|
position: "absolute",
|
|
165
171
|
boxSizing: "border-box",
|
|
166
|
-
display:
|
|
172
|
+
display: closed || !drags ? "none" : "flex",
|
|
167
173
|
alignItems: "center",
|
|
168
174
|
justifyContent: "center",
|
|
169
175
|
zIndex: 1,
|
|
@@ -181,7 +187,7 @@ const DraggablePanel = React.memo(props => {
|
|
|
181
187
|
onBlur: handleBlur,
|
|
182
188
|
onTouchStart: handleTouchStart,
|
|
183
189
|
onTouchEnd: handleTouchEnd,
|
|
184
|
-
children: [ dragHandle && !
|
|
190
|
+
children: [ dragHandle && !closed && jsx(DragHandle, Object.assign({}, null != dragHandleStyle ? dragHandleStyle : {})), jsx("div", {
|
|
185
191
|
style: {
|
|
186
192
|
backgroundColor: handleHighlight ? theme.current.colors["core-outline-primary"] : "transparent",
|
|
187
193
|
flex: 1,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -6,7 +7,7 @@ import React, { useState, useRef, useEffect, useCallback, useMemo } from "react"
|
|
|
6
7
|
|
|
7
8
|
import { s as setStyle } from "./misc-BeEWwOaJ.mjs";
|
|
8
9
|
|
|
9
|
-
import { I as Icon } from "./Icon-
|
|
10
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
10
11
|
|
|
11
12
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
12
13
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -6,11 +7,11 @@ import React, { useCallback, useMemo } from "react";
|
|
|
6
7
|
|
|
7
8
|
import { s as setStyle, a as accessibleKeyDown } from "./misc-BeEWwOaJ.mjs";
|
|
8
9
|
|
|
9
|
-
import { F as FileIcon } from "./FileIcon-
|
|
10
|
+
import { F as FileIcon } from "./FileIcon-Cufsp1gn.mjs";
|
|
10
11
|
|
|
11
|
-
import { I as Icon } from "./Icon-
|
|
12
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
12
13
|
|
|
13
|
-
import { P as ProgressIndicator } from "./ProgressIndicator-
|
|
14
|
+
import { P as ProgressIndicator } from "./ProgressIndicator-CB_oazMD.mjs";
|
|
14
15
|
|
|
15
16
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
16
17
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -8,7 +9,84 @@ import React, { useMemo } from "react";
|
|
|
8
9
|
|
|
9
10
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
10
11
|
|
|
11
|
-
var css_flexDiv = "FlexDiv-module_flexDiv__EY5A- type-module_body-m-regular__LuQBA";
|
|
12
|
+
var Size, Preset, css_flexDiv = "FlexDiv-module_flexDiv__EY5A- type-module_body-m-regular__LuQBA";
|
|
13
|
+
|
|
14
|
+
styleInject(".type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.FlexDiv-module_flexDiv__EY5A- {\n\t&::-webkit-scrollbar {\n\t\tbackground-color: var(--flex-div-bg);\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: var(--flex-div-scroll-border);\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--flex-div-scroll-handle);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--flex-div-scroll-border);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--flex-div-scroll-handle-hover);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--flex-div-scroll-border);\n\t\tcursor: default;\n\t}\n}\n"),
|
|
15
|
+
function(Size) {
|
|
16
|
+
Size.Grow = "grow", Size.Fill = "fill", Size.Fit = "fit", Size.Viewport = "viewport",
|
|
17
|
+
Size.Auto = "auto";
|
|
18
|
+
}(Size || (Size = {})), function(Preset) {
|
|
19
|
+
Preset.FillScroll = "fill-scroll", Preset.FillCenter = "fill-center", Preset.Window = "window",
|
|
20
|
+
Preset.Row = "row", Preset.RowBetween = "row-between", Preset.Column = "fill-column",
|
|
21
|
+
Preset.Default = "default", Preset.Draggable = "draggable";
|
|
22
|
+
}(Preset || (Preset = {}));
|
|
23
|
+
|
|
24
|
+
const layoutSets = {
|
|
25
|
+
[Preset.FillScroll]: {
|
|
26
|
+
width: "fill",
|
|
27
|
+
height: "fill",
|
|
28
|
+
justify: "start",
|
|
29
|
+
align: "start",
|
|
30
|
+
scrollY: !0,
|
|
31
|
+
direction: "column"
|
|
32
|
+
},
|
|
33
|
+
[Preset.FillCenter]: {
|
|
34
|
+
width: "fill",
|
|
35
|
+
height: "fill",
|
|
36
|
+
justify: "center",
|
|
37
|
+
align: "center",
|
|
38
|
+
scrollY: !1,
|
|
39
|
+
direction: "column"
|
|
40
|
+
},
|
|
41
|
+
[Preset.Window]: {
|
|
42
|
+
width: "viewport",
|
|
43
|
+
height: "viewport",
|
|
44
|
+
justify: "start",
|
|
45
|
+
align: "start",
|
|
46
|
+
scrollY: !1,
|
|
47
|
+
direction: "row"
|
|
48
|
+
},
|
|
49
|
+
[Preset.Row]: {
|
|
50
|
+
width: "fill",
|
|
51
|
+
height: "fit",
|
|
52
|
+
justify: "start",
|
|
53
|
+
align: "center",
|
|
54
|
+
scrollY: !1,
|
|
55
|
+
direction: "row"
|
|
56
|
+
},
|
|
57
|
+
[Preset.RowBetween]: {
|
|
58
|
+
width: "fill",
|
|
59
|
+
height: "fit",
|
|
60
|
+
justify: "between",
|
|
61
|
+
align: "center",
|
|
62
|
+
scrollY: !1,
|
|
63
|
+
direction: "row"
|
|
64
|
+
},
|
|
65
|
+
[Preset.Column]: {
|
|
66
|
+
width: "fill",
|
|
67
|
+
height: "fit",
|
|
68
|
+
justify: "start",
|
|
69
|
+
align: "center",
|
|
70
|
+
scrollY: !1,
|
|
71
|
+
direction: "column"
|
|
72
|
+
},
|
|
73
|
+
[Preset.Default]: {
|
|
74
|
+
width: "fill",
|
|
75
|
+
height: "fit",
|
|
76
|
+
justify: "start",
|
|
77
|
+
align: "start",
|
|
78
|
+
scrollY: !1,
|
|
79
|
+
direction: "column"
|
|
80
|
+
},
|
|
81
|
+
[Preset.Draggable]: {
|
|
82
|
+
width: "auto",
|
|
83
|
+
height: "fill",
|
|
84
|
+
justify: "start",
|
|
85
|
+
align: "start",
|
|
86
|
+
scrollY: !1,
|
|
87
|
+
direction: "column"
|
|
88
|
+
}
|
|
89
|
+
};
|
|
12
90
|
|
|
13
91
|
function setSize(style, isHeight) {
|
|
14
92
|
return "number" == typeof style ? `${style}px` : "grow" === style ? "unset" : "fill" === style ? "100%" : "fit" === style ? "auto" : "viewport" === style ? isHeight ? "100vh" : "100vw" : style;
|
|
@@ -22,10 +100,8 @@ function setFlex(style) {
|
|
|
22
100
|
return "start" === style || "top" === style ? "flex-start" : "end" === style || "bottom" === style ? "flex-end" : "between" === style ? "space-between" : style;
|
|
23
101
|
}
|
|
24
102
|
|
|
25
|
-
styleInject(".type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.FlexDiv-module_flexDiv__EY5A- {\n\t&::-webkit-scrollbar {\n\t\tbackground-color: var(--flex-div-bg);\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: var(--flex-div-scroll-border);\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--flex-div-scroll-handle);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--flex-div-scroll-border);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--flex-div-scroll-handle-hover);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--flex-div-scroll-border);\n\t\tcursor: default;\n\t}\n}\n");
|
|
26
|
-
|
|
27
103
|
const FlexDiv = React.memo(React.forwardRef((props, ref) => {
|
|
28
|
-
const {children: children, scrollY: scrollY =
|
|
104
|
+
const {children: children, preset: preset = "default", scrollY: scrollY = layoutSets[preset].scrollY, scrollX: scrollX = !1, background: background = "var(--core-surface-primary)", direction: direction = layoutSets[preset].direction, align: align = layoutSets[preset].align, justify: justify = layoutSets[preset].justify, height: height = layoutSets[preset].height, width: width = layoutSets[preset].width, maxWidth: maxWidth, centerSelf: centerSelf, wrap: wrap = !1, reverse: reverse = !1, padding: padding = 0, margin: margin = 0, absolute: absolute = !1, flex: flex, gap: gap, variants: variants, transition: transition, animate: animate, enter: enter, exit: exit, border: border, borderRadius: borderRadius, className: className, scrollHandle: scrollHandle, scrollHandleHover: scrollHandleHover} = props, divAttributes = __rest(props, [ "children", "preset", "scrollY", "scrollX", "background", "direction", "align", "justify", "height", "width", "maxWidth", "centerSelf", "wrap", "reverse", "padding", "margin", "absolute", "flex", "gap", "variants", "transition", "animate", "enter", "exit", "border", "borderRadius", "className", "scrollHandle", "scrollHandleHover" ]), {id: divId, style: userStyle} = divAttributes, rest = __rest(divAttributes, [ "id", "style" ]), wrapperStyle = null != userStyle ? userStyle : {}, style = useMemo(() => ({
|
|
29
105
|
display: "flex",
|
|
30
106
|
position: "" + (absolute ? "absolute" : "relative"),
|
|
31
107
|
flexDirection: `${direction}${reverse ? "-reverse" : ""}`,
|
|
@@ -59,7 +135,7 @@ const FlexDiv = React.memo(React.forwardRef((props, ref) => {
|
|
|
59
135
|
id: divId,
|
|
60
136
|
ref: ref,
|
|
61
137
|
className: `${css_flexDiv} ${null != className ? className : ""}`,
|
|
62
|
-
style: Object.assign(Object.assign({},
|
|
138
|
+
style: Object.assign(Object.assign({}, style), wrapperStyle),
|
|
63
139
|
transition: transition,
|
|
64
140
|
variants: variants,
|
|
65
141
|
initial: enter,
|
|
@@ -70,11 +146,4 @@ const FlexDiv = React.memo(React.forwardRef((props, ref) => {
|
|
|
70
146
|
}));
|
|
71
147
|
}));
|
|
72
148
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
!function(Size) {
|
|
76
|
-
Size.Grow = "grow", Size.Fill = "fill", Size.Fit = "fit", Size.Viewport = "viewport",
|
|
77
|
-
Size.Auto = "auto";
|
|
78
|
-
}(Size || (Size = {}));
|
|
79
|
-
|
|
80
|
-
export { FlexDiv as F, Size as S };
|
|
149
|
+
export { FlexDiv as F, Preset as P, Size as S };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
2
3
|
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -12,9 +13,9 @@ import "../theme/colors.mjs";
|
|
|
12
13
|
|
|
13
14
|
import "../hooks/useWindow.mjs";
|
|
14
15
|
|
|
15
|
-
import { B as Badge } from "./Badge-
|
|
16
|
+
import { B as Badge } from "./Badge-CC0zSLMf.mjs";
|
|
16
17
|
|
|
17
|
-
import { I as Icon } from "./Icon-
|
|
18
|
+
import { I as Icon } from "./Icon-DI32kOA1.mjs";
|
|
18
19
|
|
|
19
20
|
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
20
21
|
|