@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.
- package/_vendor/react-multi-carousel/index.js +13 -0
- package/_vendor/react-multi-carousel/lib/Arrows.js +13 -0
- package/_vendor/react-multi-carousel/lib/Carousel.js +19 -0
- package/_vendor/react-multi-carousel/lib/CarouselItems.js +14 -0
- package/_vendor/react-multi-carousel/lib/Dots.js +16 -0
- package/_vendor/react-multi-carousel/lib/index.js +13 -0
- package/_vendor/react-multi-carousel/lib/types.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/clones.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/common.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/dots.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/elementWidth.js +12 -0
- package/_vendor/react-multi-carousel/lib/utils/index.js +20 -0
- package/_vendor/react-multi-carousel/lib/utils/mouseOrTouchMove.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/next.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/previous.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/throttle.js +12 -0
- package/_vendor/react-multi-carousel/lib/utils/throwError.js +14 -0
- package/_virtual/Arrows.js +3 -0
- package/_virtual/Carousel.js +3 -0
- package/_virtual/CarouselItems.js +3 -0
- package/_virtual/Dots.js +3 -0
- package/_virtual/_commonjsHelpers.js +5 -0
- package/_virtual/clones.js +3 -0
- package/_virtual/common.js +3 -0
- package/_virtual/dots2.js +3 -0
- package/_virtual/elementWidth.js +3 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +3 -0
- package/_virtual/index3.js +3 -0
- package/_virtual/mouseOrTouchMove.js +3 -0
- package/_virtual/next.js +3 -0
- package/_virtual/previous.js +3 -0
- package/_virtual/throttle.js +3 -0
- package/_virtual/throwError.js +3 -0
- package/_virtual/types.js +3 -0
- package/components/AntSwitch/index.js +6 -4
- package/components/Autocomplete/Autocomplete.js +19 -16
- package/components/Badge/index.js +8 -6
- package/components/BusySpinner/index.js +11 -8
- package/components/Button/Button.js +12 -9
- package/components/Checkbox.js +11 -8
- package/components/Confirm/index.js +14 -17
- package/components/DatePicker/DatePicker.js +19 -23
- package/components/DialogBox/DialogBox.js +25 -20
- package/components/Divisor.js +11 -8
- package/components/Dropdown.js +18 -15
- package/components/EditableTable/index.js +17 -14
- package/components/ErrorBox/ErrorBox.js +18 -15
- package/components/FileChooser/index.js +20 -15
- package/components/FormBottomBar/index.js +15 -12
- package/components/Icon/Icon.js +9 -6
- package/components/Icon/icons/index.js +252 -251
- package/components/IconTooltip/index.js +14 -9
- package/components/Map/MapBox.js +35 -32
- package/components/Map/MapContainer.js +10 -6
- package/components/Map/MapDateSliderControl.js +14 -12
- package/components/Map/MapDrawer.js +16 -12
- package/components/Map/MapLegend.js +32 -28
- package/components/Map/MapViewStyleControl.js +11 -9
- package/components/Map/ReactMapboxWrapper.js +1 -1
- package/components/Map/index.js +13 -11
- package/components/Map/types.js +5 -3
- package/components/Map/useMaintainLayerOrder.js +5 -2
- package/components/Markdown/index.js +6 -4
- package/components/Message/Message.js +25 -20
- package/components/MultiSelect/index.js +26 -23
- package/components/Navbar/NavFooter.js +8 -5
- package/components/Navbar/NavItem.js +14 -11
- package/components/Navbar/NavSection.js +10 -7
- package/components/Navbar/Navbar.js +16 -11
- package/components/Navbar/SubNavbar.js +8 -5
- package/components/Note.js +10 -7
- package/components/OverlayModal/OverlayModal.js +13 -11
- package/components/PageForm/index.js +15 -12
- package/components/PhotoChooser/index.js +30 -25
- package/components/PhotosCarousel/index.js +15 -18
- package/components/Pill/index.js +14 -11
- package/components/PillList/index.js +10 -7
- package/components/PlacementWrapper/index.js +8 -6
- package/components/PopoverMenu/Popover.js +12 -9
- package/components/PopoverMenu/index.js +14 -11
- package/components/PopoverMultiSelect/index.js +14 -11
- package/components/ProgressCircle/ProgressCircle.js +12 -9
- package/components/RadioButton.js +9 -6
- package/components/Select/Select.js +9 -6
- package/components/Select/SelectT.js +30 -26
- package/components/Separator/index.js +7 -5
- package/components/Size.js +1 -1
- package/components/Slider/index.js +9 -6
- package/components/SummaryBox.js +13 -10
- package/components/Tabs/index.js +22 -18
- package/components/TextTruncated/index.js +13 -20
- package/components/Textfield/Textfield.js +34 -28
- package/components/Textfield/TruncatedTextArea.js +12 -10
- package/components/TimelineSlider/TimelineMarker.js +8 -6
- package/components/TimelineSlider/TimelineRail.js +6 -4
- package/components/TimelineSlider/index.js +14 -12
- package/components/Tooltip/Tooltip.js +12 -7
- package/components/ViewPhotosDialog/index.js +14 -11
- package/components/VirtualWalkthrough/Annotation.js +10 -8
- package/components/VirtualWalkthrough/AnnotationEditPane.js +23 -21
- package/components/VirtualWalkthrough/AnnotationPanel.js +16 -14
- package/components/VirtualWalkthrough/Application.js +9 -7
- package/components/VirtualWalkthrough/AutoRotator.js +5 -3
- package/components/VirtualWalkthrough/BlockingSpinner.js +10 -7
- package/components/VirtualWalkthrough/BoundaryRing.js +8 -6
- package/components/VirtualWalkthrough/BoundaryWall.js +8 -6
- package/components/VirtualWalkthrough/CameraInfo.js +15 -13
- package/components/VirtualWalkthrough/ControlsInfoPane.js +59 -57
- package/components/VirtualWalkthrough/GradientSky.js +8 -6
- package/components/VirtualWalkthrough/SplatControls.js +37 -35
- package/components/VirtualWalkthrough/SplatCrop.js +6 -4
- package/components/VirtualWalkthrough/SplatFadeCrop.js +7 -5
- package/components/VirtualWalkthrough/SplatModel.js +17 -14
- package/components/VirtualWalkthrough/SplatRevealRain.js +6 -4
- package/components/VirtualWalkthrough/TfAnnotationManager.js +8 -5
- package/components/VirtualWalkthrough/TfXrNavigation.js +7 -5
- package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +47 -45
- package/components/VirtualWalkthrough/VrAnnotationPanel.js +9 -7
- package/components/VirtualWalkthrough/XrAnnotationInteraction.js +9 -7
- package/components/VirtualWalkthrough/XrExitButton.js +9 -7
- package/components/VirtualWalkthrough/XrGazeDwell.js +9 -7
- package/components/VirtualWalkthrough/XrPointerRay.js +9 -7
- package/components/VirtualWalkthrough/boundary-ring.js +7 -5
- package/components/VirtualWalkthrough/boundary-wall.js +8 -6
- package/components/VirtualWalkthrough/groundPlane.js +6 -3
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +5 -2
- package/components/VirtualWalkthrough/splatFormat.js +6 -4
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +4 -2
- package/components/VirtualWalkthrough/vr-annotation-panel.js +8 -5
- package/components/VirtualWalkthrough/walkthrough-camera.js +6 -4
- package/components/VirtualWalkthrough/xr-annotation-candidates.js +8 -6
- package/components/VirtualWalkthrough/xr-annotation-interaction.js +9 -6
- package/components/VirtualWalkthrough/xr-annotation-targeting.js +5 -2
- package/components/VirtualWalkthrough/xr-button-arming.js +4 -2
- package/components/VirtualWalkthrough/xr-button-hold.js +5 -3
- package/components/VirtualWalkthrough/xr-exit-button.js +10 -8
- package/components/VirtualWalkthrough/xr-face-buttons.js +6 -4
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +5 -3
- package/components/VirtualWalkthrough/xr-gaze-dwell.js +9 -7
- package/components/VirtualWalkthrough/xr-interactive-ui.js +10 -8
- package/components/VirtualWalkthrough/xr-pointer-ray.js +5 -3
- package/components/VirtualWalkthrough/xr-progress-pie.js +4 -2
- package/components/VirtualWalkthrough/xr-ray-quad.js +5 -2
- package/components/VirtualWalkthrough/xr-scene-bounds.js +5 -3
- package/components/VirtualWalkthrough/xr-teleport-gesture.js +4 -2
- package/components/svg/BlobbyGrayIconImage.js +13 -11
- package/components/svg/BlobbyGrayIconImport.js +13 -11
- package/components/svg/BlobbyGrayIconUploadToTheCloud.js +13 -11
- package/components/svg/BlobbyIconCloudChecked.js +41 -39
- package/components/svg/BlobbyIconExportOrUploadPhoto.js +41 -39
- package/components/svg/BlobbyIconFolder.js +41 -39
- package/components/svg/BlobbyIconGraphReport.js +41 -39
- package/components/svg/BlobbyIconHappy.js +41 -39
- package/components/svg/BlobbyIconHeartMonitor.js +41 -39
- package/components/svg/BlobbyIconLeaf.js +41 -39
- package/components/svg/BlobbyIconLibrary.js +41 -39
- package/components/svg/BlobbyIconNursery.js +41 -39
- package/components/svg/BlobbyIconOrganization.js +41 -39
- package/components/svg/BlobbyIconParchment.js +41 -39
- package/components/svg/BlobbyIconPeople.js +41 -39
- package/components/svg/BlobbyIconSeedBank.js +41 -39
- package/components/svg/BlobbyIconSeedling.js +41 -39
- package/components/svg/BlobbyIconSeeds.js +41 -39
- package/components/svg/BlobbyIconSite.js +42 -40
- package/components/svg/BlobbyIconSparkles.js +41 -39
- package/components/svg/BlobbyIconWrench.js +41 -39
- package/components/svg/Bug.js +8 -6
- package/components/svg/Calendar.js +8 -6
- package/components/svg/CaretDown.js +8 -6
- package/components/svg/CaretLeft.js +8 -6
- package/components/svg/CaretRight.js +8 -6
- package/components/svg/CaretUp.js +8 -6
- package/components/svg/ChevronDown.js +8 -6
- package/components/svg/ChevronUp.js +8 -6
- package/components/svg/Close.js +8 -6
- package/components/svg/Critical.js +8 -6
- package/components/svg/Edit.js +41 -39
- package/components/svg/Error.js +8 -6
- package/components/svg/Filter.js +8 -6
- package/components/svg/Folder.js +8 -6
- package/components/svg/Help.js +8 -6
- package/components/svg/Home.js +8 -6
- package/components/svg/IconAdd.js +8 -6
- package/components/svg/IconArrowRight.js +8 -6
- package/components/svg/IconBusinessNetwork.js +8 -6
- package/components/svg/IconCalendar.js +8 -6
- package/components/svg/IconCancel.js +8 -6
- package/components/svg/IconChargingBattery.js +8 -6
- package/components/svg/IconChecklist.js +8 -6
- package/components/svg/IconCheckmark.js +8 -6
- package/components/svg/IconCoinInHand.js +8 -6
- package/components/svg/IconColumns.js +8 -6
- package/components/svg/IconComment.js +8 -6
- package/components/svg/IconDashboard.js +8 -6
- package/components/svg/IconDataMigration.js +8 -6
- package/components/svg/IconDocument.js +8 -6
- package/components/svg/IconDownloadFromTheCloud.js +8 -6
- package/components/svg/IconEdit.js +8 -6
- package/components/svg/IconExpand.js +8 -6
- package/components/svg/IconExport.js +8 -6
- package/components/svg/IconExternalLink.js +8 -6
- package/components/svg/IconEye.js +8 -6
- package/components/svg/IconEyeOff.js +8 -6
- package/components/svg/IconFile.js +8 -6
- package/components/svg/IconFolder.js +8 -6
- package/components/svg/IconFullScreen.js +8 -6
- package/components/svg/IconFutures.js +8 -6
- package/components/svg/IconGraphReport.js +8 -6
- package/components/svg/IconHeartMonitor.js +8 -6
- package/components/svg/IconHelp.js +8 -6
- package/components/svg/IconHistory.js +8 -6
- package/components/svg/IconImport.js +8 -6
- package/components/svg/IconIndex.js +8 -6
- package/components/svg/IconLayers.js +8 -6
- package/components/svg/IconLibrary.js +8 -6
- package/components/svg/IconList.js +8 -6
- package/components/svg/IconLivePlant.js +8 -6
- package/components/svg/IconLocations.js +8 -6
- package/components/svg/IconMail.js +8 -6
- package/components/svg/IconManager.js +8 -6
- package/components/svg/IconMarker.js +8 -6
- package/components/svg/IconMenu.js +8 -6
- package/components/svg/IconMenuHorizontal.js +8 -6
- package/components/svg/IconModule.js +8 -6
- package/components/svg/IconMyLocation.js +8 -6
- package/components/svg/IconNote.js +8 -6
- package/components/svg/IconNursery.js +8 -6
- package/components/svg/IconOrg.js +8 -6
- package/components/svg/IconParchment.js +8 -6
- package/components/svg/IconPhoto.js +8 -6
- package/components/svg/IconPlantsFilled.js +8 -6
- package/components/svg/IconRedo.js +8 -6
- package/components/svg/IconRestorationSite.js +8 -6
- package/components/svg/IconSeedBank.js +8 -6
- package/components/svg/IconSeedling.js +8 -6
- package/components/svg/IconSettings.js +8 -6
- package/components/svg/IconSlice.js +8 -6
- package/components/svg/IconSubmit.js +8 -6
- package/components/svg/IconSubtract.js +8 -6
- package/components/svg/IconSynced.js +8 -6
- package/components/svg/IconTrashCan.js +8 -6
- package/components/svg/IconTreasureMap.js +8 -6
- package/components/svg/IconUnavailable.js +8 -6
- package/components/svg/IconUndo.js +8 -6
- package/components/svg/IconVariable.js +8 -6
- package/components/svg/IconVideo.js +9 -7
- package/components/svg/IconWifi.js +8 -6
- package/components/svg/Info.js +8 -6
- package/components/svg/Key.js +8 -6
- package/components/svg/Leaf.js +8 -6
- package/components/svg/Lock.js +8 -6
- package/components/svg/Logo.js +16 -14
- package/components/svg/MenuVertical.js +8 -6
- package/components/svg/Notification.js +8 -6
- package/components/svg/Person.js +8 -6
- package/components/svg/Plus.js +8 -6
- package/components/svg/RestorationSite.js +8 -6
- package/components/svg/Search.js +8 -6
- package/components/svg/Seeds.js +8 -6
- package/components/svg/Site.js +8 -6
- package/components/svg/Sparkles.js +8 -6
- package/components/svg/Species.js +8 -6
- package/components/svg/Species2.js +41 -39
- package/components/svg/Spinner.js +16 -14
- package/components/svg/Star.js +8 -6
- package/components/svg/Success.js +8 -6
- package/components/svg/SuccessFilled.js +8 -6
- package/components/svg/TerrawareLogoDesktop.js +17 -15
- package/components/svg/TerrawareLogoMobile.js +9 -7
- package/components/svg/Touchscreen.js +8 -6
- package/components/svg/UploadCloud.js +41 -39
- package/components/svg/Warning.js +8 -6
- package/components/svg/WelcomeClipboard.js +32 -30
- package/components/svg/index.js +127 -127
- package/components/table/EnhancedTableToolbar.js +18 -15
- package/components/table/EnhancedTableToolbarV2.js +8 -6
- package/components/table/TableCellRenderer.js +37 -32
- package/components/table/TableHeader.js +17 -14
- package/components/table/TableHeaderItem.js +18 -15
- package/components/table/density.js +5 -3
- package/components/table/index.js +40 -37
- package/components/table/sort.js +6 -4
- package/components/table/types.js +1 -1
- package/components/types/index.js +1 -1
- package/hooks/useBoolean.js +4 -2
- package/hooks/useCameraPosition.js +5 -2
- package/hooks/useDevicePerformance.js +6 -3
- package/hooks/useXr.js +6 -4
- package/index.js +55 -58
- package/package.json +6 -2
- package/style-dictionary-dist/TerrawareTheme.js +2 -1
- package/theme.js +5 -2
- package/utils/color.js +5 -2
- package/utils/date.js +7 -6
- package/utils/index.js +4 -5
- package/utils/preventDefaultEvent.js +2 -1
- package/utils/text.js +3 -2
- package/utils/useDeviceInfo.js +2 -1
- package/virtualWalkthrough.js +23 -31
- package/components/Button/button.test.js +0 -23
- package/components/MultiSelect/MultiSelect.test.js +0 -73
- package/components/VirtualWalkthrough/TfXrNavigation.test.js +0 -110
- package/components/VirtualWalkthrough/boundary-ring.test.js +0 -109
- package/components/VirtualWalkthrough/boundary-wall.test.js +0 -203
- package/components/VirtualWalkthrough/groundPlane.test.js +0 -45
- package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +0 -26
- package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +0 -66
- package/components/VirtualWalkthrough/xr-button-arming.test.js +0 -35
- package/components/VirtualWalkthrough/xr-button-hold.test.js +0 -57
- package/components/VirtualWalkthrough/xr-exit-button.test.js +0 -23
- package/components/VirtualWalkthrough/xr-face-buttons.test.js +0 -82
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +0 -61
- package/components/VirtualWalkthrough/xr-interactive-ui.test.js +0 -165
- package/components/VirtualWalkthrough/xr-progress-pie.test.js +0 -79
- package/components/VirtualWalkthrough/xr-ray-quad.test.js +0 -37
- package/components/VirtualWalkthrough/xr-scene-bounds.test.js +0 -70
- package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +0 -90
- package/components/table/sort.test.js +0 -35
- package/utils/date.test.js +0 -84
- package/utils/text.test.js +0 -21
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { Box } from '@mui/material';
|
|
3
|
-
import useDeviceInfo from '../../utils/useDeviceInfo';
|
|
4
|
-
import Button from '../Button/Button';
|
|
5
|
-
import Icon from '../Icon/Icon';
|
|
3
|
+
import useDeviceInfo from '../../utils/useDeviceInfo.js';
|
|
4
|
+
import Button from '../Button/Button.js';
|
|
5
|
+
import Icon from '../Icon/Icon.js';
|
|
6
6
|
import './styles.scss';
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
function ErrorBox(props) {
|
|
9
10
|
const {
|
|
10
11
|
text,
|
|
11
12
|
onClick,
|
|
@@ -17,27 +18,27 @@ export default function ErrorBox(props) {
|
|
|
17
18
|
const {
|
|
18
19
|
isMobile
|
|
19
20
|
} = useDeviceInfo();
|
|
20
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
21
22
|
className: `error-box ${className} ${isMobile ? 'mobile' : ''}`,
|
|
22
23
|
sx: sx,
|
|
23
|
-
children: [/*#__PURE__*/
|
|
24
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
24
25
|
className: "error-box--container",
|
|
25
|
-
children: [/*#__PURE__*/
|
|
26
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
26
27
|
name: "error",
|
|
27
28
|
className: "error-icon",
|
|
28
29
|
size: "large"
|
|
29
|
-
}), /*#__PURE__*/
|
|
30
|
-
children: [title && /*#__PURE__*/
|
|
30
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
31
|
+
children: [title && /*#__PURE__*/jsx("h1", {
|
|
31
32
|
className: "error-title",
|
|
32
33
|
children: title
|
|
33
|
-
}), /*#__PURE__*/
|
|
34
|
+
}), /*#__PURE__*/jsx("p", {
|
|
34
35
|
className: "error-text",
|
|
35
36
|
children: text
|
|
36
37
|
})]
|
|
37
38
|
})]
|
|
38
|
-
}), buttonText && onClick && /*#__PURE__*/
|
|
39
|
+
}), buttonText && onClick && /*#__PURE__*/jsx("div", {
|
|
39
40
|
className: "button-container",
|
|
40
|
-
children: /*#__PURE__*/
|
|
41
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
41
42
|
label: buttonText,
|
|
42
43
|
priority: "secondary",
|
|
43
44
|
type: "passive",
|
|
@@ -45,4 +46,6 @@ export default function ErrorBox(props) {
|
|
|
45
46
|
})
|
|
46
47
|
})]
|
|
47
48
|
});
|
|
48
|
-
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { ErrorBox as default };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { useRef, useState, useEffect } from 'react';
|
|
2
|
+
import { useTheme, Box, Typography, Link } from '@mui/material';
|
|
3
|
+
import 'lodash';
|
|
4
|
+
import 'luxon';
|
|
5
|
+
import useDeviceInfo from '../../utils/useDeviceInfo.js';
|
|
6
|
+
import Button from '../Button/Button.js';
|
|
7
|
+
import Icon from '../Icon/Icon.js';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
function FileChooser(props) {
|
|
8
11
|
const {
|
|
9
12
|
acceptFileType,
|
|
10
13
|
chooseFileText,
|
|
@@ -62,7 +65,7 @@ export default function FileChooser(props) {
|
|
|
62
65
|
addFiles(event.currentTarget.files);
|
|
63
66
|
}
|
|
64
67
|
};
|
|
65
|
-
return /*#__PURE__*/
|
|
68
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
66
69
|
onDrop: dropHandler,
|
|
67
70
|
onDragOver: enableDropping,
|
|
68
71
|
border: `1px dashed ${theme.palette.TwClrBrdrTertiary}`,
|
|
@@ -74,26 +77,26 @@ export default function FileChooser(props) {
|
|
|
74
77
|
sx: {
|
|
75
78
|
background: theme.palette.TwClrBg
|
|
76
79
|
},
|
|
77
|
-
children: [iconName && /*#__PURE__*/
|
|
80
|
+
children: [iconName && /*#__PURE__*/jsx(Icon, {
|
|
78
81
|
name: iconName,
|
|
79
82
|
size: "xlarge",
|
|
80
83
|
style: {
|
|
81
84
|
height: '120px',
|
|
82
85
|
width: '120px'
|
|
83
86
|
}
|
|
84
|
-
}), /*#__PURE__*/
|
|
87
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
85
88
|
color: theme.palette.TwClrTxt,
|
|
86
89
|
fontSize: 14,
|
|
87
90
|
fontWeight: 600,
|
|
88
91
|
margin: theme.spacing(0, 0, 1),
|
|
89
92
|
children: !editing && ((files || []).length > 0 && !multipleSelection ? files?.[0].name : uploadText)
|
|
90
|
-
}), /*#__PURE__*/
|
|
93
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
91
94
|
color: theme.palette.TwClrTxt,
|
|
92
95
|
fontSize: 12,
|
|
93
96
|
fontWeight: 400,
|
|
94
97
|
margin: 0,
|
|
95
98
|
children: (editing || (files || []).length > 0) && !multipleSelection ? fileSelectedText : isMobile && uploadMobileDescription ? uploadMobileDescription : uploadDescription
|
|
96
|
-
}), /*#__PURE__*/
|
|
99
|
+
}), /*#__PURE__*/jsx("input", {
|
|
97
100
|
type: "file",
|
|
98
101
|
ref: inputRef,
|
|
99
102
|
onChange: onFileChosen,
|
|
@@ -103,7 +106,7 @@ export default function FileChooser(props) {
|
|
|
103
106
|
style: {
|
|
104
107
|
display: 'none'
|
|
105
108
|
}
|
|
106
|
-
}), /*#__PURE__*/
|
|
109
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
107
110
|
onClick: onChooseFileHandler,
|
|
108
111
|
disabled: maxFiles !== undefined ? (files || []).length >= maxFiles : false,
|
|
109
112
|
label: !multipleSelection && ((files || []).length === 1 || editing) ? replaceFileText : chooseFileText,
|
|
@@ -112,7 +115,7 @@ export default function FileChooser(props) {
|
|
|
112
115
|
sx: {
|
|
113
116
|
marginTop: theme.spacing(3)
|
|
114
117
|
}
|
|
115
|
-
}), template && /*#__PURE__*/
|
|
118
|
+
}), template && /*#__PURE__*/jsx(Link, {
|
|
116
119
|
href: template.url,
|
|
117
120
|
target: "_blank",
|
|
118
121
|
sx: {
|
|
@@ -130,4 +133,6 @@ export default function FileChooser(props) {
|
|
|
130
133
|
children: template.text
|
|
131
134
|
})]
|
|
132
135
|
});
|
|
133
|
-
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export { FileChooser as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AppBar, Box
|
|
3
|
-
import useDeviceInfo from '../../utils/useDeviceInfo';
|
|
4
|
-
import Button from '../Button/Button';
|
|
5
|
-
import {
|
|
1
|
+
import 'react';
|
|
2
|
+
import { useTheme, AppBar, Box } from '@mui/material';
|
|
3
|
+
import useDeviceInfo from '../../utils/useDeviceInfo.js';
|
|
4
|
+
import Button from '../Button/Button.js';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
6
7
|
const defaultDesktopOffset = '200px';
|
|
7
|
-
|
|
8
|
+
function FormBottomBar({
|
|
8
9
|
cancelID,
|
|
9
10
|
saveID,
|
|
10
11
|
onCancel,
|
|
@@ -20,7 +21,7 @@ export default function FormBottomBar({
|
|
|
20
21
|
isDesktop
|
|
21
22
|
} = useDeviceInfo();
|
|
22
23
|
const theme = useTheme();
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/jsxs(AppBar, {
|
|
24
25
|
position: "fixed",
|
|
25
26
|
color: "primary",
|
|
26
27
|
style: {
|
|
@@ -42,7 +43,7 @@ export default function FormBottomBar({
|
|
|
42
43
|
width: isDesktop ? `calc(100% - ${desktopOffset || defaultDesktopOffset})` : '100%',
|
|
43
44
|
zIndex: 1000
|
|
44
45
|
},
|
|
45
|
-
children: [/*#__PURE__*/
|
|
46
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
46
47
|
id: cancelID || 'cancelBottomBar',
|
|
47
48
|
size: "medium",
|
|
48
49
|
label: cancelButtonText,
|
|
@@ -53,12 +54,12 @@ export default function FormBottomBar({
|
|
|
53
54
|
marginTop: isMobile ? theme.spacing(1) : 'auto',
|
|
54
55
|
marginRight: theme.spacing(1)
|
|
55
56
|
}
|
|
56
|
-
}), /*#__PURE__*/
|
|
57
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
57
58
|
sx: {
|
|
58
59
|
display: 'flex',
|
|
59
60
|
flexDirection: isMobile ? 'column-reverse' : 'row'
|
|
60
61
|
},
|
|
61
|
-
children: [additionalRightButtons && additionalRightButtons.map(btn => /*#__PURE__*/
|
|
62
|
+
children: [additionalRightButtons && additionalRightButtons.map(btn => /*#__PURE__*/jsx(Button, {
|
|
62
63
|
id: btn.id,
|
|
63
64
|
priority: btn.buttonPriority,
|
|
64
65
|
type: btn.buttonType,
|
|
@@ -69,7 +70,7 @@ export default function FormBottomBar({
|
|
|
69
70
|
style: {
|
|
70
71
|
marginTop: isMobile ? theme.spacing(1) : 'auto'
|
|
71
72
|
}
|
|
72
|
-
}, btn.id)), /*#__PURE__*/
|
|
73
|
+
}, btn.id)), /*#__PURE__*/jsx(Button, {
|
|
73
74
|
id: saveID || 'saveBottomBar',
|
|
74
75
|
size: "medium",
|
|
75
76
|
label: saveButtonText,
|
|
@@ -81,4 +82,6 @@ export default function FormBottomBar({
|
|
|
81
82
|
})]
|
|
82
83
|
})]
|
|
83
84
|
});
|
|
84
|
-
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { FormBottomBar as default };
|
package/components/Icon/Icon.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import icons from './icons';
|
|
1
|
+
import 'react';
|
|
2
|
+
import icons from './icons/index.js';
|
|
3
3
|
import './styles.scss';
|
|
4
|
-
import { jsx
|
|
5
|
-
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function Icon({
|
|
6
7
|
size = 'small',
|
|
7
8
|
name,
|
|
8
9
|
className,
|
|
@@ -10,9 +11,11 @@ export default function Icon({
|
|
|
10
11
|
style
|
|
11
12
|
}) {
|
|
12
13
|
const SVGComponent = icons[name];
|
|
13
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/jsx(SVGComponent, {
|
|
14
15
|
className: `tw-icon tw-icon--${size} ${className ?? ''}`,
|
|
15
16
|
fill: fillColor,
|
|
16
17
|
style: style
|
|
17
18
|
});
|
|
18
|
-
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { Icon as default };
|