@a-type/ui 6.0.43 → 6.0.44

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,7 @@
1
+ import { ComponentProps } from 'react';
2
+ export interface ImgProps extends ComponentProps<'img'> {
3
+ full?: 'width' | 'height' | boolean;
4
+ fit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
5
+ position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
6
+ }
7
+ export declare function Img({ full, fit, position, ...props }: ImgProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
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 { jsx as _jsx } from "react/jsx-runtime";
13
+ export function Img(_a) {
14
+ var { full, fit, position } = _a, props = __rest(_a, ["full", "fit", "position"]);
15
+ return (_jsx("img", Object.assign({ "data-full": full, "data-fit": fit, "data-position": position }, props)));
16
+ }
17
+ //# sourceMappingURL=Img.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Img.js","sourceRoot":"","sources":["../../../src/components/img/Img.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAQA,MAAM,UAAU,GAAG,CAAC,EAA2C;QAA3C,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,OAAsB,EAAjB,KAAK,cAA/B,2BAAiC,CAAF;IAClD,OAAO,CACN,yCAAgB,IAAI,cAAY,GAAG,mBAAiB,QAAQ,IAAM,KAAK,EAAI,CAC3E,CAAC;AACH,CAAC"}
@@ -0,0 +1,42 @@
1
+ .root {
2
+ &[data-full='width'],
3
+ &[data-full='true'] {
4
+ width: 100%;
5
+ }
6
+ &[data-full='height'],
7
+ &[data-full='true'] {
8
+ height: 100%;
9
+ }
10
+
11
+ &[data-fit='cover'] {
12
+ object-fit: cover;
13
+ }
14
+ &[data-fit='contain'] {
15
+ object-fit: contain;
16
+ }
17
+ &[data-fit='fill'] {
18
+ object-fit: fill;
19
+ }
20
+ &[data-fit='none'] {
21
+ object-fit: none;
22
+ }
23
+ &[data-fit='scale-down'] {
24
+ object-fit: scale-down;
25
+ }
26
+
27
+ &[data-position='top'] {
28
+ object-position: top;
29
+ }
30
+ &[data-position='bottom'] {
31
+ object-position: bottom;
32
+ }
33
+ &[data-position='left'] {
34
+ object-position: left;
35
+ }
36
+ &[data-position='right'] {
37
+ object-position: right;
38
+ }
39
+ &[data-position='center'] {
40
+ object-position: center;
41
+ }
42
+ }
@@ -23,6 +23,7 @@ export * from './forms/index.js';
23
23
  export * from './horizontalList/HorizontalList.js';
24
24
  export * from './icon/index.js';
25
25
  export * from './imageUploader/index.js';
26
+ export * from './img/Img.js';
26
27
  export * from './infiniteLoadTrigger/InfiniteLoadTrigger.js';
27
28
  export * from './input/index.js';
28
29
  export * from './layouts/index.js';
@@ -23,6 +23,7 @@ export * from './forms/index.js';
23
23
  export * from './horizontalList/HorizontalList.js';
24
24
  export * from './icon/index.js';
25
25
  export * from './imageUploader/index.js';
26
+ export * from './img/Img.js';
26
27
  export * from './infiniteLoadTrigger/InfiniteLoadTrigger.js';
27
28
  export * from './input/index.js';
28
29
  export * from './layouts/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AA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C;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a-type/ui",
3
- "version": "6.0.43",
3
+ "version": "6.0.44",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "url": "https://github.com/a-type/ui"
@@ -0,0 +1,42 @@
1
+ .root {
2
+ &[data-full='width'],
3
+ &[data-full='true'] {
4
+ width: 100%;
5
+ }
6
+ &[data-full='height'],
7
+ &[data-full='true'] {
8
+ height: 100%;
9
+ }
10
+
11
+ &[data-fit='cover'] {
12
+ object-fit: cover;
13
+ }
14
+ &[data-fit='contain'] {
15
+ object-fit: contain;
16
+ }
17
+ &[data-fit='fill'] {
18
+ object-fit: fill;
19
+ }
20
+ &[data-fit='none'] {
21
+ object-fit: none;
22
+ }
23
+ &[data-fit='scale-down'] {
24
+ object-fit: scale-down;
25
+ }
26
+
27
+ &[data-position='top'] {
28
+ object-position: top;
29
+ }
30
+ &[data-position='bottom'] {
31
+ object-position: bottom;
32
+ }
33
+ &[data-position='left'] {
34
+ object-position: left;
35
+ }
36
+ &[data-position='right'] {
37
+ object-position: right;
38
+ }
39
+ &[data-position='center'] {
40
+ object-position: center;
41
+ }
42
+ }
@@ -0,0 +1,13 @@
1
+ import { ComponentProps } from 'react';
2
+
3
+ export interface ImgProps extends ComponentProps<'img'> {
4
+ full?: 'width' | 'height' | boolean;
5
+ fit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
6
+ position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
7
+ }
8
+
9
+ export function Img({ full, fit, position, ...props }: ImgProps) {
10
+ return (
11
+ <img data-full={full} data-fit={fit} data-position={position} {...props} />
12
+ );
13
+ }
@@ -23,6 +23,7 @@ export * from './forms/index.js';
23
23
  export * from './horizontalList/HorizontalList.js';
24
24
  export * from './icon/index.js';
25
25
  export * from './imageUploader/index.js';
26
+ export * from './img/Img.js';
26
27
  export * from './infiniteLoadTrigger/InfiniteLoadTrigger.js';
27
28
  export * from './input/index.js';
28
29
  export * from './layouts/index.js';