ngwr 0.0.4 → 0.0.8

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 (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -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 → _core}/util/convert.d.ts +2 -1
  9. package/button/button.component.d.ts +14 -15
  10. package/button/button.module.d.ts +4 -4
  11. package/divider/divider.component.d.ts +4 -4
  12. package/divider/divider.module.d.ts +4 -5
  13. package/esm2020/_core/components/base.component.mjs +23 -0
  14. package/esm2020/_core/constants/style-prefix.mjs +2 -0
  15. package/esm2020/_core/index.mjs +10 -0
  16. package/esm2020/_core/types/boolean-input.mjs +2 -0
  17. package/esm2020/_core/types/safe-any.mjs +2 -0
  18. package/esm2020/_core/util/convert.mjs +51 -0
  19. package/esm2020/button/button.component.mjs +16 -22
  20. package/esm2020/button/button.module.mjs +11 -11
  21. package/esm2020/button/index.mjs +1 -1
  22. package/esm2020/divider/divider.component.mjs +8 -9
  23. package/esm2020/divider/divider.module.mjs +9 -11
  24. package/esm2020/divider/index.mjs +1 -1
  25. package/esm2020/extended-input/extended-input.component.mjs +8 -7
  26. package/esm2020/extended-input/extended-input.module.mjs +11 -19
  27. package/esm2020/extended-input/index.mjs +1 -1
  28. package/esm2020/form/form-error.component.mjs +9 -15
  29. package/esm2020/form/form-item.component.mjs +14 -23
  30. package/esm2020/form/form.module.mjs +10 -18
  31. package/esm2020/form/index.mjs +1 -1
  32. package/esm2020/icon/index.mjs +1 -1
  33. package/esm2020/icon/wr-icon.component.mjs +2 -2
  34. package/esm2020/icon/wr-icon.module.mjs +1 -1
  35. package/esm2020/icon/wr-icon.service.mjs +1 -1
  36. package/esm2020/icon/wr-icons.mjs +99 -29
  37. package/esm2020/input/index.mjs +1 -1
  38. package/esm2020/input/input.directive.mjs +14 -19
  39. package/esm2020/input/input.module.mjs +9 -13
  40. package/esm2020/ngwr.mjs +1 -1
  41. package/esm2020/password-input/index.mjs +1 -1
  42. package/esm2020/password-input/password-input.component.mjs +11 -9
  43. package/esm2020/password-input/password-input.module.mjs +11 -26
  44. package/esm2020/public-api.mjs +1 -1
  45. package/esm2020/skeleton/index.mjs +1 -1
  46. package/esm2020/skeleton/skeleton.component.mjs +12 -19
  47. package/esm2020/skeleton/skeleton.module.mjs +11 -11
  48. package/esm2020/spinner/index.mjs +1 -1
  49. package/esm2020/spinner/spinner.component.mjs +7 -6
  50. package/esm2020/spinner/spinner.module.mjs +9 -11
  51. package/esm2020/tag/index.mjs +1 -1
  52. package/esm2020/tag/tag.component.mjs +30 -45
  53. package/esm2020/tag/tag.module.mjs +11 -11
  54. package/extended-input/extended-input.component.d.ts +9 -8
  55. package/extended-input/extended-input.module.d.ts +4 -4
  56. package/fesm2015/ngwr.mjs +332 -322
  57. package/fesm2015/ngwr.mjs.map +1 -1
  58. package/fesm2020/ngwr.mjs +333 -323
  59. package/fesm2020/ngwr.mjs.map +1 -1
  60. package/form/form-error.component.d.ts +3 -6
  61. package/form/form-item.component.d.ts +9 -9
  62. package/form/form.module.d.ts +4 -4
  63. package/icon/wr-icon.component.d.ts +2 -1
  64. package/icon/wr-icons.d.ts +121 -23
  65. package/input/input.directive.d.ts +5 -6
  66. package/input/input.module.d.ts +4 -4
  67. package/logo.svg +1 -0
  68. package/ngwr.min.css +8 -0
  69. package/package.json +13 -10
  70. package/password-input/password-input.component.d.ts +10 -9
  71. package/password-input/password-input.module.d.ts +4 -4
  72. package/skeleton/skeleton.component.d.ts +7 -9
  73. package/skeleton/skeleton.module.d.ts +4 -4
  74. package/spinner/spinner.component.d.ts +3 -3
  75. package/spinner/spinner.module.d.ts +4 -5
  76. package/tag/tag.component.d.ts +16 -15
  77. package/tag/tag.module.d.ts +4 -4
  78. package/core/util/index.d.ts +0 -1
  79. package/esm2020/core/util/convert.mjs +0 -50
  80. package/esm2020/core/util/index.mjs +0 -2
  81. package/styles/components/_index.scss +0 -15
  82. package/styles/components/alert.scss +0 -28
  83. package/styles/components/button.scss +0 -115
  84. package/styles/components/card.scss +0 -41
  85. package/styles/components/divider.scss +0 -19
  86. package/styles/components/dropdown.scss +0 -128
  87. package/styles/components/extended-input.scss +0 -64
  88. package/styles/components/form.scss +0 -85
  89. package/styles/components/heading.scss +0 -25
  90. package/styles/components/icon.scss +0 -32
  91. package/styles/components/input.scss +0 -43
  92. package/styles/components/password-input.scss +0 -31
  93. package/styles/components/skeleton.scss +0 -58
  94. package/styles/components/spinner.scss +0 -44
  95. package/styles/components/tag.scss +0 -70
  96. package/styles/components/tooltip.scss +0 -60
  97. package/styles/functions.scss +0 -184
  98. package/styles/grid.scss +0 -177
  99. package/styles/index.scss +0 -165
  100. package/styles/mixins/_index.scss +0 -22
  101. package/styles/mixins/alert.scss +0 -7
  102. package/styles/mixins/button.scss +0 -56
  103. package/styles/mixins/reset-component.scss +0 -13
  104. package/styles/mixins/tag.scss +0 -68
  105. package/styles/reset.scss +0 -104
  106. package/styles/root.scss +0 -31
  107. package/styles/vars.scss +0 -1075
