@carto/meridian-ds 2.5.4 → 2.5.5
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 +7 -0
- package/dist/components/index.cjs +73 -34
- package/dist/components/index.js +91 -52
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +2 -2
- package/dist/types/components/Autocomplete/Autocomplete/useAutocomplete.test.d.ts +2 -0
- package/dist/types/components/Autocomplete/Autocomplete/useAutocomplete.test.d.ts.map +1 -0
- package/dist/types/components/CodeArea/utils/useCodeAreaAutocompletion.test.d.ts +2 -0
- package/dist/types/components/CodeArea/utils/useCodeAreaAutocompletion.test.d.ts.map +1 -0
- package/dist/types/components/CopiableComponent/CopiableComponent.d.ts.map +1 -1
- package/dist/types/components/CopiableComponent/CopiableComponent.stories.d.ts +1 -0
- package/dist/types/components/CopiableComponent/CopiableComponent.stories.d.ts.map +1 -1
- package/dist/types/components/CopiableComponent/types.d.ts +2 -2
- package/dist/types/components/CopiableComponent/types.d.ts.map +1 -1
- package/dist/types/components/CopiableComponent/useCopyValue.d.ts +2 -2
- package/dist/types/components/CopiableComponent/useCopyValue.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateCalendar.stories.d.ts +34 -1
- package/dist/types/components/DatePickers/DateCalendar.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DatePicker/DatePicker.stories.d.ts +10 -0
- package/dist/types/components/DatePickers/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.stories.d.ts +1 -0
- package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/TimePicker/TimePicker.stories.d.ts.map +1 -1
- package/dist/types/components/LabelWithIndicator/LabelWithIndicator.d.ts +6 -1
- package/dist/types/components/LabelWithIndicator/LabelWithIndicator.d.ts.map +1 -1
- package/dist/types/components/LabelWithIndicator/LabelWithIndicator.stories.d.ts +8 -2
- package/dist/types/components/LabelWithIndicator/LabelWithIndicator.stories.d.ts.map +1 -1
- package/dist/types/components/LabelWithIndicator/LabelWithIndicator.test.d.ts +2 -0
- package/dist/types/components/LabelWithIndicator/LabelWithIndicator.test.d.ts.map +1 -0
- package/dist/types/components/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/types/components/PasswordField/PasswordField.test.d.ts +2 -0
- package/dist/types/components/PasswordField/PasswordField.test.d.ts.map +1 -0
- package/dist/types/components/SelectField/SelectField/SelectField.stories.d.ts.map +1 -1
- package/dist/types/components/UploadField/FilesAction.d.ts +1 -2
- package/dist/types/components/UploadField/FilesAction.d.ts.map +1 -1
- package/dist/types/components/UploadField/FilesAction.test.d.ts +2 -0
- package/dist/types/components/UploadField/FilesAction.test.d.ts.map +1 -0
- package/dist/types/components/UploadField/UploadField.d.ts +3 -1
- package/dist/types/components/UploadField/UploadField.d.ts.map +1 -1
- package/dist/types/components/UploadField/UploadField.stories.d.ts +2 -2
- package/dist/types/components/UploadField/UploadField.stories.d.ts.map +1 -1
- package/dist/types/components/UploadField/{StyledUploadField.d.ts → UploadField.styled.d.ts} +1 -1
- package/dist/types/components/UploadField/UploadField.styled.d.ts.map +1 -0
- package/dist/types/components/UploadField/UploadField.test.d.ts +2 -0
- package/dist/types/components/UploadField/UploadField.test.d.ts.map +1 -0
- package/dist/types/components/UploadField/UploadFieldBase.d.ts +3 -2
- package/dist/types/components/UploadField/UploadFieldBase.d.ts.map +1 -1
- package/dist/types/components/UploadField/UploadFieldBase.test.d.ts +2 -0
- package/dist/types/components/UploadField/UploadFieldBase.test.d.ts.map +1 -0
- package/dist/types/components/UploadField/useFileUpload.d.ts.map +1 -1
- package/dist/types/components/UploadField/useFileUpload.test.d.ts +2 -0
- package/dist/types/components/UploadField/useFileUpload.test.d.ts.map +1 -0
- package/dist/types/theme/carto-theme.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Progress.stories.d.ts +8 -0
- package/dist/types/theme/components/stories/Progress.stories.d.ts.map +1 -1
- package/dist/types/theme/{helpers/css-baseline.d.ts.map → css-baseline.d.ts.map} +1 -1
- package/dist/types/theme/index.d.ts +2 -2
- package/dist/types/theme/index.d.ts.map +1 -1
- package/dist/types/utils/{animationUtils.d.ts → animation-utils.d.ts} +1 -1
- package/dist/types/utils/animation-utils.d.ts.map +1 -0
- package/dist/types/utils/animation-utils.test.d.ts +2 -0
- package/dist/types/utils/animation-utils.test.d.ts.map +1 -0
- package/dist/types/utils/{chartConstants.d.ts → chart-constants.d.ts} +1 -1
- package/dist/types/utils/chart-constants.d.ts.map +1 -0
- package/dist/types/utils/{detectTouchScreen.d.ts → detect-touch-screen.d.ts} +1 -1
- package/dist/types/utils/detect-touch-screen.d.ts.map +1 -0
- package/dist/types/utils/detect-touch-screen.test.d.ts +2 -0
- package/dist/types/utils/detect-touch-screen.test.d.ts.map +1 -0
- package/dist/types/utils/{formatterUtils.d.ts → formatter-utils.d.ts} +1 -1
- package/dist/types/utils/formatter-utils.d.ts.map +1 -0
- package/dist/types/utils/formatter-utils.test.d.ts +2 -0
- package/dist/types/utils/formatter-utils.test.d.ts.map +1 -0
- package/dist/types/utils/{legendUtils.d.ts → legend-utils.d.ts} +1 -1
- package/dist/types/utils/legend-utils.d.ts.map +1 -0
- package/dist/types/utils/{localeUtils.d.ts → locale-utils.d.ts} +1 -1
- package/dist/types/utils/locale-utils.d.ts.map +1 -0
- package/dist/types/utils/locale-utils.test.d.ts +2 -0
- package/dist/types/utils/locale-utils.test.d.ts.map +1 -0
- package/dist/types/utils/{paletteUtils.d.ts → palette-utils.d.ts} +2 -2
- package/dist/types/utils/palette-utils.d.ts.map +1 -0
- package/dist/types/utils/palette-utils.test.d.ts +2 -0
- package/dist/types/utils/palette-utils.test.d.ts.map +1 -0
- package/dist/types/utils/theme-constants.d.ts.map +1 -0
- package/dist/types/utils/theme-utils.d.ts.map +1 -0
- package/dist/types/utils/theme-utils.test.d.ts +2 -0
- package/dist/types/utils/theme-utils.test.d.ts.map +1 -0
- package/dist/types/utils/{uniqueId.d.ts → unique-id.d.ts} +1 -1
- package/dist/types/utils/unique-id.d.ts.map +1 -0
- package/dist/types/utils/unique-id.test.d.ts +2 -0
- package/dist/types/utils/unique-id.test.d.ts.map +1 -0
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.d.ts +1 -1
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/BarWidgetUI/useProcessedProps.d.ts +1 -1
- package/dist/types/widgets/BarWidgetUI/useProcessedProps.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts +2 -2
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.d.ts +1 -1
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.d.ts +1 -1
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +2 -2
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +1 -1
- package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts.map +1 -1
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.d.ts +1 -1
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesContext.d.ts +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesContext.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.stories.d.ts +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.stories.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesControls.d.ts +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesControls.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesSkeleton.d.ts +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesSkeleton.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/index.d.ts +4 -4
- package/dist/types/widgets/TimeSeriesWidgetUI/index.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/{timeSeriesUtils.d.ts → utils/time-series-utils.d.ts} +3 -3
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.d.ts.map +1 -0
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.test.d.ts +2 -0
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.test.d.ts.map +1 -0
- package/dist/types/widgets/TimeSeriesWidgetUI/{useTimeSeriesInteractivity.d.ts → utils/useTimeSeriesInteractivity.d.ts} +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/useTimeSeriesInteractivity.d.ts.map +1 -0
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts +1 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts +1 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts.map +1 -1
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.d.ts +1 -1
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/index.d.ts +1 -1
- package/dist/types/widgets/index.d.ts.map +1 -1
- package/dist/types/widgets/legend/LegendLayer.d.ts +1 -1
- package/dist/types/widgets/legend/LegendLayer.d.ts.map +1 -1
- package/dist/types/widgets/legend/LegendLayerVariable.d.ts +1 -1
- package/dist/types/widgets/legend/LegendLayerVariable.d.ts.map +1 -1
- package/dist/types/widgets/legend/LegendWidgetUI.d.ts +1 -1
- package/dist/types/widgets/legend/LegendWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/legend/index.d.ts +2 -2
- package/dist/types/widgets/legend/index.d.ts.map +1 -1
- package/dist/types/widgets/legend/legend-types/LegendCategories.d.ts +1 -1
- package/dist/types/widgets/legend/legend-types/LegendCategories.d.ts.map +1 -1
- package/dist/types/widgets/legend/legend-types/LegendIcon.d.ts +1 -1
- package/dist/types/widgets/legend/legend-types/LegendIcon.d.ts.map +1 -1
- package/dist/types/widgets/legend/legend-types/LegendProportion.d.ts +1 -1
- package/dist/types/widgets/legend/legend-types/LegendProportion.d.ts.map +1 -1
- package/dist/types/widgets/legend/legend-types/LegendRamp.d.ts +1 -1
- package/dist/types/widgets/legend/legend-types/LegendRamp.d.ts.map +1 -1
- package/dist/types/widgets/legend/legendFixtures.d.ts +1 -1
- package/dist/types/widgets/legend/legendFixtures.d.ts.map +1 -1
- package/dist/widgets/index.cjs +1 -1
- package/dist/widgets/index.js +1 -1
- package/package.json +1 -1
- package/dist/types/components/UploadField/StyledUploadField.d.ts.map +0 -1
- package/dist/types/theme/helpers/theme-constants.d.ts.map +0 -1
- package/dist/types/theme/helpers/theme-utils.d.ts.map +0 -1
- package/dist/types/utils/animationUtils.d.ts.map +0 -1
- package/dist/types/utils/chartConstants.d.ts.map +0 -1
- package/dist/types/utils/detectTouchScreen.d.ts.map +0 -1
- package/dist/types/utils/detectTouchScreen.test.d.ts +0 -2
- package/dist/types/utils/detectTouchScreen.test.d.ts.map +0 -1
- package/dist/types/utils/formatterUtils.d.ts.map +0 -1
- package/dist/types/utils/formatterUtils.test.d.ts +0 -2
- package/dist/types/utils/formatterUtils.test.d.ts.map +0 -1
- package/dist/types/utils/legendUtils.d.ts.map +0 -1
- package/dist/types/utils/localeUtils.d.ts.map +0 -1
- package/dist/types/utils/localeUtils.test.d.ts +0 -2
- package/dist/types/utils/localeUtils.test.d.ts.map +0 -1
- package/dist/types/utils/paletteUtils.d.ts.map +0 -1
- package/dist/types/utils/uniqueId.d.ts.map +0 -1
- package/dist/types/utils/uniqueId.test.d.ts +0 -2
- package/dist/types/utils/uniqueId.test.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/timeSeriesUtils.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/timeSeriesUtils.test.d.ts +0 -2
- package/dist/types/widgets/TimeSeriesWidgetUI/timeSeriesUtils.test.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/useTimeSeriesInteractivity.d.ts.map +0 -1
- /package/dist/{paletteUtils-B9ybmwiI.cjs → palette-utils-B9ybmwiI.cjs} +0 -0
- /package/dist/{paletteUtils-BHqJlHm9.js → palette-utils-BHqJlHm9.js} +0 -0
- /package/dist/types/theme/{helpers/css-baseline.d.ts → css-baseline.d.ts} +0 -0
- /package/dist/types/{theme/helpers → utils}/theme-constants.d.ts +0 -0
- /package/dist/types/{theme/helpers → utils}/theme-utils.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## 2.0
|
|
6
6
|
|
|
7
|
+
### 2.5.5
|
|
8
|
+
|
|
9
|
+
- Utils files: rename to kebab-case for better naming convention [#291](https://github.com/CartoDB/meridian-ds/pull/291)
|
|
10
|
+
- Add unit tests for utils and hooks [#285](https://github.com/CartoDB/meridian-ds/pull/285)
|
|
11
|
+
- Add unit tests for field components [#287](https://github.com/CartoDB/meridian-ds/pull/287)
|
|
12
|
+
- Support `copyText={null}` in `CopiableComponent` [#296](https://github.com/CartoDB/meridian-ds/pull/296)
|
|
13
|
+
|
|
7
14
|
### 2.5.4
|
|
8
15
|
|
|
9
16
|
- Custom Icons: BulletPointAlt,BulletPointCheckedAlt,ShowNodeResults [#288](https://github.com/CartoDB/meridian-ds/pull/288)
|
|
@@ -245,32 +245,50 @@ const Icon = material.styled(material.Box)(({ theme }) => ({
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
}));
|
|
248
|
-
function
|
|
248
|
+
function _LabelWithIndicator({
|
|
249
249
|
label,
|
|
250
250
|
type,
|
|
251
251
|
icon,
|
|
252
|
-
inheritSize
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
252
|
+
inheritSize,
|
|
253
|
+
"data-testid": dataTestId,
|
|
254
|
+
"aria-label": ariaLabel,
|
|
255
|
+
typographyProps
|
|
256
|
+
}, ref) {
|
|
257
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
258
|
+
Root$5,
|
|
259
|
+
{
|
|
260
|
+
ref,
|
|
261
|
+
"data-testid": dataTestId,
|
|
262
|
+
"aria-label": ariaLabel,
|
|
263
|
+
"data-icon": !!icon,
|
|
264
|
+
"data-name": "label-with-indicator",
|
|
265
|
+
children: [
|
|
266
|
+
label,
|
|
267
|
+
type && /* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
+
Indicator,
|
|
269
|
+
{
|
|
270
|
+
component: "span",
|
|
271
|
+
variant: inheritSize ? "inherit" : "caption",
|
|
272
|
+
color: "textSecondary",
|
|
273
|
+
weight: "regular",
|
|
274
|
+
...typographyProps,
|
|
275
|
+
children: type === "required" ? "(required)" : "(optional)"
|
|
276
|
+
}
|
|
277
|
+
),
|
|
278
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: icon })
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
);
|
|
268
282
|
}
|
|
269
|
-
|
|
283
|
+
const LabelWithIndicator = React.forwardRef(_LabelWithIndicator);
|
|
284
|
+
function _PasswordField({ InputProps, size = "small", disabled, ...otherProps }, ref) {
|
|
270
285
|
const intl = reactIntl.useIntl();
|
|
271
286
|
const intlConfig = TablePaginationActions.useImperativeIntl(intl);
|
|
272
287
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
273
288
|
const handleClickShowPassword = () => setShowPassword(!showPassword);
|
|
289
|
+
const showPasswordLabel = intlConfig.formatMessage({
|
|
290
|
+
id: `c4r.form.${showPassword ? "hidePassword" : "showPassword"}`
|
|
291
|
+
});
|
|
274
292
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
275
293
|
material.TextField,
|
|
276
294
|
{
|
|
@@ -278,18 +296,26 @@ function _PasswordField({ InputProps, size = "small", ...otherProps }, ref) {
|
|
|
278
296
|
ref,
|
|
279
297
|
type: showPassword ? "text" : "password",
|
|
280
298
|
size,
|
|
299
|
+
disabled,
|
|
281
300
|
InputProps: {
|
|
282
301
|
...InputProps,
|
|
283
|
-
|
|
284
|
-
|
|
302
|
+
inputProps: {
|
|
303
|
+
...InputProps == null ? void 0 : InputProps.inputProps,
|
|
304
|
+
role: "textbox"
|
|
305
|
+
},
|
|
306
|
+
endAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
307
|
+
Alert$1.IconButton,
|
|
285
308
|
{
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
309
|
+
size,
|
|
310
|
+
disabled,
|
|
311
|
+
onClick: handleClickShowPassword,
|
|
312
|
+
icon: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOffOutlined, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOutlined, {}),
|
|
313
|
+
tooltip: showPasswordLabel,
|
|
314
|
+
"aria-label": showPasswordLabel
|
|
290
315
|
}
|
|
291
|
-
) })
|
|
292
|
-
}
|
|
316
|
+
) })
|
|
317
|
+
},
|
|
318
|
+
"data-name": "password-field"
|
|
293
319
|
}
|
|
294
320
|
);
|
|
295
321
|
}
|
|
@@ -841,7 +867,7 @@ const _CopiableComponent = ({
|
|
|
841
867
|
const [open, setOpen] = React.useState(false);
|
|
842
868
|
const intl = reactIntl.useIntl();
|
|
843
869
|
const intlConfig = TablePaginationActions.useImperativeIntl(intl);
|
|
844
|
-
const copyTooltipText = copyText || intlConfig.formatMessage({ id: "c4r.button.copy" });
|
|
870
|
+
const copyTooltipText = copyText === null ? null : copyText || intlConfig.formatMessage({ id: "c4r.button.copy" });
|
|
845
871
|
const copySuccessMessage = copiedText || intlConfig.formatMessage({
|
|
846
872
|
id: "c4r.notifications.copiedToClipboard"
|
|
847
873
|
});
|
|
@@ -877,7 +903,7 @@ const _CopiableComponent = ({
|
|
|
877
903
|
disabled,
|
|
878
904
|
icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ContentCopyOutlined, {}),
|
|
879
905
|
"data-testid": dataTestId,
|
|
880
|
-
"aria-label": ariaLabel || buttonLabel || copyTooltipText,
|
|
906
|
+
"aria-label": ariaLabel || buttonLabel || copyTooltipText || intlConfig.formatMessage({ id: "c4r.button.copy" }),
|
|
881
907
|
sx: {
|
|
882
908
|
display: "flex"
|
|
883
909
|
}
|
|
@@ -5263,6 +5289,7 @@ function FilesAction({
|
|
|
5263
5289
|
variant: "text",
|
|
5264
5290
|
color: error ? "default" : "primary",
|
|
5265
5291
|
disabled,
|
|
5292
|
+
"data-error": error,
|
|
5266
5293
|
children: buttonText
|
|
5267
5294
|
}
|
|
5268
5295
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5276,7 +5303,7 @@ function FilesAction({
|
|
|
5276
5303
|
}
|
|
5277
5304
|
) });
|
|
5278
5305
|
}
|
|
5279
|
-
function
|
|
5306
|
+
function _UploadFieldBase({
|
|
5280
5307
|
name,
|
|
5281
5308
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5282
5309
|
multiple,
|
|
@@ -5293,17 +5320,20 @@ function UploadFieldBase({
|
|
|
5293
5320
|
size = "small",
|
|
5294
5321
|
hasFiles,
|
|
5295
5322
|
cursor = "pointer",
|
|
5323
|
+
"data-testid": dataTestId,
|
|
5296
5324
|
...props
|
|
5297
|
-
}) {
|
|
5325
|
+
}, ref) {
|
|
5298
5326
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5299
5327
|
StyledUploadField,
|
|
5300
5328
|
{
|
|
5301
5329
|
...props,
|
|
5330
|
+
ref,
|
|
5302
5331
|
size,
|
|
5303
5332
|
error,
|
|
5304
5333
|
placeholder,
|
|
5305
5334
|
focused: focused ?? dragOver,
|
|
5306
5335
|
cursor,
|
|
5336
|
+
"data-testid": dataTestId,
|
|
5307
5337
|
InputProps: {
|
|
5308
5338
|
...InputProps,
|
|
5309
5339
|
name,
|
|
@@ -5323,10 +5353,14 @@ function UploadFieldBase({
|
|
|
5323
5353
|
inProgress
|
|
5324
5354
|
}
|
|
5325
5355
|
)
|
|
5326
|
-
}
|
|
5356
|
+
},
|
|
5357
|
+
"data-cursor": cursor,
|
|
5358
|
+
"data-drag-over": dragOver,
|
|
5359
|
+
"data-name": "upload-field-base"
|
|
5327
5360
|
}
|
|
5328
5361
|
);
|
|
5329
5362
|
}
|
|
5363
|
+
const UploadFieldBase = React.forwardRef(_UploadFieldBase);
|
|
5330
5364
|
function useFileUpload({
|
|
5331
5365
|
onChange,
|
|
5332
5366
|
files,
|
|
@@ -5388,6 +5422,7 @@ function useFileUpload({
|
|
|
5388
5422
|
const handleReset = (event) => {
|
|
5389
5423
|
event.stopPropagation();
|
|
5390
5424
|
setFilesText("");
|
|
5425
|
+
onChange == null ? void 0 : onChange([]);
|
|
5391
5426
|
};
|
|
5392
5427
|
const getPlaceholder = React.useMemo(() => {
|
|
5393
5428
|
const defaultPlaceholder = intlConfig.formatMessage(
|
|
@@ -5422,7 +5457,7 @@ function useFileUpload({
|
|
|
5422
5457
|
};
|
|
5423
5458
|
}
|
|
5424
5459
|
const DEFAULT_ACCEPT = ["application/JSON"];
|
|
5425
|
-
function
|
|
5460
|
+
function _UploadField({
|
|
5426
5461
|
name,
|
|
5427
5462
|
buttonText,
|
|
5428
5463
|
accept: _accept,
|
|
@@ -5434,8 +5469,9 @@ function UploadField({
|
|
|
5434
5469
|
error,
|
|
5435
5470
|
focused,
|
|
5436
5471
|
nativeInputProps,
|
|
5472
|
+
"data-testid": dataTestId,
|
|
5437
5473
|
...props
|
|
5438
|
-
}) {
|
|
5474
|
+
}, ref) {
|
|
5439
5475
|
const accept = _accept ?? DEFAULT_ACCEPT;
|
|
5440
5476
|
const uploadInputRef = React.useRef(null);
|
|
5441
5477
|
const {
|
|
@@ -5457,6 +5493,7 @@ function UploadField({
|
|
|
5457
5493
|
UploadFieldBase,
|
|
5458
5494
|
{
|
|
5459
5495
|
...props,
|
|
5496
|
+
ref,
|
|
5460
5497
|
placeholder: getPlaceholder,
|
|
5461
5498
|
value: filesText,
|
|
5462
5499
|
error,
|
|
@@ -5466,7 +5503,8 @@ function UploadField({
|
|
|
5466
5503
|
inProgress,
|
|
5467
5504
|
hasFiles: Boolean(filesText),
|
|
5468
5505
|
InputProps: inputEvents,
|
|
5469
|
-
buttonText
|
|
5506
|
+
buttonText,
|
|
5507
|
+
"data-testid": dataTestId
|
|
5470
5508
|
}
|
|
5471
5509
|
),
|
|
5472
5510
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5485,6 +5523,7 @@ function UploadField({
|
|
|
5485
5523
|
)
|
|
5486
5524
|
] });
|
|
5487
5525
|
}
|
|
5526
|
+
const UploadField = React.forwardRef(_UploadField);
|
|
5488
5527
|
exports.TablePaginationActions = TablePaginationActions.TablePaginationActions;
|
|
5489
5528
|
exports.Typography = TablePaginationActions.Typography;
|
|
5490
5529
|
exports.Alert = Alert$1.Alert;
|
package/dist/components/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
3
|
import { useIntl } from "react-intl";
|
|
4
|
-
import { styled, Box, Button as Button$1, CircularProgress, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment,
|
|
4
|
+
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, Toolbar, AppBar as AppBar$1, 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";
|
|
5
5
|
import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, ContentCopyOutlined, AddCircleOutlineOutlined, MenuOutlined, MoreVertOutlined, HelpOutline, ErrorOutline, CloseOutlined, Check, TodayOutlined } from "@mui/icons-material";
|
|
6
6
|
import { u as useImperativeIntl, T as Typography, c as ICON_SIZE_SMALL, e as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, N as NOTIFICATION_DURATION_IN_MS } from "../TablePaginationActions-C6TVGJM-.js";
|
|
7
7
|
import { a } from "../TablePaginationActions-C6TVGJM-.js";
|
|
8
|
-
import { S as ScreenReaderOnly, I as IconButton
|
|
8
|
+
import { S as ScreenReaderOnly, I as IconButton, A as Alert$1 } from "../Alert-lLA0z7fX.js";
|
|
9
9
|
import { L } from "../Alert-lLA0z7fX.js";
|
|
10
10
|
import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
|
|
11
11
|
import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CGdCEXlF.js";
|
|
@@ -245,32 +245,50 @@ const Icon = styled(Box)(({ theme }) => ({
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
}));
|
|
248
|
-
function
|
|
248
|
+
function _LabelWithIndicator({
|
|
249
249
|
label,
|
|
250
250
|
type,
|
|
251
251
|
icon,
|
|
252
|
-
inheritSize
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
252
|
+
inheritSize,
|
|
253
|
+
"data-testid": dataTestId,
|
|
254
|
+
"aria-label": ariaLabel,
|
|
255
|
+
typographyProps
|
|
256
|
+
}, ref) {
|
|
257
|
+
return /* @__PURE__ */ jsxs(
|
|
258
|
+
Root$5,
|
|
259
|
+
{
|
|
260
|
+
ref,
|
|
261
|
+
"data-testid": dataTestId,
|
|
262
|
+
"aria-label": ariaLabel,
|
|
263
|
+
"data-icon": !!icon,
|
|
264
|
+
"data-name": "label-with-indicator",
|
|
265
|
+
children: [
|
|
266
|
+
label,
|
|
267
|
+
type && /* @__PURE__ */ jsx(
|
|
268
|
+
Indicator,
|
|
269
|
+
{
|
|
270
|
+
component: "span",
|
|
271
|
+
variant: inheritSize ? "inherit" : "caption",
|
|
272
|
+
color: "textSecondary",
|
|
273
|
+
weight: "regular",
|
|
274
|
+
...typographyProps,
|
|
275
|
+
children: type === "required" ? "(required)" : "(optional)"
|
|
276
|
+
}
|
|
277
|
+
),
|
|
278
|
+
icon && /* @__PURE__ */ jsx(Icon, { children: icon })
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
);
|
|
268
282
|
}
|
|
269
|
-
|
|
283
|
+
const LabelWithIndicator = forwardRef(_LabelWithIndicator);
|
|
284
|
+
function _PasswordField({ InputProps, size = "small", disabled, ...otherProps }, ref) {
|
|
270
285
|
const intl = useIntl();
|
|
271
286
|
const intlConfig = useImperativeIntl(intl);
|
|
272
287
|
const [showPassword, setShowPassword] = useState(false);
|
|
273
288
|
const handleClickShowPassword = () => setShowPassword(!showPassword);
|
|
289
|
+
const showPasswordLabel = intlConfig.formatMessage({
|
|
290
|
+
id: `c4r.form.${showPassword ? "hidePassword" : "showPassword"}`
|
|
291
|
+
});
|
|
274
292
|
return /* @__PURE__ */ jsx(
|
|
275
293
|
TextField,
|
|
276
294
|
{
|
|
@@ -278,18 +296,26 @@ function _PasswordField({ InputProps, size = "small", ...otherProps }, ref) {
|
|
|
278
296
|
ref,
|
|
279
297
|
type: showPassword ? "text" : "password",
|
|
280
298
|
size,
|
|
299
|
+
disabled,
|
|
281
300
|
InputProps: {
|
|
282
301
|
...InputProps,
|
|
283
|
-
|
|
284
|
-
|
|
302
|
+
inputProps: {
|
|
303
|
+
...InputProps == null ? void 0 : InputProps.inputProps,
|
|
304
|
+
role: "textbox"
|
|
305
|
+
},
|
|
306
|
+
endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
307
|
+
IconButton,
|
|
285
308
|
{
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
309
|
+
size,
|
|
310
|
+
disabled,
|
|
311
|
+
onClick: handleClickShowPassword,
|
|
312
|
+
icon: showPassword ? /* @__PURE__ */ jsx(VisibilityOffOutlined, {}) : /* @__PURE__ */ jsx(VisibilityOutlined, {}),
|
|
313
|
+
tooltip: showPasswordLabel,
|
|
314
|
+
"aria-label": showPasswordLabel
|
|
290
315
|
}
|
|
291
|
-
) })
|
|
292
|
-
}
|
|
316
|
+
) })
|
|
317
|
+
},
|
|
318
|
+
"data-name": "password-field"
|
|
293
319
|
}
|
|
294
320
|
);
|
|
295
321
|
}
|
|
@@ -654,7 +680,7 @@ function _MultipleSelectField({
|
|
|
654
680
|
onChange: handleChange,
|
|
655
681
|
size,
|
|
656
682
|
variant,
|
|
657
|
-
endAdornment: showFilters && areAnySelected && /* @__PURE__ */ jsx(UnselectButton, { position: "end", size, children: /* @__PURE__ */ jsx(IconButton, { onClick: unselectAll, size, children: /* @__PURE__ */ jsx(Cancel, {}) }) }),
|
|
683
|
+
endAdornment: showFilters && areAnySelected && /* @__PURE__ */ jsx(UnselectButton, { position: "end", size, children: /* @__PURE__ */ jsx(IconButton$1, { onClick: unselectAll, size, children: /* @__PURE__ */ jsx(Cancel, {}) }) }),
|
|
658
684
|
menuProps: {
|
|
659
685
|
PaperProps: {
|
|
660
686
|
sx: {
|
|
@@ -841,7 +867,7 @@ const _CopiableComponent = ({
|
|
|
841
867
|
const [open, setOpen] = useState(false);
|
|
842
868
|
const intl = useIntl();
|
|
843
869
|
const intlConfig = useImperativeIntl(intl);
|
|
844
|
-
const copyTooltipText = copyText || intlConfig.formatMessage({ id: "c4r.button.copy" });
|
|
870
|
+
const copyTooltipText = copyText === null ? null : copyText || intlConfig.formatMessage({ id: "c4r.button.copy" });
|
|
845
871
|
const copySuccessMessage = copiedText || intlConfig.formatMessage({
|
|
846
872
|
id: "c4r.notifications.copiedToClipboard"
|
|
847
873
|
});
|
|
@@ -871,13 +897,13 @@ const _CopiableComponent = ({
|
|
|
871
897
|
children: [
|
|
872
898
|
children,
|
|
873
899
|
button && /* @__PURE__ */ jsx(
|
|
874
|
-
IconButton
|
|
900
|
+
IconButton,
|
|
875
901
|
{
|
|
876
902
|
...buttonProps,
|
|
877
903
|
disabled,
|
|
878
904
|
icon: /* @__PURE__ */ jsx(ContentCopyOutlined, {}),
|
|
879
905
|
"data-testid": dataTestId,
|
|
880
|
-
"aria-label": ariaLabel || buttonLabel || copyTooltipText,
|
|
906
|
+
"aria-label": ariaLabel || buttonLabel || copyTooltipText || intlConfig.formatMessage({ id: "c4r.button.copy" }),
|
|
881
907
|
sx: {
|
|
882
908
|
display: "flex"
|
|
883
909
|
}
|
|
@@ -957,7 +983,7 @@ function _CopiableInputText({
|
|
|
957
983
|
onBlur == null ? void 0 : onBlur(event);
|
|
958
984
|
};
|
|
959
985
|
const passwordAdornment = /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
960
|
-
IconButton
|
|
986
|
+
IconButton,
|
|
961
987
|
{
|
|
962
988
|
edge: variant !== "standard" ? "end" : void 0,
|
|
963
989
|
onClick: () => setShowText(!showText),
|
|
@@ -1729,7 +1755,7 @@ const Menu$1 = styled("div")(({ theme }) => ({
|
|
|
1729
1755
|
height: APPBAR_SIZE,
|
|
1730
1756
|
marginRight: theme.spacing(1.5)
|
|
1731
1757
|
}));
|
|
1732
|
-
const MenuButton = styled(IconButton)(({ theme }) => ({
|
|
1758
|
+
const MenuButton = styled(IconButton$1)(({ theme }) => ({
|
|
1733
1759
|
marginRight: theme.spacing(1),
|
|
1734
1760
|
"&.MuiButtonBase-root svg path": {
|
|
1735
1761
|
fill: theme.palette.brand.appBarContrastText
|
|
@@ -1974,7 +2000,7 @@ function CodeAreaHeader({
|
|
|
1974
2000
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1975
2001
|
/* @__PURE__ */ jsxs(Header, { size, "data-size": size, "data-name": "code-area-header", children: [
|
|
1976
2002
|
/* @__PURE__ */ jsx(
|
|
1977
|
-
IconButton
|
|
2003
|
+
IconButton,
|
|
1978
2004
|
{
|
|
1979
2005
|
color: "default",
|
|
1980
2006
|
size,
|
|
@@ -2038,7 +2064,7 @@ function CodeAreaHeader({
|
|
|
2038
2064
|
}
|
|
2039
2065
|
),
|
|
2040
2066
|
showExpandButton && /* @__PURE__ */ jsx(
|
|
2041
|
-
IconButton
|
|
2067
|
+
IconButton,
|
|
2042
2068
|
{
|
|
2043
2069
|
color: "default",
|
|
2044
2070
|
size,
|
|
@@ -3122,7 +3148,7 @@ function DialogHeader({
|
|
|
3122
3148
|
{
|
|
3123
3149
|
title: intlConfig.formatMessage({ id: "c4r.button.close" }),
|
|
3124
3150
|
placement: "left",
|
|
3125
|
-
children: /* @__PURE__ */ jsx(IconButton, { onClick: onClose, children: closeIcon || /* @__PURE__ */ jsx(CloseIcon, { "data-testid": "CloseIcon" }) })
|
|
3151
|
+
children: /* @__PURE__ */ jsx(IconButton$1, { onClick: onClose, children: closeIcon || /* @__PURE__ */ jsx(CloseIcon, { "data-testid": "CloseIcon" }) })
|
|
3126
3152
|
}
|
|
3127
3153
|
)
|
|
3128
3154
|
] })
|
|
@@ -3754,7 +3780,7 @@ function ClearButton({
|
|
|
3754
3780
|
const intl = useIntl();
|
|
3755
3781
|
const intlConfig = useImperativeIntl(intl);
|
|
3756
3782
|
return /* @__PURE__ */ jsx(Container, { size, variant, children: /* @__PURE__ */ jsx(
|
|
3757
|
-
IconButton,
|
|
3783
|
+
IconButton$1,
|
|
3758
3784
|
{
|
|
3759
3785
|
...props,
|
|
3760
3786
|
size,
|
|
@@ -3871,7 +3897,7 @@ function DatePicker({
|
|
|
3871
3897
|
slots: {
|
|
3872
3898
|
clearButton: (props2) => /* @__PURE__ */ jsx(ClearButton, { ...props2, size, variant }),
|
|
3873
3899
|
openPickerButton: (props2) => /* @__PURE__ */ jsx(
|
|
3874
|
-
IconButton,
|
|
3900
|
+
IconButton$1,
|
|
3875
3901
|
{
|
|
3876
3902
|
...props2,
|
|
3877
3903
|
size,
|
|
@@ -4371,7 +4397,7 @@ function TimePicker({
|
|
|
4371
4397
|
slots: {
|
|
4372
4398
|
clearButton: (props2) => /* @__PURE__ */ jsx(ClearButton, { ...props2, size, variant }),
|
|
4373
4399
|
openPickerButton: (props2) => /* @__PURE__ */ jsx(
|
|
4374
|
-
IconButton,
|
|
4400
|
+
IconButton$1,
|
|
4375
4401
|
{
|
|
4376
4402
|
...props2,
|
|
4377
4403
|
size,
|
|
@@ -4457,7 +4483,7 @@ function DateTimePicker({
|
|
|
4457
4483
|
slots: {
|
|
4458
4484
|
clearButton: (props2) => /* @__PURE__ */ jsx(ClearButton, { ...props2, size, variant }),
|
|
4459
4485
|
openPickerButton: (props2) => /* @__PURE__ */ jsx(
|
|
4460
|
-
IconButton,
|
|
4486
|
+
IconButton$1,
|
|
4461
4487
|
{
|
|
4462
4488
|
...props2,
|
|
4463
4489
|
size,
|
|
@@ -4812,7 +4838,7 @@ function _FilterDropdown({
|
|
|
4812
4838
|
"data-color": buttonColor
|
|
4813
4839
|
};
|
|
4814
4840
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4815
|
-
/* @__PURE__ */ jsx(Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsx(ButtonWrapper, { isOpen, buttonColor, ref, children: isIcon ? /* @__PURE__ */ jsx(IconButton
|
|
4841
|
+
/* @__PURE__ */ jsx(Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsx(ButtonWrapper, { isOpen, buttonColor, ref, children: isIcon ? /* @__PURE__ */ jsx(IconButton, { ...commonButtonProps, icon }) : /* @__PURE__ */ jsx(
|
|
4816
4842
|
Button,
|
|
4817
4843
|
{
|
|
4818
4844
|
...commonButtonProps,
|
|
@@ -5012,7 +5038,7 @@ function Snackbar({
|
|
|
5012
5038
|
}
|
|
5013
5039
|
),
|
|
5014
5040
|
closeable && /* @__PURE__ */ jsx(CloseButtonWrapper, { children: /* @__PURE__ */ jsx(
|
|
5015
|
-
IconButton
|
|
5041
|
+
IconButton,
|
|
5016
5042
|
{
|
|
5017
5043
|
color: "default",
|
|
5018
5044
|
onClick: (e) => onClose(e, "timeout"),
|
|
@@ -5255,7 +5281,7 @@ function FilesAction({
|
|
|
5255
5281
|
handleOpen,
|
|
5256
5282
|
inProgress
|
|
5257
5283
|
}) {
|
|
5258
|
-
return /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: inProgress ? /* @__PURE__ */ jsx(IconButton, { "aria-label": "Loading", disabled: true, size, children: /* @__PURE__ */ jsx(CircularProgress, { size: 18 }) }) : !hasFiles ? /* @__PURE__ */ jsx(
|
|
5284
|
+
return /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: inProgress ? /* @__PURE__ */ jsx(IconButton$1, { "aria-label": "Loading", disabled: true, size, children: /* @__PURE__ */ jsx(CircularProgress, { size: 18 }) }) : !hasFiles ? /* @__PURE__ */ jsx(
|
|
5259
5285
|
Button$1,
|
|
5260
5286
|
{
|
|
5261
5287
|
onClick: handleOpen,
|
|
@@ -5263,10 +5289,11 @@ function FilesAction({
|
|
|
5263
5289
|
variant: "text",
|
|
5264
5290
|
color: error ? "default" : "primary",
|
|
5265
5291
|
disabled,
|
|
5292
|
+
"data-error": error,
|
|
5266
5293
|
children: buttonText
|
|
5267
5294
|
}
|
|
5268
5295
|
) : /* @__PURE__ */ jsx(
|
|
5269
|
-
IconButton,
|
|
5296
|
+
IconButton$1,
|
|
5270
5297
|
{
|
|
5271
5298
|
onClick: handleReset,
|
|
5272
5299
|
size,
|
|
@@ -5276,7 +5303,7 @@ function FilesAction({
|
|
|
5276
5303
|
}
|
|
5277
5304
|
) });
|
|
5278
5305
|
}
|
|
5279
|
-
function
|
|
5306
|
+
function _UploadFieldBase({
|
|
5280
5307
|
name,
|
|
5281
5308
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5282
5309
|
multiple,
|
|
@@ -5293,17 +5320,20 @@ function UploadFieldBase({
|
|
|
5293
5320
|
size = "small",
|
|
5294
5321
|
hasFiles,
|
|
5295
5322
|
cursor = "pointer",
|
|
5323
|
+
"data-testid": dataTestId,
|
|
5296
5324
|
...props
|
|
5297
|
-
}) {
|
|
5325
|
+
}, ref) {
|
|
5298
5326
|
return /* @__PURE__ */ jsx(
|
|
5299
5327
|
StyledUploadField,
|
|
5300
5328
|
{
|
|
5301
5329
|
...props,
|
|
5330
|
+
ref,
|
|
5302
5331
|
size,
|
|
5303
5332
|
error,
|
|
5304
5333
|
placeholder,
|
|
5305
5334
|
focused: focused ?? dragOver,
|
|
5306
5335
|
cursor,
|
|
5336
|
+
"data-testid": dataTestId,
|
|
5307
5337
|
InputProps: {
|
|
5308
5338
|
...InputProps,
|
|
5309
5339
|
name,
|
|
@@ -5323,10 +5353,14 @@ function UploadFieldBase({
|
|
|
5323
5353
|
inProgress
|
|
5324
5354
|
}
|
|
5325
5355
|
)
|
|
5326
|
-
}
|
|
5356
|
+
},
|
|
5357
|
+
"data-cursor": cursor,
|
|
5358
|
+
"data-drag-over": dragOver,
|
|
5359
|
+
"data-name": "upload-field-base"
|
|
5327
5360
|
}
|
|
5328
5361
|
);
|
|
5329
5362
|
}
|
|
5363
|
+
const UploadFieldBase = forwardRef(_UploadFieldBase);
|
|
5330
5364
|
function useFileUpload({
|
|
5331
5365
|
onChange,
|
|
5332
5366
|
files,
|
|
@@ -5388,6 +5422,7 @@ function useFileUpload({
|
|
|
5388
5422
|
const handleReset = (event) => {
|
|
5389
5423
|
event.stopPropagation();
|
|
5390
5424
|
setFilesText("");
|
|
5425
|
+
onChange == null ? void 0 : onChange([]);
|
|
5391
5426
|
};
|
|
5392
5427
|
const getPlaceholder = useMemo(() => {
|
|
5393
5428
|
const defaultPlaceholder = intlConfig.formatMessage(
|
|
@@ -5422,7 +5457,7 @@ function useFileUpload({
|
|
|
5422
5457
|
};
|
|
5423
5458
|
}
|
|
5424
5459
|
const DEFAULT_ACCEPT = ["application/JSON"];
|
|
5425
|
-
function
|
|
5460
|
+
function _UploadField({
|
|
5426
5461
|
name,
|
|
5427
5462
|
buttonText,
|
|
5428
5463
|
accept: _accept,
|
|
@@ -5434,8 +5469,9 @@ function UploadField({
|
|
|
5434
5469
|
error,
|
|
5435
5470
|
focused,
|
|
5436
5471
|
nativeInputProps,
|
|
5472
|
+
"data-testid": dataTestId,
|
|
5437
5473
|
...props
|
|
5438
|
-
}) {
|
|
5474
|
+
}, ref) {
|
|
5439
5475
|
const accept = _accept ?? DEFAULT_ACCEPT;
|
|
5440
5476
|
const uploadInputRef = useRef(null);
|
|
5441
5477
|
const {
|
|
@@ -5457,6 +5493,7 @@ function UploadField({
|
|
|
5457
5493
|
UploadFieldBase,
|
|
5458
5494
|
{
|
|
5459
5495
|
...props,
|
|
5496
|
+
ref,
|
|
5460
5497
|
placeholder: getPlaceholder,
|
|
5461
5498
|
value: filesText,
|
|
5462
5499
|
error,
|
|
@@ -5466,7 +5503,8 @@ function UploadField({
|
|
|
5466
5503
|
inProgress,
|
|
5467
5504
|
hasFiles: Boolean(filesText),
|
|
5468
5505
|
InputProps: inputEvents,
|
|
5469
|
-
buttonText
|
|
5506
|
+
buttonText,
|
|
5507
|
+
"data-testid": dataTestId
|
|
5470
5508
|
}
|
|
5471
5509
|
),
|
|
5472
5510
|
/* @__PURE__ */ jsx(
|
|
@@ -5485,6 +5523,7 @@ function UploadField({
|
|
|
5485
5523
|
)
|
|
5486
5524
|
] });
|
|
5487
5525
|
}
|
|
5526
|
+
const UploadField = forwardRef(_UploadField);
|
|
5488
5527
|
export {
|
|
5489
5528
|
AUTOCOMPLETE_GROUP_HEADER_PROPERTY,
|
|
5490
5529
|
AccordionGroup,
|
|
@@ -5521,7 +5560,7 @@ export {
|
|
|
5521
5560
|
DialogStepper,
|
|
5522
5561
|
FilterDropdown,
|
|
5523
5562
|
FilterDropdownMenuItem,
|
|
5524
|
-
IconButton
|
|
5563
|
+
IconButton,
|
|
5525
5564
|
LabelWithIndicator,
|
|
5526
5565
|
L as Link,
|
|
5527
5566
|
Menu,
|
package/dist/theme/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const material = require("@mui/material");
|
|
5
|
-
const paletteUtils = require("../
|
|
5
|
+
const paletteUtils = require("../palette-utils-B9ybmwiI.cjs");
|
|
6
6
|
const jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
const TablePaginationActions = require("../TablePaginationActions-DAMGtIub.cjs");
|
|
8
8
|
const iconsMaterial = require("@mui/icons-material");
|
package/dist/theme/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2
2
|
import { alpha, Tooltip, responsiveFontSizes, createTheme } from "@mui/material";
|
|
3
|
-
import { c as commonPalette } from "../
|
|
4
|
-
import { g } from "../
|
|
3
|
+
import { c as commonPalette } from "../palette-utils-BHqJlHm9.js";
|
|
4
|
+
import { g } from "../palette-utils-BHqJlHm9.js";
|
|
5
5
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
6
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, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, e as MENU_ITEM_SIZE_DENSE, A as APPBAR_SIZE, B as BREAKPOINTS, S as SPACING } from "../TablePaginationActions-C6TVGJM-.js";
|
|
7
7
|
import { f, N } from "../TablePaginationActions-C6TVGJM-.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutocomplete.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/Autocomplete/Autocomplete/useAutocomplete.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCodeAreaAutocompletion.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/CodeArea/utils/useCodeAreaAutocompletion.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopiableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/CopiableComponent/CopiableComponent.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"CopiableComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/CopiableComponent/CopiableComponent.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAiGhD,QAAA,MAAM,iBAAiB,mHAAiC,CAAA;AACxD,eAAe,iBAAiB,CAAA"}
|
|
@@ -7,4 +7,5 @@ export declare const Playground: Story;
|
|
|
7
7
|
export declare const TypeButton: Story;
|
|
8
8
|
export declare const TypeText: Story;
|
|
9
9
|
export declare const CustomTooltipTexts: Story;
|
|
10
|
+
export declare const WithoutTooltipText: Story;
|
|
10
11
|
//# sourceMappingURL=CopiableComponent.stories.d.ts.map
|