@gympass/yoga 7.104.0 → 7.105.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/cjs/BottomSheet/web/BottomSheet.js +2 -2
- package/cjs/Checkbox/web/Checkbox.js +2 -2
- package/cjs/Drawer/web/Drawer.js +2 -2
- package/cjs/NavigationMenu/NavigationMenu.theme.js +124 -41
- package/cjs/NavigationMenu/web/BottomItems/BottomItem.js +7 -2
- package/cjs/NavigationMenu/web/BottomItems/BottomItems.js +5 -4
- package/cjs/NavigationMenu/web/Item/styles.js +6 -16
- package/cjs/NavigationMenu/web/Menu/Menu.js +91 -26
- package/cjs/NavigationMenu/web/NavigationMenu.js +7 -5
- package/cjs/NavigationMenu/web/Switcher/Actions.js +9 -5
- package/cjs/NavigationMenu/web/Switcher/Switcher.js +3 -3
- package/esm/BottomSheet/web/BottomSheet.js +2 -2
- package/esm/Checkbox/web/Checkbox.js +2 -2
- package/esm/Drawer/web/Drawer.js +2 -2
- package/esm/NavigationMenu/NavigationMenu.theme.js +124 -41
- package/esm/NavigationMenu/web/BottomItems/BottomItem.js +7 -2
- package/esm/NavigationMenu/web/BottomItems/BottomItems.js +5 -4
- package/esm/NavigationMenu/web/Item/styles.js +6 -16
- package/esm/NavigationMenu/web/Menu/Menu.js +92 -27
- package/esm/NavigationMenu/web/NavigationMenu.js +7 -5
- package/esm/NavigationMenu/web/Switcher/Actions.js +9 -5
- package/esm/NavigationMenu/web/Switcher/Switcher.js +3 -3
- package/package.json +2 -2
- package/typings/{Actions-cd7fac99.d.ts → Actions-752d7514.d.ts} +2 -2
- package/typings/NavigationMenu/NavigationMenu.theme.d.ts +1 -71
- package/typings/NavigationMenu/index.d.ts +2 -2
- package/typings/NavigationMenu/web/BottomItems/index.d.ts +2 -1
- package/typings/NavigationMenu/web/Menu/index.d.ts +3 -1
- package/typings/NavigationMenu/web/Switcher/index.d.ts +1 -1
- package/typings/NavigationMenu/web/index.d.ts +2 -2
- package/typings/{NavigationMenu-57b14b2b.d.ts → NavigationMenu-8c022497.d.ts} +9 -11
- package/typings/Theme/theme/v3theme.d.ts +37 -37
- package/typings/index.d.ts +2 -2
package/esm/Drawer/web/Drawer.js
CHANGED
|
@@ -38,11 +38,11 @@ const StyledDrawer = styled(Dialog)`
|
|
|
38
38
|
align-self: flex-end;
|
|
39
39
|
position: absolute;
|
|
40
40
|
right: 0;
|
|
41
|
-
animation:
|
|
41
|
+
animation: drawer-slide-left;
|
|
42
42
|
animation-duration: 400ms;
|
|
43
43
|
animation-fill-mode: forwards;
|
|
44
44
|
transition: 0.25s ease-in-out;
|
|
45
|
-
@keyframes
|
|
45
|
+
@keyframes drawer-slide-left {
|
|
46
46
|
0% {
|
|
47
47
|
transform: translate3d(100%, 0, 0);
|
|
48
48
|
}
|
|
@@ -1,59 +1,142 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
},
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
import { merge } from "@gympass/yoga-common";
|
|
3
|
+
const sandy = "#F6EDDF";
|
|
4
|
+
const navigationMenuV3 = ({ colors, fontWeights, fontSizes, radii }) => ({
|
|
6
5
|
backgroundColor: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
white: colors.white
|
|
6
|
+
contextMenu: colors.sand,
|
|
7
|
+
default: colors.sand,
|
|
8
|
+
hover: sandy,
|
|
9
|
+
active: sandy
|
|
12
10
|
},
|
|
13
11
|
border: {
|
|
14
|
-
color: {
|
|
15
|
-
default: colors.light,
|
|
16
|
-
white: colors.white
|
|
17
|
-
},
|
|
18
12
|
radius: {
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
tag: radii.small,
|
|
14
|
+
contextMenu: radii.small
|
|
21
15
|
}
|
|
22
16
|
},
|
|
23
17
|
font: {
|
|
24
18
|
color: {
|
|
25
|
-
default: colors.
|
|
26
|
-
active: colors.
|
|
27
|
-
hover: colors.
|
|
19
|
+
default: colors.text.secondary,
|
|
20
|
+
active: colors.text.primary,
|
|
21
|
+
hover: colors.text.secondary
|
|
28
22
|
},
|
|
29
|
-
weight: {
|
|
23
|
+
weight: {
|
|
24
|
+
bold: fontWeights.bold,
|
|
25
|
+
medium: fontWeights.regular
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
contextMenu: {
|
|
29
|
+
title: fontSizes.xlarge
|
|
30
|
+
}
|
|
31
|
+
}
|
|
30
32
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
hover: {
|
|
34
|
+
contextMenu: css`
|
|
35
|
+
background-color: ${sandy};
|
|
36
|
+
`
|
|
35
37
|
},
|
|
36
|
-
height: { xxlarge: spacing.xxlarge, xlarge: spacing.xlarge },
|
|
37
38
|
icon: {
|
|
38
|
-
height: spacing.medium,
|
|
39
|
-
width: spacing.medium,
|
|
40
39
|
fill: {
|
|
41
|
-
default: colors.
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
default: colors.text.secondary,
|
|
41
|
+
actions: colors.text.secondary,
|
|
42
|
+
active: colors.text.primary,
|
|
43
|
+
hover: colors.text.secondary
|
|
44
44
|
}
|
|
45
|
-
}
|
|
46
|
-
padding: {
|
|
47
|
-
xxxsmall: spacing.xxxsmall,
|
|
48
|
-
xxsmall: spacing.xxsmall,
|
|
49
|
-
xsmall: spacing.xsmall,
|
|
50
|
-
small: spacing.small
|
|
51
|
-
},
|
|
52
|
-
tag: {
|
|
53
|
-
color: { default: colors.white }
|
|
54
|
-
},
|
|
55
|
-
width: { xxlarge: spacing.xxlarge, xlarge: spacing.xlarge }
|
|
45
|
+
}
|
|
56
46
|
});
|
|
47
|
+
const NavigationMenu = (theme) => {
|
|
48
|
+
const {
|
|
49
|
+
colors,
|
|
50
|
+
elevations,
|
|
51
|
+
fontWeights,
|
|
52
|
+
fontSizes,
|
|
53
|
+
radii,
|
|
54
|
+
spacing,
|
|
55
|
+
v3theme
|
|
56
|
+
} = theme;
|
|
57
|
+
const baseTheme = {
|
|
58
|
+
avatar: {
|
|
59
|
+
height: spacing.xlarge,
|
|
60
|
+
width: spacing.xlarge
|
|
61
|
+
},
|
|
62
|
+
backgroundColor: {
|
|
63
|
+
contextMenu: colors.white,
|
|
64
|
+
default: colors.clear,
|
|
65
|
+
hover: colors.light,
|
|
66
|
+
active: colors.yoga,
|
|
67
|
+
tag: colors.stamina,
|
|
68
|
+
bottomMenu: colors.white
|
|
69
|
+
},
|
|
70
|
+
border: {
|
|
71
|
+
color: {
|
|
72
|
+
default: colors.light
|
|
73
|
+
},
|
|
74
|
+
radius: {
|
|
75
|
+
default: radii.small,
|
|
76
|
+
circle: radii.circle,
|
|
77
|
+
tag: v3theme ? radii.small : radii.circle,
|
|
78
|
+
action: radii.circle,
|
|
79
|
+
contextMenu: v3theme ? radii.small : radii.circle
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
font: {
|
|
83
|
+
color: {
|
|
84
|
+
default: colors.deep,
|
|
85
|
+
active: colors.vibin,
|
|
86
|
+
hover: colors.stamina
|
|
87
|
+
},
|
|
88
|
+
weight: {
|
|
89
|
+
bold: fontWeights.medium,
|
|
90
|
+
medium: fontWeights.regular
|
|
91
|
+
},
|
|
92
|
+
size: {
|
|
93
|
+
contextMenu: {
|
|
94
|
+
title: fontSizes.small
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
gap: {
|
|
99
|
+
xxxsmall: spacing.xxxsmall,
|
|
100
|
+
xxsmall: spacing.xxsmall,
|
|
101
|
+
medium: spacing.medium
|
|
102
|
+
},
|
|
103
|
+
height: {
|
|
104
|
+
xxlarge: spacing.xxlarge,
|
|
105
|
+
xlarge: spacing.xlarge,
|
|
106
|
+
contextMenu: spacing.xlarge * 2,
|
|
107
|
+
bottomMenu: spacing.xxxlarge
|
|
108
|
+
},
|
|
109
|
+
hover: {
|
|
110
|
+
contextMenu: css`
|
|
111
|
+
box-shadow: ${elevations.small};
|
|
112
|
+
`
|
|
113
|
+
},
|
|
114
|
+
icon: {
|
|
115
|
+
height: spacing.medium,
|
|
116
|
+
width: spacing.medium,
|
|
117
|
+
fill: {
|
|
118
|
+
default: colors.deep,
|
|
119
|
+
actions: colors.primary,
|
|
120
|
+
active: colors.vibin,
|
|
121
|
+
hover: colors.stamina
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
padding: {
|
|
125
|
+
xxxsmall: spacing.xxxsmall,
|
|
126
|
+
xxsmall: spacing.xxsmall,
|
|
127
|
+
xsmall: spacing.xsmall,
|
|
128
|
+
small: spacing.small
|
|
129
|
+
},
|
|
130
|
+
tag: {
|
|
131
|
+
color: { default: colors.white }
|
|
132
|
+
},
|
|
133
|
+
width: { xxlarge: spacing.xxlarge, xlarge: spacing.xlarge }
|
|
134
|
+
};
|
|
135
|
+
if (!v3theme) {
|
|
136
|
+
return baseTheme;
|
|
137
|
+
}
|
|
138
|
+
return merge(baseTheme, navigationMenuV3(theme));
|
|
139
|
+
};
|
|
57
140
|
var NavigationMenu_theme_default = NavigationMenu;
|
|
58
141
|
export {
|
|
59
142
|
NavigationMenu_theme_default as default
|
|
@@ -25,11 +25,13 @@ const Active = css`
|
|
|
25
25
|
theme: {
|
|
26
26
|
yoga: {
|
|
27
27
|
components: {
|
|
28
|
-
navigationmenu: { icon, font }
|
|
28
|
+
navigationmenu: { backgroundColor, icon, font }
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}) => css`
|
|
33
|
+
background-color: ${backgroundColor.active};
|
|
34
|
+
|
|
33
35
|
:not(:last-child) {
|
|
34
36
|
pointer-events: none;
|
|
35
37
|
}
|
|
@@ -37,6 +39,7 @@ const Active = css`
|
|
|
37
39
|
div {
|
|
38
40
|
${StyledText} {
|
|
39
41
|
color: ${font.color.active};
|
|
42
|
+
font-weight: ${font.weight.bold};
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
svg {
|
|
@@ -51,7 +54,7 @@ const StyledItem = styled.li`
|
|
|
51
54
|
theme: {
|
|
52
55
|
yoga: {
|
|
53
56
|
components: {
|
|
54
|
-
navigationmenu: { border, icon, font }
|
|
57
|
+
navigationmenu: { backgroundColor, border, icon, font }
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -71,6 +74,8 @@ const StyledItem = styled.li`
|
|
|
71
74
|
&:hover,
|
|
72
75
|
&:focus {
|
|
73
76
|
${!isActive && css`
|
|
77
|
+
background-color: ${backgroundColor.hover};
|
|
78
|
+
|
|
74
79
|
${StyledText} {
|
|
75
80
|
color: ${font.color.hover};
|
|
76
81
|
}
|
|
@@ -35,13 +35,15 @@ import { media } from "@gympass/yoga-helpers";
|
|
|
35
35
|
const StyledItemsContainer = styled.nav`
|
|
36
36
|
position: relative;
|
|
37
37
|
${media.lg`display: none`}
|
|
38
|
+
|
|
39
|
+
z-index: ${({ $zIndex }) => $zIndex != null ? $zIndex : 2};
|
|
38
40
|
`;
|
|
39
41
|
const StyledItems = styled.ul`
|
|
40
42
|
${({
|
|
41
43
|
theme: {
|
|
42
44
|
yoga: {
|
|
43
45
|
components: {
|
|
44
|
-
navigationmenu: { backgroundColor, border, gap }
|
|
46
|
+
navigationmenu: { backgroundColor, border, gap, height }
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -53,13 +55,12 @@ const StyledItems = styled.ul`
|
|
|
53
55
|
grid-auto-flow: column;
|
|
54
56
|
align-items: center;
|
|
55
57
|
width: 100%;
|
|
56
|
-
height:
|
|
57
|
-
background-color: ${backgroundColor.
|
|
58
|
+
height: ${height.bottomMenu}px;
|
|
59
|
+
background-color: ${backgroundColor.bottomMenu};
|
|
58
60
|
margin: 0;
|
|
59
61
|
padding: 0;
|
|
60
62
|
border: 1px solid ${border.color.default};
|
|
61
63
|
gap: ${gap.xxxsmall}px;
|
|
62
|
-
z-index: ${({ $zIndex }) => $zIndex != null ? $zIndex : 2};
|
|
63
64
|
`}
|
|
64
65
|
`;
|
|
65
66
|
const BottomItems = (_a) => {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import { media } from "@gympass/yoga-helpers";
|
|
3
|
-
import Box from "../../../Box";
|
|
4
2
|
import Tag from "../../../Tag";
|
|
5
3
|
import Text from "../../../Text";
|
|
6
|
-
const StyledTextContainer = styled
|
|
4
|
+
const StyledTextContainer = styled.div`
|
|
7
5
|
${({
|
|
8
6
|
isSubItem,
|
|
9
7
|
theme: {
|
|
@@ -34,9 +32,9 @@ const StyledTag = styled(Tag)`
|
|
|
34
32
|
}
|
|
35
33
|
}) => css`
|
|
36
34
|
text-transform: uppercase;
|
|
37
|
-
background-color: ${backgroundColor.
|
|
35
|
+
background-color: ${backgroundColor.tag};
|
|
38
36
|
color: ${tag.color.default};
|
|
39
|
-
border-radius: ${border.radius.
|
|
37
|
+
border-radius: ${border.radius.tag}px;
|
|
40
38
|
`}
|
|
41
39
|
`;
|
|
42
40
|
const StyledText = styled(Text)`
|
|
@@ -58,7 +56,6 @@ const StyledText = styled(Text)`
|
|
|
58
56
|
`;
|
|
59
57
|
const Active = css`
|
|
60
58
|
${({
|
|
61
|
-
isResponsive,
|
|
62
59
|
theme: {
|
|
63
60
|
yoga: {
|
|
64
61
|
components: {
|
|
@@ -70,18 +67,11 @@ const Active = css`
|
|
|
70
67
|
cursor: auto;
|
|
71
68
|
|
|
72
69
|
> ${StyledTextContainer} {
|
|
73
|
-
background-color: ${backgroundColor.
|
|
74
|
-
|
|
75
|
-
${isResponsive ? media.lg`background-color: ${backgroundColor.yoga}` : css`
|
|
76
|
-
background-color: ${backgroundColor.yoga};
|
|
77
|
-
`}
|
|
70
|
+
background-color: ${backgroundColor.active};
|
|
78
71
|
|
|
79
72
|
${StyledText} {
|
|
80
73
|
color: ${font.color.active};
|
|
81
|
-
|
|
82
|
-
${isResponsive ? media.lg`font-weight: ${font.weight.medium}` : css`
|
|
83
|
-
font-weight: ${font.weight.medium};
|
|
84
|
-
`}
|
|
74
|
+
font-weight: ${font.weight.bold};
|
|
85
75
|
}
|
|
86
76
|
|
|
87
77
|
svg {
|
|
@@ -89,7 +79,7 @@ const Active = css`
|
|
|
89
79
|
}
|
|
90
80
|
|
|
91
81
|
> ${StyledTag} {
|
|
92
|
-
background-color: ${backgroundColor.
|
|
82
|
+
background-color: ${backgroundColor.tag};
|
|
93
83
|
}
|
|
94
84
|
}
|
|
95
85
|
`}
|
|
@@ -1,51 +1,64 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from "styled-components";
|
|
3
|
-
import {
|
|
3
|
+
import { ChevronDown } from "@gympass/yoga-icons";
|
|
4
4
|
import { Text } from "@gympass/yoga";
|
|
5
|
-
import Box from "../../../Box";
|
|
6
5
|
import Icon from "../../../Icon";
|
|
7
|
-
const StyledMenu = styled
|
|
6
|
+
const StyledMenu = styled.div`
|
|
8
7
|
${({
|
|
9
8
|
hasAction,
|
|
10
9
|
theme: {
|
|
11
10
|
yoga: {
|
|
12
11
|
components: {
|
|
13
|
-
navigationmenu: {
|
|
12
|
+
navigationmenu: {
|
|
13
|
+
backgroundColor,
|
|
14
|
+
border,
|
|
15
|
+
gap,
|
|
16
|
+
padding,
|
|
17
|
+
height,
|
|
18
|
+
hover
|
|
19
|
+
}
|
|
14
20
|
}
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
}) => css`
|
|
18
24
|
transition: background-color 300ms ease-in-out;
|
|
19
25
|
|
|
20
|
-
display:
|
|
26
|
+
display: grid;
|
|
21
27
|
align-items: center;
|
|
22
|
-
justify-content: space-between;
|
|
23
28
|
width: 100%;
|
|
29
|
+
grid-template-columns: max-content 1fr max-content;
|
|
24
30
|
gap: ${gap.xxsmall}px;
|
|
25
31
|
padding: ${padding.xsmall}px;
|
|
26
|
-
background-color: ${backgroundColor.
|
|
27
|
-
border-radius: ${border.radius.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
> div:first-child {
|
|
31
|
-
height: ${avatar.height}px;
|
|
32
|
-
width: ${avatar.width}px;
|
|
33
|
-
}
|
|
32
|
+
background-color: ${backgroundColor.contextMenu};
|
|
33
|
+
border-radius: ${border.radius.contextMenu}px;
|
|
34
|
+
min-height: ${height.contextMenu}px;
|
|
34
35
|
|
|
35
36
|
${hasAction && css`
|
|
36
|
-
:
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
&:hover,
|
|
37
39
|
&:focus {
|
|
38
|
-
|
|
39
|
-
border: 1px solid ${border.color.default};
|
|
40
|
+
${hover.contextMenu}
|
|
40
41
|
}
|
|
41
42
|
`}
|
|
42
43
|
`}
|
|
43
44
|
`;
|
|
44
|
-
const StyledTextContainer = styled
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const StyledTextContainer = styled.div`
|
|
46
|
+
${({
|
|
47
|
+
theme: {
|
|
48
|
+
yoga: {
|
|
49
|
+
components: {
|
|
50
|
+
navigationmenu: { gap }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}) => css`
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: ${gap.xxxsmall}px;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
`}
|
|
47
60
|
`;
|
|
48
|
-
const
|
|
61
|
+
const StyledTitle = styled(Text.H4)`
|
|
49
62
|
${({
|
|
50
63
|
theme: {
|
|
51
64
|
yoga: {
|
|
@@ -55,22 +68,74 @@ const StyledText = styled(Text.Small)`
|
|
|
55
68
|
}
|
|
56
69
|
}
|
|
57
70
|
}) => css`
|
|
58
|
-
font-
|
|
71
|
+
font-size: ${font.size.contextMenu.title}px;
|
|
72
|
+
line-height: ${font.size.contextMenu.title}px;
|
|
73
|
+
font-weight: ${font.weight.bold};
|
|
59
74
|
flex: 1;
|
|
60
75
|
white-space: nowrap;
|
|
61
76
|
text-overflow: ellipsis;
|
|
62
77
|
overflow: hidden;
|
|
63
78
|
`}
|
|
64
79
|
`;
|
|
65
|
-
const
|
|
80
|
+
const StyledSubtitle = styled(Text.Small)`
|
|
81
|
+
${({
|
|
82
|
+
theme: {
|
|
83
|
+
yoga: {
|
|
84
|
+
components: {
|
|
85
|
+
navigationmenu: { font }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}) => css`
|
|
90
|
+
color: ${font.color.default};
|
|
91
|
+
`}
|
|
92
|
+
`;
|
|
93
|
+
const StyledActionIconContainer = styled.div`
|
|
94
|
+
${({
|
|
95
|
+
theme: {
|
|
96
|
+
yoga: {
|
|
97
|
+
components: {
|
|
98
|
+
navigationmenu: { icon }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}) => css`
|
|
103
|
+
svg {
|
|
104
|
+
fill: ${icon.fill.actions};
|
|
105
|
+
}
|
|
106
|
+
`}
|
|
107
|
+
`;
|
|
108
|
+
const StyledAvatarContainer = styled.div`
|
|
109
|
+
${({
|
|
110
|
+
theme: {
|
|
111
|
+
yoga: {
|
|
112
|
+
components: {
|
|
113
|
+
navigationmenu: { avatar }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}) => css`
|
|
118
|
+
> div:first-child {
|
|
119
|
+
height: ${avatar.height}px;
|
|
120
|
+
width: ${avatar.width}px;
|
|
121
|
+
}
|
|
122
|
+
`}
|
|
123
|
+
`;
|
|
124
|
+
const Menu = ({
|
|
125
|
+
avatar: Avatar,
|
|
126
|
+
icon,
|
|
127
|
+
subtitle,
|
|
128
|
+
title,
|
|
129
|
+
onClick
|
|
130
|
+
}) => {
|
|
66
131
|
const hasAction = Boolean(onClick);
|
|
67
132
|
return /* @__PURE__ */ jsxs(StyledMenu, { hasAction, onClick, children: [
|
|
68
|
-
Avatar,
|
|
133
|
+
!!Avatar && /* @__PURE__ */ jsx(StyledAvatarContainer, { children: Avatar }),
|
|
69
134
|
/* @__PURE__ */ jsxs(StyledTextContainer, { children: [
|
|
70
|
-
title && /* @__PURE__ */ jsx(
|
|
71
|
-
subtitle && /* @__PURE__ */ jsx(
|
|
135
|
+
title && /* @__PURE__ */ jsx(StyledTitle, { children: title }),
|
|
136
|
+
subtitle && /* @__PURE__ */ jsx(StyledSubtitle, { children: subtitle })
|
|
72
137
|
] }),
|
|
73
|
-
hasAction && /* @__PURE__ */ jsx(Icon, { as:
|
|
138
|
+
hasAction && /* @__PURE__ */ jsx(StyledActionIconContainer, { children: /* @__PURE__ */ jsx(Icon, { as: icon != null ? icon : ChevronDown, size: "large" }) })
|
|
74
139
|
] });
|
|
75
140
|
};
|
|
76
141
|
var Menu_default = Menu;
|
|
@@ -36,7 +36,6 @@ import Menu from "./Menu";
|
|
|
36
36
|
import Switcher from "./Switcher";
|
|
37
37
|
import { Item, Subitem } from "./Item";
|
|
38
38
|
import { BottomItems, BottomItem } from "./BottomItems";
|
|
39
|
-
import Box from "../../Box";
|
|
40
39
|
const DeskTopContainer = css`
|
|
41
40
|
${({
|
|
42
41
|
theme: {
|
|
@@ -80,7 +79,7 @@ const StyledNavigationMenu = styled.div`
|
|
|
80
79
|
`}
|
|
81
80
|
`}
|
|
82
81
|
`;
|
|
83
|
-
const StyledHeader = styled
|
|
82
|
+
const StyledHeader = styled.header`
|
|
84
83
|
${({
|
|
85
84
|
theme: {
|
|
86
85
|
yoga: {
|
|
@@ -118,7 +117,7 @@ const StyledItemsGroup = styled.ul`
|
|
|
118
117
|
gap: ${gap.xxxsmall}px;
|
|
119
118
|
`}
|
|
120
119
|
`;
|
|
121
|
-
const StyledFooter = styled
|
|
120
|
+
const StyledFooter = styled.footer`
|
|
122
121
|
${({
|
|
123
122
|
theme: {
|
|
124
123
|
yoga: {
|
|
@@ -137,17 +136,20 @@ const NavigationMenu = (_a) => {
|
|
|
137
136
|
var _b = _a, {
|
|
138
137
|
children,
|
|
139
138
|
openOnMobile = false,
|
|
140
|
-
responsive = true
|
|
139
|
+
responsive = true,
|
|
140
|
+
zIndex
|
|
141
141
|
} = _b, htmlAttributes = __objRest(_b, [
|
|
142
142
|
"children",
|
|
143
143
|
"openOnMobile",
|
|
144
|
-
"responsive"
|
|
144
|
+
"responsive",
|
|
145
|
+
"zIndex"
|
|
145
146
|
]);
|
|
146
147
|
return /* @__PURE__ */ jsx(
|
|
147
148
|
StyledNavigationMenu,
|
|
148
149
|
__spreadProps(__spreadValues({}, htmlAttributes), {
|
|
149
150
|
isOpenOnMobile: openOnMobile,
|
|
150
151
|
isResponsive: responsive,
|
|
152
|
+
$zIndex: zIndex,
|
|
151
153
|
children
|
|
152
154
|
})
|
|
153
155
|
);
|
|
@@ -8,7 +8,7 @@ const StyledAction = styled.div`
|
|
|
8
8
|
theme: {
|
|
9
9
|
yoga: {
|
|
10
10
|
components: {
|
|
11
|
-
navigationmenu: { backgroundColor, border, height, width }
|
|
11
|
+
navigationmenu: { backgroundColor, border, height, width, icon }
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -20,7 +20,11 @@ const StyledAction = styled.div`
|
|
|
20
20
|
justify-content: center;
|
|
21
21
|
width: ${width.xxlarge}px;
|
|
22
22
|
height: ${height.xxlarge}px;
|
|
23
|
-
border-radius: ${border.radius.
|
|
23
|
+
border-radius: ${border.radius.action}px;
|
|
24
|
+
|
|
25
|
+
svg {
|
|
26
|
+
fill: ${icon.fill.actions};
|
|
27
|
+
}
|
|
24
28
|
|
|
25
29
|
:hover,
|
|
26
30
|
&:focus {
|
|
@@ -29,18 +33,18 @@ const StyledAction = styled.div`
|
|
|
29
33
|
}
|
|
30
34
|
`}
|
|
31
35
|
`;
|
|
32
|
-
function Actions({ actions, sideOffset,
|
|
36
|
+
function Actions({ actions, sideOffset, zIndex }) {
|
|
33
37
|
if (!(actions == null ? void 0 : actions.length)) {
|
|
34
38
|
return null;
|
|
35
39
|
}
|
|
36
40
|
return /* @__PURE__ */ jsxs(YogaMenu, { onMouseHover: false, children: [
|
|
37
|
-
/* @__PURE__ */ jsx(YogaMenu.Action, { children: /* @__PURE__ */ jsx(StyledAction, { children: /* @__PURE__ */ jsx(Icon, { as: MenuMore, size: "medium"
|
|
41
|
+
/* @__PURE__ */ jsx(YogaMenu.Action, { children: /* @__PURE__ */ jsx(StyledAction, { children: /* @__PURE__ */ jsx(Icon, { as: MenuMore, size: "medium" }) }) }),
|
|
38
42
|
/* @__PURE__ */ jsx(
|
|
39
43
|
YogaMenu.List,
|
|
40
44
|
{
|
|
41
45
|
side: "right",
|
|
42
46
|
sideOffset,
|
|
43
|
-
zIndex: `${
|
|
47
|
+
zIndex: `${zIndex != null ? zIndex : 2}`,
|
|
44
48
|
children: actions.map(({ id, label, onClick }) => /* @__PURE__ */ jsx(YogaMenu.Item, { onClick, children: label }, id))
|
|
45
49
|
}
|
|
46
50
|
)
|
|
@@ -58,7 +58,7 @@ const StyledSwitcher = styled(Box)`
|
|
|
58
58
|
}
|
|
59
59
|
`}
|
|
60
60
|
`;
|
|
61
|
-
const StyledTextContainer = styled
|
|
61
|
+
const StyledTextContainer = styled.div`
|
|
62
62
|
flex: 1;
|
|
63
63
|
overflow: hidden;
|
|
64
64
|
`;
|
|
@@ -72,7 +72,7 @@ const StyledTitle = styled(Text.Small)`
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}) => css`
|
|
75
|
-
font-weight: ${font.weight.
|
|
75
|
+
font-weight: ${font.weight.bold};
|
|
76
76
|
flex: 1;
|
|
77
77
|
white-space: nowrap;
|
|
78
78
|
text-overflow: ellipsis;
|
|
@@ -95,7 +95,7 @@ const Switcher = (_a) => {
|
|
|
95
95
|
"subtitle",
|
|
96
96
|
"title"
|
|
97
97
|
]);
|
|
98
|
-
const hasActions = actions == null ? void 0 : actions.length;
|
|
98
|
+
const hasActions = !!(actions == null ? void 0 : actions.length);
|
|
99
99
|
return /* @__PURE__ */ jsxs(StyledSwitcher, { fill, children: [
|
|
100
100
|
Avatar,
|
|
101
101
|
/* @__PURE__ */ jsx(StyledTextContainer, { children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.105.0",
|
|
4
4
|
"description": "Gympass component library",
|
|
5
5
|
"main": "./cjs",
|
|
6
6
|
"types": "./typings/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react-native": "0.72.3",
|
|
58
58
|
"styled-components": "^4.4.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "6190e4f67b4d9ac5a78d43e3fecd6c6d09ddc649",
|
|
61
61
|
"module": "./esm",
|
|
62
62
|
"private": false,
|
|
63
63
|
"react-native": "./cjs/index.native.js"
|
|
@@ -6,8 +6,8 @@ declare type SwitcherActionsProps = {
|
|
|
6
6
|
declare type ActionsProps = {
|
|
7
7
|
actions?: SwitcherActionsProps[];
|
|
8
8
|
sideOffset?: number;
|
|
9
|
-
|
|
9
|
+
zIndex?: number;
|
|
10
10
|
};
|
|
11
|
-
declare function Actions({ actions, sideOffset,
|
|
11
|
+
declare function Actions({ actions, sideOffset, zIndex }: ActionsProps): JSX.Element | null;
|
|
12
12
|
|
|
13
13
|
export { ActionsProps as A, Actions as a };
|