@amboss/design-system 4.17.0 → 4.18.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/build/cjs/components/Layout/-types.d.ts +6 -3
- package/build/cjs/components/Layout/Content/Content.d.ts +1 -3
- package/build/cjs/components/Layout/Content/Content.js +1 -1
- package/build/cjs/components/Layout/Content/ContentPanel.d.ts +4 -6
- package/build/cjs/components/Layout/Content/ContentPanel.js +1 -1
- package/build/esm/components/Layout/-types.d.ts +6 -3
- package/build/esm/components/Layout/Content/Content.d.ts +1 -3
- package/build/esm/components/Layout/Content/Content.js +1 -1
- package/build/esm/components/Layout/Content/ContentPanel.d.ts +4 -6
- package/build/esm/components/Layout/Content/ContentPanel.js +1 -1
- package/package.json +1 -1
|
@@ -265,7 +265,7 @@ export type LayoutValue = {
|
|
|
265
265
|
};
|
|
266
266
|
/** Forwarded to a panel's underlying scroll container (scroll restoration,
|
|
267
267
|
* custom scroll handling). Shared by every panel-like slot backed by a
|
|
268
|
-
* {@link PanelContainer} - `leftPanel`, `rightPanel`, `
|
|
268
|
+
* {@link PanelContainer} - `leftPanel`, `rightPanel`, `splitview`. */
|
|
269
269
|
export type ForwardedScrollProps = {
|
|
270
270
|
scrollContainerRef?: React.Ref<HTMLDivElement>;
|
|
271
271
|
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
@@ -310,7 +310,10 @@ export type LeftPanelProps = Omit<SidePanelProps, "defaultSize" | "resizable"> &
|
|
|
310
310
|
* as on mobile (`role="dialog"`). Ignored by the docked desktop panel. */
|
|
311
311
|
"aria-label": string;
|
|
312
312
|
};
|
|
313
|
-
export type ContentProps =
|
|
313
|
+
export type ContentProps = {
|
|
314
|
+
children: React.ReactNode;
|
|
315
|
+
};
|
|
316
|
+
export type ContentPanelProps = ForwardedScrollProps & {
|
|
314
317
|
/** Panel content in source order. `<Layout.ContentHeader />` /
|
|
315
318
|
* `<Layout.ContentFooter />` children stick to the edges; the rest scrolls. */
|
|
316
319
|
children: React.ReactNode;
|
|
@@ -450,7 +453,7 @@ export type RightPanelHeaderProps = PanelSlotHeaderProps & {
|
|
|
450
453
|
export type RightPanelFooterProps = PanelSlotFooterProps;
|
|
451
454
|
/**
|
|
452
455
|
* Title shown in the content header, after `leftSlot`. Visual only — the
|
|
453
|
-
* panel's accessible name comes from `
|
|
456
|
+
* panel's accessible name comes from `ContentPanel`'s `aria-label`.
|
|
454
457
|
*/
|
|
455
458
|
export type ContentHeaderTitle = PanelHeaderTitle;
|
|
456
459
|
export type ContentHeaderSlotProps = {
|
|
@@ -6,8 +6,6 @@ import type { ContentProps } from "../-types";
|
|
|
6
6
|
* presentation: in-flow in the `content` slot ({@link ContentDocked}) normally,
|
|
7
7
|
* and the mobile split's sliding base layer ({@link ContentSplitBase}) when a
|
|
8
8
|
* `Layout.Split` is stacked over it - so the split pushes content aside instead
|
|
9
|
-
* of just covering it.
|
|
10
|
-
* so `Layout.ContentHeader` / `Layout.ContentFooter` children stick to the
|
|
11
|
-
* panel edges; the remaining content scrolls.
|
|
9
|
+
* of just covering it.
|
|
12
10
|
*/
|
|
13
11
|
export declare const Content: React.FC<ContentProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Content",{enumerable:!0,get:function(){return Content}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_constants=require("../-constants"),_registry=require("../registry"),_ContentSplitBase=require("../Split/MobileSplitView/ContentSplitBase"),_useMobileSplitStack=require("../Split/MobileSplitView/useMobileSplitStack"),_useMobileSplitView=require("../Split/MobileSplitView/useMobileSplitView"),_ContentDocked=require("./ContentDocked"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Content",{enumerable:!0,get:function(){return Content}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_constants=require("../-constants"),_registry=require("../registry"),_ContentSplitBase=require("../Split/MobileSplitView/ContentSplitBase"),_useMobileSplitStack=require("../Split/MobileSplitView/useMobileSplitStack"),_useMobileSplitView=require("../Split/MobileSplitView/useMobileSplitView"),_ContentDocked=require("./ContentDocked"),Content=({children})=>{(0,_registry.useDeclarePanel)(_constants.Slot.content,{collapsible:!1});let enabled=(0,_useMobileSplitView.useMobileSplitViewEnabled)(),{host,isSplitPresent}=(0,_useMobileSplitStack.useMobileSplitStack)();return enabled&&isSplitPresent&&null!==host?_react.default.createElement(_ContentSplitBase.ContentSplitBase,null,children):_react.default.createElement(_ContentDocked.ContentDocked,null,children)};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ContentPanelProps } from "../-types";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* the edges, without `PanelContainer`'s Container - as with the left panel's
|
|
7
|
-
* layers - so content keeps the layout and stacking it had without one.
|
|
4
|
+
* Scrollable frame for content headers and footers. Temporarily not mounted by
|
|
5
|
+
* `Layout.Content` while the accessibility regression in #2043 is unresolved.
|
|
8
6
|
*/
|
|
9
|
-
export declare function ContentPanel({ children, background, "aria-label": ariaLabel, scrollContainerRef, onScroll, "data-e2e-test-id": dataE2eTestId, }:
|
|
7
|
+
export declare function ContentPanel({ children, background, "aria-label": ariaLabel, scrollContainerRef, onScroll, "data-e2e-test-id": dataE2eTestId, }: ContentPanelProps): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ContentPanel",{enumerable:!0,get:function(){return ContentPanel}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/_interop_require_default._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_Sandwich=require("../../Internal/Sandwich/Sandwich"),StyledContentFrame=(0,_styled.default)("div",{target:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ContentPanel",{enumerable:!0,get:function(){return ContentPanel}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/_interop_require_default._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_Sandwich=require("../../Internal/Sandwich/Sandwich"),StyledContentFrame=(0,_styled.default)("div",{target:"e1spy2ji0",label:"StyledContentFrame"})(({theme,background})=>({height:"100%",backgroundColor:"primary"===background?theme.values.color.background.primary.default:"transparent"})),StyledContentFill=(0,_styled.default)("div",{target:"e1spy2ji1",label:"StyledContentFill"})({position:"absolute",inset:0});function ContentPanel({children,background="transparent","aria-label":ariaLabel,scrollContainerRef,onScroll,"data-e2e-test-id":dataE2eTestId}){return _react.default.createElement(StyledContentFrame,{background:background,role:ariaLabel?"region":void 0,"aria-label":ariaLabel,"data-e2e-test-id":dataE2eTestId},_react.default.createElement(_Sandwich.Sandwich,{scrollRef:scrollContainerRef,onScroll:onScroll},_react.default.createElement(StyledContentFill,null,children)))}
|
|
@@ -265,7 +265,7 @@ export type LayoutValue = {
|
|
|
265
265
|
};
|
|
266
266
|
/** Forwarded to a panel's underlying scroll container (scroll restoration,
|
|
267
267
|
* custom scroll handling). Shared by every panel-like slot backed by a
|
|
268
|
-
* {@link PanelContainer} - `leftPanel`, `rightPanel`, `
|
|
268
|
+
* {@link PanelContainer} - `leftPanel`, `rightPanel`, `splitview`. */
|
|
269
269
|
export type ForwardedScrollProps = {
|
|
270
270
|
scrollContainerRef?: React.Ref<HTMLDivElement>;
|
|
271
271
|
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
@@ -310,7 +310,10 @@ export type LeftPanelProps = Omit<SidePanelProps, "defaultSize" | "resizable"> &
|
|
|
310
310
|
* as on mobile (`role="dialog"`). Ignored by the docked desktop panel. */
|
|
311
311
|
"aria-label": string;
|
|
312
312
|
};
|
|
313
|
-
export type ContentProps =
|
|
313
|
+
export type ContentProps = {
|
|
314
|
+
children: React.ReactNode;
|
|
315
|
+
};
|
|
316
|
+
export type ContentPanelProps = ForwardedScrollProps & {
|
|
314
317
|
/** Panel content in source order. `<Layout.ContentHeader />` /
|
|
315
318
|
* `<Layout.ContentFooter />` children stick to the edges; the rest scrolls. */
|
|
316
319
|
children: React.ReactNode;
|
|
@@ -450,7 +453,7 @@ export type RightPanelHeaderProps = PanelSlotHeaderProps & {
|
|
|
450
453
|
export type RightPanelFooterProps = PanelSlotFooterProps;
|
|
451
454
|
/**
|
|
452
455
|
* Title shown in the content header, after `leftSlot`. Visual only — the
|
|
453
|
-
* panel's accessible name comes from `
|
|
456
|
+
* panel's accessible name comes from `ContentPanel`'s `aria-label`.
|
|
454
457
|
*/
|
|
455
458
|
export type ContentHeaderTitle = PanelHeaderTitle;
|
|
456
459
|
export type ContentHeaderSlotProps = {
|
|
@@ -6,8 +6,6 @@ import type { ContentProps } from "../-types";
|
|
|
6
6
|
* presentation: in-flow in the `content` slot ({@link ContentDocked}) normally,
|
|
7
7
|
* and the mobile split's sliding base layer ({@link ContentSplitBase}) when a
|
|
8
8
|
* `Layout.Split` is stacked over it - so the split pushes content aside instead
|
|
9
|
-
* of just covering it.
|
|
10
|
-
* so `Layout.ContentHeader` / `Layout.ContentFooter` children stick to the
|
|
11
|
-
* panel edges; the remaining content scrolls.
|
|
9
|
+
* of just covering it.
|
|
12
10
|
*/
|
|
13
11
|
export declare const Content: React.FC<ContentProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from"react";import{Slot}from"../-constants";import{useDeclarePanel}from"../registry";import{ContentSplitBase}from"../Split/MobileSplitView/ContentSplitBase";import{useMobileSplitStack}from"../Split/MobileSplitView/useMobileSplitStack";import{useMobileSplitViewEnabled}from"../Split/MobileSplitView/useMobileSplitView";import{ContentDocked}from"./ContentDocked";
|
|
1
|
+
import React from"react";import{Slot}from"../-constants";import{useDeclarePanel}from"../registry";import{ContentSplitBase}from"../Split/MobileSplitView/ContentSplitBase";import{useMobileSplitStack}from"../Split/MobileSplitView/useMobileSplitStack";import{useMobileSplitViewEnabled}from"../Split/MobileSplitView/useMobileSplitView";import{ContentDocked}from"./ContentDocked";export const Content=({children})=>{useDeclarePanel(Slot.content,{collapsible:!1});let enabled=useMobileSplitViewEnabled(),{host,isSplitPresent}=useMobileSplitStack();return enabled&&isSplitPresent&&null!==host?React.createElement(ContentSplitBase,null,children):React.createElement(ContentDocked,null,children)};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ContentPanelProps } from "../-types";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* the edges, without `PanelContainer`'s Container - as with the left panel's
|
|
7
|
-
* layers - so content keeps the layout and stacking it had without one.
|
|
4
|
+
* Scrollable frame for content headers and footers. Temporarily not mounted by
|
|
5
|
+
* `Layout.Content` while the accessibility regression in #2043 is unresolved.
|
|
8
6
|
*/
|
|
9
|
-
export declare function ContentPanel({ children, background, "aria-label": ariaLabel, scrollContainerRef, onScroll, "data-e2e-test-id": dataE2eTestId, }:
|
|
7
|
+
export declare function ContentPanel({ children, background, "aria-label": ariaLabel, scrollContainerRef, onScroll, "data-e2e-test-id": dataE2eTestId, }: ContentPanelProps): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from"react";import styled from"@emotion/styled";import{Sandwich}from"../../Internal/Sandwich/Sandwich";let StyledContentFrame=styled("div",{target:"
|
|
1
|
+
import React from"react";import styled from"@emotion/styled";import{Sandwich}from"../../Internal/Sandwich/Sandwich";let StyledContentFrame=styled("div",{target:"e1spy2ji0",label:"StyledContentFrame"})(({theme,background})=>({height:"100%",backgroundColor:"primary"===background?theme.values.color.background.primary.default:"transparent"})),StyledContentFill=styled("div",{target:"e1spy2ji1",label:"StyledContentFill"})({position:"absolute",inset:0});export function ContentPanel({children,background="transparent","aria-label":ariaLabel,scrollContainerRef,onScroll,"data-e2e-test-id":dataE2eTestId}){return React.createElement(StyledContentFrame,{background:background,role:ariaLabel?"region":void 0,"aria-label":ariaLabel,"data-e2e-test-id":dataE2eTestId},React.createElement(Sandwich,{scrollRef:scrollContainerRef,onScroll:onScroll},React.createElement(StyledContentFill,null,children)))}
|