@terraware/web-components 4.2.13 → 4.2.14-rc.1

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 (302) 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.js +251 -257
  19. package/components/IconTooltip/index.js +29 -34
  20. package/components/Map/MapBox.js +199 -220
  21. package/components/Map/MapContainer.js +14 -18
  22. package/components/Map/MapDateSliderControl.js +44 -46
  23. package/components/Map/MapDrawer.js +32 -33
  24. package/components/Map/MapLegend.js +96 -95
  25. package/components/Map/MapViewStyleControl.js +38 -48
  26. package/components/Map/ReactMapboxWrapper.js +2 -9
  27. package/components/Map/index.js +47 -55
  28. package/components/Map/types.js +2 -8
  29. package/components/Map/useMaintainLayerOrder.js +4 -11
  30. package/components/Markdown/index.js +14 -21
  31. package/components/Message/Message.js +59 -51
  32. package/components/MultiSelect/MultiSelect.test.js +22 -24
  33. package/components/MultiSelect/index.js +73 -69
  34. package/components/Navbar/NavFooter.js +8 -13
  35. package/components/Navbar/NavItem.js +43 -37
  36. package/components/Navbar/NavSection.js +13 -17
  37. package/components/Navbar/Navbar.js +35 -38
  38. package/components/Navbar/SubNavbar.js +8 -13
  39. package/components/Note.js +14 -19
  40. package/components/OverlayModal/OverlayModal.js +36 -37
  41. package/components/PageForm/index.js +30 -35
  42. package/components/PhotoChooser/index.js +93 -98
  43. package/components/Pill/index.js +29 -31
  44. package/components/PillList/index.js +16 -22
  45. package/components/PlacementWrapper/index.js +20 -25
  46. package/components/PopoverMenu/Popover.js +33 -37
  47. package/components/PopoverMenu/index.js +41 -46
  48. package/components/PopoverMultiSelect/index.js +18 -21
  49. package/components/ProgressCircle/ProgressCircle.js +23 -26
  50. package/components/RadioButton.js +7 -14
  51. package/components/Select/Select.js +8 -13
  52. package/components/Select/SelectT.js +110 -108
  53. package/components/Separator/index.js +8 -14
  54. package/components/Size.js +1 -5
  55. package/components/Slider/index.js +7 -13
  56. package/components/SummaryBox.js +36 -39
  57. package/components/Tabs/index.js +75 -77
  58. package/components/TextTruncated/index.js +64 -65
  59. package/components/Textfield/Textfield.js +100 -95
  60. package/components/Textfield/TruncatedTextArea.js +44 -46
  61. package/components/TimelineSlider/TimelineMarker.js +24 -28
  62. package/components/TimelineSlider/TimelineRail.js +5 -11
  63. package/components/TimelineSlider/index.js +47 -51
  64. package/components/Tooltip/Tooltip.js +21 -26
  65. package/components/ViewPhotosDialog/index.js +58 -62
  66. package/components/VirtualWalkthrough/Annotation.d.ts +41 -0
  67. package/components/VirtualWalkthrough/Annotation.d.ts.map +1 -0
  68. package/components/VirtualWalkthrough/Annotation.js +197 -0
  69. package/components/VirtualWalkthrough/AnnotationEditPane.d.ts +20 -0
  70. package/components/VirtualWalkthrough/AnnotationEditPane.d.ts.map +1 -0
  71. package/components/VirtualWalkthrough/AnnotationEditPane.js +136 -0
  72. package/components/VirtualWalkthrough/AnnotationPanel.d.ts +13 -0
  73. package/components/VirtualWalkthrough/AnnotationPanel.d.ts.map +1 -0
  74. package/components/VirtualWalkthrough/AnnotationPanel.js +196 -0
  75. package/components/VirtualWalkthrough/Application.d.ts +9 -0
  76. package/components/VirtualWalkthrough/Application.d.ts.map +1 -0
  77. package/components/VirtualWalkthrough/Application.js +32 -0
  78. package/components/VirtualWalkthrough/AutoRotator.d.ts +109 -0
  79. package/components/VirtualWalkthrough/AutoRotator.d.ts.map +1 -0
  80. package/components/VirtualWalkthrough/AutoRotator.js +217 -0
  81. package/components/VirtualWalkthrough/BlockingSpinner.d.ts +3 -0
  82. package/components/VirtualWalkthrough/BlockingSpinner.d.ts.map +1 -0
  83. package/components/VirtualWalkthrough/BlockingSpinner.js +27 -0
  84. package/components/VirtualWalkthrough/BoundaryRing.d.ts +9 -0
  85. package/components/VirtualWalkthrough/BoundaryRing.d.ts.map +1 -0
  86. package/components/VirtualWalkthrough/BoundaryRing.js +33 -0
  87. package/components/VirtualWalkthrough/CameraInfo.d.ts +16 -0
  88. package/components/VirtualWalkthrough/CameraInfo.d.ts.map +1 -0
  89. package/components/VirtualWalkthrough/CameraInfo.js +88 -0
  90. package/components/VirtualWalkthrough/ControlsInfoPane.d.ts +37 -0
  91. package/components/VirtualWalkthrough/ControlsInfoPane.d.ts.map +1 -0
  92. package/components/VirtualWalkthrough/ControlsInfoPane.js +196 -0
  93. package/components/VirtualWalkthrough/GradientSky.d.ts +9 -0
  94. package/components/VirtualWalkthrough/GradientSky.d.ts.map +1 -0
  95. package/components/VirtualWalkthrough/GradientSky.js +73 -0
  96. package/components/VirtualWalkthrough/SplatControls.d.ts +50 -0
  97. package/components/VirtualWalkthrough/SplatControls.d.ts.map +1 -0
  98. package/components/VirtualWalkthrough/SplatControls.js +252 -0
  99. package/components/VirtualWalkthrough/SplatCrop.d.ts +8 -0
  100. package/components/VirtualWalkthrough/SplatCrop.d.ts.map +1 -0
  101. package/components/VirtualWalkthrough/SplatCrop.js +18 -0
  102. package/components/VirtualWalkthrough/SplatFadeCrop.d.ts +8 -0
  103. package/components/VirtualWalkthrough/SplatFadeCrop.d.ts.map +1 -0
  104. package/components/VirtualWalkthrough/SplatFadeCrop.js +18 -0
  105. package/components/VirtualWalkthrough/SplatModel.d.ts +15 -0
  106. package/components/VirtualWalkthrough/SplatModel.d.ts.map +1 -0
  107. package/components/VirtualWalkthrough/SplatModel.js +60 -0
  108. package/components/VirtualWalkthrough/SplatRevealRain.d.ts +18 -0
  109. package/components/VirtualWalkthrough/SplatRevealRain.d.ts.map +1 -0
  110. package/components/VirtualWalkthrough/SplatRevealRain.js +38 -0
  111. package/components/VirtualWalkthrough/TfAnnotationManager.d.ts +110 -0
  112. package/components/VirtualWalkthrough/TfAnnotationManager.d.ts.map +1 -0
  113. package/components/VirtualWalkthrough/TfAnnotationManager.js +368 -0
  114. package/components/VirtualWalkthrough/TfXrNavigation.d.ts +15 -0
  115. package/components/VirtualWalkthrough/TfXrNavigation.d.ts.map +1 -0
  116. package/components/VirtualWalkthrough/TfXrNavigation.js +24 -0
  117. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts +27 -0
  118. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts.map +1 -0
  119. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +282 -0
  120. package/components/VirtualWalkthrough/annotation-styles.css +5 -0
  121. package/components/VirtualWalkthrough/application-styles.css +4 -0
  122. package/components/VirtualWalkthrough/boundary-ring.d.ts +47 -0
  123. package/components/VirtualWalkthrough/boundary-ring.d.ts.map +1 -0
  124. package/components/VirtualWalkthrough/boundary-ring.js +125 -0
  125. package/components/VirtualWalkthrough/boundary-ring.test.js +109 -0
  126. package/components/VirtualWalkthrough/groundPlane.d.ts +14 -0
  127. package/components/VirtualWalkthrough/groundPlane.d.ts.map +1 -0
  128. package/components/VirtualWalkthrough/groundPlane.js +47 -0
  129. package/components/VirtualWalkthrough/groundPlane.test.js +45 -0
  130. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts +19 -0
  131. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts.map +1 -0
  132. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +119 -0
  133. package/components/VirtualWalkthrough/walkthrough-camera.d.ts +77 -0
  134. package/components/VirtualWalkthrough/walkthrough-camera.d.ts.map +1 -0
  135. package/components/VirtualWalkthrough/walkthrough-camera.js +320 -0
  136. package/components/svg/BlobbyGrayIconImage.js +36 -41
  137. package/components/svg/BlobbyGrayIconImport.js +36 -41
  138. package/components/svg/BlobbyGrayIconUploadToTheCloud.js +36 -41
  139. package/components/svg/BlobbyIconCloudChecked.js +161 -158
  140. package/components/svg/BlobbyIconExportOrUploadPhoto.js +161 -158
  141. package/components/svg/BlobbyIconFolder.js +161 -158
  142. package/components/svg/BlobbyIconGraphReport.js +161 -158
  143. package/components/svg/BlobbyIconHappy.js +161 -158
  144. package/components/svg/BlobbyIconHeartMonitor.js +161 -158
  145. package/components/svg/BlobbyIconLeaf.js +161 -158
  146. package/components/svg/BlobbyIconLibrary.js +161 -158
  147. package/components/svg/BlobbyIconNursery.js +163 -160
  148. package/components/svg/BlobbyIconOrganization.js +161 -158
  149. package/components/svg/BlobbyIconParchment.js +161 -158
  150. package/components/svg/BlobbyIconPeople.js +161 -158
  151. package/components/svg/BlobbyIconSeedBank.js +161 -158
  152. package/components/svg/BlobbyIconSeedling.js +161 -158
  153. package/components/svg/BlobbyIconSeeds.js +161 -158
  154. package/components/svg/BlobbyIconSite.js +164 -161
  155. package/components/svg/BlobbyIconSparkles.js +161 -158
  156. package/components/svg/BlobbyIconWrench.js +161 -158
  157. package/components/svg/Bug.js +18 -27
  158. package/components/svg/Calendar.js +18 -27
  159. package/components/svg/CaretDown.js +18 -27
  160. package/components/svg/CaretLeft.js +18 -27
  161. package/components/svg/CaretRight.js +18 -27
  162. package/components/svg/CaretUp.js +18 -27
  163. package/components/svg/ChevronDown.js +18 -27
  164. package/components/svg/ChevronUp.js +18 -27
  165. package/components/svg/Close.js +18 -27
  166. package/components/svg/Critical.js +18 -27
  167. package/components/svg/Edit.js +161 -158
  168. package/components/svg/Error.js +18 -27
  169. package/components/svg/Filter.js +18 -27
  170. package/components/svg/Folder.js +18 -27
  171. package/components/svg/Help.js +18 -27
  172. package/components/svg/Home.js +18 -27
  173. package/components/svg/IconAdd.js +18 -27
  174. package/components/svg/IconArrowRight.js +19 -28
  175. package/components/svg/IconBusinessNetwork.js +18 -27
  176. package/components/svg/IconCalendar.js +18 -27
  177. package/components/svg/IconCancel.js +18 -27
  178. package/components/svg/IconChargingBattery.js +18 -27
  179. package/components/svg/IconChecklist.js +19 -28
  180. package/components/svg/IconCheckmark.js +18 -27
  181. package/components/svg/IconCoinInHand.js +18 -27
  182. package/components/svg/IconColumns.js +18 -27
  183. package/components/svg/IconComment.js +18 -27
  184. package/components/svg/IconDashboard.js +18 -27
  185. package/components/svg/IconDataMigration.js +18 -27
  186. package/components/svg/IconDocument.js +19 -28
  187. package/components/svg/IconDownloadFromTheCloud.js +19 -28
  188. package/components/svg/IconEdit.js +19 -28
  189. package/components/svg/IconExpand.js +19 -28
  190. package/components/svg/IconExport.js +18 -27
  191. package/components/svg/IconExternalLink.js +18 -27
  192. package/components/svg/IconEye.js +18 -27
  193. package/components/svg/IconEyeOff.js +18 -27
  194. package/components/svg/IconFile.js +18 -27
  195. package/components/svg/IconFolder.js +18 -27
  196. package/components/svg/IconFullScreen.js +18 -27
  197. package/components/svg/IconFutures.js +18 -27
  198. package/components/svg/IconGraphReport.js +18 -27
  199. package/components/svg/IconHeartMonitor.js +18 -27
  200. package/components/svg/IconHelp.js +19 -28
  201. package/components/svg/IconHistory.js +18 -27
  202. package/components/svg/IconImport.js +18 -27
  203. package/components/svg/IconIndex.js +18 -27
  204. package/components/svg/IconLayers.js +18 -27
  205. package/components/svg/IconLibrary.js +18 -27
  206. package/components/svg/IconList.js +18 -27
  207. package/components/svg/IconLivePlant.js +18 -27
  208. package/components/svg/IconLocations.js +18 -27
  209. package/components/svg/IconMail.js +18 -27
  210. package/components/svg/IconManager.js +18 -27
  211. package/components/svg/IconMarker.js +18 -27
  212. package/components/svg/IconMenu.js +18 -27
  213. package/components/svg/IconMenuHorizontal.js +18 -27
  214. package/components/svg/IconModule.js +18 -27
  215. package/components/svg/IconMyLocation.js +18 -27
  216. package/components/svg/IconNote.js +19 -28
  217. package/components/svg/IconNursery.js +18 -27
  218. package/components/svg/IconOrg.js +18 -27
  219. package/components/svg/IconParchment.js +18 -27
  220. package/components/svg/IconPhoto.js +18 -27
  221. package/components/svg/IconPlantsFilled.js +18 -27
  222. package/components/svg/IconRedo.js +18 -27
  223. package/components/svg/IconRestorationSite.js +18 -27
  224. package/components/svg/IconSeedBank.js +18 -27
  225. package/components/svg/IconSeedling.js +18 -27
  226. package/components/svg/IconSettings.js +18 -27
  227. package/components/svg/IconSlice.js +18 -27
  228. package/components/svg/IconSubmit.js +18 -27
  229. package/components/svg/IconSubtract.js +19 -28
  230. package/components/svg/IconSynced.js +18 -27
  231. package/components/svg/IconTrashCan.js +18 -27
  232. package/components/svg/IconTreasureMap.js +18 -27
  233. package/components/svg/IconUnavailable.js +18 -27
  234. package/components/svg/IconUndo.js +18 -27
  235. package/components/svg/IconVariable.js +18 -27
  236. package/components/svg/IconVideo.js +19 -28
  237. package/components/svg/IconWifi.js +18 -27
  238. package/components/svg/Info.js +18 -27
  239. package/components/svg/Key.js +18 -27
  240. package/components/svg/Leaf.js +18 -27
  241. package/components/svg/Lock.js +18 -27
  242. package/components/svg/Logo.js +40 -45
  243. package/components/svg/MenuVertical.js +18 -27
  244. package/components/svg/Notification.js +18 -27
  245. package/components/svg/Person.js +18 -27
  246. package/components/svg/Plus.js +18 -27
  247. package/components/svg/RestorationSite.js +18 -27
  248. package/components/svg/Search.js +18 -27
  249. package/components/svg/Seeds.js +18 -27
  250. package/components/svg/Site.js +18 -27
  251. package/components/svg/Sparkles.js +18 -27
  252. package/components/svg/Species.js +18 -27
  253. package/components/svg/Species2.js +161 -158
  254. package/components/svg/Spinner.js +27 -36
  255. package/components/svg/Star.js +18 -27
  256. package/components/svg/Success.js +18 -27
  257. package/components/svg/SuccessFilled.js +18 -27
  258. package/components/svg/TerrawareLogoDesktop.js +44 -49
  259. package/components/svg/TerrawareLogoMobile.js +20 -29
  260. package/components/svg/Touchscreen.js +18 -27
  261. package/components/svg/UploadCloud.js +161 -158
  262. package/components/svg/Warning.js +18 -27
  263. package/components/svg/WelcomeClipboard.js +130 -135
  264. package/components/svg/index.js +127 -895
  265. package/components/table/EnhancedTableToolbar.js +45 -47
  266. package/components/table/EnhancedTableToolbarV2.js +18 -26
  267. package/components/table/TableCellRenderer.js +137 -143
  268. package/components/table/TableHeader.js +45 -47
  269. package/components/table/TableHeaderItem.js +65 -64
  270. package/components/table/density.js +3 -11
  271. package/components/table/index.js +225 -218
  272. package/components/table/sort.js +8 -18
  273. package/components/table/sort.test.js +6 -8
  274. package/components/table/types.js +1 -5
  275. package/components/types/index.js +1 -5
  276. package/hooks/useBoolean.d.ts +4 -0
  277. package/hooks/useBoolean.d.ts.map +1 -0
  278. package/hooks/useBoolean.js +12 -0
  279. package/hooks/useCameraPosition.d.ts +8 -0
  280. package/hooks/useCameraPosition.d.ts.map +1 -0
  281. package/hooks/useCameraPosition.js +33 -0
  282. package/hooks/useDevicePerformance.d.ts +9 -0
  283. package/hooks/useDevicePerformance.d.ts.map +1 -0
  284. package/hooks/useDevicePerformance.js +16 -0
  285. package/index.js +57 -398
  286. package/license-report.html +1 -1
  287. package/package.json +10 -3
  288. package/style-dictionary-dist/TerrawareTheme.js +1 -7
  289. package/theme.js +7 -14
  290. package/utils/color.d.ts +2 -0
  291. package/utils/color.d.ts.map +1 -0
  292. package/utils/color.js +14 -0
  293. package/utils/date.js +13 -24
  294. package/utils/date.test.js +40 -43
  295. package/utils/index.js +5 -53
  296. package/utils/preventDefaultEvent.js +1 -7
  297. package/utils/text.js +2 -9
  298. package/utils/text.test.js +9 -11
  299. package/utils/useDeviceInfo.js +10 -16
  300. package/virtualWalkthrough.d.ts +34 -0
  301. package/virtualWalkthrough.d.ts.map +1 -0
  302. package/virtualWalkthrough.js +30 -0
