@terraware/web-components 4.2.12 → 4.2.14-rc.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 (304) hide show
  1. package/components/AntSwitch/index.js +8 -14
  2. package/components/Autocomplete/Autocomplete.js +67 -70
  3. package/components/Badge/index.js +16 -20
  4. package/components/BusySpinner/index.js +30 -35
  5. package/components/Button/Button.js +23 -27
  6. package/components/Button/button.test.js +8 -10
  7. package/components/Checkbox.js +10 -19
  8. package/components/Confirm/index.js +44 -51
  9. package/components/DatePicker/DatePicker.js +116 -117
  10. package/components/DialogBox/DialogBox.js +76 -66
  11. package/components/Divisor.js +15 -20
  12. package/components/Dropdown.js +54 -61
  13. package/components/EditableTable/index.js +129 -135
  14. package/components/ErrorBox/ErrorBox.js +37 -36
  15. package/components/FileChooser/index.js +73 -77
  16. package/components/FormBottomBar/index.js +63 -69
  17. package/components/Icon/Icon.js +14 -21
  18. package/components/Icon/icons/index.d.ts +1 -1
  19. package/components/Icon/icons/index.d.ts.map +1 -1
  20. package/components/Icon/icons/index.js +251 -255
  21. package/components/IconTooltip/index.js +29 -34
  22. package/components/Map/MapBox.js +199 -220
  23. package/components/Map/MapContainer.js +14 -18
  24. package/components/Map/MapDateSliderControl.js +44 -46
  25. package/components/Map/MapDrawer.js +32 -33
  26. package/components/Map/MapLegend.js +96 -95
  27. package/components/Map/MapViewStyleControl.js +38 -48
  28. package/components/Map/ReactMapboxWrapper.js +2 -9
  29. package/components/Map/index.js +47 -55
  30. package/components/Map/types.js +2 -8
  31. package/components/Map/useMaintainLayerOrder.js +4 -11
  32. package/components/Markdown/index.js +14 -21
  33. package/components/Message/Message.js +59 -51
  34. package/components/MultiSelect/MultiSelect.test.js +22 -24
  35. package/components/MultiSelect/index.js +73 -69
  36. package/components/Navbar/NavFooter.js +8 -13
  37. package/components/Navbar/NavItem.js +43 -37
  38. package/components/Navbar/NavSection.js +13 -17
  39. package/components/Navbar/Navbar.js +35 -38
  40. package/components/Navbar/SubNavbar.js +8 -13
  41. package/components/Note.js +14 -19
  42. package/components/OverlayModal/OverlayModal.js +36 -37
  43. package/components/PageForm/index.js +30 -35
  44. package/components/PhotoChooser/index.js +93 -98
  45. package/components/Pill/index.js +29 -31
  46. package/components/PillList/index.js +16 -22
  47. package/components/PlacementWrapper/index.js +20 -25
  48. package/components/PopoverMenu/Popover.js +33 -37
  49. package/components/PopoverMenu/index.js +41 -46
  50. package/components/PopoverMultiSelect/index.js +18 -21
  51. package/components/ProgressCircle/ProgressCircle.js +23 -26
  52. package/components/RadioButton.js +7 -14
  53. package/components/Select/Select.js +8 -13
  54. package/components/Select/SelectT.js +110 -108
  55. package/components/Separator/index.js +8 -14
  56. package/components/Size.js +1 -5
  57. package/components/Slider/index.js +7 -13
  58. package/components/SummaryBox.js +36 -39
  59. package/components/Tabs/index.js +75 -77
  60. package/components/TextTruncated/index.js +64 -65
  61. package/components/Textfield/Textfield.js +100 -95
  62. package/components/Textfield/TruncatedTextArea.js +44 -46
  63. package/components/TimelineSlider/TimelineMarker.js +24 -28
  64. package/components/TimelineSlider/TimelineRail.js +5 -11
  65. package/components/TimelineSlider/index.js +47 -51
  66. package/components/Tooltip/Tooltip.js +21 -26
  67. package/components/ViewPhotosDialog/index.js +58 -62
  68. package/components/VirtualWalkthrough/Annotation.d.ts +41 -0
  69. package/components/VirtualWalkthrough/Annotation.d.ts.map +1 -0
  70. package/components/VirtualWalkthrough/Annotation.js +197 -0
  71. package/components/VirtualWalkthrough/AnnotationEditPane.d.ts +20 -0
  72. package/components/VirtualWalkthrough/AnnotationEditPane.d.ts.map +1 -0
  73. package/components/VirtualWalkthrough/AnnotationEditPane.js +136 -0
  74. package/components/VirtualWalkthrough/AnnotationPanel.d.ts +13 -0
  75. package/components/VirtualWalkthrough/AnnotationPanel.d.ts.map +1 -0
  76. package/components/VirtualWalkthrough/AnnotationPanel.js +196 -0
  77. package/components/VirtualWalkthrough/Application.d.ts +9 -0
  78. package/components/VirtualWalkthrough/Application.d.ts.map +1 -0
  79. package/components/VirtualWalkthrough/Application.js +32 -0
  80. package/components/VirtualWalkthrough/AutoRotator.d.ts +109 -0
  81. package/components/VirtualWalkthrough/AutoRotator.d.ts.map +1 -0
  82. package/components/VirtualWalkthrough/AutoRotator.js +217 -0
  83. package/components/VirtualWalkthrough/BlockingSpinner.d.ts +3 -0
  84. package/components/VirtualWalkthrough/BlockingSpinner.d.ts.map +1 -0
  85. package/components/VirtualWalkthrough/BlockingSpinner.js +27 -0
  86. package/components/VirtualWalkthrough/BoundaryRing.d.ts +9 -0
  87. package/components/VirtualWalkthrough/BoundaryRing.d.ts.map +1 -0
  88. package/components/VirtualWalkthrough/BoundaryRing.js +33 -0
  89. package/components/VirtualWalkthrough/CameraInfo.d.ts +16 -0
  90. package/components/VirtualWalkthrough/CameraInfo.d.ts.map +1 -0
  91. package/components/VirtualWalkthrough/CameraInfo.js +88 -0
  92. package/components/VirtualWalkthrough/ControlsInfoPane.d.ts +37 -0
  93. package/components/VirtualWalkthrough/ControlsInfoPane.d.ts.map +1 -0
  94. package/components/VirtualWalkthrough/ControlsInfoPane.js +196 -0
  95. package/components/VirtualWalkthrough/GradientSky.d.ts +9 -0
  96. package/components/VirtualWalkthrough/GradientSky.d.ts.map +1 -0
  97. package/components/VirtualWalkthrough/GradientSky.js +73 -0
  98. package/components/VirtualWalkthrough/SplatControls.d.ts +50 -0
  99. package/components/VirtualWalkthrough/SplatControls.d.ts.map +1 -0
  100. package/components/VirtualWalkthrough/SplatControls.js +252 -0
  101. package/components/VirtualWalkthrough/SplatCrop.d.ts +8 -0
  102. package/components/VirtualWalkthrough/SplatCrop.d.ts.map +1 -0
  103. package/components/VirtualWalkthrough/SplatCrop.js +18 -0
  104. package/components/VirtualWalkthrough/SplatFadeCrop.d.ts +8 -0
  105. package/components/VirtualWalkthrough/SplatFadeCrop.d.ts.map +1 -0
  106. package/components/VirtualWalkthrough/SplatFadeCrop.js +18 -0
  107. package/components/VirtualWalkthrough/SplatModel.d.ts +15 -0
  108. package/components/VirtualWalkthrough/SplatModel.d.ts.map +1 -0
  109. package/components/VirtualWalkthrough/SplatModel.js +60 -0
  110. package/components/VirtualWalkthrough/SplatRevealRain.d.ts +18 -0
  111. package/components/VirtualWalkthrough/SplatRevealRain.d.ts.map +1 -0
  112. package/components/VirtualWalkthrough/SplatRevealRain.js +38 -0
  113. package/components/VirtualWalkthrough/TfAnnotationManager.d.ts +110 -0
  114. package/components/VirtualWalkthrough/TfAnnotationManager.d.ts.map +1 -0
  115. package/components/VirtualWalkthrough/TfAnnotationManager.js +368 -0
  116. package/components/VirtualWalkthrough/TfXrNavigation.d.ts +15 -0
  117. package/components/VirtualWalkthrough/TfXrNavigation.d.ts.map +1 -0
  118. package/components/VirtualWalkthrough/TfXrNavigation.js +24 -0
  119. package/components/VirtualWalkthrough/annotation-styles.css +5 -0
  120. package/components/VirtualWalkthrough/application-styles.css +4 -0
  121. package/components/VirtualWalkthrough/boundary-ring.d.ts +47 -0
  122. package/components/VirtualWalkthrough/boundary-ring.d.ts.map +1 -0
  123. package/components/VirtualWalkthrough/boundary-ring.js +125 -0
  124. package/components/VirtualWalkthrough/boundary-ring.test.js +109 -0
  125. package/components/VirtualWalkthrough/groundPlane.d.ts +14 -0
  126. package/components/VirtualWalkthrough/groundPlane.d.ts.map +1 -0
  127. package/components/VirtualWalkthrough/groundPlane.js +47 -0
  128. package/components/VirtualWalkthrough/groundPlane.test.js +45 -0
  129. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts +19 -0
  130. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts.map +1 -0
  131. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +119 -0
  132. package/components/VirtualWalkthrough/walkthrough-camera.d.ts +77 -0
  133. package/components/VirtualWalkthrough/walkthrough-camera.d.ts.map +1 -0
  134. package/components/VirtualWalkthrough/walkthrough-camera.js +320 -0
  135. package/components/svg/BlobbyGrayIconImage.js +36 -41
  136. package/components/svg/BlobbyGrayIconImport.js +36 -41
  137. package/components/svg/BlobbyGrayIconUploadToTheCloud.js +36 -41
  138. package/components/svg/BlobbyIconCloudChecked.js +161 -158
  139. package/components/svg/BlobbyIconExportOrUploadPhoto.js +161 -158
  140. package/components/svg/BlobbyIconFolder.js +161 -158
  141. package/components/svg/BlobbyIconGraphReport.js +161 -158
  142. package/components/svg/BlobbyIconHappy.js +161 -158
  143. package/components/svg/BlobbyIconHeartMonitor.js +161 -158
  144. package/components/svg/BlobbyIconLeaf.js +161 -158
  145. package/components/svg/BlobbyIconLibrary.js +161 -158
  146. package/components/svg/BlobbyIconNursery.js +163 -160
  147. package/components/svg/BlobbyIconOrganization.js +161 -158
  148. package/components/svg/BlobbyIconParchment.js +161 -158
  149. package/components/svg/BlobbyIconPeople.js +161 -158
  150. package/components/svg/BlobbyIconSeedBank.js +161 -158
  151. package/components/svg/BlobbyIconSeedling.js +161 -158
  152. package/components/svg/BlobbyIconSeeds.js +161 -158
  153. package/components/svg/BlobbyIconSite.js +164 -161
  154. package/components/svg/BlobbyIconSparkles.js +161 -158
  155. package/components/svg/BlobbyIconWrench.js +161 -158
  156. package/components/svg/Bug.js +18 -27
  157. package/components/svg/Calendar.js +18 -27
  158. package/components/svg/CaretDown.js +18 -27
  159. package/components/svg/CaretLeft.js +18 -27
  160. package/components/svg/CaretRight.js +18 -27
  161. package/components/svg/CaretUp.js +18 -27
  162. package/components/svg/ChevronDown.js +18 -27
  163. package/components/svg/ChevronUp.js +18 -27
  164. package/components/svg/Close.js +18 -27
  165. package/components/svg/Critical.js +18 -27
  166. package/components/svg/Edit.js +161 -158
  167. package/components/svg/Error.js +18 -27
  168. package/components/svg/Filter.js +18 -27
  169. package/components/svg/Folder.js +18 -27
  170. package/components/svg/Help.js +18 -27
  171. package/components/svg/Home.js +18 -27
  172. package/components/svg/IconAdd.js +18 -27
  173. package/components/svg/IconArrowRight.js +19 -28
  174. package/components/svg/IconBusinessNetwork.js +18 -27
  175. package/components/svg/IconCalendar.d.ts +1 -1
  176. package/components/svg/IconCalendar.d.ts.map +1 -1
  177. package/components/svg/IconCalendar.js +18 -27
  178. package/components/svg/IconCancel.js +18 -27
  179. package/components/svg/IconChargingBattery.js +18 -27
  180. package/components/svg/IconChecklist.js +19 -28
  181. package/components/svg/IconCheckmark.js +18 -27
  182. package/components/svg/IconCoinInHand.js +18 -27
  183. package/components/svg/IconColumns.js +18 -27
  184. package/components/svg/IconComment.js +18 -27
  185. package/components/svg/IconDashboard.js +18 -27
  186. package/components/svg/IconDataMigration.js +18 -27
  187. package/components/svg/IconDocument.d.ts +8 -0
  188. package/components/svg/IconDocument.d.ts.map +1 -0
  189. package/components/svg/IconDocument.js +21 -0
  190. package/components/svg/IconDownloadFromTheCloud.js +19 -28
  191. package/components/svg/IconEdit.js +19 -28
  192. package/components/svg/IconExpand.js +19 -28
  193. package/components/svg/IconExport.js +18 -27
  194. package/components/svg/IconExternalLink.js +18 -27
  195. package/components/svg/IconEye.js +18 -27
  196. package/components/svg/IconEyeOff.js +18 -27
  197. package/components/svg/IconFile.js +18 -27
  198. package/components/svg/IconFolder.js +18 -27
  199. package/components/svg/IconFullScreen.js +18 -27
  200. package/components/svg/IconFutures.js +18 -27
  201. package/components/svg/IconGraphReport.js +18 -27
  202. package/components/svg/IconHeartMonitor.js +18 -27
  203. package/components/svg/IconHelp.js +19 -28
  204. package/components/svg/IconHistory.js +18 -27
  205. package/components/svg/IconImport.js +18 -27
  206. package/components/svg/IconIndex.js +18 -27
  207. package/components/svg/IconLayers.js +18 -27
  208. package/components/svg/IconLibrary.js +18 -27
  209. package/components/svg/IconList.js +18 -27
  210. package/components/svg/IconLivePlant.js +18 -27
  211. package/components/svg/IconLocations.js +18 -27
  212. package/components/svg/IconMail.js +18 -27
  213. package/components/svg/IconManager.js +18 -27
  214. package/components/svg/IconMarker.js +18 -27
  215. package/components/svg/IconMenu.js +18 -27
  216. package/components/svg/IconMenuHorizontal.js +18 -27
  217. package/components/svg/IconModule.js +18 -27
  218. package/components/svg/IconMyLocation.js +18 -27
  219. package/components/svg/IconNote.js +19 -28
  220. package/components/svg/IconNursery.js +18 -27
  221. package/components/svg/IconOrg.js +18 -27
  222. package/components/svg/IconParchment.js +18 -27
  223. package/components/svg/IconPhoto.js +18 -27
  224. package/components/svg/IconPlantsFilled.js +18 -27
  225. package/components/svg/IconRedo.js +18 -27
  226. package/components/svg/IconRestorationSite.js +18 -27
  227. package/components/svg/IconSeedBank.js +18 -27
  228. package/components/svg/IconSeedling.js +18 -27
  229. package/components/svg/IconSettings.js +18 -27
  230. package/components/svg/IconSlice.js +18 -27
  231. package/components/svg/IconSubmit.js +18 -27
  232. package/components/svg/IconSubtract.js +19 -28
  233. package/components/svg/IconSynced.js +18 -27
  234. package/components/svg/IconTrashCan.js +18 -27
  235. package/components/svg/IconTreasureMap.js +18 -27
  236. package/components/svg/IconUnavailable.js +18 -27
  237. package/components/svg/IconUndo.js +18 -27
  238. package/components/svg/IconVariable.js +18 -27
  239. package/components/svg/IconVideo.js +19 -28
  240. package/components/svg/IconWifi.js +18 -27
  241. package/components/svg/Info.js +18 -27
  242. package/components/svg/Key.js +18 -27
  243. package/components/svg/Leaf.js +18 -27
  244. package/components/svg/Lock.js +18 -27
  245. package/components/svg/Logo.js +40 -45
  246. package/components/svg/MenuVertical.js +18 -27
  247. package/components/svg/Notification.js +18 -27
  248. package/components/svg/Person.js +18 -27
  249. package/components/svg/Plus.js +18 -27
  250. package/components/svg/RestorationSite.js +18 -27
  251. package/components/svg/Search.js +18 -27
  252. package/components/svg/Seeds.js +18 -27
  253. package/components/svg/Site.js +18 -27
  254. package/components/svg/Sparkles.js +18 -27
  255. package/components/svg/Species.js +18 -27
  256. package/components/svg/Species2.js +161 -158
  257. package/components/svg/Spinner.js +27 -36
  258. package/components/svg/Star.js +18 -27
  259. package/components/svg/Success.js +18 -27
  260. package/components/svg/SuccessFilled.js +18 -27
  261. package/components/svg/TerrawareLogoDesktop.js +44 -49
  262. package/components/svg/TerrawareLogoMobile.js +20 -29
  263. package/components/svg/Touchscreen.js +18 -27
  264. package/components/svg/UploadCloud.js +161 -158
  265. package/components/svg/Warning.js +18 -27
  266. package/components/svg/WelcomeClipboard.js +130 -135
  267. package/components/svg/index.d.ts +1 -0
  268. package/components/svg/index.d.ts.map +1 -1
  269. package/components/svg/index.js +127 -888
  270. package/components/table/EnhancedTableToolbar.js +45 -47
  271. package/components/table/EnhancedTableToolbarV2.js +18 -26
  272. package/components/table/TableCellRenderer.js +137 -143
  273. package/components/table/TableHeader.js +45 -47
  274. package/components/table/TableHeaderItem.js +65 -64
  275. package/components/table/density.js +3 -11
  276. package/components/table/index.js +225 -218
  277. package/components/table/sort.js +8 -18
  278. package/components/table/sort.test.js +6 -8
  279. package/components/table/types.js +1 -5
  280. package/components/types/index.js +1 -5
  281. package/hooks/useBoolean.d.ts +4 -0
  282. package/hooks/useBoolean.d.ts.map +1 -0
  283. package/hooks/useBoolean.js +12 -0
  284. package/hooks/useCameraPosition.d.ts +8 -0
  285. package/hooks/useCameraPosition.d.ts.map +1 -0
  286. package/hooks/useCameraPosition.js +33 -0
  287. package/index.js +57 -398
  288. package/license-report.html +1 -1
  289. package/package.json +10 -3
  290. package/style-dictionary-dist/TerrawareTheme.js +1 -7
  291. package/theme.js +7 -14
  292. package/utils/color.d.ts +2 -0
  293. package/utils/color.d.ts.map +1 -0
  294. package/utils/color.js +14 -0
  295. package/utils/date.js +13 -24
  296. package/utils/date.test.js +40 -43
  297. package/utils/index.js +5 -53
  298. package/utils/preventDefaultEvent.js +1 -7
  299. package/utils/text.js +2 -9
  300. package/utils/text.test.js +9 -11
  301. package/utils/useDeviceInfo.js +10 -16
  302. package/virtualWalkthrough.d.ts +31 -0
  303. package/virtualWalkthrough.d.ts.map +1 -0
  304. package/virtualWalkthrough.js +28 -0
