ecabs-components 0.0.1

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.
Files changed (125) hide show
  1. package/README.md +24 -0
  2. package/esm2020/ecabs-components.mjs +5 -0
  3. package/esm2020/lib/base/directives/digits-only.directive.mjs +130 -0
  4. package/esm2020/lib/base/element-base.mjs +100 -0
  5. package/esm2020/lib/base/element-wrapper/element-wrapper.component.mjs +53 -0
  6. package/esm2020/lib/base/element-wrapper/element-wrapper.module.mjs +52 -0
  7. package/esm2020/lib/base/hint/hint.component.mjs +21 -0
  8. package/esm2020/lib/base/hint/hint.module.mjs +20 -0
  9. package/esm2020/lib/base/validation/validation.component.mjs +158 -0
  10. package/esm2020/lib/base/validation/validation.module.mjs +20 -0
  11. package/esm2020/lib/ecabs-buttons/ecabs-buttons.component.mjs +65 -0
  12. package/esm2020/lib/ecabs-buttons/ecabs-buttons.module.mjs +21 -0
  13. package/esm2020/lib/ecabs-input/ecabs-input.component.mjs +81 -0
  14. package/esm2020/lib/ecabs-input/ecabs-input.module.mjs +22 -0
  15. package/esm2020/lib/ecabs-loading/ecabs-loading.component.mjs +24 -0
  16. package/esm2020/lib/ecabs-loading/ecabs-loading.module.mjs +19 -0
  17. package/esm2020/lib/ecabs-loading/spinner/spinner.component.mjs +16 -0
  18. package/esm2020/public-api.mjs +8 -0
  19. package/fesm2015/ecabs-components.mjs +744 -0
  20. package/fesm2015/ecabs-components.mjs.map +1 -0
  21. package/fesm2020/ecabs-components.mjs +742 -0
  22. package/fesm2020/ecabs-components.mjs.map +1 -0
  23. package/index.d.ts +5 -0
  24. package/lib/base/directives/digits-only.directive.d.ts +26 -0
  25. package/lib/base/directives/digits-only.directive.ts +129 -0
  26. package/lib/base/element-base.d.ts +28 -0
  27. package/lib/base/element-base.ts +72 -0
  28. package/lib/base/element-wrapper/element-wrapper.component.d.ts +19 -0
  29. package/lib/base/element-wrapper/element-wrapper.component.html +30 -0
  30. package/lib/base/element-wrapper/element-wrapper.component.ts +33 -0
  31. package/lib/base/element-wrapper/element-wrapper.module.d.ts +16 -0
  32. package/lib/base/element-wrapper/element-wrapper.module.ts +30 -0
  33. package/lib/base/hint/hint.component.d.ts +8 -0
  34. package/lib/base/hint/hint.component.html +1 -0
  35. package/lib/base/hint/hint.component.scss +0 -0
  36. package/lib/base/hint/hint.component.ts +12 -0
  37. package/lib/base/hint/hint.module.d.ts +10 -0
  38. package/lib/base/hint/hint.module.ts +13 -0
  39. package/lib/base/validation/validation.component.d.ts +22 -0
  40. package/lib/base/validation/validation.component.html +8 -0
  41. package/lib/base/validation/validation.component.scss +0 -0
  42. package/lib/base/validation/validation.component.ts +171 -0
  43. package/lib/base/validation/validation.module.d.ts +10 -0
  44. package/lib/base/validation/validation.module.ts +12 -0
  45. package/lib/ecabs-buttons/ecabs-buttons.component.d.ts +21 -0
  46. package/lib/ecabs-buttons/ecabs-buttons.component.html +18 -0
  47. package/lib/ecabs-buttons/ecabs-buttons.component.ts +54 -0
  48. package/lib/ecabs-buttons/ecabs-buttons.module.d.ts +11 -0
  49. package/lib/ecabs-buttons/ecabs-buttons.module.ts +13 -0
  50. package/lib/ecabs-input/ecabs-input.component.d.ts +27 -0
  51. package/lib/ecabs-input/ecabs-input.component.html +26 -0
  52. package/lib/ecabs-input/ecabs-input.component.ts +83 -0
  53. package/lib/ecabs-input/ecabs-input.module.d.ts +12 -0
  54. package/lib/ecabs-input/ecabs-input.module.ts +14 -0
  55. package/lib/ecabs-loading/ecabs-loading.component.d.ts +8 -0
  56. package/lib/ecabs-loading/ecabs-loading.component.html +7 -0
  57. package/lib/ecabs-loading/ecabs-loading.component.spec.ts +24 -0
  58. package/lib/ecabs-loading/ecabs-loading.component.ts +11 -0
  59. package/lib/ecabs-loading/ecabs-loading.module.d.ts +9 -0
  60. package/lib/ecabs-loading/ecabs-loading.module.ts +11 -0
  61. package/lib/ecabs-loading/spinner/spinner.component.d.ts +6 -0
  62. package/lib/ecabs-loading/spinner/spinner.component.html +5 -0
  63. package/lib/ecabs-loading/spinner/spinner.component.scss +61 -0
  64. package/lib/ecabs-loading/spinner/spinner.component.spec.ts +24 -0
  65. package/lib/ecabs-loading/spinner/spinner.component.ts +11 -0
  66. package/package.json +33 -0
  67. package/public-api.d.ts +7 -0
  68. package/public-api.ts +7 -0
  69. package/styles/material/_theme.scss +99 -0
  70. package/styles/material/overrides/_autocomplete.scss +11 -0
  71. package/styles/material/overrides/_button.scss +81 -0
  72. package/styles/material/overrides/_card.scss +17 -0
  73. package/styles/material/overrides/_chip.scss +108 -0
  74. package/styles/material/overrides/_datepicker.scss +145 -0
  75. package/styles/material/overrides/_dialog.scss +8 -0
  76. package/styles/material/overrides/_divider.scss +3 -0
  77. package/styles/material/overrides/_expansion.scss +31 -0
  78. package/styles/material/overrides/_form.scss +47 -0
  79. package/styles/material/overrides/_icon.scss +3 -0
  80. package/styles/material/overrides/_menu.scss +3 -0
  81. package/styles/material/overrides/_paginator.scss +0 -0
  82. package/styles/material/overrides/_phone.scss +24 -0
  83. package/styles/material/overrides/_select.scss +36 -0
  84. package/styles/material/overrides/_tab.scss +23 -0
  85. package/styles/material/overrides/_table.scss +12 -0
  86. package/styles/material/overrides/_toaster.scss +38 -0
  87. package/styles/material/overrides/_toggle.scss +10 -0
  88. package/styles/material/overrides/_tooltip.scss +3 -0
  89. package/styles/material/overrides/index.scss +19 -0
  90. package/styles/scss/base/_heading.scss +17 -0
  91. package/styles/scss/base/_normalize.scss +78 -0
  92. package/styles/scss/base/index.scss +2 -0
  93. package/styles/scss/modules/_autocomplete.scss +29 -0
  94. package/styles/scss/modules/_button.scss +221 -0
  95. package/styles/scss/modules/_card.scss +23 -0
  96. package/styles/scss/modules/_chip.scss +56 -0
  97. package/styles/scss/modules/_datepicker.scss +422 -0
  98. package/styles/scss/modules/_dialog.scss +14 -0
  99. package/styles/scss/modules/_divider.scss +3 -0
  100. package/styles/scss/modules/_form.scss +221 -0
  101. package/styles/scss/modules/_icon.scss +30 -0
  102. package/styles/scss/modules/_img.scss +32 -0
  103. package/styles/scss/modules/_legend.scss +64 -0
  104. package/styles/scss/modules/_list.scss +17 -0
  105. package/styles/scss/modules/_map.scss +112 -0
  106. package/styles/scss/modules/_percentage.scss +33 -0
  107. package/styles/scss/modules/_phone.scss +21 -0
  108. package/styles/scss/modules/_select.scss +21 -0
  109. package/styles/scss/modules/_statuses.scss +31 -0
  110. package/styles/scss/modules/_tab.scss +16 -0
  111. package/styles/scss/modules/_table.scss +107 -0
  112. package/styles/scss/modules/_timepicker.scss +96 -0
  113. package/styles/scss/modules/_toaster.scss +53 -0
  114. package/styles/scss/modules/_tooltip.scss +7 -0
  115. package/styles/scss/modules/drag-drop.scss +31 -0
  116. package/styles/scss/modules/index.scss +23 -0
  117. package/styles/scss/utilities/_colors.scss +52 -0
  118. package/styles/scss/utilities/_fonts.scss +26 -0
  119. package/styles/scss/utilities/_functions.scss +27 -0
  120. package/styles/scss/utilities/_helpers.scss +5 -0
  121. package/styles/scss/utilities/_mixins.scss +65 -0
  122. package/styles/scss/utilities/_variables.scss +19 -0
  123. package/styles/scss/utilities/index.scss +6 -0
  124. package/styles/styles.scss +5 -0
  125. package/test.ts +27 -0
