@carto/meridian-ds 2.6.2-alpha.0 → 2.7.0-alpha-loader.2
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/CHANGELOG.md +8 -3
- package/dist/{Alert-1A6BG2aO.js → Alert-BZPM5zpX.js} +1 -1
- package/dist/{Alert-eVzJvC47.cjs → Alert-C4W0H_uN.cjs} +1 -1
- package/dist/{MenuItem-6ZIV5V7a.cjs → MenuItem-CgF4QdGi.cjs} +12 -3
- package/dist/{MenuItem-DgHhHW-j.js → MenuItem-DRUK149i.js} +12 -3
- package/dist/{SwatchSquare-CaaLsjAC.js → Search-C7wkXu3f.js} +4 -23
- package/dist/{SwatchSquare-B8PIY3Rd.cjs → Search-CMWbM9nD.cjs} +3 -22
- package/dist/SwatchSquare-B6KYVoqV.js +24 -0
- package/dist/SwatchSquare-DuXPIL7t.cjs +23 -0
- package/dist/components/index.cjs +366 -3
- package/dist/components/index.js +369 -6
- package/dist/{css-utils-BNXxLCyb.cjs → css-utils-CH7es90t.cjs} +18 -0
- package/dist/{css-utils-lmkjeCdF.js → css-utils-CjUBRJVK.js} +18 -0
- package/dist/custom-icons/index.cjs +3 -2
- package/dist/custom-icons/index.js +3 -2
- package/dist/theme/index.cjs +16 -4
- package/dist/theme/index.js +17 -5
- package/dist/types/components/Loader/Loader.d.ts +43 -0
- package/dist/types/components/Loader/Loader.d.ts.map +1 -0
- package/dist/types/components/Loader/Loader.stories.d.ts +79 -0
- package/dist/types/components/Loader/Loader.stories.d.ts.map +1 -0
- package/dist/types/components/Loader/Loader.test.d.ts +2 -0
- package/dist/types/components/Loader/Loader.test.d.ts.map +1 -0
- package/dist/types/components/Loader/index.d.ts +3 -0
- package/dist/types/components/Loader/index.d.ts.map +1 -0
- package/dist/types/components/Menu/Menu/Menu.stories.d.ts +16 -7
- package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
- package/dist/types/components/Menu/MenuItem/MenuItem.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.d.ts +4 -0
- package/dist/types/components/SearchField/SearchField.d.ts.map +1 -0
- package/dist/types/components/SearchField/SearchField.stories.d.ts +111 -0
- package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -0
- package/dist/types/components/SearchField/SearchField.styled.d.ts +23 -0
- package/dist/types/components/SearchField/SearchField.styled.d.ts.map +1 -0
- package/dist/types/components/SearchField/SearchField.test.d.ts +2 -0
- package/dist/types/components/SearchField/SearchField.test.d.ts.map +1 -0
- package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts +19 -0
- package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts.map +1 -0
- package/dist/types/components/SearchField/components/SearchFieldStartAdornment.d.ts +14 -0
- package/dist/types/components/SearchField/components/SearchFieldStartAdornment.d.ts.map +1 -0
- package/dist/types/components/SearchField/index.d.ts +3 -0
- package/dist/types/components/SearchField/index.d.ts.map +1 -0
- package/dist/types/components/SearchField/types.d.ts +72 -0
- package/dist/types/components/SearchField/types.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/localization/en.d.ts +6 -0
- package/dist/types/localization/en.d.ts.map +1 -1
- package/dist/types/localization/es.d.ts +6 -0
- package/dist/types/localization/es.d.ts.map +1 -1
- package/dist/types/localization/id.d.ts +6 -0
- package/dist/types/localization/id.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts +18 -0
- package/dist/types/localization/index.d.ts.map +1 -1
- package/dist/types/theme/carto-theme.d.ts.map +1 -1
- package/dist/types/theme/components/layout.d.ts +3 -0
- package/dist/types/theme/components/layout.d.ts.map +1 -0
- package/dist/types/theme/components/navigation.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts +5 -5
- package/dist/widgets/index.cjs +8 -7
- package/dist/widgets/index.js +4 -3
- package/package.json +2 -3
package/dist/components/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React, { forwardRef, useState, useRef, useEffect, useMemo, createElement, Fragment as Fragment$1, useCallback, useImperativeHandle } from "react";
|
|
3
|
-
import { styled, Box, Button as Button$1, CircularProgress, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment, Select, FormControl, InputLabel, FormHelperText, Link, Checkbox, IconButton as IconButton$1, ListItemText, Tooltip, ToggleButtonGroup as ToggleButtonGroup$1, Autocomplete as Autocomplete$1, Divider, ListItemIcon, createFilterOptions, alpha, useTheme, AppBar as AppBar$1, Toolbar, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip, DialogContent as DialogContent$1, DialogActions as DialogActions$1, Slide, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Menu as Menu$2, useMediaQuery, Snackbar as Snackbar$1, Portal, Fade } from "@mui/material";
|
|
3
|
+
import { styled, Box, Button as Button$1, CircularProgress, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment, Select, FormControl, InputLabel, FormHelperText, Link, Checkbox, IconButton as IconButton$1, ListItemText, Tooltip, ToggleButtonGroup as ToggleButtonGroup$1, Grid, Stack, Autocomplete as Autocomplete$1, Divider, ListItemIcon, createFilterOptions, alpha, useTheme, AppBar as AppBar$1, Toolbar, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip, DialogContent as DialogContent$1, DialogActions as DialogActions$1, Slide, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Menu as Menu$2, useMediaQuery, Snackbar as Snackbar$1, Portal, Fade } from "@mui/material";
|
|
4
4
|
import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, ContentCopyOutlined, AddCircleOutlineOutlined, MenuOutlined, MoreVertOutlined, HelpOutline, ErrorOutline, CloseOutlined, Check, TodayOutlined } from "@mui/icons-material";
|
|
5
|
-
import { u as useTranslationWithFallback, T as Typography, c as ICON_SIZE_SMALL, i as IconButton, f as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, h as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, j as useImperativeIntl, N as NOTIFICATION_DURATION_IN_MS, e as ellipsisStyles } from "../css-utils-
|
|
6
|
-
import { a } from "../css-utils-
|
|
7
|
-
import { S as ScreenReaderOnly, A as Alert$1 } from "../Alert-
|
|
8
|
-
import { L } from "../Alert-
|
|
5
|
+
import { u as useTranslationWithFallback, T as Typography, c as ICON_SIZE_SMALL, i as IconButton, f as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, h as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, j as useImperativeIntl, b as ICON_SIZE_MEDIUM, N as NOTIFICATION_DURATION_IN_MS, e as ellipsisStyles } from "../css-utils-CjUBRJVK.js";
|
|
6
|
+
import { a } from "../css-utils-CjUBRJVK.js";
|
|
7
|
+
import { S as ScreenReaderOnly, A as Alert$1 } from "../Alert-BZPM5zpX.js";
|
|
8
|
+
import { L } from "../Alert-BZPM5zpX.js";
|
|
9
9
|
import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
|
|
10
10
|
import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CGdCEXlF.js";
|
|
11
|
-
import { M as MenuItem$1 } from "../MenuItem-
|
|
11
|
+
import { M as MenuItem$1 } from "../MenuItem-DRUK149i.js";
|
|
12
12
|
import "cartocolor";
|
|
13
13
|
import { FixedSizeList } from "react-window";
|
|
14
14
|
import { Controlled, UnControlled } from "react-codemirror2";
|
|
@@ -41,6 +41,7 @@ import { useIntl } from "react-intl";
|
|
|
41
41
|
import { PickersDay as PickersDay$1 } from "@mui/x-date-pickers";
|
|
42
42
|
import { TimePicker as TimePicker$1 } from "@mui/x-date-pickers/TimePicker";
|
|
43
43
|
import { DateTimePicker as DateTimePicker$1 } from "@mui/x-date-pickers/DateTimePicker";
|
|
44
|
+
import { S as Search } from "../Search-C7wkXu3f.js";
|
|
44
45
|
import DOMPurify from "dompurify";
|
|
45
46
|
const IndicatorIcon = styled(Box)({
|
|
46
47
|
position: "absolute",
|
|
@@ -875,6 +876,78 @@ function _ToggleButtonGroup({
|
|
|
875
876
|
);
|
|
876
877
|
}
|
|
877
878
|
const ToggleButtonGroup = forwardRef(_ToggleButtonGroup);
|
|
879
|
+
const StyledGrid = styled(Grid, {
|
|
880
|
+
shouldForwardProp: (prop) => prop !== "fullHeight" && prop !== "height"
|
|
881
|
+
})(({ fullHeight, theme }) => ({
|
|
882
|
+
display: "flex",
|
|
883
|
+
flexDirection: "column",
|
|
884
|
+
alignItems: "center",
|
|
885
|
+
justifyContent: "center",
|
|
886
|
+
gap: theme.spacing(1.5),
|
|
887
|
+
...fullHeight && {
|
|
888
|
+
flex: 1,
|
|
889
|
+
height: "100%",
|
|
890
|
+
width: "100%"
|
|
891
|
+
}
|
|
892
|
+
}));
|
|
893
|
+
function _Loader({
|
|
894
|
+
label,
|
|
895
|
+
secondLabel,
|
|
896
|
+
color = "primary",
|
|
897
|
+
size = 40,
|
|
898
|
+
fullHeight,
|
|
899
|
+
labelTypographyProps,
|
|
900
|
+
secondLabelTypographyProps,
|
|
901
|
+
...otherProps
|
|
902
|
+
}, ref) {
|
|
903
|
+
const labelText = useTranslationWithFallback("c4r.utils.loader.label", label);
|
|
904
|
+
const hasAnyLabel = labelText || secondLabel;
|
|
905
|
+
return /* @__PURE__ */ jsxs(
|
|
906
|
+
StyledGrid,
|
|
907
|
+
{
|
|
908
|
+
container: true,
|
|
909
|
+
fullHeight,
|
|
910
|
+
...otherProps,
|
|
911
|
+
ref,
|
|
912
|
+
"aria-busy": true,
|
|
913
|
+
"data-name": "loader",
|
|
914
|
+
"data-full-height": fullHeight,
|
|
915
|
+
children: [
|
|
916
|
+
/* @__PURE__ */ jsx(
|
|
917
|
+
CircularProgress,
|
|
918
|
+
{
|
|
919
|
+
color,
|
|
920
|
+
size,
|
|
921
|
+
"aria-labelledby": hasAnyLabel ? "loader-label" : void 0
|
|
922
|
+
}
|
|
923
|
+
),
|
|
924
|
+
hasAnyLabel && /* @__PURE__ */ jsxs(Stack, { direction: "column", alignItems: "center", children: [
|
|
925
|
+
labelText && /* @__PURE__ */ jsx(
|
|
926
|
+
Typography,
|
|
927
|
+
{
|
|
928
|
+
variant: "body2",
|
|
929
|
+
color: "textSecondary",
|
|
930
|
+
...labelTypographyProps,
|
|
931
|
+
id: "loader-label",
|
|
932
|
+
children: labelText
|
|
933
|
+
}
|
|
934
|
+
),
|
|
935
|
+
secondLabel && /* @__PURE__ */ jsx(
|
|
936
|
+
Typography,
|
|
937
|
+
{
|
|
938
|
+
variant: "body2",
|
|
939
|
+
color: "textSecondary",
|
|
940
|
+
...secondLabelTypographyProps,
|
|
941
|
+
id: labelText ? void 0 : "loader-label",
|
|
942
|
+
children: secondLabel
|
|
943
|
+
}
|
|
944
|
+
)
|
|
945
|
+
] })
|
|
946
|
+
]
|
|
947
|
+
}
|
|
948
|
+
);
|
|
949
|
+
}
|
|
950
|
+
const Loader = forwardRef(_Loader);
|
|
878
951
|
async function copyString(value) {
|
|
879
952
|
return await navigator.clipboard.writeText(value);
|
|
880
953
|
}
|
|
@@ -5039,6 +5112,294 @@ function _FilterDropdown({
|
|
|
5039
5112
|
const FilterDropdown = forwardRef(
|
|
5040
5113
|
_FilterDropdown
|
|
5041
5114
|
);
|
|
5115
|
+
const SearchIcon = styled(Search, {
|
|
5116
|
+
shouldForwardProp: (prop) => prop !== "minimized" && prop !== "disabled"
|
|
5117
|
+
})(
|
|
5118
|
+
({ theme, minimized, disabled }) => ({
|
|
5119
|
+
cursor: !disabled && minimized ? "pointer" : "inherit",
|
|
5120
|
+
width: ICON_SIZE_MEDIUM,
|
|
5121
|
+
height: ICON_SIZE_MEDIUM,
|
|
5122
|
+
path: {
|
|
5123
|
+
fillOpacity: 1,
|
|
5124
|
+
fill: disabled ? theme.palette.text.disabled : theme.palette.text.secondary
|
|
5125
|
+
}
|
|
5126
|
+
})
|
|
5127
|
+
);
|
|
5128
|
+
const ClearSearchIcon = styled(Cancel)(({ theme }) => ({
|
|
5129
|
+
color: `${theme.palette.text.hint} !important`
|
|
5130
|
+
}));
|
|
5131
|
+
const LoadingSearchIcon = styled(CircularProgress)(({ theme }) => ({
|
|
5132
|
+
svg: {
|
|
5133
|
+
color: `${theme.palette.primary.main} !important`
|
|
5134
|
+
}
|
|
5135
|
+
}));
|
|
5136
|
+
const SearchInputAdornment = styled(InputAdornment, {
|
|
5137
|
+
shouldForwardProp: (prop) => prop !== "minimized" && prop !== "expanded"
|
|
5138
|
+
})(
|
|
5139
|
+
({ theme, minimized, expanded }) => ({
|
|
5140
|
+
// Start adornment
|
|
5141
|
+
transition: theme.transitions.create(["width", "margin"], {
|
|
5142
|
+
easing: theme.transitions.easing.easeInOut,
|
|
5143
|
+
duration: theme.transitions.duration.short
|
|
5144
|
+
}),
|
|
5145
|
+
"&.MuiInputAdornment-positionStart": {
|
|
5146
|
+
marginLeft: minimized ? theme.spacing(2) : void 0,
|
|
5147
|
+
"&.MuiInputAdornment-sizeSmall": {
|
|
5148
|
+
marginLeft: minimized ? theme.spacing(1) : void 0
|
|
5149
|
+
}
|
|
5150
|
+
},
|
|
5151
|
+
// End adornment
|
|
5152
|
+
"&.MuiInputAdornment-positionEnd": {
|
|
5153
|
+
minWidth: theme.spacing(4),
|
|
5154
|
+
"&.MuiInputAdornment-sizeSmall": {
|
|
5155
|
+
minWidth: theme.spacing(3)
|
|
5156
|
+
}
|
|
5157
|
+
},
|
|
5158
|
+
...expanded && !minimized && {
|
|
5159
|
+
"&.MuiInputAdornment-root": {
|
|
5160
|
+
minWidth: theme.spacing(9),
|
|
5161
|
+
"&.MuiInputAdornment-sizeSmall": {
|
|
5162
|
+
minWidth: theme.spacing(7)
|
|
5163
|
+
}
|
|
5164
|
+
}
|
|
5165
|
+
}
|
|
5166
|
+
})
|
|
5167
|
+
);
|
|
5168
|
+
const SearchFieldBase = styled(TextField, {
|
|
5169
|
+
shouldForwardProp: (prop) => prop !== "minimized" && prop !== "isInputFocused" && prop !== "emphasis"
|
|
5170
|
+
})(({ theme, emphasis = "filled", minimized, isInputFocused }) => ({
|
|
5171
|
+
"&.MuiTextField-root .MuiInputBase-root": {
|
|
5172
|
+
paddingRight: theme.spacing(1),
|
|
5173
|
+
transition: theme.transitions.create(["width", "padding"], {
|
|
5174
|
+
easing: theme.transitions.easing.easeInOut,
|
|
5175
|
+
duration: theme.transitions.duration.standard
|
|
5176
|
+
}),
|
|
5177
|
+
"&.MuiInputBase-sizeSmall": {
|
|
5178
|
+
paddingRight: theme.spacing(0.5)
|
|
5179
|
+
},
|
|
5180
|
+
"&:before": {
|
|
5181
|
+
border: "none !important",
|
|
5182
|
+
"&:hover": {
|
|
5183
|
+
border: "none !important"
|
|
5184
|
+
}
|
|
5185
|
+
},
|
|
5186
|
+
// Input
|
|
5187
|
+
"& .MuiInputBase-input": {
|
|
5188
|
+
pointerEvents: isInputFocused ? "auto" : "none",
|
|
5189
|
+
// Fix Chrome scroll issue https://issues.chromium.org/issues/41245282
|
|
5190
|
+
transition: theme.transitions.create("width", {
|
|
5191
|
+
easing: theme.transitions.easing.easeInOut,
|
|
5192
|
+
duration: theme.transitions.duration.standard
|
|
5193
|
+
})
|
|
5194
|
+
},
|
|
5195
|
+
// Error state
|
|
5196
|
+
"&.Mui-error": {
|
|
5197
|
+
"&::after": {
|
|
5198
|
+
borderColor: "transparent !important"
|
|
5199
|
+
}
|
|
5200
|
+
},
|
|
5201
|
+
...minimized && {
|
|
5202
|
+
display: "flex",
|
|
5203
|
+
alignItems: "center",
|
|
5204
|
+
padding: 0,
|
|
5205
|
+
width: theme.spacing(6),
|
|
5206
|
+
cursor: "pointer",
|
|
5207
|
+
"& .MuiInputBase-input": {
|
|
5208
|
+
width: 0
|
|
5209
|
+
},
|
|
5210
|
+
"&.MuiInputBase-sizeSmall": {
|
|
5211
|
+
padding: 0,
|
|
5212
|
+
width: theme.spacing(4)
|
|
5213
|
+
}
|
|
5214
|
+
}
|
|
5215
|
+
},
|
|
5216
|
+
// Variants
|
|
5217
|
+
...emphasis === "filled" && {
|
|
5218
|
+
"& .MuiInputBase-root": {
|
|
5219
|
+
backgroundColor: minimized ? "transparent !important" : void 0,
|
|
5220
|
+
"&:hover": {
|
|
5221
|
+
backgroundColor: `${theme.palette.action.hover} !important`
|
|
5222
|
+
},
|
|
5223
|
+
// not disabled
|
|
5224
|
+
"&:not(.Mui-disabled):hover": {
|
|
5225
|
+
backgroundColor: `${theme.palette.action.hover} !important`
|
|
5226
|
+
}
|
|
5227
|
+
}
|
|
5228
|
+
},
|
|
5229
|
+
...emphasis === "transparent" && {
|
|
5230
|
+
"& .MuiInputBase-root": {
|
|
5231
|
+
backgroundColor: "transparent !important",
|
|
5232
|
+
"&:hover": {
|
|
5233
|
+
backgroundColor: minimized ? `${theme.palette.action.hover} !important` : "transparent !important"
|
|
5234
|
+
},
|
|
5235
|
+
"&.Mui-disabled": {
|
|
5236
|
+
backgroundColor: "transparent !important"
|
|
5237
|
+
}
|
|
5238
|
+
}
|
|
5239
|
+
},
|
|
5240
|
+
...emphasis === "floating" && {
|
|
5241
|
+
"& .MuiInputBase-root": {
|
|
5242
|
+
backgroundColor: `${theme.palette.background.paper} !important`,
|
|
5243
|
+
boxShadow: theme.shadows[1],
|
|
5244
|
+
"&:hover": {
|
|
5245
|
+
backgroundColor: minimized ? `${theme.palette.action.hover} !important` : `${theme.palette.background.paper} !important`
|
|
5246
|
+
},
|
|
5247
|
+
"&.Mui-disabled": {
|
|
5248
|
+
backgroundColor: `${theme.palette.background.paper} !important`
|
|
5249
|
+
}
|
|
5250
|
+
}
|
|
5251
|
+
}
|
|
5252
|
+
}));
|
|
5253
|
+
const SearchFieldEndAdornment = ({
|
|
5254
|
+
disabled,
|
|
5255
|
+
showClearButton = true,
|
|
5256
|
+
loading,
|
|
5257
|
+
size,
|
|
5258
|
+
endAdornment,
|
|
5259
|
+
clearButton,
|
|
5260
|
+
clearButtonLabel,
|
|
5261
|
+
onClear
|
|
5262
|
+
}) => {
|
|
5263
|
+
if (!showClearButton && !endAdornment && !loading) {
|
|
5264
|
+
return null;
|
|
5265
|
+
}
|
|
5266
|
+
return /* @__PURE__ */ jsx(
|
|
5267
|
+
SearchInputAdornment,
|
|
5268
|
+
{
|
|
5269
|
+
position: "end",
|
|
5270
|
+
expanded: Boolean(endAdornment && showClearButton),
|
|
5271
|
+
children: /* @__PURE__ */ jsxs(
|
|
5272
|
+
Stack,
|
|
5273
|
+
{
|
|
5274
|
+
direction: "row",
|
|
5275
|
+
spacing: 1,
|
|
5276
|
+
sx: {
|
|
5277
|
+
alignItems: "center"
|
|
5278
|
+
},
|
|
5279
|
+
children: [
|
|
5280
|
+
loading ? /* @__PURE__ */ jsx(LoadingSearchIcon, { size: ICON_SIZE_MEDIUM }) : showClearButton ? clearButton ?? /* @__PURE__ */ jsx(
|
|
5281
|
+
IconButton,
|
|
5282
|
+
{
|
|
5283
|
+
onClick: onClear,
|
|
5284
|
+
size,
|
|
5285
|
+
color: "default",
|
|
5286
|
+
disabled,
|
|
5287
|
+
tooltip: clearButtonLabel,
|
|
5288
|
+
"aria-label": clearButtonLabel,
|
|
5289
|
+
icon: /* @__PURE__ */ jsx(ClearSearchIcon, {})
|
|
5290
|
+
}
|
|
5291
|
+
) : null,
|
|
5292
|
+
endAdornment
|
|
5293
|
+
]
|
|
5294
|
+
}
|
|
5295
|
+
)
|
|
5296
|
+
}
|
|
5297
|
+
);
|
|
5298
|
+
};
|
|
5299
|
+
const SearchFieldStartAdornment = ({
|
|
5300
|
+
minimized,
|
|
5301
|
+
loading,
|
|
5302
|
+
startAdornment,
|
|
5303
|
+
disabled
|
|
5304
|
+
}) => {
|
|
5305
|
+
return /* @__PURE__ */ jsx(SearchInputAdornment, { position: "start", minimized, children: loading && minimized ? /* @__PURE__ */ jsx(LoadingSearchIcon, { size: ICON_SIZE_MEDIUM }) : startAdornment || /* @__PURE__ */ jsx(SearchIcon, { disabled, minimized }) });
|
|
5306
|
+
};
|
|
5307
|
+
function _SearchField({
|
|
5308
|
+
value,
|
|
5309
|
+
defaultValue,
|
|
5310
|
+
placeholder,
|
|
5311
|
+
disabled,
|
|
5312
|
+
minimized = false,
|
|
5313
|
+
loading = false,
|
|
5314
|
+
variant = "filled",
|
|
5315
|
+
size = "small",
|
|
5316
|
+
InputProps,
|
|
5317
|
+
inputProps,
|
|
5318
|
+
startAdornment,
|
|
5319
|
+
endAdornment,
|
|
5320
|
+
onFocus,
|
|
5321
|
+
onBlur,
|
|
5322
|
+
onChange,
|
|
5323
|
+
onClick,
|
|
5324
|
+
onResetSearch,
|
|
5325
|
+
showClearButton = true,
|
|
5326
|
+
clearButtonLabel,
|
|
5327
|
+
clearButton,
|
|
5328
|
+
...otherProps
|
|
5329
|
+
}, ref) {
|
|
5330
|
+
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
5331
|
+
const clearButtonVisibility = !disabled && Boolean(value ?? defaultValue) && showClearButton;
|
|
5332
|
+
const clearButtonLabelValue = useTranslationWithFallback(
|
|
5333
|
+
"c4r.button.clear",
|
|
5334
|
+
clearButtonLabel
|
|
5335
|
+
);
|
|
5336
|
+
const handleFocus = (event) => {
|
|
5337
|
+
setIsInputFocused(true);
|
|
5338
|
+
onFocus == null ? void 0 : onFocus(event);
|
|
5339
|
+
};
|
|
5340
|
+
const handleBlur = (event) => {
|
|
5341
|
+
setIsInputFocused(false);
|
|
5342
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
5343
|
+
};
|
|
5344
|
+
const handleClear = () => {
|
|
5345
|
+
onResetSearch == null ? void 0 : onResetSearch();
|
|
5346
|
+
onChange == null ? void 0 : onChange({ target: { value: "" } });
|
|
5347
|
+
};
|
|
5348
|
+
return /* @__PURE__ */ jsx(
|
|
5349
|
+
SearchFieldBase,
|
|
5350
|
+
{
|
|
5351
|
+
defaultValue,
|
|
5352
|
+
value: minimized ? "" : value,
|
|
5353
|
+
placeholder: minimized ? "" : placeholder,
|
|
5354
|
+
onChange,
|
|
5355
|
+
onClick,
|
|
5356
|
+
variant: "filled",
|
|
5357
|
+
emphasis: variant,
|
|
5358
|
+
size,
|
|
5359
|
+
focused: false,
|
|
5360
|
+
isInputFocused,
|
|
5361
|
+
disabled,
|
|
5362
|
+
minimized,
|
|
5363
|
+
InputProps: {
|
|
5364
|
+
onFocus: handleFocus,
|
|
5365
|
+
onBlur: handleBlur,
|
|
5366
|
+
startAdornment: /* @__PURE__ */ jsx(
|
|
5367
|
+
SearchFieldStartAdornment,
|
|
5368
|
+
{
|
|
5369
|
+
minimized,
|
|
5370
|
+
loading,
|
|
5371
|
+
disabled,
|
|
5372
|
+
startAdornment
|
|
5373
|
+
}
|
|
5374
|
+
),
|
|
5375
|
+
endAdornment: !minimized && /* @__PURE__ */ jsx(
|
|
5376
|
+
SearchFieldEndAdornment,
|
|
5377
|
+
{
|
|
5378
|
+
disabled,
|
|
5379
|
+
loading,
|
|
5380
|
+
showClearButton: clearButtonVisibility,
|
|
5381
|
+
clearButton,
|
|
5382
|
+
clearButtonLabel: clearButtonLabelValue,
|
|
5383
|
+
onClear: handleClear,
|
|
5384
|
+
size,
|
|
5385
|
+
endAdornment
|
|
5386
|
+
}
|
|
5387
|
+
),
|
|
5388
|
+
...InputProps
|
|
5389
|
+
},
|
|
5390
|
+
inputProps: {
|
|
5391
|
+
role: "searchbox",
|
|
5392
|
+
...inputProps
|
|
5393
|
+
},
|
|
5394
|
+
role: "search",
|
|
5395
|
+
"data-variant": variant,
|
|
5396
|
+
"data-name": "search-field",
|
|
5397
|
+
ref,
|
|
5398
|
+
...otherProps
|
|
5399
|
+
}
|
|
5400
|
+
);
|
|
5401
|
+
}
|
|
5402
|
+
const SearchField = forwardRef(_SearchField);
|
|
5042
5403
|
const MAX_WIDTH = 480;
|
|
5043
5404
|
const SnackbarRoot = styled(Snackbar$1)(({ theme }) => ({
|
|
5044
5405
|
bottom: theme.spacing(2),
|
|
@@ -5854,6 +6215,7 @@ export {
|
|
|
5854
6215
|
IconButton,
|
|
5855
6216
|
LabelWithIndicator,
|
|
5856
6217
|
L as Link,
|
|
6218
|
+
Loader,
|
|
5857
6219
|
Menu,
|
|
5858
6220
|
MenuItem$1 as MenuItem,
|
|
5859
6221
|
MenuItemFilter,
|
|
@@ -5862,6 +6224,7 @@ export {
|
|
|
5862
6224
|
MultipleSelectField,
|
|
5863
6225
|
PasswordField,
|
|
5864
6226
|
ScreenReaderOnly,
|
|
6227
|
+
SearchField,
|
|
5865
6228
|
SelectField,
|
|
5866
6229
|
Snackbar,
|
|
5867
6230
|
SplitButton,
|
|
@@ -818,6 +818,7 @@ const en = {
|
|
|
818
818
|
copy: "Copy",
|
|
819
819
|
save: "Save",
|
|
820
820
|
add: "Add",
|
|
821
|
+
clear: "Clear",
|
|
821
822
|
showOptions: "Show options",
|
|
822
823
|
hide: "Hide",
|
|
823
824
|
show: "Show",
|
|
@@ -858,6 +859,11 @@ const en = {
|
|
|
858
859
|
changesSaved: "Changes saved successfully",
|
|
859
860
|
copiedToClipboard: "Copied to clipboard"
|
|
860
861
|
},
|
|
862
|
+
utils: {
|
|
863
|
+
loader: {
|
|
864
|
+
label: "Loading..."
|
|
865
|
+
}
|
|
866
|
+
},
|
|
861
867
|
widgets: {
|
|
862
868
|
category: {
|
|
863
869
|
apply: "Apply",
|
|
@@ -967,6 +973,7 @@ const es = {
|
|
|
967
973
|
copy: "Copiar",
|
|
968
974
|
save: "Guardar",
|
|
969
975
|
add: "Añadir",
|
|
976
|
+
clear: "Borrar",
|
|
970
977
|
showOptions: "Mostrar opciones",
|
|
971
978
|
hide: "Ocultar",
|
|
972
979
|
show: "Mostrar",
|
|
@@ -1007,6 +1014,11 @@ const es = {
|
|
|
1007
1014
|
changesSaved: "Cambios guardados correctamente",
|
|
1008
1015
|
copiedToClipboard: "Copiado al portapapeles"
|
|
1009
1016
|
},
|
|
1017
|
+
utils: {
|
|
1018
|
+
loader: {
|
|
1019
|
+
label: "Cargando..."
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1010
1022
|
widgets: {
|
|
1011
1023
|
category: {
|
|
1012
1024
|
apply: "Aplicar",
|
|
@@ -1114,6 +1126,7 @@ const id = {
|
|
|
1114
1126
|
copy: "Salin",
|
|
1115
1127
|
save: "Simpan",
|
|
1116
1128
|
add: "Tambah",
|
|
1129
|
+
clear: "Bersihkan",
|
|
1117
1130
|
showOptions: "Tampilkan opsi",
|
|
1118
1131
|
hide: "Sembunyikan",
|
|
1119
1132
|
show: "Tampilkan",
|
|
@@ -1154,6 +1167,11 @@ const id = {
|
|
|
1154
1167
|
changesSaved: "Changes saved successfully",
|
|
1155
1168
|
copiedToClipboard: "Tersalin ke clipboard"
|
|
1156
1169
|
},
|
|
1170
|
+
utils: {
|
|
1171
|
+
loader: {
|
|
1172
|
+
label: "Memuat..."
|
|
1173
|
+
}
|
|
1174
|
+
},
|
|
1157
1175
|
widgets: {
|
|
1158
1176
|
category: {
|
|
1159
1177
|
apply: "Terapkan",
|
|
@@ -817,6 +817,7 @@ const en = {
|
|
|
817
817
|
copy: "Copy",
|
|
818
818
|
save: "Save",
|
|
819
819
|
add: "Add",
|
|
820
|
+
clear: "Clear",
|
|
820
821
|
showOptions: "Show options",
|
|
821
822
|
hide: "Hide",
|
|
822
823
|
show: "Show",
|
|
@@ -857,6 +858,11 @@ const en = {
|
|
|
857
858
|
changesSaved: "Changes saved successfully",
|
|
858
859
|
copiedToClipboard: "Copied to clipboard"
|
|
859
860
|
},
|
|
861
|
+
utils: {
|
|
862
|
+
loader: {
|
|
863
|
+
label: "Loading..."
|
|
864
|
+
}
|
|
865
|
+
},
|
|
860
866
|
widgets: {
|
|
861
867
|
category: {
|
|
862
868
|
apply: "Apply",
|
|
@@ -966,6 +972,7 @@ const es = {
|
|
|
966
972
|
copy: "Copiar",
|
|
967
973
|
save: "Guardar",
|
|
968
974
|
add: "Añadir",
|
|
975
|
+
clear: "Borrar",
|
|
969
976
|
showOptions: "Mostrar opciones",
|
|
970
977
|
hide: "Ocultar",
|
|
971
978
|
show: "Mostrar",
|
|
@@ -1006,6 +1013,11 @@ const es = {
|
|
|
1006
1013
|
changesSaved: "Cambios guardados correctamente",
|
|
1007
1014
|
copiedToClipboard: "Copiado al portapapeles"
|
|
1008
1015
|
},
|
|
1016
|
+
utils: {
|
|
1017
|
+
loader: {
|
|
1018
|
+
label: "Cargando..."
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1009
1021
|
widgets: {
|
|
1010
1022
|
category: {
|
|
1011
1023
|
apply: "Aplicar",
|
|
@@ -1113,6 +1125,7 @@ const id = {
|
|
|
1113
1125
|
copy: "Salin",
|
|
1114
1126
|
save: "Simpan",
|
|
1115
1127
|
add: "Tambah",
|
|
1128
|
+
clear: "Bersihkan",
|
|
1116
1129
|
showOptions: "Tampilkan opsi",
|
|
1117
1130
|
hide: "Sembunyikan",
|
|
1118
1131
|
show: "Tampilkan",
|
|
@@ -1153,6 +1166,11 @@ const id = {
|
|
|
1153
1166
|
changesSaved: "Changes saved successfully",
|
|
1154
1167
|
copiedToClipboard: "Tersalin ke clipboard"
|
|
1155
1168
|
},
|
|
1169
|
+
utils: {
|
|
1170
|
+
loader: {
|
|
1171
|
+
label: "Memuat..."
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1156
1174
|
widgets: {
|
|
1157
1175
|
category: {
|
|
1158
1176
|
apply: "Terapkan",
|
|
@@ -5,7 +5,8 @@ const React = require("react");
|
|
|
5
5
|
const material = require("@mui/material");
|
|
6
6
|
const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
|
|
7
7
|
const OpenDiagonallyRight = require("../OpenDiagonallyRight-CpL4ROwg.cjs");
|
|
8
|
-
const
|
|
8
|
+
const Search = require("../Search-CMWbM9nD.cjs");
|
|
9
|
+
const SwatchSquare = require("../SwatchSquare-DuXPIL7t.cjs");
|
|
9
10
|
const Icon$3h = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
11
|
"path",
|
|
11
12
|
{
|
|
@@ -6345,7 +6346,7 @@ exports.ArrowDown = ArrowDown.ArrowDown;
|
|
|
6345
6346
|
exports.ArrowUp = OpenDiagonallyRight.ArrowUp;
|
|
6346
6347
|
exports.CloseDiagonallyRight = OpenDiagonallyRight.CloseDiagonallyRight;
|
|
6347
6348
|
exports.OpenDiagonallyRight = OpenDiagonallyRight.OpenDiagonallyRight;
|
|
6348
|
-
exports.Search =
|
|
6349
|
+
exports.Search = Search.Search;
|
|
6349
6350
|
exports.SwatchSquare = SwatchSquare.SwatchSquare;
|
|
6350
6351
|
exports.AccessIn = AccessIn$1;
|
|
6351
6352
|
exports.AddApp = AddApp$1;
|
|
@@ -3,7 +3,8 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import { createSvgIcon } from "@mui/material";
|
|
4
4
|
import { A } from "../ArrowDown-d6bxUL0F.js";
|
|
5
5
|
import { A as A2, C, O } from "../OpenDiagonallyRight-CGdCEXlF.js";
|
|
6
|
-
import { S
|
|
6
|
+
import { S } from "../Search-C7wkXu3f.js";
|
|
7
|
+
import { S as S2 } from "../SwatchSquare-B6KYVoqV.js";
|
|
7
8
|
const Icon$3h = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
|
|
8
9
|
"path",
|
|
9
10
|
{
|
|
@@ -6521,7 +6522,7 @@ export {
|
|
|
6521
6522
|
SupplyChain$1 as SupplyChain,
|
|
6522
6523
|
SwatchCircle$1 as SwatchCircle,
|
|
6523
6524
|
SwatchCircleNone$1 as SwatchCircleNone,
|
|
6524
|
-
|
|
6525
|
+
S2 as SwatchSquare,
|
|
6525
6526
|
TableColumn$1 as TableColumn,
|
|
6526
6527
|
TableColumnLimited$1 as TableColumnLimited,
|
|
6527
6528
|
TempTable$1 as TempTable,
|
package/dist/theme/index.cjs
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const material = require("@mui/material");
|
|
5
5
|
const paletteUtils = require("../palette-utils-B9ybmwiI.cjs");
|
|
6
6
|
const jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
const cssUtils = require("../css-utils-
|
|
7
|
+
const cssUtils = require("../css-utils-CH7es90t.cjs");
|
|
8
8
|
const iconsMaterial = require("@mui/icons-material");
|
|
9
9
|
const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
|
|
10
10
|
const xDatePickers = require("@mui/x-date-pickers");
|
|
11
|
-
const MenuItem = require("../MenuItem-
|
|
11
|
+
const MenuItem = require("../MenuItem-CgF4QdGi.cjs");
|
|
12
12
|
const themeShadows = [
|
|
13
13
|
"none",
|
|
14
14
|
// 0
|
|
@@ -2273,9 +2273,12 @@ const navigationOverrides = {
|
|
|
2273
2273
|
...theme2.typography.body2,
|
|
2274
2274
|
columnGap: theme2.spacing(1),
|
|
2275
2275
|
minHeight: cssUtils.MENU_ITEM_SIZE_DEFAULT,
|
|
2276
|
-
padding: theme2.spacing(0.75,
|
|
2276
|
+
padding: theme2.spacing(0.75, 0),
|
|
2277
2277
|
whiteSpace: "normal",
|
|
2278
2278
|
transition: "background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
2279
|
+
"&.MuiMenuItem-gutters": {
|
|
2280
|
+
padding: theme2.spacing(0.75, 1, 0.75, 1.5)
|
|
2281
|
+
},
|
|
2279
2282
|
[theme2.breakpoints.up("sm")]: {
|
|
2280
2283
|
// Overrides an unwanted Mui default style
|
|
2281
2284
|
"&.MuiButtonBase-root": {
|
|
@@ -2994,6 +2997,14 @@ const surfacesOverrides = {
|
|
|
2994
2997
|
}
|
|
2995
2998
|
}
|
|
2996
2999
|
};
|
|
3000
|
+
const layoutOverrides = {
|
|
3001
|
+
// Stack
|
|
3002
|
+
MuiStack: {
|
|
3003
|
+
defaultProps: {
|
|
3004
|
+
useFlexGap: true
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
2997
3008
|
const CssBaseline = {
|
|
2998
3009
|
// Accessibility focus (keyboard only)
|
|
2999
3010
|
"*:focus-visible": {
|
|
@@ -3169,7 +3180,8 @@ const cartoThemeOptions = {
|
|
|
3169
3180
|
...dataDisplayOverrides,
|
|
3170
3181
|
...feedbackOverrides,
|
|
3171
3182
|
...surfacesOverrides,
|
|
3172
|
-
...datePickersOverrides
|
|
3183
|
+
...datePickersOverrides,
|
|
3184
|
+
...layoutOverrides
|
|
3173
3185
|
}
|
|
3174
3186
|
};
|
|
3175
3187
|
const theme = material.responsiveFontSizes(material.createTheme(cartoThemeOptions));
|
package/dist/theme/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import { alpha, Tooltip, responsiveFontSizes, createTheme } from "@mui/material"
|
|
|
3
3
|
import { c as commonPalette } from "../palette-utils-BHqJlHm9.js";
|
|
4
4
|
import { g } from "../palette-utils-BHqJlHm9.js";
|
|
5
5
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
-
import { T as Typography, a as TablePaginationActions, I as ICON_SIZE_LARGE, b as ICON_SIZE_MEDIUM, c as ICON_SIZE_SMALL, g as getSpacing, e as ellipsisStyles, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_DENSE, A as APPBAR_SIZE, B as BREAKPOINTS, S as SPACING } from "../css-utils-
|
|
7
|
-
import { h, N } from "../css-utils-
|
|
6
|
+
import { T as Typography, a as TablePaginationActions, I as ICON_SIZE_LARGE, b as ICON_SIZE_MEDIUM, c as ICON_SIZE_SMALL, g as getSpacing, e as ellipsisStyles, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_DENSE, A as APPBAR_SIZE, B as BREAKPOINTS, S as SPACING } from "../css-utils-CjUBRJVK.js";
|
|
7
|
+
import { h, N } from "../css-utils-CjUBRJVK.js";
|
|
8
8
|
import { Cancel, EventOutlined, ChevronRightOutlined, ChevronLeftOutlined, ExpandMoreOutlined, CheckCircleOutlined, InfoOutlined } from "@mui/icons-material";
|
|
9
9
|
import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
|
|
10
10
|
import { renderDigitalClockTimeView } from "@mui/x-date-pickers";
|
|
11
|
-
import { M as MenuItem } from "../MenuItem-
|
|
11
|
+
import { M as MenuItem } from "../MenuItem-DRUK149i.js";
|
|
12
12
|
const themeShadows = [
|
|
13
13
|
"none",
|
|
14
14
|
// 0
|
|
@@ -2273,9 +2273,12 @@ const navigationOverrides = {
|
|
|
2273
2273
|
...theme2.typography.body2,
|
|
2274
2274
|
columnGap: theme2.spacing(1),
|
|
2275
2275
|
minHeight: MENU_ITEM_SIZE_DEFAULT,
|
|
2276
|
-
padding: theme2.spacing(0.75,
|
|
2276
|
+
padding: theme2.spacing(0.75, 0),
|
|
2277
2277
|
whiteSpace: "normal",
|
|
2278
2278
|
transition: "background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
2279
|
+
"&.MuiMenuItem-gutters": {
|
|
2280
|
+
padding: theme2.spacing(0.75, 1, 0.75, 1.5)
|
|
2281
|
+
},
|
|
2279
2282
|
[theme2.breakpoints.up("sm")]: {
|
|
2280
2283
|
// Overrides an unwanted Mui default style
|
|
2281
2284
|
"&.MuiButtonBase-root": {
|
|
@@ -2994,6 +2997,14 @@ const surfacesOverrides = {
|
|
|
2994
2997
|
}
|
|
2995
2998
|
}
|
|
2996
2999
|
};
|
|
3000
|
+
const layoutOverrides = {
|
|
3001
|
+
// Stack
|
|
3002
|
+
MuiStack: {
|
|
3003
|
+
defaultProps: {
|
|
3004
|
+
useFlexGap: true
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
2997
3008
|
const CssBaseline = {
|
|
2998
3009
|
// Accessibility focus (keyboard only)
|
|
2999
3010
|
"*:focus-visible": {
|
|
@@ -3169,7 +3180,8 @@ const cartoThemeOptions = {
|
|
|
3169
3180
|
...dataDisplayOverrides,
|
|
3170
3181
|
...feedbackOverrides,
|
|
3171
3182
|
...surfacesOverrides,
|
|
3172
|
-
...datePickersOverrides
|
|
3183
|
+
...datePickersOverrides,
|
|
3184
|
+
...layoutOverrides
|
|
3173
3185
|
}
|
|
3174
3186
|
};
|
|
3175
3187
|
const theme = responsiveFontSizes(createTheme(cartoThemeOptions));
|