acacia-ui 1.1.1 → 1.2.0
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/layout/VerticalLayout/VerticalLayout.d.ts +1 -1
- package/dist/components/layout/VerticalLayout/VerticalLayout.d.ts.map +1 -1
- package/dist/components/ui/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/ui/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/ConfigProvider/ConfigProvider.d.ts.map +1 -1
- package/dist/components/ui/ConfigProvider/defaultTheme.d.ts +1 -1
- package/dist/components/ui/ConfigProvider/defaultTheme.d.ts.map +1 -1
- package/dist/components/ui/Menu/Menu.d.ts.map +1 -1
- package/dist/components/ui/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/ui/Panel/Panel.d.ts +2 -1
- package/dist/components/ui/Panel/Panel.d.ts.map +1 -1
- package/dist/components/ui/Panel/usePanelStyles.d.ts +3 -1
- package/dist/components/ui/Panel/usePanelStyles.d.ts.map +1 -1
- package/dist/components/ui/Popconfirm/Popconfirm.d.ts +4 -0
- package/dist/components/ui/Popconfirm/Popconfirm.d.ts.map +1 -0
- package/dist/components/ui/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/ui/Typography/Typography.d.ts +1 -1
- package/dist/components/ui/Typography/Typography.d.ts.map +1 -1
- package/dist/components/ui/interfaces.d.ts +6 -1
- package/dist/components/ui/interfaces.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/main.js +186 -44
- package/dist/main.js.map +1 -1
- package/dist/theme/customTheme.d.ts +2 -0
- package/dist/theme/customTheme.d.ts.map +1 -1
- package/dist/utils/colors.util.d.ts +1 -0
- package/dist/utils/colors.util.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/main.js
CHANGED
|
@@ -5230,7 +5230,7 @@ var getThemedContentBackgroundPicture = function (theme) {
|
|
|
5230
5230
|
exports.VerticalLayoutContext = (0, react_1.createContext)(null);
|
|
5231
5231
|
var VerticalLayout = function (_a) {
|
|
5232
5232
|
var _b;
|
|
5233
|
-
var _c = _a.headerBackgroundProps, _d = _c === void 0 ? {} : _c, _e = _d.headerBackgroundImage, headerBackgroundImage = _e === void 0 ? { type: "theme", theme: "classic" } : _e, _f = _d.headerBackgroundFill, headerBackgroundFill = _f === void 0 ? { type: "theme", theme: "classic" } : _f, props = __rest(_a, ["headerBackgroundProps"]);
|
|
5233
|
+
var _c = _a.headerBackgroundProps, _d = _c === void 0 ? {} : _c, _e = _d.headerBackgroundImage, headerBackgroundImage = _e === void 0 ? { type: "theme", theme: "classic" } : _e, _f = _d.headerBackgroundFill, headerBackgroundFill = _f === void 0 ? { type: "theme", theme: "classic" } : _f, _g = _a.contentBackgroundProps, _h = _g === void 0 ? {} : _g, _j = _h.contentBackgroundFill, contentBackgroundFill = _j === void 0 ? { type: "theme", theme: "classic" } : _j, _k = _h.contentBackgroundImage, contentBackgroundImage = _k === void 0 ? { type: "theme", theme: "classic" } : _k, props = __rest(_a, ["headerBackgroundProps", "contentBackgroundProps"]);
|
|
5234
5234
|
var defaultTheme = (0, antd_style_1.useTheme)().appTheme; // get the app theme
|
|
5235
5235
|
// get the first bg color
|
|
5236
5236
|
var getFirstBackgroundHexColor = function () {
|
|
@@ -5319,7 +5319,7 @@ var VerticalLayout = function (_a) {
|
|
|
5319
5319
|
})
|
|
5320
5320
|
.exhaustive();
|
|
5321
5321
|
};
|
|
5322
|
-
var
|
|
5322
|
+
var _l = getBackgroundCSS(), css = _l.css, stops = _l.stops;
|
|
5323
5323
|
// for each type of header - the way to get background image changes
|
|
5324
5324
|
var getBackgroundImage = function () {
|
|
5325
5325
|
return (0, ts_pattern_1.match)(headerBackgroundImage)
|
|
@@ -5338,7 +5338,7 @@ var VerticalLayout = function (_a) {
|
|
|
5338
5338
|
};
|
|
5339
5339
|
// for each type of header - the way to get background image changes
|
|
5340
5340
|
var getContentBackgroundImage = function () {
|
|
5341
|
-
return (0, ts_pattern_1.match)(
|
|
5341
|
+
return (0, ts_pattern_1.match)(contentBackgroundImage)
|
|
5342
5342
|
.with({ type: "theme" }, function (_a) {
|
|
5343
5343
|
var theme = _a.theme;
|
|
5344
5344
|
if (theme !== "classic") {
|
|
@@ -5358,6 +5358,14 @@ var VerticalLayout = function (_a) {
|
|
|
5358
5358
|
var headerChildren = allChildren.filter(utils_1.isVerticalHeader);
|
|
5359
5359
|
// get the content children as this needs to be overlapped with the bg
|
|
5360
5360
|
var contentChildren = allChildren.filter(utils_1.isVerticalContent);
|
|
5361
|
+
// get the layout padding
|
|
5362
|
+
// if there is content children, then increase the padding
|
|
5363
|
+
var getLayoutPadding = function () {
|
|
5364
|
+
if (contentChildren.length > 0) {
|
|
5365
|
+
return "1rem 2rem 3rem 2rem";
|
|
5366
|
+
}
|
|
5367
|
+
return "1rem 2rem 0rem 2rem";
|
|
5368
|
+
};
|
|
5361
5369
|
return ((0, jsx_runtime_1.jsxs)(exports.VerticalLayoutContext.Provider, { value: {
|
|
5362
5370
|
mainTextColor: (_b = props.mainTextColor) !== null && _b !== void 0 ? _b : (0, colors_util_1.renderBlackOrWhiteText)(firstBackgroundColor), // by default it will try to render white/black text for content
|
|
5363
5371
|
accentColor: accentColor,
|
|
@@ -5367,9 +5375,9 @@ var VerticalLayout = function (_a) {
|
|
|
5367
5375
|
backgroundRepeat: "no-repeat",
|
|
5368
5376
|
backgroundSize: "cover",
|
|
5369
5377
|
backgroundPosition: "center",
|
|
5370
|
-
}, children: (0, jsx_runtime_1.jsxs)("div", { style: { padding:
|
|
5378
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { style: { padding: getLayoutPadding() }, children: [(0, jsx_runtime_1.jsxs)(antd_1.Layout.Header, { style: { display: "flex", alignItems: "center" }, children: [(0, jsx_runtime_1.jsx)(defaultLogo_1.default, {}), props.menuProps && ((0, jsx_runtime_1.jsx)(Menu_1.default, __assign({ mode: "horizontal" }, props.menuProps, { style: __assign({ flex: 1, minWidth: 0, fontSize: 16, fontWeight: 700 }, props.menuProps.style) })))] }), headerChildren] }) }), (0, jsx_runtime_1.jsx)(antd_1.Layout.Content, { style: {
|
|
5371
5379
|
background: "#f3f3f3 url(".concat(getContentBackgroundImage(), ") top left"),
|
|
5372
|
-
padding: "2rem",
|
|
5380
|
+
padding: contentChildren && "2rem",
|
|
5373
5381
|
flex: 1,
|
|
5374
5382
|
zIndex: 1,
|
|
5375
5383
|
}, children: contentChildren })] })] }));
|
|
@@ -5453,9 +5461,20 @@ var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "./node_modules
|
|
|
5453
5461
|
var antd_1 = __webpack_require__(/*! antd */ "antd");
|
|
5454
5462
|
var Typography_1 = __importDefault(__webpack_require__(/*! ../Typography/Typography */ "./src/components/ui/Typography/Typography.tsx"));
|
|
5455
5463
|
var Space_1 = __importDefault(__webpack_require__(/*! ../Space/Space */ "./src/components/ui/Space/Space.tsx"));
|
|
5464
|
+
var antd_style_1 = __webpack_require__(/*! antd-style */ "antd-style");
|
|
5456
5465
|
var Avatar = function (_a) {
|
|
5457
5466
|
var props = __rest(_a, []);
|
|
5458
|
-
|
|
5467
|
+
var token = (0, antd_style_1.useTheme)();
|
|
5468
|
+
var getBackgroundColor = function () {
|
|
5469
|
+
if (token.appThemeMode === "light") {
|
|
5470
|
+
return "#bbbbbb57";
|
|
5471
|
+
}
|
|
5472
|
+
return "#8e8e8e57";
|
|
5473
|
+
};
|
|
5474
|
+
return ((0, jsx_runtime_1.jsx)(Space_1.default, { size: 0, children: (0, jsx_runtime_1.jsxs)("div", { style: __assign({}, (props.userId && {
|
|
5475
|
+
background: getBackgroundColor(),
|
|
5476
|
+
borderRadius: 20,
|
|
5477
|
+
})), children: [(0, jsx_runtime_1.jsx)(antd_1.Avatar, __assign({ style: __assign({ marginRight: props.userId && -3 }, props.style) }, props, { children: props.children })), props.userId && ((0, jsx_runtime_1.jsx)(Typography_1.default.Text, { strong: true, style: { paddingInline: "10px" }, children: props.userId.toUpperCase() }))] }) }));
|
|
5459
5478
|
};
|
|
5460
5479
|
exports["default"] = Avatar;
|
|
5461
5480
|
|
|
@@ -5590,6 +5609,7 @@ var antd_1 = __webpack_require__(/*! antd */ "antd");
|
|
|
5590
5609
|
var VerticalLayout_1 = __webpack_require__(/*! ../../layout/VerticalLayout/VerticalLayout */ "./src/components/layout/VerticalLayout/VerticalLayout.tsx");
|
|
5591
5610
|
var react_1 = __webpack_require__(/*! react */ "react");
|
|
5592
5611
|
var defaultTheme_1 = __webpack_require__(/*! ../ConfigProvider/defaultTheme */ "./src/components/ui/ConfigProvider/defaultTheme.ts");
|
|
5612
|
+
var antd_style_1 = __webpack_require__(/*! antd-style */ "antd-style");
|
|
5593
5613
|
/**
|
|
5594
5614
|
* A breadcrumb displays the current location within a hierarchy. It allows going back to states higher up in the hierarchy.
|
|
5595
5615
|
*/
|
|
@@ -5597,9 +5617,9 @@ var Breadcrumb = function (_a) {
|
|
|
5597
5617
|
var props = __rest(_a, []);
|
|
5598
5618
|
var context = (0, react_1.useContext)(VerticalLayout_1.VerticalLayoutContext); // context to check if its nested - its possible that the user can use the header without the VerticalLayout
|
|
5599
5619
|
var isNestedInLayout = Boolean(context); // check if nested or not to handle colors
|
|
5600
|
-
var
|
|
5601
|
-
var
|
|
5602
|
-
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(); // get the default, overwritten tokens
|
|
5620
|
+
var globalToken = antd_1.theme.useToken(); // get the default, antd tokens
|
|
5621
|
+
var token = (0, antd_style_1.useTheme)();
|
|
5622
|
+
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(token.appThemeMode); // get the default, overwritten tokens
|
|
5603
5623
|
return ((0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, { theme: {
|
|
5604
5624
|
token: __assign(__assign({}, defaultTheme.token), globalToken.token),
|
|
5605
5625
|
components: {
|
|
@@ -5932,11 +5952,14 @@ var ConfigProvider = function (_a) {
|
|
|
5932
5952
|
var props = __rest(_a, []);
|
|
5933
5953
|
var _d = (0, useAcaciaColors_1.useAcaciaColors)(), colors = _d.colors, generate = _d.generate;
|
|
5934
5954
|
var _e = (0, useAcaciaConfig_1.useAcaciaConfig)(), borderRadius = _e.borderRadius, padding = _e.padding;
|
|
5935
|
-
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)();
|
|
5936
5955
|
var mergedToken = __assign(__assign({}, customTheme_1.CustomTheme), props.customToken);
|
|
5956
|
+
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(mergedToken.appThemeMode);
|
|
5937
5957
|
return ((0, jsx_runtime_1.jsx)(antd_style_1.ThemeProvider, { customToken: mergedToken, children: (0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, __assign({}, props, { theme: {
|
|
5938
5958
|
token: __assign(__assign({}, defaultTheme.token), (_b = props.theme) === null || _b === void 0 ? void 0 : _b.token),
|
|
5939
5959
|
components: __assign(__assign({}, defaultTheme.components), (_c = props.theme) === null || _c === void 0 ? void 0 : _c.components),
|
|
5960
|
+
algorithm: mergedToken.appThemeMode === "light"
|
|
5961
|
+
? antd_1.theme.defaultAlgorithm
|
|
5962
|
+
: antd_1.theme.darkAlgorithm,
|
|
5940
5963
|
}, children: props.children })) }));
|
|
5941
5964
|
};
|
|
5942
5965
|
ConfigProvider.ConfigContext = context_1.ConfigContext;
|
|
@@ -5964,15 +5987,15 @@ __webpack_require__(/*! @fontsource-variable/inter */ "./node_modules/@fontsourc
|
|
|
5964
5987
|
__webpack_require__(/*! @fontsource-variable/outfit */ "./node_modules/@fontsource-variable/outfit/index.css");
|
|
5965
5988
|
__webpack_require__(/*! @fontsource-variable/roboto-flex */ "./node_modules/@fontsource-variable/roboto-flex/index.css");
|
|
5966
5989
|
// classic theme
|
|
5967
|
-
function useGetDefaultTheme() {
|
|
5990
|
+
function useGetDefaultTheme(appThemeMode) {
|
|
5968
5991
|
var colors = (0, useAcaciaColors_1.useAcaciaColors)().colors;
|
|
5969
5992
|
var _a = (0, useAcaciaConfig_1.useAcaciaConfig)(), borderRadius = _a.borderRadius, padding = _a.padding;
|
|
5970
5993
|
return (0, react_1.useMemo)(function () {
|
|
5971
5994
|
return {
|
|
5972
5995
|
token: {
|
|
5973
5996
|
colorPrimary: "#427e7b", // your custom default
|
|
5974
|
-
colorText: "#080808",
|
|
5975
|
-
colorTextTertiary: "#757C7C",
|
|
5997
|
+
colorText: appThemeMode === "light" ? "#080808" : "#eaeaea",
|
|
5998
|
+
colorTextTertiary: appThemeMode === "light" ? "#757C7C" : "#cecece",
|
|
5976
5999
|
fontFamily: "'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
5977
6000
|
borderRadius: borderRadius.primary,
|
|
5978
6001
|
borderRadiusLG: borderRadius.primary,
|
|
@@ -6564,7 +6587,6 @@ var react_1 = __webpack_require__(/*! react */ "react");
|
|
|
6564
6587
|
var VerticalLayout_1 = __webpack_require__(/*! ../../layout/VerticalLayout/VerticalLayout */ "./src/components/layout/VerticalLayout/VerticalLayout.tsx");
|
|
6565
6588
|
var defaultTheme_1 = __webpack_require__(/*! ../ConfigProvider/defaultTheme */ "./src/components/ui/ConfigProvider/defaultTheme.ts");
|
|
6566
6589
|
var colorize_1 = __webpack_require__(/*! @mirawision/colorize */ "./node_modules/@mirawision/colorize/index.js");
|
|
6567
|
-
var ts_pattern_1 = __webpack_require__(/*! ts-pattern */ "./node_modules/ts-pattern/dist/index.cjs");
|
|
6568
6590
|
var colors_util_1 = __webpack_require__(/*! ../../../utils/colors.util */ "./src/utils/colors.util.ts");
|
|
6569
6591
|
var antd_style_1 = __webpack_require__(/*! antd-style */ "antd-style");
|
|
6570
6592
|
var useStyle = (0, antd_style_1.createStyles)(function (_a) {
|
|
@@ -6577,19 +6599,9 @@ var Menu = function (_a) {
|
|
|
6577
6599
|
var _b = _a.showRightBorder, showRightBorder = _b === void 0 ? true : _b, props = __rest(_a, ["showRightBorder"]);
|
|
6578
6600
|
var context = (0, react_1.useContext)(VerticalLayout_1.VerticalLayoutContext); // context to check if its nested - its possible that the user can use the header without the VerticalLayout
|
|
6579
6601
|
var isNestedInLayout = Boolean(context); // check if nested or not to handle colors
|
|
6580
|
-
var
|
|
6581
|
-
var globalToken = useToken(); // get the default, antd tokens
|
|
6602
|
+
var globalToken = antd_1.theme.useToken(); // get the default, antd tokens
|
|
6582
6603
|
var menuStyles = useStyle().styles;
|
|
6583
|
-
var
|
|
6584
|
-
return (0, ts_pattern_1.match)(type)
|
|
6585
|
-
.with("hex", function () {
|
|
6586
|
-
return (0, colors_util_1.hexToRGBA)(color, 30);
|
|
6587
|
-
})
|
|
6588
|
-
.with("rgba", function () {
|
|
6589
|
-
return (0, colorize_1.changeOpacity)(color, 0.3);
|
|
6590
|
-
})
|
|
6591
|
-
.exhaustive();
|
|
6592
|
-
};
|
|
6604
|
+
var token = (0, antd_style_1.useTheme)();
|
|
6593
6605
|
var selectedItemColor = (0, react_1.useMemo)(function () {
|
|
6594
6606
|
if (isNestedInLayout) {
|
|
6595
6607
|
var blended = (0, colorize_1.blendMultipleColors)(context.gradients.map(function (item) {
|
|
@@ -6602,12 +6614,12 @@ var Menu = function (_a) {
|
|
|
6602
6614
|
return {
|
|
6603
6615
|
menuColor: context === null || context === void 0 ? void 0 : context.accentColor,
|
|
6604
6616
|
menuBgColor: (0, colorize_1.isValidHEXColor)(color)
|
|
6605
|
-
? editOpacity("hex", color)
|
|
6606
|
-
: editOpacity("rgba", color),
|
|
6617
|
+
? (0, colors_util_1.editOpacity)("hex", color)
|
|
6618
|
+
: (0, colors_util_1.editOpacity)("rgba", color),
|
|
6607
6619
|
};
|
|
6608
6620
|
}
|
|
6609
6621
|
}, [context === null || context === void 0 ? void 0 : context.accentColor, isNestedInLayout]);
|
|
6610
|
-
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(); // get the default, overwritten tokens
|
|
6622
|
+
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(token.appThemeMode); // get the default, overwritten tokens
|
|
6611
6623
|
return ((0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, { theme: {
|
|
6612
6624
|
token: __assign(__assign({}, defaultTheme.token), globalToken.token),
|
|
6613
6625
|
components: {
|
|
@@ -6688,18 +6700,22 @@ var antd_1 = __webpack_require__(/*! antd */ "antd");
|
|
|
6688
6700
|
var defaultTheme_1 = __webpack_require__(/*! ../ConfigProvider/defaultTheme */ "./src/components/ui/ConfigProvider/defaultTheme.ts");
|
|
6689
6701
|
var colors_util_1 = __webpack_require__(/*! ../../../utils/colors.util */ "./src/utils/colors.util.ts");
|
|
6690
6702
|
var colorize_1 = __webpack_require__(/*! @mirawision/colorize */ "./node_modules/@mirawision/colorize/index.js");
|
|
6703
|
+
var antd_style_1 = __webpack_require__(/*! antd-style */ "antd-style");
|
|
6691
6704
|
var Pagination = function (_a) {
|
|
6692
6705
|
var _b = _a.selectedStyle, selectedStyle = _b === void 0 ? "solid" : _b, props = __rest(_a, ["selectedStyle"]);
|
|
6693
6706
|
var useToken = antd_1.theme.useToken;
|
|
6694
6707
|
var globalToken = useToken(); // get the default, antd tokens
|
|
6695
|
-
var
|
|
6708
|
+
var token = (0, antd_style_1.useTheme)();
|
|
6709
|
+
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(token.appThemeMode); // get the default, overwritten tokens
|
|
6696
6710
|
return ((0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, { theme: {
|
|
6697
6711
|
token: __assign(__assign({}, defaultTheme.token), globalToken.token),
|
|
6698
6712
|
components: {
|
|
6699
6713
|
Pagination: __assign(__assign({}, defaultTheme.components.Pagination), (selectedStyle === "solid"
|
|
6700
6714
|
? {
|
|
6701
6715
|
itemActiveBg: globalToken.token.colorPrimary,
|
|
6702
|
-
itemActiveColor:
|
|
6716
|
+
itemActiveColor: token.appThemeMode === "light"
|
|
6717
|
+
? (0, colors_util_1.renderBlackOrWhiteText)(globalToken.token.colorPrimary)
|
|
6718
|
+
: "white",
|
|
6703
6719
|
itemActiveColorHover: (0, colorize_1.tint)((0, colors_util_1.renderBlackOrWhiteText)(globalToken.token.colorPrimary), 0.3),
|
|
6704
6720
|
}
|
|
6705
6721
|
: {})),
|
|
@@ -6749,10 +6765,39 @@ exports["default"] = Panel;
|
|
|
6749
6765
|
var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
6750
6766
|
var Space_1 = __importDefault(__webpack_require__(/*! ../Space/Space */ "./src/components/ui/Space/Space.tsx"));
|
|
6751
6767
|
var usePanelStyles_1 = __webpack_require__(/*! ./usePanelStyles */ "./src/components/ui/Panel/usePanelStyles.tsx");
|
|
6768
|
+
var react_1 = __webpack_require__(/*! react */ "react");
|
|
6769
|
+
var VerticalLayout_1 = __webpack_require__(/*! ../../layout/VerticalLayout/VerticalLayout */ "./src/components/layout/VerticalLayout/VerticalLayout.tsx");
|
|
6770
|
+
var colorize_1 = __webpack_require__(/*! @mirawision/colorize */ "./node_modules/@mirawision/colorize/index.js");
|
|
6771
|
+
var colors_util_1 = __webpack_require__(/*! ../../../utils/colors.util */ "./src/utils/colors.util.ts");
|
|
6752
6772
|
function Panel(_a) {
|
|
6753
6773
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6754
6774
|
var _k = _a.position, position = _k === void 0 ? "left" : _k, props = __rest(_a, ["position"]);
|
|
6755
|
-
var
|
|
6775
|
+
var context = (0, react_1.useContext)(VerticalLayout_1.VerticalLayoutContext); // context to check if its nested - its possible that the user can use the header without the VerticalLayout
|
|
6776
|
+
var isNestedInLayout = Boolean(context); // check if nested or not to handle colors
|
|
6777
|
+
var selectedItemColor = (0, react_1.useMemo)(function () {
|
|
6778
|
+
if (isNestedInLayout) {
|
|
6779
|
+
var blended = (0, colorize_1.blendMultipleColors)(context.gradients.map(function (item) {
|
|
6780
|
+
return {
|
|
6781
|
+
color: item,
|
|
6782
|
+
weight: 1,
|
|
6783
|
+
};
|
|
6784
|
+
}));
|
|
6785
|
+
var color = (0, colorize_1.shade)(blended, 0.5);
|
|
6786
|
+
return {
|
|
6787
|
+
menuColor: context === null || context === void 0 ? void 0 : context.accentColor,
|
|
6788
|
+
menuBgColor: (0, colorize_1.isValidHEXColor)(color)
|
|
6789
|
+
? (0, colors_util_1.editOpacity)("hex", color)
|
|
6790
|
+
: (0, colors_util_1.editOpacity)("rgba", color),
|
|
6791
|
+
};
|
|
6792
|
+
}
|
|
6793
|
+
return {
|
|
6794
|
+
menuColor: null,
|
|
6795
|
+
menuBgColor: null,
|
|
6796
|
+
};
|
|
6797
|
+
}, [context === null || context === void 0 ? void 0 : context.accentColor, isNestedInLayout]);
|
|
6798
|
+
var _l = (0, usePanelStyles_1.usePanelStyles)({
|
|
6799
|
+
color: selectedItemColor.menuBgColor,
|
|
6800
|
+
}), styles = _l.styles, cx = _l.cx;
|
|
6756
6801
|
return ((0, jsx_runtime_1.jsx)("div", { className: cx(position !== "none" && styles.outerPanel, position === "left" && styles.outerPanelLeft, position === "right" && styles.outerPanelRight, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.outerContainerClassName), style: __assign({}, (_c = props === null || props === void 0 ? void 0 : props.styles) === null || _c === void 0 ? void 0 : _c.outerContainerStyles), children: (0, jsx_runtime_1.jsxs)("div", { className: cx(styles.panelBase, (_d = props === null || props === void 0 ? void 0 : props.classNames) === null || _d === void 0 ? void 0 : _d.panelBaseClassName), style: __assign({}, (_e = props === null || props === void 0 ? void 0 : props.styles) === null || _e === void 0 ? void 0 : _e.panelBaseStyles), children: [(0, jsx_runtime_1.jsx)("div", { className: cx(styles.panelBody, (_f = props === null || props === void 0 ? void 0 : props.classNames) === null || _f === void 0 ? void 0 : _f.panelBodyClassName), style: __assign({}, (_g = props === null || props === void 0 ? void 0 : props.styles) === null || _g === void 0 ? void 0 : _g.panelBodyStyles), children: (0, jsx_runtime_1.jsx)(Space_1.default, { orientation: "vertical", children: props.children }) }), props.footer && ((0, jsx_runtime_1.jsx)("div", { className: cx(styles.panelFooter, (_h = props === null || props === void 0 ? void 0 : props.classNames) === null || _h === void 0 ? void 0 : _h.panelFooterClassName), style: __assign({}, (_j = props === null || props === void 0 ? void 0 : props.styles) === null || _j === void 0 ? void 0 : _j.panelFooterStyles), children: props.footer }))] }) }));
|
|
6757
6802
|
}
|
|
6758
6803
|
|
|
@@ -6774,9 +6819,10 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
6774
6819
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6775
6820
|
exports.usePanelStyles = void 0;
|
|
6776
6821
|
var antd_style_1 = __webpack_require__(/*! antd-style */ "antd-style");
|
|
6777
|
-
exports.usePanelStyles = (0, antd_style_1.createStyles)(function (_a) {
|
|
6822
|
+
exports.usePanelStyles = (0, antd_style_1.createStyles)(function (_a, props) {
|
|
6823
|
+
var _b;
|
|
6778
6824
|
var css = _a.css;
|
|
6779
|
-
var outerPanelBase = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n z-index: 2;\n &::before {\n content: \"\";\n position: absolute;\n width: 80%;\n height: 12px;\n top: -7px;\n z-index: -1;\n border-radius: 3px 6px 6px 0;\n background:
|
|
6825
|
+
var outerPanelBase = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n z-index: 2;\n &::before {\n content: \"\";\n position: absolute;\n width: 80%;\n height: 12px;\n top: -7px;\n z-index: -1;\n border-radius: 3px 6px 6px 0;\n background: ", "; \n }\n "], ["\n position: relative;\n z-index: 2;\n &::before {\n content: \"\";\n position: absolute;\n width: 80%;\n height: 12px;\n top: -7px;\n z-index: -1;\n border-radius: 3px 6px 6px 0;\n background: ", "; \n }\n "])), (_b = props.color) !== null && _b !== void 0 ? _b : "#9cafb7");
|
|
6780
6826
|
var panelBase = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 3px;\n background: #EFF3F3;\n box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n "], ["\n border-radius: 3px;\n background: #EFF3F3;\n box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n "])));
|
|
6781
6827
|
var panelBody = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 1rem; \n "], ["\n padding: 1rem; \n "])));
|
|
6782
6828
|
var panelFooter = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: #e2e7e8;\n border-top: 1px solid #dadada;\n "], ["\n background: #e2e7e8;\n border-top: 1px solid #dadada;\n "])));
|
|
@@ -6792,6 +6838,78 @@ exports.usePanelStyles = (0, antd_style_1.createStyles)(function (_a) {
|
|
|
6792
6838
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
6793
6839
|
|
|
6794
6840
|
|
|
6841
|
+
/***/ },
|
|
6842
|
+
|
|
6843
|
+
/***/ "./src/components/ui/Popconfirm/Popconfirm.tsx"
|
|
6844
|
+
/*!*****************************************************!*\
|
|
6845
|
+
!*** ./src/components/ui/Popconfirm/Popconfirm.tsx ***!
|
|
6846
|
+
\*****************************************************/
|
|
6847
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6848
|
+
|
|
6849
|
+
"use strict";
|
|
6850
|
+
|
|
6851
|
+
var __assign = (this && this.__assign) || function () {
|
|
6852
|
+
__assign = Object.assign || function(t) {
|
|
6853
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6854
|
+
s = arguments[i];
|
|
6855
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6856
|
+
t[p] = s[p];
|
|
6857
|
+
}
|
|
6858
|
+
return t;
|
|
6859
|
+
};
|
|
6860
|
+
return __assign.apply(this, arguments);
|
|
6861
|
+
};
|
|
6862
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
6863
|
+
var t = {};
|
|
6864
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
6865
|
+
t[p] = s[p];
|
|
6866
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6867
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6868
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
6869
|
+
t[p[i]] = s[p[i]];
|
|
6870
|
+
}
|
|
6871
|
+
return t;
|
|
6872
|
+
};
|
|
6873
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6874
|
+
var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
6875
|
+
var antd_style_1 = __webpack_require__(/*! antd-style */ "antd-style");
|
|
6876
|
+
var antd_1 = __webpack_require__(/*! antd */ "antd");
|
|
6877
|
+
var defaultTheme_1 = __webpack_require__(/*! ../ConfigProvider/defaultTheme */ "./src/components/ui/ConfigProvider/defaultTheme.ts");
|
|
6878
|
+
var Popconfirm = function (_a) {
|
|
6879
|
+
var props = __rest(_a, []);
|
|
6880
|
+
var token = (0, antd_style_1.useTheme)();
|
|
6881
|
+
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(token.appThemeMode); // get the default, overwritten tokens
|
|
6882
|
+
var globalToken = antd_1.theme.useToken(); // get the default, antd tokens
|
|
6883
|
+
return ((0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, { theme: {
|
|
6884
|
+
token: __assign(__assign({}, defaultTheme.token), globalToken.token),
|
|
6885
|
+
components: {
|
|
6886
|
+
Popconfirm: {
|
|
6887
|
+
colorBgElevated: token.darkPopover && "#161616c4",
|
|
6888
|
+
},
|
|
6889
|
+
},
|
|
6890
|
+
}, children: (0, jsx_runtime_1.jsx)(antd_1.Popconfirm, __assign({ cancelButtonProps: {
|
|
6891
|
+
type: "text",
|
|
6892
|
+
styles: {
|
|
6893
|
+
content: {
|
|
6894
|
+
color: token.darkPopover && (0, defaultTheme_1.useGetDefaultTheme)("dark").token.colorText,
|
|
6895
|
+
},
|
|
6896
|
+
},
|
|
6897
|
+
} }, props, { styles: {
|
|
6898
|
+
container: {
|
|
6899
|
+
backgroundColor: token.darkPopover && "#161616c4",
|
|
6900
|
+
backdropFilter: token.darkPopover && "blur(3px)",
|
|
6901
|
+
},
|
|
6902
|
+
title: {
|
|
6903
|
+
color: token.darkPopover && (0, defaultTheme_1.useGetDefaultTheme)("dark").token.colorText,
|
|
6904
|
+
},
|
|
6905
|
+
content: {
|
|
6906
|
+
color: token.darkPopover && (0, defaultTheme_1.useGetDefaultTheme)("dark").token.colorText,
|
|
6907
|
+
},
|
|
6908
|
+
} })) }));
|
|
6909
|
+
};
|
|
6910
|
+
exports["default"] = Popconfirm;
|
|
6911
|
+
|
|
6912
|
+
|
|
6795
6913
|
/***/ },
|
|
6796
6914
|
|
|
6797
6915
|
/***/ "./src/components/ui/Radio/Button.tsx"
|
|
@@ -7150,13 +7268,15 @@ var colorize_1 = __webpack_require__(/*! @mirawision/colorize */ "./node_modules
|
|
|
7150
7268
|
var react_1 = __webpack_require__(/*! react */ "react");
|
|
7151
7269
|
var VerticalLayout_1 = __webpack_require__(/*! ../../layout/VerticalLayout/VerticalLayout */ "./src/components/layout/VerticalLayout/VerticalLayout.tsx");
|
|
7152
7270
|
var defaultTheme_1 = __webpack_require__(/*! ../ConfigProvider/defaultTheme */ "./src/components/ui/ConfigProvider/defaultTheme.ts");
|
|
7271
|
+
var antd_style_1 = __webpack_require__(/*! antd-style */ "antd-style");
|
|
7153
7272
|
function Tabs(_a) {
|
|
7154
7273
|
var _b = _a.type, type = _b === void 0 ? "line" : _b, props = __rest(_a, ["type"]);
|
|
7155
7274
|
var context = (0, react_1.useContext)(VerticalLayout_1.VerticalLayoutContext);
|
|
7156
7275
|
var isNestedInLayout = Boolean(context); // for when tabs are nested in Layout
|
|
7157
7276
|
var useToken = antd_1.theme.useToken;
|
|
7158
7277
|
var globalToken = useToken(); // get the default, antd tokens
|
|
7159
|
-
var
|
|
7278
|
+
var token = (0, antd_style_1.useTheme)();
|
|
7279
|
+
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(token.appThemeMode); // get the default, overwritten tokens
|
|
7160
7280
|
return ((0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, { theme: {
|
|
7161
7281
|
token: __assign(__assign(__assign({}, defaultTheme.token), globalToken.token), (isNestedInLayout
|
|
7162
7282
|
? {
|
|
@@ -7352,11 +7472,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
7352
7472
|
}
|
|
7353
7473
|
return t;
|
|
7354
7474
|
};
|
|
7475
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7476
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7477
|
+
};
|
|
7355
7478
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7356
7479
|
var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
7357
7480
|
var antd_1 = __webpack_require__(/*! antd */ "antd");
|
|
7358
7481
|
var useTypographyStyles_1 = __webpack_require__(/*! ./useTypographyStyles */ "./src/components/ui/Typography/useTypographyStyles.ts");
|
|
7359
7482
|
var typographyUtil_1 = __webpack_require__(/*! ../../../theme/typographyUtil */ "./src/theme/typographyUtil.ts");
|
|
7483
|
+
var Space_1 = __importDefault(__webpack_require__(/*! ../Space/Space */ "./src/components/ui/Space/Space.tsx"));
|
|
7360
7484
|
var TypographyToken = {
|
|
7361
7485
|
fontSizeHeading1: typographyUtil_1.typographyUtil.fontSize.h1,
|
|
7362
7486
|
fontSizeHeading2: typographyUtil_1.typographyUtil.fontSize.h2,
|
|
@@ -7366,9 +7490,9 @@ var TypographyToken = {
|
|
|
7366
7490
|
fontWeightStrong: 600,
|
|
7367
7491
|
};
|
|
7368
7492
|
var Title = function (_a) {
|
|
7369
|
-
var children = _a.children, _b = _a.level, level = _b === void 0 ? 1 : _b, color = _a.color,
|
|
7493
|
+
var children = _a.children, _b = _a.level, level = _b === void 0 ? 1 : _b, color = _a.color, _c = _a.showPointer, showPointer = _c === void 0 ? true : _c, _d = _a.iconPosition, iconPosition = _d === void 0 ? "start" : _d, props = __rest(_a, ["children", "level", "color", "showPointer", "iconPosition"]);
|
|
7370
7494
|
var typoStyles = (0, useTypographyStyles_1.useTypographyStyles)(color).styles;
|
|
7371
|
-
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Title, __assign({ className: "\n\t\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t\t").concat(typoStyles.title, "\n\t\t\t\t\t").concat(typoStyles["titleH".concat(level)], "\n\t\t\t\t"), level: level },
|
|
7495
|
+
return ((0, jsx_runtime_1.jsxs)(Space_1.default, { orientation: "horizontal", children: [iconPosition === "start" && props.icon, (0, jsx_runtime_1.jsx)(antd_1.Typography.Title, __assign({ className: "\n\t\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t\t").concat(typoStyles.title, "\n\t\t\t\t\t").concat(typoStyles["titleH".concat(level)], "\n\t\t\t\t\t").concat(showPointer ? "pointer" : "", "\n\t\t\t\t"), level: level }, props, { children: children })), iconPosition === "end" && props.icon] }));
|
|
7372
7496
|
};
|
|
7373
7497
|
var Text = function (_a) {
|
|
7374
7498
|
var children = _a.children, _b = _a.level, level = _b === void 0 ? 2 : _b, color = _a.color, antdProps = __rest(_a, ["children", "level", "color"]);
|
|
@@ -7378,22 +7502,22 @@ var Text = function (_a) {
|
|
|
7378
7502
|
var Emphasis = function (_a) {
|
|
7379
7503
|
var children = _a.children, color = _a.color, props = __rest(_a, ["children", "color"]);
|
|
7380
7504
|
var typoStyles = (0, useTypographyStyles_1.useTypographyStyles)(color).styles;
|
|
7381
|
-
return ((0, jsx_runtime_1.jsx)(Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.emphasis, "
|
|
7505
|
+
return ((0, jsx_runtime_1.jsx)(Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.emphasis, "\n\t\t\t"), color: color }, props, { children: children })));
|
|
7382
7506
|
};
|
|
7383
7507
|
var Caption = function (_a) {
|
|
7384
7508
|
var children = _a.children, color = _a.color, antdProps = __rest(_a, ["children", "color"]);
|
|
7385
7509
|
var typoStyles = (0, useTypographyStyles_1.useTypographyStyles)(color).styles;
|
|
7386
|
-
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.caption, "
|
|
7510
|
+
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.caption, "\n\t\t\t") }, antdProps, { children: children })));
|
|
7387
7511
|
};
|
|
7388
7512
|
var Overline = function (_a) {
|
|
7389
7513
|
var children = _a.children, color = _a.color, antdProps = __rest(_a, ["children", "color"]);
|
|
7390
7514
|
var typoStyles = (0, useTypographyStyles_1.useTypographyStyles)(color).styles;
|
|
7391
|
-
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.overline, "
|
|
7515
|
+
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.overline, "\n\t\t\t") }, antdProps, { children: children })));
|
|
7392
7516
|
};
|
|
7393
7517
|
var Paragraph = function (_a) {
|
|
7394
7518
|
var children = _a.children, color = _a.color, antdProps = __rest(_a, ["children", "color"]);
|
|
7395
7519
|
var typoStyles = (0, useTypographyStyles_1.useTypographyStyles)(color).styles;
|
|
7396
|
-
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.textBody2, "
|
|
7520
|
+
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Text, __assign({ className: "\n\t\t\t\t".concat(typoStyles.common, "\n\t\t\t\t").concat(typoStyles.textBody2, "\n\t\t\t\t").concat(typoStyles.paragraph, "\n\t\t\t") }, antdProps, { children: children })));
|
|
7397
7521
|
};
|
|
7398
7522
|
/**
|
|
7399
7523
|
* Basic text writing, including headings, body text, lists, and more.
|
|
@@ -7685,7 +7809,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7685
7809
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7686
7810
|
};
|
|
7687
7811
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7688
|
-
exports.useScreenSize = exports.useAcaciaConfig = exports.useFoucHandler = exports.useAcaciaColors = exports.VerticalHeader = exports.VerticalLayout = exports.Panel = exports.Space = exports.Menu = exports.Avatar = exports.Tabs = exports.Tag = exports.Card = exports.DatePicker = exports.TimePicker = exports.Typography = exports.Pagination = exports.Dropdown = exports.Input = exports.Switch = exports.Select = exports.Segmented = exports.Radio = exports.Checkbox = exports.Breadcrumb = exports.ConfigProvider = exports.Badge = exports.Button = void 0;
|
|
7812
|
+
exports.useScreenSize = exports.useAcaciaConfig = exports.useFoucHandler = exports.useAcaciaColors = exports.VerticalContent = exports.VerticalHeader = exports.VerticalLayout = exports.Popconfirm = exports.Panel = exports.Space = exports.Menu = exports.Avatar = exports.Tabs = exports.Tag = exports.Card = exports.DatePicker = exports.TimePicker = exports.Typography = exports.Pagination = exports.Dropdown = exports.Input = exports.Switch = exports.Select = exports.Segmented = exports.Radio = exports.Checkbox = exports.Breadcrumb = exports.ConfigProvider = exports.Badge = exports.Button = void 0;
|
|
7689
7813
|
var Button_1 = __webpack_require__(/*! ./components/ui/Button/Button */ "./src/components/ui/Button/Button.tsx");
|
|
7690
7814
|
Object.defineProperty(exports, "Button", ({ enumerable: true, get: function () { return __importDefault(Button_1).default; } }));
|
|
7691
7815
|
var Badge_1 = __webpack_require__(/*! ./components/ui/Badge/Badge */ "./src/components/ui/Badge/Badge.tsx");
|
|
@@ -7730,10 +7854,14 @@ var Space_1 = __webpack_require__(/*! ./components/ui/Space/Space */ "./src/comp
|
|
|
7730
7854
|
Object.defineProperty(exports, "Space", ({ enumerable: true, get: function () { return __importDefault(Space_1).default; } }));
|
|
7731
7855
|
var Panel_1 = __webpack_require__(/*! ./components/ui/Panel/Panel */ "./src/components/ui/Panel/Panel.tsx");
|
|
7732
7856
|
Object.defineProperty(exports, "Panel", ({ enumerable: true, get: function () { return __importDefault(Panel_1).default; } }));
|
|
7857
|
+
var Popconfirm_1 = __webpack_require__(/*! ./components/ui/Popconfirm/Popconfirm */ "./src/components/ui/Popconfirm/Popconfirm.tsx");
|
|
7858
|
+
Object.defineProperty(exports, "Popconfirm", ({ enumerable: true, get: function () { return __importDefault(Popconfirm_1).default; } }));
|
|
7733
7859
|
var VerticalLayout_1 = __webpack_require__(/*! ./components/layout/VerticalLayout/VerticalLayout */ "./src/components/layout/VerticalLayout/VerticalLayout.tsx");
|
|
7734
7860
|
Object.defineProperty(exports, "VerticalLayout", ({ enumerable: true, get: function () { return __importDefault(VerticalLayout_1).default; } }));
|
|
7735
7861
|
var VerticalHeader_1 = __webpack_require__(/*! ./components/layout/VerticalLayout/VerticalHeader */ "./src/components/layout/VerticalLayout/VerticalHeader.tsx");
|
|
7736
7862
|
Object.defineProperty(exports, "VerticalHeader", ({ enumerable: true, get: function () { return __importDefault(VerticalHeader_1).default; } }));
|
|
7863
|
+
var VerticalContent_1 = __webpack_require__(/*! ./components/layout/VerticalLayout/VerticalContent */ "./src/components/layout/VerticalLayout/VerticalContent.tsx");
|
|
7864
|
+
Object.defineProperty(exports, "VerticalContent", ({ enumerable: true, get: function () { return __importDefault(VerticalContent_1).default; } }));
|
|
7737
7865
|
// hooks
|
|
7738
7866
|
var useAcaciaColors_1 = __webpack_require__(/*! ./hooks/useAcaciaColors */ "./src/hooks/useAcaciaColors.tsx");
|
|
7739
7867
|
Object.defineProperty(exports, "useAcaciaColors", ({ enumerable: true, get: function () { return useAcaciaColors_1.useAcaciaColors; } }));
|
|
@@ -7762,6 +7890,8 @@ exports.CustomTheme = {
|
|
|
7762
7890
|
headingFontFamily: '"Roboto Flex Variable", "Roboto Flex", "Segoe UI", sans-serif',
|
|
7763
7891
|
appTheme: "classic",
|
|
7764
7892
|
logo: "TEST LOGO",
|
|
7893
|
+
appThemeMode: "light",
|
|
7894
|
+
darkPopover: false,
|
|
7765
7895
|
};
|
|
7766
7896
|
|
|
7767
7897
|
|
|
@@ -7807,7 +7937,7 @@ function DefaultLogo() {
|
|
|
7807
7937
|
var token = (0, antd_style_1.useTheme)();
|
|
7808
7938
|
var useToken = antd_1.theme.useToken;
|
|
7809
7939
|
var globalToken = useToken(); // get the default, antd tokens
|
|
7810
|
-
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(); // get the default, overwritten tokens
|
|
7940
|
+
var defaultTheme = (0, defaultTheme_1.useGetDefaultTheme)(token.appThemeMode); // get the default, overwritten tokens
|
|
7811
7941
|
var getLogo = function () {
|
|
7812
7942
|
var _a, _b, _c;
|
|
7813
7943
|
if (typeof token.logo === "string") {
|
|
@@ -7909,10 +8039,11 @@ exports.useAcaciaToken = useAcaciaToken;
|
|
|
7909
8039
|
"use strict";
|
|
7910
8040
|
|
|
7911
8041
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7912
|
-
exports.renderBlackOrWhiteText = exports.generate = void 0;
|
|
8042
|
+
exports.editOpacity = exports.renderBlackOrWhiteText = exports.generate = void 0;
|
|
7913
8043
|
exports.hexToRGBA = hexToRGBA;
|
|
7914
8044
|
var colors_1 = __webpack_require__(/*! @ant-design/colors */ "./node_modules/@ant-design/colors/es/index.js");
|
|
7915
8045
|
var colorize_1 = __webpack_require__(/*! @mirawision/colorize */ "./node_modules/@mirawision/colorize/index.js");
|
|
8046
|
+
var ts_pattern_1 = __webpack_require__(/*! ts-pattern */ "./node_modules/ts-pattern/dist/index.cjs");
|
|
7916
8047
|
var generate = function (color, darken) {
|
|
7917
8048
|
var colors = color
|
|
7918
8049
|
? (0, colors_1.generate)(color, {
|
|
@@ -7946,6 +8077,17 @@ function hexToRGBA(hex, opacityPercent) {
|
|
|
7946
8077
|
var b = Number.parseInt(hex.slice(5, 7), 16);
|
|
7947
8078
|
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
7948
8079
|
}
|
|
8080
|
+
var editOpacity = function (type, color) {
|
|
8081
|
+
return (0, ts_pattern_1.match)(type)
|
|
8082
|
+
.with("hex", function () {
|
|
8083
|
+
return hexToRGBA(color, 30);
|
|
8084
|
+
})
|
|
8085
|
+
.with("rgba", function () {
|
|
8086
|
+
return (0, colorize_1.changeOpacity)(color, 0.3);
|
|
8087
|
+
})
|
|
8088
|
+
.exhaustive();
|
|
8089
|
+
};
|
|
8090
|
+
exports.editOpacity = editOpacity;
|
|
7949
8091
|
|
|
7950
8092
|
|
|
7951
8093
|
/***/ },
|