@terraware/web-components 4.2.12 → 4.2.14-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AntSwitch/index.js +8 -14
- package/components/Autocomplete/Autocomplete.js +67 -70
- package/components/Badge/index.js +16 -20
- package/components/BusySpinner/index.js +30 -35
- package/components/Button/Button.js +23 -27
- package/components/Button/button.test.js +8 -10
- package/components/Checkbox.js +10 -19
- package/components/Confirm/index.js +44 -51
- package/components/DatePicker/DatePicker.js +116 -117
- package/components/DialogBox/DialogBox.js +76 -66
- package/components/Divisor.js +15 -20
- package/components/Dropdown.js +54 -61
- package/components/EditableTable/index.js +129 -135
- package/components/ErrorBox/ErrorBox.js +37 -36
- package/components/FileChooser/index.js +73 -77
- package/components/FormBottomBar/index.js +63 -69
- package/components/Icon/Icon.js +14 -21
- package/components/Icon/icons/index.d.ts +1 -1
- package/components/Icon/icons/index.d.ts.map +1 -1
- package/components/Icon/icons/index.js +251 -255
- package/components/IconTooltip/index.js +29 -34
- package/components/Map/MapBox.js +199 -220
- package/components/Map/MapContainer.js +14 -18
- package/components/Map/MapDateSliderControl.js +44 -46
- package/components/Map/MapDrawer.js +32 -33
- package/components/Map/MapLegend.js +96 -95
- package/components/Map/MapViewStyleControl.js +38 -48
- package/components/Map/ReactMapboxWrapper.js +2 -9
- package/components/Map/index.js +47 -55
- package/components/Map/types.js +2 -8
- package/components/Map/useMaintainLayerOrder.js +4 -11
- package/components/Markdown/index.js +14 -21
- package/components/Message/Message.js +59 -51
- package/components/MultiSelect/MultiSelect.test.js +22 -24
- package/components/MultiSelect/index.js +73 -69
- package/components/Navbar/NavFooter.js +8 -13
- package/components/Navbar/NavItem.js +43 -37
- package/components/Navbar/NavSection.js +13 -17
- package/components/Navbar/Navbar.js +35 -38
- package/components/Navbar/SubNavbar.js +8 -13
- package/components/Note.js +14 -19
- package/components/OverlayModal/OverlayModal.js +36 -37
- package/components/PageForm/index.js +30 -35
- package/components/PhotoChooser/index.js +93 -98
- package/components/Pill/index.js +29 -31
- package/components/PillList/index.js +16 -22
- package/components/PlacementWrapper/index.js +20 -25
- package/components/PopoverMenu/Popover.js +33 -37
- package/components/PopoverMenu/index.js +41 -46
- package/components/PopoverMultiSelect/index.js +18 -21
- package/components/ProgressCircle/ProgressCircle.js +23 -26
- package/components/RadioButton.js +7 -14
- package/components/Select/Select.js +8 -13
- package/components/Select/SelectT.js +110 -108
- package/components/Separator/index.js +8 -14
- package/components/Size.js +1 -5
- package/components/Slider/index.js +7 -13
- package/components/SummaryBox.js +36 -39
- package/components/Tabs/index.js +75 -77
- package/components/TextTruncated/index.js +64 -65
- package/components/Textfield/Textfield.js +100 -95
- package/components/Textfield/TruncatedTextArea.js +44 -46
- package/components/TimelineSlider/TimelineMarker.js +24 -28
- package/components/TimelineSlider/TimelineRail.js +5 -11
- package/components/TimelineSlider/index.js +47 -51
- package/components/Tooltip/Tooltip.js +21 -26
- package/components/ViewPhotosDialog/index.js +58 -62
- package/components/VirtualWalkthrough/Annotation.d.ts +41 -0
- package/components/VirtualWalkthrough/Annotation.d.ts.map +1 -0
- package/components/VirtualWalkthrough/Annotation.js +197 -0
- package/components/VirtualWalkthrough/AnnotationEditPane.d.ts +20 -0
- package/components/VirtualWalkthrough/AnnotationEditPane.d.ts.map +1 -0
- package/components/VirtualWalkthrough/AnnotationEditPane.js +136 -0
- package/components/VirtualWalkthrough/AnnotationPanel.d.ts +13 -0
- package/components/VirtualWalkthrough/AnnotationPanel.d.ts.map +1 -0
- package/components/VirtualWalkthrough/AnnotationPanel.js +196 -0
- package/components/VirtualWalkthrough/Application.d.ts +9 -0
- package/components/VirtualWalkthrough/Application.d.ts.map +1 -0
- package/components/VirtualWalkthrough/Application.js +32 -0
- package/components/VirtualWalkthrough/AutoRotator.d.ts +109 -0
- package/components/VirtualWalkthrough/AutoRotator.d.ts.map +1 -0
- package/components/VirtualWalkthrough/AutoRotator.js +217 -0
- package/components/VirtualWalkthrough/BlockingSpinner.d.ts +3 -0
- package/components/VirtualWalkthrough/BlockingSpinner.d.ts.map +1 -0
- package/components/VirtualWalkthrough/BlockingSpinner.js +27 -0
- package/components/VirtualWalkthrough/BoundaryRing.d.ts +9 -0
- package/components/VirtualWalkthrough/BoundaryRing.d.ts.map +1 -0
- package/components/VirtualWalkthrough/BoundaryRing.js +33 -0
- package/components/VirtualWalkthrough/CameraInfo.d.ts +16 -0
- package/components/VirtualWalkthrough/CameraInfo.d.ts.map +1 -0
- package/components/VirtualWalkthrough/CameraInfo.js +88 -0
- package/components/VirtualWalkthrough/ControlsInfoPane.d.ts +37 -0
- package/components/VirtualWalkthrough/ControlsInfoPane.d.ts.map +1 -0
- package/components/VirtualWalkthrough/ControlsInfoPane.js +196 -0
- package/components/VirtualWalkthrough/GradientSky.d.ts +9 -0
- package/components/VirtualWalkthrough/GradientSky.d.ts.map +1 -0
- package/components/VirtualWalkthrough/GradientSky.js +73 -0
- package/components/VirtualWalkthrough/SplatControls.d.ts +50 -0
- package/components/VirtualWalkthrough/SplatControls.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatControls.js +252 -0
- package/components/VirtualWalkthrough/SplatCrop.d.ts +8 -0
- package/components/VirtualWalkthrough/SplatCrop.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatCrop.js +18 -0
- package/components/VirtualWalkthrough/SplatFadeCrop.d.ts +8 -0
- package/components/VirtualWalkthrough/SplatFadeCrop.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatFadeCrop.js +18 -0
- package/components/VirtualWalkthrough/SplatModel.d.ts +15 -0
- package/components/VirtualWalkthrough/SplatModel.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatModel.js +60 -0
- package/components/VirtualWalkthrough/SplatRevealRain.d.ts +18 -0
- package/components/VirtualWalkthrough/SplatRevealRain.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatRevealRain.js +38 -0
- package/components/VirtualWalkthrough/TfAnnotationManager.d.ts +110 -0
- package/components/VirtualWalkthrough/TfAnnotationManager.d.ts.map +1 -0
- package/components/VirtualWalkthrough/TfAnnotationManager.js +368 -0
- package/components/VirtualWalkthrough/TfXrNavigation.d.ts +15 -0
- package/components/VirtualWalkthrough/TfXrNavigation.d.ts.map +1 -0
- package/components/VirtualWalkthrough/TfXrNavigation.js +24 -0
- package/components/VirtualWalkthrough/annotation-styles.css +5 -0
- package/components/VirtualWalkthrough/application-styles.css +4 -0
- package/components/VirtualWalkthrough/boundary-ring.d.ts +47 -0
- package/components/VirtualWalkthrough/boundary-ring.d.ts.map +1 -0
- package/components/VirtualWalkthrough/boundary-ring.js +125 -0
- package/components/VirtualWalkthrough/boundary-ring.test.js +109 -0
- package/components/VirtualWalkthrough/groundPlane.d.ts +14 -0
- package/components/VirtualWalkthrough/groundPlane.d.ts.map +1 -0
- package/components/VirtualWalkthrough/groundPlane.js +47 -0
- package/components/VirtualWalkthrough/groundPlane.test.js +45 -0
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts +19 -0
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts.map +1 -0
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +119 -0
- package/components/VirtualWalkthrough/walkthrough-camera.d.ts +77 -0
- package/components/VirtualWalkthrough/walkthrough-camera.d.ts.map +1 -0
- package/components/VirtualWalkthrough/walkthrough-camera.js +320 -0
- package/components/svg/BlobbyGrayIconImage.js +36 -41
- package/components/svg/BlobbyGrayIconImport.js +36 -41
- package/components/svg/BlobbyGrayIconUploadToTheCloud.js +36 -41
- package/components/svg/BlobbyIconCloudChecked.js +161 -158
- package/components/svg/BlobbyIconExportOrUploadPhoto.js +161 -158
- package/components/svg/BlobbyIconFolder.js +161 -158
- package/components/svg/BlobbyIconGraphReport.js +161 -158
- package/components/svg/BlobbyIconHappy.js +161 -158
- package/components/svg/BlobbyIconHeartMonitor.js +161 -158
- package/components/svg/BlobbyIconLeaf.js +161 -158
- package/components/svg/BlobbyIconLibrary.js +161 -158
- package/components/svg/BlobbyIconNursery.js +163 -160
- package/components/svg/BlobbyIconOrganization.js +161 -158
- package/components/svg/BlobbyIconParchment.js +161 -158
- package/components/svg/BlobbyIconPeople.js +161 -158
- package/components/svg/BlobbyIconSeedBank.js +161 -158
- package/components/svg/BlobbyIconSeedling.js +161 -158
- package/components/svg/BlobbyIconSeeds.js +161 -158
- package/components/svg/BlobbyIconSite.js +164 -161
- package/components/svg/BlobbyIconSparkles.js +161 -158
- package/components/svg/BlobbyIconWrench.js +161 -158
- package/components/svg/Bug.js +18 -27
- package/components/svg/Calendar.js +18 -27
- package/components/svg/CaretDown.js +18 -27
- package/components/svg/CaretLeft.js +18 -27
- package/components/svg/CaretRight.js +18 -27
- package/components/svg/CaretUp.js +18 -27
- package/components/svg/ChevronDown.js +18 -27
- package/components/svg/ChevronUp.js +18 -27
- package/components/svg/Close.js +18 -27
- package/components/svg/Critical.js +18 -27
- package/components/svg/Edit.js +161 -158
- package/components/svg/Error.js +18 -27
- package/components/svg/Filter.js +18 -27
- package/components/svg/Folder.js +18 -27
- package/components/svg/Help.js +18 -27
- package/components/svg/Home.js +18 -27
- package/components/svg/IconAdd.js +18 -27
- package/components/svg/IconArrowRight.js +19 -28
- package/components/svg/IconBusinessNetwork.js +18 -27
- package/components/svg/IconCalendar.d.ts +1 -1
- package/components/svg/IconCalendar.d.ts.map +1 -1
- package/components/svg/IconCalendar.js +18 -27
- package/components/svg/IconCancel.js +18 -27
- package/components/svg/IconChargingBattery.js +18 -27
- package/components/svg/IconChecklist.js +19 -28
- package/components/svg/IconCheckmark.js +18 -27
- package/components/svg/IconCoinInHand.js +18 -27
- package/components/svg/IconColumns.js +18 -27
- package/components/svg/IconComment.js +18 -27
- package/components/svg/IconDashboard.js +18 -27
- package/components/svg/IconDataMigration.js +18 -27
- package/components/svg/IconDocument.d.ts +8 -0
- package/components/svg/IconDocument.d.ts.map +1 -0
- package/components/svg/IconDocument.js +21 -0
- package/components/svg/IconDownloadFromTheCloud.js +19 -28
- package/components/svg/IconEdit.js +19 -28
- package/components/svg/IconExpand.js +19 -28
- package/components/svg/IconExport.js +18 -27
- package/components/svg/IconExternalLink.js +18 -27
- package/components/svg/IconEye.js +18 -27
- package/components/svg/IconEyeOff.js +18 -27
- package/components/svg/IconFile.js +18 -27
- package/components/svg/IconFolder.js +18 -27
- package/components/svg/IconFullScreen.js +18 -27
- package/components/svg/IconFutures.js +18 -27
- package/components/svg/IconGraphReport.js +18 -27
- package/components/svg/IconHeartMonitor.js +18 -27
- package/components/svg/IconHelp.js +19 -28
- package/components/svg/IconHistory.js +18 -27
- package/components/svg/IconImport.js +18 -27
- package/components/svg/IconIndex.js +18 -27
- package/components/svg/IconLayers.js +18 -27
- package/components/svg/IconLibrary.js +18 -27
- package/components/svg/IconList.js +18 -27
- package/components/svg/IconLivePlant.js +18 -27
- package/components/svg/IconLocations.js +18 -27
- package/components/svg/IconMail.js +18 -27
- package/components/svg/IconManager.js +18 -27
- package/components/svg/IconMarker.js +18 -27
- package/components/svg/IconMenu.js +18 -27
- package/components/svg/IconMenuHorizontal.js +18 -27
- package/components/svg/IconModule.js +18 -27
- package/components/svg/IconMyLocation.js +18 -27
- package/components/svg/IconNote.js +19 -28
- package/components/svg/IconNursery.js +18 -27
- package/components/svg/IconOrg.js +18 -27
- package/components/svg/IconParchment.js +18 -27
- package/components/svg/IconPhoto.js +18 -27
- package/components/svg/IconPlantsFilled.js +18 -27
- package/components/svg/IconRedo.js +18 -27
- package/components/svg/IconRestorationSite.js +18 -27
- package/components/svg/IconSeedBank.js +18 -27
- package/components/svg/IconSeedling.js +18 -27
- package/components/svg/IconSettings.js +18 -27
- package/components/svg/IconSlice.js +18 -27
- package/components/svg/IconSubmit.js +18 -27
- package/components/svg/IconSubtract.js +19 -28
- package/components/svg/IconSynced.js +18 -27
- package/components/svg/IconTrashCan.js +18 -27
- package/components/svg/IconTreasureMap.js +18 -27
- package/components/svg/IconUnavailable.js +18 -27
- package/components/svg/IconUndo.js +18 -27
- package/components/svg/IconVariable.js +18 -27
- package/components/svg/IconVideo.js +19 -28
- package/components/svg/IconWifi.js +18 -27
- package/components/svg/Info.js +18 -27
- package/components/svg/Key.js +18 -27
- package/components/svg/Leaf.js +18 -27
- package/components/svg/Lock.js +18 -27
- package/components/svg/Logo.js +40 -45
- package/components/svg/MenuVertical.js +18 -27
- package/components/svg/Notification.js +18 -27
- package/components/svg/Person.js +18 -27
- package/components/svg/Plus.js +18 -27
- package/components/svg/RestorationSite.js +18 -27
- package/components/svg/Search.js +18 -27
- package/components/svg/Seeds.js +18 -27
- package/components/svg/Site.js +18 -27
- package/components/svg/Sparkles.js +18 -27
- package/components/svg/Species.js +18 -27
- package/components/svg/Species2.js +161 -158
- package/components/svg/Spinner.js +27 -36
- package/components/svg/Star.js +18 -27
- package/components/svg/Success.js +18 -27
- package/components/svg/SuccessFilled.js +18 -27
- package/components/svg/TerrawareLogoDesktop.js +44 -49
- package/components/svg/TerrawareLogoMobile.js +20 -29
- package/components/svg/Touchscreen.js +18 -27
- package/components/svg/UploadCloud.js +161 -158
- package/components/svg/Warning.js +18 -27
- package/components/svg/WelcomeClipboard.js +130 -135
- package/components/svg/index.d.ts +1 -0
- package/components/svg/index.d.ts.map +1 -1
- package/components/svg/index.js +127 -888
- package/components/table/EnhancedTableToolbar.js +45 -47
- package/components/table/EnhancedTableToolbarV2.js +18 -26
- package/components/table/TableCellRenderer.js +137 -143
- package/components/table/TableHeader.js +45 -47
- package/components/table/TableHeaderItem.js +65 -64
- package/components/table/density.js +3 -11
- package/components/table/index.js +225 -218
- package/components/table/sort.js +8 -18
- package/components/table/sort.test.js +6 -8
- package/components/table/types.js +1 -5
- package/components/types/index.js +1 -5
- package/hooks/useBoolean.d.ts +4 -0
- package/hooks/useBoolean.d.ts.map +1 -0
- package/hooks/useBoolean.js +12 -0
- package/hooks/useCameraPosition.d.ts +8 -0
- package/hooks/useCameraPosition.d.ts.map +1 -0
- package/hooks/useCameraPosition.js +33 -0
- package/index.js +57 -398
- package/license-report.html +1 -1
- package/package.json +10 -3
- package/style-dictionary-dist/TerrawareTheme.js +1 -7
- package/theme.js +7 -14
- package/utils/color.d.ts +2 -0
- package/utils/color.d.ts.map +1 -0
- package/utils/color.js +14 -0
- package/utils/date.js +13 -24
- package/utils/date.test.js +40 -43
- package/utils/index.js +5 -53
- package/utils/preventDefaultEvent.js +1 -7
- package/utils/text.js +2 -9
- package/utils/text.test.js +9 -11
- package/utils/useDeviceInfo.js +10 -16
- package/virtualWalkthrough.d.ts +31 -0
- package/virtualWalkthrough.d.ts.map +1 -0
- package/virtualWalkthrough.js +28 -0
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _material = require("@mui/material");
|
|
11
|
-
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
12
|
-
var _IconTooltip = _interopRequireDefault(require("../IconTooltip"));
|
|
13
|
-
var _PillList = _interopRequireDefault(require("../PillList"));
|
|
14
|
-
require("./styles.scss");
|
|
15
|
-
function MultiSelect(props) {
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import Icon from '../Icon/Icon';
|
|
4
|
+
import IconTooltip from '../IconTooltip';
|
|
5
|
+
import PillList from '../PillList';
|
|
6
|
+
import './styles.scss';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export default function MultiSelect(props) {
|
|
16
9
|
const {
|
|
17
10
|
className,
|
|
18
11
|
disabled,
|
|
@@ -34,14 +27,14 @@ function MultiSelect(props) {
|
|
|
34
27
|
tooltipTitle,
|
|
35
28
|
valueRenderer
|
|
36
29
|
} = props;
|
|
37
|
-
const [openedOptions, setOpenedOptions] =
|
|
30
|
+
const [openedOptions, setOpenedOptions] = useState(false);
|
|
38
31
|
const toggleOptions = () => {
|
|
39
32
|
setOpenedOptions(isOpen => !isOpen && !disabled);
|
|
40
33
|
if (props.onFocus) {
|
|
41
34
|
props.onFocus();
|
|
42
35
|
}
|
|
43
36
|
};
|
|
44
|
-
|
|
37
|
+
useEffect(() => {
|
|
45
38
|
if (optionsVisible !== undefined) {
|
|
46
39
|
setOpenedOptions(optionsVisible);
|
|
47
40
|
}
|
|
@@ -65,56 +58,67 @@ function MultiSelect(props) {
|
|
|
65
58
|
value: value ? valueRenderer(value) : missingValuePlaceholder || ''
|
|
66
59
|
};
|
|
67
60
|
}).filter(data => data.value);
|
|
68
|
-
return /*#__PURE__*/
|
|
69
|
-
className:
|
|
70
|
-
sx: sx
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
61
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
62
|
+
className: `multi-select ${className}`,
|
|
63
|
+
sx: sx,
|
|
64
|
+
children: [label && /*#__PURE__*/_jsxs("label", {
|
|
65
|
+
htmlFor: id,
|
|
66
|
+
className: "multi-select__label",
|
|
67
|
+
children: [label, " ", tooltipTitle && /*#__PURE__*/_jsx(IconTooltip, {
|
|
68
|
+
title: tooltipTitle
|
|
69
|
+
})]
|
|
70
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
71
|
+
className: `multi-select__container ${fullWidth ? 'multi-select__container--fullWidth' : ''}`,
|
|
72
|
+
onBlur: onBlurHandler,
|
|
73
|
+
tabIndex: 0,
|
|
74
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
75
|
+
id: id,
|
|
76
|
+
className: `multi-select__values${disabled ? '--disabled' : ''}${openedOptions ? ' open' : ''}${errorText ? ' error' : ''}`,
|
|
77
|
+
onClick: toggleOptions,
|
|
78
|
+
children: [selectedOptions.length > 0 ? /*#__PURE__*/_jsx(PillList, {
|
|
79
|
+
data: valuesPillData,
|
|
80
|
+
onRemove: onRemove,
|
|
81
|
+
onClick: onPillClick,
|
|
82
|
+
className: pillListClassName
|
|
83
|
+
}) : /*#__PURE__*/_jsx("p", {
|
|
84
|
+
className: "multi-select__placeholder-text",
|
|
85
|
+
children: placeHolder
|
|
86
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
87
|
+
className: 'multi-select__values__icon-button',
|
|
88
|
+
"aria-label": "show-options",
|
|
89
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
90
|
+
name: openedOptions ? 'chevronUp' : 'chevronDown',
|
|
91
|
+
className: `multi-select__values__icon-right${disabled ? '--disabled' : ''}`
|
|
92
|
+
})
|
|
93
|
+
})]
|
|
94
|
+
}), options && unselectedOptions.length > 0 && openedOptions && /*#__PURE__*/_jsx("div", {
|
|
95
|
+
className: "multi-select__options-container",
|
|
96
|
+
children: /*#__PURE__*/_jsx("ul", {
|
|
97
|
+
className: 'multi-select__options',
|
|
98
|
+
children: unselectedOptions.map((optionKey, index) => {
|
|
99
|
+
const optionValue = options.get(optionKey);
|
|
100
|
+
return /*#__PURE__*/_jsx("li", {
|
|
101
|
+
className: "select-value",
|
|
102
|
+
onClick: () => onAdd(optionKey),
|
|
103
|
+
children: optionValue ? valueRenderer(optionValue) : missingValuePlaceholder || ''
|
|
104
|
+
}, index);
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
})]
|
|
108
|
+
}), helperText && /*#__PURE__*/_jsx("label", {
|
|
109
|
+
htmlFor: id,
|
|
110
|
+
className: "multi-select__help-text",
|
|
111
|
+
children: helperText
|
|
112
|
+
}), errorText && /*#__PURE__*/_jsxs("div", {
|
|
113
|
+
className: "multi-select__error",
|
|
114
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
115
|
+
name: "error",
|
|
116
|
+
className: "multi-select__error-icon"
|
|
117
|
+
}), /*#__PURE__*/_jsx("label", {
|
|
118
|
+
htmlFor: id,
|
|
119
|
+
className: "multi-select__error-text",
|
|
120
|
+
children: errorText
|
|
121
|
+
})]
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
120
124
|
}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = NavFooter;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
require("./styles.scss");
|
|
10
|
-
function NavFooter(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles.scss';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export default function NavFooter(props) {
|
|
11
5
|
const {
|
|
12
6
|
children
|
|
13
7
|
} = props;
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
-
className: "nav-footer"
|
|
16
|
-
|
|
8
|
+
return /*#__PURE__*/_jsx("div", {
|
|
9
|
+
className: "nav-footer",
|
|
10
|
+
children: children
|
|
11
|
+
});
|
|
17
12
|
}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.default = NavItem;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _theme = _interopRequireDefault(require("../../theme"));
|
|
11
|
-
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
12
|
-
require("./styles.scss");
|
|
13
|
-
function NavItem(props) {
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import theme from '../../theme';
|
|
3
|
+
import Icon from '../Icon/Icon';
|
|
4
|
+
import './styles.scss';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
export default function NavItem(props) {
|
|
14
7
|
const {
|
|
15
8
|
label,
|
|
16
9
|
icon,
|
|
@@ -24,7 +17,7 @@ function NavItem(props) {
|
|
|
24
17
|
href
|
|
25
18
|
} = props;
|
|
26
19
|
const children = href ? null : childrenProps;
|
|
27
|
-
const hasChildrenSelected =
|
|
20
|
+
const hasChildrenSelected = useCallback(() => {
|
|
28
21
|
if (children && children.props && children.props.children) {
|
|
29
22
|
const subChildren = children.props.children;
|
|
30
23
|
if (Array.isArray(subChildren)) {
|
|
@@ -34,12 +27,12 @@ function NavItem(props) {
|
|
|
34
27
|
}
|
|
35
28
|
return false;
|
|
36
29
|
}, [children]);
|
|
37
|
-
|
|
30
|
+
React.useEffect(() => {
|
|
38
31
|
if (hasChildrenSelected()) {
|
|
39
32
|
setOpen(true);
|
|
40
33
|
}
|
|
41
34
|
}, [children, hasChildrenSelected, selected]);
|
|
42
|
-
const [open, setOpen] =
|
|
35
|
+
const [open, setOpen] = React.useState(hasChildrenSelected());
|
|
43
36
|
const onClickHandler = () => {
|
|
44
37
|
if (!disabled) {
|
|
45
38
|
setOpen(!open || hasChildrenSelected());
|
|
@@ -49,25 +42,38 @@ function NavItem(props) {
|
|
|
49
42
|
}
|
|
50
43
|
};
|
|
51
44
|
const customLabel = typeof label !== 'string';
|
|
52
|
-
return /*#__PURE__*/
|
|
53
|
-
className:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
45
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
46
|
+
className: `
|
|
47
|
+
nav-item
|
|
48
|
+
${selected ? 'nav-item--selected' : ''}
|
|
49
|
+
${hasChildrenSelected() ? 'nav-item--children-selected' : ''}
|
|
50
|
+
${isFooter ? 'nav-item--footer' : ''}
|
|
51
|
+
${children ? 'nav-item--has-children' : ''}
|
|
52
|
+
`,
|
|
53
|
+
children: [/*#__PURE__*/_jsxs("button", {
|
|
54
|
+
className: `
|
|
55
|
+
${customLabel ? 'nav-item-custom-content' : 'nav-item-content'}
|
|
56
|
+
${disabled ? 'nav-item--disabled' : ''}
|
|
57
|
+
`,
|
|
58
|
+
onClick: onClickHandler,
|
|
59
|
+
id: id,
|
|
60
|
+
children: [icon && /*#__PURE__*/_jsx(Icon, {
|
|
61
|
+
name: icon,
|
|
62
|
+
className: "nav-item--icon",
|
|
63
|
+
fillColor: iconColor ?? theme.palette.TwClrIcnSecondary
|
|
64
|
+
}), !href && /*#__PURE__*/_jsx("span", {
|
|
65
|
+
className: "nav-item--label",
|
|
66
|
+
children: label
|
|
67
|
+
}), href && /*#__PURE__*/_jsx("a", {
|
|
68
|
+
className: "nav-item--label nav-item--anchor",
|
|
69
|
+
href: href,
|
|
70
|
+
rel: "noopener noreferrer",
|
|
71
|
+
target: "_external",
|
|
72
|
+
children: label
|
|
73
|
+
}), children && /*#__PURE__*/_jsx(Icon, {
|
|
74
|
+
name: open ? 'chevronUp' : 'chevronDown',
|
|
75
|
+
className: "nav-item--arrow"
|
|
76
|
+
})]
|
|
77
|
+
}), children && open && children]
|
|
78
|
+
});
|
|
73
79
|
}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = NavSection;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
require("./styles.scss");
|
|
10
|
-
function NavSection(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles.scss';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export default function NavSection(props) {
|
|
11
5
|
const {
|
|
12
6
|
title,
|
|
13
7
|
separator = true
|
|
14
8
|
} = props;
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
-
className: "nav-section"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
10
|
+
className: "nav-section",
|
|
11
|
+
children: [separator && /*#__PURE__*/_jsx("div", {
|
|
12
|
+
className: "divider"
|
|
13
|
+
}), title && /*#__PURE__*/_jsx("span", {
|
|
14
|
+
className: `nav-section--title ${separator ? '' : 'no-separator'}`,
|
|
15
|
+
children: title
|
|
16
|
+
})]
|
|
17
|
+
});
|
|
22
18
|
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _material = require("@mui/material");
|
|
10
|
-
var _utils = require("../../utils");
|
|
11
|
-
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
12
|
-
require("./styles.scss");
|
|
13
|
-
function Navbar(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, ButtonBase, useTheme } from '@mui/material';
|
|
3
|
+
import { useDeviceInfo } from '../../utils';
|
|
4
|
+
import Icon from '../Icon/Icon';
|
|
5
|
+
import './styles.scss';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export default function Navbar(props) {
|
|
14
8
|
const {
|
|
15
9
|
children,
|
|
16
10
|
setShowNavBar,
|
|
@@ -18,29 +12,32 @@ function Navbar(props) {
|
|
|
18
12
|
} = props;
|
|
19
13
|
const {
|
|
20
14
|
isDesktop
|
|
21
|
-
} =
|
|
22
|
-
const theme =
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
-
className: 'navbar' + (backgroundTransparent ? ' transparent' : '')
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
15
|
+
} = useDeviceInfo();
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
18
|
+
className: 'navbar' + (backgroundTransparent ? ' transparent' : ''),
|
|
19
|
+
children: [!isDesktop && /*#__PURE__*/_jsx(Box, {
|
|
20
|
+
sx: {
|
|
21
|
+
display: 'flex',
|
|
22
|
+
justifyContent: 'start'
|
|
23
|
+
},
|
|
24
|
+
children: /*#__PURE__*/_jsx(ButtonBase, {
|
|
25
|
+
onClick: () => setShowNavBar(false),
|
|
26
|
+
sx: {
|
|
27
|
+
background: 'none',
|
|
28
|
+
border: 'none',
|
|
29
|
+
cursor: 'pointer'
|
|
30
|
+
},
|
|
31
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
32
|
+
name: "close",
|
|
33
|
+
size: "medium",
|
|
34
|
+
style: {
|
|
35
|
+
fill: theme.palette.TwClrIcnSecondary,
|
|
36
|
+
marginRight: '16px',
|
|
37
|
+
marginBottom: '8px'
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
}), children]
|
|
42
|
+
});
|
|
46
43
|
}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = SubNavbar;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
require("./styles.scss");
|
|
10
|
-
function SubNavbar(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles.scss';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export default function SubNavbar(props) {
|
|
11
5
|
const {
|
|
12
6
|
children
|
|
13
7
|
} = props;
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
-
className: "subnavbar"
|
|
16
|
-
|
|
8
|
+
return /*#__PURE__*/_jsx("div", {
|
|
9
|
+
className: "subnavbar",
|
|
10
|
+
children: children
|
|
11
|
+
});
|
|
17
12
|
}
|
package/components/Note.js
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _material = require("@mui/material");
|
|
10
|
-
function Note(_ref) {
|
|
11
|
-
let {
|
|
12
|
-
children
|
|
13
|
-
} = _ref;
|
|
14
|
-
const theme = (0, _material.useTheme)();
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Typography, useTheme } from '@mui/material';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export default function Note({
|
|
5
|
+
children
|
|
6
|
+
}) {
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
16
9
|
sx: {
|
|
17
10
|
borderRadius: 8,
|
|
18
11
|
backgroundColor: theme.palette.neutral[200],
|
|
19
12
|
marginBottom: theme.spacing(3),
|
|
20
13
|
padding: theme.spacing(2)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
},
|
|
15
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
16
|
+
component: "p",
|
|
17
|
+
children: children
|
|
18
|
+
})
|
|
19
|
+
});
|
|
25
20
|
}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _material = require("@mui/material");
|
|
11
|
-
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
12
|
-
require("./styles.scss");
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { IconButton } from '@mui/material';
|
|
3
|
+
import Icon from '../Icon/Icon';
|
|
4
|
+
import './styles.scss';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
6
|
const OverlayModal = props => {
|
|
14
7
|
const {
|
|
15
8
|
children,
|
|
@@ -20,13 +13,13 @@ const OverlayModal = props => {
|
|
|
20
13
|
onClickOutClose = true,
|
|
21
14
|
minHeight = '300px'
|
|
22
15
|
} = props;
|
|
23
|
-
|
|
16
|
+
useEffect(() => {
|
|
24
17
|
if (!open || !onEscapeClose) {
|
|
25
18
|
return;
|
|
26
19
|
}
|
|
27
20
|
const handleEscape = event => {
|
|
28
21
|
if (event.key === 'Escape') {
|
|
29
|
-
onClose
|
|
22
|
+
onClose?.();
|
|
30
23
|
}
|
|
31
24
|
};
|
|
32
25
|
document.addEventListener('keydown', handleEscape);
|
|
@@ -36,30 +29,36 @@ const OverlayModal = props => {
|
|
|
36
29
|
}, [open, onEscapeClose, onClose]);
|
|
37
30
|
const handleBackdropClick = event => {
|
|
38
31
|
if (onClickOutClose && event.target instanceof HTMLElement && event.target.classList.contains('overlay-modal-backdrop')) {
|
|
39
|
-
onClose
|
|
32
|
+
onClose?.();
|
|
40
33
|
}
|
|
41
34
|
};
|
|
42
|
-
return open ? /*#__PURE__*/
|
|
35
|
+
return open ? /*#__PURE__*/_jsx("div", {
|
|
43
36
|
className: 'overlay-modal-backdrop',
|
|
44
|
-
onClick: handleBackdropClick
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
37
|
+
onClick: handleBackdropClick,
|
|
38
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
39
|
+
className: 'overlay-modal-container',
|
|
40
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
41
|
+
onClick: onClose,
|
|
42
|
+
className: 'overlay-modal-close',
|
|
43
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
44
|
+
size: 'xlarge',
|
|
45
|
+
name: "close",
|
|
46
|
+
className: 'icon-close'
|
|
47
|
+
})
|
|
48
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
49
|
+
className: "overlay-modal",
|
|
50
|
+
style: {
|
|
51
|
+
minHeight
|
|
52
|
+
},
|
|
53
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
54
|
+
className: "overlay-modal-content",
|
|
55
|
+
children: children
|
|
56
|
+
})
|
|
57
|
+
}), belowComponent && /*#__PURE__*/_jsx("div", {
|
|
58
|
+
className: "overlay-modal-below",
|
|
59
|
+
children: belowComponent
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
}) : null;
|
|
64
63
|
};
|
|
65
|
-
|
|
64
|
+
export default OverlayModal;
|