@woosmap/ui 3.19.0 → 3.23.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.19.0",
3
+ "version": "3.23.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -160,13 +160,13 @@ export default class SkeletonDemo extends Component {
160
160
  };
161
161
 
162
162
  render() {
163
- const { result, request, response, renderCode, withMap, mainContent } = this.props;
163
+ const { result, request, response, renderCode, withMap, mainContent, className } = this.props;
164
164
  const { copied } = this.state;
165
165
  const filters = this.renderHeaderFilters();
166
166
  const filters2 = this.renderFooterFilters();
167
167
  const tagLine = this.renderHeaderTagline();
168
168
  return (
169
- <article className="demo">
169
+ <article className={cl('demo', className)}>
170
170
  <div className="demo__content">
171
171
  <div className="demo__showcase">
172
172
  {(tagLine || filters || filters2) && (
@@ -249,6 +249,7 @@ SkeletonDemo.defaultProps = {
249
249
  body: '',
250
250
  method: '',
251
251
  withMap: false,
252
+ className: '',
252
253
  };
253
254
  SkeletonDemo.propTypes = {
254
255
  renderCode: PropTypes.func,
@@ -264,4 +265,5 @@ SkeletonDemo.propTypes = {
264
265
  body: PropTypes.string,
265
266
  method: PropTypes.string,
266
267
  response: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
268
+ className: PropTypes.string,
267
269
  };
@@ -10,13 +10,17 @@ function mapChildrenWithProps(children, childrenRefs, closeCb) {
10
10
  if (children) {
11
11
  return React.Children.map(children, (child, index) => {
12
12
  if (React.isValidElement(child)) {
13
+ // only add ref to non functional components
13
14
  return React.cloneElement(child, {
14
15
  ...child.props,
15
16
  closeCb,
16
- ref: (elem) => {
17
- // eslint-disable-next-line no-param-reassign
18
- childrenRefs[index] = elem;
19
- },
17
+ ref:
18
+ !child.type.prototype || (child.type.prototype && child.type.prototype.render)
19
+ ? (elem) => {
20
+ // eslint-disable-next-line no-param-reassign
21
+ childrenRefs[index] = elem;
22
+ }
23
+ : undefined,
20
24
  });
21
25
  }
22
26
  return child;
@@ -351,7 +355,7 @@ class Dropdown extends Component {
351
355
 
352
356
  return (
353
357
  <div
354
- ref={this.clickOutsideRef}
358
+ ref={openOnMouseEnter ? null : this.clickOutsideRef}
355
359
  className={cl('dropdown', { open }, `dropdown--${size}`, className)}
356
360
  {...rest}
357
361
  onMouseEnter={this.onMouseEnter}
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><path d="M16.605 64.135A7.847 7.847 0 0 1 8.787 56.3L8.8 13.7a7.825 7.825 0 0 1 11.561-6.868l39.116 21.289a7.822 7.822 0 0 1 0 13.741l-39.13 21.31a7.813 7.813 0 0 1-3.742.963ZM10.787 56.3a5.821 5.821 0 0 0 8.6 5.114l39.131-21.31a5.824 5.824 0 0 0 0-10.229L19.405 8.588A5.825 5.825 0 0 0 10.8 13.7Z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><path d="M35 65.733a2.754 2.754 0 0 1-2.965-2.714c0-6.377-4.342-11.5-8.939-16.924-4.932-5.821-10.033-11.838-10.033-19.895a21.937 21.937 0 0 1 43.874 0c0 8.054-5.1 14.071-10.033 19.892-4.6 5.424-8.939 10.547-8.939 16.924A2.754 2.754 0 0 1 35 65.733Zm0-59.466A19.959 19.959 0 0 0 15.063 26.2c0 7.319 4.859 13.054 9.559 18.6 4.628 5.46 9.413 11.106 9.413 18.217 0 .645.675.714.965.714.161 0 .965-.034.965-.714 0-7.111 4.785-12.757 9.413-18.217 4.7-5.545 9.559-11.28 9.559-18.6A19.959 19.959 0 0 0 35 6.267Z"/><path d="M29.232 37.683a3.456 3.456 0 0 1-3.442-3.45V18.967a3.446 3.446 0 0 1 5.093-3.026L44.9 23.57a3.445 3.445 0 0 1 0 6.052l-14.019 7.636a3.444 3.444 0 0 1-1.649.425Zm0-20.166a1.427 1.427 0 0 0-.737.208 1.412 1.412 0 0 0-.708 1.242v15.266a1.443 1.443 0 0 0 2.137 1.267l14.024-7.636a1.446 1.446 0 0 0 0-2.54L29.929 17.7a1.446 1.446 0 0 0-.692-.183ZM26.79 34.233Z"/></svg>
@@ -3,6 +3,8 @@
3
3
  trans()
4
4
  display flex
5
5
  justify-content center
6
+ align-items center
7
+ height 100%
6
8
  width 100%
7
9
  zoom .9
8
10
  padding 2rem
@@ -10,7 +12,6 @@
10
12
  &__mobilewrapper
11
13
  trans()
12
14
  position relative
13
- height 100%
14
15
  margin 3rem
15
16
  &__mobilecontainer
16
17
  position relative
@@ -251,4 +251,6 @@
251
251
  border-bottom .1rem solid rgba($secondary, .1)
252
252
  border-right 0
253
253
  &__map
254
- height 32rem
254
+ height 32rem
255
+ .demo--merchant &
256
+ height auto