@0xsquid/ui 2.5.1-beta.0 → 2.6.0

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/dist/cjs/index.js CHANGED
@@ -3016,6 +3016,19 @@ const backgrounds = {
3016
3016
  rgba(180, 143, 233, 1) 100%
3017
3017
  )`,
3018
3018
  };
3019
+ // Format animation durations object to Tailwind config
3020
+ // This way Tailwind can generate utility classes for each duration
3021
+ // i.e tw-duration-hide-modal, tw-duration-show-route, etc...
3022
+ //
3023
+ // {
3024
+ // HIDE_MODAL: 400
3025
+ // SHOW_ROUTE: 300
3026
+ // }
3027
+ // ->
3028
+ // {
3029
+ // hide-modal: "400"
3030
+ // show-route: "300"
3031
+ // }
3019
3032
  const transitionDuration = Object.entries(ANIMATION_DURATIONS).reduce((finalObj, [key, value]) => {
3020
3033
  finalObj[key.toLowerCase().replaceAll("_", "-")] = String(value);
3021
3034
  return finalObj;
@@ -4364,21 +4377,19 @@ const extraPaddingMap = {
4364
4377
  "outline-lg": "3px",
4365
4378
  };
4366
4379
  function ImageStack(_a) {
4367
- var { imageUrls, spacing, stackOnTop = true, addExtraPadding, removeDuplicates = false } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding", "removeDuplicates"]);
4380
+ var { imageUrls, spacing, stackOnTop = true, addExtraPadding, removeDuplicates = false, containerProps } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding", "removeDuplicates", "containerProps"]);
4368
4381
  const imagesToRender = removeDuplicates ? [...new Set(imageUrls)] : imageUrls;
4369
- return (jsxRuntime.jsx("div", { style: {
4382
+ return (jsxRuntime.jsx("div", Object.assign({}, containerProps, { style: Object.assign(Object.assign({}, containerProps === null || containerProps === void 0 ? void 0 : containerProps.style), {
4370
4383
  // @ts-expect-error Custom CSS property
4371
- "--image-stack-spacing": spacing,
4372
- padding: addExtraPadding && imageProps.border
4384
+ "--image-stack-spacing": spacing, padding: addExtraPadding && imageProps.border
4373
4385
  ? extraPaddingMap[imageProps.border]
4374
- : undefined,
4375
- }, className: "tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", children: imagesToRender.map((url, index, self) => (jsxRuntime.jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
4386
+ : undefined }), className: cn("tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", containerProps === null || containerProps === void 0 ? void 0 : containerProps.className), children: imagesToRender.map((url, index, self) => (jsxRuntime.jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
4376
4387
  ? {
4377
4388
  style: {
4378
4389
  zIndex: self.length - index,
4379
4390
  },
4380
4391
  }
4381
- : undefined }, imageProps), index))) }));
4392
+ : undefined }, imageProps), index))) })));
4382
4393
  }
4383
4394
 
4384
4395
  function Chip(_a) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { type ImageProps } from "../badges";
2
3
  interface ImageStackProps extends ImageProps {
3
4
  imageUrls: string[];
@@ -8,6 +9,7 @@ interface ImageStackProps extends ImageProps {
8
9
  stackOnTop?: boolean;
9
10
  addExtraPadding?: boolean;
10
11
  removeDuplicates?: boolean;
12
+ containerProps?: React.HTMLAttributes<HTMLDivElement>;
11
13
  }
12
- export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, ...imageProps }: ImageStackProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, containerProps, ...imageProps }: ImageStackProps): import("react/jsx-runtime").JSX.Element;
13
15
  export {};
package/dist/esm/index.js CHANGED
@@ -2996,6 +2996,19 @@ const backgrounds = {
2996
2996
  rgba(180, 143, 233, 1) 100%
2997
2997
  )`,
2998
2998
  };
