@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 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.useViewportSize();
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, useViewportSize, Icon, Spinner } from '@trackunit/react-components';
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 } = useViewportSize();
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]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-compound-components",
3
- "version": "0.0.286",
3
+ "version": "0.0.289",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {