ngwr 0.0.3 → 0.0.7

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 (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/_core/components/base.component.d.ts +11 -0
  4. package/_core/constants/style-prefix.d.ts +1 -0
  5. package/_core/index.d.ts +5 -0
  6. package/_core/types/boolean-input.d.ts +1 -0
  7. package/_core/types/safe-any.d.ts +1 -0
  8. package/_core/util/convert.d.ts +19 -0
  9. package/button/button.component.d.ts +27 -0
  10. package/button/button.module.d.ts +9 -0
  11. package/button/{index.ts → index.d.ts} +0 -0
  12. package/divider/divider.component.d.ts +6 -0
  13. package/divider/divider.module.d.ts +7 -0
  14. package/divider/{index.ts → index.d.ts} +0 -0
  15. package/esm2020/_core/components/base.component.mjs +23 -0
  16. package/esm2020/_core/constants/style-prefix.mjs +2 -0
  17. package/esm2020/_core/index.mjs +10 -0
  18. package/esm2020/_core/types/boolean-input.mjs +2 -0
  19. package/esm2020/_core/types/safe-any.mjs +2 -0
  20. package/esm2020/_core/util/convert.mjs +51 -0
  21. package/esm2020/button/button.component.mjs +132 -0
  22. package/esm2020/button/button.module.mjs +19 -0
  23. package/esm2020/button/index.mjs +3 -0
  24. package/esm2020/divider/divider.component.mjs +23 -0
  25. package/esm2020/divider/divider.module.mjs +16 -0
  26. package/esm2020/divider/index.mjs +3 -0
  27. package/esm2020/extended-input/extended-input.component.mjs +68 -0
  28. package/esm2020/extended-input/extended-input.module.mjs +20 -0
  29. package/esm2020/extended-input/index.mjs +3 -0
  30. package/esm2020/form/form-error.component.mjs +23 -0
  31. package/esm2020/form/form-item.component.mjs +48 -0
  32. package/esm2020/form/form.module.mjs +19 -0
  33. package/esm2020/form/index.mjs +4 -0
  34. package/esm2020/icon/index.mjs +5 -0
  35. package/esm2020/icon/wr-icon.component.mjs +51 -0
  36. package/esm2020/icon/wr-icon.module.mjs +21 -0
  37. package/esm2020/icon/wr-icon.service.mjs +30 -0
  38. package/esm2020/icon/wr-icons.mjs +244 -0
  39. package/esm2020/input/index.mjs +3 -0
  40. package/esm2020/input/input.directive.mjs +61 -0
  41. package/esm2020/input/input.module.mjs +19 -0
  42. package/esm2020/ngwr.mjs +5 -0
  43. package/esm2020/password-input/index.mjs +3 -0
  44. package/esm2020/password-input/password-input.component.mjs +58 -0
  45. package/esm2020/password-input/password-input.module.mjs +21 -0
  46. package/esm2020/public-api.mjs +11 -0
  47. package/esm2020/skeleton/index.mjs +3 -0
  48. package/esm2020/skeleton/skeleton.component.mjs +31 -0
  49. package/esm2020/skeleton/skeleton.module.mjs +19 -0
  50. package/esm2020/spinner/index.mjs +3 -0
  51. package/esm2020/spinner/spinner.component.mjs +23 -0
  52. package/esm2020/spinner/spinner.module.mjs +16 -0
  53. package/esm2020/tag/index.mjs +3 -0
  54. package/esm2020/tag/tag.component.mjs +84 -0
  55. package/esm2020/tag/tag.module.mjs +19 -0
  56. package/extended-input/extended-input.component.d.ts +26 -0
  57. package/extended-input/extended-input.module.d.ts +10 -0
  58. package/extended-input/{index.ts → index.d.ts} +0 -0
  59. package/fesm2015/ngwr.mjs +1062 -0
  60. package/fesm2015/ngwr.mjs.map +1 -0
  61. package/fesm2020/ngwr.mjs +1052 -0
  62. package/fesm2020/ngwr.mjs.map +1 -0
  63. package/form/form-error.component.d.ts +6 -0
  64. package/form/form-item.component.d.ts +16 -0
  65. package/form/form.module.d.ts +9 -0
  66. package/form/{index.ts → index.d.ts} +0 -0
  67. package/icon/{index.ts → index.d.ts} +0 -0
  68. package/icon/wr-icon.component.d.ts +17 -0
  69. package/icon/wr-icon.module.d.ts +9 -0
  70. package/icon/wr-icon.service.d.ts +17 -0
  71. package/icon/wr-icons.d.ts +343 -0
  72. package/index.d.ts +5 -0
  73. package/input/{index.ts → index.d.ts} +0 -0
  74. package/input/input.directive.d.ts +18 -0
  75. package/input/input.module.d.ts +9 -0
  76. package/logo.svg +1 -0
  77. package/ngwr.min.css +8 -0
  78. package/package.json +34 -11
  79. package/password-input/{index.ts → index.d.ts} +0 -0
  80. package/password-input/password-input.component.d.ts +22 -0
  81. package/password-input/password-input.module.d.ts +11 -0
  82. package/{public-api.ts → public-api.d.ts} +0 -0
  83. package/skeleton/{index.ts → index.d.ts} +0 -0
  84. package/skeleton/skeleton.component.d.ts +11 -0
  85. package/skeleton/skeleton.module.d.ts +9 -0
  86. package/spinner/{index.ts → index.d.ts} +0 -0
  87. package/spinner/spinner.component.d.ts +6 -0
  88. package/spinner/spinner.module.d.ts +7 -0
  89. package/tag/{index.ts → index.d.ts} +0 -0
  90. package/tag/tag.component.d.ts +22 -0
  91. package/tag/tag.module.d.ts +9 -0
  92. package/button/button.component.ts +0 -132
  93. package/button/button.module.ts +0 -11
  94. package/core/types/convert-input.ts +0 -2
  95. package/core/types/index.ts +0 -3
  96. package/core/types/indexable.ts +0 -3
  97. package/core/types/ng-class.ts +0 -11
  98. package/core/util/convert.ts +0 -63
  99. package/core/util/index.ts +0 -1
  100. package/divider/divider.component.ts +0 -13
  101. package/divider/divider.module.ts +0 -10
  102. package/extended-input/extended-input.component.html +0 -13
  103. package/extended-input/extended-input.component.ts +0 -77
  104. package/extended-input/extended-input.module.ts +0 -17
  105. package/form/form-error.component.ts +0 -20
  106. package/form/form-item.component.ts +0 -60
  107. package/form/form.module.ts +0 -17
  108. package/icon/svg/aab.svg +0 -1
  109. package/icon/svg/add.svg +0 -1
  110. package/icon/svg/alert.svg +0 -1
  111. package/icon/svg/apk.svg +0 -1
  112. package/icon/svg/arrow-back.svg +0 -1
  113. package/icon/svg/bug.svg +0 -1
  114. package/icon/svg/caret-back.svg +0 -1
  115. package/icon/svg/caret-forward.svg +0 -1
  116. package/icon/svg/checkmark-circle.svg +0 -1
  117. package/icon/svg/chevron-down.svg +0 -1
  118. package/icon/svg/chevron-up.svg +0 -1
  119. package/icon/svg/clock.svg +0 -1
  120. package/icon/svg/close-circle.svg +0 -1
  121. package/icon/svg/copy.svg +0 -1
  122. package/icon/svg/document.svg +0 -1
  123. package/icon/svg/dots-horizontal.svg +0 -1
  124. package/icon/svg/dots-vertical.svg +0 -1
  125. package/icon/svg/download.svg +0 -1
  126. package/icon/svg/eye-off.svg +0 -1
  127. package/icon/svg/eye.svg +0 -1
  128. package/icon/svg/flash.svg +0 -1
  129. package/icon/svg/folder.svg +0 -1
  130. package/icon/svg/help.svg +0 -1
  131. package/icon/svg/info-circle-outline.svg +0 -1
  132. package/icon/svg/ipa.svg +0 -1
  133. package/icon/svg/logo-android.svg +0 -1
  134. package/icon/svg/logo-apple.svg +0 -1
  135. package/icon/svg/logo-appscreener.svg +0 -1
  136. package/icon/svg/logo-oversecured.svg +0 -1
  137. package/icon/svg/logo-stingray.svg +0 -1
  138. package/icon/svg/modules.svg +0 -1
  139. package/icon/svg/play-back.svg +0 -1
  140. package/icon/svg/play-circle.svg +0 -1
  141. package/icon/svg/play-forward.svg +0 -1
  142. package/icon/svg/play.svg +0 -1
  143. package/icon/svg/reader.svg +0 -1
  144. package/icon/svg/repeat.svg +0 -1
  145. package/icon/svg/search.svg +0 -1
  146. package/icon/svg/stop-circle.svg +0 -1
  147. package/icon/svg/stop.svg +0 -1
  148. package/icon/svg/trash.svg +0 -1
  149. package/icon/svg/user.svg +0 -1
  150. package/icon/svg/warning.svg +0 -1
  151. package/icon/svg/zip.svg +0 -1
  152. package/icon/wr-icon.component.ts +0 -52
  153. package/icon/wr-icon.module.ts +0 -14
  154. package/icon/wr-icon.service.ts +0 -28
  155. package/icon/wr-icons.ts +0 -405
  156. package/index.ts +0 -1
  157. package/input/input.directive.ts +0 -65
  158. package/input/input.module.ts +0 -16
  159. package/ng-package.json +0 -11
  160. package/password-input/password-input.component.html +0 -10
  161. package/password-input/password-input.component.ts +0 -56
  162. package/password-input/password-input.module.ts +0 -23
  163. package/skeleton/skeleton.component.ts +0 -38
  164. package/skeleton/skeleton.module.ts +0 -11
  165. package/spinner/spinner.component.ts +0 -11
  166. package/spinner/spinner.module.ts +0 -10
  167. package/styles/components/_index.scss +0 -15
  168. package/styles/components/alert.scss +0 -28
  169. package/styles/components/button.scss +0 -115
  170. package/styles/components/card.scss +0 -41
  171. package/styles/components/divider.scss +0 -19
  172. package/styles/components/dropdown.scss +0 -128
  173. package/styles/components/extended-input.scss +0 -64
  174. package/styles/components/form.scss +0 -85
  175. package/styles/components/heading.scss +0 -25
  176. package/styles/components/icon.scss +0 -32
  177. package/styles/components/input.scss +0 -43
  178. package/styles/components/password-input.scss +0 -31
  179. package/styles/components/skeleton.scss +0 -58
  180. package/styles/components/spinner.scss +0 -44
  181. package/styles/components/tag.scss +0 -70
  182. package/styles/components/tooltip.scss +0 -60
  183. package/styles/functions.scss +0 -184
  184. package/styles/grid.scss +0 -177
  185. package/styles/index.scss +0 -165
  186. package/styles/mixins/_index.scss +0 -22
  187. package/styles/mixins/alert.scss +0 -7
  188. package/styles/mixins/button.scss +0 -56
  189. package/styles/mixins/reset-component.scss +0 -13
  190. package/styles/mixins/tag.scss +0 -68
  191. package/styles/reset.scss +0 -104
  192. package/styles/root.scss +0 -31
  193. package/styles/vars.scss +0 -1075
  194. package/tag/tag.component.ts +0 -92
  195. package/tag/tag.module.ts +0 -11
  196. package/tsconfig.lib.json +0 -15
  197. package/tsconfig.lib.prod.json +0 -10
@@ -1,32 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $icon-prefix: #{$prefix}-icon;
5
-
6
- .#{$icon-prefix} {
7
- display: inline-block;
8
- color: inherit;
9
- font-style: normal;
10
- line-height: 0;
11
- text-align: center;
12
- text-transform: none;
13
- vertical-align: -0.125rem;
14
-
15
- box-sizing: content-box !important;
16
-
17
- contain: strict;
18
-
19
- fill: currentColor;
20
- width: 1.5rem;
21
- height: 1.5rem;
22
-
23
- * {
24
- line-height: 1;
25
- }
26
-
27
- svg {
28
- display: inline-block;
29
- width: 100%;
30
- height: 100%;
31
- }
32
- }
@@ -1,43 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $input-prefix: #{$prefix}-input;
5
-
6
- .#{$input-prefix} {
7
- display: inline-flex;
8
- appearance: none;
9
-
10
- background: $color-white;
11
- box-shadow: inset 0 0 0 1px $color-light;
12
- border: none;
13
- border-radius: $input-border-radius;
14
-
15
- margin: 0;
16
- padding: $input-padding-y $input-padding-x;
17
-
18
- color: $color-dark;
19
- font-size: $input-font-size;
20
- font-weight: $input-font-weight;
21
- resize: none;
22
- font-family: inherit;
23
-
24
- transition: $transition-primary;
25
- width: 100%;
26
-
27
- &::placeholder {
28
-
29
- }
30
-
31
- &:active,
32
- &:focus {
33
- outline: none;
34
- box-shadow: inset 0 0 0 1px rgba($color-primary, 0.375), 0 0 0 2px rgba($color-primary, 0.05);
35
- }
36
-
37
- &disabled,
38
- &--disabled {
39
- color: var(--color-medium);
40
- background-color: rgba(var(--color-light-rgb), 0.5);
41
- cursor: not-allowed;
42
- }
43
- }
@@ -1,31 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $password-input-prefix: #{$prefix}-password-input;
5
-
6
- .#{$password-input-prefix} {
7
- display: flex;
8
- position: relative;
9
-
10
- transition: $transition-primary;
11
- width: 100%;
12
-
13
- & > .wr-input {
14
- padding-right: $input-padding-y + 1.5rem;
15
- }
16
-
17
- &-icon {
18
- position: absolute;
19
- right: $input-padding-y;
20
- top: 50%;
21
- transform: translateY(-50%);
22
- height: 1.25rem;
23
- width: 1.25rem;
24
- color: $color-medium;
25
-
26
- &:hover {
27
- cursor: pointer;
28
- color: $color-primary;
29
- }
30
- }
31
- }
@@ -1,58 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- @keyframes shimmer {
5
- 0% { background-position: -400px 0;}
6
- 100% { background-position: 400px 0;}
7
- }
8
-
9
-
10
- $skeleton-prefix: #{$prefix}-skeleton;
11
-
12
- .#{$skeleton-prefix} {
13
- --skeleton-style: var(--color-dark);
14
-
15
- display: block;
16
-
17
- width: 100%;
18
- height: inherit;
19
-
20
- margin-top: 4px;
21
- margin-bottom: 4px;
22
-
23
- background: rgba(var(--skeleton-style), 0.25);
24
- border-radius: $border-radius-base;
25
-
26
- line-height: 10px;
27
-
28
- user-select: none;
29
- pointer-events: none;
30
-
31
- position: relative;
32
- overflow: hidden;
33
-
34
- &:after {
35
- content: '';
36
- position: absolute;
37
- top: 0;
38
- left: 0;
39
- width: 100%;
40
- height: 100%;
41
- background: linear-gradient(
42
- to right,
43
- rgba(var(--skeleton-style), 0.065) 8%,
44
- rgba(var(--skeleton-style), 0.135) 18%,
45
- rgba(var(--skeleton-style), 0.065) 33%
46
- );
47
- background-size: 800px 104px;
48
- animation-duration: 1s;
49
- animation-fill-mode: forwards;
50
- animation-iteration-count: infinite;
51
- animation-name: shimmer;
52
- animation-timing-function: linear;
53
- }
54
-
55
- & span {
56
- display: inline-block;
57
- }
58
- }
@@ -1,44 +0,0 @@
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
- }
@@ -1,70 +0,0 @@
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
- }
@@ -1,60 +0,0 @@
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
- }
@@ -1,184 +0,0 @@
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 DELETED
@@ -1,177 +0,0 @@
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
-