@@ -0,0 +1,26 @@
1
+ // #Family
2
+ $font-family-primary: 'Segment', 'sans-serif';
3
+ $font-family-fallback: 'Lato', sans-serif;
4
+
5
+ // #Weights
6
+ $font-weight-thin: 300;
7
+ $font-weight-regular: 400;
8
+ $font-weight-medium: 500;
9
+ $font-weight-semibold: 600;
10
+ $font-weight-bold: 700;
11
+ $font-weight-extra-bold: 800;
12
+
13
+ // #Sizes
14
+ $font-size-xs: 12px;
15
+ $font-size-sm: 14px;
16
+ $font-size-base: 16px;
17
+ $font-size-lg: 18px;
18
+
19
+ $font-heading-xs: 22px;
20
+ $font-heading-sm: 28px;
21
+ $font-heading-md: 32px;
22
+ $font-heading-base: 34px;
23
+ $font-heading-lg: 36px;
24
+
25
+ // Height
26
+ $base-line-height: 1.5;
@@ -0,0 +1,27 @@
1
+ @use 'sass:math';
2
+ // Converting pixel-based font-sizes to scalable REMs.
3
+ $base-rem: 16px;
4
+
5
+ @function strip-unit($num) {
6
+ @return math.div($num, ($num * 0 + 1));
7
+ }
8
+
9
+ @function cast-rem($value, $base-value: $base-rem) {
10
+ $value: math.div(strip-unit($value), strip-unit($base-value)) * 1rem;
11
+ @if ($value == 0rem) {
12
+ $value: 0;
13
+ } // Turn 0rem into 0
14
+ @return $value;
15
+ }
16
+
17
+ @function calc-rem($values, $base-value: $base-rem) {
18
+ $max: length($values);
19
+ @if $max == 1 {
20
+ @return cast-rem(nth($values, 1), $base-value);
21
+ }
22
+ $remValues: ();
23
+ @for $i from 1 through $max {
24
+ $remValues: append($remValues, cast-rem(nth($values, $i), $base-value));
25
+ }
26
+ @return $remValues;
27
+ }
@@ -0,0 +1,5 @@
1
+ // For Pseudo Elements
2
+ %pseudos {
3
+ position: absolute;
4
+ content: '';
5
+ }
@@ -0,0 +1,65 @@
1
+ // Calculates font size in REMs with a pixel fallback.
2
+ @mixin fontSize($size) {
3
+ font-size: $size;
4
+ font-size: calc-rem($size);
5
+ }
6
+
7
+ // ==========================================================================
8
+ // BEM Naming Functions
9
+ // ==========================================================================
10
+ // Element Mixin
11
+ @mixin e($element) {
12
+ &__#{$element} {
13
+ @content;
14
+ }
15
+ }
16
+
17
+ // Modifier Mixin
18
+ @mixin m($modifier) {
19
+ &--#{$modifier} {
20
+ @content;
21
+ }
22
+ }
23
+
24
+ // Generate ::before or ::after pseudo-element shapes
25
+ @mixin p-el($el-name, $h: 'null', $w: 'null') {
26
+ @if $el-name == 'before' or $el-name == 'after' {
27
+ &::#{$el-name} {
28
+ @extend %pseudos;
29
+ width: $w;
30
+ height: $h;
31
+ @content;
32
+ }
33
+ } @else {
34
+ @error '"#{$el-name}" is not a valid pseudo element.';
35
+ }
36
+ }
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
+ }
@@ -0,0 +1,19 @@
1
+ /* #Box shadows */
2
+ $box-shadow-default: 0px 0px 10px rgba(0, 0, 0, 0.1);
3
+ $box-shadow-large: 0 0 25px rgba(0, 0, 0, 0.2);
4
+
5
+ /* #Border settings */
6
+ $border-radius-base: .25rem;
7
+
8
+ /* #Transition */
9
+ $trans-duration-style: .24s ease-out;
10
+
11
+ /* #Viewport Breakpoints */
12
+ $breakpoints: (
13
+ xs: 0,
14
+ sm: 576px,
15
+ md: 768px,
16
+ lg: 992px,
17
+ xl: 1200px,
18
+ xxl: 1400px
19
+ );
@@ -0,0 +1,6 @@
1
+ @import "./variables";
2
+ @import "./functions";
3
+ @import "./colors";
4
+ @import "./fonts";
5
+ @import "./helpers";
6
+ @import "./mixins";
@@ -0,0 +1,5 @@
1
+ @import "./material/theme";
2
+ @import "./scss/modules/index";
3
+ @import "./scss/utilities/index";
4
+ @import "./scss/base/index";
5
+
package/test.ts ADDED
@@ -0,0 +1,27 @@
1
+ // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
+
3
+ import 'zone.js';
4
+ import 'zone.js/testing';
5
+ import { getTestBed } from '@angular/core/testing';
6
+ import {
7
+ BrowserDynamicTestingModule,
8
+ platformBrowserDynamicTesting
9
+ } from '@angular/platform-browser-dynamic/testing';
10
+
11
+ declare const require: {
12
+ context(path: string, deep?: boolean, filter?: RegExp): {
13
+ <T>(id: string): T;
14
+ keys(): string[];
15
+ };
16
+ };
17
+
18
+ // First, initialize the Angular testing environment.
19
+ getTestBed().initTestEnvironment(
20
+ BrowserDynamicTestingModule,
21
+ platformBrowserDynamicTesting(),
22
+ );
23
+
24
+ // Then we find all the tests.
25
+ const context = require.context('./', true, /\.spec\.ts$/);
26
+ // And load the modules.
27
+ context.keys().forEach(context);