ecabs-components 2.0.0-alpha.11 → 2.0.0-alpha.12
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/README.md
CHANGED
|
@@ -25,6 +25,9 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
|
|
|
25
25
|
|
|
26
26
|
## Version History
|
|
27
27
|
|
|
28
|
+
- **v2.0.0-alpha.12**: Stack button groups and stretch their buttons only on phones (below 576px) instead of below 768px, so buttons stay side by side at their own size on tablets.
|
|
29
|
+
- Stacked buttons now fill the group on every screen, including dialogs, and groups wrap onto a second row when they don't fit. Adds an `x-small` case to `media-q`.
|
|
30
|
+
- A group placed directly inside another group keeps buttons together, such as Cancel and Save beside a Delete: it sizes to its buttons beside other items and fills the row when alone.
|
|
28
31
|
- **v2.0.0-alpha.11**: Switch button groups and table padding to the desktop layout at 768px instead of 769px, and share the breakpoints: apps can `@use "ecabs-components/breakpoints"` for `$breakpoints` and `media-q`, and import `PHONE_MEDIA_QUERY`.
|
|
29
32
|
- **v2.0.0-alpha.10**: Sync v1.1.96–v1.1.98 from `develop`: content beside and below `ecabs-segment`'s title (`ecabsSegmentHeaderEnd`, `ecabsSegmentHeaderBottom`), the `compact` size, `.card__header-action`, 12px `ecabs-table` panel padding up to 768px wide, and the phone paginator layout (two full-width rows up to 767px wide: page size on top, the item range with previous and next below).
|
|
30
33
|
- On this line the card and table styles use the `@use`/`@forward` module system, and the Tailwind utilities the segment template uses are compiled by Tailwind v4.
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use "../../scss/modules/index";
|
|
2
2
|
@use "../../scss/utilities/functions";
|
|
3
|
+
@use "../../scss/utilities/mixins";
|
|
3
4
|
|
|
4
5
|
.mat-mdc-dialog-container {
|
|
5
6
|
.mdc-dialog__container {
|
|
@@ -14,6 +15,12 @@
|
|
|
14
15
|
.mdc-dialog__actions {
|
|
15
16
|
padding: functions.calc-rem(0 24px 24px);
|
|
16
17
|
justify-content: end !important;
|
|
18
|
+
|
|
19
|
+
@include mixins.media-q(x-small) {
|
|
20
|
+
&.btn__group {
|
|
21
|
+
align-items: stretch;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
.mdc-dialog__content {
|
|
@@ -204,14 +204,28 @@
|
|
|
204
204
|
/* #Group */
|
|
205
205
|
@include mixins.e(group) {
|
|
206
206
|
display: flex;
|
|
207
|
+
flex-wrap: wrap;
|
|
207
208
|
width: 100%;
|
|
208
209
|
align-items: center;
|
|
209
210
|
column-gap: 1rem;
|
|
211
|
+
row-gap: 1rem;
|
|
210
212
|
margin-top: 1.2rem;
|
|
211
213
|
|
|
212
|
-
|
|
214
|
+
// A group inside another group holds buttons that belong together, such as Cancel and Save beside a Delete.
|
|
215
|
+
// Beside other items it sizes to its buttons; alone in its row it fills the row, so its own justify applies.
|
|
216
|
+
& > & {
|
|
217
|
+
width: auto;
|
|
218
|
+
margin-top: 0;
|
|
219
|
+
|
|
220
|
+
&:only-child {
|
|
221
|
+
width: 100%;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@include mixins.media-q(x-small) {
|
|
213
226
|
display: flex;
|
|
214
227
|
flex-direction: column;
|
|
228
|
+
align-items: stretch;
|
|
215
229
|
gap: 1.2rem;
|
|
216
230
|
}
|
|
217
231
|
|
|
@@ -219,7 +233,7 @@
|
|
|
219
233
|
@include mixins.m(item) {
|
|
220
234
|
min-width: functions.calc-rem(100);
|
|
221
235
|
|
|
222
|
-
@include mixins.media-q(small) {
|
|
236
|
+
@include mixins.media-q(x-small) {
|
|
223
237
|
width: 100%;
|
|
224
238
|
margin-right: 0;
|
|
225
239
|
}
|
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// Emits no CSS, so apps can `@use "ecabs-components/breakpoints"` from component styles.
|
|
4
|
-
// PHONE_MEDIA_QUERY in base/consts/breakpoints.consts.ts must match 'md' here.
|
|
5
|
-
|
|
6
|
-
// #Viewport Breakpoints
|
|
7
|
-
$breakpoints: (
|
|
8
|
-
xs: 0,
|
|
9
|
-
sm: 576px,
|
|
10
|
-
md: 768px,
|
|
11
|
-
lg: 992px,
|
|
12
|
-
xl: 1200px,
|
|
13
|
-
xxl: 1400px
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
// ==========================================================================
|
|
17
|
-
// Media Query Functions
|
|
18
|
-
// ==========================================================================
|
|
19
|
-
@mixin media-q($break) {
|
|
20
|
-
@if $break == 'small' {
|
|
21
|
-
@media (
|
|
22
|
-
@content;
|
|
23
|
-
}
|
|
24
|
-
} @else if $break == '
|
|
25
|
-
@media (min-width: map.get($breakpoints, 'md')) {
|
|
26
|
-
@content;
|
|
27
|
-
}
|
|
28
|
-
} @else if $break == '
|
|
29
|
-
@media (min-width: map.get($breakpoints, '
|
|
30
|
-
@content;
|
|
31
|
-
}
|
|
32
|
-
} @else if $break == '
|
|
33
|
-
@media (min-width: map.get($breakpoints, '
|
|
34
|
-
@content;
|
|
35
|
-
}
|
|
36
|
-
} @else if $break == '
|
|
37
|
-
@media (min-width: map.get($breakpoints, '
|
|
38
|
-
@content;
|
|
39
|
-
}
|
|
40
|
-
} @else {
|
|
41
|
-
@
|
|
42
|
-
|
|
43
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// Emits no CSS, so apps can `@use "ecabs-components/breakpoints"` from component styles.
|
|
4
|
+
// PHONE_MEDIA_QUERY in base/consts/breakpoints.consts.ts must match 'md' here.
|
|
5
|
+
|
|
6
|
+
// #Viewport Breakpoints
|
|
7
|
+
$breakpoints: (
|
|
8
|
+
xs: 0,
|
|
9
|
+
sm: 576px,
|
|
10
|
+
md: 768px,
|
|
11
|
+
lg: 992px,
|
|
12
|
+
xl: 1200px,
|
|
13
|
+
xxl: 1400px
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// ==========================================================================
|
|
17
|
+
// Media Query Functions
|
|
18
|
+
// ==========================================================================
|
|
19
|
+
@mixin media-q($break) {
|
|
20
|
+
@if $break == 'x-small' {
|
|
21
|
+
@media (max-width: map.get($breakpoints, 'sm') - 0.02px) {
|
|
22
|
+
@content;
|
|
23
|
+
}
|
|
24
|
+
} @else if $break == 'small' {
|
|
25
|
+
@media (min-width: map.get($breakpoints, 'xs')) and (max-width: map.get($breakpoints, 'md') - 0.02px) {
|
|
26
|
+
@content;
|
|
27
|
+
}
|
|
28
|
+
} @else if $break == 'medium' {
|
|
29
|
+
@media (min-width: map.get($breakpoints, 'md')) {
|
|
30
|
+
@content;
|
|
31
|
+
}
|
|
32
|
+
} @else if $break == 'large' {
|
|
33
|
+
@media (min-width: map.get($breakpoints, 'lg')) {
|
|
34
|
+
@content;
|
|
35
|
+
}
|
|
36
|
+
} @else if $break == 'x-large' {
|
|
37
|
+
@media (min-width: map.get($breakpoints, 'xl')) {
|
|
38
|
+
@content;
|
|
39
|
+
}
|
|
40
|
+
} @else if $break == 'xx-large' {
|
|
41
|
+
@media (min-width: map.get($breakpoints, 'xxl')) {
|
|
42
|
+
@content;
|
|
43
|
+
}
|
|
44
|
+
} @else {
|
|
45
|
+
@error '"#{$break}" is not a valid breakpoint. Please enter a supported value (e.g. "x-small", "small", "medium" or "large")';
|
|
46
|
+
}
|
|
47
|
+
}
|