@cashub/ui 0.20.0 → 0.21.1

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 (233) hide show
  1. package/Tab/Tab.js +9 -13
  2. package/Tab/TabList.js +14 -32
  3. package/Tab/TabPanel.js +21 -58
  4. package/Tab/TabTab.js +20 -40
  5. package/Tab/index.js +2 -10
  6. package/Tab/subComponent/TabContext.js +2 -5
  7. package/animate/Collapse.js +26 -53
  8. package/animate/Loader.js +21 -26
  9. package/animate/NumberCounter.js +22 -44
  10. package/animate/PulseRing.js +9 -21
  11. package/animate/Spinner.js +2 -10
  12. package/animate/index.js +5 -11
  13. package/assets/css/autocomplete.css +16 -16
  14. package/assets/css/font.css +4 -4
  15. package/assets/css/global.css +3 -3
  16. package/assets/css/normalize.css +386 -386
  17. package/backdrop/BaseBackdrop.js +2 -9
  18. package/backdrop/LoadingBackdrop.js +2 -9
  19. package/backdrop/ModalBackdrop.js +2 -9
  20. package/backdrop/index.js +3 -7
  21. package/badge/Badge.js +2 -11
  22. package/badge/BadgeDot.js +2 -10
  23. package/badge/BadgeFill.js +15 -20
  24. package/badge/BadgeWithText.js +6 -13
  25. package/badge/index.js +4 -9
  26. package/billing/BarChart.js +10 -17
  27. package/billing/Grid.js +11 -15
  28. package/billing/Header2.js +6 -9
  29. package/billing/Header3.js +9 -16
  30. package/billing/Paragraph.js +8 -14
  31. package/billing/ParagraphGroup.js +6 -9
  32. package/billing/ParagraphText.js +7 -12
  33. package/billing/Section.js +13 -23
  34. package/billing/SectionBody.js +5 -8
  35. package/billing/SectionHeader.js +7 -12
  36. package/breadcrumb/Breadcrumb.js +11 -21
  37. package/breadcrumb/index.js +1 -3
  38. package/button/Button.js +41 -38
  39. package/button/ButtonGroup.js +21 -18
  40. package/button/IconButton.js +29 -29
  41. package/button/ScrollToTopButton.js +12 -39
  42. package/button/index.js +4 -9
  43. package/callout/Callout.js +13 -26
  44. package/callout/index.js +1 -3
  45. package/chart/BarChart.js +28 -53
  46. package/chart/DoughnutChart.js +23 -62
  47. package/chart/LineChart.js +33 -55
  48. package/chart/SingleBarChart.js +11 -17
  49. package/chart/index.js +5 -12
  50. package/chart/utils/customTooltip.js +26 -43
  51. package/chart/utils/htmlLegendPlugin.js +24 -30
  52. package/chart/utils/index.js +3 -7
  53. package/chart/utils/padEmptyChartBar.js +24 -22
  54. package/container/FlexContainer.js +9 -12
  55. package/container/index.js +1 -3
  56. package/cropper/Cropper.js +21 -34
  57. package/cropper/CropperModalHandler.js +15 -21
  58. package/cropper/index.js +2 -5
  59. package/cropper/subComponent/CropImageModal.js +23 -58
  60. package/datetimePicker/DatePicker.js +103 -217
  61. package/datetimePicker/DatePickerV2.js +116 -221
  62. package/datetimePicker/DatetimePicker.js +27 -48
  63. package/datetimePicker/DatetimePickerV2.js +115 -231
  64. package/datetimePicker/TimeInput.js +9 -22
  65. package/datetimePicker/TimePicker.js +94 -151
  66. package/datetimePicker/TimePickerStyle.js +14 -0
  67. package/datetimePicker/accordion/Month.js +70 -90
  68. package/datetimePicker/accordion/Year.js +91 -135
  69. package/datetimePicker/hooks/index.js +3 -7
  70. package/datetimePicker/hooks/useChangeNumber.js +14 -27
  71. package/datetimePicker/hooks/useDecrease.js +19 -35
  72. package/datetimePicker/hooks/useIncrease.js +19 -35
  73. package/datetimePicker/index.js +13 -13
  74. package/datetimePicker/provider/constant.js +2 -3
  75. package/datetimePicker/subComponent/Accordion.js +108 -158
  76. package/datetimePicker/subComponent/CustomTimeInput.js +18 -48
  77. package/datetimePicker/subComponent/DateTimePickerContext.js +2 -5
  78. package/datetimePicker/utils/GMTDate.js +3 -7
  79. package/datetimePicker/utils/pad.js +2 -6
  80. package/datetimePicker/utils/toUTC0.js +3 -6
  81. package/descriptionList/DescriptionDetail.js +5 -10
  82. package/descriptionList/DescriptionList.js +5 -10
  83. package/descriptionList/DescriptionTerm.js +2 -9
  84. package/descriptionList/index.js +3 -7
  85. package/divider/Divider.js +9 -12
  86. package/divider/index.js +1 -3
  87. package/dropdown/Dropdown.js +28 -65
  88. package/dropdown/DropdownButtonOption.js +2 -9
  89. package/dropdown/DropdownContent.js +33 -64
  90. package/dropdown/DropdownDivOption.js +2 -9
  91. package/dropdown/DropdownItem.js +10 -16
  92. package/dropdown/DropdownLinkOption.js +2 -9
  93. package/dropdown/DropdownToggle.js +18 -38
  94. package/dropdown/index.js +6 -17
  95. package/dropdown/subComponent/DropdownContext.js +2 -5
  96. package/dropzone/FileDropzone.js +148 -302
  97. package/dropzone/ImageDropzone.js +96 -171
  98. package/dropzone/index.js +2 -5
  99. package/dropzone/subComponent/Message.js +7 -14
  100. package/figure/IconFigure.js +9 -16
  101. package/figure/ImageFigure.js +11 -17
  102. package/figure/index.js +2 -5
  103. package/file/HiddenFileInput.js +5 -14
  104. package/file/index.js +1 -3
  105. package/form/Checkbox.js +34 -43
  106. package/form/FormItem.js +2 -9
  107. package/form/Input.js +13 -15
  108. package/form/Label.js +10 -13
  109. package/form/MutedText.js +5 -10
  110. package/form/RadioButton.js +20 -32
  111. package/form/Searchbox.js +21 -65
  112. package/form/Slider.js +14 -0
  113. package/form/SwitchButton.js +34 -39
  114. package/form/Textarea.js +2 -11
  115. package/form/index.js +9 -19
  116. package/grid/Column.js +17 -17
  117. package/grid/Grid.js +13 -14
  118. package/grid/index.js +2 -5
  119. package/heading/Heading1.js +5 -10
  120. package/heading/Heading2.js +9 -12
  121. package/heading/Heading3.js +21 -18
  122. package/heading/index.js +3 -7
  123. package/helmet/Helmet.js +6 -9
  124. package/helmet/index.js +2 -5
  125. package/iconbox/ApplicationIconBox.js +25 -31
  126. package/iconbox/IconBox.js +11 -24
  127. package/iconbox/IconBoxV2.js +14 -26
  128. package/iconbox/index.js +3 -7
  129. package/iconbox/subComponent/IconBoxFigure.js +25 -20
  130. package/iconbox/subComponent/IconBoxImage.js +15 -18
  131. package/image/ImageFluid.js +2 -10
  132. package/image/UploadImage.js +65 -113
  133. package/image/index.js +2 -5
  134. package/index.js +44 -130
  135. package/jsoneditor/JsonEditor.js +10 -32
  136. package/jsoneditor/index.js +1 -3
  137. package/keyframe/Pulse.js +2 -7
  138. package/keyframe/Spin.js +2 -7
  139. package/link/LinkSpan.js +22 -35
  140. package/link/index.js +1 -3
  141. package/map/GoogleMap.js +122 -175
  142. package/map/GoogleReverseGeolocation.js +79 -186
  143. package/map/LeafletMap.js +78 -132
  144. package/map/LeafletReverseGeolocation.js +49 -121
  145. package/map/index.js +4 -9
  146. package/map/subComponent/BasicLeafletMap.js +8 -14
  147. package/map/subComponent/GoogleMapContainer.js +5 -10
  148. package/map/subComponent/GoogleMapPopup.js +66 -123
  149. package/map/subComponent/GoogleMapWrapper.js +13 -32
  150. package/map/subComponent/GoogleMarkerSpiderfier.js +14 -24
  151. package/map/subComponent/LeafletDrawControl.js +47 -84
  152. package/map/subComponent/LeafletMapContainer.js +5 -10
  153. package/map/subComponent/MapSearchBoxControl.js +24 -70
  154. package/modal/StateModal.js +41 -100
  155. package/modal/TitleModal.js +89 -190
  156. package/modal/index.js +2 -5
  157. package/package.json +1 -1
  158. package/paginate/Paginate.js +40 -54
  159. package/paginate/index.js +1 -3
  160. package/popover/Popover.js +39 -87
  161. package/popover/index.js +1 -3
  162. package/qrcode/QRCode.js +10 -23
  163. package/qrcode/QRCodeContainter.js +8 -16
  164. package/qrcode/index.js +2 -5
  165. package/ribbon/Ribbon.js +4 -15
  166. package/ribbon/index.js +1 -3
  167. package/section/Section.js +57 -39
  168. package/section/SectionBody.js +15 -22
  169. package/section/SectionHeader.js +27 -27
  170. package/section/SectionToolbar.js +2 -9
  171. package/section/SectionToolbarItem.js +2 -9
  172. package/section/index.js +5 -11
  173. package/select/InputSelect.js +103 -215
  174. package/select/Select.js +204 -362
  175. package/select/index.js +2 -5
  176. package/select/subComponent/ListBox.js +9 -12
  177. package/select/subComponent/Option.js +8 -16
  178. package/select/subComponent/OptionGroup.js +2 -9
  179. package/select/subComponent/Options.js +5 -11
  180. package/select/subComponent/SearchBox.js +9 -29
  181. package/select/subComponent/SelectedMultiple.js +8 -16
  182. package/select/subComponent/SelectedSingle.js +2 -9
  183. package/styles/GlobalStyle.js +169 -91
  184. package/styles/config/breakpoint.style.js +2 -3
  185. package/styles/config/header.style.js +2 -3
  186. package/styles/config/sidebar.style.js +2 -3
  187. package/styles/index.js +2 -5
  188. package/styles/mixin/backgroundColor.js +17 -14
  189. package/styles/mixin/borderColor.js +17 -14
  190. package/styles/mixin/color.js +17 -14
  191. package/styles/mixin/colorOnBackground.js +17 -14
  192. package/styles/mixin/inputPlaceholder.js +3 -9
  193. package/styles/mixin/media.js +3 -11
  194. package/styles/mixin/rounded.js +13 -12
  195. package/styles/mixin/scrollbar.js +7 -13
  196. package/styles/theme/dark.theme.js +20 -20
  197. package/styles/theme/light.theme.js +20 -20
  198. package/styles/theme/white.theme.js +20 -20
  199. package/styles/themes.js +2 -8
  200. package/table/GridTable.js +105 -143
  201. package/table/ImageBox.js +8 -18
  202. package/table/PermissionTable.js +25 -25
  203. package/table/Table.js +137 -153
  204. package/table/__mock__/columns.js +2 -3
  205. package/table/__mock__/data.js +2 -3
  206. package/table/hooks/index.js +2 -5
  207. package/table/hooks/useCalculateDataRange.js +9 -36
  208. package/table/hooks/useGenerateSort.js +6 -17
  209. package/table/index.js +4 -9
  210. package/table/subComponent/BaseTableHeadCell.js +15 -21
  211. package/table/subComponent/GridTableFooter.js +5 -10
  212. package/table/subComponent/GridTableHeadCell.js +5 -10
  213. package/table/subComponent/Resizer.js +17 -44
  214. package/table/subComponent/TableFooter.js +5 -10
  215. package/table/subComponent/TableFooterInfo.js +2 -9
  216. package/table/subComponent/TableFooterPager.js +5 -12
  217. package/table/subComponent/TableHeadCell.js +2 -9
  218. package/table/subComponent/TableSort.js +13 -19
  219. package/tagify/TagifyStyle.js +14 -0
  220. package/tagify/Tags.js +15 -37
  221. package/tagify/index.js +8 -3
  222. package/text/Paragraph.js +25 -20
  223. package/text/index.js +1 -3
  224. package/timeline/Timeline.js +28 -37
  225. package/timeline/index.js +1 -3
  226. package/toast/CustomToastContainer.js +2 -9
  227. package/toast/MessageContainer.js +9 -18
  228. package/toast/index.js +3 -8
  229. package/toast/show.js +18 -28
  230. package/tooltip/Tooltip.js +48 -97
  231. package/tooltip/index.js +1 -3
  232. package/wizard/Wizard.js +63 -133
  233. package/wizard/index.js +1 -3
