@gridui/site-footer 1.2.3 → 2.0.1
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 +4 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +20 -8
- package/docs/catalog.json +7 -2
- package/docs/reference/README.md +5 -0
- package/docs/reference/site-footer-link.md +59 -0
- package/docs/reference/site-footer.md +101 -0
- package/package.json +7 -8
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ below the branding and navigation regions.
|
|
|
23
23
|
## Branding dimensions
|
|
24
24
|
|
|
25
25
|
`brandingWidth` and `brandingMinHeight` accept native CSS lengths or numbers in
|
|
26
|
-
pixels. They also accept `{ base, md?, lg? }`, with `
|
|
26
|
+
pixels. They also accept `{ base, sm?, md?, lg? }`, with `sm` at 40rem, `md` at 48rem, and `lg` at
|
|
27
27
|
64rem. Missing breakpoints inherit the previous value. Dimensions apply only to
|
|
28
28
|
the branding region; native `style` continues to style the footer element.
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ the branding region; native `style` continues to style the footer element.
|
|
|
31
31
|
<SiteFooter
|
|
32
32
|
branding={<h2>Product</h2>}
|
|
33
33
|
sections={sections}
|
|
34
|
-
brandingWidth={{ base: "auto",
|
|
34
|
+
brandingWidth={{ base: "auto", sm: "16rem" }}
|
|
35
35
|
brandingMinHeight={0}
|
|
36
36
|
/>
|
|
37
37
|
```
|
|
@@ -62,3 +62,5 @@ used independently in caller-owned footer branding, credit, or other composition
|
|
|
62
62
|
Links use supporting typography, foreground color, wrapping, and themed spacing
|
|
63
63
|
between inline children. Theme supplies hover and keyboard-focus outlines without
|
|
64
64
|
adding underlines. Applications own destinations, labels, and navigation policy.
|
|
65
|
+
|
|
66
|
+
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
package/dist/index.js
CHANGED
|
@@ -115,7 +115,7 @@ var SiteFooter = (props) => {
|
|
|
115
115
|
{
|
|
116
116
|
direction: {
|
|
117
117
|
base: "column",
|
|
118
|
-
|
|
118
|
+
sm: "row"
|
|
119
119
|
},
|
|
120
120
|
children: [
|
|
121
121
|
/* @__PURE__ */ jsx2(
|
|
@@ -142,7 +142,7 @@ var SiteFooter = (props) => {
|
|
|
142
142
|
{
|
|
143
143
|
direction: {
|
|
144
144
|
base: "column",
|
|
145
|
-
|
|
145
|
+
sm: "row"
|
|
146
146
|
},
|
|
147
147
|
className: cn4(siteFooterSectionsStyles()),
|
|
148
148
|
children: sections.map((section) => {
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/site-footer-link/style.ts", "../src/site-footer-link/site-footer-link.tsx", "../src/site-footer/style.ts", "../src/site-footer/site-footer.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooterLink\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const siteFooterLinkStyles = cva(cn(\n \"gridui-site-footer-link\",\n \"gridui-u-site-footer--inline-flex gridui-u-site-footer--max-w-full gridui-u-site-footer--min-w-0 gridui-u-site-footer--items-center gridui-u-site-footer--gap-gridui-8 gridui-u-site-footer--type-supporting gridui-u-site-footer--text-foreground gridui-u-site-footer--no-underline gridui-u-site-footer--wrap-anywhere\",\n));\n", "/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooterLink\n * @description Site Footer Link\n */\n\nimport { siteFooterLinkStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type SiteFooterLinkProps = ComponentPropsWithRef<\"a\"> & {\n readonly href: string;\n};\n\nexport const SiteFooterLink: FC<SiteFooterLinkProps> = (props: SiteFooterLinkProps) => {\n const { className, ...restProps } = props;\n return (<a\n {...restProps}\n className={cn(siteFooterLinkStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooter\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { resolveResponsive, type Responsive } from \"@gridui/style-utils/responsive\";\nimport { cva } from \"class-variance-authority\";\nimport type { CSSProperties } from \"react\";\n\nexport const siteFooterBrandingStyle = (\n width: Responsive<NonNullable<CSSProperties[\"width\"]>> | undefined,\n minHeight: Responsive<NonNullable<CSSProperties[\"minHeight\"]>> | undefined,\n): CSSProperties & {\n [key: `--gridui-footer-branding-${string}`]: string;\n} => {\n const style: CSSProperties & {\n [key: `--gridui-footer-branding-${string}`]: string;\n } = {};\n for (const [\n name,\n value,\n ] of [\n [\n \"width\",\n width,\n ],\n [\n \"min-height\",\n minHeight,\n ],\n ] as const) {\n if (value === undefined) {\n continue;\n }\n const values = resolveResponsive(value);\n for (const [\n breakpoint,\n size,\n ] of Object.entries(values)) {\n style[`--gridui-footer-branding-${name}-${breakpoint}`] = typeof size === \"number\" ? `${size}px` : size;\n }\n }\n return style;\n};\n\nexport const siteFooterStyles = cva(cn(\n \"gridui-site-footer\",\n \"gridui-u-site-footer--[&_.gridui-site-footer-brand]:flex gridui-u-site-footer--[&_.gridui-site-footer-brand]:flex-col gridui-u-site-footer--[&_.gridui-site-footer-brand]:items-start gridui-u-site-footer--[&_.gridui-site-footer-brand]:gap-gridui-8\",\n));\n\nexport const siteFooterGridStyles = cva(cn(\n \"gridui-site-footer-grid\",\n \"gridui-u-site-footer--min-w-0\",\n));\n\nexport const siteFooterSectionsStyles = cva(cn(\n \"gridui-site-footer-sections\",\n \"gridui-u-site-footer--min-w-0\",\n));\n\nexport const siteFooterBrandingStyles = cva(cn(\n \"gridui-site-footer-branding\",\n \"gridui-u-site-footer--[&_h2]:font-brand gridui-u-site-footer--[&_h2]:text-[1.5rem] gridui-u-site-footer--[&_h2]:font-medium gridui-u-site-footer--[&_h2]:leading-[1.2]\",\n));\n\nexport const siteFooterSectionStyles = cva(cn(\n \"gridui-site-footer-section\",\n \"gridui-u-site-footer--min-w-0 gridui-u-site-footer--py-gridui-32 gridui-u-site-footer--px-gridui-24\",\n \"gridui-u-site-footer--[&_h2]:mt-0 gridui-u-site-footer--[&_h2]:mx-0 gridui-u-site-footer--[&_h2]:mb-gridui-16 gridui-u-site-footer--[&_h2]:type-subheading\",\n \"gridui-u-site-footer--[&_ul]:flex gridui-u-site-footer--[&_ul]:flex-col gridui-u-site-footer--[&_ul]:gap-gridui-8 gridui-u-site-footer--[&_ul]:m-0 gridui-u-site-footer--[&_ul]:p-0 gridui-u-site-footer--[&_ul]:[list-style:none] gridui-u-site-footer--[&_ul]:type-supporting\",\n));\n", "/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooter\n * @description Site Footer\n */\n\nimport { SiteFooterLink } from \"../site-footer-link/site-footer-link\";\nimport { siteFooterBrandingStyle, siteFooterBrandingStyles, siteFooterGridStyles, siteFooterSectionsStyles, siteFooterSectionStyles, siteFooterStyles } from \"./style\";\nimport { FrameFooter, type FrameFooterProps, Split } from \"@gridui/grid\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive } from \"@gridui/style-utils/responsive\";\nimport type { CSSProperties, FC, ReactNode } from \"react\";\n\nexport type SiteFooterLinkItem = {\n readonly label: string;\n readonly href: string;\n};\n\nexport type SiteFooterSection = {\n readonly heading: string;\n readonly links: readonly SiteFooterLinkItem[];\n};\n\nexport type SiteFooterProps = Omit<FrameFooterProps, \"children\" | \"contentLayout\" | \"padding\" | \"signatureAppearance\"> & {\n readonly branding?: ReactNode;\n readonly brandingWidth?: Responsive<NonNullable<CSSProperties[\"width\"]>>;\n readonly brandingMinHeight?: Responsive<NonNullable<CSSProperties[\"minHeight\"]>>;\n readonly credit?: ReactNode;\n readonly creditPlacement?: \"after-sections\" | \"branding\";\n readonly agents?: ReactNode;\n readonly sections: readonly SiteFooterSection[];\n};\n\nexport const SiteFooter: FC<SiteFooterProps> = (props: SiteFooterProps) => {\n const {\n branding,\n brandingWidth,\n brandingMinHeight,\n credit,\n creditPlacement = \"after-sections\",\n agents,\n sections,\n tone = \"brand\",\n boundary = \"band\",\n className,\n ...restProps\n } = props;\n const creditInBranding = creditPlacement === \"branding\";\n return (<FrameFooter\n {...restProps}\n tone={tone}\n boundary={boundary}\n padding={0}\n contentLayout=\"block\"\n signatureAppearance=\"cropped\"\n className={cn(siteFooterStyles(), className)}\n >\n <div\n className={cn(siteFooterGridStyles())}\n >\n <Split\n direction={{\n base: \"column\",\n
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooterLink\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const siteFooterLinkStyles = cva(cn(\n \"gridui-site-footer-link\",\n \"gridui-u-site-footer--inline-flex gridui-u-site-footer--max-w-full gridui-u-site-footer--min-w-0 gridui-u-site-footer--items-center gridui-u-site-footer--gap-gridui-8 gridui-u-site-footer--type-supporting gridui-u-site-footer--text-foreground gridui-u-site-footer--no-underline gridui-u-site-footer--wrap-anywhere\",\n));\n", "/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooterLink\n * @description Site Footer Link\n */\n\nimport { siteFooterLinkStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type SiteFooterLinkProps = ComponentPropsWithRef<\"a\"> & {\n readonly href: string;\n};\n\nexport const SiteFooterLink: FC<SiteFooterLinkProps> = (props: SiteFooterLinkProps) => {\n const { className, ...restProps } = props;\n return (<a\n {...restProps}\n className={cn(siteFooterLinkStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooter\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { resolveResponsive, type Responsive } from \"@gridui/style-utils/responsive\";\nimport { cva } from \"class-variance-authority\";\nimport type { CSSProperties } from \"react\";\n\nexport const siteFooterBrandingStyle = (\n width: Responsive<NonNullable<CSSProperties[\"width\"]>> | undefined,\n minHeight: Responsive<NonNullable<CSSProperties[\"minHeight\"]>> | undefined,\n): CSSProperties & {\n [key: `--gridui-footer-branding-${string}`]: string;\n} => {\n const style: CSSProperties & {\n [key: `--gridui-footer-branding-${string}`]: string;\n } = {};\n for (const [\n name,\n value,\n ] of [\n [\n \"width\",\n width,\n ],\n [\n \"min-height\",\n minHeight,\n ],\n ] as const) {\n if (value === undefined) {\n continue;\n }\n const values = resolveResponsive(value);\n for (const [\n breakpoint,\n size,\n ] of Object.entries(values)) {\n style[`--gridui-footer-branding-${name}-${breakpoint}`] = typeof size === \"number\" ? `${size}px` : size;\n }\n }\n return style;\n};\n\nexport const siteFooterStyles = cva(cn(\n \"gridui-site-footer\",\n \"gridui-u-site-footer--[&_.gridui-site-footer-brand]:flex gridui-u-site-footer--[&_.gridui-site-footer-brand]:flex-col gridui-u-site-footer--[&_.gridui-site-footer-brand]:items-start gridui-u-site-footer--[&_.gridui-site-footer-brand]:gap-gridui-8\",\n));\n\nexport const siteFooterGridStyles = cva(cn(\n \"gridui-site-footer-grid\",\n \"gridui-u-site-footer--min-w-0\",\n));\n\nexport const siteFooterSectionsStyles = cva(cn(\n \"gridui-site-footer-sections\",\n \"gridui-u-site-footer--min-w-0\",\n));\n\nexport const siteFooterBrandingStyles = cva(cn(\n \"gridui-site-footer-branding\",\n \"gridui-u-site-footer--[&_h2]:font-brand gridui-u-site-footer--[&_h2]:text-[1.5rem] gridui-u-site-footer--[&_h2]:font-medium gridui-u-site-footer--[&_h2]:leading-[1.2]\",\n));\n\nexport const siteFooterSectionStyles = cva(cn(\n \"gridui-site-footer-section\",\n \"gridui-u-site-footer--min-w-0 gridui-u-site-footer--py-gridui-32 gridui-u-site-footer--px-gridui-24\",\n \"gridui-u-site-footer--[&_h2]:mt-0 gridui-u-site-footer--[&_h2]:mx-0 gridui-u-site-footer--[&_h2]:mb-gridui-16 gridui-u-site-footer--[&_h2]:type-subheading\",\n \"gridui-u-site-footer--[&_ul]:flex gridui-u-site-footer--[&_ul]:flex-col gridui-u-site-footer--[&_ul]:gap-gridui-8 gridui-u-site-footer--[&_ul]:m-0 gridui-u-site-footer--[&_ul]:p-0 gridui-u-site-footer--[&_ul]:[list-style:none] gridui-u-site-footer--[&_ul]:type-supporting\",\n));\n", "/**\n * @author WMXPY\n * @package Site Footer\n * @namespace SiteFooter\n * @description Site Footer\n */\n\nimport { SiteFooterLink } from \"../site-footer-link/site-footer-link\";\nimport { siteFooterBrandingStyle, siteFooterBrandingStyles, siteFooterGridStyles, siteFooterSectionsStyles, siteFooterSectionStyles, siteFooterStyles } from \"./style\";\nimport { FrameFooter, type FrameFooterProps, Split } from \"@gridui/grid\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive } from \"@gridui/style-utils/responsive\";\nimport type { CSSProperties, FC, ReactNode } from \"react\";\n\nexport type SiteFooterLinkItem = {\n readonly label: string;\n readonly href: string;\n};\n\nexport type SiteFooterSection = {\n readonly heading: string;\n readonly links: readonly SiteFooterLinkItem[];\n};\n\nexport type SiteFooterProps = Omit<FrameFooterProps, \"children\" | \"contentLayout\" | \"padding\" | \"signatureAppearance\"> & {\n readonly branding?: ReactNode;\n readonly brandingWidth?: Responsive<NonNullable<CSSProperties[\"width\"]>>;\n readonly brandingMinHeight?: Responsive<NonNullable<CSSProperties[\"minHeight\"]>>;\n readonly credit?: ReactNode;\n readonly creditPlacement?: \"after-sections\" | \"branding\";\n readonly agents?: ReactNode;\n readonly sections: readonly SiteFooterSection[];\n};\n\nexport const SiteFooter: FC<SiteFooterProps> = (props: SiteFooterProps) => {\n const {\n branding,\n brandingWidth,\n brandingMinHeight,\n credit,\n creditPlacement = \"after-sections\",\n agents,\n sections,\n tone = \"brand\",\n boundary = \"band\",\n className,\n ...restProps\n } = props;\n const creditInBranding = creditPlacement === \"branding\";\n return (<FrameFooter\n {...restProps}\n tone={tone}\n boundary={boundary}\n padding={0}\n contentLayout=\"block\"\n signatureAppearance=\"cropped\"\n className={cn(siteFooterStyles(), className)}\n >\n <div\n className={cn(siteFooterGridStyles())}\n >\n <Split\n direction={{\n base: \"column\",\n sm: \"row\",\n }}\n >\n <div\n className={cn(siteFooterBrandingStyles())}\n data-branding-width={brandingWidth === undefined ? undefined : \"custom\"}\n data-credit-placement={creditInBranding ? \"branding\" : undefined}\n style={siteFooterBrandingStyle(brandingWidth, brandingMinHeight)}\n >\n {creditInBranding ? (<>\n <div\n className=\"gridui-site-footer-branding-content\"\n >\n {branding}\n </div>\n {credit}\n </>) : branding}\n </div>\n {sections.length > 0 && (<Split\n direction={{\n base: \"column\",\n sm: \"row\",\n }}\n className={cn(siteFooterSectionsStyles())}\n >\n {sections.map((section) => {\n return (<nav\n key={section.heading}\n aria-label={section.heading}\n className={cn(siteFooterSectionStyles())}\n >\n <h2>\n {section.heading}\n </h2>\n <ul>\n {section.links.map((link) => {\n return (<li\n key={link.href}\n >\n <SiteFooterLink\n href={link.href}\n >\n {link.label}\n </SiteFooterLink>\n </li>);\n })}\n </ul>\n </nav>);\n })}\n </Split>)}\n </Split>\n {!creditInBranding && credit}\n </div>\n {agents}\n </FrameFooter>);\n};\n"],
|
|
5
5
|
"mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,uBAAuB,IAAI;AAAA,EACpC;AAAA,EACA;AACJ,CAAC;;;ACLD,SAAS,MAAAA,WAAU;AASP;AAFL,IAAM,iBAA0C,CAAC,UAA+B;AACnF,QAAM,EAAE,WAAW,GAAG,UAAU,IAAI;AACpC,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,WAAWA,IAAG,qBAAqB,GAAG,SAAS;AAAA;AAAA,EACnD;AACJ;;;ACdA,SAAS,MAAAC,WAAU;AACnB,SAAS,yBAA0C;AACnD,SAAS,OAAAC,YAAW;AAGb,IAAM,0BAA0B,CACnC,OACA,cAGC;AACD,QAAM,QAEF,CAAC;AACL,aAAW;AAAA,IACP;AAAA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A,wBACJ,CAAC;AAAA;AAAA,oBACL;AAAA;AAAA;AAAA,cACJ;AAAA,cACC,CAAC,oBAAoB;AAAA;AAAA;AAAA,QAC1B;AAAA,QACC;AAAA;AAAA;AAAA,EACL;AACJ;",
|
|
6
6
|
"names": ["cn", "cn", "cva", "cn", "jsx"]
|
|
7
7
|
}
|
package/dist/styles.css
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
.gridui-u-site-footer--type-supporting {
|
|
33
33
|
font: var(--gridui-type-supporting);
|
|
34
|
+
font-family: var(--gridui-font-body);
|
|
34
35
|
letter-spacing: normal;
|
|
35
36
|
}
|
|
36
37
|
.gridui-u-site-footer--wrap-anywhere {
|
|
@@ -63,6 +64,12 @@
|
|
|
63
64
|
.gridui-u-site-footer--\[\&_h2\]\:mb-gridui-16 h2 {
|
|
64
65
|
margin-bottom: var(--gridui-space-16);
|
|
65
66
|
}
|
|
67
|
+
.gridui-u-site-footer--\[\&_h2\]\:type-subheading h2 {
|
|
68
|
+
font: var(--gridui-type-subheading);
|
|
69
|
+
font-family: var(--gridui-font-body);
|
|
70
|
+
letter-spacing: normal;
|
|
71
|
+
text-wrap: balance;
|
|
72
|
+
}
|
|
66
73
|
.gridui-u-site-footer--\[\&_h2\]\:font-brand h2 {
|
|
67
74
|
font-family: var(--gridui-font-brand);
|
|
68
75
|
}
|
|
@@ -77,11 +84,6 @@
|
|
|
77
84
|
--tw-font-weight: var(--font-weight-medium);
|
|
78
85
|
font-weight: var(--font-weight-medium);
|
|
79
86
|
}
|
|
80
|
-
.gridui-u-site-footer--\[\&_h2\]\:type-subheading h2 {
|
|
81
|
-
font: var(--gridui-type-subheading);
|
|
82
|
-
letter-spacing: normal;
|
|
83
|
-
text-wrap: balance;
|
|
84
|
-
}
|
|
85
87
|
.gridui-u-site-footer--\[\&_ul\]\:m-0 ul {
|
|
86
88
|
margin: 0px;
|
|
87
89
|
}
|
|
@@ -99,6 +101,7 @@
|
|
|
99
101
|
}
|
|
100
102
|
.gridui-u-site-footer--\[\&_ul\]\:type-supporting ul {
|
|
101
103
|
font: var(--gridui-type-supporting);
|
|
104
|
+
font-family: var(--gridui-font-body);
|
|
102
105
|
letter-spacing: normal;
|
|
103
106
|
}
|
|
104
107
|
.gridui-u-site-footer--\[\&_ul\]\:\[list-style\:none\] ul {
|
|
@@ -126,11 +129,11 @@
|
|
|
126
129
|
.gridui-site-footer-branding {
|
|
127
130
|
flex: 1 1 25%;
|
|
128
131
|
min-width: 12rem;
|
|
129
|
-
min-height: var(--gridui-footer-branding-min-height-
|
|
132
|
+
min-height: var(--gridui-footer-branding-min-height-sm, calc(var(--spacing) * 56));
|
|
130
133
|
}
|
|
131
134
|
.gridui-site-footer-branding[data-branding-width] {
|
|
132
|
-
flex: 0 0 var(--gridui-footer-branding-width-
|
|
133
|
-
width: var(--gridui-footer-branding-width-
|
|
135
|
+
flex: 0 0 var(--gridui-footer-branding-width-sm);
|
|
136
|
+
width: var(--gridui-footer-branding-width-sm);
|
|
134
137
|
min-width: 0;
|
|
135
138
|
}
|
|
136
139
|
.gridui-site-footer-sections {
|
|
@@ -140,6 +143,15 @@
|
|
|
140
143
|
flex: 1 1 0;
|
|
141
144
|
}
|
|
142
145
|
}
|
|
146
|
+
@media (min-width: 48rem) {
|
|
147
|
+
.gridui-site-footer-branding {
|
|
148
|
+
min-height: var(--gridui-footer-branding-min-height-md, calc(var(--spacing) * 56));
|
|
149
|
+
}
|
|
150
|
+
.gridui-site-footer-branding[data-branding-width] {
|
|
151
|
+
flex-basis: var(--gridui-footer-branding-width-md);
|
|
152
|
+
width: var(--gridui-footer-branding-width-md);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
143
155
|
@media (min-width: 64rem) {
|
|
144
156
|
.gridui-site-footer-branding {
|
|
145
157
|
min-height: var(--gridui-footer-branding-min-height-lg, calc(var(--spacing) * 56));
|
package/docs/catalog.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/site-footer",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"category": "landing",
|
|
6
6
|
"description": "GridUI React site footer",
|
|
7
7
|
"usage": "Pass `sections`, caller-owned `branding`, optional `credit`, and optional `agents`. The composition owns responsive structural regions through Grid Split and FrameFooter. Section links use the public SiteFooterLink component. SiteFooterLinkItem is the link data contract containing `label` and `href`; it replaces the former data type named SiteFooterLink without a compatibility alias.",
|
|
8
8
|
"documentation": [
|
|
9
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"docs/reference/README.md",
|
|
11
|
+
"docs/reference/site-footer-link.md",
|
|
12
|
+
"docs/reference/site-footer.md"
|
|
10
13
|
],
|
|
11
14
|
"exports": [
|
|
12
15
|
{
|
|
@@ -46,6 +49,8 @@
|
|
|
46
49
|
"@gridui/site-footer/styles.css"
|
|
47
50
|
],
|
|
48
51
|
"examples": [
|
|
52
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-landing/site-footer/stories/footers.mdx",
|
|
53
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-landing/site-footer/stories/getting-started.mdx",
|
|
49
54
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-landing/site-footer/stories/site-footer.stories.tsx"
|
|
50
55
|
]
|
|
51
56
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# SiteFooterLink
|
|
3
|
+
|
|
4
|
+
Public SiteFooterLink component from @gridui/site-footer. See the package guide for its composition contract.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/site-footer`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { SiteFooterLink } from "@gridui/site-footer";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/site-footer/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-landing/site-footer/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
|
+
### href
|
|
21
|
+
|
|
22
|
+
``string`` · Required
|
|
23
|
+
|
|
24
|
+
### children
|
|
25
|
+
|
|
26
|
+
``ReactNode`` · Optional
|
|
27
|
+
|
|
28
|
+
Content rendered inside the component.
|
|
29
|
+
|
|
30
|
+
### onFocus
|
|
31
|
+
|
|
32
|
+
``(event: FocusEvent<HTMLAnchorElement, Element>): void`` · Optional
|
|
33
|
+
|
|
34
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
35
|
+
|
|
36
|
+
### onBlur
|
|
37
|
+
|
|
38
|
+
``(event: FocusEvent<HTMLAnchorElement, Element>): void`` · Optional
|
|
39
|
+
|
|
40
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
41
|
+
|
|
42
|
+
### onChange
|
|
43
|
+
|
|
44
|
+
``(event: ChangeEvent<HTMLAnchorElement, Element>): void`` · Optional
|
|
45
|
+
|
|
46
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
47
|
+
|
|
48
|
+
### onSubmit
|
|
49
|
+
|
|
50
|
+
``(event: SubmitEvent<HTMLAnchorElement>): void`` · Optional
|
|
51
|
+
|
|
52
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
53
|
+
|
|
54
|
+
### onClick
|
|
55
|
+
|
|
56
|
+
``(event: MouseEvent<HTMLAnchorElement, MouseEvent>): void`` · Optional
|
|
57
|
+
|
|
58
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
59
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# SiteFooter
|
|
3
|
+
|
|
4
|
+
Composes branding, navigation, and supporting information at the end of a site. Applications supply destinations and legal copy.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/site-footer`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { SiteFooter } from "@gridui/site-footer";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/site-footer/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-landing/site-footer/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-landing/site-footer/stories/site-footer.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
|
+
### onFocus
|
|
23
|
+
|
|
24
|
+
``(event: FocusEvent<HTMLElement, Element>): void`` · Optional
|
|
25
|
+
|
|
26
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
27
|
+
|
|
28
|
+
### onBlur
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onChange
|
|
35
|
+
|
|
36
|
+
``(event: ChangeEvent<HTMLElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onSubmit
|
|
41
|
+
|
|
42
|
+
``(event: SubmitEvent<HTMLElement>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onClick
|
|
47
|
+
|
|
48
|
+
``(event: MouseEvent<HTMLElement, MouseEvent>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### boundary
|
|
53
|
+
|
|
54
|
+
``FrameBoundaryStyle | undefined`` · Optional
|
|
55
|
+
|
|
56
|
+
Default: ``"band"``
|
|
57
|
+
|
|
58
|
+
### decoration
|
|
59
|
+
|
|
60
|
+
``FrameDecorationStyle | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
### tone
|
|
63
|
+
|
|
64
|
+
``FrameTone | undefined`` · Optional
|
|
65
|
+
|
|
66
|
+
Default: ``"brand"``
|
|
67
|
+
|
|
68
|
+
### signature
|
|
69
|
+
|
|
70
|
+
``ReactNode`` · Optional
|
|
71
|
+
|
|
72
|
+
### branding
|
|
73
|
+
|
|
74
|
+
``ReactNode`` · Optional
|
|
75
|
+
|
|
76
|
+
### brandingWidth
|
|
77
|
+
|
|
78
|
+
``Responsive<NonNullable<Property.Width<string | number> | undefined>> | undefined`` · Optional
|
|
79
|
+
|
|
80
|
+
### brandingMinHeight
|
|
81
|
+
|
|
82
|
+
``Responsive<NonNullable<Property.MinHeight<string | number> | undefined>> | undefined`` · Optional
|
|
83
|
+
|
|
84
|
+
### credit
|
|
85
|
+
|
|
86
|
+
``ReactNode`` · Optional
|
|
87
|
+
|
|
88
|
+
### creditPlacement
|
|
89
|
+
|
|
90
|
+
``"after-sections" | "branding" | undefined`` · Optional
|
|
91
|
+
|
|
92
|
+
Default: ``"after-sections"``
|
|
93
|
+
|
|
94
|
+
### agents
|
|
95
|
+
|
|
96
|
+
``ReactNode`` · Optional
|
|
97
|
+
|
|
98
|
+
### sections
|
|
99
|
+
|
|
100
|
+
``readonly SiteFooterSection[]`` · Required
|
|
101
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/site-footer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "GridUI React site footer",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"react-dom": "^19.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@gridui/grid": "^
|
|
31
|
-
"@gridui/style-utils": "^
|
|
32
|
-
"@gridui/theme": "^
|
|
30
|
+
"@gridui/grid": "^3.1.0",
|
|
31
|
+
"@gridui/style-utils": "^4.0.0",
|
|
32
|
+
"@gridui/theme": "^3.0.0",
|
|
33
33
|
"class-variance-authority": "0.7.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
37
|
-
"@gridui/brand-link": "1.0.
|
|
37
|
+
"@gridui/brand-link": "1.0.7",
|
|
38
38
|
"@jest/globals": "30.5.2",
|
|
39
|
-
"@storybook/react-vite": "10.6.
|
|
39
|
+
"@storybook/react-vite": "10.6.7",
|
|
40
40
|
"@types/jest": "30.0.0",
|
|
41
41
|
"@types/node": "26.6.6",
|
|
42
42
|
"@types/react": "19.3.0",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node ../../scripts/compilation/package.ts",
|
|
51
51
|
"compile": "tsc --project tsconfig.json",
|
|
52
|
-
"test": "jest"
|
|
53
|
-
"coverage": "jest --coverage"
|
|
52
|
+
"test": "jest"
|
|
54
53
|
}
|
|
55
54
|
}
|