@longline/aqua-ui 1.0.10 → 1.0.11

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 (473) hide show
  1. package/Types.d.ts +6 -0
  2. package/Types.js +5 -0
  3. package/containers/Anchor/Anchor.d.ts +63 -0
  4. package/containers/Anchor/Anchor.js +113 -0
  5. package/containers/Anchor/index.d.ts +1 -0
  6. package/containers/Anchor/index.js +1 -0
  7. package/containers/Dock/Dock.d.ts +45 -0
  8. package/containers/Dock/Dock.js +61 -0
  9. package/containers/Dock/Dockable.d.ts +60 -0
  10. package/containers/Dock/Dockable.js +98 -0
  11. package/containers/Dock/index.d.ts +2 -0
  12. package/containers/Dock/index.js +2 -0
  13. package/containers/Form/Field.d.ts +104 -0
  14. package/containers/Form/Field.js +168 -0
  15. package/containers/Form/Form.d.ts +51 -0
  16. package/containers/Form/Form.js +89 -0
  17. package/containers/Form/Validation.d.ts +212 -0
  18. package/containers/Form/Validation.js +232 -0
  19. package/containers/Form/context/FormContext.d.ts +10 -0
  20. package/containers/Form/context/FormContext.js +3 -0
  21. package/containers/Form/context/useForm.d.ts +5 -0
  22. package/containers/Form/context/useForm.js +9 -0
  23. package/containers/Form/elements/BoxWrapper.d.ts +15 -0
  24. package/containers/Form/elements/BoxWrapper.js +35 -0
  25. package/containers/Form/elements/Hint.d.ts +21 -0
  26. package/containers/Form/elements/Hint.js +15 -0
  27. package/containers/Form/elements/Label.d.ts +22 -0
  28. package/containers/Form/elements/Label.js +15 -0
  29. package/containers/Form/elements/SimpleWrapper.d.ts +15 -0
  30. package/containers/Form/elements/SimpleWrapper.js +17 -0
  31. package/containers/Form/index.d.ts +1 -0
  32. package/containers/Form/index.js +1 -0
  33. package/containers/GlassPane/GlassPane.d.ts +36 -0
  34. package/containers/GlassPane/GlassPane.js +66 -0
  35. package/containers/GlassPane/index.d.ts +1 -0
  36. package/containers/GlassPane/index.js +1 -0
  37. package/containers/InfoBox/InfoBox.d.ts +34 -0
  38. package/containers/InfoBox/InfoBox.js +45 -0
  39. package/containers/InfoBox/elements/Content.d.ts +23 -0
  40. package/containers/InfoBox/elements/Content.js +37 -0
  41. package/containers/InfoBox/elements/Footer.d.ts +9 -0
  42. package/containers/InfoBox/elements/Footer.js +24 -0
  43. package/containers/InfoBox/elements/Header.d.ts +9 -0
  44. package/containers/InfoBox/elements/Header.js +24 -0
  45. package/containers/InfoBox/index.d.ts +1 -0
  46. package/containers/InfoBox/index.js +1 -0
  47. package/containers/List/List.d.ts +45 -0
  48. package/containers/List/List.js +47 -0
  49. package/containers/List/ListCell.d.ts +13 -0
  50. package/containers/List/ListCell.js +24 -0
  51. package/containers/List/ListRow.d.ts +15 -0
  52. package/containers/List/ListRow.js +24 -0
  53. package/containers/List/index.d.ts +3 -0
  54. package/containers/List/index.js +3 -0
  55. package/containers/Tabs/Pane.d.ts +29 -0
  56. package/containers/Tabs/Pane.js +45 -0
  57. package/containers/Tabs/Tabs.d.ts +66 -0
  58. package/containers/Tabs/Tabs.js +144 -0
  59. package/containers/Tabs/index.d.ts +1 -0
  60. package/containers/Tabs/index.js +1 -0
  61. package/controls/Chip/Chip.d.ts +35 -0
  62. package/controls/Chip/Chip.js +83 -0
  63. package/controls/Chip/index.d.ts +1 -0
  64. package/controls/Chip/index.js +1 -0
  65. package/controls/Fab/Fab.d.ts +73 -0
  66. package/controls/Fab/Fab.js +94 -0
  67. package/controls/Fab/index.d.ts +1 -0
  68. package/controls/Fab/index.js +1 -0
  69. package/controls/Icon/Icon.d.ts +98 -0
  70. package/controls/Icon/Icon.js +79 -0
  71. package/controls/Icon/index.d.ts +1 -0
  72. package/controls/Icon/index.js +1 -0
  73. package/controls/Key/Key.d.ts +22 -0
  74. package/controls/Key/Key.js +74 -0
  75. package/controls/Key/index.d.ts +1 -0
  76. package/controls/Key/index.js +1 -0
  77. package/controls/LinearChart/LinearChart.d.ts +31 -0
  78. package/controls/LinearChart/LinearChart.js +58 -0
  79. package/controls/LinearChart/index.d.ts +1 -0
  80. package/controls/LinearChart/index.js +1 -0
  81. package/controls/ListView/Body.d.ts +8 -0
  82. package/controls/ListView/Body.js +24 -0
  83. package/controls/ListView/Column.d.ts +55 -0
  84. package/controls/ListView/Column.js +8 -0
  85. package/controls/ListView/ColumnsManager/ColumnDraggable.d.ts +11 -0
  86. package/controls/ListView/ColumnsManager/ColumnDraggable.js +83 -0
  87. package/controls/ListView/ColumnsManager/ColumnsManager.d.ts +12 -0
  88. package/controls/ListView/ColumnsManager/ColumnsManager.js +63 -0
  89. package/controls/ListView/ColumnsManager/OrderColumns.d.ts +11 -0
  90. package/controls/ListView/ColumnsManager/OrderColumns.js +62 -0
  91. package/controls/ListView/ColumnsManager/SourceColumns.d.ts +10 -0
  92. package/controls/ListView/ColumnsManager/SourceColumns.js +45 -0
  93. package/controls/ListView/Ghost.d.ts +9 -0
  94. package/controls/ListView/Ghost.js +52 -0
  95. package/controls/ListView/Header.d.ts +12 -0
  96. package/controls/ListView/Header.js +35 -0
  97. package/controls/ListView/HeaderButton.d.ts +8 -0
  98. package/controls/ListView/HeaderButton.js +8 -0
  99. package/controls/ListView/HeaderCell.d.ts +20 -0
  100. package/controls/ListView/HeaderCell.js +47 -0
  101. package/controls/ListView/IListViewProps.d.ts +105 -0
  102. package/controls/ListView/IListViewProps.js +1 -0
  103. package/controls/ListView/ListView.d.ts +20 -0
  104. package/controls/ListView/ListView.js +97 -0
  105. package/controls/ListView/NoData.d.ts +19 -0
  106. package/controls/ListView/NoData.js +30 -0
  107. package/controls/ListView/SortButton.d.ts +16 -0
  108. package/controls/ListView/SortButton.js +26 -0
  109. package/controls/ListView/Table.d.ts +18 -0
  110. package/controls/ListView/Table.js +99 -0
  111. package/controls/ListView/Total.d.ts +9 -0
  112. package/controls/ListView/Total.js +28 -0
  113. package/controls/ListView/sortItems.d.ts +6 -0
  114. package/controls/ListView/sortItems.js +35 -0
  115. package/controls/Mouse/Mouse.d.ts +38 -0
  116. package/controls/Mouse/Mouse.js +51 -0
  117. package/controls/Mouse/index.d.ts +1 -0
  118. package/controls/Mouse/index.js +1 -0
  119. package/controls/PrimaryButton/PrimaryButton.d.ts +63 -0
  120. package/controls/PrimaryButton/PrimaryButton.js +83 -0
  121. package/controls/PrimaryButton/index.d.ts +1 -0
  122. package/controls/PrimaryButton/index.js +1 -0
  123. package/controls/Progress/Progress.d.ts +35 -0
  124. package/controls/Progress/Progress.js +49 -0
  125. package/controls/Progress/index.d.ts +1 -0
  126. package/controls/Progress/index.js +1 -0
  127. package/controls/SecondaryButton/SecondaryButton.d.ts +58 -0
  128. package/controls/SecondaryButton/SecondaryButton.js +73 -0
  129. package/controls/SecondaryButton/index.d.ts +1 -0
  130. package/controls/SecondaryButton/index.js +1 -0
  131. package/controls/TabBar/Tab.d.ts +21 -0
  132. package/controls/TabBar/Tab.js +25 -0
  133. package/controls/TabBar/TabBar.d.ts +34 -0
  134. package/controls/TabBar/TabBar.js +134 -0
  135. package/controls/TabBar/Underliner.d.ts +7 -0
  136. package/controls/TabBar/Underliner.js +27 -0
  137. package/controls/TabBar/index.d.ts +1 -0
  138. package/controls/TabBar/index.js +1 -0
  139. package/controls/TertiaryButton/TertiaryButton.d.ts +28 -0
  140. package/controls/TertiaryButton/TertiaryButton.js +65 -0
  141. package/controls/TertiaryButton/index.d.ts +1 -0
  142. package/controls/TertiaryButton/index.js +1 -0
  143. package/controls/View/View.d.ts +35 -0
  144. package/controls/View/View.js +58 -0
  145. package/controls/View/index.d.ts +1 -0
  146. package/controls/View/index.js +1 -0
  147. package/formatters/Date/DateTime.d.ts +45 -0
  148. package/formatters/Date/DateTime.js +64 -0
  149. package/formatters/Date/elements/Custom.d.ts +18 -0
  150. package/formatters/Date/elements/Custom.js +22 -0
  151. package/formatters/Date/elements/Distance.d.ts +24 -0
  152. package/formatters/Date/elements/Distance.js +45 -0
  153. package/formatters/Date/elements/LongDate.d.ts +17 -0
  154. package/formatters/Date/elements/LongDate.js +11 -0
  155. package/formatters/Date/elements/LongDateTime.d.ts +14 -0
  156. package/formatters/Date/elements/LongDateTime.js +10 -0
  157. package/formatters/Date/elements/LongTime.d.ts +14 -0
  158. package/formatters/Date/elements/LongTime.js +10 -0
  159. package/formatters/Date/elements/ShortDate.d.ts +14 -0
  160. package/formatters/Date/elements/ShortDate.js +10 -0
  161. package/formatters/Date/elements/ShortDateTime.d.ts +14 -0
  162. package/formatters/Date/elements/ShortDateTime.js +10 -0
  163. package/formatters/Date/elements/ShortTime.d.ts +18 -0
  164. package/formatters/Date/elements/ShortTime.js +10 -0
  165. package/formatters/Date/elements/toDate.d.ts +2 -0
  166. package/formatters/Date/elements/toDate.js +13 -0
  167. package/formatters/Date/index.d.ts +1 -0
  168. package/formatters/Date/index.js +1 -0
  169. package/formatters/Filesize/Filesize.d.ts +29 -0
  170. package/formatters/Filesize/Filesize.js +54 -0
  171. package/formatters/Filesize/index.d.ts +1 -0
  172. package/formatters/Filesize/index.js +1 -0
  173. package/formatters/GIS/Latitude.d.ts +23 -0
  174. package/formatters/GIS/Latitude.js +13 -0
  175. package/formatters/GIS/Longitude.d.ts +23 -0
  176. package/formatters/GIS/Longitude.js +13 -0
  177. package/formatters/GIS/index.d.ts +2 -0
  178. package/formatters/GIS/index.js +2 -0
  179. package/formatters/GIS/toDMS.d.ts +2 -0
  180. package/formatters/GIS/toDMS.js +16 -0
  181. package/formatters/Highlight/Highlight.d.ts +22 -0
  182. package/formatters/Highlight/Highlight.js +32 -0
  183. package/formatters/Highlight/index.d.ts +1 -0
  184. package/formatters/Highlight/index.js +1 -0
  185. package/formatters/Human/Human.d.ts +18 -0
  186. package/formatters/Human/Human.js +34 -0
  187. package/formatters/Human/index.d.ts +1 -0
  188. package/formatters/Human/index.js +1 -0
  189. package/formatters/Number/Number.d.ts +24 -0
  190. package/formatters/Number/Number.js +36 -0
  191. package/formatters/Number/index.d.ts +1 -0
  192. package/formatters/Number/index.js +1 -0
  193. package/helper/DMS.d.ts +22 -0
  194. package/helper/DMS.js +46 -0
  195. package/helper/HslColor.d.ts +11 -0
  196. package/helper/HslColor.js +47 -0
  197. package/helper/RgbColor.d.ts +43 -0
  198. package/helper/RgbColor.js +162 -0
  199. package/helper/SizeHelper.d.ts +10 -0
  200. package/helper/SizeHelper.js +56 -0
  201. package/helper/alpha.d.ts +8 -0
  202. package/helper/alpha.js +17 -0
  203. package/helper/darken.d.ts +8 -0
  204. package/helper/darken.js +18 -0
  205. package/helper/guard.d.ts +5 -0
  206. package/helper/guard.js +7 -0
  207. package/helper/lighten.d.ts +8 -0
  208. package/helper/lighten.js +11 -0
  209. package/helper/md5.d.ts +2 -0
  210. package/helper/md5.js +162 -0
  211. package/helper/nameToHex.d.ts +6 -0
  212. package/helper/nameToHex.js +163 -0
  213. package/inputs/DateInput/Body.d.ts +34 -0
  214. package/inputs/DateInput/Body.js +50 -0
  215. package/inputs/DateInput/Calendar.d.ts +15 -0
  216. package/inputs/DateInput/Calendar.js +60 -0
  217. package/inputs/DateInput/DateInput.d.ts +73 -0
  218. package/inputs/DateInput/DateInput.js +143 -0
  219. package/inputs/DateInput/Day.d.ts +32 -0
  220. package/inputs/DateInput/Day.js +33 -0
  221. package/inputs/DateInput/InfiniteList.d.ts +26 -0
  222. package/inputs/DateInput/InfiniteList.js +87 -0
  223. package/inputs/DateInput/Nav.d.ts +11 -0
  224. package/inputs/DateInput/Nav.js +24 -0
  225. package/inputs/DateInput/Navbar.d.ts +16 -0
  226. package/inputs/DateInput/Navbar.js +33 -0
  227. package/inputs/DateInput/NumericInput.d.ts +14 -0
  228. package/inputs/DateInput/NumericInput.js +48 -0
  229. package/inputs/DateInput/Selector.d.ts +47 -0
  230. package/inputs/DateInput/Selector.js +55 -0
  231. package/inputs/DateInput/SimpleList.d.ts +19 -0
  232. package/inputs/DateInput/SimpleList.js +31 -0
  233. package/inputs/Dropdown/Body.d.ts +25 -0
  234. package/inputs/Dropdown/Body.js +14 -0
  235. package/inputs/Dropdown/Column.d.ts +21 -0
  236. package/inputs/Dropdown/Column.js +6 -0
  237. package/inputs/Dropdown/Dropdown.d.ts +136 -0
  238. package/inputs/Dropdown/Dropdown.js +446 -0
  239. package/inputs/Dropdown/Selection.d.ts +11 -0
  240. package/inputs/Dropdown/Selection.js +23 -0
  241. package/inputs/Dropdown/Selector.d.ts +29 -0
  242. package/inputs/Dropdown/Selector.js +16 -0
  243. package/inputs/Dropdown/index.d.ts +1 -0
  244. package/inputs/Dropdown/index.js +1 -0
  245. package/inputs/Editor/Editor.d.ts +45 -0
  246. package/inputs/Editor/Editor.js +60 -0
  247. package/inputs/Editor/buttons/BoldButton.d.ts +7 -0
  248. package/inputs/Editor/buttons/BoldButton.js +7 -0
  249. package/inputs/Editor/buttons/BulletListButton.d.ts +7 -0
  250. package/inputs/Editor/buttons/BulletListButton.js +7 -0
  251. package/inputs/Editor/buttons/CodeBlockButton.d.ts +7 -0
  252. package/inputs/Editor/buttons/CodeBlockButton.js +7 -0
  253. package/inputs/Editor/buttons/CodeButton.d.ts +7 -0
  254. package/inputs/Editor/buttons/CodeButton.js +7 -0
  255. package/inputs/Editor/buttons/ItalicButton.d.ts +7 -0
  256. package/inputs/Editor/buttons/ItalicButton.js +7 -0
  257. package/inputs/Editor/buttons/OrderedListButton.d.ts +7 -0
  258. package/inputs/Editor/buttons/OrderedListButton.js +7 -0
  259. package/inputs/Editor/buttons/StrikethroughButton.d.ts +7 -0
  260. package/inputs/Editor/buttons/StrikethroughButton.js +7 -0
  261. package/inputs/Editor/index.d.ts +1 -0
  262. package/inputs/Editor/index.js +1 -0
  263. package/inputs/Editor/menu/MenuBar.d.ts +9 -0
  264. package/inputs/Editor/menu/MenuBar.js +44 -0
  265. package/inputs/Editor/menu/MenuButton.d.ts +35 -0
  266. package/inputs/Editor/menu/MenuButton.js +34 -0
  267. package/inputs/Editor/menu/MenuSeparator.d.ts +7 -0
  268. package/inputs/Editor/menu/MenuSeparator.js +24 -0
  269. package/inputs/Input/Clear.d.ts +7 -0
  270. package/inputs/Input/Clear.js +14 -0
  271. package/inputs/Input/Input.d.ts +133 -0
  272. package/inputs/Input/Input.js +64 -0
  273. package/inputs/Input/InputWrapper.d.ts +23 -0
  274. package/inputs/Input/InputWrapper.js +57 -0
  275. package/inputs/Input/index.d.ts +1 -0
  276. package/inputs/Input/index.js +1 -0
  277. package/inputs/Selector/ISelectorProps.d.ts +29 -0
  278. package/inputs/Selector/ISelectorProps.js +1 -0
  279. package/inputs/Selector/Selector.d.ts +29 -0
  280. package/inputs/Selector/Selector.js +77 -0
  281. package/inputs/Selector/index.d.ts +1 -0
  282. package/inputs/Selector/index.js +1 -0
  283. package/inputs/Selector/widgets/Checkbox.d.ts +6 -0
  284. package/inputs/Selector/widgets/Checkbox.js +29 -0
  285. package/inputs/Selector/widgets/Toggle.d.ts +6 -0
  286. package/inputs/Selector/widgets/Toggle.js +24 -0
  287. package/inputs/Slider/Slider.d.ts +63 -0
  288. package/inputs/Slider/Slider.js +198 -0
  289. package/inputs/Slider/index.d.ts +1 -0
  290. package/inputs/Slider/index.js +1 -0
  291. package/inputs/Textarea/Textarea.d.ts +79 -0
  292. package/inputs/Textarea/Textarea.js +65 -0
  293. package/inputs/Textarea/index.d.ts +1 -0
  294. package/inputs/Textarea/index.js +1 -0
  295. package/map/Map/Map.d.ts +47 -0
  296. package/map/Map/Map.js +221 -0
  297. package/map/Map/index.d.ts +1 -0
  298. package/map/Map/index.js +1 -0
  299. package/map/PositionsManager/PositionBox.d.ts +14 -0
  300. package/map/PositionsManager/PositionBox.js +86 -0
  301. package/map/PositionsManager/PositionsManager.d.ts +27 -0
  302. package/map/PositionsManager/PositionsManager.js +99 -0
  303. package/map/PositionsManager/index.d.ts +1 -0
  304. package/map/PositionsManager/index.js +1 -0
  305. package/map/controls/CompassButton/CompassButton.d.ts +33 -0
  306. package/map/controls/CompassButton/CompassButton.js +88 -0
  307. package/map/controls/CompassButton/index.d.ts +2 -0
  308. package/map/controls/CompassButton/index.js +2 -0
  309. package/map/controls/FullscreenButton/FullscreenButton.d.ts +21 -0
  310. package/map/controls/FullscreenButton/FullscreenButton.js +62 -0
  311. package/map/controls/FullscreenButton/index.d.ts +2 -0
  312. package/map/controls/FullscreenButton/index.js +2 -0
  313. package/map/controls/Geocoder/Geocoder.d.ts +49 -0
  314. package/map/controls/Geocoder/Geocoder.js +179 -0
  315. package/map/controls/Geocoder/GeocoderApi.d.ts +59 -0
  316. package/map/controls/Geocoder/GeocoderApi.js +68 -0
  317. package/map/controls/Geocoder/GeocoderEntry.d.ts +15 -0
  318. package/map/controls/Geocoder/GeocoderEntry.js +18 -0
  319. package/map/controls/Geocoder/GeocoderList.d.ts +10 -0
  320. package/map/controls/Geocoder/GeocoderList.js +18 -0
  321. package/map/controls/Geocoder/GeocoderSelector.d.ts +16 -0
  322. package/map/controls/Geocoder/GeocoderSelector.js +25 -0
  323. package/map/controls/Geocoder/index.d.ts +2 -0
  324. package/map/controls/Geocoder/index.js +2 -0
  325. package/map/controls/Graticule/Graticule.d.ts +35 -0
  326. package/map/controls/Graticule/Graticule.js +142 -0
  327. package/map/controls/Graticule/index.d.ts +1 -0
  328. package/map/controls/Graticule/index.js +1 -0
  329. package/map/controls/MapLoader/MapLoader.d.ts +33 -0
  330. package/map/controls/MapLoader/MapLoader.js +73 -0
  331. package/map/controls/MapLoader/index.d.ts +1 -0
  332. package/map/controls/MapLoader/index.js +1 -0
  333. package/map/controls/ScaleControl/ScaleControl.d.ts +24 -0
  334. package/map/controls/ScaleControl/ScaleControl.js +107 -0
  335. package/map/controls/ScaleControl/index.d.ts +1 -0
  336. package/map/controls/ScaleControl/index.js +1 -0
  337. package/map/controls/ZoomInButton/ZoomInButton.d.ts +19 -0
  338. package/map/controls/ZoomInButton/ZoomInButton.js +56 -0
  339. package/map/controls/ZoomInButton/index.d.ts +2 -0
  340. package/map/controls/ZoomInButton/index.js +2 -0
  341. package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +19 -0
  342. package/map/controls/ZoomOutButton/ZoomOutButton.js +56 -0
  343. package/map/controls/ZoomOutButton/index.d.ts +2 -0
  344. package/map/controls/ZoomOutButton/index.js +2 -0
  345. package/map/controls/base/MapButton/Hint.d.ts +17 -0
  346. package/map/controls/base/MapButton/Hint.js +34 -0
  347. package/map/controls/base/MapButton/MapButton.d.ts +46 -0
  348. package/map/controls/base/MapButton/MapButton.js +71 -0
  349. package/map/controls/base/MapButton/index.d.ts +1 -0
  350. package/map/controls/base/MapButton/index.js +1 -0
  351. package/map/controls/base/MapButtonGroup/MapButtonGroup.d.ts +17 -0
  352. package/map/controls/base/MapButtonGroup/MapButtonGroup.js +24 -0
  353. package/map/controls/base/MapButtonGroup/index.d.ts +1 -0
  354. package/map/controls/base/MapButtonGroup/index.js +1 -0
  355. package/map/controls/base/MapControl/MapControl.d.ts +36 -0
  356. package/map/controls/base/MapControl/MapControl.js +77 -0
  357. package/map/controls/base/MapControl/index.d.ts +1 -0
  358. package/map/controls/base/MapControl/index.js +1 -0
  359. package/map/layers/ClusterLayer/ClusterLayer.d.ts +79 -0
  360. package/map/layers/ClusterLayer/ClusterLayer.js +118 -0
  361. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.d.ts +51 -0
  362. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +151 -0
  363. package/map/layers/HtmlMarkerLayer/index.d.ts +1 -0
  364. package/map/layers/HtmlMarkerLayer/index.js +1 -0
  365. package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +2 -0
  366. package/map/layers/InterpolationLayer/ContoursFragmentShader.js +2 -0
  367. package/map/layers/InterpolationLayer/ContoursVertexShader.d.ts +2 -0
  368. package/map/layers/InterpolationLayer/ContoursVertexShader.js +2 -0
  369. package/map/layers/InterpolationLayer/IGradientStop.d.ts +5 -0
  370. package/map/layers/InterpolationLayer/IGradientStop.js +1 -0
  371. package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +35 -0
  372. package/map/layers/InterpolationLayer/InterpolationLayer.js +256 -0
  373. package/map/layers/InterpolationLayer/LevelsFragmentShader.d.ts +2 -0
  374. package/map/layers/InterpolationLayer/LevelsFragmentShader.js +2 -0
  375. package/map/layers/InterpolationLayer/LevelsVertexShader.d.ts +2 -0
  376. package/map/layers/InterpolationLayer/LevelsVertexShader.js +2 -0
  377. package/map/layers/InterpolationLayer/index.d.ts +1 -0
  378. package/map/layers/InterpolationLayer/index.js +1 -0
  379. package/map/layers/ParticlesLayer/ParticlesFragmentShader.d.ts +2 -0
  380. package/map/layers/ParticlesLayer/ParticlesFragmentShader.js +2 -0
  381. package/map/layers/ParticlesLayer/ParticlesLayer.d.ts +40 -0
  382. package/map/layers/ParticlesLayer/ParticlesLayer.js +337 -0
  383. package/map/layers/ParticlesLayer/ParticlesVertexShader.d.ts +2 -0
  384. package/map/layers/ParticlesLayer/ParticlesVertexShader.js +2 -0
  385. package/map/layers/ParticlesLayer/UVFragmentShader.d.ts +2 -0
  386. package/map/layers/ParticlesLayer/UVFragmentShader.js +2 -0
  387. package/map/layers/ParticlesLayer/UVVertexShader.d.ts +2 -0
  388. package/map/layers/ParticlesLayer/UVVertexShader.js +2 -0
  389. package/map/layers/ParticlesLayer/index.d.ts +1 -0
  390. package/map/layers/ParticlesLayer/index.js +1 -0
  391. package/map/markers/ClusterMarker/ClusterMarker.d.ts +36 -0
  392. package/map/markers/ClusterMarker/ClusterMarker.js +99 -0
  393. package/map/markers/ClusterMarker/index.d.ts +1 -0
  394. package/map/markers/ClusterMarker/index.js +1 -0
  395. package/map/markers/RiskMarker/RiskMarker.d.ts +22 -0
  396. package/map/markers/RiskMarker/RiskMarker.js +61 -0
  397. package/map/markers/RiskMarker/index.d.ts +1 -0
  398. package/map/markers/RiskMarker/index.js +1 -0
  399. package/modules/MainMenu/Item.d.ts +42 -0
  400. package/modules/MainMenu/Item.js +94 -0
  401. package/modules/MainMenu/MainMenu.d.ts +20 -0
  402. package/modules/MainMenu/MainMenu.js +41 -0
  403. package/modules/MainMenu/index.d.ts +1 -0
  404. package/modules/MainMenu/index.js +1 -0
  405. package/modules/Root/Content.d.ts +16 -0
  406. package/modules/Root/Content.js +25 -0
  407. package/modules/Root/Overlay.d.ts +23 -0
  408. package/modules/Root/Overlay.js +33 -0
  409. package/modules/Root/Root.d.ts +7 -0
  410. package/modules/Root/Root.js +45 -0
  411. package/modules/Root/Shader.d.ts +15 -0
  412. package/modules/Root/Shader.js +24 -0
  413. package/modules/Root/Sidebar.d.ts +13 -0
  414. package/modules/Root/Sidebar.js +24 -0
  415. package/modules/Root/index.d.ts +1 -0
  416. package/modules/Root/index.js +1 -0
  417. package/modules/Root/stories/SampleContent.d.ts +7 -0
  418. package/modules/Root/stories/SampleContent.js +44 -0
  419. package/package.json +2 -2
  420. package/services/Dialog/AlertDialog.d.ts +31 -0
  421. package/services/Dialog/AlertDialog.js +29 -0
  422. package/services/Dialog/ConfirmDialog.d.ts +34 -0
  423. package/services/Dialog/ConfirmDialog.js +30 -0
  424. package/services/Dialog/Dialog.d.ts +91 -0
  425. package/services/Dialog/Dialog.js +92 -0
  426. package/services/Dialog/DialogBackground.d.ts +7 -0
  427. package/services/Dialog/DialogBackground.js +12 -0
  428. package/services/Dialog/DialogContent.d.ts +25 -0
  429. package/services/Dialog/DialogContent.js +38 -0
  430. package/services/Dialog/DialogFooter.d.ts +24 -0
  431. package/services/Dialog/DialogFooter.js +50 -0
  432. package/services/Dialog/DialogHeader.d.ts +18 -0
  433. package/services/Dialog/DialogHeader.js +36 -0
  434. package/services/Dialog/DialogWindow.d.ts +13 -0
  435. package/services/Dialog/DialogWindow.js +12 -0
  436. package/services/Dialog/XhrDialog.d.ts +34 -0
  437. package/services/Dialog/XhrDialog.js +321 -0
  438. package/services/Dialog/index.d.ts +1 -0
  439. package/services/Dialog/index.js +1 -0
  440. package/services/Toast/IToastMessage.d.ts +10 -0
  441. package/services/Toast/IToastMessage.js +1 -0
  442. package/services/Toast/IToastProps.d.ts +23 -0
  443. package/services/Toast/IToastProps.js +1 -0
  444. package/services/Toast/Toast.d.ts +21 -0
  445. package/services/Toast/Toast.js +79 -0
  446. package/services/Toast/ToastContainer.d.ts +40 -0
  447. package/services/Toast/ToastContainer.js +65 -0
  448. package/services/Toast/ToastContext.d.ts +22 -0
  449. package/services/Toast/ToastContext.js +7 -0
  450. package/services/Toast/ToastProvider.d.ts +19 -0
  451. package/services/Toast/ToastProvider.js +67 -0
  452. package/services/Toast/index.d.ts +2 -0
  453. package/services/Toast/index.js +2 -0
  454. package/services/Toast/useToast.d.ts +5 -0
  455. package/services/Toast/useToast.js +9 -0
  456. package/styles/NormalTheme.d.ts +3 -0
  457. package/styles/NormalTheme.js +65 -0
  458. package/styles/StyleBase.d.ts +2 -0
  459. package/styles/StyleBase.js +8 -0
  460. package/styles/StyleReset.d.ts +2 -0
  461. package/styles/StyleReset.js +8 -0
  462. package/styles/styled-theme.d.ts +0 -0
  463. package/styles/styled-theme.js +1 -0
  464. package/svg/editor/index.d.ts +10 -0
  465. package/svg/editor/index.js +11 -0
  466. package/svg/file/index.d.ts +5 -0
  467. package/svg/file/index.js +6 -0
  468. package/svg/icons/index.d.ts +36 -0
  469. package/svg/icons/index.js +37 -0
  470. package/svg/index.d.ts +11 -0
  471. package/svg/index.js +5 -0
  472. package/svg/menu/index.d.ts +8 -0
  473. package/svg/menu/index.js +9 -0