@@ -4,19 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
8
  var _templateObject;
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
-
16
- var GoogleMapContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n border: 1px solid transparent;\n border-radius: var(--border-radius);\n\n &:focus {\n border-color: var(--border-color);\n box-shadow: var(--box-shadow);\n }\n\n .google-popup-content-wrapper {\n position: absolute;\n transform: translate(-50%, -100%);\n }\n"])), function (_ref) {
17
- var height = _ref.height;
11
+ const GoogleMapContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n border: 1px solid transparent;\n border-radius: var(--border-radius);\n\n &:focus {\n border-color: var(--border-color);\n box-shadow: var(--box-shadow);\n }\n\n .google-popup-content-wrapper {\n position: absolute;\n transform: translate(-50%, -100%);\n }\n"])), _ref => {
12
+ let {
13
+ height
14
+ } = _ref;
18
15
  return height;
19
16
  });
20
-
21
- var _default = GoogleMapContainer;
22
- exports.default = _default;
17
+ var _default = exports.default = GoogleMapContainer;
@@ -4,152 +4,100 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
9
-
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
-
12
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
13
-
14
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
-
16
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
17
-
18
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
19
-
20
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
21
-
22
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
23
-
24
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
25
-
26
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
27
-
28
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
-
30
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31
-
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
10
  // custom popup
