@microsoft/atlas-css 3.53.0 → 3.55.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/dist/class-names.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
- package/src/atomics/typography.scss +5 -5
- package/src/components/accordion.scss +133 -0
- package/src/components/form/select.scss +4 -17
- package/src/components/index.scss +1 -0
- package/src/mixins/chevron.scss +48 -0
- package/src/mixins/index.scss +1 -0
package/package.json
CHANGED
|
@@ -199,23 +199,23 @@
|
|
|
199
199
|
// Line height
|
|
200
200
|
|
|
201
201
|
.line-height-normal {
|
|
202
|
-
line-height: $line-height-normal;
|
|
202
|
+
line-height: $line-height-normal !important;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
// White space
|
|
206
206
|
|
|
207
207
|
.white-space-normal {
|
|
208
|
-
white-space: normal;
|
|
208
|
+
white-space: normal !important;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
.white-space-nowrap {
|
|
212
|
-
white-space: nowrap;
|
|
212
|
+
white-space: nowrap !important;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
.white-space-pre {
|
|
216
|
-
white-space: pre;
|
|
216
|
+
white-space: pre !important;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
.white-space-pre-wrap {
|
|
220
|
-
white-space: pre-wrap;
|
|
220
|
+
white-space: pre-wrap !important;
|
|
221
221
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
$accordion-font-size-sm: $font-size-9 !default;
|
|
2
|
+
$accordion-font-size-md: $font-size-8 !default;
|
|
3
|
+
$accordion-font-size-lg: $font-size-7 !default;
|
|
4
|
+
$accordion-font-size-xl: $font-size-6 !default;
|
|
5
|
+
$accordion-font-size-xxl: $font-size-5 !default;
|
|
6
|
+
|
|
7
|
+
$accordion-gap: $layout-2 !default;
|
|
8
|
+
$accordion-spacing: $spacer-4 !default;
|
|
9
|
+
$accordion-transition: transform 0.15s !default;
|
|
10
|
+
|
|
11
|
+
// Spacing and font-size
|
|
12
|
+
|
|
13
|
+
@mixin accordion-summary-sizes($font-size) {
|
|
14
|
+
$icon-before-offset-size: calc($font-size - 0.375rem);
|
|
15
|
+
$icon-after-offset-size: calc($font-size - 0.5rem);
|
|
16
|
+
|
|
17
|
+
summary {
|
|
18
|
+
font-size: $font-size;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:not(.accordion-icon-end) summary {
|
|
22
|
+
&::before {
|
|
23
|
+
margin-block-start: $icon-before-offset-size;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.accordion-icon-end summary {
|
|
28
|
+
&::after {
|
|
29
|
+
margin-block-start: $icon-after-offset-size;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.accordion {
|
|
35
|
+
@include accordion-summary-sizes($accordion-font-size-md);
|
|
36
|
+
|
|
37
|
+
summary {
|
|
38
|
+
display: flex;
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
padding-block: $accordion-spacing;
|
|
42
|
+
gap: $accordion-gap;
|
|
43
|
+
|
|
44
|
+
&::before,
|
|
45
|
+
&::after {
|
|
46
|
+
// Prevents chevron from being clipped when accordion title is long
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
color: $primary-hover;
|
|
52
|
+
|
|
53
|
+
&::before,
|
|
54
|
+
&::after {
|
|
55
|
+
border-color: $primary-hover;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.accordion-header {
|
|
60
|
+
flex-grow: 1;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:not(.accordion-icon-end) {
|
|
65
|
+
summary::before {
|
|
66
|
+
@include chevron-right;
|
|
67
|
+
|
|
68
|
+
transition: $accordion-transition;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:dir(rtl) summary::before {
|
|
72
|
+
@include chevron-right-rtl;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&.accordion-icon-end {
|
|
77
|
+
summary::after {
|
|
78
|
+
@include chevron-down;
|
|
79
|
+
|
|
80
|
+
transition: $accordion-transition;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:dir(rtl) summary::after {
|
|
84
|
+
@include chevron-down-rtl;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&[open] {
|
|
89
|
+
&:not(.accordion-icon-end) {
|
|
90
|
+
summary::before {
|
|
91
|
+
transform: $chevron-down-rotate translate(calc($chevron-arrow-size / 2), 0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* stylelint-disable-next-line selector-max-specificity, rule-empty-line-before */
|
|
95
|
+
&:dir(rtl) summary::before {
|
|
96
|
+
transform: $chevron-down-rotate-rtl translate(calc($chevron-arrow-size / 2 * -1), 0);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.accordion-icon-end {
|
|
101
|
+
summary::after {
|
|
102
|
+
transform: $chevron-up-rotate-scale-xy;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* stylelint-disable-next-line selector-max-specificity, rule-empty-line-before */
|
|
106
|
+
&:dir(rtl) summary::after {
|
|
107
|
+
transform: $chevron-up-rotate-scale-xy-rtl;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.accordion-content {
|
|
113
|
+
font-size: $accordion-font-size-md;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Sizes
|
|
117
|
+
|
|
118
|
+
&.accordion-sm {
|
|
119
|
+
@include accordion-summary-sizes($accordion-font-size-sm);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.accordion-lg {
|
|
123
|
+
@include accordion-summary-sizes($accordion-font-size-lg);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.accordion-xl {
|
|
127
|
+
@include accordion-summary-sizes($accordion-font-size-xl);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&.accordion-xxl {
|
|
131
|
+
@include accordion-summary-sizes($accordion-font-size-xxl);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -19,10 +19,6 @@ $select-success-border-color: $success !default;
|
|
|
19
19
|
|
|
20
20
|
$select-focus-box-shadow-size: 0 0.0625rem 0 0 !default;
|
|
21
21
|
|
|
22
|
-
$select-arrow-size: 0.525em !default;
|
|
23
|
-
$select-arrow-border-width: 1px !default;
|
|
24
|
-
$select-arrow-actual-width: 0.75em !default;
|
|
25
|
-
|
|
26
22
|
.select {
|
|
27
23
|
position: relative;
|
|
28
24
|
font-size: $control-font-size;
|
|
@@ -72,24 +68,15 @@ $select-arrow-actual-width: 0.75em !default;
|
|
|
72
68
|
|
|
73
69
|
&:not(.select-multiple) {
|
|
74
70
|
select {
|
|
75
|
-
padding-inline-end: calc($control-padding-horizontal + $
|
|
71
|
+
padding-inline-end: calc($control-padding-horizontal + $chevron-arrow-actual-width);
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
&::after {
|
|
75
|
+
@include chevron-down;
|
|
76
|
+
|
|
79
77
|
display: block;
|
|
80
78
|
position: absolute;
|
|
81
|
-
inset-block-start: calc(50% - $
|
|
82
|
-
width: $select-arrow-size;
|
|
83
|
-
height: $select-arrow-size;
|
|
84
|
-
transform: rotate(-45deg);
|
|
85
|
-
transform-origin: center;
|
|
86
|
-
border: $select-arrow-border-width solid $select-color;
|
|
87
|
-
border-block-start: 0;
|
|
88
|
-
border-inline-end: 0;
|
|
89
|
-
pointer-events: none;
|
|
90
|
-
content: ' ';
|
|
91
|
-
z-index: $zindex-active;
|
|
92
|
-
inset-inline-end: $control-padding-horizontal;
|
|
79
|
+
inset-block-start: calc(50% - $chevron-arrow-actual-width / 2);
|
|
93
80
|
}
|
|
94
81
|
|
|
95
82
|
&.select-disabled::after {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
$chevron-color: $text !default;
|
|
2
|
+
$chevron-arrow-size: 0.525em !default;
|
|
3
|
+
$chevron-arrow-border-width: 1px !default;
|
|
4
|
+
$chevron-arrow-actual-width: 0.75em !default;
|
|
5
|
+
$chevron-down-rotate: rotate(-45deg) !default;
|
|
6
|
+
$chevron-down-rotate-rtl: rotate(-315deg) !default;
|
|
7
|
+
$chevron-right-rotate-rtl: rotate(-225deg) !default;
|
|
8
|
+
$chevron-right-rotate: rotate(-135deg) !default;
|
|
9
|
+
$chevron-up-rotate: rotate(-225deg) !default;
|
|
10
|
+
$chevron-up-rotate-scale-xy: $chevron-down-rotate scaleY(-1) scaleX(-1);
|
|
11
|
+
$chevron-up-rotate-scale-xy-rtl: $chevron-down-rotate-rtl scaleY(-1) scaleX(-1);
|
|
12
|
+
|
|
13
|
+
%chevron {
|
|
14
|
+
width: $chevron-arrow-size;
|
|
15
|
+
height: $chevron-arrow-size;
|
|
16
|
+
transform-origin: center;
|
|
17
|
+
border: $chevron-arrow-border-width solid $chevron-color;
|
|
18
|
+
border-block-start: 0;
|
|
19
|
+
border-inline-end: 0;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
content: ' ';
|
|
22
|
+
z-index: $zindex-active;
|
|
23
|
+
inset-inline-end: $control-padding-horizontal;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin chevron-right {
|
|
27
|
+
@extend %chevron;
|
|
28
|
+
|
|
29
|
+
transform: $chevron-right-rotate;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin chevron-right-rtl {
|
|
33
|
+
@extend %chevron;
|
|
34
|
+
|
|
35
|
+
transform: $chevron-right-rotate-rtl;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@mixin chevron-down {
|
|
39
|
+
@extend %chevron;
|
|
40
|
+
|
|
41
|
+
transform: $chevron-down-rotate;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@mixin chevron-down-rtl {
|
|
45
|
+
@extend %chevron;
|
|
46
|
+
|
|
47
|
+
transform: $chevron-down-rotate-rtl;
|
|
48
|
+
}
|