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.
- package/README.md +24 -0
- package/esm2020/ecabs-components.mjs +5 -0
- package/esm2020/lib/base/directives/digits-only.directive.mjs +130 -0
- package/esm2020/lib/base/element-base.mjs +100 -0
- package/esm2020/lib/base/element-wrapper/element-wrapper.component.mjs +53 -0
- package/esm2020/lib/base/element-wrapper/element-wrapper.module.mjs +52 -0
- package/esm2020/lib/base/hint/hint.component.mjs +21 -0
- package/esm2020/lib/base/hint/hint.module.mjs +20 -0
- package/esm2020/lib/base/validation/validation.component.mjs +158 -0
- package/esm2020/lib/base/validation/validation.module.mjs +20 -0
- package/esm2020/lib/ecabs-buttons/ecabs-buttons.component.mjs +65 -0
- package/esm2020/lib/ecabs-buttons/ecabs-buttons.module.mjs +21 -0
- package/esm2020/lib/ecabs-input/ecabs-input.component.mjs +81 -0
- package/esm2020/lib/ecabs-input/ecabs-input.module.mjs +22 -0
- package/esm2020/lib/ecabs-loading/ecabs-loading.component.mjs +24 -0
- package/esm2020/lib/ecabs-loading/ecabs-loading.module.mjs +19 -0
- package/esm2020/lib/ecabs-loading/spinner/spinner.component.mjs +16 -0
- package/esm2020/public-api.mjs +8 -0
- package/fesm2015/ecabs-components.mjs +744 -0
- package/fesm2015/ecabs-components.mjs.map +1 -0
- package/fesm2020/ecabs-components.mjs +742 -0
- package/fesm2020/ecabs-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/base/directives/digits-only.directive.d.ts +26 -0
- package/lib/base/directives/digits-only.directive.ts +129 -0
- package/lib/base/element-base.d.ts +28 -0
- package/lib/base/element-base.ts +72 -0
- package/lib/base/element-wrapper/element-wrapper.component.d.ts +19 -0
- package/lib/base/element-wrapper/element-wrapper.component.html +30 -0
- package/lib/base/element-wrapper/element-wrapper.component.ts +33 -0
- package/lib/base/element-wrapper/element-wrapper.module.d.ts +16 -0
- package/lib/base/element-wrapper/element-wrapper.module.ts +30 -0
- package/lib/base/hint/hint.component.d.ts +8 -0
- package/lib/base/hint/hint.component.html +1 -0
- package/lib/base/hint/hint.component.scss +0 -0
- package/lib/base/hint/hint.component.ts +12 -0
- package/lib/base/hint/hint.module.d.ts +10 -0
- package/lib/base/hint/hint.module.ts +13 -0
- package/lib/base/validation/validation.component.d.ts +22 -0
- package/lib/base/validation/validation.component.html +8 -0
- package/lib/base/validation/validation.component.scss +0 -0
- package/lib/base/validation/validation.component.ts +171 -0
- package/lib/base/validation/validation.module.d.ts +10 -0
- package/lib/base/validation/validation.module.ts +12 -0
- package/lib/ecabs-buttons/ecabs-buttons.component.d.ts +21 -0
- package/lib/ecabs-buttons/ecabs-buttons.component.html +18 -0
- package/lib/ecabs-buttons/ecabs-buttons.component.ts +54 -0
- package/lib/ecabs-buttons/ecabs-buttons.module.d.ts +11 -0
- package/lib/ecabs-buttons/ecabs-buttons.module.ts +13 -0
- package/lib/ecabs-input/ecabs-input.component.d.ts +27 -0
- package/lib/ecabs-input/ecabs-input.component.html +26 -0
- package/lib/ecabs-input/ecabs-input.component.ts +83 -0
- package/lib/ecabs-input/ecabs-input.module.d.ts +12 -0
- package/lib/ecabs-input/ecabs-input.module.ts +14 -0
- package/lib/ecabs-loading/ecabs-loading.component.d.ts +8 -0
- package/lib/ecabs-loading/ecabs-loading.component.html +7 -0
- package/lib/ecabs-loading/ecabs-loading.component.spec.ts +24 -0
- package/lib/ecabs-loading/ecabs-loading.component.ts +11 -0
- package/lib/ecabs-loading/ecabs-loading.module.d.ts +9 -0
- package/lib/ecabs-loading/ecabs-loading.module.ts +11 -0
- package/lib/ecabs-loading/spinner/spinner.component.d.ts +6 -0
- package/lib/ecabs-loading/spinner/spinner.component.html +5 -0
- package/lib/ecabs-loading/spinner/spinner.component.scss +61 -0
- package/lib/ecabs-loading/spinner/spinner.component.spec.ts +24 -0
- package/lib/ecabs-loading/spinner/spinner.component.ts +11 -0
- package/package.json +33 -0
- package/public-api.d.ts +7 -0
- package/public-api.ts +7 -0
- package/styles/material/_theme.scss +99 -0
- package/styles/material/overrides/_autocomplete.scss +11 -0
- package/styles/material/overrides/_button.scss +81 -0
- package/styles/material/overrides/_card.scss +17 -0
- package/styles/material/overrides/_chip.scss +108 -0
- package/styles/material/overrides/_datepicker.scss +145 -0
- package/styles/material/overrides/_dialog.scss +8 -0
- package/styles/material/overrides/_divider.scss +3 -0
- package/styles/material/overrides/_expansion.scss +31 -0
- package/styles/material/overrides/_form.scss +47 -0
- package/styles/material/overrides/_icon.scss +3 -0
- package/styles/material/overrides/_menu.scss +3 -0
- package/styles/material/overrides/_paginator.scss +0 -0
- package/styles/material/overrides/_phone.scss +24 -0
- package/styles/material/overrides/_select.scss +36 -0
- package/styles/material/overrides/_tab.scss +23 -0
- package/styles/material/overrides/_table.scss +12 -0
- package/styles/material/overrides/_toaster.scss +38 -0
- package/styles/material/overrides/_toggle.scss +10 -0
- package/styles/material/overrides/_tooltip.scss +3 -0
- package/styles/material/overrides/index.scss +19 -0
- package/styles/scss/base/_heading.scss +17 -0
- package/styles/scss/base/_normalize.scss +78 -0
- package/styles/scss/base/index.scss +2 -0
- package/styles/scss/modules/_autocomplete.scss +29 -0
- package/styles/scss/modules/_button.scss +221 -0
- package/styles/scss/modules/_card.scss +23 -0
- package/styles/scss/modules/_chip.scss +56 -0
- package/styles/scss/modules/_datepicker.scss +422 -0
- package/styles/scss/modules/_dialog.scss +14 -0
- package/styles/scss/modules/_divider.scss +3 -0
- package/styles/scss/modules/_form.scss +221 -0
- package/styles/scss/modules/_icon.scss +30 -0
- package/styles/scss/modules/_img.scss +32 -0
- package/styles/scss/modules/_legend.scss +64 -0
- package/styles/scss/modules/_list.scss +17 -0
- package/styles/scss/modules/_map.scss +112 -0
- package/styles/scss/modules/_percentage.scss +33 -0
- package/styles/scss/modules/_phone.scss +21 -0
- package/styles/scss/modules/_select.scss +21 -0
- package/styles/scss/modules/_statuses.scss +31 -0
- package/styles/scss/modules/_tab.scss +16 -0
- package/styles/scss/modules/_table.scss +107 -0
- package/styles/scss/modules/_timepicker.scss +96 -0
- package/styles/scss/modules/_toaster.scss +53 -0
- package/styles/scss/modules/_tooltip.scss +7 -0
- package/styles/scss/modules/drag-drop.scss +31 -0
- package/styles/scss/modules/index.scss +23 -0
- package/styles/scss/utilities/_colors.scss +52 -0
- package/styles/scss/utilities/_fonts.scss +26 -0
- package/styles/scss/utilities/_functions.scss +27 -0
- package/styles/scss/utilities/_helpers.scss +5 -0
- package/styles/scss/utilities/_mixins.scss +65 -0
- package/styles/scss/utilities/_variables.scss +19 -0
- package/styles/scss/utilities/index.scss +6 -0
- package/styles/styles.scss +5 -0
- 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,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
|
+
);
|
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);
|