@reltio/components 1.4.2036 → 1.4.2038
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/ModeSwitcherSelect/ModeSwitcherSelect.js +12 -3
- package/ModeSwitcherSelect/styles.module.css.js +9 -0
- package/cjs/ModeSwitcherSelect/ModeSwitcherSelect.js +24 -15
- package/cjs/ModeSwitcherSelect/styles.module.css.js +9 -0
- package/cjs/contexts/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/cjs/contexts/ThemeProvider/ThemeProvider.js +53 -0
- package/cjs/contexts/ThemeProvider/index.d.ts +1 -0
- package/cjs/contexts/ThemeProvider/index.js +5 -0
- package/cjs/hooks/useCssVariableStyles/index.d.ts +1 -0
- package/cjs/hooks/useCssVariableStyles/index.js +5 -0
- package/cjs/hooks/useCssVariableStyles/useCssVariableStyles.d.ts +5 -0
- package/cjs/hooks/useCssVariableStyles/useCssVariableStyles.js +28 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +4 -2
- package/contexts/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/contexts/ThemeProvider/ThemeProvider.js +26 -0
- package/contexts/ThemeProvider/index.d.ts +1 -0
- package/contexts/ThemeProvider/index.js +1 -0
- package/hooks/useCssVariableStyles/index.d.ts +1 -0
- package/hooks/useCssVariableStyles/index.js +1 -0
- package/hooks/useCssVariableStyles/useCssVariableStyles.d.ts +5 -0
- package/hooks/useCssVariableStyles/useCssVariableStyles.js +24 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
- package/ModeSwitcherSelect/styles.d.ts +0 -1
- package/ModeSwitcherSelect/styles.js +0 -99
- package/cjs/ModeSwitcherSelect/styles.d.ts +0 -1
- package/cjs/ModeSwitcherSelect/styles.js +0 -102
|
@@ -27,11 +27,20 @@ import Box from '@mui/material/Box';
|
|
|
27
27
|
import Typography from '@mui/material/Typography';
|
|
28
28
|
import Tooltip from '@mui/material/Tooltip';
|
|
29
29
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
30
|
-
import {
|
|
30
|
+
import { useCssVariableStyles } from '../hooks/useCssVariableStyles/useCssVariableStyles';
|
|
31
|
+
import styles from './styles.module.css';
|
|
31
32
|
var isButton = function (value) { return 'onClick' in value; };
|
|
33
|
+
var MAX_WIDTH_SELECT = 200;
|
|
34
|
+
var SELECT_PADDING_RIGHT = 32;
|
|
35
|
+
var SELECT_PADDING_LEFT = 12;
|
|
36
|
+
var CALCULATED_MAX_WIDTH_SELECT = MAX_WIDTH_SELECT - SELECT_PADDING_LEFT - SELECT_PADDING_RIGHT;
|
|
32
37
|
export var ModeSwitcherSelect = function (_a) {
|
|
33
38
|
var _b = _a.optionsGroup, optionsGroup = _b === void 0 ? [] : _b, _c = _a.buttonsGroup, buttonsGroup = _c === void 0 ? [] : _c, value = _a.value, onChange = _a.onChange, _d = _a.loading, loading = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.variant, variant = _f === void 0 ? 'normal' : _f;
|
|
34
|
-
var
|
|
39
|
+
var variableStyles = useCssVariableStyles({
|
|
40
|
+
'--max-width-select': "".concat(CALCULATED_MAX_WIDTH_SELECT, "px"),
|
|
41
|
+
'--select-padding-right': "".concat(SELECT_PADDING_RIGHT, "px"),
|
|
42
|
+
'--select-padding-left': "".concat(SELECT_PADDING_LEFT, "px")
|
|
43
|
+
});
|
|
35
44
|
var handleChange = function (e) {
|
|
36
45
|
var value = e.target.value;
|
|
37
46
|
var isOption = optionsGroup.some(propEq('value', value));
|
|
@@ -61,7 +70,7 @@ export var ModeSwitcherSelect = function (_a) {
|
|
|
61
70
|
React.createElement(Typography, { className: styles.menuItemDescription }, description)))));
|
|
62
71
|
});
|
|
63
72
|
};
|
|
64
|
-
return (React.createElement(Select, { className: styles.select, classes: {
|
|
73
|
+
return (React.createElement(Select, { style: variableStyles, className: styles.select, classes: {
|
|
65
74
|
select: classnames(styles.root, styles[variant]),
|
|
66
75
|
icon: classnames(styles.arrowIcon, styles[variant]),
|
|
67
76
|
outlined: styles.outlined
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"root":"ModeSwitcherSelect-root--U-mxG","outlined":"ModeSwitcherSelect-outlined--Lzkdu","normal":"ModeSwitcherSelect-normal--eJi9k","thin":"ModeSwitcherSelect-thin--3ut9c","select":"ModeSwitcherSelect-select--5-O3e","Mui-disabled":"ModeSwitcherSelect-Mui-disabled--Ovc-G","MuiOutlinedInput-notchedOutline":"ModeSwitcherSelect-MuiOutlinedInput-notchedOutline--6sEd2","currentValueIcon":"ModeSwitcherSelect-currentValueIcon--NO4sL","currentValueText":"ModeSwitcherSelect-currentValueText--LfE9q","arrowIcon":"ModeSwitcherSelect-arrowIcon--n3PP2","currentValue":"ModeSwitcherSelect-currentValue--qmIjV","menuItem":"ModeSwitcherSelect-menuItem--wGmWL","firstMenuItemButton":"ModeSwitcherSelect-firstMenuItemButton--8qaFd","menuItemInner":"ModeSwitcherSelect-menuItemInner--9DSaH","menuItemIcon":"ModeSwitcherSelect-menuItemIcon--TfRCH","menuItemLabel":"ModeSwitcherSelect-menuItemLabel--0Tz-h","menuItemDescription":"ModeSwitcherSelect-menuItemDescription--nFZuS"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
5
|
+
style.type = 'text/css'
|
|
6
|
+
style.innerHTML = `.ModeSwitcherSelect-root--U-mxG{align-items:center;display:inline-flex;max-width:var(--max-width-select)}.ModeSwitcherSelect-root--U-mxG.ModeSwitcherSelect-outlined--Lzkdu{min-height:1.1876em}.ModeSwitcherSelect-root--U-mxG.ModeSwitcherSelect-normal--eJi9k{padding-bottom:9px;padding-top:9px}.ModeSwitcherSelect-root--U-mxG.ModeSwitcherSelect-thin--3ut9c{padding-bottom:6px;padding-top:6px}.ModeSwitcherSelect-select--5-O3e.ModeSwitcherSelect-Mui-disabled--Ovc-G .ModeSwitcherSelect-MuiOutlinedInput-notchedOutline--6sEd2{border-color:var(--mui-palette-text-disabled)}.ModeSwitcherSelect-select--5-O3e.ModeSwitcherSelect-Mui-disabled--Ovc-G .ModeSwitcherSelect-currentValueIcon--NO4sL,.ModeSwitcherSelect-select--5-O3e.ModeSwitcherSelect-Mui-disabled--Ovc-G .ModeSwitcherSelect-currentValueText--LfE9q{color:var(--mui-palette-text-disabled)}.ModeSwitcherSelect-outlined--Lzkdu{padding-left:var(--select-padding-left);padding-right:var(--select-padding-right)}.ModeSwitcherSelect-arrowIcon--n3PP2{color:var(--mui-palette-text-secondary);font-size:18px;right:12px;top:calc(50% - 9px)}.ModeSwitcherSelect-arrowIcon--n3PP2.ModeSwitcherSelect-thin--3ut9c{right:8px}.ModeSwitcherSelect-currentValue--qmIjV{align-items:center;display:flex}.ModeSwitcherSelect-currentValueIcon--NO4sL{color:var(--mui-palette-text-secondary);display:inline-block;font-size:18px;height:1em;margin-right:8px;width:1em}.ModeSwitcherSelect-currentValueText--LfE9q{color:var(--mui-palette-text-primary);font-size:14px;font-weight:500;line-height:16px;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.ModeSwitcherSelect-menuItem--wGmWL{padding:9px 12px 7px}.ModeSwitcherSelect-firstMenuItemButton--8qaFd{border-top:1px solid #e4e4e4}.ModeSwitcherSelect-menuItemInner--9DSaH{align-items:flex-start;display:flex}.ModeSwitcherSelect-menuItemIcon--TfRCH{color:var(--mui-palette-text-secondary);display:inline-block;font-size:18px;height:1em;margin-right:9px;width:1em}.ModeSwitcherSelect-menuItemLabel--0Tz-h{color:var(--mui-palette-text-primary);font-size:14px;font-weight:500;line-height:16px}.ModeSwitcherSelect-menuItemDescription--nFZuS{color:var(--mui-palette-text-secondary);font-size:10px;line-height:16px}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
export default styles;
|
|
@@ -33,11 +33,20 @@ var Box_1 = __importDefault(require("@mui/material/Box"));
|
|
|
33
33
|
var Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
34
34
|
var Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
|
|
35
35
|
var CircularProgress_1 = __importDefault(require("@mui/material/CircularProgress"));
|
|
36
|
-
var
|
|
36
|
+
var useCssVariableStyles_1 = require("../hooks/useCssVariableStyles/useCssVariableStyles");
|
|
37
|
+
var styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
37
38
|
var isButton = function (value) { return 'onClick' in value; };
|
|
39
|
+
var MAX_WIDTH_SELECT = 200;
|
|
40
|
+
var SELECT_PADDING_RIGHT = 32;
|
|
41
|
+
var SELECT_PADDING_LEFT = 12;
|
|
42
|
+
var CALCULATED_MAX_WIDTH_SELECT = MAX_WIDTH_SELECT - SELECT_PADDING_LEFT - SELECT_PADDING_RIGHT;
|
|
38
43
|
var ModeSwitcherSelect = function (_a) {
|
|
39
44
|
var _b = _a.optionsGroup, optionsGroup = _b === void 0 ? [] : _b, _c = _a.buttonsGroup, buttonsGroup = _c === void 0 ? [] : _c, value = _a.value, onChange = _a.onChange, _d = _a.loading, loading = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.variant, variant = _f === void 0 ? 'normal' : _f;
|
|
40
|
-
var
|
|
45
|
+
var variableStyles = (0, useCssVariableStyles_1.useCssVariableStyles)({
|
|
46
|
+
'--max-width-select': "".concat(CALCULATED_MAX_WIDTH_SELECT, "px"),
|
|
47
|
+
'--select-padding-right': "".concat(SELECT_PADDING_RIGHT, "px"),
|
|
48
|
+
'--select-padding-left': "".concat(SELECT_PADDING_LEFT, "px")
|
|
49
|
+
});
|
|
41
50
|
var handleChange = function (e) {
|
|
42
51
|
var value = e.target.value;
|
|
43
52
|
var isOption = optionsGroup.some((0, ramda_1.propEq)('value', value));
|
|
@@ -51,32 +60,32 @@ var ModeSwitcherSelect = function (_a) {
|
|
|
51
60
|
var value = item.value, label = item.label, description = item.description, IconComponent = item.icon;
|
|
52
61
|
var menuItemProps = {
|
|
53
62
|
value: value,
|
|
54
|
-
className:
|
|
63
|
+
className: styles_module_css_1.default.menuItem
|
|
55
64
|
};
|
|
56
65
|
if (isButton(item)) {
|
|
57
66
|
menuItemProps.onClick = function () { return item.onClick(value); };
|
|
58
67
|
menuItemProps.className = (0, classnames_1.default)(menuItemProps.className, (_a = {},
|
|
59
|
-
_a[
|
|
68
|
+
_a[styles_module_css_1.default.firstMenuItemButton] = idx === firstButtonIdx,
|
|
60
69
|
_a));
|
|
61
70
|
}
|
|
62
71
|
return (react_1.default.createElement(MenuItem_1.default, __assign({ key: value }, menuItemProps, { "data-reltio-id": "reltio-profile-select-mode-".concat(value) }),
|
|
63
|
-
react_1.default.createElement(Box_1.default, { className:
|
|
64
|
-
IconComponent && react_1.default.createElement(IconComponent, { className:
|
|
72
|
+
react_1.default.createElement(Box_1.default, { className: styles_module_css_1.default.menuItemInner },
|
|
73
|
+
IconComponent && react_1.default.createElement(IconComponent, { className: styles_module_css_1.default.menuItemIcon }),
|
|
65
74
|
react_1.default.createElement(Box_1.default, null,
|
|
66
|
-
react_1.default.createElement(Typography_1.default, { className:
|
|
67
|
-
react_1.default.createElement(Typography_1.default, { className:
|
|
75
|
+
react_1.default.createElement(Typography_1.default, { className: styles_module_css_1.default.menuItemLabel }, label),
|
|
76
|
+
react_1.default.createElement(Typography_1.default, { className: styles_module_css_1.default.menuItemDescription }, description)))));
|
|
68
77
|
});
|
|
69
78
|
};
|
|
70
|
-
return (react_1.default.createElement(Select_1.default, { className:
|
|
71
|
-
select: (0, classnames_1.default)(
|
|
72
|
-
icon: (0, classnames_1.default)(
|
|
73
|
-
outlined:
|
|
79
|
+
return (react_1.default.createElement(Select_1.default, { style: variableStyles, className: styles_module_css_1.default.select, classes: {
|
|
80
|
+
select: (0, classnames_1.default)(styles_module_css_1.default.root, styles_module_css_1.default[variant]),
|
|
81
|
+
icon: (0, classnames_1.default)(styles_module_css_1.default.arrowIcon, styles_module_css_1.default[variant]),
|
|
82
|
+
outlined: styles_module_css_1.default.outlined
|
|
74
83
|
}, value: value, onChange: handleChange, variant: "outlined", renderValue: function (value) {
|
|
75
84
|
var _a = optionsGroup.find((0, ramda_1.propEq)('value', value)) || {}, IconComponent = _a.icon, _b = _a.label, label = _b === void 0 ? value : _b;
|
|
76
|
-
return (react_1.default.createElement(Box_1.default, { className:
|
|
77
|
-
loading ? (react_1.default.createElement(CircularProgress_1.default, { size: "1em", "data-reltio-id": "mode-loading-spinner", className:
|
|
85
|
+
return (react_1.default.createElement(Box_1.default, { className: styles_module_css_1.default.currentValue },
|
|
86
|
+
loading ? (react_1.default.createElement(CircularProgress_1.default, { size: "1em", "data-reltio-id": "mode-loading-spinner", className: styles_module_css_1.default.currentValueIcon })) : (IconComponent && react_1.default.createElement(IconComponent, { className: styles_module_css_1.default.currentValueIcon })),
|
|
78
87
|
react_1.default.createElement(Tooltip_1.default, { title: label },
|
|
79
|
-
react_1.default.createElement(Typography_1.default, { className:
|
|
88
|
+
react_1.default.createElement(Typography_1.default, { className: styles_module_css_1.default.currentValueText }, label))));
|
|
80
89
|
}, MenuProps: {
|
|
81
90
|
anchorOrigin: {
|
|
82
91
|
vertical: 'bottom',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const styles = {"root":"ModeSwitcherSelect-root--U-mxG","outlined":"ModeSwitcherSelect-outlined--Lzkdu","normal":"ModeSwitcherSelect-normal--eJi9k","thin":"ModeSwitcherSelect-thin--3ut9c","select":"ModeSwitcherSelect-select--5-O3e","Mui-disabled":"ModeSwitcherSelect-Mui-disabled--Ovc-G","MuiOutlinedInput-notchedOutline":"ModeSwitcherSelect-MuiOutlinedInput-notchedOutline--6sEd2","currentValueIcon":"ModeSwitcherSelect-currentValueIcon--NO4sL","currentValueText":"ModeSwitcherSelect-currentValueText--LfE9q","arrowIcon":"ModeSwitcherSelect-arrowIcon--n3PP2","currentValue":"ModeSwitcherSelect-currentValue--qmIjV","menuItem":"ModeSwitcherSelect-menuItem--wGmWL","firstMenuItemButton":"ModeSwitcherSelect-firstMenuItemButton--8qaFd","menuItemInner":"ModeSwitcherSelect-menuItemInner--9DSaH","menuItemIcon":"ModeSwitcherSelect-menuItemIcon--TfRCH","menuItemLabel":"ModeSwitcherSelect-menuItemLabel--0Tz-h","menuItemDescription":"ModeSwitcherSelect-menuItemDescription--nFZuS"};
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
+
const style = document.createElement('style');
|
|
5
|
+
style.type = 'text/css'
|
|
6
|
+
style.innerHTML = `.ModeSwitcherSelect-root--U-mxG{align-items:center;display:inline-flex;max-width:var(--max-width-select)}.ModeSwitcherSelect-root--U-mxG.ModeSwitcherSelect-outlined--Lzkdu{min-height:1.1876em}.ModeSwitcherSelect-root--U-mxG.ModeSwitcherSelect-normal--eJi9k{padding-bottom:9px;padding-top:9px}.ModeSwitcherSelect-root--U-mxG.ModeSwitcherSelect-thin--3ut9c{padding-bottom:6px;padding-top:6px}.ModeSwitcherSelect-select--5-O3e.ModeSwitcherSelect-Mui-disabled--Ovc-G .ModeSwitcherSelect-MuiOutlinedInput-notchedOutline--6sEd2{border-color:var(--mui-palette-text-disabled)}.ModeSwitcherSelect-select--5-O3e.ModeSwitcherSelect-Mui-disabled--Ovc-G .ModeSwitcherSelect-currentValueIcon--NO4sL,.ModeSwitcherSelect-select--5-O3e.ModeSwitcherSelect-Mui-disabled--Ovc-G .ModeSwitcherSelect-currentValueText--LfE9q{color:var(--mui-palette-text-disabled)}.ModeSwitcherSelect-outlined--Lzkdu{padding-left:var(--select-padding-left);padding-right:var(--select-padding-right)}.ModeSwitcherSelect-arrowIcon--n3PP2{color:var(--mui-palette-text-secondary);font-size:18px;right:12px;top:calc(50% - 9px)}.ModeSwitcherSelect-arrowIcon--n3PP2.ModeSwitcherSelect-thin--3ut9c{right:8px}.ModeSwitcherSelect-currentValue--qmIjV{align-items:center;display:flex}.ModeSwitcherSelect-currentValueIcon--NO4sL{color:var(--mui-palette-text-secondary);display:inline-block;font-size:18px;height:1em;margin-right:8px;width:1em}.ModeSwitcherSelect-currentValueText--LfE9q{color:var(--mui-palette-text-primary);font-size:14px;font-weight:500;line-height:16px;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.ModeSwitcherSelect-menuItem--wGmWL{padding:9px 12px 7px}.ModeSwitcherSelect-firstMenuItemButton--8qaFd{border-top:1px solid #e4e4e4}.ModeSwitcherSelect-menuItemInner--9DSaH{align-items:flex-start;display:flex}.ModeSwitcherSelect-menuItemIcon--TfRCH{color:var(--mui-palette-text-secondary);display:inline-block;font-size:18px;height:1em;margin-right:9px;width:1em}.ModeSwitcherSelect-menuItemLabel--0Tz-h{color:var(--mui-palette-text-primary);font-size:14px;font-weight:500;line-height:16px}.ModeSwitcherSelect-menuItemDescription--nFZuS{color:var(--mui-palette-text-secondary);font-size:10px;line-height:16px}`;
|
|
7
|
+
head.appendChild(style);
|
|
8
|
+
}
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ThemeProvider = void 0;
|
|
38
|
+
var react_1 = __importStar(require("react"));
|
|
39
|
+
var styles_1 = require("@mui/styles");
|
|
40
|
+
var styles_2 = require("@mui/material/styles");
|
|
41
|
+
var ThemeProvider = function (_a) {
|
|
42
|
+
var children = _a.children, theme = _a.theme;
|
|
43
|
+
var reltioTheme = (0, react_1.useMemo)(function () {
|
|
44
|
+
return (0, styles_2.experimental_extendTheme)({
|
|
45
|
+
colorSchemes: {
|
|
46
|
+
light: __assign({}, theme)
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}, [theme]);
|
|
50
|
+
return (react_1.default.createElement(styles_2.Experimental_CssVarsProvider, { theme: reltioTheme },
|
|
51
|
+
react_1.default.createElement(styles_1.ThemeProvider, { theme: theme }, children)));
|
|
52
|
+
};
|
|
53
|
+
exports.ThemeProvider = ThemeProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeProvider } from './ThemeProvider';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemeProvider = void 0;
|
|
4
|
+
var ThemeProvider_1 = require("./ThemeProvider");
|
|
5
|
+
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useCssVariableStyles } from './useCssVariableStyles';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCssVariableStyles = void 0;
|
|
4
|
+
var useCssVariableStyles_1 = require("./useCssVariableStyles");
|
|
5
|
+
Object.defineProperty(exports, "useCssVariableStyles", { enumerable: true, get: function () { return useCssVariableStyles_1.useCssVariableStyles; } });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.useCssVariableStyles = void 0;
|
|
15
|
+
var react_1 = require("react");
|
|
16
|
+
var ramda_1 = require("ramda");
|
|
17
|
+
var useCssVariableStyles = function (variables, additionalStyles) {
|
|
18
|
+
if (additionalStyles === void 0) { additionalStyles = {}; }
|
|
19
|
+
var style = (0, react_1.useMemo)(function () {
|
|
20
|
+
return Object.fromEntries(Object.entries(variables).map(function (_a) {
|
|
21
|
+
var key = _a[0], value = _a[1];
|
|
22
|
+
var verifiedValue = (0, ramda_1.isNil)(value) || value === '' ? 'initial' : value;
|
|
23
|
+
return [key, verifiedValue];
|
|
24
|
+
}));
|
|
25
|
+
}, [variables]);
|
|
26
|
+
return __assign(__assign({}, style), additionalStyles);
|
|
27
|
+
};
|
|
28
|
+
exports.useCssVariableStyles = useCssVariableStyles;
|
package/cjs/index.d.ts
CHANGED
|
@@ -226,6 +226,7 @@ export { RowCollapseContext as BasicTableRowCollapseContext } from './contexts/R
|
|
|
226
226
|
export { BasicTableContext } from './contexts/BasicTableContext';
|
|
227
227
|
export { HiddenAttributesContext } from './contexts/HiddenAttributesContext';
|
|
228
228
|
export { ProfileTablesContext } from './contexts/ProfileTablesContext';
|
|
229
|
+
export { ThemeProvider } from './contexts/ThemeProvider';
|
|
229
230
|
export { useScrollToAttributeError } from './hooks/useScrollToAttributeError';
|
|
230
231
|
export { useMatchesColumnsData } from './hooks/useMatchesColumnsData';
|
|
231
232
|
export { useActions } from './hooks/useActions';
|
package/cjs/index.js
CHANGED
|
@@ -19,8 +19,8 @@ exports.ConnectionEditor = exports.DropDownSelector = exports.ReactSelectOptionW
|
|
|
19
19
|
exports.Popper = exports.MultipleInput = exports.ModeSwitcherSelect = exports.ModeSwitcher = exports.TransitiveMatchBlock = exports.SimpleMatchRulesBuilder = exports.SimpleMatchRulesBlock = exports.SimpleMatchRules = exports.MatchRulesBlock = exports.LoadingSpinner = exports.Link = exports.LinearLoadIndicator = exports.ImportButton = exports.ReadableSearchQueryBuilder = exports.ReadableSearchQuery = exports.LogicOperator = exports.TableSkeleton = exports.StepNavigation = exports.TenantLabel = exports.RelevanceScoreBadge = exports.RequiredMark = exports.SettingsMenu = exports.TenantsDropDownSelector = exports.TenantIcon = exports.SourceSystemsSelector = exports.MatchRulesSelector = exports.MultiValueSelector = exports.ProfilesList = exports.NotMatchButton = exports.MergeButton = exports.ProfileMatchCard = exports.ImageGalleryDialog = exports.RelationTypesSelector = exports.ScreenProfileBand = exports.ProfileBandNavigation = exports.EmptyStub = exports.MaskingSwitcher = exports.FileTypeEditor = exports.EmptySearchResult = exports.DropDownEditor = exports.FilterValueEditor = exports.MultiValueChip = exports.TextEditor = exports.DateRangeEditor = exports.NumberEditor = exports.DataTypeValueEditor = exports.DateEditor = exports.ErrorWrapper = exports.ErrorMessage = exports.ConfigureColumnsPopup = void 0;
|
|
20
20
|
exports.HistoryDiffContext = exports.AsyncMountContext = exports.MdmModuleProvider = exports.withTableContext = exports.withFilterAtBottom = exports.withPercents = exports.withContext = exports.withDateRangeSelector = exports.withDragHandle = exports.withAsyncMount = exports.withTooltip = exports.MetadataTypesSelector = exports.DateRangeSelector = exports.UpSetChart = exports.GaugeChart = exports.RelationEditor = exports.ReltioMap = exports.Marginator = exports.LightArrowTooltip = exports.ScrollableTabs = exports.VirtualGroupedList = exports.ViewMoreToggle = exports.VerticalHeadingsTable = exports.VerticalDivider = exports.AttributeTitle = exports.Spacer = exports.SimpleDropDownSelector = exports.SidePanelContentHeader = exports.SidePanel = exports.SidePanelEmptyState = exports.SideButtonsPanel = exports.SelectorWithOnlyOptionAutoSelect = exports.SelectionPopup = exports.WhiteSearchInput = exports.SearchInput = exports.ProfileResizablePanes = exports.ResizablePanes = exports.ReltioGridLayout = exports.RCTreeSwitchRenderer = exports.RCTreeLevelLines = exports.RCTree = exports.reactSortableTreeHelpers = exports.ReactSortableTree = exports.MultiSelect = exports.QueryBuilderRowsGroup = exports.QueryBuilderRow = exports.ProfileCard = exports.ProfileBand = exports.PotentialMatchReviewCard = exports.PopupWithArrow = void 0;
|
|
21
21
|
exports.ReloadDataProvider = exports.useAttributeValueConfigPermissions = exports.ConfigPermissionsContextProvider = exports.ConfigPermissionsContext = exports.useActionsHook = exports.ActionsHookProvider = exports.PageRequestsAbortingContext = exports.DependentLookupAutopopulationContext = exports.FeaturesContext = exports.LabelsContext = exports.UrlGeneratorsContext = exports.isHighlightedAttributeType = exports.isHighlightedErrorType = exports.ScrollType = exports.ScrollToElementProvider = exports.ScrollToElementContext = exports.SearchValueContext = exports.InterceptHandlersContext = exports.HighlightedValuesContext = exports.SnackbarContext = exports.SearchFiltersContext = exports.useReloadFacet = exports.ReloadFacetProvider = exports.useReloadAllFacets = exports.SandboxAPIContext = exports.EntityContext = exports.RelatedObjectUrisContext = exports.WorkflowTasksContext = exports.useEntityLoadingIndication = exports.EntityLoadingIndicationProvider = exports.EntityMarkerContext = exports.useAttributeExpanded = exports.ExpandedAttributesProvider = exports.useHighlightedCrosswalks = exports.useCrosswalkHighlight = exports.useCrosswalkFocus = exports.useCrosswalkColor = exports.CrosswalksDisplayProvider = exports.EntitiesMapContext = exports.IdContext = exports.ProfilePerspectiveViewContext = exports.usePerspectivesSettings = exports.PerspectivesSettingsContext = exports.PivotingAttributeContext = exports.UsersContext = exports.InitialCollaborationContextValue = exports.CollaborationContextProvider = exports.CollaborationContext = exports.BlockImageGalleryDialogContext = exports.PopupBoundariesContext = void 0;
|
|
22
|
-
exports.
|
|
23
|
-
exports.mockComputedStyles = exports.FakeMouseEvent = exports.rerenderWrapper = exports.mockElementSizes = exports.fixClicksOnResizablePanes = exports.mockBasicTableSizing = exports.getMuiIconsByName = exports.getMuiIconByName = exports.deepFreeze = exports.awaitMockPromises = exports.TestStylesProvider = exports.TestPerspectivesSettingsProvider = exports.getAttributeSelectorItems = exports.mergeClasses = exports.isControlOrCommandPressed = exports.getValue = exports.getChecked = exports.showErrorMessage = exports.showDefaultErrorMessage = exports.enrichDataWithPercents = exports.defaultRenderRowCell = exports.defaultGetRowCellHeight = exports.columnFilterToMdmFilter = exports.buildColumnsSizeById = exports.buildColumnsFilter = exports.useDndBasicTableScrollModifier = exports.useDynamicYAxisWidth = exports.useFilterAutoFocus = exports.useSegmentationRequest = exports.resolveMarkers = void 0;
|
|
22
|
+
exports.useMaskedAttribute = exports.useKeyboardNavigation = exports.useDynamicRowCellHeight = exports.useClickableStyle = exports.BasicTableCellRenderer = exports.useBasicTableCellRenderer = exports.useHiddenAttributes = exports.useSavedSearchesRequest = exports.useRequestDCRReview = exports.useAutoFocus = exports.useExpandInvalidRelations = exports.useLayoutResetter = exports.useIsMountedRef = exports.useSnackbar = exports.useSavedStateForEntityType = exports.useReadableSearchState = exports.useEditableConnection = exports.useCustomScripts = exports.useMarkAsNotMatchRequest = exports.useMergeAllRequest = exports.usePagingSimulator = exports.useMatchesLoader = exports.useConfigPermissions = exports.useWhyDidYouUpdate = exports.useUsers = exports.useSavedState = exports.useSafePromise = exports.useRunOnceAfterValueInitialization = exports.useRelationsLoader = exports.useRelationTypeSelector = exports.usePrevious = exports.useDidUpdateEffect = exports.useCommentsEntitiesMap = exports.useCollaboration = exports.useAsyncMount = exports.useAPI = exports.useActions = exports.useMatchesColumnsData = exports.useScrollToAttributeError = exports.ThemeProvider = exports.ProfileTablesContext = exports.HiddenAttributesContext = exports.BasicTableContext = exports.BasicTableRowCollapseContext = exports.useDeleteUnmaskedAttributeForRelation = exports.useUnmaskedAttributeValue = exports.useUnmaskAttributeValue = exports.useMaskAttributeValue = exports.MaskedAttributesProvider = exports.useReloadData = void 0;
|
|
23
|
+
exports.mockComputedStyles = exports.FakeMouseEvent = exports.rerenderWrapper = exports.mockElementSizes = exports.fixClicksOnResizablePanes = exports.mockBasicTableSizing = exports.getMuiIconsByName = exports.getMuiIconByName = exports.deepFreeze = exports.awaitMockPromises = exports.TestStylesProvider = exports.TestPerspectivesSettingsProvider = exports.getAttributeSelectorItems = exports.mergeClasses = exports.isControlOrCommandPressed = exports.getValue = exports.getChecked = exports.showErrorMessage = exports.showDefaultErrorMessage = exports.enrichDataWithPercents = exports.defaultRenderRowCell = exports.defaultGetRowCellHeight = exports.columnFilterToMdmFilter = exports.buildColumnsSizeById = exports.buildColumnsFilter = exports.useDndBasicTableScrollModifier = exports.useDynamicYAxisWidth = exports.useFilterAutoFocus = exports.useSegmentationRequest = exports.resolveMarkers = exports.useMarkers = void 0;
|
|
24
24
|
// components
|
|
25
25
|
var ActionButton_1 = require("./ActionButton");
|
|
26
26
|
Object.defineProperty(exports, "ActionButton", { enumerable: true, get: function () { return ActionButton_1.ActionButton; } });
|
|
@@ -512,6 +512,8 @@ var HiddenAttributesContext_1 = require("./contexts/HiddenAttributesContext");
|
|
|
512
512
|
Object.defineProperty(exports, "HiddenAttributesContext", { enumerable: true, get: function () { return HiddenAttributesContext_1.HiddenAttributesContext; } });
|
|
513
513
|
var ProfileTablesContext_1 = require("./contexts/ProfileTablesContext");
|
|
514
514
|
Object.defineProperty(exports, "ProfileTablesContext", { enumerable: true, get: function () { return ProfileTablesContext_1.ProfileTablesContext; } });
|
|
515
|
+
var ThemeProvider_1 = require("./contexts/ThemeProvider");
|
|
516
|
+
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
515
517
|
// hooks
|
|
516
518
|
var useScrollToAttributeError_1 = require("./hooks/useScrollToAttributeError");
|
|
517
519
|
Object.defineProperty(exports, "useScrollToAttributeError", { enumerable: true, get: function () { return useScrollToAttributeError_1.useScrollToAttributeError; } });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React, { useMemo } from 'react';
|
|
13
|
+
import { ThemeProvider as MuiThemeProvider } from '@mui/styles';
|
|
14
|
+
import { experimental_extendTheme as extendTheme, Experimental_CssVarsProvider as CssVarsProvider } from '@mui/material/styles';
|
|
15
|
+
export var ThemeProvider = function (_a) {
|
|
16
|
+
var children = _a.children, theme = _a.theme;
|
|
17
|
+
var reltioTheme = useMemo(function () {
|
|
18
|
+
return extendTheme({
|
|
19
|
+
colorSchemes: {
|
|
20
|
+
light: __assign({}, theme)
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}, [theme]);
|
|
24
|
+
return (React.createElement(CssVarsProvider, { theme: reltioTheme },
|
|
25
|
+
React.createElement(MuiThemeProvider, { theme: theme }, children)));
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeProvider } from './ThemeProvider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeProvider } from './ThemeProvider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useCssVariableStyles } from './useCssVariableStyles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useCssVariableStyles } from './useCssVariableStyles';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { useMemo } from 'react';
|
|
13
|
+
import { isNil } from 'ramda';
|
|
14
|
+
export var useCssVariableStyles = function (variables, additionalStyles) {
|
|
15
|
+
if (additionalStyles === void 0) { additionalStyles = {}; }
|
|
16
|
+
var style = useMemo(function () {
|
|
17
|
+
return Object.fromEntries(Object.entries(variables).map(function (_a) {
|
|
18
|
+
var key = _a[0], value = _a[1];
|
|
19
|
+
var verifiedValue = isNil(value) || value === '' ? 'initial' : value;
|
|
20
|
+
return [key, verifiedValue];
|
|
21
|
+
}));
|
|
22
|
+
}, [variables]);
|
|
23
|
+
return __assign(__assign({}, style), additionalStyles);
|
|
24
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -226,6 +226,7 @@ export { RowCollapseContext as BasicTableRowCollapseContext } from './contexts/R
|
|
|
226
226
|
export { BasicTableContext } from './contexts/BasicTableContext';
|
|
227
227
|
export { HiddenAttributesContext } from './contexts/HiddenAttributesContext';
|
|
228
228
|
export { ProfileTablesContext } from './contexts/ProfileTablesContext';
|
|
229
|
+
export { ThemeProvider } from './contexts/ThemeProvider';
|
|
229
230
|
export { useScrollToAttributeError } from './hooks/useScrollToAttributeError';
|
|
230
231
|
export { useMatchesColumnsData } from './hooks/useMatchesColumnsData';
|
|
231
232
|
export { useActions } from './hooks/useActions';
|
package/index.js
CHANGED
|
@@ -229,6 +229,7 @@ export { RowCollapseContext as BasicTableRowCollapseContext } from './contexts/R
|
|
|
229
229
|
export { BasicTableContext } from './contexts/BasicTableContext';
|
|
230
230
|
export { HiddenAttributesContext } from './contexts/HiddenAttributesContext';
|
|
231
231
|
export { ProfileTablesContext } from './contexts/ProfileTablesContext';
|
|
232
|
+
export { ThemeProvider } from './contexts/ThemeProvider';
|
|
232
233
|
// hooks
|
|
233
234
|
export { useScrollToAttributeError } from './hooks/useScrollToAttributeError';
|
|
234
235
|
export { useMatchesColumnsData } from './hooks/useMatchesColumnsData';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2038",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.1903",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"normal" | "thin" | "select" | "root" | "menuItem" | "outlined" | "currentValue" | "arrowIcon" | "currentValueIcon" | "currentValueText" | "firstMenuItemButton" | "menuItemInner" | "menuItemIcon" | "menuItemLabel" | "menuItemDescription">;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { makeStyles } from '@mui/styles';
|
|
2
|
-
var MAX_WIDTH_SELECT = 200;
|
|
3
|
-
var SELECT_PADDING_RIGHT = 32;
|
|
4
|
-
var SELECT_PADDING_LEFT = 12;
|
|
5
|
-
var CALCULATED_MAX_WIDTH_SELECT = MAX_WIDTH_SELECT - SELECT_PADDING_LEFT - SELECT_PADDING_RIGHT;
|
|
6
|
-
export var useStyles = makeStyles(function (theme) { return ({
|
|
7
|
-
normal: {},
|
|
8
|
-
thin: {},
|
|
9
|
-
root: {
|
|
10
|
-
display: 'inline-flex',
|
|
11
|
-
alignItems: 'center',
|
|
12
|
-
maxWidth: CALCULATED_MAX_WIDTH_SELECT,
|
|
13
|
-
'&$outlined': {
|
|
14
|
-
minHeight: '1.1876em'
|
|
15
|
-
},
|
|
16
|
-
'&$normal': {
|
|
17
|
-
paddingTop: '9px',
|
|
18
|
-
paddingBottom: '9px'
|
|
19
|
-
},
|
|
20
|
-
'&$thin': {
|
|
21
|
-
paddingTop: '6px',
|
|
22
|
-
paddingBottom: '6px'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
select: {
|
|
26
|
-
'&.Mui-disabled': {
|
|
27
|
-
'& .MuiOutlinedInput-notchedOutline': {
|
|
28
|
-
borderColor: theme.palette.text.disabled
|
|
29
|
-
},
|
|
30
|
-
'& $currentValueIcon, & $currentValueText': {
|
|
31
|
-
color: theme.palette.text.disabled
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
outlined: {
|
|
36
|
-
paddingRight: SELECT_PADDING_RIGHT,
|
|
37
|
-
paddingLeft: SELECT_PADDING_LEFT
|
|
38
|
-
},
|
|
39
|
-
arrowIcon: {
|
|
40
|
-
fontSize: '18px',
|
|
41
|
-
top: 'calc(50% - 9px)',
|
|
42
|
-
right: '12px',
|
|
43
|
-
color: theme.palette.text.secondary,
|
|
44
|
-
'&$thin': {
|
|
45
|
-
right: '8px'
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
currentValue: {
|
|
49
|
-
display: 'flex',
|
|
50
|
-
alignItems: 'center'
|
|
51
|
-
},
|
|
52
|
-
currentValueIcon: {
|
|
53
|
-
width: '1em',
|
|
54
|
-
height: '1em',
|
|
55
|
-
display: 'inline-block',
|
|
56
|
-
fontSize: '18px',
|
|
57
|
-
marginRight: '8px',
|
|
58
|
-
color: theme.palette.text.secondary
|
|
59
|
-
},
|
|
60
|
-
currentValueText: {
|
|
61
|
-
fontSize: '14px',
|
|
62
|
-
lineHeight: '16px',
|
|
63
|
-
textTransform: 'uppercase',
|
|
64
|
-
fontWeight: 500,
|
|
65
|
-
color: theme.palette.text.primary,
|
|
66
|
-
whiteSpace: 'nowrap',
|
|
67
|
-
textOverflow: 'ellipsis',
|
|
68
|
-
overflow: 'hidden'
|
|
69
|
-
},
|
|
70
|
-
menuItem: {
|
|
71
|
-
padding: '9px 12px 7px'
|
|
72
|
-
},
|
|
73
|
-
firstMenuItemButton: {
|
|
74
|
-
borderTop: '1px solid #e4e4e4'
|
|
75
|
-
},
|
|
76
|
-
menuItemInner: {
|
|
77
|
-
display: 'flex',
|
|
78
|
-
alignItems: 'flex-start'
|
|
79
|
-
},
|
|
80
|
-
menuItemIcon: {
|
|
81
|
-
width: '1em',
|
|
82
|
-
height: '1em',
|
|
83
|
-
display: 'inline-block',
|
|
84
|
-
fontSize: '18px',
|
|
85
|
-
color: theme.palette.text.secondary,
|
|
86
|
-
marginRight: '9px'
|
|
87
|
-
},
|
|
88
|
-
menuItemLabel: {
|
|
89
|
-
fontSize: '14px',
|
|
90
|
-
lineHeight: '16px',
|
|
91
|
-
fontWeight: 500,
|
|
92
|
-
color: theme.palette.text.primary
|
|
93
|
-
},
|
|
94
|
-
menuItemDescription: {
|
|
95
|
-
fontSize: '10px',
|
|
96
|
-
lineHeight: '16px',
|
|
97
|
-
color: theme.palette.text.secondary
|
|
98
|
-
}
|
|
99
|
-
}); });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"normal" | "thin" | "select" | "root" | "menuItem" | "outlined" | "currentValue" | "arrowIcon" | "currentValueIcon" | "currentValueText" | "firstMenuItemButton" | "menuItemInner" | "menuItemIcon" | "menuItemLabel" | "menuItemDescription">;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useStyles = void 0;
|
|
4
|
-
var styles_1 = require("@mui/styles");
|
|
5
|
-
var MAX_WIDTH_SELECT = 200;
|
|
6
|
-
var SELECT_PADDING_RIGHT = 32;
|
|
7
|
-
var SELECT_PADDING_LEFT = 12;
|
|
8
|
-
var CALCULATED_MAX_WIDTH_SELECT = MAX_WIDTH_SELECT - SELECT_PADDING_LEFT - SELECT_PADDING_RIGHT;
|
|
9
|
-
exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
10
|
-
normal: {},
|
|
11
|
-
thin: {},
|
|
12
|
-
root: {
|
|
13
|
-
display: 'inline-flex',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
maxWidth: CALCULATED_MAX_WIDTH_SELECT,
|
|
16
|
-
'&$outlined': {
|
|
17
|
-
minHeight: '1.1876em'
|
|
18
|
-
},
|
|
19
|
-
'&$normal': {
|
|
20
|
-
paddingTop: '9px',
|
|
21
|
-
paddingBottom: '9px'
|
|
22
|
-
},
|
|
23
|
-
'&$thin': {
|
|
24
|
-
paddingTop: '6px',
|
|
25
|
-
paddingBottom: '6px'
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
select: {
|
|
29
|
-
'&.Mui-disabled': {
|
|
30
|
-
'& .MuiOutlinedInput-notchedOutline': {
|
|
31
|
-
borderColor: theme.palette.text.disabled
|
|
32
|
-
},
|
|
33
|
-
'& $currentValueIcon, & $currentValueText': {
|
|
34
|
-
color: theme.palette.text.disabled
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
outlined: {
|
|
39
|
-
paddingRight: SELECT_PADDING_RIGHT,
|
|
40
|
-
paddingLeft: SELECT_PADDING_LEFT
|
|
41
|
-
},
|
|
42
|
-
arrowIcon: {
|
|
43
|
-
fontSize: '18px',
|
|
44
|
-
top: 'calc(50% - 9px)',
|
|
45
|
-
right: '12px',
|
|
46
|
-
color: theme.palette.text.secondary,
|
|
47
|
-
'&$thin': {
|
|
48
|
-
right: '8px'
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
currentValue: {
|
|
52
|
-
display: 'flex',
|
|
53
|
-
alignItems: 'center'
|
|
54
|
-
},
|
|
55
|
-
currentValueIcon: {
|
|
56
|
-
width: '1em',
|
|
57
|
-
height: '1em',
|
|
58
|
-
display: 'inline-block',
|
|
59
|
-
fontSize: '18px',
|
|
60
|
-
marginRight: '8px',
|
|
61
|
-
color: theme.palette.text.secondary
|
|
62
|
-
},
|
|
63
|
-
currentValueText: {
|
|
64
|
-
fontSize: '14px',
|
|
65
|
-
lineHeight: '16px',
|
|
66
|
-
textTransform: 'uppercase',
|
|
67
|
-
fontWeight: 500,
|
|
68
|
-
color: theme.palette.text.primary,
|
|
69
|
-
whiteSpace: 'nowrap',
|
|
70
|
-
textOverflow: 'ellipsis',
|
|
71
|
-
overflow: 'hidden'
|
|
72
|
-
},
|
|
73
|
-
menuItem: {
|
|
74
|
-
padding: '9px 12px 7px'
|
|
75
|
-
},
|
|
76
|
-
firstMenuItemButton: {
|
|
77
|
-
borderTop: '1px solid #e4e4e4'
|
|
78
|
-
},
|
|
79
|
-
menuItemInner: {
|
|
80
|
-
display: 'flex',
|
|
81
|
-
alignItems: 'flex-start'
|
|
82
|
-
},
|
|
83
|
-
menuItemIcon: {
|
|
84
|
-
width: '1em',
|
|
85
|
-
height: '1em',
|
|
86
|
-
display: 'inline-block',
|
|
87
|
-
fontSize: '18px',
|
|
88
|
-
color: theme.palette.text.secondary,
|
|
89
|
-
marginRight: '9px'
|
|
90
|
-
},
|
|
91
|
-
menuItemLabel: {
|
|
92
|
-
fontSize: '14px',
|
|
93
|
-
lineHeight: '16px',
|
|
94
|
-
fontWeight: 500,
|
|
95
|
-
color: theme.palette.text.primary
|
|
96
|
-
},
|
|
97
|
-
menuItemDescription: {
|
|
98
|
-
fontSize: '10px',
|
|
99
|
-
lineHeight: '16px',
|
|
100
|
-
color: theme.palette.text.secondary
|
|
101
|
-
}
|
|
102
|
-
}); });
|