@toptal/picasso-image 3.0.4-alpha-1757603192867.0 → 3.0.4-alpha-FF-49-enhance-publishing-6b5d306f0.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.
@@ -0,0 +1,17 @@
1
+ import type { ImgHTMLAttributes } from 'react';
2
+ import React from 'react';
3
+ import type { BaseProps } from '@toptal/picasso-shared';
4
+ declare type VariantType = 'rectangle' | 'circular';
5
+ export interface Props extends BaseProps, ImgHTMLAttributes<HTMLImageElement> {
6
+ /** Image alt text */
7
+ alt: string;
8
+ /** Image url */
9
+ src: string;
10
+ /** A set of image sources */
11
+ srcSet?: string;
12
+ /** Image shape type */
13
+ variant?: VariantType;
14
+ }
15
+ export declare const Image: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLImageElement>>;
16
+ export default Image;
17
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAGvD,aAAK,WAAW,GAAG,WAAW,GAAG,UAAU,CAAA;AAE3C,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,iBAAiB,CAAC,gBAAgB,CAAC;IAC3E,qBAAqB;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,gBAAgB;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uBAAuB;IACvB,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB;AAED,eAAO,MAAM,KAAK,gFA6BhB,CAAA;AAQF,eAAe,KAAK,CAAA"}
@@ -0,0 +1,23 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React, { forwardRef } from 'react';
13
+ import { twMerge } from '@toptal/picasso-tailwind-merge';
14
+ export const Image = forwardRef(function Image(props, ref) {
15
+ const { src, srcSet, alt, className, variant = 'rectangle', style } = props, rest = __rest(props, ["src", "srcSet", "alt", "className", "variant", "style"]);
16
+ return (React.createElement("img", Object.assign({}, rest, { ref: ref, src: src, srcSet: srcSet, alt: alt, className: twMerge(variant === 'circular' && 'rounded-full', 'block', className), style: style })));
17
+ });
18
+ Image.defaultProps = {
19
+ variant: 'rectangle',
20
+ };
21
+ Image.displayName = 'Image';
22
+ export default Image;
23
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../src/Image/Image.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAexD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAA0B,SAAS,KAAK,CACrE,KAAK,EACL,GAAG;IAEH,MAAM,EACJ,GAAG,EACH,MAAM,EACN,GAAG,EACH,SAAS,EACT,OAAO,GAAG,WAAW,EACrB,KAAK,KAEH,KAAK,EADJ,IAAI,UACL,KAAK,EARH,yDAQL,CAAQ,CAAA;IAET,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAChB,OAAO,KAAK,UAAU,IAAI,cAAc,EACxC,OAAO,EACP,SAAS,CACV,EACD,KAAK,EAAE,KAAK,IACZ,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,KAAK,CAAC,YAAY,GAAG;IACnB,OAAO,EAAE,WAAW;CACrB,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,eAAe,KAAK,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { OmitInternalProps } from '@toptal/picasso-shared';
2
+ import type { Props } from './Image';
3
+ export { default as Image } from './Image';
4
+ export declare type ImageProps = OmitInternalProps<Props>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Image/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,oBAAY,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default as Image } from './Image';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Image/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Image';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Image';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-image",
3
- "version": "3.0.4-alpha-1757603192867.0",
3
+ "version": "3.0.4-alpha-FF-49-enhance-publishing-6b5d306f0.0",
4
4
  "description": "Toptal UI components library - Image",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
25
25
  "dependencies": {
26
- "@toptal/picasso-utils": "3.1.1-alpha-1757603192867.0",
26
+ "@toptal/picasso-utils": "3.1.1-alpha-FF-49-enhance-publishing-6b5d306f0.0",
27
27
  "classnames": "^2.5.1"
28
28
  },
29
29
  "devDependencies": {
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "sideEffects": false,
33
33
  "peerDependencies": {
34
- "@toptal/picasso-tailwind-merge": "^2.0.4-alpha-1757603192867.0",
35
- "@toptal/picasso-tailwind": "3.0.1-alpha-1757603192867.0",
34
+ "@toptal/picasso-tailwind-merge": "^2.0.4-alpha-FF-49-enhance-publishing-6b5d306f0.0",
35
+ "@toptal/picasso-tailwind": "3.0.1-alpha-FF-49-enhance-publishing-6b5d306f0.0",
36
36
  "react": ">=16.12.0 < 19.0.0"
37
37
  },
38
38
  "exports": {