@terraware/web-components 4.2.25 → 4.2.26-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.
- 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.d.ts.map +1 -1
- package/components/PhotosCarousel/index.js +17 -13
- 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,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Box, Typography
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import { useTheme, Box, Typography } 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 ErrorBox from '../ErrorBox/ErrorBox.js';
|
|
8
|
+
import FileChooser from '../FileChooser/index.js';
|
|
9
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
function PhotoChooser(props) {
|
|
9
12
|
const {
|
|
10
13
|
title,
|
|
11
14
|
description,
|
|
@@ -54,14 +57,14 @@ export default function PhotoChooser(props) {
|
|
|
54
57
|
alt,
|
|
55
58
|
onRemove,
|
|
56
59
|
id
|
|
57
|
-
}) => /*#__PURE__*/
|
|
60
|
+
}) => /*#__PURE__*/jsxs(Box, {
|
|
58
61
|
position: "relative",
|
|
59
62
|
height: 122,
|
|
60
63
|
width: 122,
|
|
61
64
|
marginRight: isMobile ? theme.spacing(2) : theme.spacing(3),
|
|
62
65
|
marginTop: theme.spacing(1),
|
|
63
66
|
border: `1px solid ${theme.palette.TwClrBrdrTertiary}`,
|
|
64
|
-
children: [onRemove && /*#__PURE__*/
|
|
67
|
+
children: [onRemove && /*#__PURE__*/jsx(Button, {
|
|
65
68
|
icon: "iconTrashCan",
|
|
66
69
|
id: id,
|
|
67
70
|
onClick: onRemove,
|
|
@@ -72,7 +75,7 @@ export default function PhotoChooser(props) {
|
|
|
72
75
|
right: -10,
|
|
73
76
|
backgroundColor: theme.palette.TwClrBgDanger
|
|
74
77
|
}
|
|
75
|
-
}), /*#__PURE__*/
|
|
78
|
+
}), /*#__PURE__*/jsx("img", {
|
|
76
79
|
height: "120px",
|
|
77
80
|
src: src,
|
|
78
81
|
alt: alt,
|
|
@@ -85,7 +88,7 @@ export default function PhotoChooser(props) {
|
|
|
85
88
|
}
|
|
86
89
|
})]
|
|
87
90
|
}, id ?? src);
|
|
88
|
-
return /*#__PURE__*/
|
|
91
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
89
92
|
ref: divRef,
|
|
90
93
|
tabIndex: 0,
|
|
91
94
|
sx: {
|
|
@@ -93,20 +96,20 @@ export default function PhotoChooser(props) {
|
|
|
93
96
|
borderRadius: theme.spacing(4),
|
|
94
97
|
padding: theme.spacing(3)
|
|
95
98
|
},
|
|
96
|
-
children: [/*#__PURE__*/
|
|
97
|
-
children: [title && /*#__PURE__*/
|
|
99
|
+
children: [/*#__PURE__*/jsxs(Box, {
|
|
100
|
+
children: [title && /*#__PURE__*/jsx(Typography, {
|
|
98
101
|
fontSize: 20,
|
|
99
102
|
fontWeight: 600,
|
|
100
103
|
children: title
|
|
101
|
-
}), description && /*#__PURE__*/
|
|
104
|
+
}), description && /*#__PURE__*/jsx(Typography, {
|
|
102
105
|
fontSize: 14,
|
|
103
106
|
fontWeight: 400,
|
|
104
107
|
marginTop: theme.spacing(1),
|
|
105
108
|
marginBottom: theme.spacing(2),
|
|
106
|
-
children: Array.isArray(description) ? description.map((txt, i) => /*#__PURE__*/
|
|
109
|
+
children: Array.isArray(description) ? description.map((txt, i) => /*#__PURE__*/jsx("div", {
|
|
107
110
|
children: txt
|
|
108
111
|
}, i)) : description
|
|
109
|
-
}), error && /*#__PURE__*/
|
|
112
|
+
}), error && /*#__PURE__*/jsx(ErrorBox, {
|
|
110
113
|
title: error.title,
|
|
111
114
|
text: error.text,
|
|
112
115
|
sx: {
|
|
@@ -116,14 +119,14 @@ export default function PhotoChooser(props) {
|
|
|
116
119
|
width: 'auto'
|
|
117
120
|
}
|
|
118
121
|
}
|
|
119
|
-
}), existingPhotos && existingPhotos.length > 0 && /*#__PURE__*/
|
|
122
|
+
}), existingPhotos && existingPhotos.length > 0 && /*#__PURE__*/jsxs(Box, {
|
|
120
123
|
marginBottom: theme.spacing(2),
|
|
121
|
-
children: [existingImagesLabel && /*#__PURE__*/
|
|
124
|
+
children: [existingImagesLabel && /*#__PURE__*/jsx(Typography, {
|
|
122
125
|
fontSize: 14,
|
|
123
126
|
fontWeight: 400,
|
|
124
127
|
marginBottom: theme.spacing(1),
|
|
125
128
|
children: existingImagesLabel
|
|
126
|
-
}), /*#__PURE__*/
|
|
129
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
127
130
|
display: "flex",
|
|
128
131
|
flexDirection: "row",
|
|
129
132
|
flexWrap: "wrap",
|
|
@@ -134,14 +137,14 @@ export default function PhotoChooser(props) {
|
|
|
134
137
|
onRemove: onExistingPhotoRemoved ? () => onExistingPhotoRemoved(index) : undefined
|
|
135
138
|
}))
|
|
136
139
|
})]
|
|
137
|
-
}), filesData.length > 0 && multipleSelection && /*#__PURE__*/
|
|
140
|
+
}), filesData.length > 0 && multipleSelection && /*#__PURE__*/jsxs(Box, {
|
|
138
141
|
marginBottom: theme.spacing(2),
|
|
139
|
-
children: [newImagesLabel && /*#__PURE__*/
|
|
142
|
+
children: [newImagesLabel && /*#__PURE__*/jsx(Typography, {
|
|
140
143
|
fontSize: 14,
|
|
141
144
|
fontWeight: 400,
|
|
142
145
|
marginBottom: theme.spacing(1),
|
|
143
146
|
children: newImagesLabel
|
|
144
|
-
}), /*#__PURE__*/
|
|
147
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
145
148
|
display: "flex",
|
|
146
149
|
flexDirection: "row",
|
|
147
150
|
flexWrap: "wrap",
|
|
@@ -152,7 +155,7 @@ export default function PhotoChooser(props) {
|
|
|
152
155
|
}))
|
|
153
156
|
})]
|
|
154
157
|
})]
|
|
155
|
-
}), /*#__PURE__*/
|
|
158
|
+
}), /*#__PURE__*/jsx(FileChooser, {
|
|
156
159
|
acceptFileType: "image/jpeg,image/png",
|
|
157
160
|
chooseFileText: chooseFileText,
|
|
158
161
|
files: files,
|
|
@@ -169,4 +172,6 @@ export default function PhotoChooser(props) {
|
|
|
169
172
|
uploadText: uploadText
|
|
170
173
|
})]
|
|
171
174
|
});
|
|
172
|
-
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export { PhotoChooser as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PhotosCarousel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,GAAG,EAA4C,MAAM,OAAO,CAAC;AAElF,OAAO,qCAAqC,CAAC;AAK7C,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PhotosCarousel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,GAAG,EAA4C,MAAM,OAAO,CAAC;AAElF,OAAO,qCAAqC,CAAC;AAK7C,OAAO,eAAe,CAAC;AAUvB,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AASD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAsE9E"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
+
import CarouselImport from '../../_virtual/index.js';
|
|
3
3
|
import 'react-multi-carousel/lib/styles.css';
|
|
4
4
|
import { Box, Typography } from '@mui/material';
|
|
5
|
-
import BusySpinner from '../BusySpinner';
|
|
5
|
+
import BusySpinner from '../BusySpinner/index.js';
|
|
6
6
|
import './styles.scss';
|
|
7
|
-
import {
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
const Carousel = CarouselImport.default ?? CarouselImport;
|
|
8
10
|
const responsive = {
|
|
9
11
|
mobile: {
|
|
10
12
|
breakpoint: {
|
|
@@ -14,7 +16,7 @@ const responsive = {
|
|
|
14
16
|
items: 1
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
|
-
|
|
19
|
+
function PhotosCarousel(props) {
|
|
18
20
|
const {
|
|
19
21
|
photos,
|
|
20
22
|
selectedSlide,
|
|
@@ -56,28 +58,28 @@ export default function PhotosCarousel(props) {
|
|
|
56
58
|
return next;
|
|
57
59
|
});
|
|
58
60
|
};
|
|
59
|
-
return /*#__PURE__*/
|
|
61
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
60
62
|
sx: {
|
|
61
63
|
'& .react-multi-carousel-list': {
|
|
62
64
|
paddingBottom: '20px'
|
|
63
65
|
}
|
|
64
66
|
},
|
|
65
|
-
children: [/*#__PURE__*/
|
|
67
|
+
children: [/*#__PURE__*/jsx(Carousel, {
|
|
66
68
|
responsive: responsive,
|
|
67
69
|
ref: myCarousel,
|
|
68
70
|
showDots: dots ?? true,
|
|
69
71
|
arrows: showArrows ?? false,
|
|
70
72
|
ssr: true,
|
|
71
73
|
afterChange: handleAfterChange,
|
|
72
|
-
children: photos.map((p, i) => /*#__PURE__*/
|
|
74
|
+
children: photos.map((p, i) => /*#__PURE__*/jsxs("div", {
|
|
73
75
|
className: "photos-carousel-container",
|
|
74
|
-
children: [isLoading[i] ? /*#__PURE__*/
|
|
76
|
+
children: [isLoading[i] ? /*#__PURE__*/jsx(BusySpinner, {
|
|
75
77
|
noBackground: true
|
|
76
|
-
}) : undefined, /*#__PURE__*/
|
|
78
|
+
}) : undefined, /*#__PURE__*/jsx("a", {
|
|
77
79
|
href: p.url,
|
|
78
80
|
target: "_blank",
|
|
79
81
|
rel: "noopener noreferrer",
|
|
80
|
-
children: /*#__PURE__*/
|
|
82
|
+
children: /*#__PURE__*/jsx("img", {
|
|
81
83
|
className: "photos-carousel-image",
|
|
82
84
|
src: p.url,
|
|
83
85
|
alt: p.alt,
|
|
@@ -85,9 +87,11 @@ export default function PhotosCarousel(props) {
|
|
|
85
87
|
})
|
|
86
88
|
})]
|
|
87
89
|
}, `photo-${i}-container`))
|
|
88
|
-
}), numbered ? /*#__PURE__*/
|
|
90
|
+
}), numbered ? /*#__PURE__*/jsx(Typography, {
|
|
89
91
|
className: "photo-numbering",
|
|
90
92
|
children: `${currentSlide + 1}/${photos.length}`
|
|
91
93
|
}) : undefined, photos[currentSlide] && photos[currentSlide].decoration]
|
|
92
94
|
});
|
|
93
|
-
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { PhotosCarousel as default };
|
package/components/Pill/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { IconButton } from '@mui/material';
|
|
3
|
-
import Icon from '../Icon/Icon';
|
|
3
|
+
import Icon from '../Icon/Icon.js';
|
|
4
4
|
import './styles.scss';
|
|
5
|
-
import { jsxs
|
|
6
|
-
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Pill(props) {
|
|
7
8
|
const {
|
|
8
9
|
id,
|
|
9
10
|
label,
|
|
@@ -12,7 +13,7 @@ export default function Pill(props) {
|
|
|
12
13
|
onRemove,
|
|
13
14
|
className
|
|
14
15
|
} = props;
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/jsxs("div", {
|
|
16
17
|
className: `pill ${className ?? ''}`,
|
|
17
18
|
onClick: ev => {
|
|
18
19
|
ev.stopPropagation();
|
|
@@ -20,25 +21,27 @@ export default function Pill(props) {
|
|
|
20
21
|
onClick(id);
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
|
-
children: [label && /*#__PURE__*/
|
|
24
|
+
children: [label && /*#__PURE__*/jsxs("p", {
|
|
24
25
|
className: "label",
|
|
25
26
|
children: [label, ":"]
|
|
26
|
-
}), /*#__PURE__*/
|
|
27
|
+
}), /*#__PURE__*/jsx("p", {
|
|
27
28
|
className: `value${label ? '' : ' value--no-label'}`,
|
|
28
29
|
children: value
|
|
29
|
-
}), onRemove ? /*#__PURE__*/
|
|
30
|
+
}), onRemove ? /*#__PURE__*/jsx(IconButton, {
|
|
30
31
|
onClick: ev => {
|
|
31
32
|
ev.stopPropagation();
|
|
32
33
|
onRemove(id);
|
|
33
34
|
},
|
|
34
35
|
className: "iconContainer",
|
|
35
36
|
"aria-label": "remove",
|
|
36
|
-
children: /*#__PURE__*/
|
|
37
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
37
38
|
name: "close",
|
|
38
39
|
className: "icon"
|
|
39
40
|
})
|
|
40
|
-
}) : /*#__PURE__*/
|
|
41
|
+
}) : /*#__PURE__*/jsx("div", {
|
|
41
42
|
className: "spacer"
|
|
42
43
|
})]
|
|
43
44
|
});
|
|
44
|
-
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { Pill as default };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Pill from '../Pill';
|
|
1
|
+
import 'react';
|
|
2
|
+
import Pill from '../Pill/index.js';
|
|
3
3
|
import './styles.scss';
|
|
4
|
-
import { jsx
|
|
5
|
-
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function PillList(props) {
|
|
6
7
|
const {
|
|
7
8
|
data,
|
|
8
9
|
onClick,
|
|
9
10
|
onRemove,
|
|
10
11
|
className
|
|
11
12
|
} = props;
|
|
12
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/jsx("div", {
|
|
13
14
|
className: "pill-list",
|
|
14
|
-
children: data.map((item, index) => /*#__PURE__*/
|
|
15
|
+
children: data.map((item, index) => /*#__PURE__*/jsx(Pill, {
|
|
15
16
|
id: item.id,
|
|
16
17
|
label: item.label,
|
|
17
18
|
value: item.value,
|
|
@@ -20,4 +21,6 @@ export default function PillList(props) {
|
|
|
20
21
|
className: item.className || className
|
|
21
22
|
}, index))
|
|
22
23
|
});
|
|
23
|
-
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { PillList as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useTheme, Box } from '@mui/material';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* A component that allows simple management of the location of an object around some children
|
|
6
7
|
*
|
|
@@ -43,16 +44,17 @@ const PlacementWrapper = ({
|
|
|
43
44
|
return 'center';
|
|
44
45
|
}
|
|
45
46
|
}, [objectPlacement]);
|
|
46
|
-
return /*#__PURE__*/
|
|
47
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
47
48
|
display: 'flex',
|
|
48
49
|
flexDirection: outsideDirection,
|
|
49
50
|
flexGrow: 1,
|
|
50
51
|
marginBottom: theme.spacing(2),
|
|
51
|
-
children: [/*#__PURE__*/
|
|
52
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
52
53
|
alignSelf: insideAlignment,
|
|
53
54
|
margin: theme.spacing(1),
|
|
54
55
|
children: placedObject
|
|
55
56
|
}), children]
|
|
56
57
|
});
|
|
57
58
|
};
|
|
58
|
-
|
|
59
|
+
|
|
60
|
+
export { PlacementWrapper as default };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { jsx
|
|
4
|
-
|
|
1
|
+
import 'react';
|
|
2
|
+
import { useTheme, Popover, MenuList, Divider, MenuItem } from '@mui/material';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function PopoverDropdown(props) {
|
|
5
6
|
const {
|
|
6
7
|
sections,
|
|
7
8
|
handleClick,
|
|
@@ -35,7 +36,7 @@ export default function PopoverDropdown(props) {
|
|
|
35
36
|
backgroundColor: theme.palette.TwClrBgSelectedGhostActive
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/jsx(Popover, {
|
|
39
40
|
id: "simple-popover",
|
|
40
41
|
container: container,
|
|
41
42
|
open: Boolean(anchorElement),
|
|
@@ -58,17 +59,17 @@ export default function PopoverDropdown(props) {
|
|
|
58
59
|
marginTop: '4px'
|
|
59
60
|
}
|
|
60
61
|
},
|
|
61
|
-
children: /*#__PURE__*/
|
|
62
|
+
children: /*#__PURE__*/jsx(MenuList, {
|
|
62
63
|
sx: {
|
|
63
64
|
padding: 0
|
|
64
65
|
},
|
|
65
66
|
children: sections?.map((section, index) => {
|
|
66
67
|
let elements = [];
|
|
67
68
|
if (index > 0) {
|
|
68
|
-
elements.push(/*#__PURE__*/
|
|
69
|
+
elements.push(/*#__PURE__*/jsx(Divider, {}));
|
|
69
70
|
}
|
|
70
71
|
elements = [...elements, ...section.map((item, itemIndex) => {
|
|
71
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
72
73
|
onClick: () => onClick(item),
|
|
73
74
|
sx: itemStyles(item.type),
|
|
74
75
|
disableRipple: true,
|
|
@@ -81,4 +82,6 @@ export default function PopoverDropdown(props) {
|
|
|
81
82
|
})
|
|
82
83
|
})
|
|
83
84
|
});
|
|
84
|
-
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { PopoverDropdown as default };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import Icon from '../Icon/Icon';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useTheme, IconButton } from '@mui/material';
|
|
3
|
+
import Icon from '../Icon/Icon.js';
|
|
4
|
+
import PopoverDropdown from './Popover.js';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function PopoverMenu({
|
|
7
8
|
anchor,
|
|
8
9
|
container,
|
|
9
10
|
menuSections,
|
|
@@ -25,8 +26,8 @@ export default function PopoverMenu({
|
|
|
25
26
|
}
|
|
26
27
|
handleClose();
|
|
27
28
|
};
|
|
28
|
-
return /*#__PURE__*/
|
|
29
|
-
children: [/*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/jsxs("div", {
|
|
30
|
+
children: [/*#__PURE__*/jsxs(IconButton, {
|
|
30
31
|
onClick: handleClick,
|
|
31
32
|
size: "small",
|
|
32
33
|
sx: {
|
|
@@ -34,7 +35,7 @@ export default function PopoverMenu({
|
|
|
34
35
|
borderRadius: '16px',
|
|
35
36
|
padding: theme.spacing(1.5, 2)
|
|
36
37
|
},
|
|
37
|
-
children: [anchor, showChevron && /*#__PURE__*/
|
|
38
|
+
children: [anchor, showChevron && /*#__PURE__*/jsx(Icon, {
|
|
38
39
|
name: "chevronDown",
|
|
39
40
|
size: "medium",
|
|
40
41
|
style: {
|
|
@@ -42,7 +43,7 @@ export default function PopoverMenu({
|
|
|
42
43
|
fill: theme.palette.TwClrIcn
|
|
43
44
|
}
|
|
44
45
|
})]
|
|
45
|
-
}), /*#__PURE__*/
|
|
46
|
+
}), /*#__PURE__*/jsx(PopoverDropdown, {
|
|
46
47
|
sections: menuSections,
|
|
47
48
|
handleClick: onItemClick,
|
|
48
49
|
anchorElement: anchorEl,
|
|
@@ -51,4 +52,6 @@ export default function PopoverMenu({
|
|
|
51
52
|
container: container
|
|
52
53
|
})]
|
|
53
54
|
});
|
|
54
|
-
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { PopoverMenu as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
import { ListItemText } from '@mui/material';
|
|
3
|
-
import Icon from '../Icon/Icon';
|
|
4
|
-
import
|
|
3
|
+
import Icon from '../Icon/Icon.js';
|
|
4
|
+
import PopoverDropdown from '../PopoverMenu/Popover.js';
|
|
5
5
|
import './styles.scss';
|
|
6
|
-
import { jsx
|
|
7
|
-
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function PopoverMultiSelect(props) {
|
|
8
9
|
const {
|
|
9
10
|
anchorElement,
|
|
10
11
|
initialSelection,
|
|
@@ -27,11 +28,11 @@ export default function PopoverMultiSelect(props) {
|
|
|
27
28
|
onChange(newSelection);
|
|
28
29
|
};
|
|
29
30
|
const iconSpacer = () => {
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/jsx("div", {
|
|
31
32
|
className: "popover-multi-select__checkmark-spacer"
|
|
32
33
|
});
|
|
33
34
|
};
|
|
34
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/jsx(PopoverDropdown, {
|
|
35
36
|
sections: sections,
|
|
36
37
|
handleClick: item => {
|
|
37
38
|
const itemIndex = selection.findIndex(s => s === item.value);
|
|
@@ -45,15 +46,17 @@ export default function PopoverMultiSelect(props) {
|
|
|
45
46
|
setAnchorElement: setAnchorElement,
|
|
46
47
|
itemRenderer: item => {
|
|
47
48
|
const selected = selection.find(s => s === item.value);
|
|
48
|
-
return /*#__PURE__*/
|
|
49
|
-
children: [selected ? /*#__PURE__*/
|
|
49
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
50
|
+
children: [selected ? /*#__PURE__*/jsx(Icon, {
|
|
50
51
|
name: "checkmark",
|
|
51
52
|
className: "popover-multi-select__checkmark-selection"
|
|
52
|
-
}) : iconSpacer(), /*#__PURE__*/
|
|
53
|
+
}) : iconSpacer(), /*#__PURE__*/jsx(ListItemText, {
|
|
53
54
|
children: item.label
|
|
54
55
|
})]
|
|
55
56
|
});
|
|
56
57
|
},
|
|
57
58
|
menuAlign: menuAlign
|
|
58
59
|
});
|
|
59
|
-
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { PopoverMultiSelect as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { Box, CircularProgress } from '@mui/material';
|
|
3
3
|
import './styles.scss';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function ProgressCircle(props) {
|
|
6
7
|
const {
|
|
7
8
|
size = 'small',
|
|
8
9
|
determinate,
|
|
@@ -10,22 +11,24 @@ export default function ProgressCircle(props) {
|
|
|
10
11
|
renderPercentText,
|
|
11
12
|
hideValue
|
|
12
13
|
} = props;
|
|
13
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
14
15
|
className: "circle-container",
|
|
15
|
-
children: [/*#__PURE__*/
|
|
16
|
+
children: [/*#__PURE__*/jsx(CircularProgress, {
|
|
16
17
|
variant: "determinate",
|
|
17
18
|
value: 100,
|
|
18
19
|
className: `circle-track circle-track--${size}`
|
|
19
|
-
}), /*#__PURE__*/
|
|
20
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
20
21
|
className: "label-container",
|
|
21
|
-
children: value && !hideValue && /*#__PURE__*/
|
|
22
|
+
children: value && !hideValue && /*#__PURE__*/jsx("p", {
|
|
22
23
|
className: `progress-circle-label--${size}`,
|
|
23
24
|
children: renderPercentText(Math.round(value))
|
|
24
25
|
})
|
|
25
|
-
}), /*#__PURE__*/
|
|
26
|
+
}), /*#__PURE__*/jsx(CircularProgress, {
|
|
26
27
|
value: value,
|
|
27
28
|
variant: determinate ? 'determinate' : 'indeterminate',
|
|
28
29
|
className: `circle-fill circle-track--${size}`
|
|
29
30
|
})]
|
|
30
31
|
});
|
|
31
|
-
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { ProgressCircle as default };
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { FormControlLabel, Radio } from '@mui/material';
|
|
3
|
-
import { jsx
|
|
4
|
-
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function RadioButton(props) {
|
|
5
6
|
const onChange = (event, checked) => {
|
|
6
7
|
props.onChange(checked);
|
|
7
8
|
};
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/jsx(FormControlLabel, {
|
|
9
10
|
id: props.id,
|
|
10
11
|
onChange: onChange,
|
|
11
12
|
label: props.label,
|
|
12
|
-
control: /*#__PURE__*/
|
|
13
|
+
control: /*#__PURE__*/jsx(Radio, {
|
|
13
14
|
id: 'radio-' + props.id,
|
|
14
15
|
color: "primary",
|
|
15
16
|
checked: props.value ?? false
|
|
16
17
|
})
|
|
17
18
|
});
|
|
18
|
-
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { RadioButton as default };
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import SelectT from './SelectT';
|
|
1
|
+
import 'react';
|
|
2
|
+
import SelectT from './SelectT.js';
|
|
3
3
|
import './styles.scss';
|
|
4
|
-
import { jsx
|
|
5
|
-
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function Select(props) {
|
|
6
7
|
const toString = option => option;
|
|
7
|
-
return /*#__PURE__*/
|
|
8
|
+
return /*#__PURE__*/jsx(SelectT, {
|
|
8
9
|
...props,
|
|
9
10
|
isEqual: (A, B) => A === B,
|
|
10
11
|
renderOption: toString,
|
|
11
12
|
toT: toString,
|
|
12
13
|
displayLabel: option => option || ''
|
|
13
14
|
});
|
|
14
|
-
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Select as default };
|