2999
+ // Format animation durations object to Tailwind config
3000
+ // This way Tailwind can generate utility classes for each duration
3001
+ // i.e tw-duration-hide-modal, tw-duration-show-route, etc...
3002
+ //
3003
+ // {
3004
+ // HIDE_MODAL: 400
3005
+ // SHOW_ROUTE: 300
3006
+ // }
3007
+ // ->
3008
+ // {
3009
+ // hide-modal: "400"
3010
+ // show-route: "300"
3011
+ // }
2999
3012
  const transitionDuration = Object.entries(ANIMATION_DURATIONS).reduce((finalObj, [key, value]) => {
3000
3013
  finalObj[key.toLowerCase().replaceAll("_", "-")] = String(value);
3001
3014
  return finalObj;
@@ -4344,21 +4357,19 @@ const extraPaddingMap = {
4344
4357
  "outline-lg": "3px",
4345
4358
  };
4346
4359
  function ImageStack(_a) {
4347
- var { imageUrls, spacing, stackOnTop = true, addExtraPadding, removeDuplicates = false } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding", "removeDuplicates"]);
4360
+ var { imageUrls, spacing, stackOnTop = true, addExtraPadding, removeDuplicates = false, containerProps } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding", "removeDuplicates", "containerProps"]);
4348
4361
  const imagesToRender = removeDuplicates ? [...new Set(imageUrls)] : imageUrls;
4349
- return (jsx("div", { style: {
4362
+ return (jsx("div", Object.assign({}, containerProps, { style: Object.assign(Object.assign({}, containerProps === null || containerProps === void 0 ? void 0 : containerProps.style), {
4350
4363
  // @ts-expect-error Custom CSS property
4351
- "--image-stack-spacing": spacing,
4352
- padding: addExtraPadding && imageProps.border
4364
+ "--image-stack-spacing": spacing, padding: addExtraPadding && imageProps.border
4353
4365
  ? extraPaddingMap[imageProps.border]
4354
- : undefined,
4355
- }, className: "tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", children: imagesToRender.map((url, index, self) => (jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
4366
+ : undefined }), className: cn("tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", containerProps === null || containerProps === void 0 ? void 0 : containerProps.className), children: imagesToRender.map((url, index, self) => (jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
4356
4367
  ? {
4357
4368
  style: {
4358
4369
  zIndex: self.length - index,
4359
4370
  },
4360
4371
  }
4361
- : undefined }, imageProps), index))) }));
4372
+ : undefined }, imageProps), index))) })));
4362
4373
  }
4363
4374
 
4364
4375
  function Chip(_a) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { type ImageProps } from "../badges";
2
3
  interface ImageStackProps extends ImageProps {
3
4
  imageUrls: string[];
@@ -8,6 +9,7 @@ interface ImageStackProps extends ImageProps {
8
9
  stackOnTop?: boolean;
9
10
  addExtraPadding?: boolean;
10
11
  removeDuplicates?: boolean;
12
+ containerProps?: React.HTMLAttributes<HTMLDivElement>;
11
13
  }
12
- export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, ...imageProps }: ImageStackProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, containerProps, ...imageProps }: ImageStackProps): import("react/jsx-runtime").JSX.Element;
13
15
  export {};
package/dist/index.d.ts CHANGED
@@ -1574,8 +1574,9 @@ interface ImageStackProps extends ImageProps {
1574
1574
  stackOnTop?: boolean;
1575
1575
  addExtraPadding?: boolean;
1576
1576
  removeDuplicates?: boolean;
1577
+ containerProps?: React.HTMLAttributes<HTMLDivElement>;
1577
1578
  }
1578
- declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, ...imageProps }: ImageStackProps): react_jsx_runtime.JSX.Element;
1579
+ declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, containerProps, ...imageProps }: ImageStackProps): react_jsx_runtime.JSX.Element;
1579
1580
 
1580
1581
  interface InfoBoxProps {
1581
1582
  title: string;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/0xsquid/squid-ui.git"
6
6
  },
7
7
  "description": "Squid's UI components",
8
- "version": "2.5.1-beta.0",
8
+ "version": "2.6.0",
9
9
  "author": "",
10
10
  "license": "MIT",
11
11
  "resolutions": {