@terraware/web-components 4.2.26-rc.0 → 4.3.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 (322) hide show
  1. package/_vendor/react-multi-carousel/index.js +13 -0
  2. package/_vendor/react-multi-carousel/lib/Arrows.js +13 -0
  3. package/_vendor/react-multi-carousel/lib/Carousel.js +19 -0
  4. package/_vendor/react-multi-carousel/lib/CarouselItems.js +14 -0
  5. package/_vendor/react-multi-carousel/lib/Dots.js +16 -0
  6. package/_vendor/react-multi-carousel/lib/index.js +13 -0
  7. package/_vendor/react-multi-carousel/lib/types.js +13 -0
  8. package/_vendor/react-multi-carousel/lib/utils/clones.js +14 -0
  9. package/_vendor/react-multi-carousel/lib/utils/common.js +13 -0
  10. package/_vendor/react-multi-carousel/lib/utils/dots.js +14 -0
  11. package/_vendor/react-multi-carousel/lib/utils/elementWidth.js +12 -0
  12. package/_vendor/react-multi-carousel/lib/utils/index.js +20 -0
  13. package/_vendor/react-multi-carousel/lib/utils/mouseOrTouchMove.js +14 -0
  14. package/_vendor/react-multi-carousel/lib/utils/next.js +13 -0
  15. package/_vendor/react-multi-carousel/lib/utils/previous.js +14 -0
  16. package/_vendor/react-multi-carousel/lib/utils/throttle.js +12 -0
  17. package/_vendor/react-multi-carousel/lib/utils/throwError.js +14 -0
  18. package/_virtual/Arrows.js +3 -0
  19. package/_virtual/Carousel.js +3 -0
  20. package/_virtual/CarouselItems.js +3 -0
  21. package/_virtual/Dots.js +3 -0
  22. package/_virtual/_commonjsHelpers.js +5 -0
  23. package/_virtual/clones.js +3 -0
  24. package/_virtual/common.js +3 -0
  25. package/_virtual/dots2.js +3 -0
  26. package/_virtual/elementWidth.js +3 -0
  27. package/_virtual/index.js +7 -0
  28. package/_virtual/index2.js +3 -0
  29. package/_virtual/index3.js +3 -0
  30. package/_virtual/mouseOrTouchMove.js +3 -0
  31. package/_virtual/next.js +3 -0
  32. package/_virtual/previous.js +3 -0
  33. package/_virtual/throttle.js +3 -0
  34. package/_virtual/throwError.js +3 -0
  35. package/_virtual/types.js +3 -0
  36. package/components/AntSwitch/index.js +6 -4
  37. package/components/Autocomplete/Autocomplete.js +19 -16
  38. package/components/Badge/index.js +8 -6
  39. package/components/BusySpinner/index.js +11 -8
  40. package/components/Button/Button.js +12 -9
  41. package/components/Checkbox.js +11 -8
  42. package/components/Confirm/index.js +14 -17
  43. package/components/DatePicker/DatePicker.js +19 -23
  44. package/components/DialogBox/DialogBox.js +25 -20
  45. package/components/Divisor.js +11 -8
  46. package/components/Dropdown.js +18 -15
  47. package/components/EditableTable/index.js +17 -14
  48. package/components/ErrorBox/ErrorBox.js +18 -15
  49. package/components/FileChooser/index.js +20 -15
  50. package/components/FormBottomBar/index.js +15 -12
  51. package/components/Icon/Icon.js +9 -6
  52. package/components/Icon/icons/index.js +252 -251
  53. package/components/IconTooltip/index.js +14 -9
  54. package/components/Map/MapBox.js +35 -32
  55. package/components/Map/MapContainer.js +10 -6
  56. package/components/Map/MapDateSliderControl.js +14 -12
  57. package/components/Map/MapDrawer.js +16 -12
  58. package/components/Map/MapLegend.js +32 -28
  59. package/components/Map/MapViewStyleControl.js +11 -9
  60. package/components/Map/ReactMapboxWrapper.js +1 -1
  61. package/components/Map/index.js +13 -11
  62. package/components/Map/types.js +5 -3
  63. package/components/Map/useMaintainLayerOrder.js +5 -2
  64. package/components/Markdown/index.js +6 -4
  65. package/components/Message/Message.js +25 -20
  66. package/components/MultiSelect/index.js +26 -23
  67. package/components/Navbar/NavFooter.js +8 -5
  68. package/components/Navbar/NavItem.js +14 -11
  69. package/components/Navbar/NavSection.js +10 -7
  70. package/components/Navbar/Navbar.js +16 -11
  71. package/components/Navbar/SubNavbar.js +8 -5
  72. package/components/Note.js +10 -7
  73. package/components/OverlayModal/OverlayModal.js +13 -11
  74. package/components/PageForm/index.js +15 -12
  75. package/components/PhotoChooser/index.js +30 -25
  76. package/components/PhotosCarousel/index.js +15 -18
  77. package/components/Pill/index.js +14 -11
  78. package/components/PillList/index.js +10 -7
  79. package/components/PlacementWrapper/index.js +8 -6
  80. package/components/PopoverMenu/Popover.js +12 -9
  81. package/components/PopoverMenu/index.js +14 -11
  82. package/components/PopoverMultiSelect/index.js +14 -11
  83. package/components/ProgressCircle/ProgressCircle.js +12 -9
  84. package/components/RadioButton.js +9 -6
  85. package/components/Select/Select.js +9 -6
  86. package/components/Select/SelectT.js +30 -26
  87. package/components/Separator/index.js +7 -5
  88. package/components/Size.js +1 -1
  89. package/components/Slider/index.js +9 -6
  90. package/components/SummaryBox.js +13 -10
  91. package/components/Tabs/index.js +22 -18
  92. package/components/TextTruncated/index.js +13 -20
  93. package/components/Textfield/Textfield.js +34 -28
  94. package/components/Textfield/TruncatedTextArea.js +12 -10
  95. package/components/TimelineSlider/TimelineMarker.js +8 -6
  96. package/components/TimelineSlider/TimelineRail.js +6 -4
  97. package/components/TimelineSlider/index.js +14 -12
  98. package/components/Tooltip/Tooltip.js +12 -7
  99. package/components/ViewPhotosDialog/index.js +14 -11
  100. package/components/VirtualWalkthrough/Annotation.js +10 -8
  101. package/components/VirtualWalkthrough/AnnotationEditPane.js +23 -21
  102. package/components/VirtualWalkthrough/AnnotationPanel.js +16 -14
  103. package/components/VirtualWalkthrough/Application.js +9 -7
  104. package/components/VirtualWalkthrough/AutoRotator.js +5 -3
  105. package/components/VirtualWalkthrough/BlockingSpinner.js +10 -7
  106. package/components/VirtualWalkthrough/BoundaryRing.js +8 -6
  107. package/components/VirtualWalkthrough/BoundaryWall.js +8 -6
  108. package/components/VirtualWalkthrough/CameraInfo.js +15 -13
  109. package/components/VirtualWalkthrough/ControlsInfoPane.js +59 -57
  110. package/components/VirtualWalkthrough/GradientSky.js +8 -6
  111. package/components/VirtualWalkthrough/SplatControls.js +37 -35
  112. package/components/VirtualWalkthrough/SplatCrop.js +6 -4
  113. package/components/VirtualWalkthrough/SplatFadeCrop.js +7 -5
  114. package/components/VirtualWalkthrough/SplatModel.js +17 -14
  115. package/components/VirtualWalkthrough/SplatRevealRain.js +6 -4
  116. package/components/VirtualWalkthrough/TfAnnotationManager.js +8 -5
  117. package/components/VirtualWalkthrough/TfXrNavigation.js +7 -5
  118. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +47 -45
  119. package/components/VirtualWalkthrough/VrAnnotationPanel.js +9 -7
  120. package/components/VirtualWalkthrough/XrAnnotationInteraction.js +9 -7
  121. package/components/VirtualWalkthrough/XrExitButton.js +9 -7
  122. package/components/VirtualWalkthrough/XrGazeDwell.js +9 -7
  123. package/components/VirtualWalkthrough/XrPointerRay.js +9 -7
  124. package/components/VirtualWalkthrough/boundary-ring.js +7 -5
  125. package/components/VirtualWalkthrough/boundary-wall.js +8 -6
  126. package/components/VirtualWalkthrough/groundPlane.js +6 -3
  127. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +5 -2
  128. package/components/VirtualWalkthrough/splatFormat.js +6 -4
  129. package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +4 -2
  130. package/components/VirtualWalkthrough/vr-annotation-panel.js +8 -5
  131. package/components/VirtualWalkthrough/walkthrough-camera.js +6 -4
  132. package/components/VirtualWalkthrough/xr-annotation-candidates.js +8 -6
  133. package/components/VirtualWalkthrough/xr-annotation-interaction.js +9 -6
  134. package/components/VirtualWalkthrough/xr-annotation-targeting.js +5 -2
  135. package/components/VirtualWalkthrough/xr-button-arming.js +4 -2
  136. package/components/VirtualWalkthrough/xr-button-hold.js +5 -3
  137. package/components/VirtualWalkthrough/xr-exit-button.js +10 -8
  138. package/components/VirtualWalkthrough/xr-face-buttons.js +6 -4
  139. package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +5 -3
  140. package/components/VirtualWalkthrough/xr-gaze-dwell.js +9 -7
  141. package/components/VirtualWalkthrough/xr-interactive-ui.js +10 -8
  142. package/components/VirtualWalkthrough/xr-pointer-ray.js +5 -3
  143. package/components/VirtualWalkthrough/xr-progress-pie.js +4 -2
  144. package/components/VirtualWalkthrough/xr-ray-quad.js +5 -2
  145. package/components/VirtualWalkthrough/xr-scene-bounds.js +5 -3
  146. package/components/VirtualWalkthrough/xr-teleport-gesture.js +4 -2
  147. package/components/svg/BlobbyGrayIconImage.js +13 -11
  148. package/components/svg/BlobbyGrayIconImport.js +13 -11
  149. package/components/svg/BlobbyGrayIconUploadToTheCloud.js +13 -11
  150. package/components/svg/BlobbyIconCloudChecked.js +41 -39
  151. package/components/svg/BlobbyIconExportOrUploadPhoto.js +41 -39
  152. package/components/svg/BlobbyIconFolder.js +41 -39
  153. package/components/svg/BlobbyIconGraphReport.js +41 -39
  154. package/components/svg/BlobbyIconHappy.js +41 -39
  155. package/components/svg/BlobbyIconHeartMonitor.js +41 -39
  156. package/components/svg/BlobbyIconLeaf.js +41 -39
  157. package/components/svg/BlobbyIconLibrary.js +41 -39
  158. package/components/svg/BlobbyIconNursery.js +41 -39
  159. package/components/svg/BlobbyIconOrganization.js +41 -39
  160. package/components/svg/BlobbyIconParchment.js +41 -39
  161. package/components/svg/BlobbyIconPeople.js +41 -39
  162. package/components/svg/BlobbyIconSeedBank.js +41 -39
  163. package/components/svg/BlobbyIconSeedling.js +41 -39
  164. package/components/svg/BlobbyIconSeeds.js +41 -39
  165. package/components/svg/BlobbyIconSite.js +42 -40
  166. package/components/svg/BlobbyIconSparkles.js +41 -39
  167. package/components/svg/BlobbyIconWrench.js +41 -39
  168. package/components/svg/Bug.js +8 -6
  169. package/components/svg/Calendar.js +8 -6
  170. package/components/svg/CaretDown.js +8 -6
  171. package/components/svg/CaretLeft.js +8 -6
  172. package/components/svg/CaretRight.js +8 -6
  173. package/components/svg/CaretUp.js +8 -6
  174. package/components/svg/ChevronDown.js +8 -6
  175. package/components/svg/ChevronUp.js +8 -6
  176. package/components/svg/Close.js +8 -6
  177. package/components/svg/Critical.js +8 -6
  178. package/components/svg/Edit.js +41 -39
  179. package/components/svg/Error.js +8 -6
  180. package/components/svg/Filter.js +8 -6
  181. package/components/svg/Folder.js +8 -6
  182. package/components/svg/Help.js +8 -6
  183. package/components/svg/Home.js +8 -6
  184. package/components/svg/IconAdd.js +8 -6
  185. package/components/svg/IconArrowRight.js +8 -6
  186. package/components/svg/IconBusinessNetwork.js +8 -6
  187. package/components/svg/IconCalendar.js +8 -6
  188. package/components/svg/IconCancel.js +8 -6
  189. package/components/svg/IconChargingBattery.js +8 -6
  190. package/components/svg/IconChecklist.js +8 -6
  191. package/components/svg/IconCheckmark.js +8 -6
  192. package/components/svg/IconCoinInHand.js +8 -6
  193. package/components/svg/IconColumns.js +8 -6
  194. package/components/svg/IconComment.js +8 -6
  195. package/components/svg/IconDashboard.js +8 -6
  196. package/components/svg/IconDataMigration.js +8 -6
  197. package/components/svg/IconDocument.js +8 -6
  198. package/components/svg/IconDownloadFromTheCloud.js +8 -6
  199. package/components/svg/IconEdit.js +8 -6
  200. package/components/svg/IconExpand.js +8 -6
  201. package/components/svg/IconExport.js +8 -6
  202. package/components/svg/IconExternalLink.js +8 -6
  203. package/components/svg/IconEye.js +8 -6
  204. package/components/svg/IconEyeOff.js +8 -6
  205. package/components/svg/IconFile.js +8 -6
  206. package/components/svg/IconFolder.js +8 -6
  207. package/components/svg/IconFullScreen.js +8 -6
  208. package/components/svg/IconFutures.js +8 -6
  209. package/components/svg/IconGraphReport.js +8 -6
  210. package/components/svg/IconHeartMonitor.js +8 -6
  211. package/components/svg/IconHelp.js +8 -6
  212. package/components/svg/IconHistory.js +8 -6
  213. package/components/svg/IconImport.js +8 -6
  214. package/components/svg/IconIndex.js +8 -6
  215. package/components/svg/IconLayers.js +8 -6
  216. package/components/svg/IconLibrary.js +8 -6
  217. package/components/svg/IconList.js +8 -6
  218. package/components/svg/IconLivePlant.js +8 -6
  219. package/components/svg/IconLocations.js +8 -6
  220. package/components/svg/IconMail.js +8 -6
  221. package/components/svg/IconManager.js +8 -6
  222. package/components/svg/IconMarker.js +8 -6
  223. package/components/svg/IconMenu.js +8 -6
  224. package/components/svg/IconMenuHorizontal.js +8 -6
  225. package/components/svg/IconModule.js +8 -6
  226. package/components/svg/IconMyLocation.js +8 -6
  227. package/components/svg/IconNote.js +8 -6
  228. package/components/svg/IconNursery.js +8 -6
  229. package/components/svg/IconOrg.js +8 -6
  230. package/components/svg/IconParchment.js +8 -6
  231. package/components/svg/IconPhoto.js +8 -6
  232. package/components/svg/IconPlantsFilled.js +8 -6
  233. package/components/svg/IconRedo.js +8 -6
  234. package/components/svg/IconRestorationSite.js +8 -6
  235. package/components/svg/IconSeedBank.js +8 -6
  236. package/components/svg/IconSeedling.js +8 -6
  237. package/components/svg/IconSettings.js +8 -6
  238. package/components/svg/IconSlice.js +8 -6
  239. package/components/svg/IconSubmit.js +8 -6
  240. package/components/svg/IconSubtract.js +8 -6
  241. package/components/svg/IconSynced.js +8 -6
  242. package/components/svg/IconTrashCan.js +8 -6
  243. package/components/svg/IconTreasureMap.js +8 -6
  244. package/components/svg/IconUnavailable.js +8 -6
  245. package/components/svg/IconUndo.js +8 -6
  246. package/components/svg/IconVariable.js +8 -6
  247. package/components/svg/IconVideo.js +9 -7
  248. package/components/svg/IconWifi.js +8 -6
  249. package/components/svg/Info.js +8 -6
  250. package/components/svg/Key.js +8 -6
  251. package/components/svg/Leaf.js +8 -6
  252. package/components/svg/Lock.js +8 -6
  253. package/components/svg/Logo.js +16 -14
  254. package/components/svg/MenuVertical.js +8 -6
  255. package/components/svg/Notification.js +8 -6
  256. package/components/svg/Person.js +8 -6
  257. package/components/svg/Plus.js +8 -6
  258. package/components/svg/RestorationSite.js +8 -6
  259. package/components/svg/Search.js +8 -6
  260. package/components/svg/Seeds.js +8 -6
  261. package/components/svg/Site.js +8 -6
  262. package/components/svg/Sparkles.js +8 -6
  263. package/components/svg/Species.js +8 -6
  264. package/components/svg/Species2.js +41 -39
  265. package/components/svg/Spinner.js +16 -14
  266. package/components/svg/Star.js +8 -6
  267. package/components/svg/Success.js +8 -6
  268. package/components/svg/SuccessFilled.js +8 -6
  269. package/components/svg/TerrawareLogoDesktop.js +17 -15
  270. package/components/svg/TerrawareLogoMobile.js +9 -7
  271. package/components/svg/Touchscreen.js +8 -6
  272. package/components/svg/UploadCloud.js +41 -39
  273. package/components/svg/Warning.js +8 -6
  274. package/components/svg/WelcomeClipboard.js +32 -30
  275. package/components/svg/index.js +127 -127
  276. package/components/table/EnhancedTableToolbar.js +18 -15
  277. package/components/table/EnhancedTableToolbarV2.js +8 -6
  278. package/components/table/TableCellRenderer.js +37 -32
  279. package/components/table/TableHeader.js +17 -14
  280. package/components/table/TableHeaderItem.js +18 -15
  281. package/components/table/density.js +5 -3
  282. package/components/table/index.js +40 -37
  283. package/components/table/sort.js +6 -4
  284. package/components/table/types.js +1 -1
  285. package/components/types/index.js +1 -1
  286. package/hooks/useBoolean.js +4 -2
  287. package/hooks/useCameraPosition.js +5 -2
  288. package/hooks/useDevicePerformance.js +6 -3
  289. package/hooks/useXr.js +6 -4
  290. package/index.js +55 -58
  291. package/package.json +6 -2
  292. package/style-dictionary-dist/TerrawareTheme.js +2 -1
  293. package/theme.js +5 -2
  294. package/utils/color.js +5 -2
  295. package/utils/date.js +7 -6
  296. package/utils/index.js +4 -5
  297. package/utils/preventDefaultEvent.js +2 -1
  298. package/utils/text.js +3 -2
  299. package/utils/useDeviceInfo.js +2 -1
  300. package/virtualWalkthrough.js +23 -31
  301. package/components/Button/button.test.js +0 -23
  302. package/components/MultiSelect/MultiSelect.test.js +0 -73
  303. package/components/VirtualWalkthrough/TfXrNavigation.test.js +0 -110
  304. package/components/VirtualWalkthrough/boundary-ring.test.js +0 -109
  305. package/components/VirtualWalkthrough/boundary-wall.test.js +0 -203
  306. package/components/VirtualWalkthrough/groundPlane.test.js +0 -45
  307. package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
  308. package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +0 -26
  309. package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +0 -66
  310. package/components/VirtualWalkthrough/xr-button-arming.test.js +0 -35
  311. package/components/VirtualWalkthrough/xr-button-hold.test.js +0 -57
  312. package/components/VirtualWalkthrough/xr-exit-button.test.js +0 -23
  313. package/components/VirtualWalkthrough/xr-face-buttons.test.js +0 -82
  314. package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +0 -61
  315. package/components/VirtualWalkthrough/xr-interactive-ui.test.js +0 -165
  316. package/components/VirtualWalkthrough/xr-progress-pie.test.js +0 -79
  317. package/components/VirtualWalkthrough/xr-ray-quad.test.js +0 -37
  318. package/components/VirtualWalkthrough/xr-scene-bounds.test.js +0 -70
  319. package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +0 -90
  320. package/components/table/sort.test.js +0 -35
  321. package/utils/date.test.js +0 -84
  322. package/utils/text.test.js +0 -21
@@ -1,11 +1,12 @@
1
- import React from 'react';
1
+ import 'react';
2
2
  import { useSortable } from '@dnd-kit/sortable';
3
3
  import { CSS } from '@dnd-kit/utilities';
4
4
  import { DragHandle } from '@mui/icons-material';
5
- import { Box, TableCell, TableSortLabel, useTheme } from '@mui/material';
6
- import IconTooltip from '../IconTooltip';
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- export default function TableHeaderItem(props) {
5
+ import { useTheme, TableCell, Box, TableSortLabel } from '@mui/material';
6
+ import IconTooltip from '../IconTooltip/index.js';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+
9
+ function TableHeaderItem(props) {
9
10
  const {
10
11
  headCell,
11
12
  order,
@@ -32,7 +33,7 @@ export default function TableHeaderItem(props) {
32
33
  const createSortHandler = property => event => {
33
34
  onRequestSort(event, property);
34
35
  };
35
- return headCell.alignment === 'right' ? /*#__PURE__*/_jsx(TableCell, {
36
+ return headCell.alignment === 'right' ? /*#__PURE__*/jsx(TableCell, {
36
37
  ref: setNodeRef,
37
38
  id: `table-header-${headCell.id}`,
38
39
  align: 'right',
@@ -41,22 +42,22 @@ export default function TableHeaderItem(props) {
41
42
  style: style,
42
43
  className: headCell.className || '',
43
44
  sx: headCell.sx,
44
- children: /*#__PURE__*/_jsxs(Box, {
45
+ children: /*#__PURE__*/jsxs(Box, {
45
46
  display: "flex",
46
47
  alignItems: "center",
47
48
  flexDirection: "row-reverse",
48
- children: [headCell.label && /*#__PURE__*/_jsxs(TableSortLabel, {
49
+ children: [headCell.label && /*#__PURE__*/jsxs(TableSortLabel, {
49
50
  sx: {
50
51
  flexDirection: 'row-reverse'
51
52
  },
52
53
  active: orderBy === headCell.id,
53
54
  direction: orderBy === headCell.id ? order : 'asc',
54
55
  onClick: createSortHandler(headCell.id),
55
- children: [headCell.tooltipTitle && /*#__PURE__*/_jsx(IconTooltip, {
56
+ children: [headCell.tooltipTitle && /*#__PURE__*/jsx(IconTooltip, {
56
57
  title: headCell.tooltipTitle,
57
58
  disableRightMargin: true
58
59
  }), headCell.label]
59
- }), i > 0 && /*#__PURE__*/_jsx(DragHandle, {
60
+ }), i > 0 && /*#__PURE__*/jsx(DragHandle, {
60
61
  ...attributes,
61
62
  ...listeners,
62
63
  sx: {
@@ -70,7 +71,7 @@ export default function TableHeaderItem(props) {
70
71
  }
71
72
  })]
72
73
  })
73
- }, headCell.id) : /*#__PURE__*/_jsx(TableCell, {
74
+ }, headCell.id) : /*#__PURE__*/jsx(TableCell, {
74
75
  ref: setNodeRef,
75
76
  id: `table-header-${headCell.id}`,
76
77
  align: 'left',
@@ -79,11 +80,11 @@ export default function TableHeaderItem(props) {
79
80
  style: style,
80
81
  className: headCell.className || '',
81
82
  sx: headCell.sx,
82
- children: headCell.label && /*#__PURE__*/_jsxs(TableSortLabel, {
83
+ children: headCell.label && /*#__PURE__*/jsxs(TableSortLabel, {
83
84
  active: orderBy === headCell.id,
84
85
  direction: orderBy === headCell.id ? order : 'asc',
85
86
  onClick: createSortHandler(headCell.id),
86
- children: [i > 0 && /*#__PURE__*/_jsx(DragHandle, {
87
+ children: [i > 0 && /*#__PURE__*/jsx(DragHandle, {
87
88
  ...attributes,
88
89
  ...listeners,
89
90
  sx: {
@@ -93,9 +94,11 @@ export default function TableHeaderItem(props) {
93
94
  color: theme.palette.neutral[600]
94
95
  }
95
96
  }
96
- }), headCell.label, headCell.tooltipTitle && /*#__PURE__*/_jsx(IconTooltip, {
97
+ }), headCell.label, headCell.tooltipTitle && /*#__PURE__*/jsx(IconTooltip, {
97
98
  title: headCell.tooltipTitle
98
99
  })]
99
100
  })
100
101
  }, headCell.id);
101
- }
102
+ }
103
+
104
+ export { TableHeaderItem as default };
@@ -1,4 +1,4 @@
1
- export const getTableCellPaddingY = tableDensity => {
1
+ const getTableCellPaddingY = tableDensity => {
2
2
  switch (tableDensity) {
3
3
  case 'comfortable':
4
4
  return '16px';
@@ -8,7 +8,7 @@ export const getTableCellPaddingY = tableDensity => {
8
8
  return '20px';
9
9
  }
10
10
  };
11
- export const getTableRowHeight = tableDensity => {
11
+ const getTableRowHeight = tableDensity => {
12
12
  switch (tableDensity) {
13
13
  case 'comfortable':
14
14
  return '52px';
@@ -17,4 +17,6 @@ export const getTableRowHeight = tableDensity => {
17
17
  case 'roomy':
18
18
  return '60px';
19
19
  }
20
- };
20
+ };
21
+
22
+ export { getTableCellPaddingY, getTableRowHeight };
@@ -1,28 +1,29 @@
1
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
- import { DndContext, KeyboardSensor, MouseSensor, TouchSensor, useSensor, useSensors } from '@dnd-kit/core';
1
+ import React, { useState, useEffect, useCallback, useMemo } from 'react';
2
+ import { useSensors, useSensor, MouseSensor, TouchSensor, KeyboardSensor, DndContext } from '@dnd-kit/core';
3
3
  import { sortableKeyboardCoordinates } from '@dnd-kit/sortable';
4
- import { Box, Checkbox, Pagination, Table, TableBody, TableCell, TableContainer, TableRow, Typography, useTheme } from '@mui/material';
5
- import { useDeviceInfo } from '../../utils';
6
- import { CheckboxStyle } from '../Checkbox';
7
- import EnhancedTableToolbarV2 from './EnhancedTableToolbarV2';
8
- import TableCellRenderer from './TableCellRenderer';
9
- import TableHeader from './TableHeader';
10
- import { getTableCellPaddingY, getTableRowHeight } from './density';
11
- import { descendingComparator, getComparator, stableSort } from './sort';
4
+ import { useTheme, TableContainer, Table, TableBody, TableRow, TableCell, Checkbox, Typography, Box, Pagination } from '@mui/material';
5
+ import 'lodash';
6
+ import 'luxon';
7
+ import useDeviceInfo from '../../utils/useDeviceInfo.js';
8
+ import { CheckboxStyle } from '../Checkbox.js';
9
+ import EnhancedTableToolbarV2 from './EnhancedTableToolbarV2.js';
10
+ import CellRenderer from './TableCellRenderer.js';
11
+ import EnhancedTableHead from './TableHeader.js';
12
+ import { getTableCellPaddingY, getTableRowHeight } from './density.js';
13
+ import { stableSort, descendingComparator, getComparator } from './sort.js';
14
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
12
15
 
13
- // Only the text related props need to be passed in by the implementer, and extra data is passed to the caller
14
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
- export const isTopBarButton = input => {
16
+ const isTopBarButton = input => {
16
17
  const castInput = input;
17
18
  return !!(castInput.buttonType && castInput.onButtonClick);
18
19
  };
19
- export default function EnhancedTable({
20
+ function EnhancedTable({
20
21
  id,
21
22
  columns,
22
23
  rows,
23
24
  order: _order = 'asc',
24
25
  orderBy: _orderBy,
25
- Renderer = TableCellRenderer,
26
+ Renderer = CellRenderer,
26
27
  onSelect,
27
28
  onPageChange,
28
29
  maxItemsPerPage = 100,
@@ -227,8 +228,8 @@ export default function EnhancedTable({
227
228
  }
228
229
  return Math.min(pageNumber * maxItemsPerPage, paginationTotal);
229
230
  }, [pageNumber, maxItemsPerPage, paginationTotal, sortedPageRows.length]);
230
- return /*#__PURE__*/_jsxs(_Fragment, {
231
- children: [showTopBar && /*#__PURE__*/_jsx(EnhancedTableToolbarV2, {
231
+ return /*#__PURE__*/jsxs(Fragment, {
232
+ children: [showTopBar && /*#__PURE__*/jsx(EnhancedTableToolbarV2, {
232
233
  selectedRowsCount: selectedRows?.length || 0,
233
234
  pagesCount: pagesCount,
234
235
  renderNumSelectedText: renderNumSelectedText,
@@ -239,12 +240,12 @@ export default function EnhancedTable({
239
240
  handleSelectAll: () => setSelectedRows && setSelectedRows(rows),
240
241
  handleSelectNone: () => setSelectedRows && setSelectedRows([])
241
242
  } : undefined
242
- }), /*#__PURE__*/_jsx(TableContainer, {
243
+ }), /*#__PURE__*/jsx(TableContainer, {
243
244
  id: id,
244
- children: /*#__PURE__*/_jsx(DndContext, {
245
+ children: /*#__PURE__*/jsx(DndContext, {
245
246
  sensors: sensors,
246
247
  onDragEnd: handleDragEnd,
247
- children: /*#__PURE__*/_jsxs(Table, {
248
+ children: /*#__PURE__*/jsxs(Table, {
248
249
  stickyHeader: stickyHeader,
249
250
  "aria-labelledby": "tableTitle",
250
251
  size: "medium",
@@ -252,7 +253,7 @@ export default function EnhancedTable({
252
253
  sx: {
253
254
  borderCollapse: 'initial'
254
255
  },
255
- children: [!hideHeader && /*#__PURE__*/_jsx(TableHeader, {
256
+ children: [!hideHeader && /*#__PURE__*/jsx(EnhancedTableHead, {
256
257
  order: order,
257
258
  orderBy: orderBy,
258
259
  onRequestSort: handleRequestSort,
@@ -262,20 +263,20 @@ export default function EnhancedTable({
262
263
  onSelectAllClick: showCheckbox ? handleSelectAllClick : undefined,
263
264
  rowCount: showCheckbox ? sortedPageRows?.length : undefined,
264
265
  density: density
265
- }), /*#__PURE__*/_jsxs(TableBody, {
266
- children: [sortedPageRows.length < 1 && emptyTableMessage && /*#__PURE__*/_jsx(TableRow, {
267
- children: /*#__PURE__*/_jsx(TableCell, {
266
+ }), /*#__PURE__*/jsxs(TableBody, {
267
+ children: [sortedPageRows.length < 1 && emptyTableMessage && /*#__PURE__*/jsx(TableRow, {
268
+ children: /*#__PURE__*/jsx(TableCell, {
268
269
  colSpan: columns.length + 1,
269
270
  align: "center",
270
- children: /*#__PURE__*/_jsx("p", {
271
+ children: /*#__PURE__*/jsx("p", {
271
272
  children: emptyTableMessage
272
273
  })
273
274
  })
274
275
  }), sortedPageRows && sortedPageRows.map((row, index) => {
275
276
  const onClick = onSelect && !controlledOnSelect ? () => onSelect(row) : undefined;
276
277
  const isItemSelected = isSelected(row);
277
- return /*#__PURE__*/_jsxs(React.Fragment, {
278
- children: [/*#__PURE__*/_jsxs(TableRow, {
278
+ return /*#__PURE__*/jsxs(React.Fragment, {
279
+ children: [/*#__PURE__*/jsxs(TableRow, {
279
280
  id: `row${index + 1}`,
280
281
  hover: true,
281
282
  onClick: e => {
@@ -304,21 +305,21 @@ export default function EnhancedTable({
304
305
  backgroundColor: theme.palette.TwClrBgSecondaryHover
305
306
  }
306
307
  },
307
- children: [showCheckbox && /*#__PURE__*/_jsx(TableCell, {
308
+ children: [showCheckbox && /*#__PURE__*/jsx(TableCell, {
308
309
  padding: "checkbox",
309
310
  sx: {
310
311
  '&.MuiTableCell-root': {
311
312
  borderBottom: `1px solid ${theme.palette.TwClrBgSecondary}`
312
313
  }
313
314
  },
314
- children: /*#__PURE__*/_jsx(Checkbox, {
315
+ children: /*#__PURE__*/jsx(Checkbox, {
315
316
  disableRipple: true,
316
317
  sx: CheckboxStyle(theme),
317
318
  color: "primary",
318
319
  checked: isItemSelected,
319
320
  onClick: e => !isClickable || !isClickable(row) ? handleClick(e, row) : null
320
321
  })
321
- }), displayColumnDetails && displayColumnDetails.map(c => /*#__PURE__*/_jsx(Renderer, {
322
+ }), displayColumnDetails && displayColumnDetails.map(c => /*#__PURE__*/jsx(Renderer, {
322
323
  index: index + 1,
323
324
  row: row,
324
325
  column: c,
@@ -332,7 +333,7 @@ export default function EnhancedTable({
332
333
  paddingY: getTableCellPaddingY(density)
333
334
  }
334
335
  }, c.key))]
335
- }), DetailsRenderer && /*#__PURE__*/_jsx(DetailsRenderer, {
336
+ }), DetailsRenderer && /*#__PURE__*/jsx(DetailsRenderer, {
336
337
  index: index,
337
338
  row: row
338
339
  })]
@@ -341,22 +342,22 @@ export default function EnhancedTable({
341
342
  })]
342
343
  })
343
344
  })
344
- }), tableComments && /*#__PURE__*/_jsx(Typography, {
345
+ }), tableComments && /*#__PURE__*/jsx(Typography, {
345
346
  fontWeight: 400,
346
347
  fontSize: "14px",
347
348
  color: theme.palette.TwClrTxtSecondary,
348
349
  marginTop: 2,
349
350
  children: tableComments
350
- }), renderPaginationText && /*#__PURE__*/_jsxs(Box, {
351
+ }), renderPaginationText && /*#__PURE__*/jsxs(Box, {
351
352
  display: "flex",
352
353
  alignItems: "center",
353
354
  justifyContent: "flex-end",
354
355
  paddingTop: "24px",
355
- children: [/*#__PURE__*/_jsx(Typography, {
356
+ children: [/*#__PURE__*/jsx(Typography, {
356
357
  paddingRight: "24px",
357
358
  fontSize: "14px",
358
359
  children: renderPaginationText(minRowNumber, maxRowNumber, paginationTotal)
359
- }), /*#__PURE__*/_jsx(Pagination, {
360
+ }), /*#__PURE__*/jsx(Pagination, {
360
361
  count: pagesCount,
361
362
  page: pageNumber,
362
363
  shape: "rounded",
@@ -367,9 +368,11 @@ export default function EnhancedTable({
367
368
  })]
368
369
  });
369
370
  }
370
- export function tableSort(ignore, array, comparator) {
371
+ function tableSort(ignore, array, comparator) {
371
372
  if (ignore) {
372
373
  return array;
373
374
  }
374
375
  return stableSort(array, comparator);
375
- }
376
+ }
377
+
378
+ export { EnhancedTable as default, isTopBarButton, tableSort };
@@ -1,4 +1,4 @@
1
- export function descendingComparator(a, b, orderBy, order) {
1
+ function descendingComparator(a, b, orderBy, order) {
2
2
  // first attempt to parse into a numeric value and compare
3
3
  const numCompare = descendingNumComparator(a, b, orderBy);
4
4
  if (numCompare !== null) {
@@ -46,10 +46,10 @@ function descendingNumComparator(a, b, orderBy) {
46
46
  }
47
47
  return null;
48
48
  }
49
- export function getComparator(order, orderBy, sorting) {
49
+ function getComparator(order, orderBy, sorting) {
50
50
  return (a, b) => sorting(a, b, orderBy, order);
51
51
  }
52
- export function stableSort(array, comparator) {
52
+ function stableSort(array, comparator) {
53
53
  const stabilizedThis = array.map((el, index) => [el, index]);
54
54
  stabilizedThis.sort((a, b) => {
55
55
  const order = comparator(a[0], b[0]);
@@ -59,4 +59,6 @@ export function stableSort(array, comparator) {
59
59
  return a[1] - b[1];
60
60
  });
61
61
  return stabilizedThis.map(el => el[0]);
62
- }
62
+ }
63
+
64
+ export { descendingComparator, getComparator, stableSort };
@@ -1 +1 @@
1
- export {};
1
+
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,5 @@
1
- import { useCallback, useState } from 'react';
1
+ import { useState, useCallback } from 'react';
2
+
2
3
  const useBoolean = initialValue => {
3
4
  const [value, setValue] = useState(initialValue);
4
5
  const setTrue = useCallback(() => {
@@ -9,4 +10,5 @@ const useBoolean = initialValue => {
9
10
  }, []);
10
11
  return [value, setValue, setTrue, setFalse];
11
12
  };
12
- export default useBoolean;
13
+
14
+ export { useBoolean as default };
@@ -1,7 +1,8 @@
1
1
  import { useCallback, useMemo } from 'react';
2
2
  import { useApp } from '@playcanvas/react/hooks';
3
3
  import { Vec3 } from 'playcanvas';
4
- export const useCameraPosition = () => {
4
+
5
+ const useCameraPosition = () => {
5
6
  const app = useApp();
6
7
  const setCamera = useCallback((focus, position, horizontalNdcBias = 0) => {
7
8
  const camera = app.root.findByName('camera');
@@ -30,4 +31,6 @@ export const useCameraPosition = () => {
30
31
  setCamera,
31
32
  getCameraState
32
33
  }), [setCamera, getCameraState]);
33
- };
34
+ };
35
+
36
+ export { useCameraPosition };
@@ -1,6 +1,7 @@
1
1
  import { useMemo } from 'react';
2
- import useDeviceInfo from '../utils/useDeviceInfo';
3
- export const useDevicePerformance = () => {
2
+ import useDeviceInfo from '../utils/useDeviceInfo.js';
3
+
4
+ const useDevicePerformance = () => {
4
5
  const {
5
6
  isMobile
6
7
  } = useDeviceInfo();
@@ -13,4 +14,6 @@ export const useDevicePerformance = () => {
13
14
  deviceMemory,
14
15
  isMobile
15
16
  };
16
- };
17
+ };
18
+
19
+ export { useDevicePerformance };
package/hooks/useXr.js CHANGED
@@ -1,11 +1,12 @@
1
- import { useCallback, useEffect, useMemo, useState } from 'react';
1
+ import { useState, useEffect, useCallback, useMemo } from 'react';
2
2
  import { useApp } from '@playcanvas/react/hooks';
3
- import { XRSPACE_LOCALFLOOR, XRTYPE_AR, XRTYPE_VR } from 'playcanvas';
3
+ import { XRTYPE_AR, XRTYPE_VR, XRSPACE_LOCALFLOOR } from 'playcanvas';
4
+
4
5
  const XR_TYPES = {
5
6
  VR: XRTYPE_VR,
6
7
  AR: XRTYPE_AR
7
8
  };
8
- export const useXr = ({
9
+ const useXr = ({
9
10
  onError
10
11
  } = {}) => {
11
12
  const app = useApp();
@@ -75,4 +76,5 @@ export const useXr = ({
75
76
  isCurrentlyInVr: currentXrType === XRTYPE_VR
76
77
  }), [isXrAvailable, startXr, endXr, currentXrType]);
77
78
  };
78
- export default useXr;
79
+
80
+ export { useXr as default, useXr };
package/index.js CHANGED
@@ -1,58 +1,55 @@
1
- /*
2
- * Defines the public components
3
- */
4
- import AntSwitch from './components/AntSwitch';
5
- import Autocomplete from './components/Autocomplete/Autocomplete';
6
- import Badge from './components/Badge';
7
- import BusySpinner from './components/BusySpinner';
8
- import Button from './components/Button/Button';
9
- import Checkbox from './components/Checkbox';
10
- import Confirm from './components/Confirm';
11
- import DatePicker from './components/DatePicker/DatePicker';
12
- import DialogBox from './components/DialogBox/DialogBox';
13
- import Divisor from './components/Divisor';
14
- import Dropdown, { DropdownV1 } from './components/Dropdown';
15
- import EditableTable from './components/EditableTable';
16
- import ErrorBox from './components/ErrorBox/ErrorBox';
17
- import FileChooser from './components/FileChooser';
18
- import FormBottomBar from './components/FormBottomBar';
19
- import Icon from './components/Icon/Icon';
20
- import icons from './components/Icon/icons';
21
- import IconTooltip from './components/IconTooltip';
22
- import MapComponent from './components/Map';
23
- import Message from './components/Message/Message';
24
- import MultiSelect from './components/MultiSelect';
25
- import NavFooter from './components/Navbar/NavFooter';
26
- import NavItem from './components/Navbar/NavItem';
27
- import NavSection from './components/Navbar/NavSection';
28
- import Navbar from './components/Navbar/Navbar';
29
- import Note from './components/Note';
30
- import OverlayModal from './components/OverlayModal/OverlayModal';
31
- import PageForm from './components/PageForm';
32
- import PhotoChooser from './components/PhotoChooser';
33
- import PhotosCarousel from './components/PhotosCarousel';
34
- import Pill from './components/Pill';
35
- import PillList from './components/PillList';
36
- import PlacementWrapper from './components/PlacementWrapper';
37
- import PopoverMenu from './components/PopoverMenu';
38
- import Popover from './components/PopoverMenu/Popover';
39
- import PopoverMultiSelect from './components/PopoverMultiSelect';
40
- import ProgressCircle from './components/ProgressCircle/ProgressCircle';
41
- import RadioButton from './components/RadioButton';
42
- import Select from './components/Select/Select';
43
- import SelectT from './components/Select/SelectT';
44
- import Separator from './components/Separator';
45
- import Slider from './components/Slider';
46
- import SummaryBox from './components/SummaryBox';
47
- import Tabs from './components/Tabs';
48
- import TextTruncated from './components/TextTruncated';
49
- import Textfield from './components/Textfield/Textfield';
50
- import TimelineSlider from './components/TimelineSlider';
51
- import Tooltip from './components/Tooltip/Tooltip';
52
- import ViewPhotosDialog from './components/ViewPhotosDialog';
53
- import * as Svg from './components/svg';
54
- import Table from './components/table';
55
- import CellRenderer, { CellDateRenderer } from './components/table/TableCellRenderer';
56
- import { descendingComparator, getComparator, stableSort } from './components/table/sort';
57
- import theme from './theme';
58
- export { AntSwitch, Autocomplete, Badge, BusySpinner, Button, CellRenderer, CellDateRenderer, Checkbox, Confirm, DatePicker, descendingComparator, DialogBox, Divisor, Dropdown, DropdownV1, EditableTable, ErrorBox, FileChooser, FormBottomBar, getComparator, icons, Icon, IconTooltip, MapComponent, Message, MultiSelect, NavFooter, NavItem, NavSection, Navbar, Note, OverlayModal, PageForm, Pill, PillList, PhotoChooser, PhotosCarousel, PlacementWrapper, Popover, PopoverMenu, PopoverMultiSelect, ProgressCircle, RadioButton, Select, SelectT, Separator, Slider, stableSort, SummaryBox, Svg, Table, Tabs, Textfield, TextTruncated, TimelineSlider, theme, Tooltip, ViewPhotosDialog };
1
+ export { default as AntSwitch } from './components/AntSwitch/index.js';
2
+ export { default as Autocomplete } from './components/Autocomplete/Autocomplete.js';
3
+ export { default as Badge } from './components/Badge/index.js';
4
+ export { default as BusySpinner } from './components/BusySpinner/index.js';
5
+ export { default as Button } from './components/Button/Button.js';
6
+ export { default as Checkbox } from './components/Checkbox.js';
7
+ export { default as Confirm } from './components/Confirm/index.js';
8
+ export { default as DatePicker } from './components/DatePicker/DatePicker.js';
9
+ export { default as DialogBox } from './components/DialogBox/DialogBox.js';
10
+ export { default as Divisor } from './components/Divisor.js';
11
+ export { default as Dropdown, DropdownV1 } from './components/Dropdown.js';
12
+ export { default as EditableTable } from './components/EditableTable/index.js';
13
+ export { default as ErrorBox } from './components/ErrorBox/ErrorBox.js';
14
+ export { default as FileChooser } from './components/FileChooser/index.js';
15
+ export { default as FormBottomBar } from './components/FormBottomBar/index.js';
16
+ export { default as Icon } from './components/Icon/Icon.js';
17
+ export { default as icons } from './components/Icon/icons/index.js';
18
+ export { default as IconTooltip } from './components/IconTooltip/index.js';
19
+ export { default as MapComponent } from './components/Map/index.js';
20
+ export { default as Message } from './components/Message/Message.js';
21
+ export { default as MultiSelect } from './components/MultiSelect/index.js';
22
+ export { default as NavFooter } from './components/Navbar/NavFooter.js';
23
+ export { default as NavItem } from './components/Navbar/NavItem.js';
24
+ export { default as NavSection } from './components/Navbar/NavSection.js';
25
+ export { default as Navbar } from './components/Navbar/Navbar.js';
26
+ export { default as Note } from './components/Note.js';
27
+ export { default as OverlayModal } from './components/OverlayModal/OverlayModal.js';
28
+ export { default as PageForm } from './components/PageForm/index.js';
29
+ export { default as PhotoChooser } from './components/PhotoChooser/index.js';
30
+ export { default as PhotosCarousel } from './components/PhotosCarousel/index.js';
31
+ export { default as Pill } from './components/Pill/index.js';
32
+ export { default as PillList } from './components/PillList/index.js';
33
+ export { default as PlacementWrapper } from './components/PlacementWrapper/index.js';
34
+ export { default as PopoverMenu } from './components/PopoverMenu/index.js';
35
+ export { default as Popover } from './components/PopoverMenu/Popover.js';
36
+ export { default as PopoverMultiSelect } from './components/PopoverMultiSelect/index.js';
37
+ export { default as ProgressCircle } from './components/ProgressCircle/ProgressCircle.js';
38
+ export { default as RadioButton } from './components/RadioButton.js';
39
+ export { default as Select } from './components/Select/Select.js';
40
+ export { default as SelectT } from './components/Select/SelectT.js';
41
+ export { default as Separator } from './components/Separator/index.js';
42
+ export { default as Slider } from './components/Slider/index.js';
43
+ export { default as SummaryBox } from './components/SummaryBox.js';
44
+ export { default as Tabs } from './components/Tabs/index.js';
45
+ export { default as TextTruncated } from './components/TextTruncated/index.js';
46
+ export { default as Textfield } from './components/Textfield/Textfield.js';
47
+ export { default as TimelineSlider } from './components/TimelineSlider/index.js';
48
+ export { default as Tooltip } from './components/Tooltip/Tooltip.js';
49
+ export { default as ViewPhotosDialog } from './components/ViewPhotosDialog/index.js';
50
+ import * as index from './components/svg/index.js';
51
+ export { index as Svg };
52
+ export { default as Table } from './components/table/index.js';
53
+ export { CellDateRenderer, default as CellRenderer } from './components/table/TableCellRenderer.js';
54
+ export { descendingComparator, getComparator, stableSort } from './components/table/sort.js';
55
+ export { default as theme } from './theme.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraware/web-components",
3
- "version": "4.2.26-rc.0",
3
+ "version": "4.3.0",
4
4
  "author": "Terraformation Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -48,5 +48,9 @@
48
48
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
49
49
  "type": "module",
50
50
  "module": "./index.js",
51
- "types": "./index.d.ts"
51
+ "types": "./index.d.ts",
52
+ "sideEffects": [
53
+ "*.css",
54
+ "*.scss"
55
+ ]
52
56
  }
@@ -184,4 +184,5 @@ const TerrawareTheme = {
184
184
  'TwClrTxtAccentAux': '#7473BA'
185
185
  }
186
186
  };
187
- export default TerrawareTheme;
187
+
188
+ export { TerrawareTheme as default };
package/theme.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { createTheme } from '@mui/material/styles';
2
- import TerrawareTheme from './style-dictionary-dist/TerrawareTheme';
2
+ import TerrawareTheme from './style-dictionary-dist/TerrawareTheme.js';
3
+
3
4
  const defaultTheme = {
4
5
  breakpoints: {
5
6
  values: {
@@ -76,4 +77,6 @@ const defaultTheme = {
76
77
  ...TerrawareTheme.palette
77
78
  }
78
79
  };
79
- export default createTheme(defaultTheme);
80
+ var theme = createTheme(defaultTheme);
81
+
82
+ export { theme as default };
package/utils/color.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import hexRgb from 'hex-rgb';
2
- export const getRgbaFromHex = (hex, opacity) => {
2
+
3
+ const getRgbaFromHex = (hex, opacity) => {
3
4
  const rgba = hexRgb(hex, {
4
5
  alpha: opacity,
5
6
  format: 'object'
@@ -11,4 +12,6 @@ export const getRgbaFromHex = (hex, opacity) => {
11
12
  alpha
12
13
  } = rgba;
13
14
  return `rgba(${red}, ${green}, ${blue}, ${alpha})`;
14
- };
15
+ };
16
+
17
+ export { getRgbaFromHex };
package/utils/date.js CHANGED
@@ -12,7 +12,7 @@ import { DateTime } from 'luxon';
12
12
  /**
13
13
  * Helper util that returns default time zone as a fallback.
14
14
  */
15
- export const tz = timeZoneId => timeZoneId || 'Etc/UTC';
15
+ const tz = timeZoneId => timeZoneId || 'Etc/UTC';
16
16
 
17
17
  /**
18
18
  * Parse a date ISO string with zone implied.
@@ -47,7 +47,7 @@ const getDisplayValue = date => {
47
47
  /**
48
48
  * Returns <Month> <Year> (eg. July 2023).
49
49
  */
50
- export const getShortDate = date => {
50
+ const getShortDate = date => {
51
51
  if (date.isValid) {
52
52
  return date.toFormat('LLLL yyyy');
53
53
  }
@@ -59,7 +59,7 @@ export const getShortDate = date => {
59
59
  * any DateType value passed in (ISO string or epoch milliseconds or DateTime object).
60
60
  * Note: the DateTime object input support is mostly for ease of use and will essentially be a pass-through.
61
61
  */
62
- export const getDate = (date, timeZoneId) => {
62
+ const getDate = (date, timeZoneId) => {
63
63
  if (typeof date === 'string') {
64
64
  const fromString = getDateFromISOString(date, timeZoneId);
65
65
  if (fromString.isValid) {
@@ -96,18 +96,19 @@ const getDateDisplayValue = (date, timeZoneId) => {
96
96
  /**
97
97
  * Exported function that returns todays date in a specific (optional) time zone.
98
98
  */
99
- export const getTodaysDateFormatted = timeZoneId => {
99
+ const getTodaysDateFormatted = timeZoneId => {
100
100
  return getDisplayValue(DateTime.now().setZone(tz(timeZoneId)));
101
101
  };
102
102
 
103
103
  /**
104
104
  * Checks if a date is in the future, time zone for date is optional.
105
105
  */
106
- export const isInTheFuture = (date, timeZoneId) => {
106
+ const isInTheFuture = (date, timeZoneId) => {
107
107
  const d = getDate(date, timeZoneId);
108
108
  if (d.isValid) {
109
109
  return d.toMillis() > Date.now();
110
110
  }
111
111
  return false;
112
112
  };
113
- export default getDateDisplayValue;
113
+
114
+ export { getDateDisplayValue as default, getDate, getShortDate, getTodaysDateFormatted, isInTheFuture, tz };