@woosmap/ui 4.34.0-beta.14 → 4.34.0-beta.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.34.0-beta.14",
3
+ "version": "4.34.0-beta.16",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -46,7 +46,7 @@ export default class Button extends Component {
46
46
  );
47
47
  let iconComponent = icon ? <Icon isFill={isFillIcon} size={iconSize} icon={icon} /> : null;
48
48
  if (isLoading) {
49
- iconComponent = <Icon icon="load" />;
49
+ iconComponent = <Icon isFill isLoad icon="load" />;
50
50
  }
51
51
  return (
52
52
  <button
@@ -638,9 +638,9 @@ const Icons = {
638
638
 
639
639
  class Icon extends Component {
640
640
  render() {
641
- const { icon, size, className, isFill, title, testId } = this.props;
641
+ const { icon, size, className, isFill, isLoad, title, testId } = this.props;
642
642
  const IconComponent = Object.keys(Icons).includes(icon) ? Icons[icon] : Woosmap;
643
- const classes = cl('icon', { 'icon--fill': isFill }, className);
643
+ const classes = cl('icon', { 'icon--fill': isFill }, { 'icon--load': isLoad }, className);
644
644
  return (
645
645
  <IconComponent
646
646
  className={classes}
@@ -659,6 +659,7 @@ Icon.defaultProps = {
659
659
  title: null,
660
660
  testId: 'icon',
661
661
  isFill: false,
662
+ isLoad: false,
662
663
  };
663
664
 
664
665
  Icon.propTypes = {
@@ -666,6 +667,7 @@ Icon.propTypes = {
666
667
  className: PropTypes.string,
667
668
  icon: PropTypes.string.isRequired,
668
669
  isFill: PropTypes.bool,
670
+ isLoad: PropTypes.bool,
669
671
  title: PropTypes.string,
670
672
  testId: PropTypes.string,
671
673
  };
@@ -43,6 +43,7 @@ export default class Input extends Component {
43
43
  onBlur,
44
44
  onFocus,
45
45
  icon,
46
+ isInputIconFill,
46
47
  enableTogglePassword,
47
48
  } = this.props;
48
49
 
@@ -65,7 +66,7 @@ export default class Input extends Component {
65
66
  }
66
67
  return (
67
68
  <div className="input__container">
68
- {icon ? <Icon icon={icon} size={iconSize} /> : null}
69
+ {icon ? <Icon icon={icon} isFill={isInputIconFill} size={iconSize} /> : null}
69
70
  {React.createElement(type === 'textarea' ? 'textarea' : 'input', {
70
71
  className: cl('input__item', {
71
72
  error,
@@ -167,6 +168,7 @@ Input.propTypes = {
167
168
  onFocus: PropTypes.func,
168
169
  onPressEnter: PropTypes.func,
169
170
  enableTogglePassword: PropTypes.bool,
171
+ isInputIconFill: PropTypes.bool,
170
172
  };
171
173
 
172
174
  Input.defaultProps = {
@@ -192,4 +194,5 @@ Input.defaultProps = {
192
194
  onBlur: null,
193
195
  onFocus: null,
194
196
  enableTogglePassword: false,
197
+ isInputIconFill: false,
195
198
  };
@@ -31,15 +31,18 @@
31
31
  &.btn--large
32
32
  buttonLarge()
33
33
  width $buttonHeightLarge
34
+ &.btn--primary
35
+ &.btn--important
36
+ &.btn--loading
37
+ .icon--load
38
+ fill $light
39
+ stroke-width 0
34
40
  &.btn--primary
35
41
  &:disabled
36
42
  &:hover
37
43
  background-color $primary
38
44
  .icon
39
45
  stroke $light
40
- &.btn--loading
41
- &:hover
42
- background-color $primary
43
46
  &.btn--secondary
44
47
  &:disabled
45
48
  &:hover
@@ -60,6 +63,7 @@
60
63
  flex-shrink 0
61
64
  .icon
62
65
  flex-shrink 0
66
+
63
67
  &--primary
64
68
  &--important
65
69
  btn()
@@ -80,6 +84,15 @@
80
84
  flex-shrink 0
81
85
  .icon
82
86
  flex-shrink 0
87
+ &.btn--loading
88
+ .icon--load
89
+ fill $light
90
+ stroke-width 0
91
+ &:hover
92
+ background-color $primary
93
+ .icon--load
94
+ fill $light
95
+ stroke-width 0
83
96
  &--primary
84
97
  background-color $primary
85
98
  &:not(.btn--group):not(.btn--switch)
@@ -700,8 +713,6 @@
700
713
  white-space normal
701
714
  line-height 1
702
715
  margin-top .3rem
703
- .icon
704
- display block
705
716
  @media screen and (max-width 350px)
706
717
  .btn
707
718
  &--tab
@@ -7,6 +7,7 @@
7
7
  &:not(.icon--fill)
8
8
  fill: none
9
9
  &--fill
10
+ &--load
10
11
  stroke-width: 0
11
12
  fill $secondary
12
13