@@ -1,26 +1,18 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = PopoverMenu;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _material = require("@mui/material");
11
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
12
- var _Popover = _interopRequireDefault(require("./Popover"));
13
- function PopoverMenu(_ref) {
14
- let {
15
- anchor,
16
- container,
17
- menuSections,
18
- onClick,
19
- showChevron = true,
20
- selectedValue
21
- } = _ref;
22
- const theme = (0, _material.useTheme)();
23
- const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
1
+ import React, { useState } from 'react';
2
+ import { IconButton, useTheme } from '@mui/material';
3
+ import Icon from '../Icon/Icon';
4
+ import Popover from './Popover';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ export default function PopoverMenu({
7
+ anchor,
8
+ container,
9
+ menuSections,
10
+ onClick,
11
+ showChevron = true,
12
+ selectedValue
13
+ }) {
14
+ const theme = useTheme();
15
+ const [anchorEl, setAnchorEl] = useState(null);
24
16
  const handleClick = event => {
25
17
  setAnchorEl(event.currentTarget);
26
18
  };
@@ -33,27 +25,30 @@ function PopoverMenu(_ref) {
33
25
  }
34
26
  handleClose();
35
27
  };
36
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.IconButton, {
37
- onClick: handleClick,
38
- size: "small",
39
- sx: {
40
- height: '48px',
41
- borderRadius: '16px',
42
- padding: theme.spacing(1.5, 2)
43
- }
44
- }, anchor, showChevron && /*#__PURE__*/_react.default.createElement(_Icon.default, {
45
- name: "chevronDown",
46
- size: "medium",
47
- style: {
48
- marginLeft: '8px',
49
- fill: theme.palette.TwClrIcn
50
- }
51
- })), /*#__PURE__*/_react.default.createElement(_Popover.default, {
52
- sections: menuSections,
53
- handleClick: onItemClick,
54
- anchorElement: anchorEl,
55
- setAnchorElement: setAnchorEl,
56
- selectedValue: selectedValue,
57
- container: container
58
- }));
28
+ return /*#__PURE__*/_jsxs("div", {
29
+ children: [/*#__PURE__*/_jsxs(IconButton, {
30
+ onClick: handleClick,
31
+ size: "small",
32
+ sx: {
33
+ height: '48px',
34
+ borderRadius: '16px',
35
+ padding: theme.spacing(1.5, 2)
36
+ },
37
+ children: [anchor, showChevron && /*#__PURE__*/_jsx(Icon, {
38
+ name: "chevronDown",
39
+ size: "medium",
40
+ style: {
41
+ marginLeft: '8px',
42
+ fill: theme.palette.TwClrIcn
43
+ }
44
+ })]
45
+ }), /*#__PURE__*/_jsx(Popover, {
46
+ sections: menuSections,
47
+ handleClick: onItemClick,
48
+ anchorElement: anchorEl,
49
+ setAnchorElement: setAnchorEl,
50
+ selectedValue: selectedValue,
51
+ container: container
52
+ })]
53
+ });
59
54
  }
