@woosmap/ui 3.107.0 → 3.110.0

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": "3.107.0",
3
+ "version": "3.110.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -7,8 +7,19 @@ import { tr } from '../utils/locale';
7
7
 
8
8
  class SimpleCard extends Component {
9
9
  render() {
10
- const { title, subtitle, className, testId, children, isSelected, isActive, isDisabled, isFavorite, ...rest } =
11
- this.props;
10
+ const {
11
+ title,
12
+ subtitle,
13
+ className,
14
+ testId,
15
+ children,
16
+ isSelected,
17
+ isActive,
18
+ isDisabled,
19
+ isFavorite,
20
+ isInline,
21
+ ...rest
22
+ } = this.props;
12
23
  return (
13
24
  <div
14
25
  className={cl(
@@ -16,6 +27,7 @@ class SimpleCard extends Component {
16
27
  { active: isActive },
17
28
  { disabled: isDisabled },
18
29
  { 'simplecard--selected': isSelected },
30
+ { inline: isInline },
19
31
  className
20
32
  )}
21
33
  data-testid={testId}
@@ -59,6 +71,7 @@ SimpleCard.defaultProps = {
59
71
  isActive: false,
60
72
  isDisabled: false,
61
73
  isFavorite: false,
74
+ isInline: false,
62
75
  };
63
76
 
64
77
  SimpleCard.propTypes = {
@@ -71,6 +84,7 @@ SimpleCard.propTypes = {
71
84
  className: PropTypes.string,
72
85
  testId: PropTypes.string,
73
86
  isFavorite: PropTypes.bool,
87
+ isInline: PropTypes.bool,
74
88
  };
75
89
 
76
90
  export default SimpleCard;
@@ -7,6 +7,9 @@
7
7
  padding 1.6rem
8
8
  border .1rem solid $secondary20
9
9
  cursor pointer
10
+ &.inline
11
+ flex-direction row
12
+ align-items center
10
13
  &:hover
11
14
  box-shadow 0 0 .6rem $secondary20
12
15
  border .1rem solid $secondary60
@@ -27,11 +30,22 @@
27
30
  background $primary6 url('../../images/texture.png')
28
31
 
29
32
  &__title
33
+ ellipsis()
30
34
  font-weight 600
31
35
  margin-bottom .2rem
36
+ .inline &
37
+ order 1
38
+ min-width 10rem
39
+ margin-right 1.2rem
40
+ margin-bottom 0
32
41
  &__subtitle
33
42
  font-size $fontSizeSmall
34
43
  color $secondary60
44
+ .inline &
45
+ order 3
46
+ ellipsis()
47
+ margin-left auto
48
+ white-space nowrap
35
49
  &__content
36
50
  margin-top auto
37
51
  padding-top 1rem
@@ -43,6 +57,14 @@
43
57
  right 1rem
44
58
  top 1.3rem
45
59
  fill $favorite
60
+ .inline &
61
+ sq(1.8)
62
+ position unset
63
+ top unset
64
+ right unset
65
+ order 2
66
+ flex-shrink 0
67
+ margin-right 1.2rem
46
68
  .tooltip
47
69
  position relative
48
70
  $mr = -.2rem