ngwr 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/button/button.component.ts +132 -0
- package/button/button.module.ts +11 -0
- package/button/index.ts +2 -0
- package/core/types/convert-input.ts +2 -0
- package/core/types/index.ts +3 -0
- package/core/types/indexable.ts +3 -0
- package/core/types/ng-class.ts +11 -0
- package/core/util/convert.ts +63 -0
- package/core/util/index.ts +1 -0
- package/divider/divider.component.ts +13 -0
- package/divider/divider.module.ts +10 -0
- package/divider/index.ts +2 -0
- package/extended-input/extended-input.component.html +13 -0
- package/extended-input/extended-input.component.ts +77 -0
- package/extended-input/extended-input.module.ts +17 -0
- package/extended-input/index.ts +2 -0
- package/form/form-error.component.ts +20 -0
- package/form/form-item.component.ts +60 -0
- package/form/form.module.ts +17 -0
- package/form/index.ts +3 -0
- package/icon/icon.component.ts +45 -0
- package/icon/icons.ts +229 -0
- package/icon/index.ts +3 -0
- package/icon/walrus-icons-registry.service.ts +20 -0
- package/icon/walrus-icons.module.ts +8 -0
- package/index.ts +1 -0
- package/input/index.ts +2 -0
- package/input/input.directive.ts +65 -0
- package/input/input.module.ts +16 -0
- package/ng-package.json +11 -0
- package/package.json +27 -0
- package/password-input/index.ts +2 -0
- package/password-input/password-input.component.html +10 -0
- package/password-input/password-input.component.ts +56 -0
- package/password-input/password-input.module.ts +28 -0
- package/public-api.ts +10 -0
- package/skeleton/index.ts +2 -0
- package/skeleton/skeleton.component.ts +38 -0
- package/skeleton/skeleton.module.ts +11 -0
- package/spinner/index.ts +2 -0
- package/spinner/spinner.component.ts +11 -0
- package/spinner/spinner.module.ts +10 -0
- package/styles/components/_index.scss +15 -0
- package/styles/components/alert.scss +28 -0
- package/styles/components/button.scss +115 -0
- package/styles/components/card.scss +41 -0
- package/styles/components/divider.scss +19 -0
- package/styles/components/dropdown.scss +128 -0
- package/styles/components/extended-input.scss +64 -0
- package/styles/components/form.scss +85 -0
- package/styles/components/heading.scss +25 -0
- package/styles/components/icon.scss +32 -0
- package/styles/components/input.scss +43 -0
- package/styles/components/password-input.scss +31 -0
- package/styles/components/skeleton.scss +58 -0
- package/styles/components/spinner.scss +44 -0
- package/styles/components/tag.scss +70 -0
- package/styles/components/tooltip.scss +60 -0
- package/styles/functions.scss +184 -0
- package/styles/grid.scss +177 -0
- package/styles/index.scss +165 -0
- package/styles/mixins/_index.scss +22 -0
- package/styles/mixins/alert.scss +7 -0
- package/styles/mixins/button.scss +56 -0
- package/styles/mixins/reset-component.scss +13 -0
- package/styles/mixins/tag.scss +68 -0
- package/styles/reset.scss +104 -0
- package/styles/root.scss +31 -0
- package/styles/vars.scss +1075 -0
- package/tag/index.ts +2 -0
- package/tag/tag.component.ts +92 -0
- package/tag/tag.module.ts +11 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@import '../vars';
|
|
2
|
+
@import '../mixins';
|
|
3
|
+
|
|
4
|
+
$spinner-prefix: #{$prefix}-spin;
|
|
5
|
+
|
|
6
|
+
.#{$spinner-prefix} {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
|
|
12
|
+
svg {
|
|
13
|
+
width: 1em;
|
|
14
|
+
height: 1em;
|
|
15
|
+
|
|
16
|
+
animation: rotate 2s linear infinite;
|
|
17
|
+
|
|
18
|
+
.path {
|
|
19
|
+
stroke: currentColor;
|
|
20
|
+
animation: dash 1.5s ease-in-out infinite;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@keyframes rotate {
|
|
26
|
+
100% {
|
|
27
|
+
transform: rotate(360deg);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes dash {
|
|
32
|
+
0% {
|
|
33
|
+
stroke-dasharray: 1, 150;
|
|
34
|
+
stroke-dashoffset: 0;
|
|
35
|
+
}
|
|
36
|
+
50% {
|
|
37
|
+
stroke-dasharray: 90, 150;
|
|
38
|
+
stroke-dashoffset: -35;
|
|
39
|
+
}
|
|
40
|
+
100% {
|
|
41
|
+
stroke-dasharray: 90, 150;
|
|
42
|
+
stroke-dashoffset: -124;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@import '../vars';
|
|
2
|
+
@import '../mixins';
|
|
3
|
+
|
|
4
|
+
$tag-prefix: #{$prefix}-tag;
|
|
5
|
+
|
|
6
|
+
.#{$tag-prefix} {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
height: auto;
|
|
9
|
+
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
|
|
12
|
+
font-family: $font-family;
|
|
13
|
+
font-size: 0.75rem;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
|
|
16
|
+
line-height: 1rem;
|
|
17
|
+
vertical-align: middle;
|
|
18
|
+
|
|
19
|
+
padding: 0.25rem 0.5rem;
|
|
20
|
+
border-radius: 0.25rem;
|
|
21
|
+
|
|
22
|
+
margin-right: 0.25rem;
|
|
23
|
+
|
|
24
|
+
user-select: none;
|
|
25
|
+
transition: $transition-primary;
|
|
26
|
+
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--hoverable {
|
|
34
|
+
pointer-events: all;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--round {
|
|
38
|
+
border-radius: $btn-round-border-radius;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@each $color, $value in $theme-colors {
|
|
42
|
+
&.#{$tag-prefix}-#{$color} {
|
|
43
|
+
@include tag-colors-generate($value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.#{$tag-prefix}-#{$color} {
|
|
47
|
+
&.#{$tag-prefix}--outline {
|
|
48
|
+
@include tag-outline-colors-generate($value);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.#{$tag-prefix}-#{$color} {
|
|
53
|
+
&.#{$tag-prefix}--transparent {
|
|
54
|
+
@include tag-transparent-colors-generate($value);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
& > wr-icon {
|
|
60
|
+
width: 0.75rem;
|
|
61
|
+
height: 0.75rem;
|
|
62
|
+
margin-right: 0.125rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& > wr-spin {
|
|
66
|
+
width: 0.75rem;
|
|
67
|
+
height: 0.75rem;
|
|
68
|
+
margin-right: 0.125rem;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import '../vars';
|
|
2
|
+
@import '../mixins';
|
|
3
|
+
|
|
4
|
+
$tooltip-prefix: #{$prefix}-tooltip;
|
|
5
|
+
|
|
6
|
+
.#{$tooltip-prefix} {
|
|
7
|
+
display: block;
|
|
8
|
+
|
|
9
|
+
font-family: $font-family;
|
|
10
|
+
font-size: 0.75rem;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
|
|
13
|
+
line-height: 1.2;
|
|
14
|
+
|
|
15
|
+
padding: 0.25rem 0.5rem;
|
|
16
|
+
border-radius: 0.25rem;
|
|
17
|
+
|
|
18
|
+
margin-bottom: 0.5rem;
|
|
19
|
+
|
|
20
|
+
color: $color-white;
|
|
21
|
+
background: $color-dark;
|
|
22
|
+
|
|
23
|
+
transition: $transition-primary;
|
|
24
|
+
|
|
25
|
+
position: relative;
|
|
26
|
+
|
|
27
|
+
&:after {
|
|
28
|
+
content: '';
|
|
29
|
+
|
|
30
|
+
position: absolute;
|
|
31
|
+
bottom: -0.25rem;
|
|
32
|
+
left: 0;
|
|
33
|
+
right: 0;
|
|
34
|
+
margin: 0 auto;
|
|
35
|
+
width: 0;
|
|
36
|
+
height: 0;
|
|
37
|
+
border-left: 0.25rem solid transparent;
|
|
38
|
+
border-right: 0.25rem solid transparent;
|
|
39
|
+
|
|
40
|
+
border-top: 0.25rem solid $color-dark;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__wrapper {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
opacity: 1;
|
|
48
|
+
animation: fade-in 0.125s linear forwards;
|
|
49
|
+
|
|
50
|
+
@keyframes fade-in {
|
|
51
|
+
0% {
|
|
52
|
+
transform: translateY(0.5rem);
|
|
53
|
+
opacity: 0
|
|
54
|
+
}
|
|
55
|
+
100% {
|
|
56
|
+
transform: translateY(0);
|
|
57
|
+
opacity: 1;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
@function to-rgb($value) {
|
|
2
|
+
@return red($value), green($value), blue($value);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@function map-loop($map, $func, $args...) {
|
|
6
|
+
$_map: ();
|
|
7
|
+
|
|
8
|
+
@each $key, $value in $map {
|
|
9
|
+
// allow to pass the $key and $value of the map as an function argument
|
|
10
|
+
$_args: ();
|
|
11
|
+
@each $arg in $args {
|
|
12
|
+
$_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@return $_map;
|
|
19
|
+
}
|
|
20
|
+
$_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
|
|
21
|
+
|
|
22
|
+
@function color-contrast($background, $color-contrast-dark: $color-dark, $color-contrast-light: $color-white, $min-contrast-ratio: 4.5) {
|
|
23
|
+
$foregrounds: $color-contrast-light, $color-contrast-dark, $color-white, $color-black;
|
|
24
|
+
$max-ratio: 0;
|
|
25
|
+
$max-ratio-color: null;
|
|
26
|
+
|
|
27
|
+
@each $color in $foregrounds {
|
|
28
|
+
$contrast-ratio: contrast-ratio($background, $color);
|
|
29
|
+
@if $contrast-ratio > $min-contrast-ratio {
|
|
30
|
+
@return $color;
|
|
31
|
+
} @else if $contrast-ratio > $max-ratio {
|
|
32
|
+
$max-ratio: $contrast-ratio;
|
|
33
|
+
$max-ratio-color: $color;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
|
|
38
|
+
|
|
39
|
+
@return $max-ratio-color;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@function contrast-ratio($background, $foreground: $color-light) {
|
|
43
|
+
$l1: luminance($background);
|
|
44
|
+
$l2: luminance(opaque($background, $foreground));
|
|
45
|
+
|
|
46
|
+
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
|
|
47
|
+
}
|
|
48
|
+
@function luminance($color) {
|
|
49
|
+
$rgb: (
|
|
50
|
+
"r": red($color),
|
|
51
|
+
"g": green($color),
|
|
52
|
+
"b": blue($color)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
@each $name, $value in $rgb {
|
|
56
|
+
$value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
|
|
57
|
+
$rgb: map-merge($rgb, ($name: $value));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Return opaque color
|
|
64
|
+
// opaque(#fff, rgba(0, 0, 0, .5)) => #808080
|
|
65
|
+
@function opaque($background, $foreground) {
|
|
66
|
+
@return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@function tint-color($color, $weight) {
|
|
70
|
+
@return mix(white, $color, $weight);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Shade a color: mix a color with black
|
|
74
|
+
@function shade-color($color, $weight) {
|
|
75
|
+
@return mix(black, $color, $weight);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Shade the color if the weight is positive, else tint it
|
|
79
|
+
@function shift-color($color, $weight) {
|
|
80
|
+
@return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
|
|
81
|
+
}
|
|
82
|
+
// scss-docs-end color-functions
|
|
83
|
+
|
|
84
|
+
// Return valid calc
|
|
85
|
+
@function add($value1, $value2, $return-calc: true) {
|
|
86
|
+
@if $value1 == null {
|
|
87
|
+
@return $value2;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@if $value2 == null {
|
|
91
|
+
@return $value1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
|
95
|
+
@return $value1 + $value2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@function subtract($value1, $value2, $return-calc: true) {
|
|
102
|
+
@if $value1 == null and $value2 == null {
|
|
103
|
+
@return null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@if $value1 == null {
|
|
107
|
+
@return -$value2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@if $value2 == null {
|
|
111
|
+
@return $value1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
|
115
|
+
@return $value1 - $value2;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@if type-of($value2) != number {
|
|
119
|
+
$value2: unquote("(") + $value2 + unquote(")");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@function divide($dividend, $divisor, $precision: 10) {
|
|
126
|
+
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
|
|
127
|
+
$dividend: abs($dividend);
|
|
128
|
+
$divisor: abs($divisor);
|
|
129
|
+
@if $dividend == 0 {
|
|
130
|
+
@return 0;
|
|
131
|
+
}
|
|
132
|
+
@if $divisor == 0 {
|
|
133
|
+
@error "Cannot divide by 0";
|
|
134
|
+
}
|
|
135
|
+
$remainder: $dividend;
|
|
136
|
+
$result: 0;
|
|
137
|
+
$factor: 10;
|
|
138
|
+
@while ($remainder > 0 and $precision >= 0) {
|
|
139
|
+
$quotient: 0;
|
|
140
|
+
@while ($remainder >= $divisor) {
|
|
141
|
+
$remainder: $remainder - $divisor;
|
|
142
|
+
$quotient: $quotient + 1;
|
|
143
|
+
}
|
|
144
|
+
$result: $result * 10 + $quotient;
|
|
145
|
+
$factor: $factor * .1;
|
|
146
|
+
$remainder: $remainder * 10;
|
|
147
|
+
$precision: $precision - 1;
|
|
148
|
+
@if ($precision < 0 and $remainder >= $divisor * 5) {
|
|
149
|
+
$result: $result + 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
$result: $result * $factor * $sign;
|
|
153
|
+
$dividend-unit: unit($dividend);
|
|
154
|
+
$divisor-unit: unit($divisor);
|
|
155
|
+
$unit-map: (
|
|
156
|
+
"px": 1px,
|
|
157
|
+
"rem": 1rem,
|
|
158
|
+
"em": 1em,
|
|
159
|
+
"%": 1%
|
|
160
|
+
);
|
|
161
|
+
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
|
|
162
|
+
$result: $result * map-get($unit-map, $dividend-unit);
|
|
163
|
+
}
|
|
164
|
+
@return $result;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@function valid-radius($radius) {
|
|
168
|
+
$return: ();
|
|
169
|
+
@each $value in $radius {
|
|
170
|
+
@if type-of($value) == number {
|
|
171
|
+
$return: append($return, max($value, 0));
|
|
172
|
+
} @else {
|
|
173
|
+
$return: append($return, $value);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
@return $return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// scss-docs-start border-radius-mixins
|
|
180
|
+
@mixin border-radius($radius: $border-radius-base, $fallback-border-radius: false) {
|
|
181
|
+
border-radius: valid-radius($radius);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
package/styles/grid.scss
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
$breakpoints: (
|
|
2
|
+
xs: 0,
|
|
3
|
+
sm: 576px,
|
|
4
|
+
md: 768px,
|
|
5
|
+
lg: 992px,
|
|
6
|
+
xl: 1200px,
|
|
7
|
+
xxl: 1400px,
|
|
8
|
+
xga: 1600px,
|
|
9
|
+
fhd: 1920px,
|
|
10
|
+
rt: 2560px
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
$displays: (
|
|
14
|
+
sm: 540px,
|
|
15
|
+
md: 720px,
|
|
16
|
+
lg: 960px,
|
|
17
|
+
xl: 1140px,
|
|
18
|
+
xxl: 1320px,
|
|
19
|
+
xga: 1530px,
|
|
20
|
+
fhd: 1830px,
|
|
21
|
+
rt: 2470px
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
$columns: 12 !default;
|
|
25
|
+
$gutter: 1.5rem !default;
|
|
26
|
+
$container-padding-x: $gutter * .5 !default;
|
|
27
|
+
|
|
28
|
+
@function breakpoint-min($name) {
|
|
29
|
+
$min: map-get($breakpoints, $name);
|
|
30
|
+
@return if($min != 0, $min, null);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@function breakpoint-infix($name) {
|
|
34
|
+
@return if(breakpoint-min($name) == null, "", "-#{$name}");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin media-breakpoint-up($name) {
|
|
38
|
+
$min: breakpoint-min($name);
|
|
39
|
+
@if $min {
|
|
40
|
+
@media (min-width: $min) {
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
} @else {
|
|
44
|
+
@content;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.container,
|
|
49
|
+
.container-fluid {
|
|
50
|
+
width: 100%;
|
|
51
|
+
padding-right: $container-padding-x;
|
|
52
|
+
padding-left: $container-padding-x;
|
|
53
|
+
margin-right: auto;
|
|
54
|
+
margin-left: auto;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@each $breakpoint, $container-max-width in $displays {
|
|
58
|
+
.container-#{$breakpoint} {
|
|
59
|
+
@extend .container-fluid;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@include media-breakpoint-up($breakpoint) {
|
|
63
|
+
%responsive-container-#{$breakpoint} {
|
|
64
|
+
max-width: $container-max-width;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
$extend-breakpoint: true;
|
|
68
|
+
|
|
69
|
+
@each $name, $width in $breakpoints {
|
|
70
|
+
@if ($extend-breakpoint) {
|
|
71
|
+
.container#{breakpoint-infix($name)} {
|
|
72
|
+
@extend %responsive-container-#{$breakpoint};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@if ($breakpoint == $name) {
|
|
76
|
+
$extend-breakpoint: false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin make-row() {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-wrap: wrap;
|
|
86
|
+
margin-right: calc(-.5 * #{$gutter});
|
|
87
|
+
margin-left: calc(-.5 * #{$gutter});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.row {
|
|
91
|
+
@include make-row();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@function divide($dividend, $divisor, $precision: 10) {
|
|
95
|
+
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
|
|
96
|
+
$dividend: abs($dividend);
|
|
97
|
+
$divisor: abs($divisor);
|
|
98
|
+
@if $dividend == 0 {
|
|
99
|
+
@return 0;
|
|
100
|
+
}
|
|
101
|
+
@if $divisor == 0 {
|
|
102
|
+
@error 'Cannot divide by 0';
|
|
103
|
+
}
|
|
104
|
+
$remainder: $dividend;
|
|
105
|
+
$result: 0;
|
|
106
|
+
$factor: 10;
|
|
107
|
+
@while ($remainder > 0 and $precision >= 0) {
|
|
108
|
+
$quotient: 0;
|
|
109
|
+
@while ($remainder >= $divisor) {
|
|
110
|
+
$remainder: $remainder - $divisor;
|
|
111
|
+
$quotient: $quotient + 1;
|
|
112
|
+
}
|
|
113
|
+
$result: $result * 10 + $quotient;
|
|
114
|
+
$factor: $factor * .1;
|
|
115
|
+
$remainder: $remainder * 10;
|
|
116
|
+
$precision: $precision - 1;
|
|
117
|
+
@if ($precision < 0 and $remainder >= $divisor * 5) {
|
|
118
|
+
$result: $result + 1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
$result: $result * $factor * $sign;
|
|
122
|
+
$dividend-unit: unit($dividend);
|
|
123
|
+
$divisor-unit: unit($divisor);
|
|
124
|
+
$unit-map: (
|
|
125
|
+
"px": 1px,
|
|
126
|
+
"rem": 1rem,
|
|
127
|
+
"em": 1em,
|
|
128
|
+
"%": 1%
|
|
129
|
+
);
|
|
130
|
+
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
|
|
131
|
+
$result: $result * map-get($unit-map, $dividend-unit);
|
|
132
|
+
}
|
|
133
|
+
@return $result;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@mixin make-col($size) {
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
max-width: 100%;
|
|
139
|
+
padding-right: calc(#{$gutter} * .5);
|
|
140
|
+
padding-left: calc(#{$gutter} * .5);
|
|
141
|
+
flex: 0 0 auto;
|
|
142
|
+
width: percentage(divide($size, $columns));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@mixin row-cols($count) {
|
|
146
|
+
> * {
|
|
147
|
+
flex: 0 0 auto;
|
|
148
|
+
width: divide(100%, $count);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.col {
|
|
153
|
+
box-sizing: border-box;
|
|
154
|
+
max-width: 100%;
|
|
155
|
+
padding-right: calc(#{$gutter} * .5);
|
|
156
|
+
padding-left: calc(#{$gutter} * .5);
|
|
157
|
+
flex: 0 0 auto;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@each $breakpoint in map-keys($breakpoints) {
|
|
161
|
+
$infix: breakpoint-infix($breakpoint);
|
|
162
|
+
|
|
163
|
+
@include media-breakpoint-up($breakpoint) {
|
|
164
|
+
.col#{$infix} {
|
|
165
|
+
flex: 1 0 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@if $columns > 0 {
|
|
169
|
+
@for $i from 1 through $columns {
|
|
170
|
+
.col#{$infix}-#{$i} {
|
|
171
|
+
@include make-col($i);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Walrus v0.0.1
|
|
3
|
+
* Copyright 2021 Swordfish Security, Inc.
|
|
4
|
+
* Licensed under GPL-3
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@import './functions';
|
|
8
|
+
@import './vars';
|
|
9
|
+
|
|
10
|
+
@import './root';
|
|
11
|
+
@import './reset';
|
|
12
|
+
@import './components';
|
|
13
|
+
@import './grid';
|
|
14
|
+
|
|
15
|
+
// cdk overlay
|
|
16
|
+
.cdk-overlay-container {
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
height: 100%;
|
|
21
|
+
width: 100%;
|
|
22
|
+
position: fixed;
|
|
23
|
+
z-index: 1000;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.cdk-visually-hidden {
|
|
27
|
+
border: 0;
|
|
28
|
+
clip: rect(0 0 0 0);
|
|
29
|
+
height: 1px;
|
|
30
|
+
margin: -1px;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
padding: 0;
|
|
33
|
+
position: absolute;
|
|
34
|
+
width: 1px;
|
|
35
|
+
outline: 0;
|
|
36
|
+
-webkit-appearance: none;
|
|
37
|
+
-moz-appearance: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.cdk-overlay-backdrop {
|
|
41
|
+
top: 0;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
left: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
-webkit-tap-highlight-color: transparent;
|
|
46
|
+
transition: opacity .4s cubic-bezier(.25, .8, .25, 1);
|
|
47
|
+
opacity: 0;
|
|
48
|
+
position: absolute;
|
|
49
|
+
pointer-events: auto;
|
|
50
|
+
z-index: 1000;
|
|
51
|
+
|
|
52
|
+
&.wr-modal-mask {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cdk-overlay-pane {
|
|
58
|
+
position: absolute;
|
|
59
|
+
pointer-events: auto;
|
|
60
|
+
z-index: 1000; // Give an opportunity to the content own to manage their z-index such as Modal
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cdk-overlay-connected-position-bounding-box {
|
|
64
|
+
position: absolute;
|
|
65
|
+
z-index: 1000;
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
min-width: 1px;
|
|
69
|
+
min-height: 1px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Used when disabling global scrolling.
|
|
73
|
+
.cdk-global-scrollblock {
|
|
74
|
+
position: fixed;
|
|
75
|
+
|
|
76
|
+
// Necessary for the content not to lose its width. Note that we're using 100%, instead of
|
|
77
|
+
// 100vw, because 100vw includes the width plus the scrollbar, whereas 100% is the width
|
|
78
|
+
// that the element had before we made it `fixed`.
|
|
79
|
+
width: 100%;
|
|
80
|
+
|
|
81
|
+
// Note: this will always add a scrollbar to whatever element it is on, which can
|
|
82
|
+
// potentially result in double scrollbars. It shouldn't be an issue, because we won't
|
|
83
|
+
// block scrolling on a page that doesn't have a scrollbar in the first place.
|
|
84
|
+
overflow-y: scroll;
|
|
85
|
+
|
|
86
|
+
// https://github.com/angular/material2/issues/15051
|
|
87
|
+
body {
|
|
88
|
+
overflow-x: visible;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.wr-overlay-transparent-backdrop {
|
|
93
|
+
&, &.cdk-overlay-backdrop-showing {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.wr-animate-disabled {
|
|
99
|
+
// badge
|
|
100
|
+
&.wr-scroll-number-only {
|
|
101
|
+
animation: none;
|
|
102
|
+
transition: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// drawer
|
|
106
|
+
&.wr-drawer {
|
|
107
|
+
&.wr-drawer-open .wr-drawer-mask {
|
|
108
|
+
animation: none;
|
|
109
|
+
transition: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
& > * {
|
|
113
|
+
transition: none;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// modal
|
|
118
|
+
.wr-modal-mask, .wr-modal {
|
|
119
|
+
animation: none;
|
|
120
|
+
transition: none;
|
|
121
|
+
|
|
122
|
+
&.zoom-enter, &.zoom-leave,
|
|
123
|
+
&.zoom-enter-active, &.zoom-leave-active {
|
|
124
|
+
animation: none;
|
|
125
|
+
transition: none;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// menu
|
|
130
|
+
&.wr-menu {
|
|
131
|
+
transition: none;
|
|
132
|
+
|
|
133
|
+
.wr-menu-item, .wr-menu-submenu-title {
|
|
134
|
+
transition: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.wr-menu-item .wricon, .wr-menu-submenu-title .wricon {
|
|
138
|
+
transition: none;
|
|
139
|
+
|
|
140
|
+
& + span {
|
|
141
|
+
transition: none;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// tabs
|
|
147
|
+
&.wr-tabs {
|
|
148
|
+
.wr-tabs-top-content.wr-tabs-content-animated,
|
|
149
|
+
.wr-tabs-bottom-content.wr-tabs-content-animated,
|
|
150
|
+
.wr-tabs-top-content > .wr-tabs-tabpane,
|
|
151
|
+
.wr-tabs-bottom-content > .wr-tabs-tabpane,
|
|
152
|
+
&.wr-tabs-left .wr-tabs-ink-bar-animated,
|
|
153
|
+
&.wr-tabs-right .wr-tabs-ink-bar-animated,
|
|
154
|
+
&.wr-tabs-top .wr-tabs-ink-bar-animated,
|
|
155
|
+
&.wr-tabs-bottom .wr-tabs-ink-bar-animated {
|
|
156
|
+
transition: none;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// collapse
|
|
161
|
+
&.wr-collapse > .wr-collapse-item > .wr-collapse-header .wr-collapse-arrow svg {
|
|
162
|
+
transition: none;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import 'alert';
|
|
2
|
+
@import 'button';
|
|
3
|
+
@import 'tag';
|
|
4
|
+
|
|
5
|
+
@import 'reset-component';
|
|
6
|
+
|
|
7
|
+
@mixin column {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: baseline;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin row {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin no-select {
|
|
20
|
+
user-select: none;
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
}
|