@@ -1,17 +1,10 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = PopoverMultiSelect;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _material = require("@mui/material");
11
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
12
- var _Popover = _interopRequireDefault(require("../PopoverMenu/Popover"));
13
- require("./styles.scss");
14
- function PopoverMultiSelect(props) {
1
+ import React, { useState } from 'react';
2
+ import { ListItemText } from '@mui/material';
3
+ import Icon from '../Icon/Icon';
4
+ import Popover from '../PopoverMenu/Popover';
5
+ import './styles.scss';
6
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export default function PopoverMultiSelect(props) {
15
8
  const {
16
9
  anchorElement,
17
10
  initialSelection,
@@ -20,7 +13,7 @@ function PopoverMultiSelect(props) {
20
13
  sections,
21
14
  setAnchorElement
22
15
  } = props;
23
- const [selection, setSelection] = (0, _react.useState)(initialSelection);
16
+ const [selection, setSelection] = useState(initialSelection);
24
17
  const addToSelection = value => {
25
18
  const newSelection = [...selection];
26
19
  newSelection.push(value);
@@ -34,11 +27,11 @@ function PopoverMultiSelect(props) {
34
27
  onChange(newSelection);
35
28
  };
36
29
  const iconSpacer = () => {
37
- return /*#__PURE__*/_react.default.createElement("div", {
30
+ return /*#__PURE__*/_jsx("div", {
38
31
  className: "popover-multi-select__checkmark-spacer"
39
32
  });
40
33
  };
41
- return /*#__PURE__*/_react.default.createElement(_Popover.default, {
34
+ return /*#__PURE__*/_jsx(Popover, {
42
35
  sections: sections,
43
36
  handleClick: item => {
44
37
  const itemIndex = selection.findIndex(s => s === item.value);
@@ -52,10 +45,14 @@ function PopoverMultiSelect(props) {
52
45
  setAnchorElement: setAnchorElement,
53
46
  itemRenderer: item => {
54
47
  const selected = selection.find(s => s === item.value);
55
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, selected ? /*#__PURE__*/_react.default.createElement(_Icon.default, {
56
- name: "checkmark",
57
- className: "popover-multi-select__checkmark-selection"
58
- }) : iconSpacer(), /*#__PURE__*/_react.default.createElement(_material.ListItemText, null, item.label));
48
+ return /*#__PURE__*/_jsxs(_Fragment, {
49
+ children: [selected ? /*#__PURE__*/_jsx(Icon, {
50
+ name: "checkmark",
51
+ className: "popover-multi-select__checkmark-selection"
52
+ }) : iconSpacer(), /*#__PURE__*/_jsx(ListItemText, {
53
+ children: item.label
54
+ })]
55
+ });
59
56
  },
60
57
  menuAlign: menuAlign
61
58
  });
@@ -1,14 +1,8 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = ProgressCircle;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _material = require("@mui/material");
10
- require("./styles.scss");
11
- function ProgressCircle(props) {
1
+ import React from 'react';
2
+ import { Box, CircularProgress } from '@mui/material';
3
+ import './styles.scss';
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ export default function ProgressCircle(props) {
12
6
  const {
13
7
  size = 'small',
14
8
  determinate,
@@ -16,19 +10,22 @@ function ProgressCircle(props) {
16
10
  renderPercentText,
17
11
  hideValue
18
12
  } = props;
19
- return /*#__PURE__*/_react.default.createElement(_material.Box, {
20
- className: "circle-container"
21
- }, /*#__PURE__*/_react.default.createElement(_material.CircularProgress, {
22
- variant: "determinate",
23
- value: 100,
24
- className: "circle-track circle-track--".concat(size)
25
- }), /*#__PURE__*/_react.default.createElement(_material.Box, {
26
- className: "label-container"
27
- }, value && !hideValue && /*#__PURE__*/_react.default.createElement("p", {
28
- className: "progress-circle-label--".concat(size)
29
- }, renderPercentText(Math.round(value)))), /*#__PURE__*/_react.default.createElement(_material.CircularProgress, {
30
- value: value,
31
- variant: determinate ? 'determinate' : 'indeterminate',
32
- className: "circle-fill circle-track--".concat(size)
33
- }));
13
+ return /*#__PURE__*/_jsxs(Box, {
14
+ className: "circle-container",
15
+ children: [/*#__PURE__*/_jsx(CircularProgress, {
16
+ variant: "determinate",
17
+ value: 100,
18
+ className: `circle-track circle-track--${size}`
19
+ }), /*#__PURE__*/_jsx(Box, {
20
+ className: "label-container",
21
+ children: value && !hideValue && /*#__PURE__*/_jsx("p", {
22
+ className: `progress-circle-label--${size}`,
23
+ children: renderPercentText(Math.round(value))
24
+ })
25
+ }), /*#__PURE__*/_jsx(CircularProgress, {
26
+ value: value,
27
+ variant: determinate ? 'determinate' : 'indeterminate',
28
+ className: `circle-fill circle-track--${size}`
29
+ })]
30
+ });
34
31
  }
@@ -1,25 +1,18 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = RadioButton;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _material = require("@mui/material");
10
- function RadioButton(props) {
11
- var _props$value;
1
+ import React from 'react';
2
+ import { FormControlLabel, Radio } from '@mui/material';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export default function RadioButton(props) {
12
5
  const onChange = (event, checked) => {
13
6
  props.onChange(checked);
14
7
  };
15
- return /*#__PURE__*/_react.default.createElement(_material.FormControlLabel, {
8
+ return /*#__PURE__*/_jsx(FormControlLabel, {
16
9
  id: props.id,
17
10
  onChange: onChange,
18
11
  label: props.label,
19
- control: /*#__PURE__*/_react.default.createElement(_material.Radio, {
12
+ control: /*#__PURE__*/_jsx(Radio, {
20
13
  id: 'radio-' + props.id,
21
14
  color: "primary",
22
- checked: (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : false
15
+ checked: props.value ?? false
23
16
  })
24
17
  });
25
18
  }
@@ -1,19 +1,14 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = Select;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _SelectT = _interopRequireDefault(require("./SelectT"));
10
- require("./styles.scss");
11
- function Select(props) {
1
+ import React from 'react';
2
+ import SelectT from './SelectT';
3
+ import './styles.scss';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ export default function Select(props) {
12
6
  const toString = option => option;
13
- return /*#__PURE__*/_react.default.createElement(_SelectT.default, Object.assign({}, props, {
7
+ return /*#__PURE__*/_jsx(SelectT, {
8
+ ...props,
14
9
  isEqual: (A, B) => A === B,
15
10
  renderOption: toString,
16
11
  toT: toString,
17
12
  displayLabel: option => option || ''
18
- }));
13
+ });
19
14
  }
@@ -1,21 +1,14 @@
1
- "use strict";
1
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
+ import { Box } from '@mui/material';
3
+ import classNames from 'classnames';
4
+ import { isWhitespaces } from '../../utils';
5
+ import Icon from '../Icon/Icon';
6
+ import IconTooltip from '../IconTooltip';
7
+ import './styles.scss';
2
8
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = SelectT;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _material = require("@mui/material");
11
- var _classnames = _interopRequireDefault(require("classnames"));
12
- var _utils = require("../../utils");
13
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
14
- var _IconTooltip = _interopRequireDefault(require("../IconTooltip"));
15
- require("./styles.scss");
16
9
  // Styles for overriding select dropdown
17
-
18
- function SelectT(props) {
10
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
+ export default function SelectT(props) {
19
12
  const {
20
13
  className,
21
14
  disabled,
@@ -44,35 +37,35 @@ function SelectT(props) {
44
37
  toT,
45
38
  warningText
46
39
  } = props;
47
- const selectClass = (0, _classnames.default)({
40
+ const selectClass = classNames({
48
41
  'textfield-value': true,
49
42
  'textfield-value--disabled': disabled,
50
43
  'textfield-value--error': !!errorText,
51
44
  'textfield-value--warning': !!warningText,
52
45
  'textfield-value--readonly': readonly
53
46
  });
54
- const itemClass = (0, _classnames.default)({
47
+ const itemClass = classNames({
55
48
  'select-value': true,
56
49
  'select-value--disabled': disabled
57
50
  });
58
- const [openedOptions, setOpenedOptions] = (0, _react.useState)(false);
59
- const [fixedMenuPositioned, setFixedMenuPositioned] = (0, _react.useState)(false);
60
- const [selectedIndex, setSelectedIndex] = (0, _react.useState)(-1);
61
- const inputRef = (0, _react.useRef)(null);
62
- const textFieldRef = (0, _react.useRef)(null);
63
- const dropdownRef = (0, _react.useRef)(null);
64
- const hasOptions = (0, _react.useMemo)(() => options !== undefined && options.length > 0, [options]);
65
- const repositionMenu = (0, _react.useCallback)(checkHeight => {
51
+ const [openedOptions, setOpenedOptions] = useState(false);
52
+ const [fixedMenuPositioned, setFixedMenuPositioned] = useState(false);
53
+ const [selectedIndex, setSelectedIndex] = useState(-1);
54
+ const inputRef = useRef(null);
55
+ const textFieldRef = useRef(null);
56
+ const dropdownRef = useRef(null);
57
+ const hasOptions = useMemo(() => options !== undefined && options.length > 0, [options]);
58
+ const repositionMenu = useCallback(checkHeight => {
66
59
  if (openedOptions && hasOptions) {
67
60
  scrollToSelectedElement();
68
61
  if (fixedMenu && inputRef.current && dropdownRef.current) {
69
- dropdownRef.current.style.width = "".concat(inputRef.current.offsetWidth, "px");
62
+ dropdownRef.current.style.width = `${inputRef.current.offsetWidth}px`;
70
63
  const bbox = inputRef.current.getBoundingClientRect();
71
- dropdownRef.current.style.top = "".concat(bbox.top + bbox.height, "px");
64
+ dropdownRef.current.style.top = `${bbox.top + bbox.height}px`;
72
65
  const dropdownBottom = dropdownRef.current.clientHeight + bbox.top + bbox.height;
73
66
  const windowHeightThreshold = window.innerHeight - bbox.height;
74
67
  if (checkHeight && dropdownBottom > windowHeightThreshold) {
75
- dropdownRef.current.style.maxHeight = "".concat(dropdownRef.current.clientHeight - (dropdownBottom - windowHeightThreshold), "px");
68
+ dropdownRef.current.style.maxHeight = `${dropdownRef.current.clientHeight - (dropdownBottom - windowHeightThreshold)}px`;
76
69
  }
77
70
  setFixedMenuPositioned(true);
78
71
  }
@@ -80,10 +73,10 @@ function SelectT(props) {
80
73
  setFixedMenuPositioned(false);
81
74
  }
82
75
  }, [fixedMenu, openedOptions, hasOptions]);
83
- (0, _react.useEffect)(() => {
76
+ useEffect(() => {
84
77
  repositionMenu(true);
85
78
  }, [repositionMenu]);
86
- (0, _react.useEffect)(() => {
79
+ useEffect(() => {
87
80
  let newIndex = -1;
88
81
  if (options && selectedValue) {
89
82
  options.find((option, index) => {
@@ -98,20 +91,20 @@ function SelectT(props) {
98
91
  setSelectedIndex(newIndex);
99
92
  }
100
93
  }, [options, selectedValue, selectedIndex, isEqual]);
101
- const handleScroll = (0, _react.useCallback)(() => {
94
+ const handleScroll = useCallback(() => {
102
95
  repositionMenu(false);
103
96
  }, [repositionMenu]);
104
- const handleClick = (0, _react.useCallback)(event => {
97
+ const handleClick = useCallback(event => {
105
98
  // Don't respond to user clicks inside the input box because those are
106
99
  // already handled by toggleOptions()
107
100
  if (dropdownRef.current && !dropdownRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
108
101
  setOpenedOptions(false);
109
102
  }
110
103
  }, []);
111
- const handleResize = (0, _react.useCallback)(() => {
104
+ const handleResize = useCallback(() => {
112
105
  setOpenedOptions(false);
113
106
  }, []);
114
- (0, _react.useEffect)(() => {
107
+ useEffect(() => {
115
108
  window.addEventListener('click', handleClick);
116
109
  window.addEventListener('resize', handleResize);
117
110
  window.addEventListener('scroll', handleScroll);
@@ -123,8 +116,7 @@ function SelectT(props) {
123
116
  }, [handleClick, handleResize, handleScroll]);
124
117
  const toggleOptions = () => {
125
118
  if (!openedOptions) {
126
- var _textFieldRef$current;
127
- (_textFieldRef$current = textFieldRef.current) === null || _textFieldRef$current === void 0 ? void 0 : _textFieldRef$current.focus();
119
+ textFieldRef.current?.focus();
128
120
  }
129
121
  setOpenedOptions(isOpen => !isOpen);
130
122
  };
@@ -137,7 +129,7 @@ function SelectT(props) {
137
129
  };
138
130
  const onChangeHandler = e => {
139
131
  const textValue = e.target.value;
140
- if ((0, _utils.isWhitespaces)(textValue)) {
132
+ if (isWhitespaces(textValue)) {
141
133
  return;
142
134
  }
143
135
  if (onChange) {
@@ -149,9 +141,8 @@ function SelectT(props) {
149
141
  if (e.key === 'Tab') {
150
142
  toggleOptions();
151
143
  } else {
152
- var _dropdownRef$current;
153
144
  const pressedLetter = e.key.toUpperCase();
154
- const items = (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.getElementsByTagName('li');
145
+ const items = dropdownRef.current?.getElementsByTagName('li');
155
146
  if (items) {
156
147
  const arrayOfItems = Array.from(items);
157
148
  for (const item of arrayOfItems) {
@@ -166,8 +157,7 @@ function SelectT(props) {
166
157
  }
167
158
  };
168
159
  const scrollToSelectedElement = () => {
169
- var _dropdownRef$current2;
170
- const items = (_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : _dropdownRef$current2.getElementsByTagName('li');
160
+ const items = dropdownRef.current?.getElementsByTagName('li');
171
161
  if (items) {
172
162
  const arrayOfItems = Array.from(items);
173
163
  for (const item of arrayOfItems) {
@@ -181,70 +171,82 @@ function SelectT(props) {
181
171
  }
182
172
  }
183
173
  };
184
- return /*#__PURE__*/_react.default.createElement(_material.Box, {
185
- className: "select ".concat(className),
186
- sx: sx
187
- }, label && /*#__PURE__*/_react.default.createElement("label", {
188
- htmlFor: id,
189
- className: "textfield-label"
190
- }, label, " ", required ? '*' : '', " ", tooltipTitle && /*#__PURE__*/_react.default.createElement(_IconTooltip.default, {
191
- title: tooltipTitle
192
- })), /*#__PURE__*/_react.default.createElement("div", {
193
- className: "textfield-container ".concat(fullWidth ? 'textfield-container--fullWidth' : '')
194
- }, /*#__PURE__*/_react.default.createElement("div", {
195
- id: id,
196
- className: selectClass,
197
- onClick: toggleOptions,
198
- ref: inputRef,
199
- style: (selectStyles || {}).inputContainer
200
- }, /*#__PURE__*/_react.default.createElement("input", {
201
- ref: textFieldRef,
202
- value: displayLabel(selectedValue),
203
- readOnly: !editable || readonly,
204
- placeholder: placeholder,
205
- onChange: onChangeHandler,
206
- onKeyDown: onKeyDownHandler,
207
- onBlur: onBlur,
208
- onFocus: onFocus,
209
- required: required,
210
- style: (selectStyles || {}).input
211
- }), !hideArrow && /*#__PURE__*/_react.default.createElement(_Icon.default, {
212
- name: 'chevronDown',
213
- className: "textfield-value--icon-right",
214
- style: (selectStyles || {}).arrow
215
- })), options && options.length > 0 && openedOptions && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, fixedMenu && /*#__PURE__*/_react.default.createElement("div", {
216
- className: "scroll-block"
217
- }), /*#__PURE__*/_react.default.createElement("ul", {
218
- className: 'options-container' + (fixedMenu ? ' fixed-menu' : '') + (fixedMenuPositioned ? ' positioned' : ''),
219
- ref: dropdownRef,
220
- style: (selectStyles || {}).optionsContainer
221
- }, options.map((option, index) => {
222
- return /*#__PURE__*/_react.default.createElement("li", {
223
- "data-key": displayLabel(option).charAt(0).toUpperCase(),
224
- "data-selected": selectedIndex === index,
225
- key: index,
226
- onClick: () => !readonly ? onOptionSelected(option, index) : undefined,
227
- className: "".concat(itemClass, " ").concat(selectedIndex === index ? 'select-value--selected' : '', " "),
228
- style: (selectStyles || {}).optionContainer
229
- }, renderOption(option));
230
- })))), errorText && /*#__PURE__*/_react.default.createElement("div", {
231
- className: "textfield-label-container"
232
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
233
- name: "error",
234
- className: "textfield-error-text--icon"
235
- }), /*#__PURE__*/_react.default.createElement("label", {
236
- htmlFor: id,
237
- className: "textfield-error-text"
238
- }, errorText)), warningText && /*#__PURE__*/_react.default.createElement("div", {
239
- className: "textfield-label-container"
240
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
241
- name: "warning",
242
- className: "textfield-warning-text--icon"
243
- }), /*#__PURE__*/_react.default.createElement("label", {
244
- htmlFor: id,
245
- className: "textfield-warning-text"
246
- }, warningText)), helperText && /*#__PURE__*/_react.default.createElement("label", {
247
- htmlFor: id,
248
- className: "textfield-help-text"
249
- }, helperText));
174
+ return /*#__PURE__*/_jsxs(Box, {
175
+ className: `select ${className}`,
176
+ sx: sx,
177
+ children: [label && /*#__PURE__*/_jsxs("label", {
178
+ htmlFor: id,
179
+ className: "textfield-label",
180
+ children: [label, " ", required ? '*' : '', " ", tooltipTitle && /*#__PURE__*/_jsx(IconTooltip, {
181
+ title: tooltipTitle
182
+ })]
183
+ }), /*#__PURE__*/_jsxs("div", {
184
+ className: `textfield-container ${fullWidth ? 'textfield-container--fullWidth' : ''}`,
185
+ children: [/*#__PURE__*/_jsxs("div", {
186
+ id: id,
187
+ className: selectClass,
188
+ onClick: toggleOptions,
189
+ ref: inputRef,
190
+ style: (selectStyles || {}).inputContainer,
191
+ children: [/*#__PURE__*/_jsx("input", {
192
+ ref: textFieldRef,
193
+ value: displayLabel(selectedValue),
194
+ readOnly: !editable || readonly,
195
+ placeholder: placeholder,
196
+ onChange: onChangeHandler,
197
+ onKeyDown: onKeyDownHandler,
198
+ onBlur: onBlur,
199
+ onFocus: onFocus,
200
+ required: required,
201
+ style: (selectStyles || {}).input
202
+ }), !hideArrow && /*#__PURE__*/_jsx(Icon, {
203
+ name: 'chevronDown',
204
+ className: "textfield-value--icon-right",
205
+ style: (selectStyles || {}).arrow
206
+ })]
207
+ }), options && options.length > 0 && openedOptions && /*#__PURE__*/_jsxs(_Fragment, {
208
+ children: [fixedMenu && /*#__PURE__*/_jsx("div", {
209
+ className: "scroll-block"
210
+ }), /*#__PURE__*/_jsx("ul", {
211
+ className: 'options-container' + (fixedMenu ? ' fixed-menu' : '') + (fixedMenuPositioned ? ' positioned' : ''),
212
+ ref: dropdownRef,
213
+ style: (selectStyles || {}).optionsContainer,
214
+ children: options.map((option, index) => {
215
+ return /*#__PURE__*/_jsx("li", {
216
+ "data-key": displayLabel(option).charAt(0).toUpperCase(),
217
+ "data-selected": selectedIndex === index,
218
+ onClick: () => !readonly ? onOptionSelected(option, index) : undefined,
219
+ className: `${itemClass} ${selectedIndex === index ? 'select-value--selected' : ''} `,
220
+ style: (selectStyles || {}).optionContainer,
221
+ children: renderOption(option)
222
+ }, index);
223
+ })
224
+ })]
225
+ })]
226
+ }), errorText && /*#__PURE__*/_jsxs("div", {
227
+ className: "textfield-label-container",
228
+ children: [/*#__PURE__*/_jsx(Icon, {
229
+ name: "error",
230
+ className: "textfield-error-text--icon"
231
+ }), /*#__PURE__*/_jsx("label", {
232
+ htmlFor: id,
233
+ className: "textfield-error-text",
234
+ children: errorText
235
+ })]
236
+ }), warningText && /*#__PURE__*/_jsxs("div", {
237
+ className: "textfield-label-container",
238
+ children: [/*#__PURE__*/_jsx(Icon, {
239
+ name: "warning",
240
+ className: "textfield-warning-text--icon"
241
+ }), /*#__PURE__*/_jsx("label", {
242
+ htmlFor: id,
243
+ className: "textfield-warning-text",
244
+ children: warningText
245
+ })]
246
+ }), helperText && /*#__PURE__*/_jsx("label", {
247
+ htmlFor: id,
248
+ className: "textfield-help-text",
249
+ children: helperText
250
+ })]
251
+ });
250
252
  }
@@ -1,21 +1,15 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _material = require("@mui/material");
10
- var _theme = _interopRequireDefault(require("../../theme"));
1
+ import React from 'react';
2
+ import { Box } from '@mui/material';
3
+ import theme from '../../theme';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
11
5
  const Separator = props => {
12
- return /*#__PURE__*/_react.default.createElement(_material.Box, {
6
+ return /*#__PURE__*/_jsx(Box, {
13
7
  sx: {
14
- margin: _theme.default.spacing(0, 2),
8
+ margin: theme.spacing(0, 2),
15
9
  width: '1px',
16
10
  height: props.height || '32px',
17
- backgroundColor: props.color || _theme.default.palette.TwClrBrdrTertiary
11
+ backgroundColor: props.color || theme.palette.TwClrBrdrTertiary
18
12
  }
19
13
  });
20
14
  };
21
- var _default = exports.default = Separator;
15
+ export default Separator;
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ export {};