@trilogy-ds/styles 4.14.0-datepicker-native → 4.14.0-dropdown
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/dist/default/trilogy-mangled.css +1 -1
- package/dist/default/trilogy-partials.css +1 -1
- package/dist/default/trilogy.css +1 -1
- package/framework/src/components/_autolayout.scss +6 -6
- package/framework/src/components/_divider.scss +27 -4
- package/framework/src/components/_dropdown.scss +191 -0
- package/framework/src/components/_flex-box.scss +1 -0
- package/framework/src/components/_index.scss +1 -0
- package/framework/src/theming/buttons_partial.scss +2 -2
- package/package.json +6 -1
|
@@ -29,6 +29,9 @@ body:not(.is-tight) {
|
|
|
29
29
|
.stepper:not(.flex-box > .stepper):not(:last-child) {
|
|
30
30
|
margin-bottom: 24px;
|
|
31
31
|
}
|
|
32
|
+
.alert:not(.flex-box > .alert):not(:last-child) {
|
|
33
|
+
margin-bottom: 24px;
|
|
34
|
+
}
|
|
32
35
|
.pagination:not(.flex-box > .pagination):not(:last-child) {
|
|
33
36
|
margin-bottom: 24px;
|
|
34
37
|
}
|
|
@@ -41,9 +44,6 @@ body:not(.is-tight) {
|
|
|
41
44
|
.range:not(.flex-box > .range):not(:last-child) {
|
|
42
45
|
margin-bottom: 24px;
|
|
43
46
|
}
|
|
44
|
-
.stepper:not(.flex-box > .stepper):not(:last-child) {
|
|
45
|
-
margin-bottom: 24px;
|
|
46
|
-
}
|
|
47
47
|
.price-container:not(.flex-box > .price-container):not(:last-child) {
|
|
48
48
|
margin-bottom: 12px;
|
|
49
49
|
}
|
|
@@ -195,6 +195,9 @@ body:not(.is-tight) {
|
|
|
195
195
|
.stepper:not(.flex-box > .stepper):not(:last-child) {
|
|
196
196
|
margin-bottom: 16px;
|
|
197
197
|
}
|
|
198
|
+
.alert:not(.flex-box > .alert):not(:last-child) {
|
|
199
|
+
margin-bottom: 16px;
|
|
200
|
+
}
|
|
198
201
|
.pagination:not(.flex-box > .pagination):not(:last-child) {
|
|
199
202
|
margin-bottom: 16px;
|
|
200
203
|
}
|
|
@@ -207,9 +210,6 @@ body:not(.is-tight) {
|
|
|
207
210
|
.range:not(.flex-box > .range):not(:last-child) {
|
|
208
211
|
margin-bottom: 16px;
|
|
209
212
|
}
|
|
210
|
-
.stepper:not(.flex-box > .stepper):not(:last-child) {
|
|
211
|
-
margin-bottom: 16px;
|
|
212
|
-
}
|
|
213
213
|
.price-container:not(.flex-box > .price-container):not(:last-child) {
|
|
214
214
|
margin-bottom: 8px;
|
|
215
215
|
}
|
|
@@ -1,14 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
@mixin divider {
|
|
2
|
+
content:'';
|
|
3
|
+
flex: 1;
|
|
4
|
+
height: 1px;
|
|
2
5
|
background-color: getColor('neutral');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.divider {
|
|
3
9
|
height: 1px;
|
|
4
10
|
display: flex;
|
|
5
11
|
justify-content: center;
|
|
6
12
|
align-items: center;
|
|
7
13
|
|
|
8
14
|
p.divider-content {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
flex-wrap: nowrap;
|
|
16
|
+
width: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
20
|
+
&::before {
|
|
21
|
+
@include divider
|
|
22
|
+
}
|
|
23
|
+
&::after {
|
|
24
|
+
@include divider
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:not(:empty) {
|
|
28
|
+
&::before {
|
|
29
|
+
margin-right: $spacing-4;
|
|
30
|
+
}
|
|
31
|
+
&::after {
|
|
32
|
+
margin-left: $spacing-4;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
12
35
|
}
|
|
13
36
|
|
|
14
37
|
&:not(.is-marginless) {
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@import "../utilities/spacing";
|
|
3
|
+
|
|
4
|
+
$dropdown-border-radius: var(--radius-small);
|
|
5
|
+
$dropdown-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
|
6
|
+
$dropdown-item-padding-vertical: 12px;
|
|
7
|
+
$dropdown-item-padding-horizontal: 16px;
|
|
8
|
+
|
|
9
|
+
.dropdown {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: block;
|
|
12
|
+
|
|
13
|
+
&.is-active {
|
|
14
|
+
.dropdown-menu {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dropdown-manual {
|
|
21
|
+
.dropdown-menu {
|
|
22
|
+
top: 100%;
|
|
23
|
+
margin-top: 0px;
|
|
24
|
+
&[data-position="upward"] {
|
|
25
|
+
top: auto;
|
|
26
|
+
bottom: 100%;
|
|
27
|
+
margin-top: 0;
|
|
28
|
+
margin-bottom: 85px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dropdown-menu {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 100%;
|
|
36
|
+
left: 0;
|
|
37
|
+
z-index: 1000;
|
|
38
|
+
display: none;
|
|
39
|
+
margin-top: 15px;
|
|
40
|
+
background-color: getColor('background');
|
|
41
|
+
border-radius: $dropdown-border-radius;
|
|
42
|
+
box-shadow: $dropdown-shadow;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
max-height: 300px;
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
padding-top: 12px;
|
|
47
|
+
padding-bottom: 12px;
|
|
48
|
+
padding-left: 16px;
|
|
49
|
+
padding-right: 16px;
|
|
50
|
+
width: max-content;
|
|
51
|
+
min-width: 200px;
|
|
52
|
+
opacity: 0;
|
|
53
|
+
transform: translateY(-10px);
|
|
54
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
55
|
+
|
|
56
|
+
&[data-position="upward"] {
|
|
57
|
+
top: auto;
|
|
58
|
+
bottom: 100%;
|
|
59
|
+
margin-top: 0;
|
|
60
|
+
margin-bottom: 15px;
|
|
61
|
+
transform: translateY(10px);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&::-webkit-scrollbar {
|
|
65
|
+
width: 6px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&::-webkit-scrollbar-track {
|
|
69
|
+
background: transparent;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&::-webkit-scrollbar-thumb {
|
|
73
|
+
background: getColor('main-fade');
|
|
74
|
+
border-radius: 3px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.dropdown-content {
|
|
79
|
+
padding: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.dropdown-item {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
padding: $dropdown-item-padding-vertical $dropdown-item-padding-horizontal;
|
|
86
|
+
color: getColor('font');
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
transition: background-color 0.2s ease;
|
|
90
|
+
border: none;
|
|
91
|
+
border-radius: $dropdown-border-radius;
|
|
92
|
+
background: none;
|
|
93
|
+
width: 100%;
|
|
94
|
+
text-align: left;
|
|
95
|
+
font-size: inherit;
|
|
96
|
+
font-family: inherit;
|
|
97
|
+
line-height: 1.4;
|
|
98
|
+
|
|
99
|
+
.icon {
|
|
100
|
+
margin-right: 12px;
|
|
101
|
+
flex-shrink: 0;
|
|
102
|
+
|
|
103
|
+
&.is-smaller {
|
|
104
|
+
width: 16px;
|
|
105
|
+
height: 16px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:not(:disabled):not([aria-disabled="true"]) {
|
|
110
|
+
#{$hoverSelector},
|
|
111
|
+
&:focus {
|
|
112
|
+
background-color: getColor('main-fade');
|
|
113
|
+
outline: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:active {
|
|
117
|
+
background-color: getColor('main-fade');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&.is-active {
|
|
122
|
+
background-color: getColor('main-fade');
|
|
123
|
+
font-weight: $weight-semibold;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:disabled,
|
|
127
|
+
&[aria-disabled="true"] {
|
|
128
|
+
color: getColor('disabled');
|
|
129
|
+
cursor: not-allowed;
|
|
130
|
+
background-color: transparent;
|
|
131
|
+
|
|
132
|
+
.icon {
|
|
133
|
+
opacity: 0.5;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.dropdown-item:disabled, .dropdown-item[aria-disabled=true] {
|
|
139
|
+
background-color: transparent !important;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.dropdown-group {
|
|
143
|
+
&:not(:first-child) {
|
|
144
|
+
border-top: 2px solid getColor('neutral-fade');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:not(:last-child) {
|
|
148
|
+
margin-bottom: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.dropdown-item {
|
|
152
|
+
&:first-child {
|
|
153
|
+
border-top: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.is-no-separator {
|
|
158
|
+
border-top: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@include mobile {
|
|
163
|
+
.dropdown-menu {
|
|
164
|
+
left: 0;
|
|
165
|
+
max-height: 250px;
|
|
166
|
+
width: max-content;
|
|
167
|
+
min-width: 200px;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.dropdown.is-active .dropdown-menu {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
transform: translateY(0);
|
|
174
|
+
|
|
175
|
+
&[data-position="upward"] {
|
|
176
|
+
opacity: 1;
|
|
177
|
+
transform: translateY(0);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.dropdown-menu.is-visible {
|
|
182
|
+
display: block;
|
|
183
|
+
opacity: 1;
|
|
184
|
+
transform: translateY(0);
|
|
185
|
+
|
|
186
|
+
&[data-position="upward"] {
|
|
187
|
+
display: block;
|
|
188
|
+
opacity: 1;
|
|
189
|
+
transform: translateY(0);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -9,8 +9,8 @@ Colors for buttons
|
|
|
9
9
|
$button-colors: (
|
|
10
10
|
'accent':['conversion', 'accent', 'background'],
|
|
11
11
|
'primary': ['primary', 'main', 'background'],
|
|
12
|
-
'secondary': ['secondary', 'main-fade', '
|
|
13
|
-
'ghost': ['ghost', 'transparent', '
|
|
12
|
+
'secondary': ['secondary', 'main-fade', 'font'],
|
|
13
|
+
'ghost': ['ghost', 'transparent', 'font']
|
|
14
14
|
) !default;
|
|
15
15
|
|
|
16
16
|
%buttons-states {
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trilogy-ds/styles",
|
|
3
|
-
"version": "4.14.0-
|
|
3
|
+
"version": "4.14.0-dropdown",
|
|
4
4
|
"author": "Bouygues Telecom",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/BouyguesTelecom/trilogy",
|
|
8
|
+
"directory": "packages/styles"
|
|
9
|
+
},
|
|
5
10
|
"license": "UNLICENSED",
|
|
6
11
|
"files": [
|
|
7
12
|
"framework/src",
|