33
11
  // https://developers.google.com/maps/documentation/javascript/examples/overlay-popup
34
- var GoogleMapPopup = /*#__PURE__*/_createClass(function GoogleMapPopup(options) {
35
- _classCallCheck(this, GoogleMapPopup);
36
-
37
- // wrap class to prevent cannot reference maps during runtime
38
- // because google map library will load after render map only
39
- var MapPopup = /*#__PURE__*/function (_window$google$maps$O) {
40
- _inherits(MapPopup, _window$google$maps$O);
41
-
42
- var _super = _createSuper(MapPopup);
43
-
44
- function MapPopup() {
45
- var _this;
46
-
47
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
48
- maxWidth = _ref.maxWidth,
49
- offset = _ref.offset;
50
-
51
- _classCallCheck(this, MapPopup);
52
-
53
- _this = _super.call(this); // This zero-height div is positioned at the bottom of the tip.
54
-
55
- _defineProperty(_assertThisInitialized(_this), "position", void 0);
56
-
57
- _defineProperty(_assertThisInitialized(_this), "containerDiv", void 0);
58
-
59
- _defineProperty(_assertThisInitialized(_this), "offset", 16);
60
-
61
- _defineProperty(_assertThisInitialized(_this), "justRendered", false);
62
-
63
- _this.containerDiv = document.createElement('div');
64
-
65
- _this.containerDiv.classList.add('google-popup-content-wrapper');
12
+ class GoogleMapPopup {
13
+ constructor(options) {
14
+ // wrap class to prevent cannot reference maps during runtime
15
+ // because google map library will load after render map only
16
+ class MapPopup extends window.google.maps.OverlayView {
17
+ constructor() {
18
+ let {
19
+ maxWidth,
20
+ offset
21
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
22
+ super();
23
+
24
+ // This zero-height div is positioned at the bottom of the tip.
25
+ _defineProperty(this, "position", void 0);
26
+ _defineProperty(this, "containerDiv", void 0);
27
+ _defineProperty(this, "offset", 16);
28
+ _defineProperty(this, "justRendered", false);
29
+ this.containerDiv = document.createElement('div');
30
+ this.containerDiv.classList.add('google-popup-content-wrapper');
31
+ if (maxWidth) {
32
+ this.containerDiv.style.maxWidth = "".concat(maxWidth, "px");
33
+ }
34
+ if (offset) {
35
+ this.offset = offset;
36
+ }
66
37
 
67
- if (maxWidth) {
68
- _this.containerDiv.style.maxWidth = "".concat(maxWidth, "px");
38
+ // Optionally stop clicks, etc., from bubbling up to the map.
39
+ MapPopup.preventMapHitsAndGesturesFrom(this.containerDiv);
69
40
  }
70
-
71
- if (offset) {
72
- _this.offset = offset;
73
- } // Optionally stop clicks, etc., from bubbling up to the map.
74
-
75
-
76
- MapPopup.preventMapHitsAndGesturesFrom(_this.containerDiv);
77
- return _this;
78
- }
79
- /** Called when the popup is added to the map. */
80
-
81
-
82
- _createClass(MapPopup, [{
83
- key: "onAdd",
84
- value: function onAdd() {
41
+ /** Called when the popup is added to the map. */
42
+ onAdd() {
85
43
  this.getPanes().floatPane.appendChild(this.containerDiv);
86
44
  this.justRendered = true;
87
45
  }
88
46
  /** Called when the popup is removed from the map. */
89
-
90
- }, {
91
- key: "onRemove",
92
- value: function onRemove() {
47
+ onRemove() {
93
48
  if (this.containerDiv.parentElement) {
94
49
  this.containerDiv.parentElement.removeChild(this.containerDiv);
95
50
  this.justRendered = false;
96
51
  }
97
52
  }
98
53
  /** Called each frame when the popup needs to draw itself. */
99
-
100
- }, {
101
- key: "draw",
102
- value: function draw() {
54
+ draw() {
103
55
  if (this.position) {
104
- var divPosition = this.getProjection().fromLatLngToDivPixel(this.position); // On the first render, if we go beyond the map, pan the map
56
+ const divPosition = this.getProjection().fromLatLngToDivPixel(this.position);
105
57
 
58
+ // On the first render, if we go beyond the map, pan the map
106
59
  if (this.justRendered) {
107
60
  this.fitMap();
108
61
  this.justRendered = false;
109
62
  }
110
-
111
63
  this.containerDiv.style.left = "".concat(divPosition.x, "px");
112
64
  this.containerDiv.style.top = "".concat(divPosition.y - this.offset, "px");
113
65
  }
114
66
  }
115
- }, {
116
- key: "setPosition",
117
- value: function setPosition(position) {
67
+ setPosition(position) {
118
68
  this.position = position;
119
69
  }
120
- }, {
121
- key: "setContent",
122
- value: function setContent(content) {
70
+ setContent(content) {
123
71
  if (!content) return;
124
-
125
- if (_typeof(content) === 'object') {
72
+ if (typeof content === 'object') {
126
73
  this.containerDiv.replaceChildren(content);
127
74
  } else {
128
75
  this.containerDiv.innerHTML = content;
129
76
  }
130
77
  }
131
- }, {
132
- key: "fitMap",
133
- value: function fitMap() {
134
- var projection = this.getProjection();
135
- var _this$containerDiv = this.containerDiv,
136
- offsetWidth = _this$containerDiv.offsetWidth,
137
- offsetHeight = _this$containerDiv.offsetHeight;
138
- var halfWidth = offsetWidth / 2;
139
- var _this$containerDiv2 = this.containerDiv,
140
- offsetTop = _this$containerDiv2.offsetTop,
141
- offsetLeft = _this$containerDiv2.offsetLeft; // Calculate the coordinates of the four corners of the container
78
+ fitMap() {
79
+ const projection = this.getProjection();
80
+ const {
81
+ offsetWidth,
82
+ offsetHeight
83
+ } = this.containerDiv;
84
+ const halfWidth = offsetWidth / 2;
85
+ const {
86
+ offsetTop,
87
+ offsetLeft
88
+ } = this.containerDiv;
89
+
90
+ // Calculate the coordinates of the four corners of the container
142
91
  // because container use transform for position(-50%, -100%), so we need to subtract them
143
-
144
- var topLeft = new window.google.maps.Point(offsetLeft - halfWidth, offsetTop - offsetHeight);
145
- var topRight = new window.google.maps.Point(offsetLeft + offsetWidth - halfWidth, offsetTop - offsetHeight);
146
- var bottomLeft = new window.google.maps.Point(offsetLeft - halfWidth, offsetTop + offsetHeight - offsetHeight);
147
- var bottomRight = new window.google.maps.Point(offsetLeft + offsetWidth - halfWidth, offsetTop + offsetHeight - offsetHeight);
148
- var northWest = projection.fromDivPixelToLatLng(topLeft);
149
- var northEast = projection.fromDivPixelToLatLng(topRight);
150
- var southWest = projection.fromDivPixelToLatLng(bottomLeft);
151
- var southEast = projection.fromDivPixelToLatLng(bottomRight);
152
- var popupBound = new window.google.maps.LatLngBounds();
92
+ const topLeft = new window.google.maps.Point(offsetLeft - halfWidth, offsetTop - offsetHeight);
93
+ const topRight = new window.google.maps.Point(offsetLeft + offsetWidth - halfWidth, offsetTop - offsetHeight);
94
+ const bottomLeft = new window.google.maps.Point(offsetLeft - halfWidth, offsetTop + offsetHeight - offsetHeight);
95
+ const bottomRight = new window.google.maps.Point(offsetLeft + offsetWidth - halfWidth, offsetTop + offsetHeight - offsetHeight);
96
+ const northWest = projection.fromDivPixelToLatLng(topLeft);
97
+ const northEast = projection.fromDivPixelToLatLng(topRight);
98
+ const southWest = projection.fromDivPixelToLatLng(bottomLeft);
99
+ const southEast = projection.fromDivPixelToLatLng(bottomRight);
100
+ const popupBound = new window.google.maps.LatLngBounds();
153
101
  popupBound.extend(northWest);
154
102
  popupBound.extend(northEast);
155
103
  popupBound.extend(southWest);
@@ -157,13 +105,8 @@ var GoogleMapPopup = /*#__PURE__*/_createClass(function GoogleMapPopup(options)
157
105
  popupBound.extend(this.position);
158
106
  this.map.fitBounds(popupBound);
159
107
  }
160
- }]);
161
-
162
- return MapPopup;
163
- }(window.google.maps.OverlayView);
164
-
165
- return new MapPopup(options);
166
- });
167
-
168
- var _default = GoogleMapPopup;
169
- exports.default = _default;
108
+ }
109
+ return new MapPopup(options);
110
+ }
111
+ }
112
+ var _default = exports.default = GoogleMapPopup;
@@ -4,56 +4,37 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _reactWrapper = require("@googlemaps/react-wrapper");
11
-
12
9
  var _jsxRuntime = require("react/jsx-runtime");
13
-
14
- var _excluded = ["children", "apiKey", "onError"];
15
-
16
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
-
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
-
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
-
22
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
-
24
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
-
26
- var GoogleMapWrapper = function GoogleMapWrapper(_ref) {
27
- var children = _ref.children,
28
- apiKey = _ref.apiKey,
29
- onError = _ref.onError,
30
- props = _objectWithoutProperties(_ref, _excluded);
31
-
32
- var render = function render(status) {
10
+ const GoogleMapWrapper = _ref => {
11
+ let {
12
+ children,
13
+ apiKey,
14
+ onError,
15
+ ...props
16
+ } = _ref;
17
+ const render = status => {
33
18
  switch (status) {
34
19
  case _reactWrapper.Status.LOADING:
35
20
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {});
36
-
37
21
  case _reactWrapper.Status.FAILURE:
38
22
  onError(status);
39
23
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {});
40
-
41
24
  default:
42
25
  break;
43
26
  }
44
27
  };
45
-
46
28
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactWrapper.Wrapper, {
47
29
  apiKey: apiKey,
48
30
  render: render,
49
31
  style: {
50
32
  position: 'relative'
51
33
  },
52
- children: /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread(_objectSpread({}, props), {}, {
53
- onError: onError
54
- }))
34
+ children: /*#__PURE__*/(0, _react.cloneElement)(children, {
35
+ ...props,
36
+ onError
37
+ })
55
38
  });
56
39
  };
57
-
58
- var _default = GoogleMapWrapper;
59
- exports.default = _default;
40
+ var _default = exports.default = GoogleMapWrapper;
@@ -4,27 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
9
-
10
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
11
-
12
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
-
14
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
-
16
- var GoogleMarkerSpiderfier = /*#__PURE__*/_createClass(function GoogleMarkerSpiderfier(map, options) {
17
- _classCallCheck(this, GoogleMarkerSpiderfier);
18
-
19
- _defineProperty(this, "oms", void 0);
20
-
21
- // dynamic import to prevent cannot reference maps during runtime
22
- // because google map library will load after render map only
23
- var OverlappingMarkerSpiderfier = require('overlapping-marker-spiderfier');
24
-
25
- this.oms = new OverlappingMarkerSpiderfier(map, options);
26
- return this.oms;
27
- });
28
-
29
- var _default = GoogleMarkerSpiderfier;
30
- exports.default = _default;
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ class GoogleMarkerSpiderfier {
11
+ constructor(map, options) {
12
+ _defineProperty(this, "oms", void 0);
13
+ // dynamic import to prevent cannot reference maps during runtime
14
+ // because google map library will load after render map only
15
+ const OverlappingMarkerSpiderfier = require('overlapping-marker-spiderfier');
16
+ this.oms = new OverlappingMarkerSpiderfier(map, options);
17
+ return this.oms;
18
+ }
19
+ }
20
+ var _default = exports.default = GoogleMarkerSpiderfier;
@@ -4,46 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _leaflet = _interopRequireWildcard(require("leaflet"));
11
-
12
9
  var _leafletDraw = _interopRequireDefault(require("leaflet-draw"));
13
-
14
10
  require("leaflet-draw/dist/leaflet.draw.css");
15
-
16
11
  var _core = require("@react-leaflet/core");
17
-
18
12
  var _fastDeepEqual = _interopRequireDefault(require("fast-deep-equal"));
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ // eslint-disable-line
21
17
 
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
27
-
28
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29
-
30
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
-
32
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
33
-
34
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
-
36
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
37
-
38
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
39
-
40
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
41
-
42
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
43
-
44
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
-
46
- var eventHandlers = {
18
+ const eventHandlers = {
47
19
  onEdited: 'draw:edited',
48
20
  onDrawStart: 'draw:drawstart',
49
21
  onDrawStop: 'draw:drawstop',
@@ -61,104 +33,95 @@ _leaflet.default.drawLocal.edit.handlers.edit.tooltip = {
61
33
  text: 'Drag handles or markers to edit features.',
62
34
  subtext: null
63
35
  };
64
-
65
- var LeafletDrawControl = function LeafletDrawControl(props) {
66
- var _useLeafletContext = (0, _core.useLeafletContext)(),
67
- map = _useLeafletContext.map,
68
- layerContainer = _useLeafletContext.layerContainer;
69
-
70
- var drawRef = (0, _react.useRef)();
71
- var propsRef = (0, _react.useRef)(props);
72
- var onDrawCreate = (0, _react.useCallback)(function (event) {
73
- var container = layerContainer;
36
+ const LeafletDrawControl = props => {
37
+ const {
38
+ map,
39
+ layerContainer
40
+ } = (0, _core.useLeafletContext)();
41
+ const drawRef = (0, _react.useRef)();
42
+ const propsRef = (0, _react.useRef)(props);
43
+ const onDrawCreate = (0, _react.useCallback)(event => {
44
+ const container = layerContainer;
74
45
  container.addLayer(event.layer);
75
46
  }, [layerContainer]);
76
- var enableEdit = (0, _react.useCallback)(function () {
47
+ const enableEdit = (0, _react.useCallback)(() => {
77
48
  // programatically enable edit mode
78
49
  // https://github.com/Leaflet/Leaflet.draw/issues/129
79
- var editHandler = drawRef.current._toolbars.edit.getModeHandlers()[0].handler; // this is hacky but needed otherwise enabling the edit mode will fail
50
+ const editHandler = drawRef.current._toolbars.edit.getModeHandlers()[0].handler;
51
+ // this is hacky but needed otherwise enabling the edit mode will fail
80
52
  // when the code attempts to fire map events for edit start etc
81
-
82
-
83
53
  editHandler._map = map;
84
54
  editHandler.enable();
85
55
  }, [map]);
86
- (0, _react.useEffect)(function () {
56
+ (0, _react.useEffect)(() => {
87
57
  // if rendered and all props no change prevent render again
88
58
  if (drawRef.current && props.draw !== undefined && (0, _fastDeepEqual.default)(props.draw, propsRef.current.draw) && (0, _fastDeepEqual.default)(props.edit, propsRef.current.edit) && props.position === propsRef.current.position) {
89
59
  return;
90
- } // add event listener
91
-
92
-
93
- for (var key in eventHandlers) {
94
- map.on(eventHandlers[key], function (evt) {
95
- var handlers = Object.keys(eventHandlers).filter(function (handler) {
96
- return eventHandlers[handler] === evt.type;
97
- });
60
+ }
98
61
 
62
+ // add event listener
63
+ for (const key in eventHandlers) {
64
+ map.on(eventHandlers[key], evt => {
65
+ const handlers = Object.keys(eventHandlers).filter(handler => eventHandlers[handler] === evt.type);
99
66
  if (handlers.length === 1) {
100
- var _handlers = _slicedToArray(handlers, 1),
101
- handler = _handlers[0];
102
-
67
+ const [handler] = handlers;
103
68
  props[handler] && props[handler](evt);
104
69
  }
105
70
  });
106
- } // add create draw event listener
107
-
71
+ }
108
72
 
109
- map.on(_leaflet.default.Draw.Event.CREATED, onDrawCreate); // create draw element and render on map
73
+ // add create draw event listener
74
+ map.on(_leaflet.default.Draw.Event.CREATED, onDrawCreate);
110
75
 
76
+ // create draw element and render on map
111
77
  drawRef.current = createDrawElement(props, layerContainer);
112
78
  map.addControl(drawRef.current);
113
79
  drawRef.current.enableEdit = enableEdit;
114
-
115
80
  if (props.onMounted) {
116
81
  props.onMounted(drawRef.current);
117
82
  }
118
-
119
- return function () {
83
+ return () => {
120
84
  drawRef.current.remove(map);
121
85
  drawRef.current = null;
122
86
  map.off(_leaflet.default.Draw.Event.CREATED, onDrawCreate);
123
-
124
- for (var _key in eventHandlers) {
125
- if (props[_key]) {
126
- map.off(eventHandlers[_key], props[_key]);
87
+ for (const key in eventHandlers) {
88
+ if (props[key]) {
89
+ map.off(eventHandlers[key], props[key]);
127
90
  }
128
91
  }
129
92
  };
130
93
  }, [props, map, layerContainer, onDrawCreate, enableEdit]);
131
94
  return null;
132
95
  };
133
-
134
- var createDrawElement = function createDrawElement(props, layerContainer) {
135
- var draw = props.draw,
136
- edit = props.edit,
137
- position = props.position;
138
- var options = {
96
+ const createDrawElement = (props, layerContainer) => {
97
+ const {
98
+ draw,
99
+ edit,
100
+ position
101
+ } = props;
102
+ const options = {
139
103
  edit: {
140
104
  featureGroup: layerContainer
141
105
  }
142
106
  };
143
-
144
107
  if (draw !== undefined) {
145
- if (_typeof(draw) === 'object') {
146
- options.draw = _objectSpread({}, draw);
108
+ if (typeof draw === 'object') {
109
+ options.draw = {
110
+ ...draw
111
+ };
147
112
  } else {
148
113
  options.draw = draw;
149
114
  }
150
115
  }
151
-
152
116
  if (edit) {
153
- options.edit = _objectSpread(_objectSpread({}, options.edit), edit);
117
+ options.edit = {
118
+ ...options.edit,
119
+ ...edit
120
+ };
154
121
  }
155
-
156
122
  if (position) {
157
123
  options.position = position;
158
124
  }
159
-
160
125
  return new _leaflet.Control.Draw(options);
161
126
  };
162
-
163
- var _default = LeafletDrawControl;
164
- exports.default = _default;
127
+ var _default = exports.default = LeafletDrawControl;
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
8
  var _reactLeaflet = require("react-leaflet");
11
-
12
9
  var _templateObject;
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
-
18
- var LeafletMapContainer = (0, _styledComponents.default)(_reactLeaflet.MapContainer)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: ", "px;\n border: 1px solid transparent;\n border-radius: var(--border-radius);\n z-index: 1;\n\n &:focus {\n border-color: var(--border-color);\n box-shadow: var(--box-shadow);\n }\n\n .leaflet-control-container {\n .leaflet-control-zoom {\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n\n a {\n background: transparent;\n border-bottom: 1px solid var(--border-color);\n color: var(--font-on-background);\n\n &:last-child {\n border-bottom: none;\n }\n\n &.leaflet-disabled {\n opacity: 0.5;\n }\n }\n }\n\n .leaflet-draw {\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n\n a {\n background-color: var(--color-background1);\n }\n\n .leaflet-draw-draw-polyline {\n background-position: -3px -3px;\n }\n\n .leaflet-draw-draw-polygon {\n background-position: -32px -3px;\n }\n\n .leaflet-draw-draw-rectangle {\n background-position: -63px -3px;\n }\n\n .leaflet-draw-draw-circle {\n background-position: -93px -3px;\n }\n\n .leaflet-draw-draw-marker {\n background-position: -123px -3px;\n }\n\n .leaflet-draw-draw-circlemarker {\n background-position: -273px -3px;\n }\n\n .leaflet-draw-edit-edit {\n background-position: -213px -3px;\n }\n\n .leaflet-draw-edit-remove {\n background-position: -243px -3px;\n }\n }\n\n .leaflet-left .leaflet-control {\n margin-left: var(--spacing-s);\n }\n\n .leaflet-right .leaflet-control {\n margin-right: var(--spacing-s);\n }\n\n .leaflet-top .leaflet-control {\n margin-top: var(--spacing-s);\n }\n\n .leaflet-control {\n font-weight: bold;\n background: var(--color-background1);\n\n &.leaflet-control-attribution {\n background: var(--color-white);\n color: var(--color-dark);\n margin: 0;\n }\n }\n }\n\n .leaflet-edit-move {\n border-radius: 50px;\n border-color: var(--border-color);\n }\n\n .leaflet-edit-resize {\n border-radius: 50px;\n border-color: var(--border-color);\n }\n\n &.leaflet-touch {\n .leaflet-bar {\n border: none;\n\n a {\n width: 24px;\n height: 24px;\n line-height: 24px;\n }\n }\n\n .leaflet-left .leaflet-control {\n margin-left: var(--spacing-s);\n }\n\n .leaflet-right .leaflet-control {\n margin-right: var(--spacing-s);\n }\n\n .leaflet-top .leaflet-control {\n margin-top: var(--spacing-s);\n }\n }\n\n .marker-cluster {\n background: var(--color-primary) a1;\n\n div {\n background: var(--color-primary);\n color: var(--font-on-primary);\n }\n }\n\n .leaflet-popup-content-wrapper {\n background: transparent;\n box-shadow: unset;\n }\n\n .leaflet-popup-content p {\n margin: 0;\n margin-bottom: var(--spacing-s);\n }\n\n .leaflet-popup-tip {\n display: none;\n }\n\n .sr-only {\n display: none;\n }\n"])), function (_ref) {
19
- var height = _ref.height;
12
+ const LeafletMapContainer = (0, _styledComponents.default)(_reactLeaflet.MapContainer)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: ", "px;\n border: 1px solid transparent;\n border-radius: var(--border-radius);\n z-index: 1;\n\n &:focus {\n border-color: var(--border-color);\n box-shadow: var(--box-shadow);\n }\n\n .leaflet-control-container {\n .leaflet-control-zoom {\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n\n a {\n background: transparent;\n border-bottom: 1px solid var(--border-color);\n color: var(--font-on-background);\n\n &:last-child {\n border-bottom: none;\n }\n\n &.leaflet-disabled {\n opacity: 0.5;\n }\n }\n }\n\n .leaflet-draw {\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n\n a {\n background-color: var(--color-background1);\n }\n\n .leaflet-draw-draw-polyline {\n background-position: -3px -3px;\n }\n\n .leaflet-draw-draw-polygon {\n background-position: -32px -3px;\n }\n\n .leaflet-draw-draw-rectangle {\n background-position: -63px -3px;\n }\n\n .leaflet-draw-draw-circle {\n background-position: -93px -3px;\n }\n\n .leaflet-draw-draw-marker {\n background-position: -123px -3px;\n }\n\n .leaflet-draw-draw-circlemarker {\n background-position: -273px -3px;\n }\n\n .leaflet-draw-edit-edit {\n background-position: -213px -3px;\n }\n\n .leaflet-draw-edit-remove {\n background-position: -243px -3px;\n }\n }\n\n .leaflet-left .leaflet-control {\n margin-left: var(--spacing-s);\n }\n\n .leaflet-right .leaflet-control {\n margin-right: var(--spacing-s);\n }\n\n .leaflet-top .leaflet-control {\n margin-top: var(--spacing-s);\n }\n\n .leaflet-control {\n font-weight: bold;\n background: var(--color-background1);\n\n &.leaflet-control-attribution {\n background: var(--color-white);\n color: var(--color-dark);\n margin: 0;\n }\n }\n }\n\n .leaflet-edit-move {\n border-radius: 50px;\n border-color: var(--border-color);\n }\n\n .leaflet-edit-resize {\n border-radius: 50px;\n border-color: var(--border-color);\n }\n\n &.leaflet-touch {\n .leaflet-bar {\n border: none;\n\n a {\n width: 24px;\n height: 24px;\n line-height: 24px;\n }\n }\n\n .leaflet-left .leaflet-control {\n margin-left: var(--spacing-s);\n }\n\n .leaflet-right .leaflet-control {\n margin-right: var(--spacing-s);\n }\n\n .leaflet-top .leaflet-control {\n margin-top: var(--spacing-s);\n }\n }\n\n .marker-cluster {\n background: var(--color-primary) a1;\n\n div {\n background: var(--color-primary);\n color: var(--font-on-primary);\n }\n }\n\n .leaflet-popup-content-wrapper {\n background: transparent;\n box-shadow: unset;\n }\n\n .leaflet-popup-content p {\n margin: 0;\n margin-bottom: var(--spacing-s);\n }\n\n .leaflet-popup-tip {\n display: none;\n }\n\n .sr-only {\n display: none;\n }\n"])), _ref => {
13
+ let {
14
+ height
15
+ } = _ref;
20
16
  return height;
21
17
  });
22
- var _default = LeafletMapContainer;
23
- exports.default = _default;
18
+ var _default = exports.default = LeafletMapContainer;