@stackshift-ui/grid 7.0.0-beta.5 → 7.0.0-beta.7

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 @@
1
+ import{DefaultComponent as j,useStackShiftUIComponents as C}from"@stackshift-ui/system";import h from"classnames";import{jsx as N}from"react/jsx-runtime";var e="Grid",b=({columns:s=1,gap:t=0,align:n="stretch",justify:i="start",children:r,className:o,as:c,...l})=>{let{[e]:a=j}=C(),m={none:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-1",12:"grid-cols-12"},d={start:"items-start",end:"items-end",baseline:"items-baseline",stretch:"items-stretch",center:"items-center"},u={normal:"justify-items-normal",start:"justify-items-start",end:"justify-items-end",center:"justify-items-center",between:" justify-items-between",around:"justify-items-around",evenly:"justify-items-evenly",stretch:"justify-items-stretch"},y=m[s]||"grid-cols-1",f=d[n],g=u[i],p=`grid w-full ${y} ${f} ${g} gap-${t!=null?t:0}`;return N(a,{as:c,className:h(p,o),...l,children:r})};b.displayName=e;export{b as a};
package/dist/grid.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ import type { ElementType, HTMLProps, ReactNode } from "react";
2
+ export interface GridProps extends Omit<HTMLProps<HTMLElement>, "as"> {
3
+ columns?: Columns;
4
+ gap?: number;
5
+ align?: Align;
6
+ justify?: Justify;
7
+ children?: ReactNode;
8
+ className?: string;
9
+ as?: ElementType;
10
+ }
11
+ type Justify = "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch";
12
+ type Columns = "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
13
+ type Align = "start" | "end" | "baseline" | "stretch" | "center";
14
+ export declare const Grid: React.FC<GridProps>;
15
+ export {};
package/dist/grid.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var w=Object.create;var r=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:!0})},c=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of P(e))!v.call(t,n)&&n!==s&&r(t,n,{get:()=>e[n],enumerable:!(i=G(e,n))||i.enumerable});return t};var H=(t,e,s)=>(s=t!=null?w($(t)):{},c(e||!t||!t.__esModule?r(s,"default",{value:t,enumerable:!0}):s,t)),L=t=>c(r({},"__esModule",{value:!0}),t);var M={};E(M,{Grid:()=>m});module.exports=L(M);var o=require("@stackshift-ui/system"),l=H(require("classnames")),d=require("react/jsx-runtime"),a="Grid",m=({columns:t=1,gap:e=0,align:s="stretch",justify:i="start",children:n,className:u,as:y,...f})=>{let{[a]:g=o.DefaultComponent}=(0,o.useStackShiftUIComponents)(),p={none:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-1",12:"grid-cols-12"},j={start:"items-start",end:"items-end",baseline:"items-baseline",stretch:"items-stretch",center:"items-center"},C={normal:"justify-items-normal",start:"justify-items-start",end:"justify-items-end",center:"justify-items-center",between:" justify-items-between",around:"justify-items-around",evenly:"justify-items-evenly",stretch:"justify-items-stretch"},h=p[t]||"grid-cols-1",b=j[s],N=C[i],T=`grid w-full ${h} ${b} ${N} gap-${e!=null?e:0}`;return(0,d.jsx)(g,{as:y,className:(0,l.default)(T,u),...f,children:n})};m.displayName=a;0&&(module.exports={Grid});
package/dist/grid.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-4LT73YWJ.mjs";export{a as Grid};
@@ -0,0 +1 @@
1
+ export * from "./grid";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var w=Object.create;var i=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var x=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},c=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of P(e))!v.call(t,n)&&n!==s&&i(t,n,{get:()=>e[n],enumerable:!(r=G(e,n))||r.enumerable});return t};var E=(t,e,s)=>(s=t!=null?w($(t)):{},c(e||!t||!t.__esModule?i(s,"default",{value:t,enumerable:!0}):s,t)),H=t=>c(i({},"__esModule",{value:!0}),t);var L={};x(L,{Grid:()=>m});module.exports=H(L);var o=require("@stackshift-ui/system"),l=E(require("classnames")),d=require("react/jsx-runtime"),a="Grid",m=({columns:t=1,gap:e=0,align:s="stretch",justify:r="start",children:n,className:u,as:y,...f})=>{let{[a]:p=o.DefaultComponent}=(0,o.useStackShiftUIComponents)(),g={none:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-1",12:"grid-cols-12"},j={start:"items-start",end:"items-end",baseline:"items-baseline",stretch:"items-stretch",center:"items-center"},C={normal:"justify-items-normal",start:"justify-items-start",end:"justify-items-end",center:"justify-items-center",between:" justify-items-between",around:"justify-items-around",evenly:"justify-items-evenly",stretch:"justify-items-stretch"},h=g[t]||"grid-cols-1",b=j[s],N=C[r],T=`grid w-full ${h} ${b} ${N} gap-${e!=null?e:0}`;return(0,d.jsx)(p,{as:y,className:(0,l.default)(T,u),...f,children:n})};m.displayName=a;0&&(module.exports={Grid});
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";import{a as e}from"./chunk-4LT73YWJ.mjs";export{e as Grid};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/grid",
3
3
  "description": "",
4
- "version": "7.0.0-beta.5",
4
+ "version": "7.0.0-beta.7",
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/eslint-config": "6.0.10",
33
- "@stackshift-ui/typescript-config": "6.0.10"
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/system": "7.0.0-beta.5",
38
- "@stackshift-ui/scripts": "7.0.0-beta.4"
37
+ "@stackshift-ui/scripts": "7.0.0-beta.6",
38
+ "@stackshift-ui/system": "7.0.0-beta.7"
39
39
  },
40
40
  "peerDependencies": {
41
- "@stackshift-ui/system": ">=7.0.0-beta.5",
41
+ "@stackshift-ui/system": ">=7.0.0-beta.7",
42
42
  "@types/react": "16.8 - 19",
43
43
  "next": "10 - 14",
44
44
  "react": "16.8 - 19",