@terraware/web-components 2.14.1-rc.1001 → 2.14.1-rc.3

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 (515) hide show
  1. package/components/Autocomplete/Autocomplete.d.ts +0 -1
  2. package/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  3. package/components/Autocomplete/Autocomplete.js +44 -42
  4. package/components/Badge/index.d.ts +0 -1
  5. package/components/Badge/index.d.ts.map +1 -1
  6. package/components/Badge/index.js +8 -7
  7. package/components/BusySpinner/index.d.ts +0 -1
  8. package/components/BusySpinner/index.d.ts.map +1 -1
  9. package/components/BusySpinner/index.js +3 -5
  10. package/components/Button/Button.d.ts +1 -2
  11. package/components/Button/Button.d.ts.map +1 -1
  12. package/components/Button/Button.js +24 -23
  13. package/components/Button/button.test.js +4 -4
  14. package/components/Checkbox.js +27 -25
  15. package/components/Confirm/index.js +28 -28
  16. package/components/DatePicker/DatePicker.d.ts +30 -12
  17. package/components/DatePicker/DatePicker.d.ts.map +1 -1
  18. package/components/DatePicker/DatePicker.js +73 -39
  19. package/components/DialogBox/DialogBox.js +25 -31
  20. package/components/Divisor.d.ts +0 -1
  21. package/components/Divisor.d.ts.map +1 -1
  22. package/components/Divisor.js +2 -3
  23. package/components/Dropdown.d.ts +0 -1
  24. package/components/Dropdown.d.ts.map +1 -1
  25. package/components/Dropdown.js +51 -39
  26. package/components/ErrorBox/ErrorBox.d.ts +0 -1
  27. package/components/ErrorBox/ErrorBox.d.ts.map +1 -1
  28. package/components/ErrorBox/ErrorBox.js +8 -11
  29. package/components/FileChooser/index.d.ts +0 -1
  30. package/components/FileChooser/index.d.ts.map +1 -1
  31. package/components/FileChooser/index.js +62 -58
  32. package/components/FormBottomBar/index.d.ts +0 -1
  33. package/components/FormBottomBar/index.d.ts.map +1 -1
  34. package/components/FormBottomBar/index.js +68 -55
  35. package/components/Icon/Icon.d.ts +1 -2
  36. package/components/Icon/Icon.d.ts.map +1 -1
  37. package/components/Icon/Icon.js +19 -16
  38. package/components/Icon/icons/index.js +3 -2
  39. package/components/IconTooltip/index.d.ts +0 -1
  40. package/components/IconTooltip/index.d.ts.map +1 -1
  41. package/components/IconTooltip/index.js +39 -32
  42. package/components/Message/Message.d.ts +0 -1
  43. package/components/Message/Message.d.ts.map +1 -1
  44. package/components/Message/Message.js +17 -21
  45. package/components/MultiSelect/MultiSelect.test.js +30 -16
  46. package/components/MultiSelect/index.d.ts +0 -1
  47. package/components/MultiSelect/index.d.ts.map +1 -1
  48. package/components/MultiSelect/index.js +42 -32
  49. package/components/Navbar/NavFooter.js +1 -3
  50. package/components/Navbar/NavItem.js +23 -19
  51. package/components/Navbar/NavSection.d.ts +0 -1
  52. package/components/Navbar/NavSection.d.ts.map +1 -1
  53. package/components/Navbar/NavSection.js +3 -4
  54. package/components/Navbar/Navbar.js +27 -26
  55. package/components/Navbar/SubNavbar.js +1 -3
  56. package/components/Note.d.ts +0 -1
  57. package/components/Note.d.ts.map +1 -1
  58. package/components/Note.js +12 -12
  59. package/components/PageForm/index.js +39 -18
  60. package/components/PhotoChooser/index.d.ts +0 -1
  61. package/components/PhotoChooser/index.d.ts.map +1 -1
  62. package/components/PhotoChooser/index.js +72 -57
  63. package/components/Pill/index.d.ts +0 -1
  64. package/components/Pill/index.d.ts.map +1 -1
  65. package/components/Pill/index.js +10 -12
  66. package/components/PillList/index.d.ts +0 -1
  67. package/components/PillList/index.d.ts.map +1 -1
  68. package/components/PillList/index.js +15 -15
  69. package/components/PopoverMenu/Popover.js +28 -25
  70. package/components/PopoverMenu/index.js +30 -26
  71. package/components/PopoverMultiSelect/index.d.ts +0 -1
  72. package/components/PopoverMultiSelect/index.d.ts.map +1 -1
  73. package/components/PopoverMultiSelect/index.js +26 -19
  74. package/components/ProgressCircle/ProgressCircle.d.ts +0 -1
  75. package/components/ProgressCircle/ProgressCircle.d.ts.map +1 -1
  76. package/components/ProgressCircle/ProgressCircle.js +6 -7
  77. package/components/RadioButton.js +1 -1
  78. package/components/Select/Select.d.ts +0 -1
  79. package/components/Select/Select.d.ts.map +1 -1
  80. package/components/Select/Select.js +9 -3
  81. package/components/Select/SelectT.js +81 -65
  82. package/components/Separator/index.d.ts +1 -1
  83. package/components/Separator/index.d.ts.map +1 -1
  84. package/components/Separator/index.js +3 -2
  85. package/components/Slider/index.d.ts +0 -1
  86. package/components/Slider/index.d.ts.map +1 -1
  87. package/components/Slider/index.js +11 -13
  88. package/components/SummaryBox.d.ts +0 -1
  89. package/components/SummaryBox.d.ts.map +1 -1
  90. package/components/SummaryBox.js +46 -45
  91. package/components/Tabs/index.js +41 -33
  92. package/components/TextTruncated/index.js +62 -52
  93. package/components/Textfield/Textfield.d.ts +0 -1
  94. package/components/Textfield/Textfield.d.ts.map +1 -1
  95. package/components/Textfield/Textfield.js +38 -38
  96. package/components/Textfield/TruncatedTextArea.d.ts +1 -1
  97. package/components/Textfield/TruncatedTextArea.d.ts.map +1 -1
  98. package/components/Textfield/TruncatedTextArea.js +42 -29
  99. package/components/Tooltip/Tooltip.d.ts +0 -1
  100. package/components/Tooltip/Tooltip.d.ts.map +1 -1
  101. package/components/Tooltip/Tooltip.js +28 -24
  102. package/components/ViewPhotosDialog/index.js +65 -41
  103. package/components/svg/BlobbyGrayIconImage.d.ts +1 -1
  104. package/components/svg/BlobbyGrayIconImage.d.ts.map +1 -1
  105. package/components/svg/BlobbyGrayIconImage.js +9 -7
  106. package/components/svg/BlobbyGrayIconImport.d.ts +1 -1
  107. package/components/svg/BlobbyGrayIconImport.d.ts.map +1 -1
  108. package/components/svg/BlobbyGrayIconImport.js +9 -7
  109. package/components/svg/BlobbyGrayIconUploadToTheCloud.d.ts +1 -1
  110. package/components/svg/BlobbyGrayIconUploadToTheCloud.d.ts.map +1 -1
  111. package/components/svg/BlobbyGrayIconUploadToTheCloud.js +9 -7
  112. package/components/svg/BlobbyIconCloudChecked.d.ts +1 -1
  113. package/components/svg/BlobbyIconCloudChecked.d.ts.map +1 -1
  114. package/components/svg/BlobbyIconCloudChecked.js +9 -7
  115. package/components/svg/BlobbyIconExportOrUploadPhoto.d.ts +1 -1
  116. package/components/svg/BlobbyIconExportOrUploadPhoto.d.ts.map +1 -1
  117. package/components/svg/BlobbyIconExportOrUploadPhoto.js +9 -7
  118. package/components/svg/BlobbyIconFolder.d.ts +1 -1
  119. package/components/svg/BlobbyIconFolder.d.ts.map +1 -1
  120. package/components/svg/BlobbyIconFolder.js +9 -7
  121. package/components/svg/BlobbyIconGraphReport.d.ts +1 -1
  122. package/components/svg/BlobbyIconGraphReport.d.ts.map +1 -1
  123. package/components/svg/BlobbyIconGraphReport.js +9 -7
  124. package/components/svg/BlobbyIconHappy.d.ts +1 -1
  125. package/components/svg/BlobbyIconHappy.d.ts.map +1 -1
  126. package/components/svg/BlobbyIconHappy.js +9 -7
  127. package/components/svg/BlobbyIconHeartMonitor.d.ts +1 -1
  128. package/components/svg/BlobbyIconHeartMonitor.d.ts.map +1 -1
  129. package/components/svg/BlobbyIconHeartMonitor.js +9 -7
  130. package/components/svg/BlobbyIconLeaf.d.ts +1 -1
  131. package/components/svg/BlobbyIconLeaf.d.ts.map +1 -1
  132. package/components/svg/BlobbyIconLeaf.js +9 -7
  133. package/components/svg/BlobbyIconLibrary.d.ts +1 -1
  134. package/components/svg/BlobbyIconLibrary.d.ts.map +1 -1
  135. package/components/svg/BlobbyIconLibrary.js +9 -7
  136. package/components/svg/BlobbyIconNursery.d.ts +1 -1
  137. package/components/svg/BlobbyIconNursery.d.ts.map +1 -1
  138. package/components/svg/BlobbyIconNursery.js +9 -7
  139. package/components/svg/BlobbyIconOrganization.d.ts +1 -1
  140. package/components/svg/BlobbyIconOrganization.d.ts.map +1 -1
  141. package/components/svg/BlobbyIconOrganization.js +9 -7
  142. package/components/svg/BlobbyIconParchment.d.ts +1 -1
  143. package/components/svg/BlobbyIconParchment.d.ts.map +1 -1
  144. package/components/svg/BlobbyIconParchment.js +9 -7
  145. package/components/svg/BlobbyIconPeople.d.ts +1 -1
  146. package/components/svg/BlobbyIconPeople.d.ts.map +1 -1
  147. package/components/svg/BlobbyIconPeople.js +9 -7
  148. package/components/svg/BlobbyIconSeedBank.d.ts +1 -1
  149. package/components/svg/BlobbyIconSeedBank.d.ts.map +1 -1
  150. package/components/svg/BlobbyIconSeedBank.js +9 -7
  151. package/components/svg/BlobbyIconSeedling.d.ts +1 -1
  152. package/components/svg/BlobbyIconSeedling.d.ts.map +1 -1
  153. package/components/svg/BlobbyIconSeedling.js +9 -7
  154. package/components/svg/BlobbyIconSeeds.d.ts +1 -1
  155. package/components/svg/BlobbyIconSeeds.d.ts.map +1 -1
  156. package/components/svg/BlobbyIconSeeds.js +9 -7
  157. package/components/svg/BlobbyIconSite.d.ts +1 -1
  158. package/components/svg/BlobbyIconSite.d.ts.map +1 -1
  159. package/components/svg/BlobbyIconSite.js +9 -7
  160. package/components/svg/BlobbyIconSparkles.d.ts +1 -1
  161. package/components/svg/BlobbyIconSparkles.d.ts.map +1 -1
  162. package/components/svg/BlobbyIconSparkles.js +9 -7
  163. package/components/svg/BlobbyIconWrench.d.ts +1 -1
  164. package/components/svg/BlobbyIconWrench.d.ts.map +1 -1
  165. package/components/svg/BlobbyIconWrench.js +9 -7
  166. package/components/svg/Bug.d.ts +1 -1
  167. package/components/svg/Bug.d.ts.map +1 -1
  168. package/components/svg/Bug.js +9 -7
  169. package/components/svg/Calendar.d.ts +1 -1
  170. package/components/svg/Calendar.d.ts.map +1 -1
  171. package/components/svg/Calendar.js +9 -7
  172. package/components/svg/CaretDown.d.ts +1 -1
  173. package/components/svg/CaretDown.d.ts.map +1 -1
  174. package/components/svg/CaretDown.js +9 -7
  175. package/components/svg/CaretLeft.d.ts +1 -1
  176. package/components/svg/CaretLeft.d.ts.map +1 -1
  177. package/components/svg/CaretLeft.js +9 -7
  178. package/components/svg/CaretRight.d.ts +1 -1
  179. package/components/svg/CaretRight.d.ts.map +1 -1
  180. package/components/svg/CaretRight.js +9 -7
  181. package/components/svg/CaretUp.d.ts +1 -1
  182. package/components/svg/CaretUp.d.ts.map +1 -1
  183. package/components/svg/CaretUp.js +9 -7
  184. package/components/svg/ChevronDown.d.ts +1 -1
  185. package/components/svg/ChevronDown.d.ts.map +1 -1
  186. package/components/svg/ChevronDown.js +9 -7
  187. package/components/svg/ChevronUp.d.ts +1 -1
  188. package/components/svg/ChevronUp.d.ts.map +1 -1
  189. package/components/svg/ChevronUp.js +9 -7
  190. package/components/svg/Close.d.ts +1 -1
  191. package/components/svg/Close.d.ts.map +1 -1
  192. package/components/svg/Close.js +9 -7
  193. package/components/svg/Critical.d.ts +1 -1
  194. package/components/svg/Critical.d.ts.map +1 -1
  195. package/components/svg/Critical.js +9 -7
  196. package/components/svg/Edit.d.ts +1 -1
  197. package/components/svg/Edit.d.ts.map +1 -1
  198. package/components/svg/Edit.js +9 -7
  199. package/components/svg/Error.d.ts +1 -1
  200. package/components/svg/Error.d.ts.map +1 -1
  201. package/components/svg/Error.js +9 -7
  202. package/components/svg/Filter.d.ts +1 -1
  203. package/components/svg/Filter.d.ts.map +1 -1
  204. package/components/svg/Filter.js +9 -7
  205. package/components/svg/Folder.d.ts +1 -1
  206. package/components/svg/Folder.d.ts.map +1 -1
  207. package/components/svg/Folder.js +9 -7
  208. package/components/svg/Help.d.ts +1 -1
  209. package/components/svg/Help.d.ts.map +1 -1
  210. package/components/svg/Help.js +9 -7
  211. package/components/svg/Home.d.ts +1 -1
  212. package/components/svg/Home.d.ts.map +1 -1
  213. package/components/svg/Home.js +9 -7
  214. package/components/svg/IconAdd.d.ts +1 -1
  215. package/components/svg/IconAdd.d.ts.map +1 -1
  216. package/components/svg/IconAdd.js +9 -7
  217. package/components/svg/IconArrowRight.d.ts +1 -1
  218. package/components/svg/IconArrowRight.d.ts.map +1 -1
  219. package/components/svg/IconArrowRight.js +9 -7
  220. package/components/svg/IconBusinessNetwork.d.ts +1 -1
  221. package/components/svg/IconBusinessNetwork.d.ts.map +1 -1
  222. package/components/svg/IconBusinessNetwork.js +9 -7
  223. package/components/svg/IconCancel.d.ts +1 -1
  224. package/components/svg/IconCancel.d.ts.map +1 -1
  225. package/components/svg/IconCancel.js +9 -7
  226. package/components/svg/IconChargingBattery.d.ts +1 -1
  227. package/components/svg/IconChargingBattery.d.ts.map +1 -1
  228. package/components/svg/IconChargingBattery.js +9 -7
  229. package/components/svg/IconCheckmark.d.ts +1 -1
  230. package/components/svg/IconCheckmark.d.ts.map +1 -1
  231. package/components/svg/IconCheckmark.js +9 -7
  232. package/components/svg/IconCoinInHand.d.ts +1 -1
  233. package/components/svg/IconCoinInHand.d.ts.map +1 -1
  234. package/components/svg/IconCoinInHand.js +9 -7
  235. package/components/svg/IconColumns.d.ts +1 -1
  236. package/components/svg/IconColumns.d.ts.map +1 -1
  237. package/components/svg/IconColumns.js +9 -7
  238. package/components/svg/IconDashboard.d.ts +1 -1
  239. package/components/svg/IconDashboard.d.ts.map +1 -1
  240. package/components/svg/IconDashboard.js +9 -7
  241. package/components/svg/IconEdit.d.ts +1 -1
  242. package/components/svg/IconEdit.d.ts.map +1 -1
  243. package/components/svg/IconEdit.js +9 -7
  244. package/components/svg/IconExport.d.ts +1 -1
  245. package/components/svg/IconExport.d.ts.map +1 -1
  246. package/components/svg/IconExport.js +9 -7
  247. package/components/svg/IconFile.d.ts +1 -1
  248. package/components/svg/IconFile.d.ts.map +1 -1
  249. package/components/svg/IconFile.js +9 -7
  250. package/components/svg/IconFolder.d.ts +1 -1
  251. package/components/svg/IconFolder.d.ts.map +1 -1
  252. package/components/svg/IconFolder.js +9 -7
  253. package/components/svg/IconFullScreen.d.ts +1 -1
  254. package/components/svg/IconFullScreen.d.ts.map +1 -1
  255. package/components/svg/IconFullScreen.js +9 -7
  256. package/components/svg/IconFutures.d.ts +1 -1
  257. package/components/svg/IconFutures.d.ts.map +1 -1
  258. package/components/svg/IconFutures.js +9 -7
  259. package/components/svg/IconGraphReport.d.ts +1 -1
  260. package/components/svg/IconGraphReport.d.ts.map +1 -1
  261. package/components/svg/IconGraphReport.js +9 -7
  262. package/components/svg/IconHeartMonitor.d.ts +1 -1
  263. package/components/svg/IconHeartMonitor.d.ts.map +1 -1
  264. package/components/svg/IconHeartMonitor.js +9 -7
  265. package/components/svg/IconHistory.d.ts +1 -1
  266. package/components/svg/IconHistory.d.ts.map +1 -1
  267. package/components/svg/IconHistory.js +9 -7
  268. package/components/svg/IconImport.d.ts +1 -1
  269. package/components/svg/IconImport.d.ts.map +1 -1
  270. package/components/svg/IconImport.js +9 -7
  271. package/components/svg/IconLayers.d.ts +1 -1
  272. package/components/svg/IconLayers.d.ts.map +1 -1
  273. package/components/svg/IconLayers.js +9 -7
  274. package/components/svg/IconList.d.ts +1 -1
  275. package/components/svg/IconList.d.ts.map +1 -1
  276. package/components/svg/IconList.js +9 -7
  277. package/components/svg/IconLocations.d.ts +1 -1
  278. package/components/svg/IconLocations.d.ts.map +1 -1
  279. package/components/svg/IconLocations.js +9 -7
  280. package/components/svg/IconMail.d.ts +1 -1
  281. package/components/svg/IconMail.d.ts.map +1 -1
  282. package/components/svg/IconMail.js +9 -7
  283. package/components/svg/IconManager.d.ts +1 -1
  284. package/components/svg/IconManager.d.ts.map +1 -1
  285. package/components/svg/IconManager.js +9 -7
  286. package/components/svg/IconMarker.d.ts +1 -1
  287. package/components/svg/IconMarker.d.ts.map +1 -1
  288. package/components/svg/IconMarker.js +9 -7
  289. package/components/svg/IconMenu.d.ts +1 -1
  290. package/components/svg/IconMenu.d.ts.map +1 -1
  291. package/components/svg/IconMenu.js +9 -7
  292. package/components/svg/IconMenuHorizontal.d.ts +1 -1
  293. package/components/svg/IconMenuHorizontal.d.ts.map +1 -1
  294. package/components/svg/IconMenuHorizontal.js +9 -7
  295. package/components/svg/IconModule.d.ts +1 -1
  296. package/components/svg/IconModule.d.ts.map +1 -1
  297. package/components/svg/IconModule.js +9 -7
  298. package/components/svg/IconMyLocation.d.ts +1 -1
  299. package/components/svg/IconMyLocation.d.ts.map +1 -1
  300. package/components/svg/IconMyLocation.js +9 -7
  301. package/components/svg/IconNursery.d.ts +1 -1
  302. package/components/svg/IconNursery.d.ts.map +1 -1
  303. package/components/svg/IconNursery.js +9 -7
  304. package/components/svg/IconOrg.d.ts +1 -1
  305. package/components/svg/IconOrg.d.ts.map +1 -1
  306. package/components/svg/IconOrg.js +9 -7
  307. package/components/svg/IconParchment.d.ts +1 -1
  308. package/components/svg/IconParchment.d.ts.map +1 -1
  309. package/components/svg/IconParchment.js +9 -7
  310. package/components/svg/IconRedo.d.ts +1 -1
  311. package/components/svg/IconRedo.d.ts.map +1 -1
  312. package/components/svg/IconRedo.js +9 -7
  313. package/components/svg/IconRestorationSite.d.ts +1 -1
  314. package/components/svg/IconRestorationSite.d.ts.map +1 -1
  315. package/components/svg/IconRestorationSite.js +9 -7
  316. package/components/svg/IconSeedBank.d.ts +1 -1
  317. package/components/svg/IconSeedBank.d.ts.map +1 -1
  318. package/components/svg/IconSeedBank.js +9 -7
  319. package/components/svg/IconSeedling.d.ts +1 -1
  320. package/components/svg/IconSeedling.d.ts.map +1 -1
  321. package/components/svg/IconSeedling.js +9 -7
  322. package/components/svg/IconSlice.d.ts +1 -1
  323. package/components/svg/IconSlice.d.ts.map +1 -1
  324. package/components/svg/IconSlice.js +9 -7
  325. package/components/svg/IconSubmit.d.ts +1 -1
  326. package/components/svg/IconSubmit.d.ts.map +1 -1
  327. package/components/svg/IconSubmit.js +9 -7
  328. package/components/svg/IconSubtract.d.ts +1 -1
  329. package/components/svg/IconSubtract.d.ts.map +1 -1
  330. package/components/svg/IconSubtract.js +9 -7
  331. package/components/svg/IconSynced.d.ts +1 -1
  332. package/components/svg/IconSynced.d.ts.map +1 -1
  333. package/components/svg/IconSynced.js +9 -7
  334. package/components/svg/IconTrashCan.d.ts +1 -1
  335. package/components/svg/IconTrashCan.d.ts.map +1 -1
  336. package/components/svg/IconTrashCan.js +9 -7
  337. package/components/svg/IconTreasureMap.d.ts +1 -1
  338. package/components/svg/IconTreasureMap.d.ts.map +1 -1
  339. package/components/svg/IconTreasureMap.js +9 -7
  340. package/components/svg/IconUndo.d.ts +1 -1
  341. package/components/svg/IconUndo.d.ts.map +1 -1
  342. package/components/svg/IconUndo.js +9 -7
  343. package/components/svg/IconWifi.d.ts +1 -1
  344. package/components/svg/IconWifi.d.ts.map +1 -1
  345. package/components/svg/IconWifi.js +9 -7
  346. package/components/svg/Info.d.ts +1 -1
  347. package/components/svg/Info.d.ts.map +1 -1
  348. package/components/svg/Info.js +9 -7
  349. package/components/svg/Key.d.ts +1 -1
  350. package/components/svg/Key.d.ts.map +1 -1
  351. package/components/svg/Key.js +9 -7
  352. package/components/svg/Leaf.d.ts +1 -1
  353. package/components/svg/Leaf.d.ts.map +1 -1
  354. package/components/svg/Leaf.js +9 -7
  355. package/components/svg/Lock.d.ts +1 -1
  356. package/components/svg/Lock.d.ts.map +1 -1
  357. package/components/svg/Lock.js +9 -7
  358. package/components/svg/Logo.d.ts +1 -1
  359. package/components/svg/Logo.d.ts.map +1 -1
  360. package/components/svg/Logo.js +9 -7
  361. package/components/svg/MenuVertical.d.ts +1 -1
  362. package/components/svg/MenuVertical.d.ts.map +1 -1
  363. package/components/svg/MenuVertical.js +9 -7
  364. package/components/svg/Notification.d.ts +1 -1
  365. package/components/svg/Notification.d.ts.map +1 -1
  366. package/components/svg/Notification.js +9 -7
  367. package/components/svg/Person.d.ts +1 -1
  368. package/components/svg/Person.d.ts.map +1 -1
  369. package/components/svg/Person.js +9 -7
  370. package/components/svg/Plus.d.ts +1 -1
  371. package/components/svg/Plus.d.ts.map +1 -1
  372. package/components/svg/Plus.js +9 -7
  373. package/components/svg/RestorationSite.d.ts +1 -1
  374. package/components/svg/RestorationSite.d.ts.map +1 -1
  375. package/components/svg/RestorationSite.js +9 -7
  376. package/components/svg/Search.d.ts +1 -1
  377. package/components/svg/Search.d.ts.map +1 -1
  378. package/components/svg/Search.js +9 -7
  379. package/components/svg/Seeds.d.ts +1 -1
  380. package/components/svg/Seeds.d.ts.map +1 -1
  381. package/components/svg/Seeds.js +9 -7
  382. package/components/svg/Site.d.ts +1 -1
  383. package/components/svg/Site.d.ts.map +1 -1
  384. package/components/svg/Site.js +9 -7
  385. package/components/svg/Sparkles.d.ts +1 -1
  386. package/components/svg/Sparkles.d.ts.map +1 -1
  387. package/components/svg/Sparkles.js +9 -7
  388. package/components/svg/Species.d.ts +1 -1
  389. package/components/svg/Species.d.ts.map +1 -1
  390. package/components/svg/Species.js +9 -7
  391. package/components/svg/Species2.d.ts +1 -1
  392. package/components/svg/Species2.d.ts.map +1 -1
  393. package/components/svg/Species2.js +9 -7
  394. package/components/svg/Spinner.d.ts +1 -1
  395. package/components/svg/Spinner.d.ts.map +1 -1
  396. package/components/svg/Spinner.js +9 -7
  397. package/components/svg/Success.d.ts +1 -1
  398. package/components/svg/Success.d.ts.map +1 -1
  399. package/components/svg/Success.js +9 -7
  400. package/components/svg/Touchscreen.d.ts +1 -1
  401. package/components/svg/Touchscreen.d.ts.map +1 -1
  402. package/components/svg/Touchscreen.js +9 -7
  403. package/components/svg/UploadCloud.d.ts +1 -1
  404. package/components/svg/UploadCloud.d.ts.map +1 -1
  405. package/components/svg/UploadCloud.js +9 -7
  406. package/components/svg/Warning.d.ts +1 -1
  407. package/components/svg/Warning.d.ts.map +1 -1
  408. package/components/svg/Warning.js +9 -7
  409. package/components/svg/index.js +101 -101
  410. package/components/table/EnhancedTableToolbar.d.ts +0 -1
  411. package/components/table/EnhancedTableToolbar.d.ts.map +1 -1
  412. package/components/table/EnhancedTableToolbar.js +45 -45
  413. package/components/table/EnhancedTableToolbarV2.d.ts +1 -2
  414. package/components/table/EnhancedTableToolbarV2.d.ts.map +1 -1
  415. package/components/table/EnhancedTableToolbarV2.js +22 -21
  416. package/components/table/TableCellRenderer.js +60 -70
  417. package/components/table/TableHeader.js +33 -27
  418. package/components/table/TableHeaderItem.js +33 -30
  419. package/components/table/index.d.ts.map +1 -1
  420. package/components/table/index.js +189 -145
  421. package/components/table/sort.js +16 -10
  422. package/components/table/sort.test.js +12 -12
  423. package/index.d.ts +2 -0
  424. package/index.d.ts.map +1 -1
  425. package/index.js +50 -50
  426. package/license-report.html +1 -1
  427. package/package.json +4 -8
  428. package/stories/Autocomplete.stories.d.ts +2 -2
  429. package/stories/Autocomplete.stories.d.ts.map +1 -1
  430. package/stories/Badge.stories.d.ts +1 -2
  431. package/stories/Badge.stories.d.ts.map +1 -1
  432. package/stories/BusySpinner.stories.d.ts +1 -1
  433. package/stories/BusySpinner.stories.d.ts.map +1 -1
  434. package/stories/Button.stories.d.ts +1 -1
  435. package/stories/Button.stories.d.ts.map +1 -1
  436. package/stories/Checkbox.stories.d.ts +2 -2
  437. package/stories/Checkbox.stories.d.ts.map +1 -1
  438. package/stories/Confirm.stories.d.ts +5 -5
  439. package/stories/Confirm.stories.d.ts.map +1 -1
  440. package/stories/DatePicker.stories.d.ts +5 -1
  441. package/stories/DatePicker.stories.d.ts.map +1 -1
  442. package/stories/DialogBox.stories.d.ts +6 -6
  443. package/stories/DialogBox.stories.d.ts.map +1 -1
  444. package/stories/Divisor.stories.d.ts +1 -1
  445. package/stories/Divisor.stories.d.ts.map +1 -1
  446. package/stories/Dropdown.stories.d.ts +3 -3
  447. package/stories/Dropdown.stories.d.ts.map +1 -1
  448. package/stories/ErrorBox.stories.d.ts +1 -1
  449. package/stories/ErrorBox.stories.d.ts.map +1 -1
  450. package/stories/FileChooser.stories.d.ts +2 -2
  451. package/stories/FileChooser.stories.d.ts.map +1 -1
  452. package/stories/Icon.stories.d.ts +1 -1
  453. package/stories/Icon.stories.d.ts.map +1 -1
  454. package/stories/IconTooltip.stories.d.ts +2 -2
  455. package/stories/IconTooltip.stories.d.ts.map +1 -1
  456. package/stories/IntersectionObserver.stories.d.ts +1 -1
  457. package/stories/IntersectionObserver.stories.d.ts.map +1 -1
  458. package/stories/Message.stories.d.ts +2 -2
  459. package/stories/Message.stories.d.ts.map +1 -1
  460. package/stories/MultiSelect.stories.d.ts +2 -2
  461. package/stories/MultiSelect.stories.d.ts.map +1 -1
  462. package/stories/Navbar.stories.d.ts +2 -2
  463. package/stories/Navbar.stories.d.ts.map +1 -1
  464. package/stories/Note.stories.d.ts +1 -1
  465. package/stories/Note.stories.d.ts.map +1 -1
  466. package/stories/PageForm.stories.d.ts +2 -2
  467. package/stories/PageForm.stories.d.ts.map +1 -1
  468. package/stories/PhotoChooser.stories.d.ts +2 -2
  469. package/stories/PhotoChooser.stories.d.ts.map +1 -1
  470. package/stories/PillList.stories.d.ts +1 -1
  471. package/stories/PillList.stories.d.ts.map +1 -1
  472. package/stories/PopoverMenu.stories.d.ts +2 -2
  473. package/stories/PopoverMenu.stories.d.ts.map +1 -1
  474. package/stories/PopoverMultiSelect.stories.d.ts +1 -1
  475. package/stories/PopoverMultiSelect.stories.d.ts.map +1 -1
  476. package/stories/ProgressCircle.stories.d.ts +1 -1
  477. package/stories/ProgressCircle.stories.d.ts.map +1 -1
  478. package/stories/RadioButton.stories.d.ts +1 -1
  479. package/stories/RadioButton.stories.d.ts.map +1 -1
  480. package/stories/Select.stories.d.ts +4 -4
  481. package/stories/Select.stories.d.ts.map +1 -1
  482. package/stories/Separator.stories.d.ts +2 -2
  483. package/stories/Slider.stories.d.ts +2 -2
  484. package/stories/Slider.stories.d.ts.map +1 -1
  485. package/stories/SummaryBox.stories.d.ts +3 -3
  486. package/stories/SummaryBox.stories.d.ts.map +1 -1
  487. package/stories/Table.stories.d.ts +5 -5
  488. package/stories/Tabs.stories.d.ts +2 -3
  489. package/stories/Tabs.stories.d.ts.map +1 -1
  490. package/stories/TextTruncated.stories.d.ts +3 -3
  491. package/stories/TextTruncated.stories.d.ts.map +1 -1
  492. package/stories/TextfieldNew.stories.d.ts +5 -5
  493. package/stories/TextfieldNew.stories.d.ts.map +1 -1
  494. package/stories/Theme.stories.d.ts +1 -1
  495. package/stories/Theme.stories.d.ts.map +1 -1
  496. package/stories/Tooltip.stories.d.ts +1 -1
  497. package/stories/Tooltip.stories.d.ts.map +1 -1
  498. package/stories/ViewPhotosDialog.stories.d.ts +1 -1
  499. package/stories/ViewPhotosDialog.stories.d.ts.map +1 -1
  500. package/style-dictionary-dist/TerrawareTheme.js +3 -2
  501. package/theme.js +4 -2
  502. package/utils/date.d.ts +21 -2
  503. package/utils/date.d.ts.map +1 -1
  504. package/utils/date.js +50 -26
  505. package/utils/date.test.js +51 -14
  506. package/utils/index.d.ts +2 -2
  507. package/utils/index.d.ts.map +1 -1
  508. package/utils/index.js +13 -7
  509. package/utils/preventDefaultEvent.js +5 -2
  510. package/utils/text.js +15 -10
  511. package/utils/text.test.js +10 -10
  512. package/utils/useDeviceInfo.js +18 -18
  513. package/utils/date.v1.d.ts +0 -5
  514. package/utils/date.v1.d.ts.map +0 -1
  515. package/utils/date.v1.js +0 -17
