@stackshift-ui/grid 7.0.0-beta.3 → 7.0.0-beta.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/grid",
3
3
  "description": "",
4
- "version": "7.0.0-beta.3",
4
+ "version": "7.0.0-beta.4",
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/typescript-config": "6.0.10",
33
- "@stackshift-ui/eslint-config": "6.0.10"
32
+ "@stackshift-ui/eslint-config": "6.0.10",
33
+ "@stackshift-ui/typescript-config": "6.0.10"
34
34
  },
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
37
- "@stackshift-ui/scripts": "6.1.0-beta.2",
38
- "@stackshift-ui/system": "6.1.0-beta.3"
37
+ "@stackshift-ui/system": "7.0.0-beta.4",
38
+ "@stackshift-ui/scripts": "7.0.0-beta.3"
39
39
  },
40
40
  "peerDependencies": {
41
- "@stackshift-ui/system": ">=6.1.0-beta.3",
41
+ "@stackshift-ui/system": ">=7.0.0-beta.4",
42
42
  "@types/react": "16.8 - 19",
43
43
  "next": "10 - 14",
44
44
  "react": "16.8 - 19",
@@ -1 +0,0 @@
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};
@@ -1,59 +0,0 @@
1
- // src/grid.tsx
2
- import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
3
- import cn from "classnames";
4
- import { jsx } from "react/jsx-runtime";
5
- var displayName = "Grid";
6
- var Grid = ({
7
- columns = 1,
8
- gap = 0,
9
- align = "stretch",
10
- justify = "start",
11
- children,
12
- className,
13
- as,
14
- ...props
15
- }) => {
16
- const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
17
- const columnClass = {
18
- none: "grid-cols-none",
19
- 1: "grid-cols-1",
20
- 2: "grid-cols-2",
21
- 3: "grid-cols-3",
22
- 4: "grid-cols-4",
23
- 5: "grid-cols-5",
24
- 6: "grid-cols-6",
25
- 7: "grid-cols-7",
26
- 8: "grid-cols-8",
27
- 9: "grid-cols-9",
28
- 10: "grid-cols-10",
29
- 11: "grid-cols-1",
30
- 12: "grid-cols-12"
31
- };
32
- const alignVariants = {
33
- start: "items-start",
34
- end: "items-end",
35
- baseline: "items-baseline",
36
- stretch: "items-stretch",
37
- center: "items-center"
38
- };
39
- const justifyVariants = {
40
- normal: "justify-items-normal",
41
- start: "justify-items-start",
42
- end: "justify-items-end",
43
- center: "justify-items-center",
44
- between: " justify-items-between",
45
- around: "justify-items-around",
46
- evenly: "justify-items-evenly",
47
- stretch: "justify-items-stretch"
48
- };
49
- const column = columnClass[columns] || "grid-cols-1";
50
- const alignClass = alignVariants[align];
51
- const justifyClass = justifyVariants[justify];
52
- const classes = `grid w-full ${column} ${alignClass} ${justifyClass} gap-${gap != null ? gap : 0}`;
53
- return /* @__PURE__ */ jsx(Component, { as, className: cn(classes, className), ...props, children });
54
- };
55
- Grid.displayName = displayName;
56
-
57
- export {
58
- Grid
59
- };
package/dist/grid.d.ts DELETED
@@ -1,15 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-4LT73YWJ.mjs";export{a as Grid};
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./grid";
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
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 DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";import{a as e}from"./chunk-4LT73YWJ.mjs";export{e as Grid};