ecabs-components 1.1.98 → 1.1.99

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.
@@ -0,0 +1 @@
1
+ export declare const PHONE_MEDIA_QUERY = "(max-width: 767.98px)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecabs-components",
3
- "version": "1.1.98",
3
+ "version": "1.1.99",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.12",
6
6
  "@angular/common": "^16.2.12",
@@ -36,6 +36,9 @@
36
36
  "./utilities": {
37
37
  "sass": "./src/assets/styles/scss/utilities/index.scss"
38
38
  },
39
+ "./breakpoints": {
40
+ "sass": "./src/assets/styles/scss/utilities/_breakpoints.scss"
41
+ },
39
42
  "./package.json": {
40
43
  "default": "./package.json"
41
44
  }
package/public-api.d.ts CHANGED
@@ -153,6 +153,7 @@ export * from './lib/base/consts/badge.consts';
153
153
  export * from './lib/base/consts/status-badge.consts';
154
154
  export * from './lib/base/consts/icon.consts';
155
155
  export * from './lib/base/consts/buttons.consts';
156
+ export * from './lib/base/consts/breakpoints.consts';
156
157
  export * from './lib/base/adapters/date.adapter';
157
158
  export * from './lib/base/consts/waypoint.consts';
158
159
  export * from './lib/ecabs-dialog-confirm-deletion/ecabs-dialog-confirm-deletion.module';
@@ -0,0 +1,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 == 'small' {
21
+ @media (min-width: map.get($breakpoints, 'xs')) and (max-width: map.get($breakpoints, 'md') - 0.02px) {
22
+ @content;
23
+ }
24
+ } @else if $break == 'medium' {
25
+ @media (min-width: map.get($breakpoints, 'md')) {
26
+ @content;
27
+ }
28
+ } @else if $break == 'large' {
29
+ @media (min-width: map.get($breakpoints, 'lg')) {
30
+ @content;
31
+ }
32
+ } @else if $break == 'x-large' {
33
+ @media (min-width: map.get($breakpoints, 'xl')) {
34
+ @content;
35
+ }
36
+ } @else if $break == 'xx-large' {
37
+ @media (min-width: map.get($breakpoints, 'xxl')) {
38
+ @content;
39
+ }
40
+ } @else {
41
+ @error '"#{$break}" is not a valid breakpoint. Please enter a supported value (e.g. "small", "medium" or "large")';
42
+ }
43
+ }
@@ -35,35 +35,6 @@
35
35
  }
36
36
  }
37
37
 
38
- // ==========================================================================
39
- // Media Query Functions
40
- // ==========================================================================
41
- @mixin media-q($break) {
42
- @if $break == 'small' {
43
- @media (min-width: map-get($breakpoints, 'xs')) and (max-width: map-get($breakpoints, 'md')) {
44
- @content;
45
- }
46
- } @else if $break == 'medium' {
47
- @media (min-width: map-get($breakpoints, 'md') + 1) {
48
- @content;
49
- }
50
- } @else if $break == 'large' {
51
- @media (min-width: map-get($breakpoints, 'lg')) {
52
- @content;
53
- }
54
- } @else if $break == 'x-large' {
55
- @media (min-width: map-get($breakpoints, 'xl')) {
56
- @content;
57
- }
58
- } @else if $break == 'xx-large' {
59
- @media (min-width: map-get($breakpoints, 'xxl')) {
60
- @content;
61
- }
62
- } @else {
63
- @error '"#{$break}" is not a valid breakpoint. Please enter a supported value (e.g. "small", "medium" or "large")';
64
- }
65
- }
66
-
67
38
  // ==========================================================================
68
39
  // Sized-control button v2 metrics
69
40
  // ==========================================================================
@@ -1,3 +1,5 @@
1
+ @import "breakpoints";
2
+
1
3
  /* #Box shadows */
2
4
  $box-shadow-default: 0px 0px 10px rgba(0, 0, 0, 0.1);
3
5
  $box-shadow-medium: 0px 1px 2px 0px #0000000D;
@@ -12,16 +14,6 @@ $border-radius-large: 8px;
12
14
  /* #Transition */
13
15
  $trans-duration-style: .24s ease-out;
14
16
 
15
- /* #Viewport Breakpoints */
16
- $breakpoints: (
17
- xs: 0,
18
- sm: 576px,
19
- md: 768px,
20
- lg: 992px,
21
- xl: 1200px,
22
- xxl: 1400px
23
- );
24
-
25
17
  :root {
26
18
  --mat-standard-button-toggle-shape: #{calc-rem($border-radius-large)};
27
19
  --mat-option-label-text-color: var(--color-gray-900);