@avenirs-esr/avenirs-dsav 0.1.107 → 0.1.108
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/avenirs-dsav.css +1 -1
- package/dist/components/base/AvMessage/AvMessage.stories.d.ts +1 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +1485 -1477
- package/package.json +1 -1
- package/src/styles/components/_grid.scss +50 -116
- package/src/styles/utilities/_helpers.scss +61 -17
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
@use '../core/namespace' as *;
|
|
2
2
|
@use '../settings/breakpoints' as bp;
|
|
3
3
|
@use '../core/spacing' as sp;
|
|
4
|
-
|
|
5
|
-
$columns: 12;
|
|
4
|
+
@use "sass:map";
|
|
6
5
|
|
|
7
6
|
// === Containers ===
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
$container-paddings: (
|
|
8
|
+
sm: sm,
|
|
9
|
+
md: sm,
|
|
10
|
+
lg: md,
|
|
11
|
+
xl: md
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
// === Base container ===
|
|
15
|
+
// Ex: .av-container, .av-container-fluid
|
|
10
16
|
@include ns("container") {
|
|
11
17
|
max-width: 90rem;
|
|
12
18
|
margin-left: auto;
|
|
@@ -14,30 +20,25 @@ $columns: 12;
|
|
|
14
20
|
padding-left: sp.get(sm);
|
|
15
21
|
padding-right: sp.get(sm);
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
&-fluid {
|
|
18
24
|
max-width: none;
|
|
19
|
-
padding-left:
|
|
20
|
-
padding-right:
|
|
25
|
+
padding-left: 0;
|
|
26
|
+
padding-right: 0;
|
|
21
27
|
overflow: hidden;
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
30
|
|
|
25
|
-
//
|
|
26
|
-
// Ex: .av-container
|
|
31
|
+
// === Responsive containers ===
|
|
32
|
+
// Ex: .av-container--md / .av-container--lg
|
|
27
33
|
@each $bp-name, $bp-value in bp.$breakpoints {
|
|
28
34
|
@media (min-width: #{$bp-value}) {
|
|
29
|
-
@include ns("container
|
|
35
|
+
@include ns("container--#{$bp-name}") {
|
|
30
36
|
width: 100%;
|
|
31
37
|
max-width: #{$bp-value};
|
|
32
38
|
margin-left: auto;
|
|
33
39
|
margin-right: auto;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
padding-right: sp.get(md);
|
|
37
|
-
} @else {
|
|
38
|
-
padding-left: sp.get(sm);
|
|
39
|
-
padding-right: sp.get(sm);
|
|
40
|
-
}
|
|
40
|
+
padding-left: sp.get(map.get($container-paddings, $bp-name));
|
|
41
|
+
padding-right: sp.get(map.get($container-paddings, $bp-name));
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -56,67 +57,32 @@ $row-alignments: (
|
|
|
56
57
|
bottom: flex-end
|
|
57
58
|
);
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
// === Mixin row layout ===
|
|
61
|
+
@mixin row-layout {
|
|
60
62
|
display: flex;
|
|
61
|
-
flex-
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
}
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
// === Base row ===
|
|
67
|
+
// Ex: .av-row / .av-row-wrap / .av-row-nowrap
|
|
68
|
+
@include ns("row") {
|
|
69
|
+
@include row-layout;
|
|
70
|
+
|
|
71
|
+
&-wrap {
|
|
72
|
+
flex-wrap: wrap;
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@each $mod-name, $align in $row-alignments {
|
|
74
|
-
&--#{$mod-name} {
|
|
75
|
-
align-items: $align;
|
|
76
|
-
}
|
|
75
|
+
&-nowrap {
|
|
76
|
+
flex-wrap: nowrap;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
// === Responsive layout for rows ===
|
|
81
|
+
// Ex: .av-row--md
|
|
80
82
|
@each $bp-name, $bp-value in bp.$breakpoints {
|
|
81
83
|
@media (min-width: #{$bp-value}) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
@include ns("row-#{$bp-name}") {
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-wrap: wrap;
|
|
87
|
-
margin-left: -#{sp.get(sm)};
|
|
88
|
-
margin-right: -#{sp.get(sm)};
|
|
89
|
-
|
|
90
|
-
> * {
|
|
91
|
-
padding-left: sp.get(sm);
|
|
92
|
-
padding-right: sp.get(sm);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&.av-no-gutters {
|
|
96
|
-
margin-left: 0;
|
|
97
|
-
margin-right: 0;
|
|
98
|
-
|
|
99
|
-
> * {
|
|
100
|
-
padding-left: 0;
|
|
101
|
-
padding-right: 0;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Horizontal alignments
|
|
106
|
-
// Ex: .av-row-md--left / .av-row-lg--center
|
|
107
|
-
@each $mod-name, $justify in $row-justifications {
|
|
108
|
-
&--#{$mod-name} {
|
|
109
|
-
justify-content: $justify;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Vertical alignments
|
|
114
|
-
// Ex: .av-row-md--top / .av-row-lg--bottom
|
|
115
|
-
@each $mod-name, $align in $row-alignments {
|
|
116
|
-
&--#{$mod-name} {
|
|
117
|
-
align-items: $align;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
84
|
+
@include ns("row--#{$bp-name}") {
|
|
85
|
+
@include row-layout;
|
|
120
86
|
}
|
|
121
87
|
}
|
|
122
88
|
}
|
|
@@ -128,56 +94,24 @@ $col-alignments: (
|
|
|
128
94
|
bottom: flex-end
|
|
129
95
|
);
|
|
130
96
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
@include ns("col-#{$bp-name}") {
|
|
136
|
-
flex: 1;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Align-self modifiers
|
|
140
|
-
// Ex: .av-col-md--top / .av-col-lg--bottom
|
|
141
|
-
@each $mod-name, $align in $col-alignments {
|
|
142
|
-
@include ns("col-#{$bp-name}--#{$mod-name}") {
|
|
143
|
-
align-self: $align;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Width and offsets
|
|
148
|
-
// Ex: .av-col-md-4 / .av-col-offset-md-2 / .av-col-offset-md-2--right
|
|
149
|
-
@for $i from 1 through $columns {
|
|
150
|
-
@include ns("col-#{$bp-name}-#{$i}") {
|
|
151
|
-
flex: 0 0 calc(100% * #{$i} / #{$columns});
|
|
152
|
-
max-width: calc(100% * #{$i} / #{$columns});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@include ns("col-offset-#{$bp-name}-#{$i}") {
|
|
156
|
-
margin-left: calc(100% * #{$i} / #{$columns});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@include ns("col-offset-#{$bp-name}-#{$i}--right") {
|
|
160
|
-
margin-left: 0;
|
|
161
|
-
margin-right: calc(100% * #{$i} / #{$columns});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
97
|
+
// === Mixin column layout ===
|
|
98
|
+
@mixin col-layout {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
165
101
|
}
|
|
166
102
|
|
|
167
|
-
// ===
|
|
168
|
-
// Ex: .av-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
);
|
|
103
|
+
// === Base column ===
|
|
104
|
+
// Ex: .av-col
|
|
105
|
+
@include ns("col") {
|
|
106
|
+
@include col-layout;
|
|
107
|
+
}
|
|
173
108
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
gap: var(--spacing-#{$size});
|
|
109
|
+
// === Responsive layout for columns ===
|
|
110
|
+
// Ex: .av-col--md
|
|
111
|
+
@each $bp-name, $bp-value in bp.$breakpoints {
|
|
112
|
+
@media (min-width: #{$bp-value}) {
|
|
113
|
+
@include ns("col--#{$bp-name}") {
|
|
114
|
+
@include col-layout;
|
|
181
115
|
}
|
|
182
116
|
}
|
|
183
117
|
}
|
|
@@ -1,24 +1,73 @@
|
|
|
1
1
|
@use '../settings/breakpoints' as bp;
|
|
2
|
+
@use '../core/spacing' as sp;
|
|
2
3
|
@use '../core/namespace' as *;
|
|
3
4
|
|
|
4
|
-
// ===
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// === Responsive utility mixin ===
|
|
6
|
+
@mixin responsive-utility($class-name, $prop, $value) {
|
|
7
|
+
// Base class
|
|
8
|
+
@include ns($class-name) {
|
|
9
|
+
#{$prop}: #{$value};
|
|
10
|
+
}
|
|
8
11
|
|
|
9
|
-
//
|
|
10
|
-
@each $bp-name, $bp-value in bp.$breakpoints {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@include ns("unhidden-#{$bp-name}") {
|
|
16
|
-
display: inherit !important;
|
|
12
|
+
// Breakpoint-specific classes
|
|
13
|
+
@each $bp-name, $bp-value in bp.$breakpoints {
|
|
14
|
+
@media (min-width: #{$bp-value}) {
|
|
15
|
+
@include ns("#{$class-name}--#{$bp-name}") {
|
|
16
|
+
#{$prop}: #{$value};
|
|
17
|
+
}
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
// === Visibility classes ===
|
|
23
|
+
// Ex: .av-hidden / .av-hidden--md / .av-unhidden / .av-unhidden--lg
|
|
24
|
+
@include responsive-utility("hidden", display, "none !important");
|
|
25
|
+
@include responsive-utility("unhidden", display, "inherit !important");
|
|
26
|
+
|
|
27
|
+
// === Gapped layouts ===
|
|
28
|
+
// Ex: .av-gap-sm / .av-gap-lg / .av-gap-lg--lg
|
|
29
|
+
@each $size, $value in sp.$spacing {
|
|
30
|
+
@include responsive-utility("gap-#{$size}", gap, var(--spacing-#{$size}));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// === Flex fill class ===
|
|
34
|
+
// Ex: .av-flex-fill / .av-flex-fill--md
|
|
35
|
+
@include responsive-utility("flex-fill", flex, "1 1 0%");
|
|
36
|
+
|
|
37
|
+
// === Full width/height classes ===
|
|
38
|
+
// Ex: .av-w-full / .av-h-full / .av-w-full--lg / .av-h-full--md
|
|
39
|
+
@include responsive-utility("w-full", width, 100%);
|
|
40
|
+
@include responsive-utility("h-full", height, 100%);
|
|
41
|
+
|
|
42
|
+
// === Flex alignment classes ===
|
|
43
|
+
// Ex: .av-align-center / .av-align-end
|
|
44
|
+
$alignments: (
|
|
45
|
+
start: flex-start,
|
|
46
|
+
center: center,
|
|
47
|
+
end: flex-end,
|
|
48
|
+
stretch: stretch,
|
|
49
|
+
baseline: baseline
|
|
50
|
+
);
|
|
51
|
+
@each $alignment, $value in $alignments {
|
|
52
|
+
@include responsive-utility("align-#{$alignment}", align-items, $value);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// === Flex justification classes ===
|
|
56
|
+
// Ex: .av-justify-center / .av-justify-between
|
|
57
|
+
$justifications: (
|
|
58
|
+
start: flex-start,
|
|
59
|
+
center: center,
|
|
60
|
+
end: flex-end,
|
|
61
|
+
between: space-between,
|
|
62
|
+
around: space-around,
|
|
63
|
+
evenly: space-evenly
|
|
64
|
+
);
|
|
65
|
+
@each $justification, $value in $justifications {
|
|
66
|
+
@include responsive-utility("justify-#{$justification}", justify-content, $value);
|
|
67
|
+
}
|
|
68
|
+
|
|
21
69
|
// === No before/after classes ===
|
|
70
|
+
// Ex: .av-no-before / .av-no-after
|
|
22
71
|
@include ns("no-after") {
|
|
23
72
|
&::after {
|
|
24
73
|
content: none !important;
|
|
@@ -71,11 +120,6 @@
|
|
|
71
120
|
display: none !important;
|
|
72
121
|
}
|
|
73
122
|
|
|
74
|
-
// === Full height class ===
|
|
75
|
-
.h-full {
|
|
76
|
-
height: 100%;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
123
|
// === Reset link background image ===
|
|
80
124
|
a,
|
|
81
125
|
[href] {
|