@stackshift-ui/container 6.0.5 → 6.0.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.
- package/dist/chunk-ZVTQUIET.mjs +1 -0
- package/dist/container.d.ts +10 -0
- package/dist/container.js +1 -0
- package/dist/container.mjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DefaultComponent as m,useStackShiftUIComponents as i}from"@stackshift-ui/system";import c from"classnames";import{jsx as x}from"react/jsx-runtime";var n="Container",d=({children:o,className:s,maxWidth:t="full",as:a,...p})=>{let{[n]:r=m}=i(),e=typeof t=="number"?`${t.toString()}px`:{sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px",full:"100%"}[t],l=e!=null?e:"80rem";return x(r,{as:a,className:c("mx-auto w-full px-4",s),style:{maxWidth:l},...p,"data-testid":n,children:o})};d.displayName=n;export{d as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
2
|
+
export interface ContainerProps extends Omit<HTMLProps<HTMLElement>, "as"> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
maxWidth?: Width;
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
}
|
|
8
|
+
type Width = "sm" | "md" | "lg" | "xl" | "2xl" | "full" | number;
|
|
9
|
+
export declare const Container: React.FC<ContainerProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var u=Object.create;var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var n in e)a(t,n,{get:e[n],enumerable:!0})},m=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of C(e))!N.call(t,o)&&o!==n&&a(t,o,{get:()=>e[o],enumerable:!(s=y(e,o))||s.enumerable});return t};var g=(t,e,n)=>(n=t!=null?u(h(t)):{},m(e||!t||!t.__esModule?a(n,"default",{value:t,enumerable:!0}):n,t)),P=t=>m(a({},"__esModule",{value:!0}),t);var w={};T(w,{Container:()=>c});module.exports=P(w);var p=require("@stackshift-ui/system"),i=g(require("classnames")),d=require("react/jsx-runtime"),l="Container",c=({children:t,className:e,maxWidth:n="full",as:s,...o})=>{let{[l]:x=p.DefaultComponent}=(0,p.useStackShiftUIComponents)(),r=typeof n=="number"?`${n.toString()}px`:{sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px",full:"100%"}[n],f=r!=null?r:"80rem";return(0,d.jsx)(x,{as:s,className:(0,i.default)("mx-auto w-full px-4",e),style:{maxWidth:f},...o,"data-testid":l,children:t})};c.displayName=l;0&&(module.exports={Container});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ZVTQUIET.mjs";export{a as Container};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./container";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var u=Object.create;var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},m=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of C(e))!N.call(t,n)&&n!==o&&a(t,n,{get:()=>e[n],enumerable:!(s=y(e,n))||s.enumerable});return t};var g=(t,e,o)=>(o=t!=null?u(h(t)):{},m(e||!t||!t.__esModule?a(o,"default",{value:t,enumerable:!0}):o,t)),P=t=>m(a({},"__esModule",{value:!0}),t);var w={};T(w,{Container:()=>c});module.exports=P(w);var p=require("@stackshift-ui/system"),i=g(require("classnames")),x=require("react/jsx-runtime"),l="Container",c=({children:t,className:e,maxWidth:o="full",as:s,...n})=>{let{[l]:d=p.DefaultComponent}=(0,p.useStackShiftUIComponents)(),r=typeof o=="number"?`${o.toString()}px`:{sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px",full:"100%"}[o],f=r!=null?r:"80rem";return(0,x.jsx)(d,{as:s,className:(0,i.default)("mx-auto w-full px-4",e),style:{maxWidth:f},...n,"data-testid":l,children:t})};c.displayName=l;0&&(module.exports={Container});
|
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/container",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.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.
|
|
33
|
-
"@stackshift-ui/typescript-config": "6.0.
|
|
32
|
+
"@stackshift-ui/eslint-config": "6.0.6",
|
|
33
|
+
"@stackshift-ui/typescript-config": "6.0.6"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/scripts": "6.0.6",
|
|
38
|
+
"@stackshift-ui/system": "6.0.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@stackshift-ui/system": ">=6.0.
|
|
41
|
+
"@stackshift-ui/system": ">=6.0.7",
|
|
42
42
|
"@types/react": "16.8 - 19",
|
|
43
43
|
"next": "10 - 14",
|
|
44
44
|
"react": "16.8 - 19",
|