@@ -1,18 +1,11 @@
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 = MultiSelect;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _material = require("@mui/material");
11
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
12
- var _IconTooltip = _interopRequireDefault(require("../IconTooltip"));
13
- var _PillList = _interopRequireDefault(require("../PillList"));
14
- require("./styles.scss");
15
- function MultiSelect(props) {
1
+ import React, { useEffect, useState } from 'react';
2
+ import { Box } from '@mui/material';
3
+ import Icon from '../Icon/Icon';
4
+ import IconTooltip from '../IconTooltip';
5
+ import PillList from '../PillList';
6
+ import './styles.scss';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export default function MultiSelect(props) {
16
9
  const {
17
10
  className,
18
11
  disabled,
@@ -34,14 +27,14 @@ function MultiSelect(props) {
34
27
  tooltipTitle,
35
28
  valueRenderer
36
29
  } = props;
37
- const [openedOptions, setOpenedOptions] = (0, _react.useState)(false);
30
+ const [openedOptions, setOpenedOptions] = useState(false);
38
31
  const toggleOptions = () => {
39
32
  setOpenedOptions(isOpen => !isOpen && !disabled);
40
33
  if (props.onFocus) {
41
34
  props.onFocus();
42
35
  }
43
36
  };
44
- (0, _react.useEffect)(() => {
37
+ useEffect(() => {
45
38
  if (optionsVisible !== undefined) {
46
39
  setOpenedOptions(optionsVisible);
47
40
  }
@@ -65,56 +58,67 @@ function MultiSelect(props) {
65
58
  value: value ? valueRenderer(value) : missingValuePlaceholder || ''
66
59
  };
67
60
  }).filter(data => data.value);
68
- return /*#__PURE__*/_react.default.createElement(_material.Box, {
69
- className: "multi-select ".concat(className),
70
- sx: sx
71
- }, label && /*#__PURE__*/_react.default.createElement("label", {
72
- htmlFor: id,
73
- className: "multi-select__label"
74
- }, label, " ", tooltipTitle && /*#__PURE__*/_react.default.createElement(_IconTooltip.default, {
75
- title: tooltipTitle
76
- })), /*#__PURE__*/_react.default.createElement("div", {
77
- className: "multi-select__container ".concat(fullWidth ? 'multi-select__container--fullWidth' : ''),
78
- onBlur: onBlurHandler,
79
- tabIndex: 0
80
- }, /*#__PURE__*/_react.default.createElement("div", {
81
- id: id,
82
- className: "multi-select__values".concat(disabled ? '--disabled' : '').concat(openedOptions ? ' open' : '').concat(errorText ? ' error' : ''),
83
- onClick: toggleOptions
84
- }, selectedOptions.length > 0 ? /*#__PURE__*/_react.default.createElement(_PillList.default, {
85
- data: valuesPillData,
86
- onRemove: onRemove,
87
- onClick: onPillClick,
88
- className: pillListClassName
89
- }) : /*#__PURE__*/_react.default.createElement("p", {
90
- className: "multi-select__placeholder-text"
91
- }, placeHolder), /*#__PURE__*/_react.default.createElement("div", {
92
- className: 'multi-select__values__icon-button',
93
- "aria-label": "show-options"
94
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
95
- name: openedOptions ? 'chevronUp' : 'chevronDown',
96
- className: "multi-select__values__icon-right".concat(disabled ? '--disabled' : '')
97
- }))), options && unselectedOptions.length > 0 && openedOptions && /*#__PURE__*/_react.default.createElement("div", {
98
- className: "multi-select__options-container"
99
- }, /*#__PURE__*/_react.default.createElement("ul", {
100
- className: 'multi-select__options'
101
- }, unselectedOptions.map((optionKey, index) => {
102
- const optionValue = options.get(optionKey);
103
- return /*#__PURE__*/_react.default.createElement("li", {
104
- key: index,
105
- className: "select-value",
106
- onClick: () => onAdd(optionKey)
107
- }, optionValue ? valueRenderer(optionValue) : missingValuePlaceholder || '');
108
- })))), helperText && /*#__PURE__*/_react.default.createElement("label", {
109
- htmlFor: id,
110
- className: "multi-select__help-text"
111
- }, helperText), errorText && /*#__PURE__*/_react.default.createElement("div", {
112
- className: "multi-select__error"
113
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
114
- name: "error",
115
- className: "multi-select__error-icon"
116
- }), /*#__PURE__*/_react.default.createElement("label", {
117
- htmlFor: id,
118
- className: "multi-select__error-text"
119
- }, errorText)));
61
+ return /*#__PURE__*/_jsxs(Box, {
62
+ className: `multi-select ${className}`,
63
+ sx: sx,
64
+ children: [label && /*#__PURE__*/_jsxs("label", {
65
+ htmlFor: id,
66
+ className: "multi-select__label",
67
+ children: [label, " ", tooltipTitle && /*#__PURE__*/_jsx(IconTooltip, {
68
+ title: tooltipTitle
69
+ })]
70
+ }), /*#__PURE__*/_jsxs("div", {
71
+ className: `multi-select__container ${fullWidth ? 'multi-select__container--fullWidth' : ''}`,
72
+ onBlur: onBlurHandler,
73
+ tabIndex: 0,
74
+ children: [/*#__PURE__*/_jsxs("div", {
75
+ id: id,
76
+ className: `multi-select__values${disabled ? '--disabled' : ''}${openedOptions ? ' open' : ''}${errorText ? ' error' : ''}`,
77
+ onClick: toggleOptions,
78
+ children: [selectedOptions.length > 0 ? /*#__PURE__*/_jsx(PillList, {
79
+ data: valuesPillData,
80
+ onRemove: onRemove,
81
+ onClick: onPillClick,
82
+ className: pillListClassName
83
+ }) : /*#__PURE__*/_jsx("p", {
84
+ className: "multi-select__placeholder-text",
85
+ children: placeHolder
86
+ }), /*#__PURE__*/_jsx("div", {
87
+ className: 'multi-select__values__icon-button',
88
+ "aria-label": "show-options",
89
+ children: /*#__PURE__*/_jsx(Icon, {
90
+ name: openedOptions ? 'chevronUp' : 'chevronDown',
91
+ className: `multi-select__values__icon-right${disabled ? '--disabled' : ''}`
92
+ })
93
+ })]
94
+ }), options && unselectedOptions.length > 0 && openedOptions && /*#__PURE__*/_jsx("div", {
95
+ className: "multi-select__options-container",
96
+ children: /*#__PURE__*/_jsx("ul", {
97
+ className: 'multi-select__options',
98
+ children: unselectedOptions.map((optionKey, index) => {
99
+ const optionValue = options.get(optionKey);
100
+ return /*#__PURE__*/_jsx("li", {
101
+ className: "select-value",
102
+ onClick: () => onAdd(optionKey),
103
+ children: optionValue ? valueRenderer(optionValue) : missingValuePlaceholder || ''
104
+ }, index);
105
+ })
106
+ })
107
+ })]
108
+ }), helperText && /*#__PURE__*/_jsx("label", {
109
+ htmlFor: id,
110
+ className: "multi-select__help-text",
111
+ children: helperText
112
+ }), errorText && /*#__PURE__*/_jsxs("div", {
113
+ className: "multi-select__error",
114
+ children: [/*#__PURE__*/_jsx(Icon, {
115
+ name: "error",
116
+ className: "multi-select__error-icon"
117
+ }), /*#__PURE__*/_jsx("label", {
118
+ htmlFor: id,
119
+ className: "multi-select__error-text",
120
+ children: errorText
121
+ })]
122
+ })]
123
+ });
120
124
  }
@@ -1,17 +1,12 @@
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 = NavFooter;
8
- var _react = _interopRequireDefault(require("react"));
9
- require("./styles.scss");
10
- function NavFooter(props) {
1
+ import React from 'react';
2
+ import './styles.scss';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export default function NavFooter(props) {
11
5
  const {
12
6
  children
13
7
  } = props;
14
- return /*#__PURE__*/_react.default.createElement("div", {
15
- className: "nav-footer"
16
- }, children);
8
+ return /*#__PURE__*/_jsx("div", {
9
+ className: "nav-footer",
10
+ children: children
11
+ });
17
12
  }
@@ -1,16 +1,9 @@
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 = NavItem;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _theme = _interopRequireDefault(require("../../theme"));
11
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
12
- require("./styles.scss");
13
- function NavItem(props) {
1
+ import React, { useCallback } from 'react';
2
+ import theme from '../../theme';
3
+ import Icon from '../Icon/Icon';
4
+ import './styles.scss';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ export default function NavItem(props) {
14
7
  const {
15
8
  label,
16
9
  icon,
@@ -24,7 +17,7 @@ function NavItem(props) {
24
17
  href
25
18
  } = props;
26
19
  const children = href ? null : childrenProps;
27
- const hasChildrenSelected = (0, _react.useCallback)(() => {
20
+ const hasChildrenSelected = useCallback(() => {
28
21
  if (children && children.props && children.props.children) {
29
22
  const subChildren = children.props.children;
30
23
  if (Array.isArray(subChildren)) {
@@ -34,12 +27,12 @@ function NavItem(props) {
34
27
  }
35
28
  return false;
36
29
  }, [children]);
37
- _react.default.useEffect(() => {
30
+ React.useEffect(() => {
38
31
  if (hasChildrenSelected()) {
39
32
  setOpen(true);
40
33
  }
41
34
  }, [children, hasChildrenSelected, selected]);
42
- const [open, setOpen] = _react.default.useState(hasChildrenSelected());
35
+ const [open, setOpen] = React.useState(hasChildrenSelected());
43
36
  const onClickHandler = () => {
44
37
  if (!disabled) {
45
38
  setOpen(!open || hasChildrenSelected());
@@ -49,25 +42,38 @@ function NavItem(props) {
49
42
  }
50
43
  };
51
44
  const customLabel = typeof label !== 'string';
52
- return /*#__PURE__*/_react.default.createElement("div", {
53
- className: "\n nav-item \n ".concat(selected ? 'nav-item--selected' : '', "\n ").concat(hasChildrenSelected() ? 'nav-item--children-selected' : '', "\n ").concat(isFooter ? 'nav-item--footer' : '', "\n ").concat(children ? 'nav-item--has-children' : '', "\n ")
54
- }, /*#__PURE__*/_react.default.createElement("button", {
55
- className: "\n ".concat(customLabel ? 'nav-item-custom-content' : 'nav-item-content', "\n ").concat(disabled ? 'nav-item--disabled' : '', "\n "),
56
- onClick: onClickHandler,
57
- id: id
58
- }, icon && /*#__PURE__*/_react.default.createElement(_Icon.default, {
59
- name: icon,
60
- className: "nav-item--icon",
61
- fillColor: iconColor !== null && iconColor !== void 0 ? iconColor : _theme.default.palette.TwClrIcnSecondary
62
- }), !href && /*#__PURE__*/_react.default.createElement("span", {
63
- className: "nav-item--label"
64
- }, label), href && /*#__PURE__*/_react.default.createElement("a", {
65
- className: "nav-item--label nav-item--anchor",
66
- href: href,
67
- rel: "noopener noreferrer",
68
- target: "_external"
69
- }, label), children && /*#__PURE__*/_react.default.createElement(_Icon.default, {
70
- name: open ? 'chevronUp' : 'chevronDown',
71
- className: "nav-item--arrow"
72
- })), children && open && children);
45
+ return /*#__PURE__*/_jsxs("div", {
46
+ className: `
47
+ nav-item
48
+ ${selected ? 'nav-item--selected' : ''}
49
+ ${hasChildrenSelected() ? 'nav-item--children-selected' : ''}
50
+ ${isFooter ? 'nav-item--footer' : ''}
51
+ ${children ? 'nav-item--has-children' : ''}
52
+ `,
53
+ children: [/*#__PURE__*/_jsxs("button", {
54
+ className: `
55
+ ${customLabel ? 'nav-item-custom-content' : 'nav-item-content'}
56
+ ${disabled ? 'nav-item--disabled' : ''}
57
+ `,
58
+ onClick: onClickHandler,
59
+ id: id,
60
+ children: [icon && /*#__PURE__*/_jsx(Icon, {
61
+ name: icon,
62
+ className: "nav-item--icon",
63
+ fillColor: iconColor ?? theme.palette.TwClrIcnSecondary
64
+ }), !href && /*#__PURE__*/_jsx("span", {
65
+ className: "nav-item--label",
66
+ children: label
67
+ }), href && /*#__PURE__*/_jsx("a", {
68
+ className: "nav-item--label nav-item--anchor",
69
+ href: href,
70
+ rel: "noopener noreferrer",
71
+ target: "_external",
72
+ children: label
73
+ }), children && /*#__PURE__*/_jsx(Icon, {
74
+ name: open ? 'chevronUp' : 'chevronDown',
75
+ className: "nav-item--arrow"
76
+ })]
77
+ }), children && open && children]
78
+ });
73
79
  }
@@ -1,22 +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 = NavSection;
8
- var _react = _interopRequireDefault(require("react"));
9
- require("./styles.scss");
10
- function NavSection(props) {
1
+ import React from 'react';
2
+ import './styles.scss';
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ export default function NavSection(props) {
11
5
  const {
12
6
  title,
13
7
  separator = true
14
8
  } = props;
15
- return /*#__PURE__*/_react.default.createElement("div", {
16
- className: "nav-section"
17
- }, separator && /*#__PURE__*/_react.default.createElement("div", {
18
- className: "divider"
19
- }), title && /*#__PURE__*/_react.default.createElement("span", {
20
- className: "nav-section--title ".concat(separator ? '' : 'no-separator')
21
- }, title));
9
+ return /*#__PURE__*/_jsxs("div", {
10
+ className: "nav-section",
11
+ children: [separator && /*#__PURE__*/_jsx("div", {
12
+ className: "divider"
13
+ }), title && /*#__PURE__*/_jsx("span", {
14
+ className: `nav-section--title ${separator ? '' : 'no-separator'}`,
15
+ children: title
16
+ })]
17
+ });
22
18
  }
@@ -1,16 +1,10 @@
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 = Navbar;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _material = require("@mui/material");
10
- var _utils = require("../../utils");
11
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
12
- require("./styles.scss");
13
- function Navbar(props) {
1
+ import React from 'react';
2
+ import { Box, ButtonBase, useTheme } from '@mui/material';
3
+ import { useDeviceInfo } from '../../utils';
4
+ import Icon from '../Icon/Icon';
5
+ import './styles.scss';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export default function Navbar(props) {
14
8
  const {
15
9
  children,
16
10
  setShowNavBar,
@@ -18,29 +12,32 @@ function Navbar(props) {
18
12
  } = props;
19
13
  const {
20
14
  isDesktop
21
- } = (0, _utils.useDeviceInfo)();
22
- const theme = (0, _material.useTheme)();
23
- return /*#__PURE__*/_react.default.createElement("div", {
24
- className: 'navbar' + (backgroundTransparent ? ' transparent' : '')
25
- }, !isDesktop && /*#__PURE__*/_react.default.createElement(_material.Box, {
26
- sx: {
27
- display: 'flex',
28
- justifyContent: 'start'
29
- }
30
- }, /*#__PURE__*/_react.default.createElement(_material.ButtonBase, {
31
- onClick: () => setShowNavBar(false),
32
- sx: {
33
- background: 'none',
34
- border: 'none',
35
- cursor: 'pointer'
36
- }
37
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
38
- name: "close",
39
- size: "medium",
40
- style: {
41
- fill: theme.palette.TwClrIcnSecondary,
42
- marginRight: '16px',
43
- marginBottom: '8px'
44
- }
45
- }))), children);
15
+ } = useDeviceInfo();
16
+ const theme = useTheme();
17
+ return /*#__PURE__*/_jsxs("div", {
18
+ className: 'navbar' + (backgroundTransparent ? ' transparent' : ''),
19
+ children: [!isDesktop && /*#__PURE__*/_jsx(Box, {
20
+ sx: {
21
+ display: 'flex',
22
+ justifyContent: 'start'
23
+ },
24
+ children: /*#__PURE__*/_jsx(ButtonBase, {
25
+ onClick: () => setShowNavBar(false),
26
+ sx: {
27
+ background: 'none',
28
+ border: 'none',
29
+ cursor: 'pointer'
30
+ },
31
+ children: /*#__PURE__*/_jsx(Icon, {
32
+ name: "close",
33
+ size: "medium",
34
+ style: {
35
+ fill: theme.palette.TwClrIcnSecondary,
36
+ marginRight: '16px',
37
+ marginBottom: '8px'
38
+ }
39
+ })
40
+ })
41
+ }), children]
42
+ });
46
43
  }
@@ -1,17 +1,12 @@
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 = SubNavbar;
8
- var _react = _interopRequireDefault(require("react"));
9
- require("./styles.scss");
10
- function SubNavbar(props) {
1
+ import React from 'react';
2
+ import './styles.scss';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export default function SubNavbar(props) {
11
5
  const {
12
6
  children
13
7
  } = props;
14
- return /*#__PURE__*/_react.default.createElement("div", {
15
- className: "subnavbar"
16
- }, children);
8
+ return /*#__PURE__*/_jsx("div", {
9
+ className: "subnavbar",
10
+ children: children
11
+ });
17
12
  }
@@ -1,25 +1,20 @@
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 = Note;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _material = require("@mui/material");
10
- function Note(_ref) {
11
- let {
12
- children
13
- } = _ref;
14
- const theme = (0, _material.useTheme)();
15
- return /*#__PURE__*/_react.default.createElement(_material.Box, {
1
+ import React from 'react';
2
+ import { Box, Typography, useTheme } from '@mui/material';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export default function Note({
5
+ children
6
+ }) {
7
+ const theme = useTheme();
8
+ return /*#__PURE__*/_jsx(Box, {
16
9
  sx: {
17
10
  borderRadius: 8,
18
11
  backgroundColor: theme.palette.neutral[200],
19
12
  marginBottom: theme.spacing(3),
20
13
  padding: theme.spacing(2)
21
- }
22
- }, /*#__PURE__*/_react.default.createElement(_material.Typography, {
23
- component: "p"
24
- }, children));
14
+ },
15
+ children: /*#__PURE__*/_jsx(Typography, {
16
+ component: "p",
17
+ children: children
18
+ })
19
+ });
25
20
  }
@@ -1,15 +1,8 @@
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 = void 0;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _material = require("@mui/material");
11
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
12
- require("./styles.scss");
1
+ import React, { useEffect } from 'react';
2
+ import { IconButton } from '@mui/material';
3
+ import Icon from '../Icon/Icon';
4
+ import './styles.scss';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
6
  const OverlayModal = props => {
14
7
  const {
15
8
  children,
@@ -20,13 +13,13 @@ const OverlayModal = props => {
20
13
  onClickOutClose = true,
21
14
  minHeight = '300px'
22
15
  } = props;
23
- (0, _react.useEffect)(() => {
16
+ useEffect(() => {
24
17
  if (!open || !onEscapeClose) {
25
18
  return;
26
19
  }
27
20
  const handleEscape = event => {
28
21
  if (event.key === 'Escape') {
29
- onClose === null || onClose === void 0 ? void 0 : onClose();
22
+ onClose?.();
30
23
  }
31
24
  };
32
25
  document.addEventListener('keydown', handleEscape);
@@ -36,30 +29,36 @@ const OverlayModal = props => {
36
29
  }, [open, onEscapeClose, onClose]);
37
30
  const handleBackdropClick = event => {
38
31
  if (onClickOutClose && event.target instanceof HTMLElement && event.target.classList.contains('overlay-modal-backdrop')) {
39
- onClose === null || onClose === void 0 ? void 0 : onClose();
32
+ onClose?.();
40
33
  }
41
34
  };
42
- return open ? /*#__PURE__*/_react.default.createElement("div", {
35
+ return open ? /*#__PURE__*/_jsx("div", {
43
36
  className: 'overlay-modal-backdrop',
44
- onClick: handleBackdropClick
45
- }, /*#__PURE__*/_react.default.createElement("div", {
46
- className: 'overlay-modal-container'
47
- }, /*#__PURE__*/_react.default.createElement(_material.IconButton, {
48
- onClick: onClose,
49
- className: 'overlay-modal-close'
50
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
51
- size: 'xlarge',
52
- name: "close",
53
- className: 'icon-close'
54
- })), /*#__PURE__*/_react.default.createElement("div", {
55
- className: "overlay-modal",
56
- style: {
57
- minHeight
58
- }
59
- }, /*#__PURE__*/_react.default.createElement("div", {
60
- className: "overlay-modal-content"
61
- }, children)), belowComponent && /*#__PURE__*/_react.default.createElement("div", {
62
- className: "overlay-modal-below"
63
- }, belowComponent))) : null;
37
+ onClick: handleBackdropClick,
38
+ children: /*#__PURE__*/_jsxs("div", {
39
+ className: 'overlay-modal-container',
40
+ children: [/*#__PURE__*/_jsx(IconButton, {
41
+ onClick: onClose,
42
+ className: 'overlay-modal-close',
43
+ children: /*#__PURE__*/_jsx(Icon, {
44
+ size: 'xlarge',
45
+ name: "close",
46
+ className: 'icon-close'
47
+ })
48
+ }), /*#__PURE__*/_jsx("div", {
49
+ className: "overlay-modal",
50
+ style: {
51
+ minHeight
52
+ },
53
+ children: /*#__PURE__*/_jsx("div", {
54
+ className: "overlay-modal-content",
55
+ children: children
56
+ })
57
+ }), belowComponent && /*#__PURE__*/_jsx("div", {
58
+ className: "overlay-modal-below",
59
+ children: belowComponent
60
+ })]
61
+ })
62
+ }) : null;
64
63
  };
65
- var _default = exports.default = OverlayModal;
64
+ export default OverlayModal;