@trackunit/react-compound-components 0.0.277 → 0.0.278

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
@@ -9,8 +9,8 @@ var reactModal = require('@trackunit/react-modal');
9
9
  var cssClassVarianceUtilities = require('@trackunit/css-class-variance-utilities');
10
10
  var ImageGallery = require('react-image-gallery');
11
11
  var tailwindMerge = require('tailwind-merge');
12
- var reactFormComponents = require('@trackunit/react-form-components');
13
12
  var dateAndTimeUtils = require('@trackunit/date-and-time-utils');
13
+ var reactFormComponents = require('@trackunit/react-form-components');
14
14
 
15
15
  function _interopNamespaceDefault(e) {
16
16
  var n = Object.create(null);
@@ -179,7 +179,7 @@ const cvaGallery = cssClassVarianceUtilities.cvaMerge([
179
179
  // This centers thumbnails and makes the clickable area independent of image size
180
180
  "[&_.image-gallery-thumbnail]:h-[100px]",
181
181
  ]);
182
- const titleStyle = "absolute top-3 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-white bg-black/50 text-sm px-1 rounded-md backdrop-blur-sm";
182
+ const titleStyle = "absolute top-3 left-1/2 transform -translate-x-1/2 text-white bg-black/50 text-sm px-1 rounded-md backdrop-blur-sm text-wrap";
183
183
  /**
184
184
  * Show and manage images
185
185
  *
@@ -202,7 +202,7 @@ const ImageCollection = (props) => {
202
202
  thumbnail: createThumbnailUrl(image.id),
203
203
  srcSet: createSrcSet(image.id),
204
204
  name: image.name,
205
- timestamp: dateAndTimeUtils.formatDateUtil(new Date(image.timestamp), { dateFormat: "medium", timeFormat: "medium" })
205
+ timestamp: dateAndTimeUtils.formatDateUtil(new Date(image.timestamp), { dateFormat: "medium", timeFormat: "medium" }),
206
206
  })), [imagesData]);
207
207
  React.useEffect(() => {
208
208
  var _a;
@@ -248,7 +248,7 @@ const ImageCollection = (props) => {
248
248
  // @ts-ignore
249
249
  name,
250
250
  // @ts-ignore
251
- timestamp, }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("img", { alt: "full", className: tailwindMerge.twMerge(additionalItemClassName, "w-[100%]", "object-contain"), "data-testid": `image-${id}`, loading: "lazy", sizes: "(max-width: 480px) 480px, 800px", src: original, srcSet: srcSet }), jsxRuntime.jsx("div", { className: titleStyle, "data-testid": `image-title-${id}`, onClick: (e) => e.stopPropagation(), children: `${name} - ${timestamp}` })] })), renderThumbInner: ({ thumbnail,
251
+ timestamp, }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("img", { alt: "full", className: tailwindMerge.twMerge(additionalItemClassName, "w-[100%]", "object-contain"), "data-testid": `image-${id}`, loading: "lazy", sizes: "(max-width: 480px) 480px, 800px", src: original, srcSet: srcSet }), jsxRuntime.jsx("div", { className: titleStyle, "data-testid": `image-title-${id}`, onClick: e => e.stopPropagation(), children: `${name} - ${timestamp}` })] })), renderThumbInner: ({ thumbnail,
252
252
  // Typing of the library is not flexible enough to add id, which is only used for the unit tests
253
253
  // @ts-ignore
254
254
  id, }) => jsxRuntime.jsx("img", { alt: "thumbnail", "data-testid": `thumbnail-${id}`, loading: "lazy", src: thumbnail }), showFullscreenButton: false, showPlayButton: false, showThumbnails: isLg,
package/index.esm.js CHANGED
@@ -8,8 +8,8 @@ import { Modal } from '@trackunit/react-modal';
8
8
  import { cvaMerge } from '@trackunit/css-class-variance-utilities';
9
9
  import ImageGallery from 'react-image-gallery';
10
10
  import { twMerge } from 'tailwind-merge';
11
- import { DropZone } from '@trackunit/react-form-components';
12
11
  import { formatDateUtil } from '@trackunit/date-and-time-utils';
12
+ import { DropZone } from '@trackunit/react-form-components';
13
13
 
14
14
  var defaultTranslations = {
15
15
  "confirmationDialog.default.message": "Are you certain that you wish to proceed with this course of action?",
@@ -159,7 +159,7 @@ const cvaGallery = cvaMerge([
159
159
  // This centers thumbnails and makes the clickable area independent of image size
160
160
  "[&_.image-gallery-thumbnail]:h-[100px]",
161
161
  ]);
162
- const titleStyle = "absolute top-3 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-white bg-black/50 text-sm px-1 rounded-md backdrop-blur-sm";
162
+ const titleStyle = "absolute top-3 left-1/2 transform -translate-x-1/2 text-white bg-black/50 text-sm px-1 rounded-md backdrop-blur-sm text-wrap";
163
163
  /**
164
164
  * Show and manage images
165
165
  *
@@ -182,7 +182,7 @@ const ImageCollection = (props) => {
182
182
  thumbnail: createThumbnailUrl(image.id),
183
183
  srcSet: createSrcSet(image.id),
184
184
  name: image.name,
185
- timestamp: formatDateUtil(new Date(image.timestamp), { dateFormat: "medium", timeFormat: "medium" })
185
+ timestamp: formatDateUtil(new Date(image.timestamp), { dateFormat: "medium", timeFormat: "medium" }),
186
186
  })), [imagesData]);
187
187
  useEffect(() => {
188
188
  var _a;
@@ -228,7 +228,7 @@ const ImageCollection = (props) => {
228
228
  // @ts-ignore
229
229
  name,
230
230
  // @ts-ignore
231
- timestamp, }) => (jsxs(Fragment, { children: [jsx("img", { alt: "full", className: twMerge(additionalItemClassName, "w-[100%]", "object-contain"), "data-testid": `image-${id}`, loading: "lazy", sizes: "(max-width: 480px) 480px, 800px", src: original, srcSet: srcSet }), jsx("div", { className: titleStyle, "data-testid": `image-title-${id}`, onClick: (e) => e.stopPropagation(), children: `${name} - ${timestamp}` })] })), renderThumbInner: ({ thumbnail,
231
+ timestamp, }) => (jsxs(Fragment, { children: [jsx("img", { alt: "full", className: twMerge(additionalItemClassName, "w-[100%]", "object-contain"), "data-testid": `image-${id}`, loading: "lazy", sizes: "(max-width: 480px) 480px, 800px", src: original, srcSet: srcSet }), jsx("div", { className: titleStyle, "data-testid": `image-title-${id}`, onClick: e => e.stopPropagation(), children: `${name} - ${timestamp}` })] })), renderThumbInner: ({ thumbnail,
232
232
  // Typing of the library is not flexible enough to add id, which is only used for the unit tests
233
233
  // @ts-ignore
234
234
  id, }) => jsx("img", { alt: "thumbnail", "data-testid": `thumbnail-${id}`, loading: "lazy", src: thumbnail }), showFullscreenButton: false, showPlayButton: false, showThumbnails: isLg,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-compound-components",
3
- "version": "0.0.277",
3
+ "version": "0.0.278",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {