@woosmap/ui 3.90.0 → 3.91.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.90.0",
3
+ "version": "3.91.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -8,7 +8,8 @@
8
8
  width 100%
9
9
  zoom .9
10
10
  padding 2rem
11
- background-color #d5eaff
11
+ background #31436C
12
+ background radial-gradient(circle, #31436C 0%, #262D3E 100%)
12
13
  &__mobilewrapper
13
14
  trans()
14
15
  position relative
@@ -68,9 +69,8 @@
68
69
  .merchant__mobile--details--dirty &
69
70
  opacity 1
70
71
  &__button
71
- sq(3)
72
72
  position absolute
73
- background-color transparent
73
+ background-color transparent !important
74
74
  left -.6rem
75
75
  padding 0
76
76
  display flex
@@ -78,7 +78,7 @@
78
78
  justify-content center
79
79
  flex-shrink 0
80
80
  &:hover
81
- background-color $dark30
81
+ background-color $dark30 !important
82
82
 
83
83
  &__section
84
84
  padding 1.4rem 2rem
@@ -20,6 +20,9 @@
20
20
  position relative
21
21
  // box-shadow 0 0 3rem rgba($logo2, .15)
22
22
  box-shadow 0 .3rem 1rem rgba($secondary, .15)
23
+ .demo--merchant &
24
+ border .1rem solid $light
25
+
23
26
  &__showcase
24
27
  &__data
25
28
  display flex
@@ -42,6 +42,6 @@ ServiceMessage.defaultProps = {
42
42
 
43
43
  ServiceMessage.propTypes = {
44
44
  type: PropTypes.oneOf([undefined, 'success', 'error', 'warning', 'info']),
45
- text: PropTypes.string,
45
+ text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
46
46
  testId: PropTypes.string,
47
47
  };
@@ -4,16 +4,33 @@ import { act } from 'react-dom/test-utils';
4
4
  import '@testing-library/jest-dom/extend-expect';
5
5
  import ServiceMessage from './ServiceMessage';
6
6
 
7
- it('renders a ServiceMessage component ', () => {
8
- const ref = React.createRef();
9
- const { container } = render(
10
- <div>
11
- <ServiceMessage text="my message" ref={ref} />
12
- </div>
13
- );
14
- act(() => {
15
- ref.current.open();
16
- });
7
+ describe('<ServiceMessage />', () => {
8
+ it('renders a ServiceMessage component ', () => {
9
+ const ref = React.createRef();
10
+ const { container } = render(
11
+ <div>
12
+ <ServiceMessage text="my message" ref={ref} />
13
+ </div>
14
+ );
15
+ act(() => {
16
+ ref.current.open();
17
+ });
17
18
 
18
- expect(container.firstChild).toHaveTextContent('my message');
19
+ expect(container.firstChild).toHaveTextContent('my message');
20
+ });
21
+ it('does not throw a proptype error if text is node', () => {
22
+ const ref = React.createRef();
23
+ const errorSpy = jest.spyOn(console, 'error');
24
+ const warnSpy = jest.spyOn(console, 'warn');
25
+ render(
26
+ <div>
27
+ <ServiceMessage text={<div>Some node</div>} ref={ref} />
28
+ </div>
29
+ );
30
+ act(() => {
31
+ ref.current.open();
32
+ });
33
+ expect(errorSpy).not.toHaveBeenCalled();
34
+ expect(warnSpy).not.toHaveBeenCalled();
35
+ });
19
36
  });