package/Types.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Certain attributes are applicable to several controls. These are
3
+ * typed in this file.
4
+ */
5
+ type Size = 'mini' | 'tiny' | 'small' | 'medium' | 'large' | 'big' | 'huge' | 'massive';
6
+ export { Size };
package/Types.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Certain attributes are applicable to several controls. These are
3
+ * typed in this file.
4
+ */
5
+ export {};
@@ -0,0 +1,63 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /**
6
+ * Content to place by `Anchor`.
7
+ */
8
+ children?: React.ReactNode;
9
+ /**
10
+ * If set, then positioning is determined to this element's nearest
11
+ * **scrolling** parent. If not set, positioning is relative to the
12
+ * viewport.
13
+ * @default false
14
+ */
15
+ relativeToParent?: boolean;
16
+ /**
17
+ * Overrides the horizontal positioning to force it `left` or `right`.
18
+ * @default none
19
+ */
20
+ horizontal?: 'none' | 'left' | 'right';
21
+ /**
22
+ * Overrides the vertical positioning to force it `up` or `down`.
23
+ * @default none
24
+ */
25
+ vertical?: 'none' | 'up' | 'down';
26
+ /**
27
+ * Anchor left position in parent.
28
+ * @default auto
29
+ */
30
+ left?: string;
31
+ /**
32
+ * Anchor top position in parent.
33
+ * @default auto
34
+ */
35
+ top?: string;
36
+ /**
37
+ * Anchor bottom position in parent.
38
+ * @default auto
39
+ */
40
+ bottom?: string;
41
+ /**
42
+ * Anchor right position in parent.
43
+ * @default auto
44
+ */
45
+ right?: string;
46
+ /**
47
+ * If set, `Anchor` will update its position when the page is scrolled.
48
+ * @default false
49
+ */
50
+ adapt?: boolean;
51
+ }
52
+ /**
53
+ * Often, a panel must open somewhere when a button or icon is clicked. This panel
54
+ * opens near the button/icon, but it may fall outside the viewports bounds, depending
55
+ * on the current scroll position. An `Anchor` wraps such a panel, and ensures that
56
+ * the panel opens up, down, left or right of the anchor position depending on the
57
+ * scroll position, ensuring that the panel is inside the viewport.
58
+ *
59
+ * By default, positioning happens only once (when the anchor mounts), but with
60
+ * the `adapt` prop, positioning happens whenever the page is scrolled.
61
+ */
62
+ declare const Anchor: (props: IProps) => React.JSX.Element;
63
+ export { Anchor };
@@ -0,0 +1,113 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Often, a panel must open somewhere when a button or icon is clicked. This panel
4
+ * opens near the button/icon, but it may fall outside the viewports bounds, depending
5
+ * on the current scroll position. An `Anchor` wraps such a panel, and ensures that
6
+ * the panel opens up, down, left or right of the anchor position depending on the
7
+ * scroll position, ensuring that the panel is inside the viewport.
8
+ *
9
+ * By default, positioning happens only once (when the anchor mounts), but with
10
+ * the `adapt` prop, positioning happens whenever the page is scrolled.
11
+ */
12
+ var Anchor = function (props) {
13
+ var _a, _b, _c, _d;
14
+ var anchorRef = React.useRef(null);
15
+ var contentRef = React.useRef(null);
16
+ var findScrollingParentRecursive = function (node) {
17
+ var overflowY = window.getComputedStyle(node).overflowY;
18
+ if (overflowY == 'scroll' || overflowY == 'auto')
19
+ return node;
20
+ if (node.parentElement)
21
+ return findScrollingParentRecursive(node.parentElement);
22
+ return null;
23
+ };
24
+ // Return my nearest parent that's scrolling (frames are not supported). If
25
+ // no parent is found, null is returned.
26
+ var findScrollingParent = function () {
27
+ return findScrollingParentRecursive(anchorRef.current.parentElement);
28
+ };
29
+ // Returns true if this control is in the lower half of its scrolling parent.
30
+ // (if direction == parent), or in the lower half of the viewport if no
31
+ // scrolling parent is found.
32
+ var isInLowerViewport = function () {
33
+ var scrollingParent = findScrollingParent();
34
+ if (scrollingParent == null || props.relativeToParent) {
35
+ return anchorRef.current.getBoundingClientRect().top > window.innerHeight / 2;
36
+ }
37
+ else {
38
+ var myY = anchorRef.current.getBoundingClientRect().top;
39
+ var containerY = scrollingParent.getBoundingClientRect().top;
40
+ var containerHeight = scrollingParent.getBoundingClientRect().height;
41
+ var offset = myY - containerY;
42
+ return offset > containerHeight / 2;
43
+ }
44
+ };
45
+ // Returns true if this control is in the right half of its scrolling parent.
46
+ // (if direction == parent), or in the right half of the viewport if no
47
+ // scrolling parent is found.
48
+ var isInRightViewport = function () {
49
+ var scrollingParent = findScrollingParent();
50
+ if (scrollingParent == null || props.relativeToParent) {
51
+ return anchorRef.current.getBoundingClientRect().left > window.innerWidth / 2;
52
+ }
53
+ else {
54
+ var myX = anchorRef.current.getBoundingClientRect().left;
55
+ var containerX = scrollingParent.getBoundingClientRect().left;
56
+ var containerWidth = scrollingParent.getBoundingClientRect().width;
57
+ var offset = myX - containerX;
58
+ return offset > containerWidth / 2;
59
+ }
60
+ };
61
+ var updatePosition = function () {
62
+ if (contentRef.current == null)
63
+ return;
64
+ // Calculate size of content:
65
+ var width = contentRef.current.getBoundingClientRect().width;
66
+ var height = contentRef.current.getBoundingClientRect().height;
67
+ contentRef.current.style.visibility = 'visible';
68
+ if (props.horizontal === 'left') {
69
+ contentRef.current.style.left = "-".concat(width, "px");
70
+ }
71
+ else if (props.horizontal === 'right') {
72
+ contentRef.current.style.left = '0px';
73
+ }
74
+ else {
75
+ contentRef.current.style.left = isInRightViewport() ? "-".concat(width, "px") : '0px';
76
+ }
77
+ if (props.vertical === 'up') {
78
+ contentRef.current.style.top = "-".concat(height, "px");
79
+ }
80
+ else if (props.vertical === 'down') {
81
+ contentRef.current.style.top = '0px';
82
+ }
83
+ else {
84
+ contentRef.current.style.top = isInLowerViewport() ? "-".concat(height, "px") : '0px';
85
+ }
86
+ };
87
+ React.useEffect(function () {
88
+ document.addEventListener('scroll', handleScroll);
89
+ return function () {
90
+ document.removeEventListener('scroll', handleScroll);
91
+ };
92
+ }, []);
93
+ // We always listen to the scroll event. However, we only update the anchor
94
+ // position on scroll when adapt=true.
95
+ var handleScroll = function () {
96
+ if (props.adapt) {
97
+ updatePosition();
98
+ }
99
+ };
100
+ // Set element position on mount, or when alignment changes.
101
+ React.useEffect(function () {
102
+ updatePosition();
103
+ }, [props.horizontal, props.vertical]);
104
+ return (React.createElement("div", { ref: anchorRef, style: {
105
+ position: 'absolute',
106
+ left: (_a = props.left) !== null && _a !== void 0 ? _a : 'auto',
107
+ top: (_b = props.top) !== null && _b !== void 0 ? _b : 'auto',
108
+ bottom: (_c = props.bottom) !== null && _c !== void 0 ? _c : 'auto',
109
+ right: (_d = props.right) !== null && _d !== void 0 ? _d : 'auto',
110
+ } },
111
+ React.createElement("div", { ref: contentRef, style: { position: 'absolute', visibility: 'hidden', transition: 'top 250ms ease, left 250ms ease' } }, props.children)));
112
+ };
113
+ export { Anchor };
@@ -0,0 +1 @@
1
+ export * from './Anchor';
@@ -0,0 +1 @@
1
+ export * from './Anchor';
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /** Children are one or more `Dockable`. */
6
+ children?: React.ReactNode;
7
+ /**
8
+ * If set, draw a border around the Dock.
9
+ * @default false
10
+ */
11
+ bordered?: boolean;
12
+ /**
13
+ * Dock offset from top of map, in pixels.
14
+ * @default 20
15
+ */
16
+ top?: number;
17
+ /**
18
+ * Dock offset from bottom of map, in pixels.
19
+ * @default 20
20
+ */
21
+ bottom?: number;
22
+ /**
23
+ * Dock offset from right side of map, in pixels.
24
+ * @default 20
25
+ */
26
+ right?: number;
27
+ /**
28
+ * Gap between items, in pixels.
29
+ * @default 16
30
+ */
31
+ gap?: number;
32
+ }
33
+ /**
34
+ * A `Dock` is a place where `Dockable` components live. Dockables have a lat/lng location on
35
+ * the map. When they go out of view, they move to the `Dock`.
36
+ *
37
+ * A `Dock` aligns to the right of the map is as wide as the entire map. It is up to
38
+ * the `Dockable` to set its width. A `Dock` can have offsets from the top, right, and bottom
39
+ * of the map.
40
+ *
41
+ * When docked, Dockables are placed in a vertical flexbox. When undocked, Dockables use
42
+ * absolute positioning on the map and do not stick to the Dock.
43
+ */
44
+ declare const Dock: ({ bordered, top, bottom, right, gap, ...props }: IProps) => React.JSX.Element;
45
+ export { Dock };
@@ -0,0 +1,61 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import * as React from 'react';
28
+ import styled, { css } from 'styled-components';
29
+ var DockBase = function (props) {
30
+ return (React.createElement("div", { className: props.className }, props.children));
31
+ };
32
+ var DockStyled = styled(DockBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"], ["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"
33
+ /**
34
+ * A `Dock` is a place where `Dockable` components live. Dockables have a lat/lng location on
35
+ * the map. When they go out of view, they move to the `Dock`.
36
+ *
37
+ * A `Dock` aligns to the right of the map is as wide as the entire map. It is up to
38
+ * the `Dockable` to set its width. A `Dock` can have offsets from the top, right, and bottom
39
+ * of the map.
40
+ *
41
+ * When docked, Dockables are placed in a vertical flexbox. When undocked, Dockables use
42
+ * absolute positioning on the map and do not stick to the Dock.
43
+ */
44
+ ])), function (p) { return p.right; }, function (p) { return p.top; }, function (p) { return p.bottom; }, function (p) { return p.bordered && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["border: dashed 1px white;"], ["border: dashed 1px white;"]))); }, function (p) { return p.gap; });
45
+ /**
46
+ * A `Dock` is a place where `Dockable` components live. Dockables have a lat/lng location on
47
+ * the map. When they go out of view, they move to the `Dock`.
48
+ *
49
+ * A `Dock` aligns to the right of the map is as wide as the entire map. It is up to
50
+ * the `Dockable` to set its width. A `Dock` can have offsets from the top, right, and bottom
51
+ * of the map.
52
+ *
53
+ * When docked, Dockables are placed in a vertical flexbox. When undocked, Dockables use
54
+ * absolute positioning on the map and do not stick to the Dock.
55
+ */
56
+ var Dock = function (_a) {
57
+ var _b = _a.bordered, bordered = _b === void 0 ? false : _b, _c = _a.top, top = _c === void 0 ? 8 : _c, _d = _a.bottom, bottom = _d === void 0 ? 8 : _d, _e = _a.right, right = _e === void 0 ? 8 : _e, _f = _a.gap, gap = _f === void 0 ? 16 : _f, props = __rest(_a, ["bordered", "top", "bottom", "right", "gap"]);
58
+ return React.createElement(DockStyled, __assign({ bordered: bordered, top: top, bottom: bottom, right: right, gap: gap }, props));
59
+ };
60
+ export { Dock };
61
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,60 @@
1
+ import * as React from 'react';
2
+ interface IDockableProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /** @ignore */
6
+ children?: React.ReactNode;
7
+ /**
8
+ * Dockable's latitude.
9
+ * @default 0
10
+ */
11
+ latitude?: number;
12
+ /**
13
+ * Dockable's longitude.
14
+ * @default 0
15
+ */
16
+ longitude?: number;
17
+ /**
18
+ * Dockable's x-offset from lat,lng position, while floating.
19
+ * @default 0
20
+ */
21
+ offsetX?: number;
22
+ /**
23
+ * Dockable's y-offset from lat,lng position, while floating.
24
+ * @default 0
25
+ */
26
+ offsetY?: number;
27
+ /**
28
+ * Optional custom z-index in order to stack overlapping Dockables.
29
+ * @default 1
30
+ */
31
+ zIndex?: number;
32
+ /**
33
+ * Dockables ordinarily are placed to the right of their map coordinate.
34
+ * If `swappable` is `horizontal`, they'll move to the left if they're too close to the right
35
+ * edge of the map. If `vertical`, they'll move to the top if they're too close to the top
36
+ * edge of the map.
37
+ * @default 'none'
38
+ */
39
+ swappable?: 'none' | 'horizontal' | 'vertical' | 'both';
40
+ /**
41
+ * Force docking; don't allow Dockable to float.
42
+ * @default false
43
+ */
44
+ alwaysDocked?: boolean;
45
+ /**
46
+ * It set, `Dockable` will flex in `Dock`. If a number is specified,
47
+ * then that's the max vertical height in pixels.
48
+ * @default false
49
+ */
50
+ fill?: boolean | number;
51
+ }
52
+ /**
53
+ * A `Dockable` is fixed to a lat/lng on the `Map`. It must be a child of `Dock`. When a Dockable
54
+ * is outside of the current map viewport, it moves to the `Dock`. If `alwaysDocked` is set,
55
+ * then the `Dockable` is always in the `Dock`.
56
+ *
57
+ * When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
58
+ */
59
+ declare const Dockable: ({ longitude, latitude, offsetX, offsetY, swappable, alwaysDocked, zIndex, ...props }: IDockableProps) => React.JSX.Element;
60
+ export { Dockable, IDockableProps };
@@ -0,0 +1,98 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import * as React from 'react';
28
+ import { useMap } from 'react-map-gl';
29
+ import styled, { css } from 'styled-components';
30
+ import { useViewState } from '../../map/Map';
31
+ var DockableBase = function (props) {
32
+ // Reference to Dockable div:
33
+ var containerRef = React.useRef(null);
34
+ // Using the ViewState will cause this component to be rerendered when the
35
+ // map moves:
36
+ useViewState();
37
+ // Get size of map:
38
+ var map = useMap();
39
+ var mapWidth = map.current.getContainer().clientWidth;
40
+ var mapHeight = map.current.getContainer().clientHeight;
41
+ // Convert Dockable's lat/lng to pixel coordinates:
42
+ var _a = map.current.project([props.longitude, props.latitude]), x = _a.x, y = _a.y;
43
+ // Get size of Dockable:
44
+ var myWidth = containerRef.current ? containerRef.current.clientWidth : 0;
45
+ var myHeight = containerRef.current ? containerRef.current.clientHeight : 0;
46
+ // Is Dockable currently offscreen (boolean)?
47
+ var offsetX = props.offsetX;
48
+ var offsetY = props.offsetY;
49
+ var offscreen = x + offsetX < 0
50
+ || y + offsetY < 0
51
+ || x + offsetX + myWidth + (props.swappable ? -myWidth - offsetX * 2 : 0) > mapWidth
52
+ || y + offsetY + myHeight > mapHeight;
53
+ var rightHalf = x > mapWidth / 2;
54
+ var bottomHalf = y > mapHeight / 2; // TODO: Future use for vertical swappable.
55
+ // A local style object is used rather than styled-components, because the
56
+ // style changes constantly and would produce too many styled-components
57
+ // classes.
58
+ var style = {
59
+ // Offscreen Dockables are relatively-positioned, so that they stay in the Dock.
60
+ // Onscreen Dockables are absolutely-positioned.
61
+ position: offscreen ? 'relative' : 'absolute',
62
+ pointerEvents: offscreen ? 'all' : 'none'
63
+ };
64
+ // Floating dockables get a position:
65
+ if (!offscreen && !props.alwaysDocked) {
66
+ if (props.swappable == 'horizontal' || props.swappable == 'both') {
67
+ style.marginLeft = props.swappable ? (rightHalf ? -myWidth - offsetX * 2 : 0) + "px" : 0;
68
+ }
69
+ if (props.swappable == 'vertical' || props.swappable == 'both') {
70
+ style.marginTop = props.swappable ? (bottomHalf ? -myHeight - offsetY * 2 : 0) + "px" : 0;
71
+ }
72
+ style.left = "".concat(x + offsetX, "px");
73
+ style.top = "".concat(y + offsetY, "px");
74
+ }
75
+ return (React.createElement("div", { style: style, className: "".concat(props.className, " ").concat(offscreen ? 'offscreen' : ''), ref: containerRef }, props.children));
76
+ };
77
+ var DockableStyled = styled(DockableBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: white;\n z-index: ", ";\n ", "\n"], ["\n color: white;\n z-index: ", ";\n ", "\n"
78
+ /**
79
+ * A `Dockable` is fixed to a lat/lng on the `Map`. It must be a child of `Dock`. When a Dockable
80
+ * is outside of the current map viewport, it moves to the `Dock`. If `alwaysDocked` is set,
81
+ * then the `Dockable` is always in the `Dock`.
82
+ *
83
+ * When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
84
+ */
85
+ ])), function (p) { return p.zIndex; }, function (p) { return p.fill && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n ", "\n ", "\n "], ["\n display: flex;\n ", "\n ", "\n "])), p.fill === true && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["flex: 1;"], ["flex: 1;"]))), p.fill && p.fill !== true && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["height: ", "px;"], ["height: ", "px;"])), p.fill)); });
86
+ /**
87
+ * A `Dockable` is fixed to a lat/lng on the `Map`. It must be a child of `Dock`. When a Dockable
88
+ * is outside of the current map viewport, it moves to the `Dock`. If `alwaysDocked` is set,
89
+ * then the `Dockable` is always in the `Dock`.
90
+ *
91
+ * When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
92
+ */
93
+ var Dockable = function (_a) {
94
+ var _b = _a.longitude, longitude = _b === void 0 ? 0 : _b, _c = _a.latitude, latitude = _c === void 0 ? 0 : _c, _d = _a.offsetX, offsetX = _d === void 0 ? 0 : _d, _e = _a.offsetY, offsetY = _e === void 0 ? 0 : _e, _f = _a.swappable, swappable = _f === void 0 ? 'none' : _f, _g = _a.alwaysDocked, alwaysDocked = _g === void 0 ? false : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 0 : _h, props = __rest(_a, ["longitude", "latitude", "offsetX", "offsetY", "swappable", "alwaysDocked", "zIndex"]);
95
+ return React.createElement(DockableStyled, __assign({ longitude: longitude, latitude: latitude, offsetX: offsetX, offsetY: offsetY, swappable: swappable, alwaysDocked: alwaysDocked, zIndex: zIndex }, props));
96
+ };
97
+ export { Dockable };
98
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1,2 @@
1
+ export * from './Dockable';
2
+ export * from './Dock';
@@ -0,0 +1,2 @@
1
+ export * from './Dockable';
2
+ export * from './Dock';
@@ -0,0 +1,104 @@
1
+ import * as React from 'react';
2
+ import { IValidationProps } from './Validation';
3
+ interface IProps {
4
+ /** @ignore */
5
+ className?: string;
6
+ /** Field name. Required. */
7
+ name: string;
8
+ /** Field value. Required. */
9
+ value: any;
10
+ /** Control to show in field. */
11
+ control: React.ReactNode;
12
+ /**
13
+ * Relative weight of field. If not set, field will not flex to fill
14
+ * available width.
15
+ */
16
+ weight?: number;
17
+ /**
18
+ * Label to show by field. Can be JSX.
19
+ */
20
+ label?: React.ReactNode;
21
+ /**
22
+ * Disabled is passed on to control. Disabled fields cannot be interacted
23
+ * with.
24
+ * @default false
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * Optional hint to be shown when there is no error. Can be JSX.
29
+ */
30
+ hint?: React.ReactNode;
31
+ /**
32
+ * If true, a change to this field forces the whole form to update.
33
+ * @default false
34
+ */
35
+ forceupdate?: boolean;
36
+ /**
37
+ * If true, display an asterisk for required fields.
38
+ */
39
+ asterisk?: boolean;
40
+ /**
41
+ * If true, apply ghost state to Field and the control in it.
42
+ */
43
+ ghost?: boolean;
44
+ /**
45
+ * If unset, this Field is rendered without any embellishments: no label,
46
+ * no hint, no wrapper. This is useful for controls that must behave like
47
+ * a Field (i.e. work with a Form to get their `value` and `onChange` set),
48
+ * but mustn't look like one.
49
+ *
50
+ * If set to `simple` then the field shows a label, hint and error.
51
+ *
52
+ * If set to `box` then the field has a boxed appearance. This places a
53
+ * border around the field, which is clickable and moves focus to the
54
+ * contained control.
55
+ */
56
+ wrapper?: 'box' | 'simple';
57
+ /**
58
+ * Validation rules.
59
+ */
60
+ rules?: IValidationProps;
61
+ /**
62
+ * Triggered whenever an _uncontrolled_ Field changes.
63
+ */
64
+ onChange?: (data: any, forceupdate: boolean) => void;
65
+ }
66
+ /**
67
+ * A `Form.Field` wraps a form control. It serves several purposes.
68
+ *
69
+ * * First, the Field automatically adds `name`, `onChange`, `value` and
70
+ * `error` props to the control it contains. The `onChange` prop is supplied by
71
+ * the `Form` content so that the developer does not need to add it.
72
+ *
73
+ * * Second, the Field performs validation when it is mounted, whenever its
74
+ * control's value changes, and when it is unmounted. Validation results are
75
+ * sent directly to the parent `Form` (a form context is used for this -- a
76
+ * Field must reside inside a form).
77
+ *
78
+ * #### Uncontrolled fields
79
+ * Note that Fields can be used outside of `Form`. These are known as _uncontrolled_.
80
+ * In this case, the Field can still benefit from a label, hint, and validation
81
+ * (since Field keeps an internal value), but `onChange` must be provided by
82
+ * the developer.
83
+ *
84
+ * #### Validations
85
+ * A Form.Field may add any number of validation `rules`, e.g. `required=`.
86
+ * Rules include `required`, `isInt`, `minLength` etc. When a
87
+ * field is first mounted, it is _pristine_. Even when its content is invalid,
88
+ * it will not show any validation error. When the user edits the field, it
89
+ * will no longer be pristine and any errors will appear. The parent Form also
90
+ * provides a `dirty` prop to the Field. When the Form is dirty, so are its
91
+ * fields, and any validation errors are shown, pristine or not.
92
+ *
93
+ * For dark backgrounds, fields may set their contrast prop to true to use
94
+ * lighter error colors.
95
+ *
96
+ * Fields have a `label` and a `hint`. Both are optional. These elements are
97
+ * displayed in different ways based on the field's `wrapper`. Unwrapped Fields
98
+ * do not display label or hint. Other wrappers are `simple` and `box`.
99
+ */
100
+ declare const Field: {
101
+ (props: IProps): React.JSX.Element;
102
+ displayName: string;
103
+ };
104
+ export { Field, IProps };