@trackunit/react-compound-components 0.0.286 → 0.0.289
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/index.cjs.js +1 -1
- package/index.esm.js +2 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -192,7 +192,7 @@ const ImageCollection = (props) => {
|
|
|
192
192
|
const { imagesData, actions, emptyPlaceholderActionLabel, additionalItemClassName, uploading } = props;
|
|
193
193
|
const [openImageId, setOpenImageId] = React.useState((_a = imagesData[0]) === null || _a === void 0 ? void 0 : _a.id);
|
|
194
194
|
const [isDeleting, setIsDeleting] = React.useState(false);
|
|
195
|
-
const { isLg } = reactComponents.
|
|
195
|
+
const { isLg } = reactComponents.useViewportBreakpoints();
|
|
196
196
|
const fileInputRef = React.useRef(null);
|
|
197
197
|
const imageGalleryRef = React.useRef(null);
|
|
198
198
|
const uploadButton = React.useMemo(() => (actions === null || actions === void 0 ? void 0 : actions.upload) ? (jsxRuntime.jsx("div", { className: "flex justify-end", children: jsxRuntime.jsx(reactComponents.Button, { loading: uploading, onClick: () => { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, children: actions.upload.label }) })) : null, [actions === null || actions === void 0 ? void 0 : actions.upload, uploading]);
|
package/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { registerTranslations, useNamespaceTranslation } from '@trackunit/i18n-l
|
|
|
3
3
|
import { ConfirmationDialogProvider } from '@trackunit/react-core-hooks';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
6
|
-
import { Card, CardHeader, CardBody, CardFooter, Button,
|
|
6
|
+
import { Card, CardHeader, CardBody, CardFooter, Button, useViewportBreakpoints, Icon, Spinner } from '@trackunit/react-components';
|
|
7
7
|
import { Modal } from '@trackunit/react-modal';
|
|
8
8
|
import { cvaMerge } from '@trackunit/css-class-variance-utilities';
|
|
9
9
|
import ImageGallery from 'react-image-gallery';
|
|
@@ -172,7 +172,7 @@ const ImageCollection = (props) => {
|
|
|
172
172
|
const { imagesData, actions, emptyPlaceholderActionLabel, additionalItemClassName, uploading } = props;
|
|
173
173
|
const [openImageId, setOpenImageId] = useState((_a = imagesData[0]) === null || _a === void 0 ? void 0 : _a.id);
|
|
174
174
|
const [isDeleting, setIsDeleting] = useState(false);
|
|
175
|
-
const { isLg } =
|
|
175
|
+
const { isLg } = useViewportBreakpoints();
|
|
176
176
|
const fileInputRef = useRef(null);
|
|
177
177
|
const imageGalleryRef = useRef(null);
|
|
178
178
|
const uploadButton = useMemo(() => (actions === null || actions === void 0 ? void 0 : actions.upload) ? (jsx("div", { className: "flex justify-end", children: jsx(Button, { loading: uploading, onClick: () => { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, children: actions.upload.label }) })) : null, [actions === null || actions === void 0 ? void 0 : actions.upload, uploading]);
|