@longline/aqua-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/README.md +7 -0
  2. package/Types.d.ts +6 -0
  3. package/Types.js +5 -0
  4. package/containers/Anchor/Anchor.d.ts +63 -0
  5. package/containers/Anchor/Anchor.js +113 -0
  6. package/containers/Anchor/index.d.ts +1 -0
  7. package/containers/Anchor/index.js +1 -0
  8. package/containers/Dock/Dock.d.ts +45 -0
  9. package/containers/Dock/Dock.js +61 -0
  10. package/containers/Dock/Dockable.d.ts +60 -0
  11. package/containers/Dock/Dockable.js +98 -0
  12. package/containers/Dock/index.d.ts +2 -0
  13. package/containers/Dock/index.js +2 -0
  14. package/containers/Form/Field.d.ts +104 -0
  15. package/containers/Form/Field.js +168 -0
  16. package/containers/Form/Form.d.ts +51 -0
  17. package/containers/Form/Form.js +89 -0
  18. package/containers/Form/Validation.d.ts +212 -0
  19. package/containers/Form/Validation.js +232 -0
  20. package/containers/Form/context/FormContext.d.ts +10 -0
  21. package/containers/Form/context/FormContext.js +3 -0
  22. package/containers/Form/context/useForm.d.ts +5 -0
  23. package/containers/Form/context/useForm.js +9 -0
  24. package/containers/Form/elements/BoxWrapper.d.ts +15 -0
  25. package/containers/Form/elements/BoxWrapper.js +35 -0
  26. package/containers/Form/elements/Hint.d.ts +21 -0
  27. package/containers/Form/elements/Hint.js +15 -0
  28. package/containers/Form/elements/Label.d.ts +22 -0
  29. package/containers/Form/elements/Label.js +15 -0
  30. package/containers/Form/elements/SimpleWrapper.d.ts +15 -0
  31. package/containers/Form/elements/SimpleWrapper.js +17 -0
  32. package/containers/GlassPane/GlassPane.d.ts +36 -0
  33. package/containers/GlassPane/GlassPane.js +66 -0
  34. package/containers/GlassPane/index.d.ts +1 -0
  35. package/containers/GlassPane/index.js +1 -0
  36. package/containers/InfoBox/InfoBox.d.ts +34 -0
  37. package/containers/InfoBox/InfoBox.js +45 -0
  38. package/containers/InfoBox/elements/Content.d.ts +23 -0
  39. package/containers/InfoBox/elements/Content.js +37 -0
  40. package/containers/InfoBox/elements/Footer.d.ts +9 -0
  41. package/containers/InfoBox/elements/Footer.js +24 -0
  42. package/containers/InfoBox/elements/Header.d.ts +9 -0
  43. package/containers/InfoBox/elements/Header.js +24 -0
  44. package/containers/List/List.d.ts +45 -0
  45. package/containers/List/List.js +47 -0
  46. package/containers/List/ListCell.d.ts +13 -0
  47. package/containers/List/ListCell.js +24 -0
  48. package/containers/List/ListRow.d.ts +15 -0
  49. package/containers/List/ListRow.js +24 -0
  50. package/containers/List/index.d.ts +3 -0
  51. package/containers/List/index.js +3 -0
  52. package/containers/Tabs/Pane.d.ts +29 -0
  53. package/containers/Tabs/Pane.js +45 -0
  54. package/containers/Tabs/Tabs.d.ts +66 -0
  55. package/containers/Tabs/Tabs.js +144 -0
  56. package/controls/Chip/Chip.d.ts +35 -0
  57. package/controls/Chip/Chip.js +83 -0
  58. package/controls/Fab/Fab.d.ts +73 -0
  59. package/controls/Fab/Fab.js +94 -0
  60. package/controls/Icon/Icon.d.ts +98 -0
  61. package/controls/Icon/Icon.js +79 -0
  62. package/controls/Icon/index.d.ts +1 -0
  63. package/controls/Icon/index.js +1 -0
  64. package/controls/Key/Key.d.ts +22 -0
  65. package/controls/Key/Key.js +74 -0
  66. package/controls/Key/index.d.ts +1 -0
  67. package/controls/Key/index.js +1 -0
  68. package/controls/LinearChart/LinearChart.d.ts +31 -0
  69. package/controls/LinearChart/LinearChart.js +58 -0
  70. package/controls/ListView/Body.d.ts +8 -0
  71. package/controls/ListView/Body.js +24 -0
  72. package/controls/ListView/Column.d.ts +55 -0
  73. package/controls/ListView/Column.js +8 -0
  74. package/controls/ListView/ColumnsManager/ColumnDraggable.d.ts +11 -0
  75. package/controls/ListView/ColumnsManager/ColumnDraggable.js +83 -0
  76. package/controls/ListView/ColumnsManager/ColumnsManager.d.ts +12 -0
  77. package/controls/ListView/ColumnsManager/ColumnsManager.js +63 -0
  78. package/controls/ListView/ColumnsManager/OrderColumns.d.ts +11 -0
  79. package/controls/ListView/ColumnsManager/OrderColumns.js +62 -0
  80. package/controls/ListView/ColumnsManager/SourceColumns.d.ts +10 -0
  81. package/controls/ListView/ColumnsManager/SourceColumns.js +45 -0
  82. package/controls/ListView/Ghost.d.ts +9 -0
  83. package/controls/ListView/Ghost.js +52 -0
  84. package/controls/ListView/Header.d.ts +12 -0
  85. package/controls/ListView/Header.js +35 -0
  86. package/controls/ListView/HeaderButton.d.ts +8 -0
  87. package/controls/ListView/HeaderButton.js +8 -0
  88. package/controls/ListView/HeaderCell.d.ts +20 -0
  89. package/controls/ListView/HeaderCell.js +47 -0
  90. package/controls/ListView/IListViewProps.d.ts +105 -0
  91. package/controls/ListView/IListViewProps.js +1 -0
  92. package/controls/ListView/ListView.d.ts +20 -0
  93. package/controls/ListView/ListView.js +97 -0
  94. package/controls/ListView/NoData.d.ts +19 -0
  95. package/controls/ListView/NoData.js +30 -0
  96. package/controls/ListView/SortButton.d.ts +16 -0
  97. package/controls/ListView/SortButton.js +26 -0
  98. package/controls/ListView/Table.d.ts +18 -0
  99. package/controls/ListView/Table.js +99 -0
  100. package/controls/ListView/Total.d.ts +9 -0
  101. package/controls/ListView/Total.js +28 -0
  102. package/controls/ListView/sortItems.d.ts +6 -0
  103. package/controls/ListView/sortItems.js +35 -0
  104. package/controls/Mouse/Mouse.d.ts +38 -0
  105. package/controls/Mouse/Mouse.js +51 -0
  106. package/controls/Mouse/index.d.ts +1 -0
  107. package/controls/Mouse/index.js +1 -0
  108. package/controls/PrimaryButton/PrimaryButton.d.ts +63 -0
  109. package/controls/PrimaryButton/PrimaryButton.js +83 -0
  110. package/controls/PrimaryButton/index.d.ts +1 -0
  111. package/controls/PrimaryButton/index.js +1 -0
  112. package/controls/Progress/Progress.d.ts +35 -0
  113. package/controls/Progress/Progress.js +49 -0
  114. package/controls/SecondaryButton/SecondaryButton.d.ts +58 -0
  115. package/controls/SecondaryButton/SecondaryButton.js +73 -0
  116. package/controls/SecondaryButton/index.d.ts +1 -0
  117. package/controls/SecondaryButton/index.js +1 -0
  118. package/controls/TabBar/Tab.d.ts +21 -0
  119. package/controls/TabBar/Tab.js +25 -0
  120. package/controls/TabBar/TabBar.d.ts +34 -0
  121. package/controls/TabBar/TabBar.js +134 -0
  122. package/controls/TabBar/Underliner.d.ts +7 -0
  123. package/controls/TabBar/Underliner.js +27 -0
  124. package/controls/TabBar/index.d.ts +1 -0
  125. package/controls/TabBar/index.js +1 -0
  126. package/controls/TertiaryButton/TertiaryButton.d.ts +28 -0
  127. package/controls/TertiaryButton/TertiaryButton.js +65 -0
  128. package/controls/TertiaryButton/index.d.ts +1 -0
  129. package/controls/TertiaryButton/index.js +1 -0
  130. package/controls/View/View.d.ts +35 -0
  131. package/controls/View/View.js +58 -0
  132. package/formatters/Date/DateTime.d.ts +45 -0
  133. package/formatters/Date/DateTime.js +64 -0
  134. package/formatters/Date/elements/Custom.d.ts +18 -0
  135. package/formatters/Date/elements/Custom.js +22 -0
  136. package/formatters/Date/elements/Distance.d.ts +24 -0
  137. package/formatters/Date/elements/Distance.js +45 -0
  138. package/formatters/Date/elements/LongDate.d.ts +17 -0
  139. package/formatters/Date/elements/LongDate.js +11 -0
  140. package/formatters/Date/elements/LongDateTime.d.ts +14 -0
  141. package/formatters/Date/elements/LongDateTime.js +10 -0
  142. package/formatters/Date/elements/LongTime.d.ts +14 -0
  143. package/formatters/Date/elements/LongTime.js +10 -0
  144. package/formatters/Date/elements/ShortDate.d.ts +14 -0
  145. package/formatters/Date/elements/ShortDate.js +10 -0
  146. package/formatters/Date/elements/ShortDateTime.d.ts +14 -0
  147. package/formatters/Date/elements/ShortDateTime.js +10 -0
  148. package/formatters/Date/elements/ShortTime.d.ts +18 -0
  149. package/formatters/Date/elements/ShortTime.js +10 -0
  150. package/formatters/Date/elements/toDate.d.ts +2 -0
  151. package/formatters/Date/elements/toDate.js +13 -0
  152. package/formatters/Filesize/Filesize.d.ts +29 -0
  153. package/formatters/Filesize/Filesize.js +54 -0
  154. package/formatters/GIS/Latitude.d.ts +23 -0
  155. package/formatters/GIS/Latitude.js +13 -0
  156. package/formatters/GIS/Longitude.d.ts +23 -0
  157. package/formatters/GIS/Longitude.js +13 -0
  158. package/formatters/GIS/index.d.ts +2 -0
  159. package/formatters/GIS/index.js +2 -0
  160. package/formatters/GIS/toDMS.d.ts +2 -0
  161. package/formatters/GIS/toDMS.js +16 -0
  162. package/formatters/Highlight/Highlight.d.ts +22 -0
  163. package/formatters/Highlight/Highlight.js +32 -0
  164. package/formatters/Highlight/index.d.ts +1 -0
  165. package/formatters/Highlight/index.js +1 -0
  166. package/formatters/Human/Human.d.ts +18 -0
  167. package/formatters/Human/Human.js +34 -0
  168. package/formatters/Human/index.d.ts +1 -0
  169. package/formatters/Human/index.js +1 -0
  170. package/formatters/Number/Number.d.ts +24 -0
  171. package/formatters/Number/Number.js +36 -0
  172. package/formatters/Number/index.d.ts +1 -0
  173. package/formatters/Number/index.js +1 -0
  174. package/helper/DMS.d.ts +22 -0
  175. package/helper/DMS.js +46 -0
  176. package/helper/HslColor.d.ts +11 -0
  177. package/helper/HslColor.js +47 -0
  178. package/helper/RgbColor.d.ts +43 -0
  179. package/helper/RgbColor.js +162 -0
  180. package/helper/SizeHelper.d.ts +10 -0
  181. package/helper/SizeHelper.js +56 -0
  182. package/helper/darken.d.ts +8 -0
  183. package/helper/darken.js +18 -0
  184. package/helper/guard.d.ts +5 -0
  185. package/helper/guard.js +7 -0
  186. package/helper/lighten.d.ts +8 -0
  187. package/helper/lighten.js +11 -0
  188. package/helper/nameToHex.d.ts +6 -0
  189. package/helper/nameToHex.js +163 -0
  190. package/inputs/DateInput/Body.d.ts +34 -0
  191. package/inputs/DateInput/Body.js +50 -0
  192. package/inputs/DateInput/Calendar.d.ts +15 -0
  193. package/inputs/DateInput/Calendar.js +60 -0
  194. package/inputs/DateInput/DateInput.d.ts +73 -0
  195. package/inputs/DateInput/DateInput.js +143 -0
  196. package/inputs/DateInput/Day.d.ts +32 -0
  197. package/inputs/DateInput/Day.js +33 -0
  198. package/inputs/DateInput/InfiniteList.d.ts +26 -0
  199. package/inputs/DateInput/InfiniteList.js +87 -0
  200. package/inputs/DateInput/Nav.d.ts +11 -0
  201. package/inputs/DateInput/Nav.js +24 -0
  202. package/inputs/DateInput/Navbar.d.ts +16 -0
  203. package/inputs/DateInput/Navbar.js +33 -0
  204. package/inputs/DateInput/NumericInput.d.ts +14 -0
  205. package/inputs/DateInput/NumericInput.js +48 -0
  206. package/inputs/DateInput/Selector.d.ts +47 -0
  207. package/inputs/DateInput/Selector.js +55 -0
  208. package/inputs/DateInput/SimpleList.d.ts +19 -0
  209. package/inputs/DateInput/SimpleList.js +31 -0
  210. package/inputs/Dropdown/Body.d.ts +25 -0
  211. package/inputs/Dropdown/Body.js +14 -0
  212. package/inputs/Dropdown/Column.d.ts +21 -0
  213. package/inputs/Dropdown/Column.js +6 -0
  214. package/inputs/Dropdown/Dropdown.d.ts +136 -0
  215. package/inputs/Dropdown/Dropdown.js +446 -0
  216. package/inputs/Dropdown/Selection.d.ts +11 -0
  217. package/inputs/Dropdown/Selection.js +23 -0
  218. package/inputs/Dropdown/Selector.d.ts +29 -0
  219. package/inputs/Dropdown/Selector.js +16 -0
  220. package/inputs/Editor/Editor.d.ts +45 -0
  221. package/inputs/Editor/Editor.js +60 -0
  222. package/inputs/Editor/buttons/BoldButton.d.ts +7 -0
  223. package/inputs/Editor/buttons/BoldButton.js +7 -0
  224. package/inputs/Editor/buttons/BulletListButton.d.ts +7 -0
  225. package/inputs/Editor/buttons/BulletListButton.js +7 -0
  226. package/inputs/Editor/buttons/CodeBlockButton.d.ts +7 -0
  227. package/inputs/Editor/buttons/CodeBlockButton.js +7 -0
  228. package/inputs/Editor/buttons/CodeButton.d.ts +7 -0
  229. package/inputs/Editor/buttons/CodeButton.js +7 -0
  230. package/inputs/Editor/buttons/ItalicButton.d.ts +7 -0
  231. package/inputs/Editor/buttons/ItalicButton.js +7 -0
  232. package/inputs/Editor/buttons/OrderedListButton.d.ts +7 -0
  233. package/inputs/Editor/buttons/OrderedListButton.js +7 -0
  234. package/inputs/Editor/buttons/StrikethroughButton.d.ts +7 -0
  235. package/inputs/Editor/buttons/StrikethroughButton.js +7 -0
  236. package/inputs/Editor/menu/MenuBar.d.ts +9 -0
  237. package/inputs/Editor/menu/MenuBar.js +44 -0
  238. package/inputs/Editor/menu/MenuButton.d.ts +35 -0
  239. package/inputs/Editor/menu/MenuButton.js +34 -0
  240. package/inputs/Editor/menu/MenuSeparator.d.ts +7 -0
  241. package/inputs/Editor/menu/MenuSeparator.js +24 -0
  242. package/inputs/Input/Clear.d.ts +7 -0
  243. package/inputs/Input/Clear.js +14 -0
  244. package/inputs/Input/Input.d.ts +133 -0
  245. package/inputs/Input/Input.js +64 -0
  246. package/inputs/Input/InputWrapper.d.ts +23 -0
  247. package/inputs/Input/InputWrapper.js +57 -0
  248. package/inputs/Input/index.d.ts +1 -0
  249. package/inputs/Input/index.js +1 -0
  250. package/inputs/Selector/ISelectorProps.d.ts +29 -0
  251. package/inputs/Selector/ISelectorProps.js +1 -0
  252. package/inputs/Selector/Selector.d.ts +29 -0
  253. package/inputs/Selector/Selector.js +77 -0
  254. package/inputs/Selector/index.d.ts +1 -0
  255. package/inputs/Selector/index.js +1 -0
  256. package/inputs/Selector/widgets/Checkbox.d.ts +6 -0
  257. package/inputs/Selector/widgets/Checkbox.js +29 -0
  258. package/inputs/Selector/widgets/Toggle.d.ts +6 -0
  259. package/inputs/Selector/widgets/Toggle.js +24 -0
  260. package/inputs/Slider/Slider.d.ts +63 -0
  261. package/inputs/Slider/Slider.js +198 -0
  262. package/inputs/Textarea/Textarea.d.ts +79 -0
  263. package/inputs/Textarea/Textarea.js +65 -0
  264. package/main.js +32 -0
  265. package/map/Map/Map.d.ts +47 -0
  266. package/map/Map/Map.js +221 -0
  267. package/map/Map/index.d.ts +1 -0
  268. package/map/Map/index.js +1 -0
  269. package/map/PositionsManager/PositionBox.d.ts +14 -0
  270. package/map/PositionsManager/PositionBox.js +86 -0
  271. package/map/PositionsManager/PositionsManager.d.ts +27 -0
  272. package/map/PositionsManager/PositionsManager.js +99 -0
  273. package/map/controls/CompassButton/CompassButton.d.ts +33 -0
  274. package/map/controls/CompassButton/CompassButton.js +88 -0
  275. package/map/controls/FullscreenButton/FullscreenButton.d.ts +21 -0
  276. package/map/controls/FullscreenButton/FullscreenButton.js +62 -0
  277. package/map/controls/Geocoder/Geocoder.d.ts +49 -0
  278. package/map/controls/Geocoder/Geocoder.js +179 -0
  279. package/map/controls/Geocoder/GeocoderApi.d.ts +59 -0
  280. package/map/controls/Geocoder/GeocoderApi.js +68 -0
  281. package/map/controls/Geocoder/GeocoderEntry.d.ts +15 -0
  282. package/map/controls/Geocoder/GeocoderEntry.js +18 -0
  283. package/map/controls/Geocoder/GeocoderList.d.ts +10 -0
  284. package/map/controls/Geocoder/GeocoderList.js +18 -0
  285. package/map/controls/Geocoder/GeocoderSelector.d.ts +16 -0
  286. package/map/controls/Geocoder/GeocoderSelector.js +25 -0
  287. package/map/controls/Graticule/Graticule.d.ts +35 -0
  288. package/map/controls/Graticule/Graticule.js +142 -0
  289. package/map/controls/MapLoader/MapLoader.d.ts +33 -0
  290. package/map/controls/MapLoader/MapLoader.js +73 -0
  291. package/map/controls/ScaleControl/ScaleControl.d.ts +24 -0
  292. package/map/controls/ScaleControl/ScaleControl.js +107 -0
  293. package/map/controls/ZoomInButton/ZoomInButton.d.ts +19 -0
  294. package/map/controls/ZoomInButton/ZoomInButton.js +56 -0
  295. package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +19 -0
  296. package/map/controls/ZoomOutButton/ZoomOutButton.js +56 -0
  297. package/map/controls/base/MapButton/Hint.d.ts +17 -0
  298. package/map/controls/base/MapButton/Hint.js +34 -0
  299. package/map/controls/base/MapButton/MapButton.d.ts +46 -0
  300. package/map/controls/base/MapButton/MapButton.js +71 -0
  301. package/map/controls/base/MapButton/index.d.ts +1 -0
  302. package/map/controls/base/MapButton/index.js +1 -0
  303. package/map/controls/base/MapButtonGroup/MapButtonGroup.d.ts +17 -0
  304. package/map/controls/base/MapButtonGroup/MapButtonGroup.js +24 -0
  305. package/map/controls/base/MapControl/MapControl.d.ts +36 -0
  306. package/map/controls/base/MapControl/MapControl.js +77 -0
  307. package/map/controls/base/MapControl/index.d.ts +1 -0
  308. package/map/controls/base/MapControl/index.js +1 -0
  309. package/map/layers/ClusterLayer/ClusterLayer.d.ts +79 -0
  310. package/map/layers/ClusterLayer/ClusterLayer.js +118 -0
  311. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.d.ts +51 -0
  312. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +151 -0
  313. package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +2 -0
  314. package/map/layers/InterpolationLayer/ContoursFragmentShader.js +2 -0
  315. package/map/layers/InterpolationLayer/ContoursVertexShader.d.ts +2 -0
  316. package/map/layers/InterpolationLayer/ContoursVertexShader.js +2 -0
  317. package/map/layers/InterpolationLayer/IGradientStop.d.ts +5 -0
  318. package/map/layers/InterpolationLayer/IGradientStop.js +1 -0
  319. package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +35 -0
  320. package/map/layers/InterpolationLayer/InterpolationLayer.js +256 -0
  321. package/map/layers/InterpolationLayer/LevelsFragmentShader.d.ts +2 -0
  322. package/map/layers/InterpolationLayer/LevelsFragmentShader.js +2 -0
  323. package/map/layers/InterpolationLayer/LevelsVertexShader.d.ts +2 -0
  324. package/map/layers/InterpolationLayer/LevelsVertexShader.js +2 -0
  325. package/map/layers/ParticlesLayer/ParticlesFragmentShader.d.ts +2 -0
  326. package/map/layers/ParticlesLayer/ParticlesFragmentShader.js +2 -0
  327. package/map/layers/ParticlesLayer/ParticlesLayer.d.ts +40 -0
  328. package/map/layers/ParticlesLayer/ParticlesLayer.js +337 -0
  329. package/map/layers/ParticlesLayer/ParticlesVertexShader.d.ts +2 -0
  330. package/map/layers/ParticlesLayer/ParticlesVertexShader.js +2 -0
  331. package/map/layers/ParticlesLayer/UVFragmentShader.d.ts +2 -0
  332. package/map/layers/ParticlesLayer/UVFragmentShader.js +2 -0
  333. package/map/layers/ParticlesLayer/UVVertexShader.d.ts +2 -0
  334. package/map/layers/ParticlesLayer/UVVertexShader.js +2 -0
  335. package/map/markers/ClusterMarker/ClusterMarker.d.ts +36 -0
  336. package/map/markers/ClusterMarker/ClusterMarker.js +99 -0
  337. package/map/markers/ClusterMarker/index.d.ts +1 -0
  338. package/map/markers/ClusterMarker/index.js +1 -0
  339. package/map/markers/RiskMarker/RiskMarker.d.ts +22 -0
  340. package/map/markers/RiskMarker/RiskMarker.js +61 -0
  341. package/modules/MainMenu/Item.d.ts +42 -0
  342. package/modules/MainMenu/Item.js +94 -0
  343. package/modules/MainMenu/MainMenu.d.ts +20 -0
  344. package/modules/MainMenu/MainMenu.js +41 -0
  345. package/modules/MainMenu/index.d.ts +1 -0
  346. package/modules/MainMenu/index.js +1 -0
  347. package/modules/Root/Content.d.ts +16 -0
  348. package/modules/Root/Content.js +25 -0
  349. package/modules/Root/Overlay.d.ts +23 -0
  350. package/modules/Root/Overlay.js +33 -0
  351. package/modules/Root/Root.d.ts +7 -0
  352. package/modules/Root/Root.js +45 -0
  353. package/modules/Root/Shader.d.ts +15 -0
  354. package/modules/Root/Shader.js +24 -0
  355. package/modules/Root/Sidebar.d.ts +13 -0
  356. package/modules/Root/Sidebar.js +24 -0
  357. package/modules/Root/stories/SampleContent.d.ts +7 -0
  358. package/modules/Root/stories/SampleContent.js +44 -0
  359. package/package.json +64 -0
  360. package/services/Dialog/AlertDialog.d.ts +31 -0
  361. package/services/Dialog/AlertDialog.js +29 -0
  362. package/services/Dialog/ConfirmDialog.d.ts +34 -0
  363. package/services/Dialog/ConfirmDialog.js +30 -0
  364. package/services/Dialog/Dialog.d.ts +91 -0
  365. package/services/Dialog/Dialog.js +92 -0
  366. package/services/Dialog/DialogBackground.d.ts +7 -0
  367. package/services/Dialog/DialogBackground.js +12 -0
  368. package/services/Dialog/DialogContent.d.ts +25 -0
  369. package/services/Dialog/DialogContent.js +38 -0
  370. package/services/Dialog/DialogFooter.d.ts +24 -0
  371. package/services/Dialog/DialogFooter.js +50 -0
  372. package/services/Dialog/DialogHeader.d.ts +18 -0
  373. package/services/Dialog/DialogHeader.js +36 -0
  374. package/services/Dialog/DialogWindow.d.ts +13 -0
  375. package/services/Dialog/DialogWindow.js +12 -0
  376. package/services/Dialog/XhrDialog.d.ts +34 -0
  377. package/services/Dialog/XhrDialog.js +321 -0
  378. package/services/Toast/IToastMessage.d.ts +10 -0
  379. package/services/Toast/IToastMessage.js +1 -0
  380. package/services/Toast/IToastProps.d.ts +23 -0
  381. package/services/Toast/IToastProps.js +1 -0
  382. package/services/Toast/Toast.d.ts +21 -0
  383. package/services/Toast/Toast.js +79 -0
  384. package/services/Toast/ToastContainer.d.ts +40 -0
  385. package/services/Toast/ToastContainer.js +65 -0
  386. package/services/Toast/ToastContext.d.ts +22 -0
  387. package/services/Toast/ToastContext.js +7 -0
  388. package/services/Toast/ToastProvider.d.ts +19 -0
  389. package/services/Toast/ToastProvider.js +67 -0
  390. package/services/Toast/index.d.ts +2 -0
  391. package/services/Toast/index.js +2 -0
  392. package/services/Toast/useToast.d.ts +5 -0
  393. package/services/Toast/useToast.js +9 -0
  394. package/spritemap.svg +1 -0
  395. package/styles/NormalTheme.d.ts +3 -0
  396. package/styles/NormalTheme.js +65 -0
  397. package/styles/StyleBase.d.ts +2 -0
  398. package/styles/StyleBase.js +8 -0
  399. package/styles/StyleReset.d.ts +2 -0
  400. package/styles/StyleReset.js +8 -0
  401. package/svg/editor/index.d.ts +10 -0
  402. package/svg/editor/index.js +11 -0
  403. package/svg/file/index.d.ts +5 -0
  404. package/svg/file/index.js +6 -0
  405. package/svg/icons/index.d.ts +36 -0
  406. package/svg/icons/index.js +37 -0
  407. package/svg/index.d.ts +11 -0
  408. package/svg/index.js +5 -0
  409. package/svg/menu/index.d.ts +8 -0
  410. package/svg/menu/index.js +9 -0
