ngwr 0.0.6 → 0.0.9

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 (76) hide show
  1. package/README.md +32 -16
  2. package/_core/constants/style-prefix.d.ts +1 -1
  3. package/_core/index.d.ts +1 -0
  4. package/_core/types/safe-any.d.ts +1 -0
  5. package/_core/util/convert.d.ts +2 -1
  6. package/button/button.component.d.ts +1 -1
  7. package/esm2020/_core/components/base.component.mjs +1 -1
  8. package/esm2020/_core/constants/style-prefix.mjs +1 -1
  9. package/esm2020/_core/index.mjs +2 -1
  10. package/esm2020/_core/types/safe-any.mjs +2 -0
  11. package/esm2020/_core/util/convert.mjs +3 -2
  12. package/esm2020/button/button.component.mjs +1 -1
  13. package/esm2020/button/button.module.mjs +3 -3
  14. package/esm2020/divider/divider.component.mjs +1 -1
  15. package/esm2020/divider/divider.module.mjs +1 -1
  16. package/esm2020/extended-input/extended-input.component.mjs +3 -3
  17. package/esm2020/extended-input/extended-input.module.mjs +6 -14
  18. package/esm2020/form/form-error.component.mjs +1 -1
  19. package/esm2020/form/form-item.component.mjs +1 -1
  20. package/esm2020/form/form.module.mjs +5 -13
  21. package/esm2020/icon/wr-icon.component.mjs +2 -2
  22. package/esm2020/icon/wr-icon.module.mjs +1 -1
  23. package/esm2020/icon/wr-icon.service.mjs +1 -1
  24. package/esm2020/icon/wr-icons.mjs +54 -4
  25. package/esm2020/input/input.directive.mjs +7 -3
  26. package/esm2020/input/input.module.mjs +5 -5
  27. package/esm2020/password-input/password-input.component.mjs +4 -4
  28. package/esm2020/password-input/password-input.module.mjs +11 -26
  29. package/esm2020/skeleton/skeleton.component.mjs +2 -2
  30. package/esm2020/skeleton/skeleton.module.mjs +7 -7
  31. package/esm2020/spinner/spinner.component.mjs +1 -1
  32. package/esm2020/spinner/spinner.module.mjs +1 -1
  33. package/esm2020/tag/tag.component.mjs +2 -2
  34. package/esm2020/tag/tag.module.mjs +2 -2
  35. package/extended-input/extended-input.component.d.ts +6 -5
  36. package/fesm2015/ngwr.mjs +111 -88
  37. package/fesm2015/ngwr.mjs.map +1 -1
  38. package/fesm2020/ngwr.mjs +111 -88
  39. package/fesm2020/ngwr.mjs.map +1 -1
  40. package/icon/wr-icon.component.d.ts +2 -1
  41. package/icon/wr-icons.d.ts +71 -1
  42. package/logo.svg +1 -1
  43. package/ngwr.min.css +8 -0
  44. package/package.json +1 -1
  45. package/password-input/password-input.component.d.ts +7 -6
  46. package/password-input/password-input.module.d.ts +4 -4
  47. package/skeleton/skeleton.module.d.ts +4 -4
  48. package/tag/tag.component.d.ts +2 -2
  49. package/styles/components/_index.scss +0 -15
  50. package/styles/components/alert.scss +0 -28
  51. package/styles/components/button.scss +0 -115
  52. package/styles/components/card.scss +0 -41
  53. package/styles/components/divider.scss +0 -19
  54. package/styles/components/dropdown.scss +0 -128
  55. package/styles/components/extended-input.scss +0 -64
  56. package/styles/components/form.scss +0 -85
  57. package/styles/components/heading.scss +0 -25
  58. package/styles/components/icon.scss +0 -32
  59. package/styles/components/input.scss +0 -43
  60. package/styles/components/password-input.scss +0 -31
  61. package/styles/components/skeleton.scss +0 -58
  62. package/styles/components/spinner.scss +0 -44
  63. package/styles/components/tag.scss +0 -70
  64. package/styles/components/tooltip.scss +0 -60
  65. package/styles/functions.scss +0 -184
  66. package/styles/grid.scss +0 -177
  67. package/styles/index.scss +0 -164
  68. package/styles/mixins/_index.scss +0 -22
  69. package/styles/mixins/alert.scss +0 -7
  70. package/styles/mixins/button.scss +0 -56
  71. package/styles/mixins/reset-component.scss +0 -13
  72. package/styles/mixins/tag.scss +0 -68
  73. package/styles/reset.scss +0 -104
  74. package/styles/root.scss +0 -31
  75. package/styles/vars.scss +0 -1075
  76. package/styles.css +0 -4
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
-
package/styles/index.scss DELETED
@@ -1,164 +0,0 @@
1
- /*!
2
- * Copyright 2022 Garuna LLP
3
- * Licensed under MIT
4
- */
5
-
6
- @import 'functions';
7
- @import 'vars';
8
-
9
- @import 'root';
10
- @import 'reset';
11
- @import 'components';
12
- @import 'grid';
13
-
14
- // cdk overlay
15
- .cdk-overlay-container {
16
- pointer-events: none;
17
- top: 0;
18
- left: 0;
19
- height: 100%;
20
- width: 100%;
21
- position: fixed;
22
- z-index: 1000;
23
- }
24
-
25
- .cdk-visually-hidden {
26
- border: 0;
27
- clip: rect(0 0 0 0);
28
- height: 1px;
29
- margin: -1px;
30
- overflow: hidden;
31
- padding: 0;
32
- position: absolute;
33
- width: 1px;
34
- outline: 0;
35
- -webkit-appearance: none;
36
- -moz-appearance: none;
37
- }
38
-
39
- .cdk-overlay-backdrop {
40
- top: 0;
41
- bottom: 0;
42
- left: 0;
43
- right: 0;
44
- -webkit-tap-highlight-color: transparent;
45
- transition: opacity .4s cubic-bezier(.25, .8, .25, 1);
46
- opacity: 0;
47
- position: absolute;
48
- pointer-events: auto;
49
- z-index: 1000;
50
-
51
- &.wr-modal-mask {
52
- opacity: 1;
53
- }
54
- }
55
-
56
- .cdk-overlay-pane {
57
- position: absolute;
58
- pointer-events: auto;
59
- z-index: 1000; // Give an opportunity to the content own to manage their z-index such as Modal
60
- }
61
-
62
- .cdk-overlay-connected-position-bounding-box {
63
- position: absolute;
64
- z-index: 1000;
65
- display: flex;
66
- flex-direction: column;
67
- min-width: 1px;
68
- min-height: 1px;
69
- }
70
-
71
- // Used when disabling global scrolling.
72
- .cdk-global-scrollblock {
73
- position: fixed;
74
-
75
- // Necessary for the content not to lose its width. Note that we're using 100%, instead of
76
- // 100vw, because 100vw includes the width plus the scrollbar, whereas 100% is the width
77
- // that the element had before we made it `fixed`.
78
- width: 100%;
79
-
80
- // Note: this will always add a scrollbar to whatever element it is on, which can
81
- // potentially result in double scrollbars. It shouldn't be an issue, because we won't
82
- // block scrolling on a page that doesn't have a scrollbar in the first place.
83
- overflow-y: scroll;
84
-
85
- // https://github.com/angular/material2/issues/15051
86
- body {
87
- overflow-x: visible;
88
- }
89
- }
90
-
91
- .wr-overlay-transparent-backdrop {
92
- &, &.cdk-overlay-backdrop-showing {
93
- opacity: 0;
94
- }
95
- }
96
-
97
- .wr-animate-disabled {
98
- // badge
99
- &.wr-scroll-number-only {
100
- animation: none;
101
- transition: none;
102
- }
103
-
104
- // drawer
105
- &.wr-drawer {
106
- &.wr-drawer-open .wr-drawer-mask {
107
- animation: none;
108
- transition: none;
109
- }
110
-
111
- & > * {
112
- transition: none;
113
- }
114
- }
115
-
116
- // modal
117
- .wr-modal-mask, .wr-modal {
118
- animation: none;
119
- transition: none;
120
-
121
- &.zoom-enter, &.zoom-leave,
122
- &.zoom-enter-active, &.zoom-leave-active {
123
- animation: none;
124
- transition: none;
125
- }
126
- }
127
-
128
- // menu
129
- &.wr-menu {
130
- transition: none;
131
-
132
- .wr-menu-item, .wr-menu-submenu-title {
133
- transition: none;
134
- }
135
-
136
- .wr-menu-item .wricon, .wr-menu-submenu-title .wricon {
137
- transition: none;
138
-
139
- & + span {
140
- transition: none;
141
- }
142
- }
143
- }
144
-
145
- // tabs
146
- &.wr-tabs {
147
- .wr-tabs-top-content.wr-tabs-content-animated,
148
- .wr-tabs-bottom-content.wr-tabs-content-animated,
149
- .wr-tabs-top-content > .wr-tabs-tabpane,
150
- .wr-tabs-bottom-content > .wr-tabs-tabpane,
151
- &.wr-tabs-left .wr-tabs-ink-bar-animated,
152
- &.wr-tabs-right .wr-tabs-ink-bar-animated,
153
- &.wr-tabs-top .wr-tabs-ink-bar-animated,
154
- &.wr-tabs-bottom .wr-tabs-ink-bar-animated {
155
- transition: none;
156
- }
157
- }
158
-
159
- // collapse
160
- &.wr-collapse > .wr-collapse-item > .wr-collapse-header .wr-collapse-arrow svg {
161
- transition: none;
162
- }
163
- }
164
-
@@ -1,22 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
1
- @import '../functions';
2
-
3
- @mixin alert-colors-generate($color) {
4
- color: mix(#000, $color);
5
- box-shadow: inset 0 0 0 1px rgba($color, 0.25);
6
- background-color: rgba($color, 0.125);
7
- }
@@ -1,56 +0,0 @@
1
- @import '../functions';
2
-
3
- @mixin button-outline-variant($color) {
4
- color: $color;
5
- background-color: transparent;
6
- box-shadow: inset 0 0 0 1.25px rgba($color, 0.3);
7
-
8
- & > wr-spin {
9
- color: $color;
10
- }
11
-
12
- &:hover {
13
- color: color-contrast($color);
14
- background-color: $color;
15
- box-shadow: none;
16
-
17
- & > wr-spin {
18
- color: color-contrast($color);
19
- }
20
- }
21
-
22
- .btn-check:checked + &,
23
- .btn-check:active + &,
24
- &:active,
25
- &.active,
26
- &.dropdown-toggle.show {
27
- color: mix(color-contrast($color), darken($color, 20%), 70%);
28
- background-color: darken($color, 20%);
29
- box-shadow: none;
30
- }
31
- }
32
-
33
- @mixin button-variant($color) {
34
- color: color-contrast($color);
35
- background-color: $color;
36
- box-shadow: rgba($color, 0.2) 0 3px 5px -1px, rgba($color, 0.14) 0 6px 10px 0,rgba($color, 0.12) 0 1px 18px 0;
37
-
38
- &:hover {
39
- color: color-contrast($color);
40
- background-color: saturate(lighten($color, 15%), 20%);
41
- box-shadow: rgba($color, 0.2) 0 3px 5px -1px, rgba($color, 0.14) 0 6px 10px 0,rgba($color, 0.12) 0 1px 18px 0;
42
- }
43
-
44
- .btn-check:checked + &,
45
- .btn-check:active + &,
46
- &:active,
47
- &.active,{
48
- color: mix(color-contrast($color), darken($color, 20%), 70%);
49
- background-color: darken($color, 20%);
50
- box-shadow: none;
51
- }
52
-
53
- & > wr-spin {
54
- color: color-contrast($color);
55
- }
56
- }
@@ -1,13 +0,0 @@
1
- @import '../vars';
2
-
3
- @mixin reset-component() {
4
- box-sizing: border-box;
5
- margin: 0;
6
- padding: 0;
7
- color: $text-color;
8
- font-size: $font-size-base;
9
- font-variant: $font-variant-base;
10
- line-height: $line-height-base;
11
- list-style: none;
12
- font-feature-settings: $font-feature-settings-base;
13
- }
@@ -1,68 +0,0 @@
1
- @import '../functions';
2
-
3
- @mixin tag-colors-generate($color) {
4
- color: color-contrast($color);
5
- background-color: $color;
6
-
7
- &:hover {
8
- color: color-contrast($color);
9
- background-color: saturate(lighten($color, 15%), 20%);
10
- }
11
-
12
- &:active,
13
- &.active,{
14
- color: mix(color-contrast($color), darken($color, 20%), 70%);
15
- background-color: darken($color, 20%);
16
- }
17
-
18
- & > wr-icon {
19
- color: mix(color-contrast($color), $color);
20
- }
21
- }
22
-
23
- @mixin tag-transparent-colors-generate($color) {
24
- color: $color;
25
- background-color: rgba($color, 0.125);
26
- box-shadow: inset 0 0 0 1px rgba($color, 0.125);
27
-
28
- &:hover {
29
- color: color-contrast($color);
30
- background-color: $color;
31
-
32
- & > wr-icon {
33
- color: rgba(color-contrast($color), 0.5);
34
- }
35
- }
36
-
37
- &:active,
38
- &.active,{
39
- color: mix(color-contrast($color), darken($color, 20%), 70%);
40
- background-color: darken($color, 20%);
41
- }
42
-
43
- & > wr-icon {
44
- color: $color;
45
- }
46
- }
47
-
48
- @mixin tag-outline-colors-generate($color) {
49
- color: $color;
50
- background-color: transparent;
51
- box-shadow: inset 0 0 0 1px lighten($color, 30%);
52
-
53
- &:hover {
54
- color: lighten($color, 20%);
55
- box-shadow: inset 0 0 0 1px lighten($color, 35%);
56
- }
57
-
58
- &:active,
59
- &.active {
60
- color: mix(color-contrast($color), darken($color, 20%), 70%);
61
- background-color: darken($color, 20%);
62
- box-shadow: none;
63
- }
64
-
65
- & > wr-icon {
66
- color: lighten($color, 10%);
67
- }
68
- }
package/styles/reset.scss DELETED
@@ -1,104 +0,0 @@
1
- @import './vars';
2
-
3
- *,
4
- *::before,
5
- *::after {
6
- box-sizing: border-box;
7
- margin: 0;
8
- padding: 0;
9
- border: 0;
10
- font-size: 100%;
11
- vertical-align: baseline;
12
- }
13
-
14
- :root {
15
- font-size: 1rem;
16
- scroll-behavior: smooth;
17
- }
18
-
19
- html,
20
- body {
21
- background-color: $body-background;
22
- height: 100%;
23
- width: 100%;
24
- font-family: $font-family;
25
- font-size: $font-size-base;
26
- font-weight: $font-weight-base;
27
- line-height: $line-height-base;
28
- letter-spacing: $letter-spacing-base;
29
- color: $color-dark;
30
- text-align: left;
31
- direction: ltr;
32
- -webkit-text-size-adjust: 100%;
33
- -webkit-tap-highlight-color: rgba(0,0,0,0);
34
- -webkit-font-smoothing: antialiased;
35
- -moz-osx-font-smoothing: grayscale;
36
- -ms-text-size-adjust: 100%;
37
- }
38
-
39
- :focus {
40
- outline: 0;
41
- }
42
-
43
- article, aside, details, figcaption, figure,
44
- footer, header, hgroup, menu, nav, section {
45
- display: block;
46
- }
47
-
48
- a {
49
- text-decoration: none;
50
- }
51
-
52
- ol, ul {
53
- list-style: none;
54
- }
55
-
56
- blockquote, q {
57
- quotes: none;
58
-
59
- &:before,
60
- &:after {
61
- content: '';
62
- content: none;
63
- }
64
- }
65
-
66
- table {
67
- border-collapse: collapse;
68
- border-spacing: 0;
69
- }
70
-
71
- input[type=search]::-webkit-search-cancel-button,
72
- input[type=search]::-webkit-search-decoration,
73
- input[type=search]::-webkit-search-results-button,
74
- input[type=search]::-webkit-search-results-decoration {
75
- -webkit-appearance: none;
76
- -moz-appearance: none;
77
- }
78
-
79
- input[type=search] {
80
- -webkit-appearance: none;
81
- -moz-appearance: none;
82
- -webkit-box-sizing: content-box;
83
- -moz-box-sizing: content-box;
84
- box-sizing: content-box;
85
- }
86
-
87
- textarea {
88
- overflow: auto;
89
- vertical-align: top;
90
- resize: vertical;
91
- }
92
-
93
- audio:not([controls]) {
94
- display: none;
95
- height: 0;
96
- }
97
-
98
- [hidden] {
99
- display: none;
100
- }
101
-
102
- img {
103
- border: none;
104
- }
package/styles/root.scss DELETED
@@ -1,31 +0,0 @@
1
- @import 'vars';
2
-
3
- :root {
4
- @each $color, $value in $theme-colors {
5
- --color-#{$color}: #{$value};
6
- }
7
-
8
- @each $color, $value in $theme-colors-rgb {
9
- --color-#{$color}-rgb: #{$value};
10
- }
11
-
12
- --color-white: #{$color-white};
13
- --color-black: #{$color-black};
14
-
15
- --color-white-rgb: #{to-rgb($color-white)};
16
- --color-black-rgb: #{to-rgb($color-black)};
17
-
18
- --font-family-base: #{$font-family};
19
- --font-family-code: #{$code-family};
20
- --font-size-base: #{$font-size-base};
21
- --font-weight-base: #{$font-size-base};
22
-
23
- --transition-base: #{$transition-base};
24
-
25
- --radius-base: 0.625rem;
26
-
27
- --shadow-base: inset 0 0 0 1px rgba(var(--color-dark-rgb), 0.125);
28
- //, 0px 2px 4px -2px rgba(var(--color-dark-rgb), 0.125
29
- --shadow-base-hover: inset 0 0 0 1px rgba(var(--color-dark-rgb), 0.125), 0px 25px 50px -12px rgba(var(--color-dark-rgb), 0.125);
30
-
31
- }