pallote-react 0.2.25
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/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/components/Accordion.js +70 -0
- package/dist/components/AccordionItem.js +90 -0
- package/dist/components/Alert.js +86 -0
- package/dist/components/Breadcrumbs.js +40 -0
- package/dist/components/Button.js +74 -0
- package/dist/components/Buttons.js +41 -0
- package/dist/components/Card.js +74 -0
- package/dist/components/CardActions.js +34 -0
- package/dist/components/CardContent.js +34 -0
- package/dist/components/CardHeader.js +83 -0
- package/dist/components/CardMedia.js +48 -0
- package/dist/components/Checkbox.js +54 -0
- package/dist/components/Checkboxes.js +76 -0
- package/dist/components/Chip.js +58 -0
- package/dist/components/Component.js +38 -0
- package/dist/components/Display.js +48 -0
- package/dist/components/Divider.js +39 -0
- package/dist/components/Grid.js +73 -0
- package/dist/components/Input.js +101 -0
- package/dist/components/Layer.js +55 -0
- package/dist/components/Link.js +42 -0
- package/dist/components/List.js +34 -0
- package/dist/components/ListItem.js +47 -0
- package/dist/components/Loader.js +45 -0
- package/dist/components/Modal.js +75 -0
- package/dist/components/ModalActions.js +31 -0
- package/dist/components/ModalContent.js +31 -0
- package/dist/components/ModalHeader.js +29 -0
- package/dist/components/Nav.js +39 -0
- package/dist/components/NavBar.js +53 -0
- package/dist/components/NavGroup.js +30 -0
- package/dist/components/NavItem.js +73 -0
- package/dist/components/Page.js +30 -0
- package/dist/components/PageHeader.js +57 -0
- package/dist/components/Paragraph.js +54 -0
- package/dist/components/Radio.js +53 -0
- package/dist/components/RadioButtons.js +76 -0
- package/dist/components/Section.js +59 -0
- package/dist/components/SectionHeader.js +45 -0
- package/dist/components/Select.js +80 -0
- package/dist/components/Snippet.js +49 -0
- package/dist/components/Status.js +42 -0
- package/dist/components/Step.js +63 -0
- package/dist/components/Stepper.js +81 -0
- package/dist/components/Switch.js +56 -0
- package/dist/components/Table.js +55 -0
- package/dist/components/TableBody.js +30 -0
- package/dist/components/TableCell.js +46 -0
- package/dist/components/TableFooter.js +89 -0
- package/dist/components/TableHead.js +37 -0
- package/dist/components/TableRow.js +30 -0
- package/dist/components/Tabs.js +30 -0
- package/dist/components/TabsContent.js +28 -0
- package/dist/components/TabsControl.js +46 -0
- package/dist/components/Tag.js +42 -0
- package/dist/components/Text.js +63 -0
- package/dist/components/Textarea.js +82 -0
- package/dist/components/Tooltip.js +52 -0
- package/dist/index.js +376 -0
- package/dist/styles/common/_global.scss +98 -0
- package/dist/styles/common/_mixins.scss +58 -0
- package/dist/styles/common/_variables.scss +222 -0
- package/dist/styles/components/accordion.scss +181 -0
- package/dist/styles/components/button.scss +210 -0
- package/dist/styles/components/buttons.scss +56 -0
- package/dist/styles/components/card.scss +243 -0
- package/dist/styles/components/checkbox.scss +78 -0
- package/dist/styles/components/chip.scss +77 -0
- package/dist/styles/components/component.scss +17 -0
- package/dist/styles/components/detail.scss +36 -0
- package/dist/styles/components/divider.scss +54 -0
- package/dist/styles/components/form-field.scss +262 -0
- package/dist/styles/components/link.scss +36 -0
- package/dist/styles/components/loader.scss +131 -0
- package/dist/styles/components/modal.scss +112 -0
- package/dist/styles/components/nav-group.scss +72 -0
- package/dist/styles/components/nav-item.scss +127 -0
- package/dist/styles/components/navbar.scss +41 -0
- package/dist/styles/components/page.scss +48 -0
- package/dist/styles/components/radio.scss +58 -0
- package/dist/styles/components/section.scss +169 -0
- package/dist/styles/components/snippet.scss +79 -0
- package/dist/styles/components/stepper.scss +78 -0
- package/dist/styles/components/switch.scss +71 -0
- package/dist/styles/components/table.scss +167 -0
- package/dist/styles/components/tabs.scss +102 -0
- package/dist/styles/components/tag.scss +41 -0
- package/dist/styles/components/tooltip.scss +65 -0
- package/dist/styles/index.scss +8 -0
- package/dist/styles/mixins/layer.scss +109 -0
- package/dist/styles/mixins/text.scss +150 -0
- package/package.json +91 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// misc
|
|
3
|
+
// media queries
|
|
4
|
+
// —————————————————————————————————————————————————————————————————
|
|
5
|
+
|
|
6
|
+
// —————————————————————————————————————————————————————————————————
|
|
7
|
+
// misc
|
|
8
|
+
// —————————————————————————————————————————————————————————————————
|
|
9
|
+
|
|
10
|
+
@mixin calc($property, $expression) {
|
|
11
|
+
#{$property}: -webkit-calc(#{$expression});
|
|
12
|
+
#{$property}: calc(#{$expression});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin hover {
|
|
16
|
+
&:hover, &:active, &:focus {
|
|
17
|
+
@content;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// —————————————————————————————————————————————————————————————————
|
|
22
|
+
// media queries
|
|
23
|
+
// —————————————————————————————————————————————————————————————————
|
|
24
|
+
|
|
25
|
+
@mixin responsive($value, $breakpoint) {
|
|
26
|
+
@if $value == up {
|
|
27
|
+
$value: min-width;
|
|
28
|
+
@if $breakpoint == desktop { $breakpoint: $desktop-up; }
|
|
29
|
+
@else if $breakpoint == laptop { $breakpoint: $laptop-up; }
|
|
30
|
+
@else if $breakpoint == tablet { $breakpoint: $tablet-up; }
|
|
31
|
+
@else if $breakpoint == mobile { $breakpoint: $mobile-up; }
|
|
32
|
+
@else if $breakpoint == mobile-sm { $breakpoint: $mobile-sm-up; }
|
|
33
|
+
|
|
34
|
+
} @else if $value == down {
|
|
35
|
+
$value: max-width;
|
|
36
|
+
@if $breakpoint == desktop { $breakpoint: $desktop-down; }
|
|
37
|
+
@else if $breakpoint == laptop { $breakpoint: $laptop-down; }
|
|
38
|
+
@else if $breakpoint == tablet { $breakpoint: $tablet-down; }
|
|
39
|
+
@else if $breakpoint == mobile { $breakpoint: $mobile-down; }
|
|
40
|
+
@else if $breakpoint == mobile-sm { $breakpoint: $mobile-sm-down; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media ($value: $breakpoint) {
|
|
44
|
+
@content;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mixin responsive-touch() {
|
|
49
|
+
@media (pointer: coarse) {
|
|
50
|
+
@content;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@mixin responsive-mobile-landscape {
|
|
55
|
+
@media only screen and (max-device-width: $laptop-down) and (orientation: landscape) {
|
|
56
|
+
@content;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// colors
|
|
3
|
+
// spacing
|
|
4
|
+
// typography
|
|
5
|
+
// breakpoints
|
|
6
|
+
// misc
|
|
7
|
+
// —————————————————————————————————————————————————————————————————
|
|
8
|
+
|
|
9
|
+
// —————————————————————————————————————————————————————————————————
|
|
10
|
+
// colors
|
|
11
|
+
// —————————————————————————————————————————————————————————————————
|
|
12
|
+
|
|
13
|
+
// common
|
|
14
|
+
|
|
15
|
+
$black: #000A1E !default;
|
|
16
|
+
$white: #FFFFFF !default;
|
|
17
|
+
|
|
18
|
+
// grey gradient
|
|
19
|
+
|
|
20
|
+
$grey-90: #1A2335 !default;
|
|
21
|
+
$grey-80: #333B4B !default;
|
|
22
|
+
$grey-70: #4D5462 !default;
|
|
23
|
+
$grey-60: #666C78 !default;
|
|
24
|
+
$grey-50: #7F848E !default;
|
|
25
|
+
$grey-40: #999DA5 !default;
|
|
26
|
+
$grey-30: #B2B5BB !default;
|
|
27
|
+
$grey-20: #CCCED2 !default;
|
|
28
|
+
$grey-10: #E5E6E8 !default;
|
|
29
|
+
$grey-5: #F2F3F4 !default;
|
|
30
|
+
|
|
31
|
+
// text
|
|
32
|
+
|
|
33
|
+
$text: $white !default;
|
|
34
|
+
$text-alt: rgba($text, 0.66) !default;
|
|
35
|
+
$text-disabled: rgba($text, 0.33) !default;
|
|
36
|
+
$text-contrast: $black !default;
|
|
37
|
+
$text-contrast-alt: rgba($text-contrast, 0.66) !default;
|
|
38
|
+
$text-contrast-disabled: rgba($text-contrast, 0.33) !default;
|
|
39
|
+
|
|
40
|
+
// brand
|
|
41
|
+
|
|
42
|
+
$primary: #00F3FF !default;
|
|
43
|
+
$primary-light: mix($white, $primary, 70%) !default;
|
|
44
|
+
$primary-dark: mix($black, $primary, 50%) !default;
|
|
45
|
+
$primary-text-contrast: $text-contrast !default;
|
|
46
|
+
|
|
47
|
+
$secondary: #E7FC00 !default;
|
|
48
|
+
$secondary-light: mix($white, $secondary, 70%) !default;
|
|
49
|
+
$secondary-dark: mix($black, $secondary, 50%) !default;
|
|
50
|
+
$secondary-text-contrast: $text-contrast !default;
|
|
51
|
+
|
|
52
|
+
$highlight: #FF74E6 !default;
|
|
53
|
+
$highlight-light: mix($white, $highlight, 70%) !default;
|
|
54
|
+
$highlight-dark: mix($black, $highlight, 50%) !default;
|
|
55
|
+
$highlight-text-contrast: $text-contrast !default;
|
|
56
|
+
|
|
57
|
+
// misc
|
|
58
|
+
|
|
59
|
+
$background: $black !default;
|
|
60
|
+
$paper: $grey-90 !default;
|
|
61
|
+
|
|
62
|
+
$overlay: rgba($white, 0.1) !default;
|
|
63
|
+
$hover: rgba($white, 0.08) !default;
|
|
64
|
+
$backdrop: rgba($white, 0.2) !default;
|
|
65
|
+
|
|
66
|
+
$border: rgba($white, 0.2) !default;
|
|
67
|
+
$border-contrast: rgba($black, 0.2) !default;
|
|
68
|
+
|
|
69
|
+
// feedback
|
|
70
|
+
|
|
71
|
+
$success-light: #E7F9EE !default;
|
|
72
|
+
$success: #26a95d !default;
|
|
73
|
+
$success-dark: #1C7C44 !default;
|
|
74
|
+
$success-text: #155F34 !default;
|
|
75
|
+
$success-text-contrast: $text !default;
|
|
76
|
+
|
|
77
|
+
$info-light: #E9F8FD !default;
|
|
78
|
+
$info: #17A0CC !default;
|
|
79
|
+
$info-dark: #117798 !default;
|
|
80
|
+
$info-text: #0D5A72 !default;
|
|
81
|
+
$info-text-contrast: $text !default;
|
|
82
|
+
|
|
83
|
+
$warning-light: #FFFAE5 !default;
|
|
84
|
+
$warning: #FFDC46 !default;
|
|
85
|
+
$warning-dark: #886E00 !default;
|
|
86
|
+
$warning-text: #685400 !default;
|
|
87
|
+
$warning-text-contrast: $text-contrast !default;
|
|
88
|
+
|
|
89
|
+
$error-light: #FCE7E7 !default;
|
|
90
|
+
$error: #EB5757 !default;
|
|
91
|
+
$error-dark: #D31919 !default;
|
|
92
|
+
$error-text: #9C1212 !default;
|
|
93
|
+
$error-text-contrast: $text !default;
|
|
94
|
+
|
|
95
|
+
// social
|
|
96
|
+
|
|
97
|
+
$facebook:#1877F2;
|
|
98
|
+
$github:#4078C0;
|
|
99
|
+
$instagram: #405DE6;
|
|
100
|
+
$linkedin: #0077B5;
|
|
101
|
+
$medium:#00AB6C;
|
|
102
|
+
$twitter:#1DA1F2;
|
|
103
|
+
|
|
104
|
+
// export for use in jsx files
|
|
105
|
+
|
|
106
|
+
:export {
|
|
107
|
+
black: $black;
|
|
108
|
+
white: $white;
|
|
109
|
+
|
|
110
|
+
grey-90: $grey-90;
|
|
111
|
+
grey-80: $grey-80;
|
|
112
|
+
grey-70: $grey-70;
|
|
113
|
+
grey-60: $grey-60;
|
|
114
|
+
grey-50: $grey-50;
|
|
115
|
+
grey-40: $grey-40;
|
|
116
|
+
grey-30: $grey-30;
|
|
117
|
+
grey-20: $grey-20;
|
|
118
|
+
grey-10: $grey-10;
|
|
119
|
+
grey-5: $grey-5;
|
|
120
|
+
|
|
121
|
+
text: $text;
|
|
122
|
+
text-alt: $text-alt;
|
|
123
|
+
text-disabled: $text-disabled;
|
|
124
|
+
text-contrast: $text-contrast;
|
|
125
|
+
text-contrast-alt: $text-contrast-alt;
|
|
126
|
+
text-contrast-disabled: $text-contrast-disabled;
|
|
127
|
+
|
|
128
|
+
primary: $primary;
|
|
129
|
+
secondary: $secondary;
|
|
130
|
+
highlight: $highlight;
|
|
131
|
+
|
|
132
|
+
background: $background;
|
|
133
|
+
paper: $paper;
|
|
134
|
+
overlay: $overlay;
|
|
135
|
+
hover: $hover;
|
|
136
|
+
backdrop: $backdrop;
|
|
137
|
+
border: $border;
|
|
138
|
+
border-contrast: $border-contrast;
|
|
139
|
+
|
|
140
|
+
success: $success;
|
|
141
|
+
info: $info;
|
|
142
|
+
warning: $warning;
|
|
143
|
+
error: $error;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// —————————————————————————————————————————————————————————————————
|
|
147
|
+
// spacing
|
|
148
|
+
// —————————————————————————————————————————————————————————————————
|
|
149
|
+
|
|
150
|
+
$spacing: 0.5rem !default; // 8px
|
|
151
|
+
|
|
152
|
+
$page-gutter: calc(100vw / 12) !default;
|
|
153
|
+
$page-max-width: 1200px !default;
|
|
154
|
+
$page-column: calc(100% / 12) !default;
|
|
155
|
+
|
|
156
|
+
$section-spacing: $spacing*8 !default;
|
|
157
|
+
$section-spacing-content: $spacing*6 !default;
|
|
158
|
+
|
|
159
|
+
$navbar-height: $spacing*8 !default;
|
|
160
|
+
|
|
161
|
+
// —————————————————————————————————————————————————————————————————
|
|
162
|
+
// typography
|
|
163
|
+
// —————————————————————————————————————————————————————————————————
|
|
164
|
+
|
|
165
|
+
// fonts
|
|
166
|
+
|
|
167
|
+
$font: "Barlow", "Arial", sans-serif !default;
|
|
168
|
+
|
|
169
|
+
// weight
|
|
170
|
+
|
|
171
|
+
$font-light: 300 !default;
|
|
172
|
+
$font-regular: 500 !default;
|
|
173
|
+
$font-bold: 700 !default;
|
|
174
|
+
|
|
175
|
+
// —————————————————————————————————————————————————————————————————
|
|
176
|
+
// breakpoints
|
|
177
|
+
// —————————————————————————————————————————————————————————————————
|
|
178
|
+
|
|
179
|
+
$desktop-lg: 1800px !default;
|
|
180
|
+
|
|
181
|
+
$desktop-up: 1280px !default;
|
|
182
|
+
$desktop-down: 1279.98px !default;
|
|
183
|
+
|
|
184
|
+
$laptop-up: 1024px !default;
|
|
185
|
+
$laptop-down: 1023.98px !default;
|
|
186
|
+
|
|
187
|
+
$tablet-up: 768px !default;
|
|
188
|
+
$tablet-down: 767.98px !default;
|
|
189
|
+
|
|
190
|
+
$mobile-up: 576px !default;
|
|
191
|
+
$mobile-down: 575.98px !default;
|
|
192
|
+
|
|
193
|
+
$mobile-sm-up: 375px !default;
|
|
194
|
+
$mobile-sm-down: 374.98px !default;
|
|
195
|
+
|
|
196
|
+
// —————————————————————————————————————————————————————————————————
|
|
197
|
+
// misc
|
|
198
|
+
// —————————————————————————————————————————————————————————————————
|
|
199
|
+
|
|
200
|
+
// transition
|
|
201
|
+
|
|
202
|
+
$transition-md: 0.4s ease 0s !default;
|
|
203
|
+
$transition-lg: 0.8s ease 0s !default;
|
|
204
|
+
|
|
205
|
+
// shadow
|
|
206
|
+
|
|
207
|
+
$box-shadow-sm: 0 0 $spacing $spacing*0.25 rgba($secondary ,0.2) !default;
|
|
208
|
+
$box-shadow-md: 0 0 $spacing*2 $spacing*0.5 rgba($secondary ,0.2) !default;
|
|
209
|
+
$box-shadow-lg: 0 0 $spacing*4 $spacing rgba($secondary ,0.2) !default;
|
|
210
|
+
|
|
211
|
+
// border
|
|
212
|
+
|
|
213
|
+
$border-sm: 1px solid !default;
|
|
214
|
+
$border-md: $spacing*0.25 solid !default;
|
|
215
|
+
$border-lg: $spacing*0.5 solid !default;
|
|
216
|
+
|
|
217
|
+
// border-radius
|
|
218
|
+
|
|
219
|
+
$border-radius-sm: $spacing*0.75 !default;
|
|
220
|
+
$border-radius-md: $spacing !default;
|
|
221
|
+
$border-radius-lg: $spacing*2 !default;
|
|
222
|
+
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// mixins
|
|
3
|
+
// elements
|
|
4
|
+
// size
|
|
5
|
+
// noPadding
|
|
6
|
+
// transparent
|
|
7
|
+
// gutter
|
|
8
|
+
// active
|
|
9
|
+
// disabled
|
|
10
|
+
// —————————————————————————————————————————————————————————————————
|
|
11
|
+
|
|
12
|
+
// —————————————————————————————————————————————————————————————————
|
|
13
|
+
// mixins
|
|
14
|
+
// —————————————————————————————————————————————————————————————————
|
|
15
|
+
|
|
16
|
+
@mixin size($proportion, $size) {
|
|
17
|
+
|
|
18
|
+
.accordion {
|
|
19
|
+
|
|
20
|
+
&__item {
|
|
21
|
+
border-radius: calc($size*2/3);
|
|
22
|
+
|
|
23
|
+
&:not(:last-child) {
|
|
24
|
+
margin-bottom: calc($size/3);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--active {
|
|
28
|
+
padding-bottom: $size;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__control {
|
|
33
|
+
padding: $size $size*1.5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__icon {
|
|
37
|
+
@if $proportion == lg { height: $size*1.5; width: $size*1.5; }
|
|
38
|
+
@else { height: $size*2; width: $size*2; }
|
|
39
|
+
|
|
40
|
+
&:first-child { margin-right: calc($size); }
|
|
41
|
+
&:last-child { margin-left: calc($size); }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__header {
|
|
45
|
+
|
|
46
|
+
@if $proportion == sm { margin-bottom: -1px; }
|
|
47
|
+
@if $proportion == lg { margin: -1px 0 -2px 0; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__content {
|
|
51
|
+
transition: height $transition-md;
|
|
52
|
+
will-change: height;
|
|
53
|
+
padding: 0 $size*1.5;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.accordion--gutter .accordion__item--active {
|
|
59
|
+
padding-bottom: $size*2;
|
|
60
|
+
|
|
61
|
+
.accordion__control {
|
|
62
|
+
padding-top: $size*2;
|
|
63
|
+
padding-bottom: $size*2;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.accordion--transparent .accordion__item--active {
|
|
68
|
+
margin-top: calc($size/3);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// —————————————————————————————————————————————————————————————————
|
|
73
|
+
// elements
|
|
74
|
+
// —————————————————————————————————————————————————————————————————
|
|
75
|
+
|
|
76
|
+
.accordion {
|
|
77
|
+
width: 100%;
|
|
78
|
+
|
|
79
|
+
&__item {
|
|
80
|
+
background-color: $paper;
|
|
81
|
+
width: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&__control,
|
|
85
|
+
&__content {
|
|
86
|
+
transition: padding $transition-md;
|
|
87
|
+
will-change: paddding;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__control {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
width: 100%;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&__header {
|
|
98
|
+
flex-grow: 1;
|
|
99
|
+
text-align: left;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__icon {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
height: 1.125rem;
|
|
107
|
+
width: 1.125rem;
|
|
108
|
+
|
|
109
|
+
&:first-child { margin-right: 0.5rem; }
|
|
110
|
+
&:last-child { margin-left: 0.5rem; }
|
|
111
|
+
|
|
112
|
+
&--arrow {
|
|
113
|
+
transition: transform $transition-md;
|
|
114
|
+
will-change: transform;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// —————————————————————————————————————————————————————————————————
|
|
120
|
+
// size
|
|
121
|
+
// —————————————————————————————————————————————————————————————————
|
|
122
|
+
|
|
123
|
+
.accordion {
|
|
124
|
+
|
|
125
|
+
&--sm { @include size(sm, $spacing*0.75); }
|
|
126
|
+
&--md { @include size(md, $spacing); }
|
|
127
|
+
&--lg { @include size(lg, $spacing*1.5); }
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// —————————————————————————————————————————————————————————————————
|
|
131
|
+
// transparent
|
|
132
|
+
// —————————————————————————————————————————————————————————————————
|
|
133
|
+
|
|
134
|
+
.accordion--transparent {
|
|
135
|
+
|
|
136
|
+
.accordion__item {
|
|
137
|
+
transition: background-color $transition-md, margin $transition-md;
|
|
138
|
+
will-change: background-color, margin;
|
|
139
|
+
background-color: transparent;
|
|
140
|
+
|
|
141
|
+
@include hover { background-color: $paper; }
|
|
142
|
+
&--active { background-color: $paper; }
|
|
143
|
+
&--disabled { @include hover { background-color: transparent; }}
|
|
144
|
+
|
|
145
|
+
&:not(:last-child):not(.accordion__item--active) {
|
|
146
|
+
margin-bottom: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// —————————————————————————————————————————————————————————————————
|
|
152
|
+
// gutter
|
|
153
|
+
// —————————————————————————————————————————————————————————————————
|
|
154
|
+
|
|
155
|
+
// see size mixin
|
|
156
|
+
|
|
157
|
+
// —————————————————————————————————————————————————————————————————
|
|
158
|
+
// active
|
|
159
|
+
// —————————————————————————————————————————————————————————————————
|
|
160
|
+
|
|
161
|
+
.accordion__item--active {
|
|
162
|
+
|
|
163
|
+
.accordion {
|
|
164
|
+
|
|
165
|
+
&__icon--arrow {
|
|
166
|
+
transform: rotate(180deg);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// —————————————————————————————————————————————————————————————————
|
|
172
|
+
// disabled
|
|
173
|
+
// —————————————————————————————————————————————————————————————————
|
|
174
|
+
|
|
175
|
+
.accordion__item--disabled {
|
|
176
|
+
opacity: 0.5;
|
|
177
|
+
|
|
178
|
+
.accordion__control {
|
|
179
|
+
cursor: not-allowed;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
@import '../mixins/layer.scss';
|
|
2
|
+
|
|
3
|
+
// —————————————————————————————————————————————————————————————————
|
|
4
|
+
// reset
|
|
5
|
+
// mixins
|
|
6
|
+
// elements
|
|
7
|
+
// color
|
|
8
|
+
// size
|
|
9
|
+
// variant
|
|
10
|
+
// fullWidth
|
|
11
|
+
// disabled
|
|
12
|
+
// isTransparent
|
|
13
|
+
// —————————————————————————————————————————————————————————————————
|
|
14
|
+
|
|
15
|
+
// —————————————————————————————————————————————————————————————————
|
|
16
|
+
// reset
|
|
17
|
+
// —————————————————————————————————————————————————————————————————
|
|
18
|
+
|
|
19
|
+
button,
|
|
20
|
+
a {
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
width: auto;
|
|
24
|
+
background: transparent;
|
|
25
|
+
color: inherit;
|
|
26
|
+
font: inherit;
|
|
27
|
+
line-height: normal;
|
|
28
|
+
appearance: none;
|
|
29
|
+
-webkit-appearance: none;
|
|
30
|
+
|
|
31
|
+
&::-moz-focus-inner {
|
|
32
|
+
border: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
svg {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// —————————————————————————————————————————————————————————————————
|
|
43
|
+
// mixins
|
|
44
|
+
// —————————————————————————————————————————————————————————————————
|
|
45
|
+
|
|
46
|
+
@mixin size($size) {
|
|
47
|
+
border-radius: $size*0.2;
|
|
48
|
+
font-size: $size*0.5;
|
|
49
|
+
height: $size;
|
|
50
|
+
|
|
51
|
+
.button {
|
|
52
|
+
border-radius: $size*0.2;
|
|
53
|
+
padding-right: calc($size / 3);
|
|
54
|
+
padding-left: calc($size / 3);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.button--icon .button {
|
|
58
|
+
width: $size;
|
|
59
|
+
padding: $size*0.25;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
p {
|
|
63
|
+
font-size: $size*0.5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.button--stroke {
|
|
67
|
+
padding-right: calc(#{calc($size/3)} - $spacing*0.25);
|
|
68
|
+
padding-left: calc(#{calc($size/3)} - $spacing*0.25);
|
|
69
|
+
height: calc(#{$size} - $spacing*0.5);
|
|
70
|
+
|
|
71
|
+
&.button--icon {
|
|
72
|
+
width: calc(#{$size} - $spacing*0.5);
|
|
73
|
+
padding: calc(#{$size*0.25} - $spacing*0.25);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.button__icons {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
|
|
82
|
+
svg {
|
|
83
|
+
width: $size*0.5;
|
|
84
|
+
height: $size*0.5;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&--left {
|
|
88
|
+
margin-right: $size*0.25;
|
|
89
|
+
margin-left: -$size*0.125;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&--right {
|
|
93
|
+
margin-right: -$size*0.125;
|
|
94
|
+
margin-left: $size*0.25;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// —————————————————————————————————————————————————————————————————
|
|
100
|
+
// elements
|
|
101
|
+
// —————————————————————————————————————————————————————————————————
|
|
102
|
+
|
|
103
|
+
.button {
|
|
104
|
+
width: 100%;
|
|
105
|
+
height: 100%;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
text-transform: uppercase;
|
|
111
|
+
font-weight: $font-bold;
|
|
112
|
+
|
|
113
|
+
&__wrapper {
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
height: auto;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// —————————————————————————————————————————————————————————————————
|
|
120
|
+
// color
|
|
121
|
+
// —————————————————————————————————————————————————————————————————
|
|
122
|
+
|
|
123
|
+
// color is handled with the Layer component
|
|
124
|
+
|
|
125
|
+
// —————————————————————————————————————————————————————————————————
|
|
126
|
+
// size
|
|
127
|
+
// —————————————————————————————————————————————————————————————————
|
|
128
|
+
|
|
129
|
+
.button {
|
|
130
|
+
|
|
131
|
+
&--xxs {
|
|
132
|
+
@include size($spacing*2.5);
|
|
133
|
+
|
|
134
|
+
&.button--icon .button {
|
|
135
|
+
padding: $spacing*0.5;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&--xs {
|
|
140
|
+
@include size($spacing*3);
|
|
141
|
+
|
|
142
|
+
&.button--icon .button {
|
|
143
|
+
padding: $spacing*0.5;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&--sm {
|
|
148
|
+
@include size($spacing*3.5);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&--md {
|
|
152
|
+
@include size($spacing*4);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&--lg {
|
|
156
|
+
@include size($spacing*4.5);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&--xl {
|
|
160
|
+
@include size($spacing*5);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// —————————————————————————————————————————————————————————————————
|
|
165
|
+
// variant
|
|
166
|
+
// —————————————————————————————————————————————————————————————————
|
|
167
|
+
|
|
168
|
+
.button {
|
|
169
|
+
|
|
170
|
+
&--stroke {
|
|
171
|
+
border-width: $spacing*0.25;
|
|
172
|
+
border-style: solid;
|
|
173
|
+
color: $text;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// —————————————————————————————————————————————————————————————————
|
|
178
|
+
// fullWidth
|
|
179
|
+
// —————————————————————————————————————————————————————————————————
|
|
180
|
+
|
|
181
|
+
.button--fullWidth {
|
|
182
|
+
width: 100%;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// —————————————————————————————————————————————————————————————————
|
|
186
|
+
// disabled
|
|
187
|
+
// —————————————————————————————————————————————————————————————————
|
|
188
|
+
|
|
189
|
+
.button--disabled {
|
|
190
|
+
opacity: 0.4;
|
|
191
|
+
|
|
192
|
+
.button {
|
|
193
|
+
cursor: not-allowed;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// —————————————————————————————————————————————————————————————————
|
|
198
|
+
// isTransparent
|
|
199
|
+
// —————————————————————————————————————————————————————————————————
|
|
200
|
+
|
|
201
|
+
.button--transparent {
|
|
202
|
+
background-color: transparent !important;
|
|
203
|
+
padding: 0;
|
|
204
|
+
height: auto;
|
|
205
|
+
|
|
206
|
+
.button {
|
|
207
|
+
padding-right: 0;
|
|
208
|
+
padding-left: 0;
|
|
209
|
+
}
|
|
210
|
+
}
|