@chayns-ui/layout 0.8.3 → 0.9.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 +1 -1
- package/dist/app-layout.css +3 -6
- package/dist/components/app-layout/AppLayout.d.ts +1 -0
- package/dist/components/app-layout/AppLayout.d.ts.map +1 -1
- package/dist/components/app-layout/AppLayout.js +27 -2
- package/dist/components/app-layout/AppLayout.js.map +1 -1
- package/dist/components/app-layout/AppLayout.types.d.ts +1 -0
- package/dist/components/app-layout/AppLayout.types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ import { AppLayout } from '@chayns-ui/layout';
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
`AppLayout` wird über `Header`, `Logo`, `Navigation`, rekursive
|
|
24
|
-
`Navigation.Item`, `Content` und `CollapseToggle` komponiert. Der frühere
|
|
24
|
+
`Navigation.Item`, `Content`, `Footer` und `CollapseToggle` komponiert. Der frühere
|
|
25
25
|
`items[]`-Vertrag wurde vor 1.0 entfernt. Tabs verwendet `Tabs.List`,
|
|
26
26
|
`Tabs.Tab value` und `Tabs.Panel value` statt `tabs[]`.
|
|
27
27
|
|
package/dist/app-layout.css
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
.chayns-app-layout__navigation {
|
|
58
58
|
display: flex;
|
|
59
|
-
|
|
59
|
+
flex: 1 1 auto;
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
min-block-size: 0;
|
|
62
62
|
overflow: auto;
|
|
@@ -161,15 +161,12 @@
|
|
|
161
161
|
block-size: var(--ctrl-h);
|
|
162
162
|
border-radius: 50%;
|
|
163
163
|
background: transparent;
|
|
164
|
-
|
|
165
|
-
place-self: end;
|
|
166
|
-
margin: 0 var(--sp-2) var(--sp-2) 0;
|
|
167
|
-
z-index: 1;
|
|
164
|
+
margin-inline-start: auto;
|
|
168
165
|
}
|
|
169
166
|
|
|
170
167
|
.chayns-app-layout__footer {
|
|
171
168
|
display: flex;
|
|
172
|
-
|
|
169
|
+
align-items: center;
|
|
173
170
|
margin-block-start: auto;
|
|
174
171
|
padding-block-start: var(--sp-2);
|
|
175
172
|
border-block-start: 1px solid color-mix(in srgb, var(--on-accent) 35%, transparent);
|
|
@@ -2,6 +2,7 @@ import type { AppLayoutCollapseToggleProps, AppLayoutProps } from './AppLayout.t
|
|
|
2
2
|
export declare const AppLayout: import("react").ForwardRefExoticComponent<Omit<AppLayoutProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
3
|
CollapseToggle: import("react").ForwardRefExoticComponent<Omit<AppLayoutCollapseToggleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
5
6
|
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
6
7
|
Logo: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
7
8
|
Navigation: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/components/app-layout/AppLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/components/app-layout/AppLayout.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,4BAA4B,EAO5B,cAAc,EACf,MAAM,sBAAsB,CAAC;AAgP9B,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAOpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import AppLayoutIcon from "./app-layout-icon/AppLayoutIcon.js";
|
|
2
|
-
import { createContext, forwardRef, useContext, useId, useState } from "react";
|
|
2
|
+
import { Children, createContext, forwardRef, isValidElement, useContext, useId, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/app-layout/AppLayout.tsx
|
|
5
5
|
var LayoutContext = createContext(null);
|
|
@@ -101,6 +101,15 @@ var Content = forwardRef(function Content({ children, className, ...props }, ref
|
|
|
101
101
|
children
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
|
+
var Footer = forwardRef(function Footer({ children, className, ...props }, ref) {
|
|
105
|
+
useLayout("Footer");
|
|
106
|
+
return /* @__PURE__ */ jsx("footer", {
|
|
107
|
+
...props,
|
|
108
|
+
className: ["chayns-app-layout__footer", className].filter(Boolean).join(" "),
|
|
109
|
+
ref,
|
|
110
|
+
children
|
|
111
|
+
});
|
|
112
|
+
});
|
|
104
113
|
var CollapseToggle = forwardRef(function CollapseToggle({ children, className, collapseLabel, expandLabel, onClick, ...props }, ref) {
|
|
105
114
|
const layout = useLayout("CollapseToggle");
|
|
106
115
|
return /* @__PURE__ */ jsx("button", {
|
|
@@ -124,6 +133,10 @@ var Root = forwardRef(function Root({ children, className, collapsed, defaultCol
|
|
|
124
133
|
if (collapsed === void 0) setInternal(next);
|
|
125
134
|
onCollapsedChange?.(next);
|
|
126
135
|
};
|
|
136
|
+
const childParts = Children.toArray(children);
|
|
137
|
+
const sidebarParts = childParts.filter((child) => isValidElement(child) && (child.type === Navigation || child.type === Footer || child.type === CollapseToggle));
|
|
138
|
+
const sidebarPartSet = new Set(sidebarParts);
|
|
139
|
+
let sidebarRendered = false;
|
|
127
140
|
return /* @__PURE__ */ jsx(LayoutContext.Provider, {
|
|
128
141
|
value: {
|
|
129
142
|
collapsed: isCollapsed,
|
|
@@ -137,7 +150,17 @@ var Root = forwardRef(function Root({ children, className, collapsed, defaultCol
|
|
|
137
150
|
className
|
|
138
151
|
].filter(Boolean).join(" "),
|
|
139
152
|
ref,
|
|
140
|
-
children
|
|
153
|
+
children: childParts.map((child) => {
|
|
154
|
+
if (sidebarPartSet.has(child)) {
|
|
155
|
+
if (sidebarRendered) return null;
|
|
156
|
+
sidebarRendered = true;
|
|
157
|
+
return /* @__PURE__ */ jsx("aside", {
|
|
158
|
+
className: "chayns-app-layout__sidebar",
|
|
159
|
+
children: sidebarParts
|
|
160
|
+
}, "sidebar");
|
|
161
|
+
}
|
|
162
|
+
return child;
|
|
163
|
+
})
|
|
141
164
|
})
|
|
142
165
|
});
|
|
143
166
|
});
|
|
@@ -146,11 +169,13 @@ Logo.displayName = "AppLayout.Logo";
|
|
|
146
169
|
Navigation.displayName = "AppLayout.Navigation";
|
|
147
170
|
Object.assign(NavigationItem, { displayName: "AppLayout.Navigation.Item" });
|
|
148
171
|
Content.displayName = "AppLayout.Content";
|
|
172
|
+
Footer.displayName = "AppLayout.Footer";
|
|
149
173
|
CollapseToggle.displayName = "AppLayout.CollapseToggle";
|
|
150
174
|
Root.displayName = "AppLayout";
|
|
151
175
|
var AppLayout = Object.assign(Root, {
|
|
152
176
|
CollapseToggle,
|
|
153
177
|
Content,
|
|
178
|
+
Footer,
|
|
154
179
|
Header,
|
|
155
180
|
Logo,
|
|
156
181
|
Navigation: Object.assign(Navigation, { Item: NavigationItem })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLayout.js","names":[],"sources":["../../../src/components/app-layout/AppLayout.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext, useId, useState } from 'react';\nimport type { ComponentPropsWithRef, Ref } from 'react';\nimport type {\n AppLayoutCollapseToggleProps,\n AppLayoutContentProps,\n AppLayoutHeaderProps,\n AppLayoutLogoProps,\n AppLayoutNavigationItemProps,\n AppLayoutNavigationProps,\n AppLayoutProps,\n} from './AppLayout.types.js';\nimport AppLayoutIcon from './app-layout-icon/AppLayoutIcon.js';\n\ninterface LayoutState {\n collapsed: boolean;\n toggle: () => void;\n}\nconst LayoutContext = createContext<LayoutState | null>(null);\nconst NavigationContext = createContext(false);\nfunction useLayout(part: string) {\n const context = useContext(LayoutContext);\n if (context === null) throw new Error(`AppLayout.${part} must be rendered within AppLayout.`);\n return context;\n}\n\nconst Header = forwardRef<HTMLElement, AppLayoutHeaderProps>(function Header(\n { children, className, ...props },\n ref,\n) {\n useLayout('Header');\n return (\n <header\n {...props}\n className={['chayns-app-layout__header', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n {children}\n </header>\n );\n});\nconst Logo = forwardRef<HTMLImageElement, AppLayoutLogoProps>(function Logo(\n { alt = '', className, ...props },\n ref,\n) {\n useLayout('Logo');\n return (\n <img\n {...props}\n alt={alt}\n className={['chayns-app-layout__logo', className].filter(Boolean).join(' ')}\n ref={ref}\n />\n );\n});\nconst Navigation = forwardRef<HTMLElement, AppLayoutNavigationProps>(function Navigation(\n { children, className, ...props },\n ref,\n) {\n useLayout('Navigation');\n return (\n <NavigationContext.Provider value>\n <nav\n {...props}\n className={['chayns-app-layout__navigation', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n <ul className=\"chayns-app-layout__list\">{children}</ul>\n </nav>\n </NavigationContext.Provider>\n );\n});\nconst NavigationItem = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n AppLayoutNavigationItemProps\n>(function NavigationItem(\n { children, className, href, icon, isActive = false, label, ...props },\n ref,\n) {\n if (!useContext(NavigationContext))\n throw new Error('AppLayout.Navigation.Item must be rendered within AppLayout.Navigation.');\n const { collapsed } = useLayout('Navigation.Item');\n const [expanded, setExpanded] = useState(false);\n const childrenId = useId();\n const hasChildren = children !== undefined;\n const content = (\n <span\n id={`${childrenId}-label`}\n className={`chayns-app-layout__label${collapsed ? ' chayns-app-layout__label--hidden' : ''}`}\n >\n {label}\n </span>\n );\n const actionClass = ['chayns-app-layout__action', className].filter(Boolean).join(' ');\n return (\n <li className={`chayns-app-layout__item${isActive ? ' chayns-app-layout__item--active' : ''}`}>\n <div className=\"chayns-app-layout__row\">\n {href !== undefined ? (\n <a\n {...(props as ComponentPropsWithRef<'a'>)}\n aria-current={isActive ? 'page' : undefined}\n className={actionClass}\n href={href}\n ref={ref as Ref<HTMLAnchorElement>}\n >\n {icon ? <AppLayoutIcon icon={icon} /> : null}\n {content}\n </a>\n ) : (\n <button\n {...(props as ComponentPropsWithRef<'button'>)}\n ref={ref as Ref<HTMLButtonElement>}\n className={actionClass}\n type=\"button\"\n >\n {icon ? <AppLayoutIcon icon={icon} /> : null}\n {content}\n </button>\n )}\n {hasChildren && !collapsed ? (\n <button\n aria-labelledby={`${childrenId}-label`}\n aria-controls={childrenId}\n aria-expanded={expanded}\n className=\"chayns-app-layout__disclosure\"\n onClick={() => setExpanded((current) => !current)}\n type=\"button\"\n >\n <AppLayoutIcon icon=\"fa-chevron-down\" />\n </button>\n ) : null}\n </div>\n {hasChildren && !collapsed ? (\n <div\n aria-hidden={!expanded}\n className={`chayns-app-layout__children${expanded ? ' chayns-app-layout__children--open' : ''}`}\n id={childrenId}\n inert={!expanded}\n >\n <ul className=\"chayns-app-layout__list\">{children}</ul>\n </div>\n ) : null}\n </li>\n );\n});\nconst Content = forwardRef<HTMLElement, AppLayoutContentProps>(function Content(\n { children, className, ...props },\n ref,\n) {\n useLayout('Content');\n return (\n <main\n {...props}\n className={['chayns-app-layout__content', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n {children}\n </main>\n );\n});\nconst CollapseToggle = forwardRef<HTMLButtonElement, AppLayoutCollapseToggleProps>(\n function CollapseToggle(\n { children, className, collapseLabel, expandLabel, onClick, ...props },\n ref,\n ) {\n const layout = useLayout('CollapseToggle');\n return (\n <button\n {...props}\n aria-label={layout.collapsed ? expandLabel : collapseLabel}\n className={['chayns-app-layout__collapse', className].filter(Boolean).join(' ')}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) layout.toggle();\n }}\n ref={ref}\n type=\"button\"\n >\n {children ?? <AppLayoutIcon icon=\"fa-sidebar\" />}\n </button>\n );\n },\n);\nconst Root = forwardRef<HTMLDivElement, AppLayoutProps>(function Root(\n { children, className, collapsed, defaultCollapsed = false, onCollapsedChange, ...props },\n ref,\n) {\n const [internal, setInternal] = useState(defaultCollapsed);\n const isCollapsed = collapsed ?? internal;\n const toggle = () => {\n const next = !isCollapsed;\n if (collapsed === undefined) setInternal(next);\n onCollapsedChange?.(next);\n };\n return (\n <LayoutContext.Provider value={{ collapsed: isCollapsed, toggle }}>\n <div\n {...props}\n className={['chayns-app-layout', isCollapsed && 'chayns-app-layout--collapsed', className]\n .filter(Boolean)\n .join(' ')}\n ref={ref}\n >\n {children}\n </div>\n </LayoutContext.Provider>\n );\n});\nHeader.displayName = 'AppLayout.Header';\nLogo.displayName = 'AppLayout.Logo';\nNavigation.displayName = 'AppLayout.Navigation';\nObject.assign(NavigationItem, { displayName: 'AppLayout.Navigation.Item' });\nContent.displayName = 'AppLayout.Content';\nCollapseToggle.displayName = 'AppLayout.CollapseToggle';\nRoot.displayName = 'AppLayout';\n\nexport const AppLayout = Object.assign(Root, {\n CollapseToggle,\n Content,\n Header,\n Logo,\n Navigation: Object.assign(Navigation, { Item: NavigationItem }),\n});\n"],"mappings":";;;;AAiBA,IAAM,gBAAgB,cAAkC,IAAI;AAC5D,IAAM,oBAAoB,cAAc,KAAK;AAC7C,SAAS,UAAU,MAAc;CAC/B,MAAM,UAAU,WAAW,aAAa;CACxC,IAAI,YAAY,MAAM,MAAM,IAAI,MAAM,aAAa,KAAK,oCA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AAO,OAAO,YAAY,EAAE,MAAM,eAAe,CAAC;AAChE,CAAC"}
|
|
1
|
+
{"version":3,"file":"AppLayout.js","names":[],"sources":["../../../src/components/app-layout/AppLayout.tsx"],"sourcesContent":["import {\n Children,\n createContext,\n forwardRef,\n isValidElement,\n useContext,\n useId,\n useState,\n} from 'react';\nimport type { ComponentPropsWithRef, Ref } from 'react';\nimport type {\n AppLayoutCollapseToggleProps,\n AppLayoutContentProps,\n AppLayoutFooterProps,\n AppLayoutHeaderProps,\n AppLayoutLogoProps,\n AppLayoutNavigationItemProps,\n AppLayoutNavigationProps,\n AppLayoutProps,\n} from './AppLayout.types.js';\nimport AppLayoutIcon from './app-layout-icon/AppLayoutIcon.js';\n\ninterface LayoutState {\n collapsed: boolean;\n toggle: () => void;\n}\nconst LayoutContext = createContext<LayoutState | null>(null);\nconst NavigationContext = createContext(false);\nfunction useLayout(part: string) {\n const context = useContext(LayoutContext);\n if (context === null) throw new Error(`AppLayout.${part} must be rendered within AppLayout.`);\n return context;\n}\n\nconst Header = forwardRef<HTMLElement, AppLayoutHeaderProps>(function Header(\n { children, className, ...props },\n ref,\n) {\n useLayout('Header');\n return (\n <header\n {...props}\n className={['chayns-app-layout__header', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n {children}\n </header>\n );\n});\nconst Logo = forwardRef<HTMLImageElement, AppLayoutLogoProps>(function Logo(\n { alt = '', className, ...props },\n ref,\n) {\n useLayout('Logo');\n return (\n <img\n {...props}\n alt={alt}\n className={['chayns-app-layout__logo', className].filter(Boolean).join(' ')}\n ref={ref}\n />\n );\n});\nconst Navigation = forwardRef<HTMLElement, AppLayoutNavigationProps>(function Navigation(\n { children, className, ...props },\n ref,\n) {\n useLayout('Navigation');\n return (\n <NavigationContext.Provider value>\n <nav\n {...props}\n className={['chayns-app-layout__navigation', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n <ul className=\"chayns-app-layout__list\">{children}</ul>\n </nav>\n </NavigationContext.Provider>\n );\n});\nconst NavigationItem = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n AppLayoutNavigationItemProps\n>(function NavigationItem(\n { children, className, href, icon, isActive = false, label, ...props },\n ref,\n) {\n if (!useContext(NavigationContext))\n throw new Error('AppLayout.Navigation.Item must be rendered within AppLayout.Navigation.');\n const { collapsed } = useLayout('Navigation.Item');\n const [expanded, setExpanded] = useState(false);\n const childrenId = useId();\n const hasChildren = children !== undefined;\n const content = (\n <span\n id={`${childrenId}-label`}\n className={`chayns-app-layout__label${collapsed ? ' chayns-app-layout__label--hidden' : ''}`}\n >\n {label}\n </span>\n );\n const actionClass = ['chayns-app-layout__action', className].filter(Boolean).join(' ');\n return (\n <li className={`chayns-app-layout__item${isActive ? ' chayns-app-layout__item--active' : ''}`}>\n <div className=\"chayns-app-layout__row\">\n {href !== undefined ? (\n <a\n {...(props as ComponentPropsWithRef<'a'>)}\n aria-current={isActive ? 'page' : undefined}\n className={actionClass}\n href={href}\n ref={ref as Ref<HTMLAnchorElement>}\n >\n {icon ? <AppLayoutIcon icon={icon} /> : null}\n {content}\n </a>\n ) : (\n <button\n {...(props as ComponentPropsWithRef<'button'>)}\n ref={ref as Ref<HTMLButtonElement>}\n className={actionClass}\n type=\"button\"\n >\n {icon ? <AppLayoutIcon icon={icon} /> : null}\n {content}\n </button>\n )}\n {hasChildren && !collapsed ? (\n <button\n aria-labelledby={`${childrenId}-label`}\n aria-controls={childrenId}\n aria-expanded={expanded}\n className=\"chayns-app-layout__disclosure\"\n onClick={() => setExpanded((current) => !current)}\n type=\"button\"\n >\n <AppLayoutIcon icon=\"fa-chevron-down\" />\n </button>\n ) : null}\n </div>\n {hasChildren && !collapsed ? (\n <div\n aria-hidden={!expanded}\n className={`chayns-app-layout__children${expanded ? ' chayns-app-layout__children--open' : ''}`}\n id={childrenId}\n inert={!expanded}\n >\n <ul className=\"chayns-app-layout__list\">{children}</ul>\n </div>\n ) : null}\n </li>\n );\n});\nconst Content = forwardRef<HTMLElement, AppLayoutContentProps>(function Content(\n { children, className, ...props },\n ref,\n) {\n useLayout('Content');\n return (\n <main\n {...props}\n className={['chayns-app-layout__content', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n {children}\n </main>\n );\n});\nconst Footer = forwardRef<HTMLElement, AppLayoutFooterProps>(function Footer(\n { children, className, ...props },\n ref,\n) {\n useLayout('Footer');\n return (\n <footer\n {...props}\n className={['chayns-app-layout__footer', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n {children}\n </footer>\n );\n});\nconst CollapseToggle = forwardRef<HTMLButtonElement, AppLayoutCollapseToggleProps>(\n function CollapseToggle(\n { children, className, collapseLabel, expandLabel, onClick, ...props },\n ref,\n ) {\n const layout = useLayout('CollapseToggle');\n return (\n <button\n {...props}\n aria-label={layout.collapsed ? expandLabel : collapseLabel}\n className={['chayns-app-layout__collapse', className].filter(Boolean).join(' ')}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) layout.toggle();\n }}\n ref={ref}\n type=\"button\"\n >\n {children ?? <AppLayoutIcon icon=\"fa-sidebar\" />}\n </button>\n );\n },\n);\nconst Root = forwardRef<HTMLDivElement, AppLayoutProps>(function Root(\n { children, className, collapsed, defaultCollapsed = false, onCollapsedChange, ...props },\n ref,\n) {\n const [internal, setInternal] = useState(defaultCollapsed);\n const isCollapsed = collapsed ?? internal;\n const toggle = () => {\n const next = !isCollapsed;\n if (collapsed === undefined) setInternal(next);\n onCollapsedChange?.(next);\n };\n const childParts = Children.toArray(children);\n const sidebarParts = childParts.filter(\n (child) =>\n isValidElement(child) &&\n (child.type === Navigation || child.type === Footer || child.type === CollapseToggle),\n );\n const sidebarPartSet = new Set(sidebarParts);\n let sidebarRendered = false;\n return (\n <LayoutContext.Provider value={{ collapsed: isCollapsed, toggle }}>\n <div\n {...props}\n className={['chayns-app-layout', isCollapsed && 'chayns-app-layout--collapsed', className]\n .filter(Boolean)\n .join(' ')}\n ref={ref}\n >\n {childParts.map((child) => {\n if (sidebarPartSet.has(child)) {\n if (sidebarRendered) return null;\n sidebarRendered = true;\n return (\n <aside className=\"chayns-app-layout__sidebar\" key=\"sidebar\">\n {sidebarParts}\n </aside>\n );\n }\n return child;\n })}\n </div>\n </LayoutContext.Provider>\n );\n});\nHeader.displayName = 'AppLayout.Header';\nLogo.displayName = 'AppLayout.Logo';\nNavigation.displayName = 'AppLayout.Navigation';\nObject.assign(NavigationItem, { displayName: 'AppLayout.Navigation.Item' });\nContent.displayName = 'AppLayout.Content';\nFooter.displayName = 'AppLayout.Footer';\nCollapseToggle.displayName = 'AppLayout.CollapseToggle';\nRoot.displayName = 'AppLayout';\n\nexport const AppLayout = Object.assign(Root, {\n CollapseToggle,\n Content,\n Footer,\n Header,\n Logo,\n Navigation: Object.assign(Navigation, { Item: NavigationItem }),\n});\n"],"mappings":";;;;AA0BA,IAAM,gBAAgB,cAAkC,IAAI;AAC5D,IAAM,oBAAoB,cAAc,KAAK;AAC7C,SAAS,UAAU,MAAc;CAC/B,MAAM,UAAU,WAAW,aAAa;CACxC,IAAI,YAAY,MAAM,MAAM,IAAI,MAAM,aAAa,KAAK,oCAAoC;CAC5F,OAAO;AACT;AAEA,IAAM,SAAS,WAA8C,SAAS,OACpE,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,UAAU,QAAQ;CAClB,OACE,oBAAC,UAAD;EACE,GAAI;EACJ,WAAW,CAAC,6BAA6B,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACvE;EAEJ;CACK,CAAA;AAEZ,CAAC;AACD,IAAM,OAAO,WAAiD,SAAS,KACrE,EAAE,MAAM,IAAI,WAAW,GAAG,SAC1B,KACA;CACA,UAAU,MAAM;CAChB,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,CAAC,2BAA2B,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACrE;CACN,CAAA;AAEL,CAAC;AACD,IAAM,aAAa,WAAkD,SAAS,WAC5E,EAAE,UAA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;AACrB,eAAe,cAAc;AAC7B,KAAK,cAAc;AAEnB,IAAa,YAAY,OAAO,OAAO,MAAM;CAC3C;CACA;CACA;CACA;CACA;CACA,YAAY,OAAO,OAAO,YAAY,EAAE,MAAM,eAAe,CAAC;AAChE,CAAC"}
|
|
@@ -22,6 +22,7 @@ export type AppLayoutNavigationItemProps = NavigationItemContent & ((Omit<Compon
|
|
|
22
22
|
type?: never;
|
|
23
23
|
}));
|
|
24
24
|
export type AppLayoutContentProps = ComponentPropsWithRef<'main'>;
|
|
25
|
+
export type AppLayoutFooterProps = ComponentPropsWithRef<'footer'>;
|
|
25
26
|
export interface AppLayoutCollapseToggleProps extends Omit<ComponentPropsWithRef<'button'>, 'children' | 'type' | 'aria-label'> {
|
|
26
27
|
collapseLabel: string;
|
|
27
28
|
expandLabel: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLayout.types.d.ts","sourceRoot":"","sources":["../../../src/components/app-layout/AppLayout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACpF,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AACD,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AACnE,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAC9D,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACpE,MAAM,WAAW,qBAAqB;IACpC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAA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BAAqB,CAAC,QAAQ,CAAC,CAAC;AACnE,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAC9D,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACpE,MAAM,WAAW,qBAAqB;IACpC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,GAC9D,CACI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GACjE,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IAC5D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC,CACL,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAClE,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AACnE,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,qBAAqB,CAAC,QAAQ,CAAC,EAC/B,UAAU,GAAG,MAAM,GAAG,YAAY,CACnC;IACC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AppLayout } from './components/app-layout/AppLayout.js';
|
|
2
|
-
export type { AppLayoutCollapseToggleProps, AppLayoutContentProps, AppLayoutHeaderProps, AppLayoutLogoProps, AppLayoutNavigationItemProps, AppLayoutNavigationProps, AppLayoutProps, } from './components/app-layout/AppLayout.types.js';
|
|
2
|
+
export type { AppLayoutCollapseToggleProps, AppLayoutContentProps, AppLayoutFooterProps, AppLayoutHeaderProps, AppLayoutLogoProps, AppLayoutNavigationItemProps, AppLayoutNavigationProps, AppLayoutProps, } from './components/app-layout/AppLayout.types.js';
|
|
3
3
|
export { TABS_APPEARANCES, TabsAppearances } from './components/tabs/Tabs.types.js';
|
|
4
4
|
export { Tabs } from './components/tabs/Tabs.js';
|
|
5
5
|
export type { TabsAppearance, TabsAddProps, TabsListProps, TabsPanelProps, TabsProps, TabsTabProps, } from './components/tabs/Tabs.types.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,YAAY,EACV,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,EACxB,cAAc,GACf,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,YAAY,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,GACb,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,YAAY,EACV,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,EACxB,cAAc,GACf,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,YAAY,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,GACb,MAAM,iCAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-ui/layout",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Accessible application layout components for chayns UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@chayns-ui/core": ">=0.12.
|
|
31
|
+
"@chayns-ui/core": ">=0.12.1",
|
|
32
32
|
"react": ">=18 <20"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@chayns-ui/core": "0.12.
|
|
35
|
+
"@chayns-ui/core": "0.12.1"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=18"
|