@@ -1,50 +0,0 @@
1
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
- export function toBoolean(value) {
3
- return coerceBooleanProperty(value);
4
- }
5
- function propDecoratorFactory(name, fallback) {
6
- function propDecorator(target, propName, originalDescriptor) {
7
- const privatePropName = `$$__walrusPropDecorator__${propName}`;
8
- if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {
9
- console.warn(`The prop "${privatePropName}" is already exist, it will be overrided by ${name} decorator.`);
10
- }
11
- Object.defineProperty(target, privatePropName, {
12
- configurable: true,
13
- writable: true
14
- });
15
- return {
16
- get() {
17
- return originalDescriptor && originalDescriptor.get
18
- ? originalDescriptor.get.bind(this)()
19
- : this[privatePropName];
20
- },
21
- set(value) {
22
- if (originalDescriptor && originalDescriptor.set) {
23
- originalDescriptor.set.bind(this)(fallback(value));
24
- }
25
- this[privatePropName] = fallback(value);
26
- }
27
- };
28
- }
29
- return propDecorator;
30
- }
31
- /**
32
- * Input decorator that handle a prop to do get/set automatically with toBoolean
33
- *
34
- * Why not using @InputBoolean alone without @Input? AOT needs @Input to be visible
35
- *
36
- * @howToUse
37
- * ```
38
- * @Input() @InputBoolean() visible: boolean = false;
39
- *
40
- * // Act as below:
41
- * // @Input()
42
- * // get visible() { return this.__visible; }
43
- * // set visible(value) { this.__visible = value; }
44
- * // __visible = false;
45
- * ```
46
- */
47
- export function InputBoolean() {
48
- return propDecoratorFactory('InputBoolean', toBoolean);
49
- }
50
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25nd3IvY29yZS91dGlsL2NvbnZlcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFOUQsTUFBTSxVQUFVLFNBQVMsQ0FBQyxLQUF1QjtJQUMvQyxPQUFPLHFCQUFxQixDQUFDLEtBQUssQ0FBQyxDQUFDO0FBQ3RDLENBQUM7QUFFRCxTQUFTLG9CQUFvQixDQUMzQixJQUFZLEVBQ1osUUFBcUI7SUFFckIsU0FBUyxhQUFhLENBQ3BCLE1BQVcsRUFDWCxRQUFnQixFQUNoQixrQkFBaUQ7UUFFakQsTUFBTSxlQUFlLEdBQUcsNEJBQTRCLFFBQVEsRUFBRSxDQUFDO1FBRS9ELElBQUksTUFBTSxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxlQUFlLENBQUMsRUFBRTtZQUNqRSxPQUFPLENBQUMsSUFBSSxDQUFDLGFBQWEsZUFBZS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i9cbmV4cG9ydCBmdW5jdGlvbiBJbnB1dEJvb2xlYW4oKTogYW55IHtcbiAgcmV0dXJuIHByb3BEZWNvcmF0b3JGYWN0b3J5KCdJbnB1dEJvb2xlYW4nLCB0b0Jvb2xlYW4pO1xufVxuIl19
@@ -1,2 +0,0 @@
1
- export * from './convert';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3dyL2NvcmUvdXRpbC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFdBQVcsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29udmVydCc7XG4iXX0=
@@ -1,15 +0,0 @@
1
- @import 'alert';
2
- @import 'button';
3
- @import 'card';
4
- @import 'divider';
5
- @import 'dropdown';
6
- @import 'extended-input';
7
- @import 'form';
8
- @import 'heading';
9
- @import 'icon';
10
- @import 'input';
11
- @import 'password-input';
12
- @import 'skeleton';
13
- @import 'spinner';
14
- @import 'tag';
15
- @import 'tooltip';
@@ -1,28 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $alert-prefix: #{$prefix}-alert;
5
-
6
- .#{$alert-prefix} {
7
- display: flex;
8
- align-items: center;
9
- width: 100%;
10
-
11
- margin-bottom: 0.5rem;
12
-
13
- word-wrap: break-word;
14
- font-size: $font-size-base;
15
- font-weight: $font-weight-base;
16
- line-height: $line-height-base;
17
-
18
- padding: 0.5rem 0.75rem;
19
- border-radius: 0.375rem;
20
-
21
- user-select: none;
22
-
23
- @each $color, $value in $theme-colors {
24
- &.#{$alert-prefix}-#{$color} {
25
- @include alert-colors-generate($value);
26
- }
27
- }
28
- }
@@ -1,115 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $btn-prefix: #{$prefix}-btn;
5
-
6
- .#{$btn-prefix} {
7
- display: inline-flex;
8
- align-items: center;
9
- justify-content: center;
10
- height: auto;
11
-
12
- padding: calc(#{$btn-padding-y} + 1px) $btn-padding-x;
13
- border-radius: $btn-border-radius;
14
-
15
- font-family: $font-family;
16
- //line-height: $btn-line-height;
17
- text-align: center;
18
- vertical-align: middle;
19
-
20
- cursor: pointer;
21
- user-select: none;
22
-
23
- position: relative;
24
-
25
- transition: $transition-primary;
26
-
27
- &__text {
28
- font-size: $btn-font-size;
29
- font-weight: $btn-font-weight;
30
- }
31
-
32
- &--block {
33
- width: 100%;
34
- }
35
-
36
- &--rounded {
37
- border-radius: $btn-round-border-radius;
38
- padding: $btn-round-padding-y $btn-round-padding-x;
39
- }
40
-
41
- & > wr-icon {
42
- width: 1rem;
43
- height: 1rem;
44
- margin-right: 0.375rem;
45
- }
46
-
47
- & > wr-spin {
48
- position: absolute;
49
- z-index: 1;
50
- top: 50%;
51
- transform: translateY(-50%);
52
- margin-left: auto;
53
- margin-right: auto;
54
- }
55
-
56
- &--small {
57
- padding: 0.25rem 0.5rem;
58
-
59
- .#{$btn-prefix} {
60
- &__text {
61
- font-size: $btn-font-size / 1.25;
62
- }
63
- }
64
-
65
- & > wr-icon {
66
- width: 0.75rem;
67
- height: 0.75rem;
68
- margin-right: 0.25rem;
69
- }
70
- }
71
-
72
- &--loading {
73
- pointer-events: none;
74
-
75
- .#{$btn-prefix} {
76
- &__text {
77
- opacity: 0;
78
- }
79
- }
80
-
81
- & > wr-icon {
82
- opacity: 0;
83
- }
84
- }
85
- }
86
-
87
- @each $color, $value in $theme-colors {
88
- .#{$btn-prefix}-#{$color} {
89
- @include button-variant($value);
90
-
91
- &:disabled,
92
- &.#{$btn-prefix}--disabled {
93
- color: var(--color-medium);
94
- background-color: var(--color-light);
95
- box-shadow: none;
96
- pointer-events: none;
97
- }
98
- }
99
- }
100
-
101
- @each $color, $value in $theme-colors {
102
- .#{$btn-prefix}-#{$color} {
103
- &.#{$btn-prefix}--outlined {
104
- @include button-outline-variant($value);
105
-
106
- &:disabled,
107
- &.#{$btn-prefix}--disabled {
108
- color: var(--color-medium);
109
- background-color: transparent;
110
- box-shadow: inset 0 0 0 1px var(--color-light);
111
- pointer-events: none;
112
- }
113
- }
114
- }
115
- }
@@ -1,41 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $card-prefix: #{$prefix}-card;
5
-
6
- .#{$card-prefix} {
7
- display: flex;
8
- flex-direction: column;
9
- align-content: baseline;
10
- justify-content: center;
11
-
12
- background: $color-white;
13
- border-radius: 0.75rem;
14
-
15
- padding: 1.5rem 1.25rem;
16
- box-shadow: $shadow-1-down;
17
-
18
- &--hoverable {
19
- transition: $transition-base;
20
-
21
- &:hover {
22
- cursor: pointer;
23
- box-shadow: $box-shadow-base;
24
-
25
- .#{$card-prefix}__title {
26
- color: $color-secondary;
27
- }
28
- }
29
- }
30
-
31
- &__title {
32
- color: $color-dark;
33
- font-size: 1.125rem;
34
- font-weight: 500;
35
- line-height: 1;
36
-
37
- margin-bottom: 0.5rem;
38
-
39
- transition: $transition-base;
40
- }
41
- }
@@ -1,19 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $divider-prefix: #{$prefix}-divider;
5
-
6
- .#{$divider-prefix} {
7
- display: block;
8
-
9
- width: 100%;
10
- height: 1px;
11
-
12
- margin-top: 4px;
13
- margin-bottom: 4px;
14
-
15
- background: $color-light;
16
-
17
- user-select: none;
18
- pointer-events: none;
19
- }
@@ -1,128 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $dropdown-prefix: #{$prefix}-dropdown;
5
-
6
- .#{$dropdown-prefix} {
7
- @include reset-component();
8
-
9
- position: absolute;
10
- top: -9999px;
11
- left: -9999px;
12
- z-index: $zindex-dropdown;
13
- display: block;
14
-
15
- &::before {
16
- position: absolute;
17
- top: -$popover-distance + $popover-arrow-width;
18
- right: 0;
19
- bottom: -$popover-distance + $popover-arrow-width;
20
- left: -7px;
21
- z-index: -9999;
22
- opacity: 0.0001;
23
- content: ' ';
24
- }
25
-
26
- &-trigger {
27
- &:hover {
28
- cursor: pointer;
29
- }
30
- }
31
-
32
- &-wrap {
33
- position: relative;
34
- }
35
-
36
- &-hidden,
37
- &-menu-hidden,
38
- &-menu-submenu-hidden {
39
- display: none;
40
- }
41
-
42
- &-menu {
43
- display: flex;
44
- flex-direction: column;
45
- align-items: baseline;
46
- position: relative;
47
- margin: 0;
48
- padding: 1rem;
49
- text-align: left;
50
- list-style-type: none;
51
- background-color: $dropdown-menu-bg;
52
- background-clip: padding-box;
53
- border-radius: $border-radius-base;
54
- outline: none;
55
- box-shadow: $box-shadow-base;
56
-
57
- &-submenu-popup {
58
- position: absolute;
59
- z-index: $zindex-dropdown;
60
- background: transparent;
61
- box-shadow: none;
62
- transform-origin: 0 0;
63
-
64
- ul,
65
- li {
66
- list-style: none;
67
- }
68
-
69
- ul {
70
- margin-right: 0.3em;
71
- margin-left: 0.3em;
72
- }
73
- }
74
-
75
- // ======================= Item Content =======================
76
- &-item {
77
- position: relative;
78
- display: flex;
79
- align-items: center;
80
- color: $color-dark;
81
- transition: all 0.15s linear;
82
-
83
- &:hover {
84
- color: $color-secondary;
85
- }
86
- }
87
-
88
- &-item,
89
- &-submenu-title {
90
- clear: both;
91
- font-weight: normal;
92
- white-space: nowrap;
93
- cursor: pointer;
94
- margin: 0 0 1rem;
95
-
96
- &:last-child {
97
- margin-bottom: 0;
98
- }
99
-
100
- }
101
- }
102
-
103
- &.#{$dropdown-prefix}-slide-down-enter,
104
- &.#{$dropdown-prefix}-slide-down-appear,
105
- &.#{$dropdown-prefix}-slide-down-enter,
106
- &.#{$dropdown-prefix}-slide-down-appear,
107
- &.#{$dropdown-prefix}-slide-down-enter,
108
- &.#{$dropdown-prefix}-slide-down-appear {
109
- animation-name: antSlideUpIn;
110
- }
111
- }
112
-
113
- .wr-dropdown-menu {
114
- & > ul {
115
- list-style: inherit;
116
- margin: 0;
117
- padding: 0;
118
- }
119
- }
120
-
121
- .wr-dropdown {
122
- top: 0;
123
- left: 0;
124
- position: relative;
125
- width: 100%;
126
- margin-top: 6px;
127
- margin-bottom: 6px;
128
- }
@@ -1,64 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $extended-input-prefix: #{$prefix}-extended-input;
5
-
6
- .#{$extended-input-prefix} {
7
- display: flex;
8
- align-items: center;
9
-
10
- overflow: hidden;
11
-
12
- transition: $transition-primary;
13
- width: 100%;
14
-
15
- &--has-suffix {
16
- & > .wr-input {
17
- border-top-right-radius: 0;
18
- border-bottom-right-radius: 0;
19
- }
20
- }
21
-
22
- &--has-prefix {
23
- & > .wr-input {
24
- border-top-left-radius: 0;
25
- border-bottom-left-radius: 0;
26
- }
27
- }
28
-
29
- &-suffix,
30
- &-prefix {
31
- display: inline-flex;
32
- align-items: center;
33
- background: rgba($color-light, 0.5);
34
- border: 1px solid $color-light;
35
-
36
- padding-left: $input-padding-y;
37
- padding-right: $input-padding-y;
38
-
39
- height: 100%;
40
- max-width: 50%;
41
-
42
- user-select: none;
43
- pointer-events: none;
44
-
45
- &__text {
46
- color: $color-medium;
47
- overflow: hidden;
48
- text-overflow: ellipsis;
49
- white-space: nowrap;
50
- }
51
- }
52
-
53
- &-suffix {
54
- border-top-right-radius: $input-border-radius;
55
- border-bottom-right-radius: $input-border-radius;
56
- border-left: 0;
57
- }
58
-
59
- &-prefix {
60
- border-top-left-radius: $input-border-radius;
61
- border-bottom-left-radius: $input-border-radius;
62
- border-right: 0;
63
- }
64
- }
@@ -1,85 +0,0 @@
1
- @import '../vars';
2
- @import '../mixins';
3
-
4
- $form-prefix: #{$prefix}-form;
5
- $input-prefix: #{$prefix}-input;
6
- $password-input-prefix: #{$prefix}-password-input;
7
- $extended-input-prefix: #{$prefix}-extended-input;
8
-
9
- .#{$form-prefix} {
10
- &-item {
11
- @include column;
12
- margin-bottom: 1rem;
13
-
14
- & > * {
15
- width: 100%;
16
- }
17
-
18
- & > label {
19
- display: inline-flex;
20
- align-items: center;
21
- color: $color-medium;
22
- font-size: 0.875rem;
23
- font-weight: 400;
24
- line-height: 1;
25
- margin-bottom: 0.5rem;
26
- transition: $transition-base;
27
-
28
- & > nz-switch {
29
- margin-left: 0.5rem;
30
- }
31
-
32
- & > nz-radio-group {
33
- margin-left: 0.5rem;
34
-
35
- .ant-radio-button-wrapper {
36
- font-size: 0.625rem;
37
- height: 0.825rem !important;
38
- line-height: calc(1rem - 4px) !important;
39
-
40
- &:first-child {
41
- border-top-left-radius: 50rem;
42
- border-bottom-left-radius: 50rem;
43
- }
44
- &:last-child {
45
- border-top-right-radius: 50rem;
46
- border-bottom-right-radius: 50rem;
47
- }
48
- }
49
- }
50
- }
51
-
52
- &--has-error {
53
- & > label {
54
- color: $color-danger;
55
- }
56
- & .#{$input-prefix} {
57
- box-shadow: inset 0 0 0 1px $color-danger;
58
- }
59
- & .#{$extended-input-prefix} {
60
- &-suffix,
61
- &-prefix {
62
- border-color: $color-danger;
63
- background: rgba($color-danger, 0.25);
64
-
65
- &__text {
66
- color: $color-danger;
67
- }
68
- }
69
- }
70
-
71
- & > nz-select {
72
- .ant-select-selector {
73
- box-shadow: inset 0 0 0 1px $color-danger;
74
- }
75
- }
76
- }
77
- }
78
-
79
- &-error {
80
- color: $color-danger;
81
- font-size: 0.75rem;
82
- opacity: 0.75;
83
- margin-top: 0.25rem;
84
- }
85
- }
@@ -1,25 +0,0 @@
1
- @import '../vars';
2
-
3
- small {
4
- font-size: 0.75rem;
5
- color: inherit;
6
- opacity: 0.75;
7
- }
8
-
9
- .h1,.h2,.h3,.h4,.h5,.h6 {
10
- color: $heading-color;
11
- font-family: $headings-font-family;
12
- font-style: $headings-font-style;
13
- font-weight: $headings-font-weight;
14
- line-height: $headings-line-height;
15
- }
16
-
17
- @each $heading, $font-size in $heading-sizes {
18
- .h#{$heading} {
19
- font-size: $font-size;
20
- }
21
-
22
- h#{$heading} {
23
- @extend .h#{$heading};
24
- }
25
- }
@@ -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
- }