@gridui/panel 1.0.5 → 2.0.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/README.md +2 -0
- package/dist/index.js +15 -7
- package/dist/index.js.map +2 -2
- package/dist/styles.css +24 -19
- package/docs/catalog.json +7 -2
- package/docs/reference/README.md +5 -0
- package/docs/reference/content-panel.md +81 -0
- package/docs/reference/heading-panel.md +59 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -28,3 +28,5 @@ controls in decorative artwork. Native div props and refs remain available.
|
|
|
28
28
|
|
|
29
29
|
Each component's private styles live in its matching `src/` directory. The public
|
|
30
30
|
stylesheet imports both owners; internal paths and CSS classes are not public APIs.
|
|
31
|
+
|
|
32
|
+
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { cn } from "@gridui/style-utils";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
var contentPanelStyles = cva(cn(
|
|
5
5
|
"gridui-content-panel",
|
|
6
|
-
"gridui-u-data-[tone='brand']:bg-brand-tint"
|
|
6
|
+
"gridui-u-panel--data-[tone='brand']:bg-brand-tint"
|
|
7
7
|
));
|
|
8
8
|
|
|
9
9
|
// src/content-panel/content-panel.tsx
|
|
@@ -24,6 +24,8 @@ var ContentPanel = (props) => {
|
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
26
|
...restProps,
|
|
27
|
+
"data-gridui-component": "content-panel",
|
|
28
|
+
"data-gridui-draw": "surface",
|
|
27
29
|
className: cn2(contentPanelStyles(), className),
|
|
28
30
|
"data-tone": tone,
|
|
29
31
|
style: {
|
|
@@ -40,15 +42,15 @@ import { cn as cn3 } from "@gridui/style-utils";
|
|
|
40
42
|
import { cva as cva2 } from "class-variance-authority";
|
|
41
43
|
var headingPanelStyles = cva2(cn3(
|
|
42
44
|
"gridui-heading-panel",
|
|
43
|
-
"gridui-u-[&_h1]:flex gridui-u-[&_h1]:items-center gridui-u-[&_h1]:p-gridui-24 gridui-u-[&_h1]:bg-background",
|
|
44
|
-
"gridui-u-min-[40rem]:[&_h1]:py-gridui-32 gridui-u-min-[40rem]:[&_h1]:px-gridui-48"
|
|
45
|
+
"gridui-u-panel--[&_h1]:flex gridui-u-panel--[&_h1]:items-center gridui-u-panel--[&_h1]:p-gridui-24 gridui-u-panel--[&_h1]:bg-background",
|
|
46
|
+
"gridui-u-panel--min-[40rem]:[&_h1]:py-gridui-32 gridui-u-panel--min-[40rem]:[&_h1]:px-gridui-48"
|
|
45
47
|
));
|
|
46
48
|
var headingArtworkStyles = cva2(cn3(
|
|
47
49
|
"gridui-heading-artwork",
|
|
48
|
-
"gridui-u-relative gridui-u-isolate gridui-u-grid gridui-u-min-h-28 gridui-u-place-items-center gridui-u-bg-[color-mix(in_srgb,var(--gridui-brand-art)_3%,transparent)]",
|
|
49
|
-
"gridui-u-[&_svg]:w-19 gridui-u-[&_svg]:h-19",
|
|
50
|
-
"gridui-u-min-[40rem]:min-h-40",
|
|
51
|
-
"gridui-u-min-[40rem]:[&_svg]:w-28 gridui-u-min-[40rem]:[&_svg]:h-28"
|
|
50
|
+
"gridui-u-panel--relative gridui-u-panel--isolate gridui-u-panel--grid gridui-u-panel--min-h-28 gridui-u-panel--place-items-center gridui-u-panel--bg-[color-mix(in_srgb,var(--gridui-brand-art)_3%,transparent)]",
|
|
51
|
+
"gridui-u-panel--[&_svg]:w-19 gridui-u-panel--[&_svg]:h-19",
|
|
52
|
+
"gridui-u-panel--min-[40rem]:min-h-40",
|
|
53
|
+
"gridui-u-panel--min-[40rem]:[&_svg]:w-28 gridui-u-panel--min-[40rem]:[&_svg]:h-28"
|
|
52
54
|
));
|
|
53
55
|
|
|
54
56
|
// src/heading-panel/heading-panel.tsx
|
|
@@ -61,12 +63,16 @@ var HeadingPanel = (props) => {
|
|
|
61
63
|
Split,
|
|
62
64
|
{
|
|
63
65
|
...restProps,
|
|
66
|
+
"data-gridui-component": "heading-panel",
|
|
67
|
+
"data-gridui-draw": "group",
|
|
64
68
|
className: cn4(headingPanelStyles(), className),
|
|
65
69
|
children: [
|
|
66
70
|
/* @__PURE__ */ jsx2(
|
|
67
71
|
"div",
|
|
68
72
|
{
|
|
69
73
|
className: "gridui-heading-copy",
|
|
74
|
+
"data-gridui-part": "content",
|
|
75
|
+
"data-gridui-draw": "group",
|
|
70
76
|
children
|
|
71
77
|
}
|
|
72
78
|
),
|
|
@@ -74,6 +80,8 @@ var HeadingPanel = (props) => {
|
|
|
74
80
|
"div",
|
|
75
81
|
{
|
|
76
82
|
className: cn4(headingArtworkStyles()),
|
|
83
|
+
"data-gridui-part": "media",
|
|
84
|
+
"data-gridui-draw": "graphic",
|
|
77
85
|
"aria-hidden": "true",
|
|
78
86
|
children: [
|
|
79
87
|
/* @__PURE__ */ jsx2(
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/content-panel/style.ts", "../src/content-panel/content-panel.tsx", "../src/heading-panel/style.ts", "../src/heading-panel/heading-panel.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Panel\n * @namespace ContentPanel\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const contentPanelStyles = cva(cn(\n \"gridui-content-panel\",\n \"gridui-u-data-[tone='brand']:bg-brand-tint\",\n));\n", "/**\n * @author WMXPY\n * @package Panel\n * @namespace ContentPanel\n * @description Content Panel\n */\n\nimport { contentPanelStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type Responsive, type Space, spacingVariables } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type ContentPanelProps = ComponentPropsWithRef<\"div\"> & {\n readonly padding?: Responsive<Space>;\n readonly paddingInline?: Responsive<Space>;\n readonly paddingBlock?: Responsive<Space>;\n readonly tone?: \"neutral\" | \"brand\";\n};\n\nexport const ContentPanel: FC<ContentPanelProps> = (props: ContentPanelProps) => {\n const {\n padding = 24,\n paddingInline = padding,\n paddingBlock = padding,\n tone = \"neutral\",\n className,\n style,\n ...restProps\n } = props;\n return (<div\n {...restProps}\n className={cn(contentPanelStyles(), className)}\n data-tone={tone}\n style={{\n ...spacingVariables(\"panel-inline\", paddingInline),\n ...spacingVariables(\"panel-block\", paddingBlock),\n ...style,\n }}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Panel\n * @namespace HeadingPanel\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const headingPanelStyles = cva(cn(\n \"gridui-heading-panel\",\n \"gridui-u-[&_h1]:flex gridui-u-[&_h1]:items-center gridui-u-[&_h1]:p-gridui-24 gridui-u-[&_h1]:bg-background\",\n \"gridui-u-min-[40rem]:[&_h1]:py-gridui-32 gridui-u-min-[40rem]:[&_h1]:px-gridui-48\",\n));\n\nexport const headingArtworkStyles = cva(cn(\n \"gridui-heading-artwork\",\n \"gridui-u-relative gridui-u-isolate gridui-u-grid gridui-u-min-h-28 gridui-u-place-items-center gridui-u-bg-[color-mix(in_srgb,var(--gridui-brand-art)_3%,transparent)]\",\n \"gridui-u-[&_svg]:w-19 gridui-u-[&_svg]:h-19\",\n \"gridui-u-min-[40rem]:min-h-40\",\n \"gridui-u-min-[40rem]:[&_svg]:w-28 gridui-u-min-[40rem]:[&_svg]:h-28\",\n));\n", "/**\n * @author WMXPY\n * @package Panel\n * @namespace HeadingPanel\n * @description Heading Panel\n */\n\nimport { headingArtworkStyles, headingPanelStyles } from \"./style\";\nimport { FrameTexture, Split } from \"@gridui/grid\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC, ReactNode } from \"react\";\n\nexport type HeadingPanelProps = ComponentPropsWithRef<\"div\"> & {\n readonly artwork: ReactNode;\n};\n\nexport const HeadingPanel: FC<HeadingPanelProps> = (props: HeadingPanelProps) => {\n const { artwork, children, className, ...restProps } = props;\n return (<Split\n {...restProps}\n className={cn(headingPanelStyles(), className)}\n >\n <div\n className=\"gridui-heading-copy\"\n >\n {children}\n </div>\n <div\n className={cn(headingArtworkStyles())}\n aria-hidden=\"true\"\n >\n <FrameTexture\n texture=\"grid\"\n />\n {artwork}\n </div>\n </Split>);\n};\n"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,qBAAqB,IAAI;AAAA,EAClC;AAAA,EACA;AACJ,CAAC;;;ACLD,SAAS,MAAAA,WAAU;AACnB,SAAsC,wBAAwB;AAoBlD;AAVL,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM;AAAA,IACF,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACP,IAAI;AACJ,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,WAAWA,IAAG,mBAAmB,GAAG,SAAS;AAAA,MAC7C,aAAW;AAAA,MACX,OAAO;AAAA,QACH,GAAG,iBAAiB,gBAAgB,aAAa;AAAA,QACjD,GAAG,iBAAiB,eAAe,YAAY;AAAA,QAC/C,GAAG;AAAA,MACP;AAAA;AAAA,EACJ;AACJ;;;
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Panel\n * @namespace ContentPanel\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const contentPanelStyles = cva(cn(\n \"gridui-content-panel\",\n \"gridui-u-panel--data-[tone='brand']:bg-brand-tint\",\n));\n", "/**\n * @author WMXPY\n * @package Panel\n * @namespace ContentPanel\n * @description Content Panel\n */\n\nimport { contentPanelStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type Responsive, type Space, spacingVariables } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type ContentPanelProps = ComponentPropsWithRef<\"div\"> & {\n readonly padding?: Responsive<Space>;\n readonly paddingInline?: Responsive<Space>;\n readonly paddingBlock?: Responsive<Space>;\n readonly tone?: \"neutral\" | \"brand\";\n};\n\nexport const ContentPanel: FC<ContentPanelProps> = (props: ContentPanelProps) => {\n const {\n padding = 24,\n paddingInline = padding,\n paddingBlock = padding,\n tone = \"neutral\",\n className,\n style,\n ...restProps\n } = props;\n return (<div\n {...restProps}\n data-gridui-component=\"content-panel\"\n data-gridui-draw=\"surface\"\n className={cn(contentPanelStyles(), className)}\n data-tone={tone}\n style={{\n ...spacingVariables(\"panel-inline\", paddingInline),\n ...spacingVariables(\"panel-block\", paddingBlock),\n ...style,\n }}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Panel\n * @namespace HeadingPanel\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const headingPanelStyles = cva(cn(\n \"gridui-heading-panel\",\n \"gridui-u-panel--[&_h1]:flex gridui-u-panel--[&_h1]:items-center gridui-u-panel--[&_h1]:p-gridui-24 gridui-u-panel--[&_h1]:bg-background\",\n \"gridui-u-panel--min-[40rem]:[&_h1]:py-gridui-32 gridui-u-panel--min-[40rem]:[&_h1]:px-gridui-48\",\n));\n\nexport const headingArtworkStyles = cva(cn(\n \"gridui-heading-artwork\",\n \"gridui-u-panel--relative gridui-u-panel--isolate gridui-u-panel--grid gridui-u-panel--min-h-28 gridui-u-panel--place-items-center gridui-u-panel--bg-[color-mix(in_srgb,var(--gridui-brand-art)_3%,transparent)]\",\n \"gridui-u-panel--[&_svg]:w-19 gridui-u-panel--[&_svg]:h-19\",\n \"gridui-u-panel--min-[40rem]:min-h-40\",\n \"gridui-u-panel--min-[40rem]:[&_svg]:w-28 gridui-u-panel--min-[40rem]:[&_svg]:h-28\",\n));\n", "/**\n * @author WMXPY\n * @package Panel\n * @namespace HeadingPanel\n * @description Heading Panel\n */\n\nimport { headingArtworkStyles, headingPanelStyles } from \"./style\";\nimport { FrameTexture, Split } from \"@gridui/grid\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC, ReactNode } from \"react\";\n\nexport type HeadingPanelProps = ComponentPropsWithRef<\"div\"> & {\n readonly artwork: ReactNode;\n};\n\nexport const HeadingPanel: FC<HeadingPanelProps> = (props: HeadingPanelProps) => {\n const { artwork, children, className, ...restProps } = props;\n return (<Split\n {...restProps}\n data-gridui-component=\"heading-panel\"\n data-gridui-draw=\"group\"\n className={cn(headingPanelStyles(), className)}\n >\n <div\n className=\"gridui-heading-copy\"\n data-gridui-part=\"content\"\n data-gridui-draw=\"group\"\n >\n {children}\n </div>\n <div\n className={cn(headingArtworkStyles())}\n data-gridui-part=\"media\"\n data-gridui-draw=\"graphic\"\n aria-hidden=\"true\"\n >\n <FrameTexture\n texture=\"grid\"\n />\n {artwork}\n </div>\n </Split>);\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,qBAAqB,IAAI;AAAA,EAClC;AAAA,EACA;AACJ,CAAC;;;ACLD,SAAS,MAAAA,WAAU;AACnB,SAAsC,wBAAwB;AAoBlD;AAVL,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM;AAAA,IACF,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACP,IAAI;AACJ,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,yBAAsB;AAAA,MACtB,oBAAiB;AAAA,MACjB,WAAWA,IAAG,mBAAmB,GAAG,SAAS;AAAA,MAC7C,aAAW;AAAA,MACX,OAAO;AAAA,QACH,GAAG,iBAAiB,gBAAgB,aAAa;AAAA,QACjD,GAAG,iBAAiB,eAAe,YAAY;AAAA,QAC/C,GAAG;AAAA,MACP;AAAA;AAAA,EACJ;AACJ;;;AClCA,SAAS,MAAAC,WAAU;AACnB,SAAS,OAAAC,YAAW;AAEb,IAAM,qBAAqBA,KAAID;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,uBAAuBC,KAAID;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;;;ACdD,SAAS,cAAc,aAAa;AACpC,SAAS,MAAAE,WAAU;AAeX,gBAAAC,MAOA,YAPA;AARD,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM,EAAE,SAAS,UAAU,WAAW,GAAG,UAAU,IAAI;AACvD,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,yBAAsB;AAAA,MACtB,oBAAiB;AAAA,MACjB,WAAWD,IAAG,mBAAmB,GAAG,SAAS;AAAA,MAE7C;AAAA,wBAAAC;AAAA,UAAC;AAAA;AAAA,YACG,WAAU;AAAA,YACV,oBAAiB;AAAA,YACjB,oBAAiB;AAAA,YAEhB;AAAA;AAAA,QACL;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACG,WAAWD,IAAG,qBAAqB,CAAC;AAAA,YACpC,oBAAiB;AAAA,YACjB,oBAAiB;AAAA,YACjB,eAAY;AAAA,YAEZ;AAAA,8BAAAC;AAAA,gBAAC;AAAA;AAAA,kBACG,SAAQ;AAAA;AAAA,cACZ;AAAA,cACC;AAAA;AAAA;AAAA,QACL;AAAA;AAAA;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": ["cn", "cn", "cva", "cn", "jsx"]
|
|
7
7
|
}
|
package/dist/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer theme, base, components, utilities;
|
|
3
3
|
@layer theme {
|
|
4
4
|
:root, :host {
|
|
@@ -6,66 +6,66 @@
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
@layer utilities {
|
|
9
|
-
.gridui-u-relative {
|
|
9
|
+
.gridui-u-panel--relative {
|
|
10
10
|
position: relative;
|
|
11
11
|
}
|
|
12
|
-
.gridui-u-isolate {
|
|
12
|
+
.gridui-u-panel--isolate {
|
|
13
13
|
isolation: isolate;
|
|
14
14
|
}
|
|
15
|
-
.gridui-u-grid {
|
|
15
|
+
.gridui-u-panel--grid {
|
|
16
16
|
display: grid;
|
|
17
17
|
}
|
|
18
|
-
.gridui-u-min-h-28 {
|
|
18
|
+
.gridui-u-panel--min-h-28 {
|
|
19
19
|
min-height: calc(var(--spacing) * 28);
|
|
20
20
|
}
|
|
21
|
-
.gridui-u-place-items-center {
|
|
21
|
+
.gridui-u-panel--place-items-center {
|
|
22
22
|
place-items: center;
|
|
23
23
|
}
|
|
24
|
-
.gridui-u-bg-\[color-mix\(in_srgb\,var\(--gridui-brand-art\)_3\%\,transparent\)\] {
|
|
24
|
+
.gridui-u-panel--bg-\[color-mix\(in_srgb\,var\(--gridui-brand-art\)_3\%\,transparent\)\] {
|
|
25
25
|
background-color: var(--gridui-brand-art);
|
|
26
26
|
@supports (color: color-mix(in lab, red, red)) {
|
|
27
27
|
background-color: color-mix(in srgb,var(--gridui-brand-art) 3%,transparent);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
.gridui-u-data-\[tone\=\'brand\'\]\:bg-brand-tint[data-tone='brand'] {
|
|
30
|
+
.gridui-u-panel--data-\[tone\=\'brand\'\]\:bg-brand-tint[data-tone='brand'] {
|
|
31
31
|
background-color: var(--gridui-brand-tint);
|
|
32
32
|
}
|
|
33
33
|
@media (width >= 40rem) {
|
|
34
|
-
.gridui-u-min-\[40rem\]\:min-h-40 {
|
|
34
|
+
.gridui-u-panel--min-\[40rem\]\:min-h-40 {
|
|
35
35
|
min-height: calc(var(--spacing) * 40);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
.gridui-u
|
|
38
|
+
.gridui-u-panel--\[\&_h1\]\:flex h1 {
|
|
39
39
|
display: flex;
|
|
40
40
|
}
|
|
41
|
-
.gridui-u
|
|
41
|
+
.gridui-u-panel--\[\&_h1\]\:items-center h1 {
|
|
42
42
|
align-items: center;
|
|
43
43
|
}
|
|
44
|
-
.gridui-u
|
|
44
|
+
.gridui-u-panel--\[\&_h1\]\:bg-background h1 {
|
|
45
45
|
background-color: var(--gridui-background);
|
|
46
46
|
}
|
|
47
|
-
.gridui-u
|
|
47
|
+
.gridui-u-panel--\[\&_h1\]\:p-gridui-24 h1 {
|
|
48
48
|
padding: var(--gridui-space-24);
|
|
49
49
|
}
|
|
50
50
|
@media (width >= 40rem) {
|
|
51
|
-
.gridui-u-min-\[40rem\]\:\[\&_h1\]\:px-gridui-48 h1 {
|
|
51
|
+
.gridui-u-panel--min-\[40rem\]\:\[\&_h1\]\:px-gridui-48 h1 {
|
|
52
52
|
padding-inline: var(--gridui-space-48);
|
|
53
53
|
}
|
|
54
|
-
.gridui-u-min-\[40rem\]\:\[\&_h1\]\:py-gridui-32 h1 {
|
|
54
|
+
.gridui-u-panel--min-\[40rem\]\:\[\&_h1\]\:py-gridui-32 h1 {
|
|
55
55
|
padding-block: var(--gridui-space-32);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
.gridui-u
|
|
58
|
+
.gridui-u-panel--\[\&_svg\]\:h-19 svg {
|
|
59
59
|
height: calc(var(--spacing) * 19);
|
|
60
60
|
}
|
|
61
|
-
.gridui-u
|
|
61
|
+
.gridui-u-panel--\[\&_svg\]\:w-19 svg {
|
|
62
62
|
width: calc(var(--spacing) * 19);
|
|
63
63
|
}
|
|
64
64
|
@media (width >= 40rem) {
|
|
65
|
-
.gridui-u-min-\[40rem\]\:\[\&_svg\]\:h-28 svg {
|
|
65
|
+
.gridui-u-panel--min-\[40rem\]\:\[\&_svg\]\:h-28 svg {
|
|
66
66
|
height: calc(var(--spacing) * 28);
|
|
67
67
|
}
|
|
68
|
-
.gridui-u-min-\[40rem\]\:\[\&_svg\]\:w-28 svg {
|
|
68
|
+
.gridui-u-panel--min-\[40rem\]\:\[\&_svg\]\:w-28 svg {
|
|
69
69
|
width: calc(var(--spacing) * 28);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -87,6 +87,11 @@
|
|
|
87
87
|
padding: var(--gridui-panel-block) var(--gridui-panel-inline);
|
|
88
88
|
}
|
|
89
89
|
@media (min-width: 40rem) {
|
|
90
|
+
.gridui-content-panel {
|
|
91
|
+
padding: var(--gridui-panel-block-sm) var(--gridui-panel-inline-sm);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
@media (min-width: 48rem) {
|
|
90
95
|
.gridui-content-panel {
|
|
91
96
|
padding: var(--gridui-panel-block-md) var(--gridui-panel-inline-md);
|
|
92
97
|
}
|
package/docs/catalog.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/panel",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"category": "layout",
|
|
6
6
|
"description": "GridUI React panel",
|
|
7
7
|
"usage": "ContentPanel preserves a native div and forwards its props and ref. `padding` defaults to spacing token 24; `paddingInline` and `paddingBlock` independently override it. These values accept scalar or responsive spacing. An explicit caller style overrides the corresponding generated custom property. `tone` accepts `neutral` or `brand`, with neutral as the default.",
|
|
8
8
|
"documentation": [
|
|
9
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"docs/reference/README.md",
|
|
11
|
+
"docs/reference/content-panel.md",
|
|
12
|
+
"docs/reference/heading-panel.md"
|
|
10
13
|
],
|
|
11
14
|
"exports": [
|
|
12
15
|
{
|
|
@@ -36,6 +39,8 @@
|
|
|
36
39
|
"@gridui/panel/styles.css"
|
|
37
40
|
],
|
|
38
41
|
"examples": [
|
|
42
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/panel/stories/content-regions.mdx",
|
|
43
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/panel/stories/heading-artwork.mdx",
|
|
39
44
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/panel/stories/content-panels.stories.tsx"
|
|
40
45
|
]
|
|
41
46
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# ContentPanel
|
|
3
|
+
|
|
4
|
+
Groups content within a framed panel with optional header and footer regions. Use it to separate a coherent task or set of information.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/panel`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { ContentPanel } from "@gridui/panel";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/panel/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/panel/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/panel/stories/content-panels.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### children
|
|
23
|
+
|
|
24
|
+
``ReactNode`` · Optional
|
|
25
|
+
|
|
26
|
+
Content rendered inside the component.
|
|
27
|
+
|
|
28
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### padding
|
|
59
|
+
|
|
60
|
+
``Responsive<Space> | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``24``
|
|
63
|
+
|
|
64
|
+
### paddingInline
|
|
65
|
+
|
|
66
|
+
``Responsive<Space> | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
Default: ``padding``
|
|
69
|
+
|
|
70
|
+
### paddingBlock
|
|
71
|
+
|
|
72
|
+
``Responsive<Space> | undefined`` · Optional
|
|
73
|
+
|
|
74
|
+
Default: ``padding``
|
|
75
|
+
|
|
76
|
+
### tone
|
|
77
|
+
|
|
78
|
+
``"neutral" | "brand" | undefined`` · Optional
|
|
79
|
+
|
|
80
|
+
Default: ``"neutral"``
|
|
81
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# HeadingPanel
|
|
3
|
+
|
|
4
|
+
Public HeadingPanel component from @gridui/panel. See the package guide for its composition contract.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/panel`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { HeadingPanel } from "@gridui/panel";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/panel/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/panel/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
## API
|
|
17
|
+
|
|
18
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
19
|
+
|
|
20
|
+
### children
|
|
21
|
+
|
|
22
|
+
``ReactNode`` · Optional
|
|
23
|
+
|
|
24
|
+
Content rendered inside the component.
|
|
25
|
+
|
|
26
|
+
### onFocus
|
|
27
|
+
|
|
28
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
29
|
+
|
|
30
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
31
|
+
|
|
32
|
+
### onBlur
|
|
33
|
+
|
|
34
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
35
|
+
|
|
36
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
37
|
+
|
|
38
|
+
### onChange
|
|
39
|
+
|
|
40
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
41
|
+
|
|
42
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
43
|
+
|
|
44
|
+
### onSubmit
|
|
45
|
+
|
|
46
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
47
|
+
|
|
48
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
49
|
+
|
|
50
|
+
### onClick
|
|
51
|
+
|
|
52
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
53
|
+
|
|
54
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
55
|
+
|
|
56
|
+
### artwork
|
|
57
|
+
|
|
58
|
+
``ReactNode`` · Required
|
|
59
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/panel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "GridUI React panel",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"react-dom": "^19.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@gridui/grid": "^
|
|
31
|
-
"@gridui/style-utils": "^
|
|
30
|
+
"@gridui/grid": "^3.0.0",
|
|
31
|
+
"@gridui/style-utils": "^4.0.0",
|
|
32
32
|
"@gridui/theme": "^2.5.3",
|
|
33
33
|
"class-variance-authority": "0.7.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
37
|
-
"@gridui/steps": "
|
|
37
|
+
"@gridui/steps": "2.0.0",
|
|
38
38
|
"@jest/globals": "30.5.2",
|
|
39
39
|
"@storybook/react-vite": "10.6.6",
|
|
40
40
|
"@types/jest": "30.0.0",
|