@stackshift-ui/section 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.
- package/dist/chunk-J23L3RFH.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/section.js +1 -1
- package/dist/section.mjs +1 -1
- package/package.json +6 -6
- package/src/section.test.tsx +1 -1
- package/src/section.tsx +2 -7
- package/dist/chunk-ROXQZ2U5.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DefaultComponent as c,useStackShiftUIComponents as r}from"@stackshift-ui/system";import i from"classnames";import{jsx as d}from"react/jsx-runtime";var o="Section",x=({children:n,className:s,maxWidth:t="full",as:p,...l})=>{let{[o]:m=c}=r(),e=typeof t=="number"?`${t.toString()}px`:{sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px",full:"100%"}[t],a=e!=null?e:"80rem";return d(m,{as:p,className:i("mx-auto w-full px-4",s),style:{maxWidth:a},...l,children:n})};x.displayName=o;export{x as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var u=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},r=(t,e,o,
|
|
2
|
+
"use strict";var u=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},r=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of S(e))!N.call(t,n)&&n!==o&&p(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)):{},r(e||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),C=t=>r(p({},"__esModule",{value:!0}),t);var P={};T(P,{Section:()=>i});module.exports=C(P);var l=require("@stackshift-ui/system"),a=g(require("classnames")),x=require("react/jsx-runtime"),c="Section",i=({children:t,className:e,maxWidth:o="full",as:s,...n})=>{let{[c]:d=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),m=typeof o=="number"?`${o.toString()}px`:{sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px",full:"100%"}[o],f=m!=null?m:"80rem";return(0,x.jsx)(d,{as:s,className:(0,a.default)("mx-auto w-full px-4",e),style:{maxWidth:f},...n,children:t})};i.displayName=c;0&&(module.exports={Section});
|
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-J23L3RFH.mjs";export{e as Section};
|
package/dist/section.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var u=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},
|
|
1
|
+
"use strict";var u=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},a=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of S(e))!N.call(t,n)&&n!==o&&p(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)):{},a(e||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),C=t=>a(p({},"__esModule",{value:!0}),t);var P={};T(P,{Section:()=>i});module.exports=C(P);var l=require("@stackshift-ui/system"),c=g(require("classnames")),x=require("react/jsx-runtime"),r="Section",i=({children:t,className:e,maxWidth:o="full",as:s,...n})=>{let{[r]:d=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),m=typeof o=="number"?`${o.toString()}px`:{sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px",full:"100%"}[o],f=m!=null?m:"80rem";return(0,x.jsx)(d,{as:s,className:(0,c.default)("mx-auto w-full px-4",e),style:{maxWidth:f},...n,children:t})};i.displayName=r;0&&(module.exports={Section});
|
package/dist/section.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-J23L3RFH.mjs";export{a as Section};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/section",
|
|
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/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/
|
|
38
|
-
"@stackshift-ui/
|
|
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/section.test.tsx
CHANGED
|
@@ -7,7 +7,7 @@ describe.concurrent("section", () => {
|
|
|
7
7
|
|
|
8
8
|
test("Layout: Section - test if renders without errors", ({ expect }) => {
|
|
9
9
|
const clx = "section-class";
|
|
10
|
-
render(<Section className={clx} />);
|
|
10
|
+
render(<Section data-testid="div" className={clx} />);
|
|
11
11
|
expect(screen.getByTestId("div").classList).toContain(clx);
|
|
12
12
|
});
|
|
13
13
|
});
|
package/src/section.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
|
type Width = "sm" | "md" | "lg" | "xl" | "2xl" | "full" | number;
|
|
6
6
|
|
|
@@ -39,12 +39,7 @@ export const Section: React.FC<SectionProps> = ({
|
|
|
39
39
|
const classes = "mx-auto w-full px-4";
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<Component
|
|
43
|
-
as={as}
|
|
44
|
-
className={cn(classes, className)}
|
|
45
|
-
style={{ maxWidth: width }}
|
|
46
|
-
{...props}
|
|
47
|
-
data-testid={displayName}>
|
|
42
|
+
<Component as={as} className={cn(classes, className)} style={{ maxWidth: width }} {...props}>
|
|
48
43
|
{children}
|
|
49
44
|
</Component>
|
|
50
45
|
);
|
package/dist/chunk-ROXQZ2U5.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DefaultComponent as c,useStackShiftUIComponents as r}from"@stackshift-ui/system";import i from"classnames";import{jsx as x}from"react/jsx-runtime";var o="Section",d=({children:s,className:n,maxWidth:t="full",as:p,...a})=>{let{[o]:l=c}=r(),e=typeof t=="number"?`${t.toString()}px`:{sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px",full:"100%"}[t],m=e!=null?e:"80rem";return x(l,{as:p,className:i("mx-auto w-full px-4",n),style:{maxWidth:m},...a,"data-testid":o,children:s})};d.displayName=o;export{d as a};
|