@stackshift-ui/grid-item 6.0.11-beta.2 → 6.1.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DefaultComponent as l,useStackShiftUIComponents as r}from"@stackshift-ui/system";import m from"classnames";import{jsx as d}from"react/jsx-runtime";var
|
|
1
|
+
import{DefaultComponent as l,useStackShiftUIComponents as r}from"@stackshift-ui/system";import m from"classnames";import{jsx as d}from"react/jsx-runtime";var s="GridItem",i=({span:a="auto",children:n,className:o,as:p,...t})=>{let{[s]:e=l}=r(),c=`${{auto:"col-span-auto",1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"}[a]}`;return d(e,{as:p,className:m(c,o),...t,children:n})};i.displayName=s;export{i as a};
|
package/dist/grid-item.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=Object.create;var
|
|
1
|
+
"use strict";var f=Object.create;var t=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var T=(s,a)=>{for(var n in a)t(s,n,{get:a[n],enumerable:!0})},c=(s,a,n,p)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of y(a))!I.call(s,o)&&o!==n&&t(s,o,{get:()=>a[o],enumerable:!(p=u(a,o))||p.enumerable});return s};var G=(s,a,n)=>(n=s!=null?f(N(s)):{},c(a||!s||!s.__esModule?t(n,"default",{value:s,enumerable:!0}):n,s)),P=s=>c(t({},"__esModule",{value:!0}),s);var S={};T(S,{GridItem:()=>m});module.exports=P(S);var e=require("@stackshift-ui/system"),l=G(require("classnames")),i=require("react/jsx-runtime"),r="GridItem",m=({span:s="auto",children:a,className:n,as:p,...o})=>{let{[r]:d=e.DefaultComponent}=(0,e.useStackShiftUIComponents)(),C=`${{auto:"col-span-auto",1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"}[s]}`;return(0,i.jsx)(d,{as:p,className:(0,l.default)(C,n),...o,children:a})};m.displayName=r;0&&(module.exports={GridItem});
|
package/dist/grid-item.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-WFQY4D33.mjs";export{a as GridItem};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var u=Object.create;var
|
|
2
|
+
"use strict";var u=Object.create;var p=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var T=(s,a)=>{for(var o in a)p(s,o,{get:a[o],enumerable:!0})},c=(s,a,o,t)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of y(a))!I.call(s,n)&&n!==o&&p(s,n,{get:()=>a[n],enumerable:!(t=C(a,n))||t.enumerable});return s};var G=(s,a,o)=>(o=s!=null?u(N(s)):{},c(a||!s||!s.__esModule?p(o,"default",{value:s,enumerable:!0}):o,s)),P=s=>c(p({},"__esModule",{value:!0}),s);var S={};T(S,{GridItem:()=>m});module.exports=P(S);var e=require("@stackshift-ui/system"),l=G(require("classnames")),i=require("react/jsx-runtime"),r="GridItem",m=({span:s="auto",children:a,className:o,as:t,...n})=>{let{[r]:d=e.DefaultComponent}=(0,e.useStackShiftUIComponents)(),f=`${{auto:"col-span-auto",1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"}[s]}`;return(0,i.jsx)(d,{as:t,className:(0,l.default)(f,o),...n,children:a})};m.displayName=r;0&&(module.exports={GridItem});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e}from"./chunk-WFQY4D33.mjs";export{e as GridItem};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/grid-item",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0
|
|
4
|
+
"version": "6.1.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/
|
|
33
|
-
"@stackshift-ui/
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.10",
|
|
33
|
+
"@stackshift-ui/eslint-config": "6.0.10"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/scripts": "6.0
|
|
38
|
-
"@stackshift-ui/system": "6.0
|
|
37
|
+
"@stackshift-ui/scripts": "6.1.0",
|
|
38
|
+
"@stackshift-ui/system": "6.1.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@stackshift-ui/system": ">=
|
|
41
|
+
"@stackshift-ui/system": ">=7.0.0",
|
|
42
42
|
"@types/react": "16.8 - 19",
|
|
43
43
|
"next": "10 - 14",
|
|
44
44
|
"react": "16.8 - 19",
|
package/src/grid-item.test.tsx
CHANGED
|
@@ -7,7 +7,7 @@ describe.concurrent("grid-item", () => {
|
|
|
7
7
|
|
|
8
8
|
test("Layout: Grid Item - test if renders without errors", ({ expect }) => {
|
|
9
9
|
const clx = "griditem-class";
|
|
10
|
-
render(<GridItem className={clx} />);
|
|
10
|
+
render(<GridItem data-testid="div" className={clx} />);
|
|
11
11
|
expect(screen.getByTestId("div").classList).toContain(clx);
|
|
12
12
|
});
|
|
13
13
|
});
|
package/src/grid-item.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
2
|
-
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
3
2
|
import cn from "classnames";
|
|
3
|
+
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
export interface GridItemProps extends Omit<HTMLProps<HTMLElement>, "as" | "span"> {
|
|
6
6
|
span?: Span;
|
|
@@ -41,7 +41,7 @@ export const GridItem: React.FC<GridItemProps> = ({
|
|
|
41
41
|
const classes = `${spanClass}`;
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
|
-
<Component as={as} className={cn(classes, className)} {...props}
|
|
44
|
+
<Component as={as} className={cn(classes, className)} {...props}>
|
|
45
45
|
{children}
|
|
46
46
|
</Component>
|
|
47
47
|
);
|