@astral/ui 4.101.0 → 4.103.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/components/Alert/styles.js +12 -2
- package/components/Autocomplete/styles.js +5 -2
- package/components/Breadcrumbs/styles.js +18 -13
- package/components/CheckableTag/styles.js +6 -3
- package/components/Checkbox/styles.js +10 -7
- package/components/Chip/styles.js +11 -6
- package/components/CodeField/styles.js +5 -2
- package/components/CopyTypography/styles.js +19 -5
- package/components/DashboardLayout/Header/styles.js +5 -2
- package/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +5 -2
- package/components/DataGrid/Row/styles.js +14 -19
- package/components/DataGrid/RowBase/styles.js +10 -17
- package/components/DataGridCollapsibleRow/styles.js +5 -2
- package/components/Description/Value/styles.js +5 -2
- package/components/Dialog/Dialog.d.ts +1 -1
- package/components/Dialog/Dialog.js +5 -4
- package/components/Dialog/styles.js +8 -0
- package/components/Dialog/types.d.ts +5 -0
- package/components/Dialog/useLogic/useLogic.d.ts +3 -3
- package/components/Dialog/useLogic/useLogic.js +6 -2
- package/components/ExpansionPanel/Summary/styles.js +5 -2
- package/components/Fab/styles.js +12 -3
- package/components/HintPopover/styles.js +2 -1
- package/components/InfiniteDataList/styles.js +5 -2
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +5 -2
- package/components/InputGroup/styles.js +8 -5
- package/components/JsonViewer/JsonNode/styles.js +5 -2
- package/components/Link/styles.js +11 -6
- package/components/ListItem/styles.js +5 -2
- package/components/MenuOrganization/OrganizationButton/styles.js +5 -6
- package/components/NavMenu/Item/ItemButton/styles.js +14 -7
- package/components/NewPopover/NewPopover.js +1 -0
- package/components/NewPopover/constants.d.ts +5 -0
- package/components/NewPopover/constants.js +6 -1
- package/components/NewPopover/styles.js +2 -1
- package/components/NewPopover/types.d.ts +1 -1
- package/components/NewPopover/useLogic/useLogic.d.ts +2 -2
- package/components/NewPopover/useLogic/useLogic.js +12 -12
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.d.ts +7 -0
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.js +19 -0
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/index.d.ts +1 -0
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/index.js +1 -0
- package/components/NewPopover/useLogic/utils/index.d.ts +4 -0
- package/components/NewPopover/useLogic/utils/index.js +4 -0
- package/components/NewStepper/Step/styles.js +18 -15
- package/components/Notification/NotificationStackContainer/styles.js +5 -2
- package/components/Onboarding/types/step.d.ts +1 -1
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +1 -1
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +1 -1
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/constants.d.ts +6 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/constants.js +6 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +34 -12
- package/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +5 -6
- package/components/PageHeader/MobilePageActions/styles.js +0 -4
- package/components/Radio/styles.js +7 -4
- package/components/RadioCard/styles.js +5 -2
- package/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
- package/components/Tabs/Tab/styles.js +5 -2
- package/components/ToggleButton/styles.js +25 -10
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
- package/components/Tree/TreeItem/styles.js +23 -10
- package/components/constants/index.d.ts +1 -0
- package/components/constants/index.js +1 -0
- package/components/constants/media.d.ts +8 -0
- package/components/constants/media.js +8 -0
- package/components/theme/components/MuiButton.js +46 -23
- package/components/theme/components/MuiListItemButton.js +10 -2
- package/components/theme/components/MuiMenuItem.js +5 -2
- package/components/theme/components/MuiOutlinedInput.js +15 -12
- package/components/theme/components/MuiSwitch.js +14 -9
- package/components/theme/components/MuiTableRow.js +11 -3
- package/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +1 -0
- package/node/components/Alert/styles.js +24 -14
- package/node/components/Autocomplete/styles.js +8 -5
- package/node/components/Breadcrumbs/styles.js +18 -13
- package/node/components/CheckableTag/styles.js +6 -3
- package/node/components/Checkbox/styles.js +26 -23
- package/node/components/Chip/styles.js +36 -31
- package/node/components/CodeField/styles.js +5 -2
- package/node/components/CopyTypography/styles.js +22 -8
- package/node/components/DashboardLayout/Header/styles.js +35 -32
- package/node/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +7 -4
- package/node/components/DataGrid/Row/styles.js +41 -46
- package/node/components/DataGrid/RowBase/styles.js +16 -23
- package/node/components/DataGridCollapsibleRow/styles.js +11 -8
- package/node/components/Description/Value/styles.js +5 -2
- package/node/components/Dialog/Dialog.d.ts +1 -1
- package/node/components/Dialog/Dialog.js +5 -4
- package/node/components/Dialog/styles.js +8 -0
- package/node/components/Dialog/types.d.ts +5 -0
- package/node/components/Dialog/useLogic/useLogic.d.ts +3 -3
- package/node/components/Dialog/useLogic/useLogic.js +6 -2
- package/node/components/ExpansionPanel/Summary/styles.js +5 -2
- package/node/components/Fab/styles.js +12 -3
- package/node/components/HintPopover/styles.js +2 -1
- package/node/components/InfiniteDataList/styles.js +7 -4
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +11 -8
- package/node/components/InputGroup/styles.js +8 -5
- package/node/components/JsonViewer/JsonNode/styles.js +5 -2
- package/node/components/Link/styles.js +13 -8
- package/node/components/ListItem/styles.js +10 -7
- package/node/components/MenuOrganization/OrganizationButton/styles.js +5 -6
- package/node/components/NavMenu/Item/ItemButton/styles.js +16 -9
- package/node/components/NewPopover/NewPopover.js +1 -0
- package/node/components/NewPopover/constants.d.ts +5 -0
- package/node/components/NewPopover/constants.js +7 -2
- package/node/components/NewPopover/styles.js +1 -0
- package/node/components/NewPopover/types.d.ts +1 -1
- package/node/components/NewPopover/useLogic/useLogic.d.ts +2 -2
- package/node/components/NewPopover/useLogic/useLogic.js +15 -15
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.d.ts +7 -0
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.js +23 -0
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/index.d.ts +1 -0
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/index.js +17 -0
- package/node/components/NewPopover/useLogic/utils/index.d.ts +4 -0
- package/node/components/NewPopover/useLogic/utils/index.js +20 -0
- package/node/components/NewStepper/Step/styles.js +68 -65
- package/node/components/Notification/NotificationStackContainer/styles.js +57 -54
- package/node/components/Onboarding/types/step.d.ts +1 -1
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +1 -1
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +1 -1
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/constants.d.ts +6 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/constants.js +9 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +34 -12
- package/node/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +12 -13
- package/node/components/PageHeader/MobilePageActions/styles.js +0 -4
- package/node/components/Radio/styles.js +20 -17
- package/node/components/RadioCard/styles.js +7 -4
- package/node/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
- package/node/components/Tabs/Tab/styles.js +5 -2
- package/node/components/ToggleButton/styles.js +27 -12
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
- package/node/components/Tree/TreeItem/styles.js +44 -31
- package/node/components/constants/index.d.ts +1 -0
- package/node/components/constants/index.js +1 -0
- package/node/components/constants/media.d.ts +8 -0
- package/node/components/constants/media.js +11 -0
- package/node/components/theme/components/MuiButton.js +46 -23
- package/node/components/theme/components/MuiListItemButton.js +10 -2
- package/node/components/theme/components/MuiMenuItem.js +5 -2
- package/node/components/theme/components/MuiOutlinedInput.js +15 -12
- package/node/components/theme/components/MuiSwitch.js +14 -9
- package/node/components/theme/components/MuiTableRow.js +11 -3
- package/node/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StepPopover: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../../../NewPopover").NewPopoverProps, "title" | "
|
|
2
|
+
export declare const StepPopover: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../../../NewPopover").NewPopoverProps, "title" | "disableMobileDrawer" | "hasArrow"> & {
|
|
3
3
|
variant?: import("../../../../../HintPopover").HintPopoverVariant | undefined;
|
|
4
4
|
title?: import("react").ReactNode;
|
|
5
5
|
action?: import("react").ReactNode;
|
|
@@ -10,6 +10,6 @@ const styles_1 = require("./styles");
|
|
|
10
10
|
*/
|
|
11
11
|
const StandaloneStep = ({ activeStep, isClosing, }) => {
|
|
12
12
|
const { step, isConfirming, requestClose } = activeStep;
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.StepDialog, { open: !isConfirming && !isClosing, title: step.title, onClose: requestClose, size: step.dialogSize, disableAutoFocus: true, children: [(0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { children: step.content }), (0, jsx_runtime_1.jsx)(styles_1.Footer, { children: (0, jsx_runtime_1.jsx)(StepFooter_1.StepFooter, { activeStep: activeStep }) })] }));
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.StepDialog, { open: !isConfirming && !isClosing, title: step.title, onClose: requestClose, size: step.dialogSize, disableAutoFocus: true, disableMobileDrawer: true, children: [(0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { children: step.content }), (0, jsx_runtime_1.jsx)(styles_1.Footer, { children: (0, jsx_runtime_1.jsx)(StepFooter_1.StepFooter, { activeStep: activeStep }) })] }));
|
|
14
14
|
};
|
|
15
15
|
exports.StandaloneStep = StandaloneStep;
|
|
@@ -4,6 +4,7 @@ export declare const StepDialog: import("@emotion/styled/dist/declarations/src/t
|
|
|
4
4
|
disableBackdropClick?: boolean | undefined;
|
|
5
5
|
size?: import("../../../../../Dialog").DialogSize | undefined;
|
|
6
6
|
headerContent?: import("react").ReactNode;
|
|
7
|
+
disableMobileDrawer?: boolean | undefined;
|
|
7
8
|
} & {
|
|
8
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
10
|
}, {}, {}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Сколько миллисекунд без изменений области считать покоем и останавливать
|
|
3
|
+
* отслеживание по кадрам. Перекрывает длительность анимаций MUI, чтобы
|
|
4
|
+
* отслеживание не выключилось в паузе перед стартом анимации.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TRACKING_IDLE_TIMEOUT_MS = 300;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRACKING_IDLE_TIMEOUT_MS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Сколько миллисекунд без изменений области считать покоем и останавливать
|
|
6
|
+
* отслеживание по кадрам. Перекрывает длительность анимаций MUI, чтобы
|
|
7
|
+
* отслеживание не выключилось в паузе перед стартом анимации.
|
|
8
|
+
*/
|
|
9
|
+
exports.TRACKING_IDLE_TIMEOUT_MS = 300;
|
|
@@ -4,6 +4,7 @@ exports.useTrackedRect = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const geometry_1 = require("../../../utils/geometry");
|
|
6
6
|
const getScrollParents_1 = require("../../../utils/getScrollParents");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
7
8
|
/**
|
|
8
9
|
* Отслеживает область элемента для hole overlay и якоря popover.
|
|
9
10
|
*/
|
|
@@ -14,32 +15,53 @@ const useTrackedRect = (element) => {
|
|
|
14
15
|
setRect(null);
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
|
-
// ID
|
|
18
|
+
// ID кадра активного отслеживания, 0 — отслеживание остановлено.
|
|
18
19
|
let frame = 0;
|
|
20
|
+
let lastChangeTime = 0;
|
|
21
|
+
let lastRect = null;
|
|
19
22
|
const scrollParents = (0, getScrollParents_1.getScrollParents)(element);
|
|
20
23
|
const update = () => {
|
|
21
24
|
const elementRect = (0, geometry_1.rectFromDomRect)(element.getBoundingClientRect());
|
|
22
25
|
const viewport = (0, geometry_1.getViewport)();
|
|
23
26
|
const next = (0, geometry_1.clampToScrollParents)(elementRect, scrollParents.map((parent) => (0, geometry_1.rectFromDomRect)(parent.getBoundingClientRect())), viewport);
|
|
24
|
-
|
|
27
|
+
if ((0, geometry_1.isSameRect)(lastRect, next)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
lastRect = next;
|
|
31
|
+
setRect(next);
|
|
32
|
+
return true;
|
|
25
33
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
const track = () => {
|
|
35
|
+
if (update()) {
|
|
36
|
+
lastChangeTime = performance.now();
|
|
37
|
+
}
|
|
38
|
+
if (performance.now() - lastChangeTime >= constants_1.TRACKING_IDLE_TIMEOUT_MS) {
|
|
39
|
+
frame = 0;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
frame = requestAnimationFrame(track);
|
|
43
|
+
};
|
|
44
|
+
// Продлевает отслеживание, а если оно уже остановилось — запускает заново.
|
|
45
|
+
const scheduleTracking = () => {
|
|
46
|
+
lastChangeTime = performance.now();
|
|
47
|
+
if (!frame) {
|
|
48
|
+
frame = requestAnimationFrame(track);
|
|
49
|
+
}
|
|
29
50
|
};
|
|
30
51
|
update();
|
|
52
|
+
scheduleTracking();
|
|
31
53
|
const scrollOptions = { passive: true };
|
|
32
|
-
scrollParents.forEach((parent) => parent.addEventListener('scroll',
|
|
33
|
-
window.addEventListener('scroll',
|
|
34
|
-
window.addEventListener('resize',
|
|
35
|
-
const resizeObserver = new ResizeObserver(
|
|
54
|
+
scrollParents.forEach((parent) => parent.addEventListener('scroll', scheduleTracking, scrollOptions));
|
|
55
|
+
window.addEventListener('scroll', scheduleTracking, scrollOptions);
|
|
56
|
+
window.addEventListener('resize', scheduleTracking);
|
|
57
|
+
const resizeObserver = new ResizeObserver(scheduleTracking);
|
|
36
58
|
resizeObserver.observe(element);
|
|
37
59
|
return () => {
|
|
38
60
|
cancelAnimationFrame(frame);
|
|
39
61
|
resizeObserver.disconnect();
|
|
40
|
-
scrollParents.forEach((parent) => parent.removeEventListener('scroll',
|
|
41
|
-
window.removeEventListener('scroll',
|
|
42
|
-
window.removeEventListener('resize',
|
|
62
|
+
scrollParents.forEach((parent) => parent.removeEventListener('scroll', scheduleTracking, scrollOptions));
|
|
63
|
+
window.removeEventListener('scroll', scheduleTracking, scrollOptions);
|
|
64
|
+
window.removeEventListener('resize', scheduleTracking);
|
|
43
65
|
};
|
|
44
66
|
}, [element]);
|
|
45
67
|
return rect;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IconWrapper = exports.Wrapper = void 0;
|
|
4
|
-
const constants_1 = require("../../
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
const constants_2 = require("../../SvgIcon/constants");
|
|
5
6
|
const styled_1 = require("../../styled");
|
|
6
|
-
const
|
|
7
|
+
const constants_3 = require("./constants");
|
|
7
8
|
exports.Wrapper = styled_1.styled.li `
|
|
8
9
|
cursor: pointer;
|
|
9
10
|
|
|
10
11
|
height: 44px;
|
|
11
12
|
|
|
12
|
-
& .${
|
|
13
|
+
& .${constants_3.pageAsideNavigationItemClassnames.root} {
|
|
13
14
|
cursor: pointer;
|
|
14
15
|
|
|
15
16
|
position: relative;
|
|
@@ -36,8 +37,10 @@ exports.Wrapper = styled_1.styled.li `
|
|
|
36
37
|
color: ${({ theme }) => theme.palette.grey[800]};
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
${constants_1.HOVER_MEDIA} {
|
|
41
|
+
&:hover {
|
|
42
|
+
color: ${({ theme }) => theme.palette.primary[800]};
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
&:active {
|
|
@@ -45,7 +48,7 @@ exports.Wrapper = styled_1.styled.li `
|
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
& .${
|
|
51
|
+
& .${constants_3.pageAsideNavigationItemClassnames.isActive} {
|
|
49
52
|
background-color: ${({ theme }) => theme.palette.primary[100]};
|
|
50
53
|
|
|
51
54
|
&::before {
|
|
@@ -65,7 +68,7 @@ exports.Wrapper = styled_1.styled.li `
|
|
|
65
68
|
height: 40px;
|
|
66
69
|
-webkit-tap-highlight-color: transparent;
|
|
67
70
|
|
|
68
|
-
& .${
|
|
71
|
+
& .${constants_3.pageAsideNavigationItemClassnames.root} {
|
|
69
72
|
box-sizing: border-box;
|
|
70
73
|
height: inherit;
|
|
71
74
|
padding: ${({ theme }) => theme.microSpacing(5, 6)};
|
|
@@ -76,10 +79,6 @@ exports.Wrapper = styled_1.styled.li `
|
|
|
76
79
|
transition: ${({ theme }) => theme.transitions.create(['border-color', 'background-color'], {
|
|
77
80
|
duration: theme.transitions.duration.shortest,
|
|
78
81
|
})};
|
|
79
|
-
|
|
80
|
-
&:hover {
|
|
81
|
-
color: ${({ theme }) => theme.palette.grey[800]};
|
|
82
|
-
}
|
|
83
82
|
|
|
84
83
|
&:active {
|
|
85
84
|
color: ${({ theme }) => theme.palette.grey[800]};
|
|
@@ -88,7 +87,7 @@ exports.Wrapper = styled_1.styled.li `
|
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
& .${
|
|
90
|
+
& .${constants_3.pageAsideNavigationItemClassnames.isActive} {
|
|
92
91
|
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
93
92
|
border-color: ${({ theme }) => theme.palette.grey[800]};
|
|
94
93
|
|
|
@@ -105,7 +104,7 @@ exports.Wrapper = styled_1.styled.li `
|
|
|
105
104
|
exports.IconWrapper = styled_1.styled.div `
|
|
106
105
|
display: flex;
|
|
107
106
|
|
|
108
|
-
& .${
|
|
107
|
+
& .${constants_2.svgIconClassnames.root} {
|
|
109
108
|
width: 20px;
|
|
110
109
|
height: 20px;
|
|
111
110
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IconWrapper = exports.Input = exports.Wrapper = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
4
5
|
const styled_1 = require("../styled");
|
|
5
6
|
const mixins_1 = require("../styled/mixins");
|
|
6
|
-
const
|
|
7
|
+
const constants_2 = require("./constants");
|
|
7
8
|
const getOutlineColor = ({ theme, isHover, isDisabled, isError, isChecked, }) => {
|
|
8
9
|
if (isDisabled) {
|
|
9
10
|
return isChecked
|
|
@@ -35,14 +36,14 @@ const getFillColor = ({ theme, isHover, isDisabled, isError, isChecked, }) => {
|
|
|
35
36
|
exports.Wrapper = (0, styled_1.styled)('span', {
|
|
36
37
|
shouldForwardProp: (prop) => !['$isDisabled', '$isError', '$isChecked'].includes(prop),
|
|
37
38
|
}) `
|
|
38
|
-
.${
|
|
39
|
+
.${constants_2.radioClassnames.dot} {
|
|
39
40
|
transform-origin: center;
|
|
40
41
|
transform: ${({ $isChecked }) => ($isChecked ? 'scale(1)' : 'scale(0)')};
|
|
41
42
|
|
|
42
43
|
${mixins_1.easeOutBackTransition};
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
.${
|
|
46
|
+
.${constants_2.radioClassnames.outerCircle} {
|
|
46
47
|
fill: ${({ theme, $isDisabled, $isError, $isChecked }) => getFillColor({
|
|
47
48
|
theme,
|
|
48
49
|
isHover: false,
|
|
@@ -61,22 +62,24 @@ exports.Wrapper = (0, styled_1.styled)('span', {
|
|
|
61
62
|
${mixins_1.easeOutBackTransition};
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
${constants_1.HOVER_MEDIA} {
|
|
66
|
+
&:hover {
|
|
67
|
+
.${constants_2.radioClassnames.outerCircle} {
|
|
68
|
+
fill: ${({ theme, $isDisabled, $isError, $isChecked }) => getFillColor({
|
|
67
69
|
theme,
|
|
68
70
|
isHover: true,
|
|
69
71
|
isDisabled: $isDisabled,
|
|
70
72
|
isError: $isError,
|
|
71
73
|
isChecked: $isChecked,
|
|
72
74
|
})};
|
|
73
|
-
|
|
75
|
+
stroke: ${({ theme, $isDisabled, $isError, $isChecked }) => getOutlineColor({
|
|
74
76
|
theme,
|
|
75
77
|
isHover: true,
|
|
76
78
|
isDisabled: $isDisabled,
|
|
77
79
|
isError: $isError,
|
|
78
80
|
isChecked: $isChecked,
|
|
79
81
|
})};
|
|
82
|
+
}
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
`;
|
|
@@ -85,19 +88,19 @@ exports.Input = styled_1.styled.input `
|
|
|
85
88
|
|
|
86
89
|
position: absolute;
|
|
87
90
|
|
|
88
|
-
width: ${
|
|
89
|
-
height: ${
|
|
91
|
+
width: ${constants_2.RADIO_SIZE};
|
|
92
|
+
height: ${constants_2.RADIO_SIZE};
|
|
90
93
|
margin: 0;
|
|
91
94
|
|
|
92
95
|
opacity: 0;
|
|
93
96
|
|
|
94
97
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
95
|
-
width: ${
|
|
96
|
-
height: ${
|
|
98
|
+
width: ${constants_2.MOBILE_RADIO_SIZE};
|
|
99
|
+
height: ${constants_2.MOBILE_RADIO_SIZE};
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
&:focus-visible {
|
|
100
|
-
~.${
|
|
103
|
+
~.${constants_2.radioClassnames.iconWrapper} > .${constants_2.radioClassnames.icon} {
|
|
101
104
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
102
105
|
outline: 2px solid ${({ theme }) => theme.palette.components.focused};
|
|
103
106
|
outline-offset: -2px;
|
|
@@ -109,14 +112,14 @@ exports.IconWrapper = styled_1.styled.span `
|
|
|
109
112
|
align-items: center;
|
|
110
113
|
justify-content: center;
|
|
111
114
|
|
|
112
|
-
width: ${
|
|
113
|
-
height: ${
|
|
115
|
+
width: ${constants_2.RADIO_SIZE};
|
|
116
|
+
height: ${constants_2.RADIO_SIZE};
|
|
114
117
|
|
|
115
118
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
116
|
-
width: ${
|
|
117
|
-
height: ${
|
|
119
|
+
width: ${constants_2.MOBILE_RADIO_SIZE};
|
|
120
|
+
height: ${constants_2.MOBILE_RADIO_SIZE};
|
|
118
121
|
|
|
119
|
-
.${
|
|
122
|
+
.${constants_2.radioClassnames.icon} {
|
|
120
123
|
width: 20px;
|
|
121
124
|
height: 20px;
|
|
122
125
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StyledRadio = exports.Content = exports.Wrapper = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
4
5
|
const Radio_1 = require("../Radio");
|
|
5
6
|
const styled_1 = require("../styled");
|
|
6
|
-
const
|
|
7
|
+
const constants_2 = require("./constants");
|
|
7
8
|
exports.Wrapper = styled_1.styled.label `
|
|
8
9
|
cursor: pointer;
|
|
9
10
|
|
|
@@ -62,14 +63,16 @@ exports.Wrapper = styled_1.styled.label `
|
|
|
62
63
|
outline-offset: -2px;
|
|
63
64
|
`}
|
|
64
65
|
|
|
65
|
-
& .${Radio_1.radioClassnames.disabled} ~ .${
|
|
66
|
+
& .${Radio_1.radioClassnames.disabled} ~ .${constants_2.radioCardClassnames.content} {
|
|
66
67
|
cursor: default;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
${constants_1.HOVER_MEDIA} {
|
|
71
|
+
&:hover {
|
|
72
|
+
background-color: ${({ theme, $isDisabled }) => $isDisabled
|
|
71
73
|
? theme.palette.background.element
|
|
72
74
|
: theme.palette.background.elementHover};
|
|
75
|
+
}
|
|
73
76
|
}
|
|
74
77
|
`;
|
|
75
78
|
exports.Content = styled_1.styled.div `
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StaticCalendarGridButton = void 0;
|
|
4
4
|
const Button_1 = require("@mui/material/Button");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
5
6
|
const styled_1 = require("../../styled");
|
|
6
7
|
const StaticCalendarButton_1 = require("../StaticCalendarButton");
|
|
7
8
|
const utils_1 = require("./utils");
|
|
@@ -56,11 +57,13 @@ exports.StaticCalendarGridButton = (0, styled_1.styled)(StaticCalendarButton_1.S
|
|
|
56
57
|
background-color: currentColor;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
${constants_1.HOVER_MEDIA} {
|
|
61
|
+
&:hover {
|
|
62
|
+
border-radius: ${(props) => (0, utils_1.getLeftBorderRadius)({ isHovered: true, ...props })}
|
|
63
|
+
${(props) => (0, utils_1.getRightBorderRadius)({ isHovered: true, ...props })}
|
|
64
|
+
${(props) => (0, utils_1.getRightBorderRadius)({ isHovered: true, ...props })}
|
|
65
|
+
${(props) => (0, utils_1.getLeftBorderRadius)({ isHovered: true, ...props })};
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
&,
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.StyledTab = void 0;
|
|
7
7
|
const Tab_1 = __importDefault(require("@mui/material/Tab"));
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
8
9
|
const styled_1 = require("../../styled");
|
|
9
10
|
exports.StyledTab = (0, styled_1.styled)(Tab_1.default) `
|
|
10
11
|
min-height: 36px;
|
|
@@ -19,8 +20,10 @@ exports.StyledTab = (0, styled_1.styled)(Tab_1.default) `
|
|
|
19
20
|
margin-right: 0;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
${constants_1.HOVER_MEDIA} {
|
|
24
|
+
&:hover {
|
|
25
|
+
color: ${({ theme }) => theme.palette.primary[800]};
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
&:active {
|
|
@@ -28,10 +28,11 @@ const ButtonBase_1 = require("@mui/material/ButtonBase");
|
|
|
28
28
|
const ToggleButton_1 = __importStar(require("@mui/material/ToggleButton"));
|
|
29
29
|
const ToggleButtonGroup_1 = require("@mui/material/ToggleButtonGroup");
|
|
30
30
|
const Button_1 = require("../Button");
|
|
31
|
+
const constants_1 = require("../constants");
|
|
31
32
|
const styled_1 = require("../styled");
|
|
32
|
-
const
|
|
33
|
+
const constants_2 = require("./constants");
|
|
33
34
|
const getSize = (size) => {
|
|
34
|
-
return
|
|
35
|
+
return constants_2.SIZES[size || 'medium'];
|
|
35
36
|
};
|
|
36
37
|
const getColor = ({ color = 'primary', isSelected, state = 'default', theme, isDisabled, }) => {
|
|
37
38
|
if (isDisabled) {
|
|
@@ -90,23 +91,33 @@ exports.StyledToggleButton = (0, styled_1.styled)(ToggleButton_1.default, {
|
|
|
90
91
|
|
|
91
92
|
${({ theme, $color, disabled, $variant }) => toggleButtonColorStyle({ theme, color: $color, disabled, variant: $variant })}
|
|
92
93
|
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
${constants_1.HOVER_MEDIA} {
|
|
95
|
+
&:hover {
|
|
96
|
+
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'hover' })};
|
|
97
|
+
}
|
|
95
98
|
}
|
|
96
|
-
|
|
99
|
+
|
|
97
100
|
&:active {
|
|
98
101
|
z-index: 3;
|
|
99
102
|
|
|
100
103
|
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'active' })};
|
|
101
104
|
}
|
|
102
|
-
|
|
105
|
+
|
|
103
106
|
&.${ToggleButton_1.toggleButtonClasses.selected} {
|
|
104
107
|
z-index: 2;
|
|
105
108
|
|
|
106
109
|
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, selected: true })}
|
|
107
110
|
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
${constants_1.HOVER_MEDIA} {
|
|
112
|
+
&:hover {
|
|
113
|
+
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'hover' })};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
${constants_1.HOVER_NONE_MEDIA} {
|
|
118
|
+
&:hover {
|
|
119
|
+
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'default' })};
|
|
120
|
+
}
|
|
110
121
|
}
|
|
111
122
|
|
|
112
123
|
&:active {
|
|
@@ -123,8 +134,10 @@ exports.StyledToggleButton = (0, styled_1.styled)(ToggleButton_1.default, {
|
|
|
123
134
|
&.${ButtonBase_1.buttonBaseClasses.root}.${ToggleButtonGroup_1.toggleButtonGroupClasses.grouped}:not(:first-of-type) {
|
|
124
135
|
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color })};
|
|
125
136
|
|
|
126
|
-
|
|
127
|
-
|
|
137
|
+
${constants_1.HOVER_MEDIA} {
|
|
138
|
+
&:hover {
|
|
139
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, state: 'hover' })};
|
|
140
|
+
}
|
|
128
141
|
}
|
|
129
142
|
|
|
130
143
|
&:active {
|
|
@@ -134,13 +147,15 @@ exports.StyledToggleButton = (0, styled_1.styled)(ToggleButton_1.default, {
|
|
|
134
147
|
&.${ToggleButton_1.toggleButtonClasses.selected} {
|
|
135
148
|
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, isSelected: true })};
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
${constants_1.HOVER_MEDIA} {
|
|
151
|
+
&:hover {
|
|
152
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({
|
|
139
153
|
theme,
|
|
140
154
|
color: $color,
|
|
141
155
|
isSelected: true,
|
|
142
156
|
state: 'hover',
|
|
143
157
|
})};
|
|
158
|
+
}
|
|
144
159
|
}
|
|
145
160
|
|
|
146
161
|
&:active {
|
|
@@ -109,10 +109,10 @@ exports.BackButton = (0, styled_1.styled)(IconButton_1.IconButton) `
|
|
|
109
109
|
width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
110
110
|
height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
&:
|
|
112
|
+
|
|
113
|
+
&:active {
|
|
114
114
|
background-color: transparent;
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
}
|
|
117
117
|
`;
|
|
118
118
|
exports.ParentContent = styled_1.styled.div `
|