@@ -8,18 +8,16 @@ exports.default = Slider;
8
8
  var _material = require("@mui/material");
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  function Slider(props) {
11
- const {
12
- defaultValue,
13
- value,
14
- marks,
15
- min,
16
- max,
17
- onChange,
18
- step,
19
- valueLabelDisplay
20
- } = props;
21
- const theme = (0, _material.useTheme)();
22
- const sliderStyles = {
11
+ var defaultValue = props.defaultValue,
12
+ value = props.value,
13
+ marks = props.marks,
14
+ min = props.min,
15
+ max = props.max,
16
+ onChange = props.onChange,
17
+ step = props.step,
18
+ valueLabelDisplay = props.valueLabelDisplay;
19
+ var theme = (0, _material.useTheme)();
20
+ var sliderStyles = {
23
21
  '.MuiSlider-rail': {
24
22
  backgroundColor: theme.palette.TwClrBgBrandTertiary,
25
23
  height: theme.spacing(0.5)
@@ -40,7 +38,7 @@ function Slider(props) {
40
38
  borderRadius: '8px'
41
39
  }
42
40
  };
43
- const handleChange = (event, val) => {
41
+ var handleChange = function handleChange(event, val) {
44
42
  if (!Array.isArray(val)) {
45
43
  onChange(val);
46
44
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface Props {
3
2
  id?: string;
4
3
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SummaryBox.d.ts","sourceRoot":"","sources":["../../src/components/SummaryBox.tsx"],"names":[],"mappings":";AAyCA,MAAM,WAAW,KAAK;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAmB,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAyBnH"}
1
+ {"version":3,"file":"SummaryBox.d.ts","sourceRoot":"","sources":["../../src/components/SummaryBox.tsx"],"names":[],"mappings":"AAyCA,MAAM,WAAW,KAAK;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAmB,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAyBnH"}
@@ -9,52 +9,53 @@ var _iconsMaterial = require("@mui/icons-material");
9
9
  var _material = require("@mui/material");
10
10
  var _styles = require("@mui/styles");
11
11
  var _react = _interopRequireDefault(require("react"));
12
- const useStyles = (0, _styles.makeStyles)(theme => ({
13
- bold: {
14
- fontWeight: theme.typography.fontWeightBold,
15
- whiteSpace: 'pre-line'
16
- },
17
- summaryDefault: {
18
- position: 'relative',
19
- borderRadius: 8,
20
- backgroundColor: theme.palette.neutral[200],
21
- padding: theme.spacing(2)
22
- },
23
- summaryAvailable: {
24
- borderRadius: 8,
25
- backgroundColor: theme.palette.neutral[700],
26
- padding: theme.spacing(2),
27
- color: theme.palette.common.white
28
- },
29
- summaryZero: {
30
- borderRadius: 8,
31
- backgroundColor: theme.palette.state[5],
32
- padding: theme.spacing(2),
33
- color: theme.palette.common.white
34
- },
35
- full: {
36
- borderRadius: 8,
37
- backgroundColor: theme.palette.neutral[200],
38
- padding: theme.spacing(2),
39
- height: '100%',
40
- boxSizing: 'border-box'
41
- },
42
- infoIcon: {
43
- position: 'absolute',
44
- right: theme.spacing(2)
45
- }
46
- }));
12
+ var useStyles = (0, _styles.makeStyles)(function (theme) {
13
+ return {
14
+ bold: {
15
+ fontWeight: theme.typography.fontWeightBold,
16
+ whiteSpace: 'pre-line'
17
+ },
18
+ summaryDefault: {
19
+ position: 'relative',
20
+ borderRadius: 8,
21
+ backgroundColor: theme.palette.neutral[200],
22
+ padding: theme.spacing(2)
23
+ },
24
+ summaryAvailable: {
25
+ borderRadius: 8,
26
+ backgroundColor: theme.palette.neutral[700],
27
+ padding: theme.spacing(2),
28
+ color: theme.palette.common.white
29
+ },
30
+ summaryZero: {
31
+ borderRadius: 8,
32
+ backgroundColor: theme.palette.state[5],
33
+ padding: theme.spacing(2),
34
+ color: theme.palette.common.white
35
+ },
36
+ full: {
37
+ borderRadius: 8,
38
+ backgroundColor: theme.palette.neutral[200],
39
+ padding: theme.spacing(2),
40
+ height: '100%',
41
+ boxSizing: 'border-box'
42
+ },
43
+ infoIcon: {
44
+ position: 'absolute',
45
+ right: theme.spacing(2)
46
+ }
47
+ };
48
+ });
47
49
  function SummaryBox(_ref) {
48
- let {
49
- title,
50
- value,
51
- variant = 'default',
52
- id,
53
- icon,
54
- onIconClick
55
- } = _ref;
56
- const classes = useStyles();
57
- const style = variant === 'default' ? classes.summaryDefault : variant === 'available' ? classes.summaryAvailable : variant === 'full' ? classes.full : classes.summaryZero;
50
+ var title = _ref.title,
51
+ value = _ref.value,
52
+ _ref$variant = _ref.variant,
53
+ variant = _ref$variant === void 0 ? 'default' : _ref$variant,
54
+ id = _ref.id,
55
+ icon = _ref.icon,
56
+ onIconClick = _ref.onIconClick;
57
+ var classes = useStyles();
58
+ var style = variant === 'default' ? classes.summaryDefault : variant === 'available' ? classes.summaryAvailable : variant === 'full' ? classes.full : classes.summaryZero;
58
59
  return /*#__PURE__*/_react.default.createElement(_material.Box, {
59
60
  className: style,
60
61
  id: id
@@ -1,29 +1,30 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _lab = require("@mui/lab");
11
12
  var _material = require("@mui/material");
12
13
  var _utils = require("../../utils");
13
14
  var _Icon = _interopRequireDefault(require("../Icon/Icon"));
14
- const Tabs = _ref => {
15
+ var Tabs = function Tabs(_ref) {
15
16
  var _ref2, _tabs$;
16
- let {
17
- tabs,
18
- onTabChange,
19
- activeTab
20
- } = _ref;
21
- const [selectedTab, setSelectedTab] = (0, _react.useState)((_ref2 = activeTab !== null && activeTab !== void 0 ? activeTab : (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id) !== null && _ref2 !== void 0 ? _ref2 : '');
22
- const theme = (0, _material.useTheme)();
23
- const {
24
- isMobile
25
- } = (0, _utils.useDeviceInfo)();
26
- const tabStyles = {
17
+ var tabs = _ref.tabs,
18
+ onTabChange = _ref.onTabChange,
19
+ activeTab = _ref.activeTab;
20
+ var _useState = (0, _react.useState)((_ref2 = activeTab !== null && activeTab !== void 0 ? activeTab : (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id) !== null && _ref2 !== void 0 ? _ref2 : ''),
21
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
22
+ selectedTab = _useState2[0],
23
+ setSelectedTab = _useState2[1];
24
+ var theme = (0, _material.useTheme)();
25
+ var _useDeviceInfo = (0, _utils.useDeviceInfo)(),
26
+ isMobile = _useDeviceInfo.isMobile;
27
+ var tabStyles = {
27
28
  fontSize: '14px',
28
29
  padding: theme.spacing(1, 2),
29
30
  minHeight: theme.spacing(4.5),
@@ -45,22 +46,22 @@ const Tabs = _ref => {
45
46
  fill: theme.palette.TwClrTxtBrand
46
47
  }
47
48
  };
48
- const tabHeaderProps = {
49
+ var tabHeaderProps = {
49
50
  borderBottom: 1,
50
51
  borderColor: 'divider',
51
52
  margin: isMobile ? 0 : theme.spacing(0, 4)
52
53
  };
53
- const tabPanelStyles = {
54
+ var tabPanelStyles = {
54
55
  padding: 0
55
56
  };
56
- const setTab = tab => {
57
+ var setTab = function setTab(tab) {
57
58
  if (onTabChange) {
58
59
  onTabChange(tab);
59
60
  } else {
60
61
  setSelectedTab(tab);
61
62
  }
62
63
  };
63
- (0, _react.useEffect)(() => {
64
+ (0, _react.useEffect)(function () {
64
65
  if (activeTab !== undefined) {
65
66
  setSelectedTab(activeTab);
66
67
  }
@@ -78,7 +79,9 @@ const Tabs = _ref => {
78
79
  sx: {
79
80
  minHeight: theme.spacing(4.5)
80
81
  },
81
- onChange: (unused, value) => setTab(value),
82
+ onChange: function onChange(unused, value) {
83
+ return setTab(value);
84
+ },
82
85
  TabIndicatorProps: {
83
86
  style: {
84
87
  background: theme.palette.TwClrBgBrand,
@@ -86,19 +89,24 @@ const Tabs = _ref => {
86
89
  borderRadius: '4px 4px 0 0'
87
90
  }
88
91
  }
89
- }, tabs.map((tab, index) => /*#__PURE__*/_react.default.createElement(_material.Tab, {
90
- icon: tab.icon ? /*#__PURE__*/_react.default.createElement(_Icon.default, {
91
- name: tab.icon
92
- }) : undefined,
93
- label: tab.label,
94
- value: tab.id,
95
- sx: tabStyles,
96
- key: index,
97
- disabled: tab.disabled
98
- })))), tabs.map((tab, index) => /*#__PURE__*/_react.default.createElement(_lab.TabPanel, {
99
- value: tab.id,
100
- key: index,
101
- sx: tabPanelStyles
102
- }, tab.children))));
92
+ }, tabs.map(function (tab, index) {
93
+ return /*#__PURE__*/_react.default.createElement(_material.Tab, {
94
+ icon: tab.icon ? /*#__PURE__*/_react.default.createElement(_Icon.default, {
95
+ name: tab.icon
96
+ }) : undefined,
97
+ label: tab.label,
98
+ value: tab.id,
99
+ sx: tabStyles,
100
+ key: index,
101
+ disabled: tab.disabled
102
+ });
103
+ }))), tabs.map(function (tab, index) {
104
+ return /*#__PURE__*/_react.default.createElement(_lab.TabPanel, {
105
+ value: tab.id,
106
+ key: index,
107
+ sx: tabPanelStyles
108
+ }, tab.children);
109
+ })));
103
110
  };
104
- var _default = exports.default = Tabs;
111
+ var _default = Tabs;
112
+ exports.default = _default;
@@ -1,33 +1,38 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = TextTruncated;
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
8
11
  var _material = require("@mui/material");
9
12
  var _react = _interopRequireWildcard(require("react"));
10
13
  var _styles = require("@mui/styles");
11
- const useStyles = (0, _styles.makeStyles)(theme => ({
12
- arrow: {
13
- color: "".concat(theme.palette.TwClrBg, " !important"),
14
- '&:before': {
15
- border: "1px solid ".concat(theme.palette.TwClrBrdrTertiary)
14
+ var useStyles = (0, _styles.makeStyles)(function (theme) {
15
+ return {
16
+ arrow: {
17
+ color: "".concat(theme.palette.TwClrBg, " !important"),
18
+ '&:before': {
19
+ border: "1px solid ".concat(theme.palette.TwClrBrdrTertiary)
20
+ }
21
+ },
22
+ popper: {
23
+ maxHeight: '200px',
24
+ overflow: 'auto'
25
+ },
26
+ tooltip: {
27
+ backgroundColor: "".concat(theme.palette.TwClrBg, " !important"),
28
+ color: "".concat(theme.palette.TwClrTxt, " !important"),
29
+ border: "1px solid ".concat(theme.palette.TwClrBrdrTertiary, " !important"),
30
+ borderRadius: '8px !important',
31
+ boxShadow: "0px 3px 3px ".concat(theme.palette.TwClrBaseGray100),
32
+ padding: '8px'
16
33
  }
17
- },
18
- popper: {
19
- maxHeight: '200px',
20
- overflow: 'auto'
21
- },
22
- tooltip: {
23
- backgroundColor: "".concat(theme.palette.TwClrBg, " !important"),
24
- color: "".concat(theme.palette.TwClrTxt, " !important"),
25
- border: "1px solid ".concat(theme.palette.TwClrBrdrTertiary, " !important"),
26
- borderRadius: '8px !important',
27
- boxShadow: "0px 3px 3px ".concat(theme.palette.TwClrBaseGray100),
28
- padding: '8px'
29
- }
30
- }));
34
+ };
35
+ });
31
36
 
32
37
  /**
33
38
  * Represents the result of truncating the string list
@@ -60,10 +65,10 @@ function computeFromStringList(strings, maxLength, listSeparator) {
60
65
  }
61
66
 
62
67
  // concatenate strings with ', ' and stop before exceeding max
63
- let stringsRemaining = strings.length - 1;
64
- let result = strings[0];
65
- for (let i = 1; i < strings.length; i++) {
66
- const tempResult = [result, strings[i]].join(listSeparator);
68
+ var stringsRemaining = strings.length - 1;
69
+ var result = strings[0];
70
+ for (var i = 1; i < strings.length; i++) {
71
+ var tempResult = [result, strings[i]].join(listSeparator);
67
72
  if (tempResult.length > maxLength) {
68
73
  break;
69
74
  }
@@ -76,44 +81,48 @@ function computeFromStringList(strings, maxLength, listSeparator) {
76
81
  };
77
82
  }
78
83
  function TextTruncated(props) {
79
- const {
80
- stringList,
81
- listSeparator,
82
- maxLengthPx,
83
- moreSeparator,
84
- moreText,
85
- textStyle,
86
- showAllStyle,
87
- placeHolder
88
- } = props;
89
- const [showAllOpen, setShowAllOpen] = (0, _react.useState)(false);
90
- const classes = useStyles();
91
- const [canvasContext, setCanvasContext] = (0, _react.useState)();
92
- const theme = (0, _material.useTheme)();
93
- (0, _react.useEffect)(() => {
84
+ var stringList = props.stringList,
85
+ listSeparator = props.listSeparator,
86
+ maxLengthPx = props.maxLengthPx,
87
+ moreSeparator = props.moreSeparator,
88
+ moreText = props.moreText,
89
+ textStyle = props.textStyle,
90
+ showAllStyle = props.showAllStyle,
91
+ placeHolder = props.placeHolder;
92
+ var _useState = (0, _react.useState)(false),
93
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
94
+ showAllOpen = _useState2[0],
95
+ setShowAllOpen = _useState2[1];
96
+ var classes = useStyles();
97
+ var _useState3 = (0, _react.useState)(),
98
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
99
+ canvasContext = _useState4[0],
100
+ setCanvasContext = _useState4[1];
101
+ var theme = (0, _material.useTheme)();
102
+ (0, _react.useEffect)(function () {
94
103
  var _canvas$getContext;
95
- const canvas = document.createElement('canvas');
104
+ var canvas = document.createElement('canvas');
96
105
  setCanvasContext((_canvas$getContext = canvas === null || canvas === void 0 ? void 0 : canvas.getContext('2d')) !== null && _canvas$getContext !== void 0 ? _canvas$getContext : undefined);
97
106
  }, []);
98
- const pixelsPerChar = (0, _react.useMemo)(() => {
107
+ var pixelsPerChar = (0, _react.useMemo)(function () {
99
108
  // compute the pixels per character, averaged over the comma-separated joined stringList
100
- const fullText = stringList.join(listSeparator);
101
- let result = 0;
109
+ var fullText = stringList.join(listSeparator);
110
+ var result = 0;
102
111
  if (canvasContext) {
103
- const fontSize = textStyle && textStyle.fontSize || theme.typography.fontSize;
104
- const fontFamily = textStyle && textStyle.fontFamily || theme.typography.fontFamily;
112
+ var fontSize = textStyle && textStyle.fontSize || theme.typography.fontSize;
113
+ var fontFamily = textStyle && textStyle.fontFamily || theme.typography.fontFamily;
105
114
  canvasContext.font = "".concat(fontSize, "px ").concat(fontFamily);
106
115
  result = canvasContext.measureText(fullText).width;
107
116
  }
108
117
  return result / fullText.length;
109
118
  }, [stringList, textStyle, canvasContext, theme.typography.fontFamily, theme.typography.fontSize]);
110
- let maxExcludingSuffix = stringList.join(listSeparator).length;
119
+ var maxExcludingSuffix = stringList.join(listSeparator).length;
111
120
  if (pixelsPerChar > 0) {
112
- const maxChars = maxLengthPx / pixelsPerChar;
121
+ var maxChars = maxLengthPx / pixelsPerChar;
113
122
  maxExcludingSuffix = maxChars - moreSeparator.length - moreText.length - 1 - Math.ceil(Math.log10(stringList.length));
114
123
  }
115
- const textToDisplay = computeFromStringList(stringList, maxExcludingSuffix, listSeparator);
116
- const onClickHandler = e => {
124
+ var textToDisplay = computeFromStringList(stringList, maxExcludingSuffix, listSeparator);
125
+ var onClickHandler = function onClickHandler(e) {
117
126
  e.stopPropagation();
118
127
  setShowAllOpen(!showAllOpen);
119
128
  };
@@ -134,15 +143,16 @@ function TextTruncated(props) {
134
143
  }, /*#__PURE__*/_react.default.createElement(_material.Link, {
135
144
  component: "button",
136
145
  onClick: onClickHandler,
137
- onBlur: () => setShowAllOpen(false),
146
+ onBlur: function onBlur() {
147
+ return setShowAllOpen(false);
148
+ },
138
149
  sx: {
139
150
  color: theme.palette.TwClrTxtBrand,
140
151
  textDecorationColor: "".concat(theme.palette.TwClrTxtBrand, "80")
141
152
  }
142
153
  }, /*#__PURE__*/_react.default.createElement(_material.Typography, {
143
- sx: {
144
- ...textStyle,
154
+ sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, textStyle), {}, {
145
155
  marginTop: '-3px'
146
- }
156
+ })
147
157
  }, (textToDisplay.numberMore > 0 ? textToDisplay.numberMore + ' ' : '') + moreText))) : null) : placeHolder || /*#__PURE__*/_react.default.createElement("div", null);
148
158
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TooltipProps } from '@mui/material';
3
2
  import { IconName } from '../Icon/icons';
4
3
  import './styles.scss';
@@ -1 +1 @@
1
- {"version":3,"file":"Textfield.d.ts","sourceRoot":"","sources":["../../../src/components/Textfield/Textfield.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,eAAe,CAAC;AAKvB,KAAK,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEpD,KAAK,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAExC,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,KAAK;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,YAAY,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA8J3D"}
1
+ {"version":3,"file":"Textfield.d.ts","sourceRoot":"","sources":["../../../src/components/Textfield/Textfield.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,eAAe,CAAC;AAKvB,KAAK,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEpD,KAAK,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAExC,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,KAAK;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,YAAY,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA8J3D"}
@@ -14,44 +14,42 @@ var _utils = require("../../utils");
14
14
  var _IconTooltip = _interopRequireDefault(require("../IconTooltip"));
15
15
  var _TruncatedTextArea = _interopRequireDefault(require("./TruncatedTextArea"));
16
16
  function TextField(props) {
17
- const {
18
- autoFocus,
19
- label,
20
- className,
21
- disabled,
22
- disabledCharacters,
23
- display,
24
- errorText,
25
- helperText,
26
- iconLeft,
27
- iconRight,
28
- id,
29
- min,
30
- max,
31
- onBlur,
32
- onChange,
33
- onClickRightIcon,
34
- onKeyDown,
35
- placeholder,
36
- preserveNewlines,
37
- readonly,
38
- required,
39
- styles,
40
- tooltipTitle,
41
- truncateConfig,
42
- type,
43
- value,
44
- warningText
45
- } = props;
46
- const textfieldClass = (0, _classnames.default)({
17
+ var autoFocus = props.autoFocus,
18
+ label = props.label,
19
+ className = props.className,
20
+ disabled = props.disabled,
21
+ disabledCharacters = props.disabledCharacters,
22
+ display = props.display,
23
+ errorText = props.errorText,
24
+ helperText = props.helperText,
25
+ iconLeft = props.iconLeft,
26
+ iconRight = props.iconRight,
27
+ id = props.id,
28
+ min = props.min,
29
+ max = props.max,
30
+ onBlur = props.onBlur,
31
+ onChange = props.onChange,
32
+ onClickRightIcon = props.onClickRightIcon,
33
+ onKeyDown = props.onKeyDown,
34
+ placeholder = props.placeholder,
35
+ preserveNewlines = props.preserveNewlines,
36
+ readonly = props.readonly,
37
+ required = props.required,
38
+ styles = props.styles,
39
+ tooltipTitle = props.tooltipTitle,
40
+ truncateConfig = props.truncateConfig,
41
+ type = props.type,
42
+ value = props.value,
43
+ warningText = props.warningText;
44
+ var textfieldClass = (0, _classnames.default)({
47
45
  'textfield-value': true,
48
46
  'textfield-value--disabled': disabled,
49
47
  'textfield-value--error': !!errorText,
50
48
  'textfield-value--warning': !!warningText,
51
49
  'textfield-value--readonly': readonly
52
50
  });
53
- const textfieldOnChange = event => {
54
- const textValue = event.target.value;
51
+ var textfieldOnChange = function textfieldOnChange(event) {
52
+ var textValue = event.target.value;
55
53
  if ((0, _utils.isWhitespaces)(textValue)) {
56
54
  return;
57
55
  }
@@ -59,7 +57,7 @@ function TextField(props) {
59
57
  onChange(textValue);
60
58
  }
61
59
  };
62
- const onKeyDownHandler = e => {
60
+ var onKeyDownHandler = function onKeyDownHandler(e) {
63
61
  if (disabledCharacters && disabledCharacters.includes(e.key)) {
64
62
  e === null || e === void 0 ? void 0 : e.preventDefault();
65
63
  return;
@@ -68,7 +66,7 @@ function TextField(props) {
68
66
  onKeyDown(e.key);
69
67
  }
70
68
  };
71
- const renderRightIcon = () => {
69
+ var renderRightIcon = function renderRightIcon() {
72
70
  if (iconRight === 'cancel' && !value) {
73
71
  return null;
74
72
  }
@@ -80,8 +78,8 @@ function TextField(props) {
80
78
  className: "textfield-value--icon-right".concat(iconRight === 'cancel' ? '--cancel' : '')
81
79
  }));
82
80
  };
83
- const typeProps = {
84
- type
81
+ var typeProps = {
82
+ type: type
85
83
  };
86
84
  if (type === 'number') {
87
85
  if (min !== undefined) {
@@ -91,7 +89,7 @@ function TextField(props) {
91
89
  typeProps.max = max;
92
90
  }
93
91
  }
94
- const displayComponent = (0, _react.useMemo)(() => {
92
+ var displayComponent = (0, _react.useMemo)(function () {
95
93
  if (!display) {
96
94
  return null;
97
95
  }
@@ -128,7 +126,9 @@ function TextField(props) {
128
126
  onChange: textfieldOnChange,
129
127
  onBlur: onBlur,
130
128
  onKeyDown: onKeyDownHandler,
131
- onWheel: e => e.currentTarget.blur(),
129
+ onWheel: function onWheel(e) {
130
+ return e.currentTarget.blur();
131
+ },
132
132
  required: required
133
133
  }, typeProps)), iconRight ? renderRightIcon() : null) : /*#__PURE__*/_react.default.createElement("textarea", {
134
134
  autoFocus: autoFocus,
@@ -4,6 +4,6 @@ interface TruncatedTextAreaProps {
4
4
  truncateConfig: TruncateConfig;
5
5
  value?: string | number;
6
6
  }
7
- declare const TruncatedTextArea: ({ preserveNewlines, truncateConfig, value }: TruncatedTextAreaProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const TruncatedTextArea: ({ preserveNewlines, truncateConfig, value }: TruncatedTextAreaProps) => JSX.Element;
8
8
  export default TruncatedTextArea;
9
9
  //# sourceMappingURL=TruncatedTextArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TruncatedTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/Textfield/TruncatedTextArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,UAAU,sBAAsB;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,iBAAiB,gDAAiD,sBAAsB,4CAyD7F,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"TruncatedTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/Textfield/TruncatedTextArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,UAAU,sBAAsB;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,iBAAiB,gDAAiD,sBAAsB,gBAyD7F,CAAC;AAEF,eAAe,iBAAiB,CAAC"}