@longline/aqua-ui 1.0.10 → 1.0.12

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 (475) 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 +3 -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/index.d.ts +3 -0
  463. package/styles/index.js +3 -0
  464. package/styles/styled-theme.d.ts +0 -0
  465. package/styles/styled-theme.js +1 -0
  466. package/svg/editor/index.d.ts +10 -0
  467. package/svg/editor/index.js +11 -0
  468. package/svg/file/index.d.ts +5 -0
  469. package/svg/file/index.js +6 -0
  470. package/svg/icons/index.d.ts +36 -0
  471. package/svg/icons/index.js +37 -0
  472. package/svg/index.d.ts +11 -0
  473. package/svg/index.js +5 -0
  474. package/svg/menu/index.d.ts +8 -0
  475. package/svg/menu/index.js +9 -0
@@ -0,0 +1,163 @@
1
+ var namedColorMap = {
2
+ aliceblue: 'f0f8ff',
3
+ antiquewhite: 'faebd7',
4
+ aqua: '00ffff',
5
+ aquamarine: '7fffd4',
6
+ azure: 'f0ffff',
7
+ beige: 'f5f5dc',
8
+ bisque: 'ffe4c4',
9
+ black: '000',
10
+ blanchedalmond: 'ffebcd',
11
+ blue: '0000ff',
12
+ blueviolet: '8a2be2',
13
+ brown: 'a52a2a',
14
+ burlywood: 'deb887',
15
+ cadetblue: '5f9ea0',
16
+ chartreuse: '7fff00',
17
+ chocolate: 'd2691e',
18
+ coral: 'ff7f50',
19
+ cornflowerblue: '6495ed',
20
+ cornsilk: 'fff8dc',
21
+ crimson: 'dc143c',
22
+ cyan: '00ffff',
23
+ darkblue: '00008b',
24
+ darkcyan: '008b8b',
25
+ darkgoldenrod: 'b8860b',
26
+ darkgray: 'a9a9a9',
27
+ darkgreen: '006400',
28
+ darkgrey: 'a9a9a9',
29
+ darkkhaki: 'bdb76b',
30
+ darkmagenta: '8b008b',
31
+ darkolivegreen: '556b2f',
32
+ darkorange: 'ff8c00',
33
+ darkorchid: '9932cc',
34
+ darkred: '8b0000',
35
+ darksalmon: 'e9967a',
36
+ darkseagreen: '8fbc8f',
37
+ darkslateblue: '483d8b',
38
+ darkslategray: '2f4f4f',
39
+ darkslategrey: '2f4f4f',
40
+ darkturquoise: '00ced1',
41
+ darkviolet: '9400d3',
42
+ deeppink: 'ff1493',
43
+ deepskyblue: '00bfff',
44
+ dimgray: '696969',
45
+ dimgrey: '696969',
46
+ dodgerblue: '1e90ff',
47
+ firebrick: 'b22222',
48
+ floralwhite: 'fffaf0',
49
+ forestgreen: '228b22',
50
+ fuchsia: 'ff00ff',
51
+ gainsboro: 'dcdcdc',
52
+ ghostwhite: 'f8f8ff',
53
+ gold: 'ffd700',
54
+ goldenrod: 'daa520',
55
+ gray: '808080',
56
+ green: '008000',
57
+ greenyellow: 'adff2f',
58
+ grey: '808080',
59
+ honeydew: 'f0fff0',
60
+ hotpink: 'ff69b4',
61
+ indianred: 'cd5c5c',
62
+ indigo: '4b0082',
63
+ ivory: 'fffff0',
64
+ khaki: 'f0e68c',
65
+ lavender: 'e6e6fa',
66
+ lavenderblush: 'fff0f5',
67
+ lawngreen: '7cfc00',
68
+ lemonchiffon: 'fffacd',
69
+ lightblue: 'add8e6',
70
+ lightcoral: 'f08080',
71
+ lightcyan: 'e0ffff',
72
+ lightgoldenrodyellow: 'fafad2',
73
+ lightgray: 'd3d3d3',
74
+ lightgreen: '90ee90',
75
+ lightgrey: 'd3d3d3',
76
+ lightpink: 'ffb6c1',
77
+ lightsalmon: 'ffa07a',
78
+ lightseagreen: '20b2aa',
79
+ lightskyblue: '87cefa',
80
+ lightslategray: '789',
81
+ lightslategrey: '789',
82
+ lightsteelblue: 'b0c4de',
83
+ lightyellow: 'ffffe0',
84
+ lime: '0f0',
85
+ limegreen: '32cd32',
86
+ linen: 'faf0e6',
87
+ magenta: 'f0f',
88
+ maroon: '800000',
89
+ mediumaquamarine: '66cdaa',
90
+ mediumblue: '0000cd',
91
+ mediumorchid: 'ba55d3',
92
+ mediumpurple: '9370db',
93
+ mediumseagreen: '3cb371',
94
+ mediumslateblue: '7b68ee',
95
+ mediumspringgreen: '00fa9a',
96
+ mediumturquoise: '48d1cc',
97
+ mediumvioletred: 'c71585',
98
+ midnightblue: '191970',
99
+ mintcream: 'f5fffa',
100
+ mistyrose: 'ffe4e1',
101
+ moccasin: 'ffe4b5',
102
+ navajowhite: 'ffdead',
103
+ navy: '000080',
104
+ oldlace: 'fdf5e6',
105
+ olive: '808000',
106
+ olivedrab: '6b8e23',
107
+ orange: 'ffa500',
108
+ orangered: 'ff4500',
109
+ orchid: 'da70d6',
110
+ palegoldenrod: 'eee8aa',
111
+ palegreen: '98fb98',
112
+ paleturquoise: 'afeeee',
113
+ palevioletred: 'db7093',
114
+ papayawhip: 'ffefd5',
115
+ peachpuff: 'ffdab9',
116
+ peru: 'cd853f',
117
+ pink: 'ffc0cb',
118
+ plum: 'dda0dd',
119
+ powderblue: 'b0e0e6',
120
+ purple: '800080',
121
+ rebeccapurple: '639',
122
+ red: 'f00',
123
+ rosybrown: 'bc8f8f',
124
+ royalblue: '4169e1',
125
+ saddlebrown: '8b4513',
126
+ salmon: 'fa8072',
127
+ sandybrown: 'f4a460',
128
+ seagreen: '2e8b57',
129
+ seashell: 'fff5ee',
130
+ sienna: 'a0522d',
131
+ silver: 'c0c0c0',
132
+ skyblue: '87ceeb',
133
+ slateblue: '6a5acd',
134
+ slategray: '708090',
135
+ slategrey: '708090',
136
+ snow: 'fffafa',
137
+ springgreen: '00ff7f',
138
+ steelblue: '4682b4',
139
+ tan: 'd2b48c',
140
+ teal: '008080',
141
+ thistle: 'd8bfd8',
142
+ tomato: 'ff6347',
143
+ turquoise: '40e0d0',
144
+ violet: 'ee82ee',
145
+ wheat: 'f5deb3',
146
+ white: 'fff',
147
+ whitesmoke: 'f5f5f5',
148
+ yellow: 'ff0',
149
+ yellowgreen: '9acd32',
150
+ };
151
+ /**
152
+ * Checks if a string is a CSS named color and returns its equivalent hex value,
153
+ * otherwise returns the original color.
154
+ */
155
+ function nameToHex(color) {
156
+ if (typeof color !== 'string')
157
+ return color;
158
+ var normalizedColorName = color.toLowerCase();
159
+ return namedColorMap[normalizedColorName]
160
+ ? "#".concat(namedColorMap[normalizedColorName])
161
+ : color;
162
+ }
163
+ export { nameToHex };
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /**
6
+ * Current value.
7
+ */
8
+ value: Date;
9
+ /**
10
+ * Is control currently open?
11
+ */
12
+ open: boolean;
13
+ /**
14
+ * This control can open upwards, which affects its styles.
15
+ */
16
+ upwards: boolean;
17
+ /**
18
+ * Is control transparent? This affects the position at which
19
+ * this Body opens.
20
+ */
21
+ transparent?: boolean;
22
+ /**
23
+ * If set, no future date (beyond today) can be selected.
24
+ */
25
+ nofuture?: boolean;
26
+ /**
27
+ * Fired when a new date is selected.
28
+ */
29
+ onSelect: (value: Date) => void;
30
+ }
31
+ declare const Body: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<IProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
32
+ ref?: React.Ref<HTMLDivElement>;
33
+ }, never>> & string & Omit<React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>, keyof React.Component<any, {}, any>>;
34
+ export { Body };
@@ -0,0 +1,50 @@
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
+ import * as React from 'react';
6
+ import styled, { css } from 'styled-components';
7
+ import { Calendar } from './Calendar';
8
+ import { Navbar } from './Navbar';
9
+ var BodyBase = React.forwardRef(function (props, ref) {
10
+ // Parse str into Date.
11
+ // If parsing fails, return fallback value.
12
+ var checkDate = function (d, def) {
13
+ if (!d || isNaN(d.getDate()))
14
+ return def;
15
+ return d;
16
+ };
17
+ // Running date, to determine which month to show.
18
+ // If no value is specified, use today's date.
19
+ var _a = React.useState(checkDate(props.value, new Date(Date.now()))), date = _a[0], setDate = _a[1];
20
+ React.useEffect(function () {
21
+ setDate(checkDate(props.value, new Date(Date.now())));
22
+ }, [props.value]);
23
+ var handleDayClick = function (date) {
24
+ props.onSelect(date);
25
+ };
26
+ //
27
+ // Moves current view by specified number of months.
28
+ //
29
+ var handleMove = function (months) {
30
+ date.setMonth(date.getMonth() + months);
31
+ setDate(new Date(date));
32
+ };
33
+ var handlePrevYear = function () { return handleMove(-12); };
34
+ var handleNextYear = function () { return handleMove(12); };
35
+ var handlePrevMonth = function () { return handleMove(-1); };
36
+ var handleNextMonth = function () { return handleMove(1); };
37
+ var handleMonth = function (month) {
38
+ date.setMonth(month);
39
+ setDate(new Date(date));
40
+ };
41
+ var handleYear = function (year) {
42
+ date.setFullYear(year);
43
+ };
44
+ return (React.createElement("div", { className: props.className, tabIndex: -1 },
45
+ React.createElement(Navbar, { date: date, onPrevYear: handlePrevYear, onNextYear: handleNextYear, onPrevMonth: handlePrevMonth, onNextMonth: handleNextMonth, onMonth: handleMonth, onYear: handleYear }),
46
+ React.createElement(Calendar, { date: date, selectedDate: props.value, nofuture: props.nofuture, onClick: handleDayClick })));
47
+ });
48
+ var Body = styled(BodyBase)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: absolute;\n z-index: 100;\n box-sizing: border-box;\n overflow-y: hidden;\n outline: none;\n width: 330px;\n\n // Transparent fill be placed over thick FieldWrapper's border.\n ", "\n\n background-color: ", ";\n border-radius: ", "px;\n color: ", ";\n\n // Body can open upwards or downwards. This affects its positioning \n // relative to the parent.\n // Transparent Dropdowns have more distance from the selector so that\n // they appear outside of the FieldWrapper.\n ", "\n ", "\n\n transition: opacity ", "ms ease-in-out,\n max-height 0ms linear ", "ms;\n max-height: 0;\n opacity: 0;\n ", "\n"], ["\n position: absolute;\n z-index: 100;\n box-sizing: border-box;\n overflow-y: hidden;\n outline: none;\n width: 330px;\n\n // Transparent fill be placed over thick FieldWrapper's border.\n ", "\n\n background-color: ", ";\n border-radius: ", "px;\n color: ", ";\n\n // Body can open upwards or downwards. This affects its positioning \n // relative to the parent.\n // Transparent Dropdowns have more distance from the selector so that\n // they appear outside of the FieldWrapper.\n ", "\n ", "\n\n transition: opacity ", "ms ease-in-out,\n max-height 0ms linear ", "ms;\n max-height: 0;\n opacity: 0;\n ", "\n"])), function (p) { return p.transparent && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["left: -2px;"], ["left: -2px;"]))); }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.upwards && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n bottom: calc(100% + ", ");\n "], ["\n bottom: calc(100% + ", ");\n "])), p.transparent ? "30px" : "8px"); }, function (p) { return !p.upwards && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n top: calc(100% + ", ");\n "], ["\n top: calc(100% + ", ");\n "])), p.transparent ? "30px" : "8px"); }, function (p) { return p.theme.animation.duration * 0; }, function (p) { return p.theme.animation.duration * 0; }, function (p) { return p.open && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n transition: opacity ", "ms ease-in,\n max-height 0ms linear;\n max-height: 1000px;\n opacity: 1;\n "], ["\n transition: opacity ", "ms ease-in,\n max-height 0ms linear;\n max-height: 1000px;\n opacity: 1;\n "])), function (p) { return p.theme.animation.duration; }); });
49
+ export { Body };
50
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /** Current date. Will be highlighted. */
6
+ date: Date;
7
+ /** Selected date. Will be highlighted. */
8
+ selectedDate: Date;
9
+ /** If set, don't allow picking days beyond today. */
10
+ nofuture?: boolean;
11
+ /** Fired when a date is clicked. */
12
+ onClick: (clickedDate: Date) => void;
13
+ }
14
+ declare const Calendar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<IProps, never>> & string & Omit<(props: IProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
15
+ export { Calendar };
@@ -0,0 +1,60 @@
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 _this = this;
6
+ import * as React from 'react';
7
+ import styled from 'styled-components';
8
+ import { Day } from './Day';
9
+ var CalendarBase = function (props) {
10
+ // Returns true if two dates are equal.
11
+ var isDateEqual = function (d1, d2) {
12
+ return (d1.getFullYear() === d2.getFullYear() &&
13
+ d1.getMonth() === d2.getMonth() &&
14
+ d1.getDate() === d2.getDate());
15
+ };
16
+ var handleClick = function (clickedDate, e) {
17
+ e.stopPropagation();
18
+ props.onClick(clickedDate);
19
+ };
20
+ // Save today's date.
21
+ var today = new Date(Date.now());
22
+ // Create a date for the first day of the month.
23
+ var start = new Date(props.date.getFullYear(), props.date.getMonth(), 1);
24
+ // Move backwards until it's a Monday.
25
+ while (start.getDay() !== 1) {
26
+ start.setDate(start.getDate() - 1);
27
+ }
28
+ // Create a date for the last day of the month.
29
+ var month = props.date.getMonth() + 1;
30
+ if (month > 12)
31
+ month = 1;
32
+ var end = new Date(props.date.getFullYear(), month, 0);
33
+ // Move forward until it's a Sunday.
34
+ while (end.getDay() !== 0) {
35
+ end.setDate(end.getDate() + 1);
36
+ }
37
+ // There should be a total of 6x7 = 42 days. If a month starts
38
+ // exactly on Sunday we may be a week short. Add days until
39
+ // there are 42.
40
+ var timeDiff = Math.abs(end.getTime() - start.getTime());
41
+ var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
42
+ for (var i = 0; i < 42 - diffDays; i++) {
43
+ end.setDate(end.getDate() + 1);
44
+ }
45
+ // Build array of days.
46
+ var days = [];
47
+ while (start.getTime() < end.getTime()) {
48
+ days.push(React.createElement(Day, { key: start.getTime(), grey: start.getMonth() != props.date.getMonth() || (props.nofuture && start > today), selected: props.selectedDate && isDateEqual(props.selectedDate, start), today: isDateEqual(today, start), day: start.getDate(), onClick: (!props.nofuture || start <= today) ? handleClick.bind(_this, new Date(start.getTime())) : null }));
49
+ start.setDate(start.getDate() + 1);
50
+ }
51
+ return (React.createElement("div", { className: props.className },
52
+ ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"].map(function (day, index) {
53
+ return React.createElement(DayName, { key: index }, day);
54
+ }),
55
+ days));
56
+ };
57
+ var DayName = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n font: ", ";\n user-select: none;\n"], ["\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n font: ", ";\n user-select: none;\n"])), function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.font.labelSmall; });
58
+ var Calendar = styled(CalendarBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n padding: 12px;\n gap: 4px;\n"], ["\n display: flex;\n flex-wrap: wrap;\n padding: 12px;\n gap: 4px;\n"])));
59
+ export { Calendar };
60
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,73 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /**
6
+ * Input name for use in forms.
7
+ */
8
+ name?: string;
9
+ /**
10
+ * Current input value.
11
+ */
12
+ value?: string | null;
13
+ /**
14
+ * Marks input as disabled. Disabled inputs cannot be interacted with.
15
+ * @default false
16
+ */
17
+ disabled?: boolean;
18
+ /**
19
+ * Removes input border and makes background transparent. This is useful
20
+ * for placing an input in a `Field`.
21
+ * @default false
22
+ */
23
+ transparent?: boolean;
24
+ /**
25
+ * A DateInput can be in a ghost state, where content is being loaded.
26
+ * @default false
27
+ */
28
+ ghost?: boolean;
29
+ /**
30
+ * A fluid Input takes up all available horizontal space available to it.
31
+ * @default false
32
+ */
33
+ fluid?: boolean;
34
+ /**
35
+ * An input can show an error state.
36
+ * @default false
37
+ */
38
+ error?: boolean;
39
+ /**
40
+ * If set, Input's value can be cleared.
41
+ * @default false
42
+ */
43
+ clearable?: boolean;
44
+ /**
45
+ * If set, date pickers do not allow picking future dates (beyond today).
46
+ * @default false
47
+ */
48
+ nofuture?: boolean;
49
+ /**
50
+ * The `DateInput` opening direction can be either fixed
51
+ * (`up` or `down`), or depend on the nearest scrolling parent: if the input
52
+ * is in the top half of the visible section of the parent, then it opens
53
+ * downward, and vice-versa. If this property is not set, then the opening
54
+ * direction is determined from the input position in the viewport.
55
+ * @default none
56
+ */
57
+ direction?: 'none' | 'up' | 'down' | 'parent';
58
+ /**
59
+ * Removes tabIndex from this input.
60
+ * @default false
61
+ */
62
+ noTabIndex?: boolean;
63
+ /**
64
+ * Listeners are notified whenever the user interacts with the Input.
65
+ */
66
+ onChange?: (value: any) => void;
67
+ /**
68
+ * Listeners are notified when the Input receives focus.
69
+ */
70
+ onFocus?: () => void;
71
+ }
72
+ declare const DateInput: ({ direction, noTabIndex, disabled, transparent, fluid, error, clearable, nofuture, ...props }: IProps) => React.JSX.Element;
73
+ export { DateInput, IProps };
@@ -0,0 +1,143 @@
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
+ import { Selector } from './Selector';
30
+ import { Body } from './Body';
31
+ import { parseISO } from 'date-fns';
32
+ var DateInputBase = function (props) {
33
+ var wrapperRef = React.useRef(null);
34
+ // Parse str into Date.
35
+ // If parsing fails, return fallback value.
36
+ var parseDate = function (str, def) {
37
+ if (str == null)
38
+ return def;
39
+ var date = parseISO(props.value);
40
+ if (isNaN(date.getDate()))
41
+ return def;
42
+ return date;
43
+ };
44
+ var _a = React.useState(function () { return parseDate(props.value, null); }), value = _a[0], setValue = _a[1];
45
+ var _b = React.useState(false), open = _b[0], setOpen = _b[1];
46
+ var _c = React.useState(false), upwards = _c[0], setUpwards = _c[1];
47
+ // Add (and remove) document-wide event listener for mousedown.
48
+ React.useEffect(function () {
49
+ document.addEventListener('mousedown', handleClickOutside);
50
+ return function () { return document.removeEventListener('mousedown', handleClickOutside); };
51
+ }, []);
52
+ //
53
+ // Handle document-wide mousedown event by closing the Selector.
54
+ // (This only happens if there actually is a Selector).
55
+ //
56
+ var handleClickOutside = function (e) {
57
+ var elem = e.target;
58
+ if (wrapperRef.current && !wrapperRef.current.contains(elem)) {
59
+ setOpen(false);
60
+ }
61
+ };
62
+ var findScrollingParentRecursive = function (node) {
63
+ var overflowY = window.getComputedStyle(node).overflowY;
64
+ if (overflowY == 'scroll' || overflowY == 'auto')
65
+ return node;
66
+ if (node.parentElement)
67
+ return findScrollingParentRecursive(node.parentElement);
68
+ return null;
69
+ };
70
+ // Return my nearest parent that's scrolling (frames are not supported). If
71
+ // no parent is found, null is returned.
72
+ var findScrollingParent = function () {
73
+ return findScrollingParentRecursive(wrapperRef.current.parentElement);
74
+ };
75
+ // Returns true if the input is in the lower half of its scrolling parent.
76
+ // (if direction === parent), or in the lower half of the viewport if no
77
+ // scrolling parent is found.
78
+ var isInLowerViewport = function () {
79
+ var scrollingParent = findScrollingParent();
80
+ if (scrollingParent == null || props.direction !== 'parent') {
81
+ return wrapperRef.current.getBoundingClientRect().top > window.innerHeight / 2;
82
+ }
83
+ else {
84
+ var myY = wrapperRef.current.getBoundingClientRect().top;
85
+ var containerY = scrollingParent.getBoundingClientRect().top;
86
+ var containerHeight = scrollingParent.getBoundingClientRect().height;
87
+ var offset = myY - containerY;
88
+ return offset > containerHeight / 2;
89
+ }
90
+ };
91
+ // Open the dropdown.
92
+ var doOpen = function () {
93
+ // Is the Dropdown below the middle of the viewport?
94
+ var below = isInLowerViewport();
95
+ // Set opening direction.
96
+ if (props.direction === 'down')
97
+ setUpwards(false);
98
+ else if (props.direction === 'up')
99
+ setUpwards(true);
100
+ else
101
+ setUpwards(below);
102
+ setOpen(true);
103
+ };
104
+ var handleChange = function (newValue) {
105
+ setValue(newValue);
106
+ if (props.onChange)
107
+ props.onChange(newValue);
108
+ };
109
+ var handleToggle = function () {
110
+ if (!open) {
111
+ doOpen();
112
+ }
113
+ else {
114
+ setOpen(false);
115
+ }
116
+ };
117
+ var handleSelect = function (newValue) {
118
+ setValue(newValue);
119
+ if (props.onChange)
120
+ props.onChange(newValue);
121
+ setOpen(false);
122
+ };
123
+ var handleKeyDown = function (e) {
124
+ if (props.disabled)
125
+ return;
126
+ if (props.ghost)
127
+ return;
128
+ if (e.key == ' ' && !open)
129
+ doOpen();
130
+ if (e.key == 'Escape' && open)
131
+ setOpen(false);
132
+ };
133
+ return (React.createElement("div", { tabIndex: -1, className: props.className, onKeyDown: handleKeyDown, ref: wrapperRef },
134
+ React.createElement(Selector, { value: value, disabled: props.disabled, ghost: props.ghost, transparent: props.transparent, error: props.error, clearable: props.clearable, noTabIndex: props.noTabIndex, onChange: handleChange, onClear: (!props.disabled && props.clearable && value != null) ? function () { return handleChange(null); } : null, onCalendar: handleToggle }),
135
+ React.createElement(Body, { ref: null, value: value, upwards: upwards, open: open, transparent: props.transparent, nofuture: props.nofuture, onSelect: handleSelect })));
136
+ };
137
+ var DateInputStyled = styled(DateInputBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n // DateInput has a minimum width.\n width: 250px;\n // A fluid DateInput occupies full horizontal width.\n ", " \n"], ["\n position: relative;\n // DateInput has a minimum width.\n width: 250px;\n // A fluid DateInput occupies full horizontal width.\n ", " \n"])), function (p) { return p.fluid && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["width: 100%;"], ["width: 100%;"]))); });
138
+ var DateInput = function (_a) {
139
+ var _b = _a.direction, direction = _b === void 0 ? 'none' : _b, _c = _a.noTabIndex, noTabIndex = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.transparent, transparent = _e === void 0 ? false : _e, _f = _a.fluid, fluid = _f === void 0 ? false : _f, _g = _a.error, error = _g === void 0 ? false : _g, _h = _a.clearable, clearable = _h === void 0 ? false : _h, _j = _a.nofuture, nofuture = _j === void 0 ? false : _j, props = __rest(_a, ["direction", "noTabIndex", "disabled", "transparent", "fluid", "error", "clearable", "nofuture"]);
140
+ return React.createElement(DateInputStyled, __assign({ direction: direction, noTabIndex: noTabIndex, disabled: disabled, transparent: transparent, fluid: fluid, error: error, clearable: clearable, nofuture: nofuture }, props));
141
+ };
142
+ export { DateInput };
143
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /**
6
+ * If set, this day not belong to the current month.
7
+ */
8
+ grey: boolean;
9
+ /**
10
+ * Is this the currently selected day?
11
+ */
12
+ selected: boolean;
13
+ /**
14
+ * Is this today?
15
+ */
16
+ today: boolean;
17
+ /**
18
+ * Day number, e.g. `17`.
19
+ */
20
+ day: number;
21
+ /**
22
+ * Triggered when Day is clicked. If this property is not set,
23
+ * then the Day will have no hover circle.
24
+ */
25
+ onClick?: () => void;
26
+ }
27
+ /**
28
+ * A `Day` is a day on the calendar. It is rendered with
29
+ * a selection circle, unless it has no `onClick` trigger set.
30
+ */
31
+ declare const Day: (props: IProps) => React.JSX.Element;
32
+ export { Day };
@@ -0,0 +1,33 @@
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
+ import * as React from 'react';
17
+ import styled, { css } from 'styled-components';
18
+ var DayBase = function (props) {
19
+ return React.createElement("div", { className: props.className, onClick: props.onClick }, props.day);
20
+ };
21
+ var DayStyled = styled(DayBase)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n // Position & size:\n position: relative;\n box-sizing: border-box;\n width: 40px;\n height: 40px;\n z-index: 0; // for selection circle at z=-1\n\n // Appearance:\n cursor: ", ";\n background-color: ", ";\n color: ", ";\n user-select: none;\n outline: none;\n font: ", ";\n\n // Content:\n display: flex;\n align-items: center;\n justify-content: center; \n\n // Unclickable days have no pointer events.\n pointer-events: ", ";\n\n // Circle (only applies to clickable dates):\n &:before {\n content: '';\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: 50%;\n opacity: 0;\n } \n\n // Grey dates do not belong to the current month.\n ", "\n\n // Highlight today's date and selected date.\n ", "\n // Selection circles only appear for \n ", "\n ", " \n\n // Hover:\n &:hover {\n color: ", ";\n &:before {\n background-color: ", ";\n opacity: 1;\n }\n }\n"], ["\n // Position & size:\n position: relative;\n box-sizing: border-box;\n width: 40px;\n height: 40px;\n z-index: 0; // for selection circle at z=-1\n\n // Appearance:\n cursor: ", ";\n background-color: ", ";\n color: ", ";\n user-select: none;\n outline: none;\n font: ", ";\n\n // Content:\n display: flex;\n align-items: center;\n justify-content: center; \n\n // Unclickable days have no pointer events.\n pointer-events: ", ";\n\n // Circle (only applies to clickable dates):\n &:before {\n content: '';\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: 50%;\n opacity: 0;\n } \n\n // Grey dates do not belong to the current month.\n ", "\n\n // Highlight today's date and selected date.\n ", "\n // Selection circles only appear for \n ", "\n ", " \n\n // Hover:\n &:hover {\n color: ", ";\n &:before {\n background-color: ", ";\n opacity: 1;\n }\n }\n"
22
+ /**
23
+ * A `Day` is a day on the calendar. It is rendered with
24
+ * a selection circle, unless it has no `onClick` trigger set.
25
+ */
26
+ ])), function (p) { return p.onClick ? 'pointer' : 'auto'; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.font.labelSmall; }, function (p) { return p.onClick ? 'all' : 'none'; }, function (p) { return p.grey && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), function (p) { return p.theme.colors.neutral[80]; }); }, function (p) { return (p.today || p.selected) && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: 700;\n "], ["\n font-weight: 700;\n "]))); }, function (p) { return p.today && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &:before {\n opacity: 1;\n background-color: ", ";\n }\n "], ["\n &:before {\n opacity: 1;\n background-color: ", ";\n }\n "])), p.theme.colors.neutral[95]); }, function (p) { return p.selected && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n &:before {\n opacity: 1;\n background-color: ", ";\n }\n "], ["\n &:before {\n opacity: 1;\n background-color: ", ";\n }\n "])), p.theme.colors.neutral[80]); }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.primary[1]; });
27
+ /**
28
+ * A `Day` is a day on the calendar. It is rendered with
29
+ * a selection circle, unless it has no `onClick` trigger set.
30
+ */
31
+ var Day = function (props) { return React.createElement(DayStyled, __assign({}, props)); };
32
+ export { Day };
33
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /**
6
+ * Current value, e.g. `2000`
7
+ */
8
+ value: number;
9
+ /**
10
+ * Minimum allowed value, e.g. `1900`
11
+ */
12
+ min: number;
13
+ /**
14
+ * Maximum allowed value, e.g. `2100`
15
+ */
16
+ max: number;
17
+ /**
18
+ * Triggered when an item is clicked.
19
+ */
20
+ onClick: (value: number) => void;
21
+ }
22
+ /**
23
+ * Shows an infinitely scrolling list of sequential numbers.
24
+ */
25
+ declare const InfiniteList: (props: IProps) => React.JSX.Element;
26
+ export { InfiniteList };