-
Notifications
You must be signed in to change notification settings - Fork 9
/
ShortcutPanel.styles.js
129 lines (106 loc) 路 2.62 KB
/
ShortcutPanel.styles.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import { css } from "styled-components";
import tokens from "@paprika/tokens";
import stylers from "@paprika/stylers";
import { hoveredItemStyles, selectedItemStyles, visuallyHiddenStyles } from "../../shared.styles";
export const actionBarStyles = css`
align-items: center;
background: ${tokens.color.blackLighten80};
border-top: 1px solid ${tokens.border.color};
bottom: 0;
box-sizing: border-box;
display: flex;
height: ${stylers.spacer(5)};
padding-left: ${tokens.spaceLg};
position: absolute;
width: 100%;
> [type="button"] {
flex-shrink: 0;
&:last-child {
margin-left: ${tokens.spaceSm};
}
}
`;
const yearColumnHeaderStyles = css`
border-left: 1px solid ${tokens.border.color};
justify-content: space-between;
`;
export const columnHeaderStyles = css`
align-items: center;
background: ${tokens.color.blackLighten80};
border-bottom: 1px solid ${tokens.border.color};
display: flex;
flex-shrink: 0;
font-weight: bold;
height: ${stylers.spacer(5)};
justify-content: center;
padding: ${tokens.space};
${({ isYear }) => (isYear ? yearColumnHeaderStyles : null)}
`;
export const containerStyles = css`
${stylers.fontSize(-1)};
border: 1px solid ${tokens.border.color};
border-radius: ${tokens.border.radius};
box-sizing: border-box;
color: ${tokens.color.black};
height: 245px;
overflow: hidden;
position: relative;
width: 257px;
&:focus {
outline: none;
}
${props => !props.isVisible && visuallyHiddenStyles}
* {
box-sizing: border-box;
}
div[role="group"] {
border: 0;
display: flex;
flex-direction: column;
flex-grow: 1;
flex-wrap: wrap;
justify-content: space-between;
margin: 0;
overflow: hidden;
padding: 5px ${tokens.spaceLg} ${tokens.spaceSm} ${tokens.spaceLg};
}
`;
export const labelStyles = css`
align-items: center;
border-radius: ${tokens.border.radius};
cursor: pointer;
display: flex;
height: 22px;
justify-content: center;
width: 46px;
&:hover {
${hoveredItemStyles}
}
${({ isSelected }) => (isSelected ? selectedItemStyles : null)}
`;
export const listStyles = css`
display: flex;
flex-direction: column;
width: 50%;
`;
export const optionWrapperStyles = css`
margin-bottom: 1px;
margin-right: ${tokens.spaceLg};
input[type="radio"] {
display: block;
height: 0;
margin: 0;
visibility: hidden;
width: 0;
}
`;
export const panelContentStyles = css`
display: flex;
height: calc(100% - ${stylers.spacer(5)});
`;
export const yearListStyles = css`
${listStyles}
> div[role="group"] {
border-left: 1px solid ${tokens.border.color};
}
`;