@@ -0,0 +1,83 @@
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 { SVG } from '../../svg';
30
+ var ChipBase = function (props) {
31
+ var handleKeyDown = function (e) {
32
+ if (props.disabled)
33
+ return;
34
+ if (e.key == 'Delete') {
35
+ e.stopPropagation();
36
+ if (props.onClick)
37
+ props.onClick();
38
+ }
39
+ };
40
+ return (
41
+ // "".chip" class is used, in the CSS, to check whether the previous
42
+ // sibling is also a Chip.
43
+ React.createElement("div", { className: "".concat(props.className, " chip"), tabIndex: 0, onKeyDown: handleKeyDown },
44
+ React.createElement("div", { tabIndex: -1 }, props.children),
45
+ React.createElement("svg", { onClick: props.onClick },
46
+ React.createElement("use", { xlinkHref: SVG.Icons.Cross }))));
47
+ };
48
+ var ChipStyled = styled(ChipBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Dimensions:\n min-width: 80px;\n max-width: 150px;\n width: auto;\n height: 24px;\n padding: 0 3px 0 12px;\n\n // Appearance:\n background-color: ", ";\n border: none;\n color: ", ";\n border-radius: 12px;\n user-select: none;\n outline: none;\n\n display: inline-flex;\n align-items: center;\n gap: 4px; // Gap between content and \"X\".\n margin-right: 2px; \n\n // Spacing from previous Chip.\n .chip + & {\n margin-left: 2px;\n }\n\n font: ", ";\n\n & > div {\n flex: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n }\n\n & > svg {\n transition: fill ", "ms ease-in-out,\n background-color ", "ms ease-in-out;\n fill: ", ";\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n padding: 2px;\n border-radius: 50%;\n cursor: pointer;\n }\n\n &:focus {\n outline: solid 2px ", ";;\n }\n\n // When Chip is hovered, svg is colored.\n &:hover {\n & > svg {\n background-color: ", ";\n fill: ", ";\n }\n }\n\n & > svg:active {\n background-color: ", ";\n fill: ", ";\n }\n\n ", "\n"], ["\n // Dimensions:\n min-width: 80px;\n max-width: 150px;\n width: auto;\n height: 24px;\n padding: 0 3px 0 12px;\n\n // Appearance:\n background-color: ", ";\n border: none;\n color: ", ";\n border-radius: 12px;\n user-select: none;\n outline: none;\n\n display: inline-flex;\n align-items: center;\n gap: 4px; // Gap between content and \"X\".\n margin-right: 2px; \n\n // Spacing from previous Chip.\n .chip + & {\n margin-left: 2px;\n }\n\n font: ", ";\n\n & > div {\n flex: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n }\n\n & > svg {\n transition: fill ", "ms ease-in-out,\n background-color ", "ms ease-in-out;\n fill: ", ";\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n padding: 2px;\n border-radius: 50%;\n cursor: pointer;\n }\n\n &:focus {\n outline: solid 2px ", ";;\n }\n\n // When Chip is hovered, svg is colored.\n &:hover {\n & > svg {\n background-color: ", ";\n fill: ", ";\n }\n }\n\n & > svg:active {\n background-color: ", ";\n fill: ", ";\n }\n\n ", "\n"
49
+ /**
50
+ * A set of `Chip` instances show consecutive user inputs and are individually
51
+ * deselected. The "X" on a `Chip` is clickable. A `Chip` can have keyboard focus:
52
+ * when `Delete` is pressed, `onClick` is triggered.
53
+ *
54
+ * A `Chip` has a slight left margin to offset it from the preceding `Chip` in a
55
+ * set. This margin is only applied between `Chip` siblings.
56
+ *
57
+ * Chips have a minimum width and maximum width. Content that exceeds the
58
+ * maximum width is ellipsized. If `verticalAlign` is specified, then the contents
59
+ * of the `Chip` are aligned with flexbox. This is necessary when the chip label
60
+ * is not a string but JSX. If `verticalAlign` is enabled, the Chip
61
+ * content is no longer ellipsized.
62
+ */
63
+ ])), function (p) { return p.theme.colors.primary[5]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.font.labelSmall; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.colors.neutral[50]; }, function (p) { return p.theme.colors.primary[1]; }, function (p) { return p.theme.colors.primary[2]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.primary[1]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: none;\n cursor: auto;\n background-color: ", ";\n color: ", ";\n & > svg {\n fill: ", ";\n }\n "], ["\n pointer-events: none;\n cursor: auto;\n background-color: ", ";\n color: ", ";\n & > svg {\n fill: ", ";\n }\n "])), function (p) { return p.theme.colors.neutral[50]; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.colors.primary[3]; }); });
64
+ /**
65
+ * A set of `Chip` instances show consecutive user inputs and are individually
66
+ * deselected. The "X" on a `Chip` is clickable. A `Chip` can have keyboard focus:
67
+ * when `Delete` is pressed, `onClick` is triggered.
68
+ *
69
+ * A `Chip` has a slight left margin to offset it from the preceding `Chip` in a
70
+ * set. This margin is only applied between `Chip` siblings.
71
+ *
72
+ * Chips have a minimum width and maximum width. Content that exceeds the
73
+ * maximum width is ellipsized. If `verticalAlign` is specified, then the contents
74
+ * of the `Chip` are aligned with flexbox. This is necessary when the chip label
75
+ * is not a string but JSX. If `verticalAlign` is enabled, the Chip
76
+ * content is no longer ellipsized.
77
+ */
78
+ var Chip = function (_a) {
79
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, props = __rest(_a, ["disabled"]);
80
+ return React.createElement(ChipStyled, __assign({ disabled: disabled }, props));
81
+ };
82
+ export { Chip };
83
+ 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
+ * Button content. Can be JSX.
7
+ */
8
+ children?: React.ReactNode;
9
+ /**
10
+ * Path to an SVG symbol, e.g. `/sprites.svg#close`. The `SVG` enumeration
11
+ * exists that offers preset paths.
12
+ */
13
+ icon: string;
14
+ /**
15
+ * A disabled button cannot be interacted with. This is implemented using
16
+ * `pointer-events: none`.
17
+ * @default false
18
+ */
19
+ disabled?: boolean;
20
+ /**
21
+ * Optional browser tooltip to show when the button is hovered.
22
+ */
23
+ title?: string;
24
+ /**
25
+ * A `positive` button will have an _icon_ color that indicates a _positive
26
+ * consequence_, taken from the theme (usually a shade of green).
27
+ * @default false
28
+ */
29
+ positive?: boolean;
30
+ /**
31
+ * A `negative` button will have an _icon_ color that indicates a _negative
32
+ * consequence_, taken from the theme (usually a shade of red).
33
+ * @default false
34
+ */
35
+ negative?: boolean;
36
+ /**
37
+ * `color` can be used to set a custom _icon_ color. This is only used
38
+ * if `positive` and `negative` are not present. The color is a valid
39
+ * CSS color value, e.g. `rgba(100,100,100,200)`.
40
+ */
41
+ color?: string;
42
+ /**
43
+ * A button in an `active` state is shown as depressed. This will override
44
+ * any color settings.
45
+ * @default false
46
+ */
47
+ active?: boolean;
48
+ /**
49
+ * Fired when the button is clicked.
50
+ */
51
+ onClick: () => void;
52
+ }
53
+ /**
54
+ * Floating action buttons (FABs) help people take primary ations and are used
55
+ * to represent the most important action on a screen. A FAB renders as a
56
+ * `<button>` element.
57
+ *
58
+ * FABs always have an icon, but other button content is optional. The optional
59
+ * button content is usually a string, but may be any React component.
60
+ * The icon symbol path is passed in as a property.
61
+ *
62
+ * #### Colors
63
+ * The FAB surface and text always have the same color, but the icon has
64
+ * four options: `positive` (theme-dependent, usually a shade of green),
65
+ * `negative` (theme-dependent, usually a shade of red), custom, and themed
66
+ * (the default).
67
+ *
68
+ * #### States
69
+ * * The FAB can be in a `disabled` state where it cannot be clicked.
70
+ * * The FAB can be in an `active` state where it appears depressed.
71
+ */
72
+ declare const Fab: ({ disabled, positive, negative, active, ...props }: IProps) => React.JSX.Element;
73
+ export { Fab, IProps };
@@ -0,0 +1,94 @@
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 FabBase = function (props) {
30
+ var handleClick = function () {
31
+ if (props.disabled)
32
+ return;
33
+ if (props.onClick)
34
+ props.onClick();
35
+ };
36
+ return (React.createElement("button", { tabIndex: props.disabled ? -1 : 0, className: props.className, onClick: handleClick, title: props.title },
37
+ React.createElement("svg", null,
38
+ React.createElement("use", { xlinkHref: props.icon })),
39
+ props.children));
40
+ };
41
+ var FabStyled = styled(FabBase).attrs(function (p) {
42
+ return {
43
+ iconColor: p.disabled ? p.theme.colors.primary[2]
44
+ : p.positive ? p.theme.colors.positive
45
+ : p.negative ? p.theme.colors.negative
46
+ : p.color ? p.color
47
+ : p.theme.colors.primary[3]
48
+ };
49
+ })(templateObject_4 || (templateObject_4 = __makeTemplateObject([" \n // Size:\n height: 56px;\n padding-left: 16px;\n padding-right: 16px;\n\n // Font:\n font: ", ";\n color: ", ";\n\n // Presentation:\n background-color: ", ";\n transition: \n background-color ease-in-out ", "ms, \n box-shadow ease-in-out ", "ms, \n color ease-in-out ", "ms;\n border-radius: ", "px;\n border: none;\n cursor: pointer;\n user-select: none;\n outline: none;\n box-shadow: ", ";\n\n ", "\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: start;\n align-items: center;\n white-space: nowrap;\n flex-wrap: nowrap;\n gap: 12px;\n\n svg {\n fill: ", ";\n width: 24px !important;\n max-width: 24px;\n height: 24px !important;\n max-height: 24px;\n } \n\n // Special active state overrides other states:\n ", "\n\n ", "\n"], [" \n // Size:\n height: 56px;\n padding-left: 16px;\n padding-right: 16px;\n\n // Font:\n font: ", ";\n color: ", ";\n\n // Presentation:\n background-color: ", ";\n transition: \n background-color ease-in-out ", "ms, \n box-shadow ease-in-out ", "ms, \n color ease-in-out ", "ms;\n border-radius: ", "px;\n border: none;\n cursor: pointer;\n user-select: none;\n outline: none;\n box-shadow: ", ";\n\n ", "\n\n &:focus {\n outline: solid 2px ", ";\n }\n\n // Content alignment:\n display: flex;\n flex-direction: row;\n justify-content: start;\n align-items: center;\n white-space: nowrap;\n flex-wrap: nowrap;\n gap: 12px;\n\n svg {\n fill: ", ";\n width: 24px !important;\n max-width: 24px;\n height: 24px !important;\n max-height: 24px;\n } \n\n // Special active state overrides other states:\n ", "\n\n ", "\n"
50
+ /**
51
+ * Floating action buttons (FABs) help people take primary ations and are used
52
+ * to represent the most important action on a screen. A FAB renders as a
53
+ * `<button>` element.
54
+ *
55
+ * FABs always have an icon, but other button content is optional. The optional
56
+ * button content is usually a string, but may be any React component.
57
+ * The icon symbol path is passed in as a property.
58
+ *
59
+ * #### Colors
60
+ * The FAB surface and text always have the same color, but the icon has
61
+ * four options: `positive` (theme-dependent, usually a shade of green),
62
+ * `negative` (theme-dependent, usually a shade of red), custom, and themed
63
+ * (the default).
64
+ *
65
+ * #### States
66
+ * * The FAB can be in a `disabled` state where it cannot be clicked.
67
+ * * The FAB can be in an `active` state where it appears depressed.
68
+ */
69
+ ])), function (p) { return p.theme.font.labelLarge; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.colors.neutral[95]; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.radius.strong; }, function (p) { return p.theme.shadows.medium; }, function (p) { return !p.active && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n box-shadow: ", ";\n }\n &:active {\n background-color: ", ";\n box-shadow: none;\n }\n "], ["\n &:hover {\n background-color: ", ";\n box-shadow: ", ";\n }\n &:active {\n background-color: ", ";\n box-shadow: none;\n }\n "])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.shadows.large; }, function (p) { return p.theme.colors.neutral[100]; }); }, function (p) { return p.theme.colors.primary[1]; }, function (p) { return p.iconColor; }, function (p) { return p.active && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n svg { fill: ", "; }\n box-shadow: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n svg { fill: ", "; }\n box-shadow: ", ";\n "])), p.theme.colors.primary[4], p.theme.colors.accent, p.theme.colors.accent, p.theme.shadows.inner); }, function (p) { return p.disabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n cursor: auto;\n pointer-events: none;\n color: ", ";\n background-color: ", ";\n box-shadow: none;\n svg {\n fill: ", ";\n }\n "], ["\n cursor: auto;\n pointer-events: none;\n color: ", ";\n background-color: ", ";\n box-shadow: none;\n svg {\n fill: ", ";\n }\n "])), p.theme.colors.primary[3], p.theme.colors.neutral[50], p.theme.colors.primary[3]); });
70
+ /**
71
+ * Floating action buttons (FABs) help people take primary ations and are used
72
+ * to represent the most important action on a screen. A FAB renders as a
73
+ * `<button>` element.
74
+ *
75
+ * FABs always have an icon, but other button content is optional. The optional
76
+ * button content is usually a string, but may be any React component.
77
+ * The icon symbol path is passed in as a property.
78
+ *
79
+ * #### Colors
80
+ * The FAB surface and text always have the same color, but the icon has
81
+ * four options: `positive` (theme-dependent, usually a shade of green),
82
+ * `negative` (theme-dependent, usually a shade of red), custom, and themed
83
+ * (the default).
84
+ *
85
+ * #### States
86
+ * * The FAB can be in a `disabled` state where it cannot be clicked.
87
+ * * The FAB can be in an `active` state where it appears depressed.
88
+ */
89
+ var Fab = function (_a) {
90
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.positive, positive = _c === void 0 ? false : _c, _d = _a.negative, negative = _d === void 0 ? false : _d, _e = _a.active, active = _e === void 0 ? false : _e, props = __rest(_a, ["disabled", "positive", "negative", "active"]);
91
+ return React.createElement(FabStyled, __assign({ disabled: disabled, positive: positive, negative: negative, active: active }, props));
92
+ };
93
+ export { Fab };
94
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1,98 @@
1
+ import * as React from 'react';
2
+ import { Size } from '../../Types';
3
+ interface IIconProps {
4
+ /** @ignore */
5
+ className?: string;
6
+ /**
7
+ * URL of spritesheet and icon, e.g. 'sprites.svg#arrow'
8
+ */
9
+ url: string;
10
+ /**
11
+ * Optional icon tooltip title.
12
+ */
13
+ title?: string;
14
+ /**
15
+ * Disabled icons have a lighter color and cannot be interacted with.
16
+ * @default false
17
+ */
18
+ disabled?: boolean;
19
+ /**
20
+ * Icon size: `mini`, `tiny`, `small`, `medium` (default), `large`, `big`, `huge` or `massive`.
21
+ * The default (medium) icon size is `1em`. Icon sizes increase or decrease by
22
+ * a _minor third_ (1.2x).
23
+ * Icon size can also be a **number**, in which case the size is in pixels.
24
+ * @default medium
25
+ */
26
+ size?: Size | number;
27
+ /**
28
+ * Flip icon vertically.
29
+ * @default false
30
+ */
31
+ flipped?: boolean;
32
+ /**
33
+ * Mirror icon horizontally.
34
+ * @default false
35
+ */
36
+ mirrored?: boolean;
37
+ /**
38
+ * Rotate icon by degrees, e.g. `90` for a quarter rotation to the right.
39
+ * @default 0
40
+ */
41
+ rotated?: number;
42
+ /**
43
+ * Icon color, e.g. `skyblue`. Color must be a valid CSS value.
44
+ * @default white
45
+ */
46
+ circle?: boolean;
47
+ /**
48
+ * If set, adds a circle around the icon.
49
+ * @default false
50
+ */
51
+ color?: string;
52
+ /**
53
+ * Add a rotation animation.
54
+ * @default false
55
+ */
56
+ animated?: boolean;
57
+ /**
58
+ * Adds spacing around the icon.
59
+ * @default false
60
+ */
61
+ padded?: boolean;
62
+ /**
63
+ * An icon can have an `onClick` handler. It is triggered when the icon
64
+ * is clicked.
65
+ */
66
+ onClick?: (e?: React.MouseEvent) => void;
67
+ }
68
+ declare const IconBase: (props: IIconProps) => React.JSX.Element;
69
+ interface IStyledProps {
70
+ realSize?: string;
71
+ color?: string;
72
+ }
73
+ declare const IconStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<IIconProps, IIconProps>, IStyledProps>, IIconProps>> & string & Omit<(props: IIconProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
74
+ /**
75
+ * Displays an icon. An `Icon` is an SVG symbol taken from a sprite sheet,
76
+ * with an URL of the form `spritesheet.svg#my-icon`.
77
+ *
78
+ * An icon defaults to a white color unless overridden using `color`.
79
+ *
80
+ * #### Size
81
+ * The icon size defaults to `medium`, which corresponds to `1em`. Other
82
+ * preset sizes cause the icon to shrink or grow by a growth factor of 1.2
83
+ * (_minor third_).
84
+ *
85
+ * * `mini`: 0.578
86
+ * * `tiny`: 0.694
87
+ * * `small`: 0.833
88
+ * * `medium`: 1
89
+ * * `large`: 1.2
90
+ * * `big`: 1.44
91
+ * * `huge`: 1.728
92
+ * * `massive`: 2.0736
93
+ *
94
+ * For exact sizing, `size` also accepts a size in pixels. An icon is always
95
+ * square.
96
+ */
97
+ declare const Icon: ({ size, disabled, flipped, mirrored, animated, padded, circle, ...props }: IIconProps) => React.JSX.Element;
98
+ export { IconBase, Icon, IconStyled, IIconProps };
@@ -0,0 +1,79 @@
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, { keyframes, css } from 'styled-components';
29
+ // Helpers
30
+ import { lighten } from '../../helper/lighten';
31
+ import { scaleSize } from '../../helper/SizeHelper';
32
+ var IconBase = function (props) {
33
+ var handleClick = function (e) {
34
+ if (props.disabled)
35
+ return;
36
+ if (props.onClick)
37
+ props.onClick(e);
38
+ };
39
+ return (React.createElement("svg", { className: props.className, onClick: handleClick, focusable: "false" },
40
+ props.title && React.createElement("title", null, props.title),
41
+ React.createElement("use", { xlinkHref: props.url })));
42
+ };
43
+ var rotate = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from { rotate: 0deg; }\n to { rotate: 360deg; }\n"], ["\n from { rotate: 0deg; }\n to { rotate: 360deg; }\n"])));
44
+ var IconStyled = styled(IconBase).attrs(function (p) {
45
+ var _a, _b;
46
+ return ({
47
+ realSize: typeof p.size === 'number' ? "".concat(p.size, "px") : "".concat(scaleSize((_a = p.size) !== null && _a !== void 0 ? _a : 'medium', 1, 'minorThird'), "em"),
48
+ color: (_b = p.color) !== null && _b !== void 0 ? _b : p.theme.colors.neutral[100]
49
+ });
50
+ })(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n position: relative;\n shape-rendering: geometricPrecision;\n box-sizing: border-box;\n\n // Circle:\n ", "\n \n // Spacing around icon:\n ", "\n\n // Clickable icons have a cursor hint:\n ", "\n\n // Disabled:\n ", "\n\n // Sizes:\n width: ", "; \n height: ", ";\n // Don't be squished when in a flex:\n min-width: ", "; \n min-height: ", ";\n\n // Transformations:\n transform-origin: center;\n ", "\n ", "\n ", "\n\n // Icon colors:\n fill: ", ";\n ", "\n\n // Animated:\n ", "\n"], ["\n position: relative;\n shape-rendering: geometricPrecision;\n box-sizing: border-box;\n\n // Circle:\n ", "\n \n // Spacing around icon:\n ", "\n\n // Clickable icons have a cursor hint:\n ", "\n\n // Disabled:\n ", "\n\n // Sizes:\n width: ", "; \n height: ", ";\n // Don't be squished when in a flex:\n min-width: ", "; \n min-height: ", ";\n\n // Transformations:\n transform-origin: center;\n ", "\n ", "\n ", "\n\n // Icon colors:\n fill: ", ";\n ", "\n\n // Animated:\n ", "\n"])), function (p) { return p.circle && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 50%;\n border: solid 1px ", ";\n "], ["\n border-radius: 50%;\n border: solid 1px ", ";\n "])), p.color); }, function (p) { return p.padded && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["margin: 2px;"], ["margin: 2px;"]))); }, function (p) { return p.onClick && !p.disabled && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["cursor: pointer;"], ["cursor: pointer;"]))); }, function (p) { return p.disabled && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n pointer-events: none;\n opacity: 0.6;\n "], ["\n pointer-events: none;\n opacity: 0.6;\n "]))); }, function (p) { return p.realSize; }, function (p) { return p.realSize; }, function (p) { return p.realSize; }, function (p) { return p.realSize; }, function (p) { return p.flipped && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["scale: 1 -1;"], ["scale: 1 -1;"]))); }, function (p) { return p.mirrored && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["scale: -1 1;"], ["scale: -1 1;"]))); }, function (p) { return p.rotated && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["rotate: ", "deg;"], ["rotate: ", "deg;"])), p.rotated); }, function (p) { return p.color; }, function (p) { return p.onClick && css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n transition: \n fill ", "ms ease, \n border-color ", "ms ease,\n outline-color ", "ms ease;\n &:hover {\n fill: ", ";\n border-color: ", ";\n }\n "], ["\n transition: \n fill ", "ms ease, \n border-color ", "ms ease,\n outline-color ", "ms ease;\n &:hover {\n fill: ", ";\n border-color: ", ";\n }\n "])), function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, lighten(0.3, p.color), lighten(0.3, p.color)); }, function (p) { return p.animated && css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n animation: ", " 2s linear infinite;\n "], ["\n animation: ", " 2s linear infinite;\n "])), rotate); });
51
+ /**
52
+ * Displays an icon. An `Icon` is an SVG symbol taken from a sprite sheet,
53
+ * with an URL of the form `spritesheet.svg#my-icon`.
54
+ *
55
+ * An icon defaults to a white color unless overridden using `color`.
56
+ *
57
+ * #### Size
58
+ * The icon size defaults to `medium`, which corresponds to `1em`. Other
59
+ * preset sizes cause the icon to shrink or grow by a growth factor of 1.2
60
+ * (_minor third_).
61
+ *
62
+ * * `mini`: 0.578
63
+ * * `tiny`: 0.694
64
+ * * `small`: 0.833
65
+ * * `medium`: 1
66
+ * * `large`: 1.2
67
+ * * `big`: 1.44
68
+ * * `huge`: 1.728
69
+ * * `massive`: 2.0736
70
+ *
71
+ * For exact sizing, `size` also accepts a size in pixels. An icon is always
72
+ * square.
73
+ */
74
+ var Icon = function (_a) {
75
+ var _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.flipped, flipped = _d === void 0 ? false : _d, _e = _a.mirrored, mirrored = _e === void 0 ? false : _e, _f = _a.animated, animated = _f === void 0 ? false : _f, _g = _a.padded, padded = _g === void 0 ? false : _g, _h = _a.circle, circle = _h === void 0 ? false : _h, props = __rest(_a, ["size", "disabled", "flipped", "mirrored", "animated", "padded", "circle"]);
76
+ return React.createElement(IconStyled, __assign({ size: size, disabled: disabled, flipped: flipped, mirrored: mirrored, animated: animated, padded: padded, circle: circle }, props));
77
+ };
78
+ export { IconBase, Icon, IconStyled };
79
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
@@ -0,0 +1 @@
1
+ export * from './Icon';
@@ -0,0 +1 @@
1
+ export * from './Icon';
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /**
6
+ * `Key` value must be a key from the OnKeyDown key enumeration.
7
+ */
8
+ value: string;
9
+ /**
10
+ * @ignore
11
+ * Fakes a Mac keyboard.
12
+ */
13
+ _fakeMac?: boolean;
14
+ }
15
+ /**
16
+ * A `Key` displays a keyboard key. The value is the key description,
17
+ * e.g. "Ctrl" or "Alt". A key is 16x16px square, unless the key description
18
+ * is longer than 1 character, in which case the width becomes 36px.
19
+ * Certain keys (Ctrl on a Mac, arrows) are replaced with icons.
20
+ */
21
+ declare const Key: (props: IProps) => React.JSX.Element;
22
+ export { Key };
@@ -0,0 +1,74 @@
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 from 'styled-components';
18
+ import { Icon } from '../Icon';
19
+ import { SVG } from '../../svg';
20
+ var KeyBase = function (props) {
21
+ var isMac = navigator.userAgent.includes('Mac') || props._fakeMac;
22
+ var symbol = props.value;
23
+ var wide = false;
24
+ // Key replacement:
25
+ switch (props.value) {
26
+ case 'Ctrl':
27
+ // On a Mac, the Ctrl key becomes a Mac symbol.
28
+ if (isMac) {
29
+ symbol = React.createElement(Icon, { url: SVG.Icons.Cmd });
30
+ }
31
+ else {
32
+ wide = true;
33
+ }
34
+ break;
35
+ case 'ArrowUp':
36
+ symbol = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: -90 });
37
+ break;
38
+ case 'ArrowDown':
39
+ symbol = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: 90 });
40
+ break;
41
+ case 'ArrowRight':
42
+ symbol = React.createElement(Icon, { url: SVG.Icons.Arrow });
43
+ break;
44
+ case 'ArrowLeft':
45
+ symbol = React.createElement(Icon, { url: SVG.Icons.Arrow, rotated: 180 });
46
+ break;
47
+ default:
48
+ if (props.value.length > 1)
49
+ wide = true;
50
+ }
51
+ return (React.createElement("span", { className: props.className, style: {
52
+ maxWidth: wide ? 'auto' : '16px',
53
+ minWidth: wide ? '36px' : 'auto'
54
+ } },
55
+ React.createElement(Inner, { style: { justifyContent: wide ? 'start' : 'center' } }, symbol)));
56
+ };
57
+ var Inner = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n"])));
58
+ var KeyStyled = styled(KeyBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n color: ", ";\n border: solid 1px ", ";\n background-color: ", ";\n border-radius: 4px;\n padding: 0 4px 0 4px;\n height: 16px;\n box-sizing: border-box;\n min-width: 16px;\n font: ", ";\n"], ["\n display: inline-block;\n color: ", ";\n border: solid 1px ", ";\n background-color: ", ";\n border-radius: 4px;\n padding: 0 4px 0 4px;\n height: 16px;\n box-sizing: border-box;\n min-width: 16px;\n font: ", ";\n"
59
+ /**
60
+ * A `Key` displays a keyboard key. The value is the key description,
61
+ * e.g. "Ctrl" or "Alt". A key is 16x16px square, unless the key description
62
+ * is longer than 1 character, in which case the width becomes 36px.
63
+ * Certain keys (Ctrl on a Mac, arrows) are replaced with icons.
64
+ */
65
+ ])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[10]; }, function (p) { return p.theme.font.labelSmall; });
66
+ /**
67
+ * A `Key` displays a keyboard key. The value is the key description,
68
+ * e.g. "Ctrl" or "Alt". A key is 16x16px square, unless the key description
69
+ * is longer than 1 character, in which case the width becomes 36px.
70
+ * Certain keys (Ctrl on a Mac, arrows) are replaced with icons.
71
+ */
72
+ var Key = function (props) { return React.createElement(KeyStyled, __assign({}, props)); };
73
+ export { Key };
74
+ var templateObject_1, templateObject_2;
@@ -0,0 +1 @@
1
+ export * from './Key';
@@ -0,0 +1 @@
1
+ export * from './Key';
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ /** @ignore */
4
+ className?: string;
5
+ /**
6
+ * LinearChart value (in range 0..100)
7
+ */
8
+ value: number;
9
+ /**
10
+ * If set, a percentage number is shown on the LinearChart bar.
11
+ * @default false
12
+ */
13
+ numbered?: boolean;
14
+ /**
15
+ * Optional label.
16
+ */
17
+ label?: React.ReactNode;
18
+ /**
19
+ * If set, sets the color of the LinearChart bar. By default,
20
+ * the color is the theme primary color.
21
+ */
22
+ color?: string;
23
+ }
24
+ /**
25
+ * Data visualization element.
26
+ *
27
+ * The `LinearChart` will fill all horizontal space available to it.
28
+ * A percentage value and a text label are optional.
29
+ */
30
+ declare const LinearChart: ({ numbered, ...props }: IProps) => React.JSX.Element;
31
+ export { LinearChart, IProps };
@@ -0,0 +1,58 @@
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 from 'styled-components';
29
+ var LinearChartBase = function (props) {
30
+ var percentage = Math.round(Math.max(0, Math.min(100, props.value))) + "%";
31
+ return (React.createElement("div", { className: props.className },
32
+ props.label && React.createElement(Label, null, props.label),
33
+ props.numbered && React.createElement(Number, null, percentage),
34
+ React.createElement(Bar, null)));
35
+ };
36
+ var Label = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n font-weight: 700; // TODO: Needs to use theme font weight\n"], ["\n width: 120px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n height: 18px;\n line-height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n font-weight: 700; // TODO: Needs to use theme font weight\n"])));
37
+ var Number = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 40px;\n text-align: right;\n height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n line-height: 18px;\n"], ["\n width: 40px;\n text-align: right;\n height: 18px; // If not, will chop accents of \u00C3 and \u00C7.\n line-height: 18px;\n"])));
38
+ var Bar = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative; \n box-sizing: border-box;\n flex: 1;\n height: 14px;\n\n background-color: ", ";\n border-radius: 7px;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n box-sizing: border-box;\n transition: width ", "ms ease;\n border-radius: 7px;\n } \n"], ["\n position: relative; \n box-sizing: border-box;\n flex: 1;\n height: 14px;\n\n background-color: ", ";\n border-radius: 7px;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n box-sizing: border-box;\n transition: width ", "ms ease;\n border-radius: 7px;\n } \n"])), function (p) { return p.theme.colors.primary[4]; }, function (p) { return p.theme.animation.duration * 2; });
39
+ var LinearChartStyled = styled(LinearChartBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n margin: 8px 0 8px 0;\n min-width: 200px;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"], ["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n height: 18px;\n gap: 8px;\n margin: 8px 0 8px 0;\n min-width: 200px;\n\n font: ", ";\n color: ", ";\n line-height: 0;\n text-transform: uppercase;\n\n ", " {\n &:before {\n width: ", "%;\n background-color: ", ";\n }\n }\n"
40
+ /**
41
+ * Data visualization element.
42
+ *
43
+ * The `LinearChart` will fill all horizontal space available to it.
44
+ * A percentage value and a text label are optional.
45
+ */
46
+ ])), function (p) { return p.theme.font.dataLarge; }, function (p) { return p.theme.colors.font; }, Bar, function (p) { return Math.max(0, Math.min(100, p.value)); }, function (p) { var _a; return (_a = p.color) !== null && _a !== void 0 ? _a : p.theme.colors.primary[1]; });
47
+ /**
48
+ * Data visualization element.
49
+ *
50
+ * The `LinearChart` will fill all horizontal space available to it.
51
+ * A percentage value and a text label are optional.
52
+ */
53
+ var LinearChart = function (_a) {
54
+ var _b = _a.numbered, numbered = _b === void 0 ? false : _b, props = __rest(_a, ["numbered"]);
55
+ return React.createElement(LinearChartStyled, __assign({ numbered: numbered }, props));
56
+ };
57
+ export { LinearChart };
58
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;