@amboss/design-system 4.18.0 → 4.19.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/build/cjs/components/Content/ContentBrandName/ContentBrandName.js +1 -1
- package/build/cjs/components/Content/ContentCitation/ContentCitationLink.js +1 -1
- package/build/cjs/components/DataTable/internal/buildColumnSegments.js +1 -1
- package/build/cjs/components/Layout/-constants.d.ts +2 -2
- package/build/cjs/components/Layout/Split/SplitDocked.d.ts +4 -3
- package/build/cjs/components/Layout/Split/SplitDocked.js +1 -1
- package/build/esm/components/Content/ContentBrandName/ContentBrandName.js +1 -1
- package/build/esm/components/Content/ContentCitation/ContentCitationLink.js +1 -1
- package/build/esm/components/DataTable/internal/buildColumnSegments.js +1 -1
- package/build/esm/components/Layout/-constants.d.ts +2 -2
- package/build/esm/components/Layout/Split/SplitDocked.d.ts +4 -3
- package/build/esm/components/Layout/Split/SplitDocked.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ContentBrandName",{enumerable:!0,get:function(){return ContentBrandName}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_ScreenReaderText=require("../../Utilities/ScreenReaderText/ScreenReaderText"),ORIGINAL_TABINDEX_ATTRIBUTE="data-ds-censored-tabindex",removeFromTabOrder=element=>{element.hasAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)||(element.setAttribute(ORIGINAL_TABINDEX_ATTRIBUTE,element.getAttribute("tabindex")??""),element.setAttribute("tabindex","-1"))},restoreTabOrder=root=>{root.querySelectorAll(`[${ORIGINAL_TABINDEX_ATTRIBUTE}]`).forEach(element=>{let originalTabIndex=element.getAttribute(ORIGINAL_TABINDEX_ATTRIBUTE);originalTabIndex?element.setAttribute("tabindex",originalTabIndex):element.removeAttribute("tabindex"),element.removeAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)})},StyledBrandName=(0,_styled.default)("span",{target:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ContentBrandName",{enumerable:!0,get:function(){return ContentBrandName}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_ScreenReaderText=require("../../Utilities/ScreenReaderText/ScreenReaderText"),ORIGINAL_TABINDEX_ATTRIBUTE="data-ds-censored-tabindex",removeFromTabOrder=element=>{element.hasAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)||(element.setAttribute(ORIGINAL_TABINDEX_ATTRIBUTE,element.getAttribute("tabindex")??""),element.setAttribute("tabindex","-1"))},restoreTabOrder=root=>{root.querySelectorAll(`[${ORIGINAL_TABINDEX_ATTRIBUTE}]`).forEach(element=>{let originalTabIndex=element.getAttribute(ORIGINAL_TABINDEX_ATTRIBUTE);originalTabIndex?element.setAttribute("tabindex",originalTabIndex):element.removeAttribute("tabindex"),element.removeAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)})},StyledBrandName=(0,_styled.default)("span",{target:"epwqlh30",label:"StyledBrandName"})(({isCensored})=>({...isCensored&&{display:"inline-block",userSelect:"none"}})),StyledBrandNameText=(0,_styled.default)("span",{target:"epwqlh31",label:"StyledBrandNameText"})(({isCensored})=>({...isCensored&&{filter:"blur(5px)",pointerEvents:"none"}})),ContentBrandName=_react.default.forwardRef(({children,isCensored,censoredLabel,"data-e2e-test-id":dataE2eTestId,...rest},ref)=>{let blockDescendantFocus=(0,_react.useCallback)(node=>{node&&(node.toggleAttribute("inert",isCensored),"boolean"!=typeof node.inert&&(isCensored?node.querySelectorAll("a[href], button, input, select, textarea, [tabindex]").forEach(removeFromTabOrder):restoreTabOrder(node)))},[isCensored]);return _react.default.createElement(StyledBrandName,{ref:ref,"data-ds-id":"ContentBrandName","data-e2e-test-id":dataE2eTestId,isCensored:isCensored,...rest},_react.default.createElement(StyledBrandNameText,{ref:blockDescendantFocus,isCensored:isCensored,"aria-hidden":isCensored||void 0,onFocusCapture:isCensored?event=>{event.target instanceof HTMLElement&&(removeFromTabOrder(event.target),event.target.blur())}:void 0},children),isCensored&&_react.default.createElement(_ScreenReaderText.ScreenReaderText,{as:"span"},censoredLabel))});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get CITATION_LINK_ICON_BASELINE_OFFSET(){return CITATION_LINK_ICON_BASELINE_OFFSET},get ContentCitationLink(){return ContentCitationLink}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_ContentLink=require("../ContentLink/ContentLink"),_Icon=require("../../Icon/Icon"),_ScreenReaderText=require("../../Utilities/ScreenReaderText/ScreenReaderText"),CITATION_LINK_ICON_BASELINE_OFFSET="-1px",StyledLinkText=(0,_styled.default)("span",{target:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get CITATION_LINK_ICON_BASELINE_OFFSET(){return CITATION_LINK_ICON_BASELINE_OFFSET},get ContentCitationLink(){return ContentCitationLink}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_ContentLink=require("../ContentLink/ContentLink"),_Icon=require("../../Icon/Icon"),_ScreenReaderText=require("../../Utilities/ScreenReaderText/ScreenReaderText"),CITATION_LINK_ICON_BASELINE_OFFSET="-1px",StyledLinkText=(0,_styled.default)("span",{target:"e1xxkmzs0",label:"StyledLinkText"})({overflowWrap:"anywhere"}),StyledCitationLink=(0,_styled.default)("span",{target:"e1xxkmzs1",label:"StyledCitationLink"})(({theme})=>({marginRight:theme.variables.size.spacing.xs,"& svg":{marginLeft:theme.variables.size.spacing.xxs,marginBottom:CITATION_LINK_ICON_BASELINE_OFFSET}}));function ContentCitationLink({children,href,onClick,newTabLabel,"data-e2e-test-id":dataE2eTestId}){let linkRef=(0,_react.useRef)(null);return _react.default.createElement(StyledCitationLink,{ref:linkRef,"data-ds-id":"ContentCitationLink"},_react.default.createElement(_ContentLink.ContentLink,{href:href,target:"_blank",rel:"noopener noreferrer",color:"primary",onClick:onClick,"data-e2e-test-id":dataE2eTestId},_react.default.createElement(StyledLinkText,null,children),newTabLabel&&_react.default.createElement(_ScreenReaderText.ScreenReaderText,{as:"span"}," ",newTabLabel),_react.default.createElement(_Icon.Icon,{inline:!0,name:"external-link",size:"s",color:"tertiary",hoverable:linkRef})))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"buildColumnSegments",{enumerable:!0,get:function(){return buildColumnSegments}});const _types=require("./types");function buildColumnSegments(columns){let segments=[];return columns.forEach((column,columnIndex)=>{let group=(0,_types.isDataColumn)(column)?column.group:void 0,currentSegment=segments
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"buildColumnSegments",{enumerable:!0,get:function(){return buildColumnSegments}});const _types=require("./types");function buildColumnSegments(columns){let segments=[];return columns.forEach((column,columnIndex)=>{let group=(0,_types.isDataColumn)(column)?column.group:void 0,currentSegment=segments.at(-1);if(group&¤tSegment?.group===group)return void currentSegment.columns.push({column,columnIndex});segments.push({group,columns:[{column,columnIndex}]})}),segments}
|
|
@@ -33,8 +33,8 @@ export declare const LEFT_BAR_BUTTON_INSET: BarButtonInset;
|
|
|
33
33
|
export type TogglableSlotKey = Exclude<SlotKey, typeof Slot.content>;
|
|
34
34
|
/** Slots the app opens/closes, in `PANEL_ORDER`. */
|
|
35
35
|
export declare const TOGGLABLE_SLOTS: TogglableSlotKey[];
|
|
36
|
-
/** Vertical offset for the right panel — set this (e.g.
|
|
37
|
-
* height) and
|
|
36
|
+
/** Vertical offset for the docked right panel and split view — set this (e.g.
|
|
37
|
+
* to a sticky subnav's height) and both track it; defaults to `0` when unset. */
|
|
38
38
|
export declare const SUBNAV_OFFSET_VAR: "--ds-layout-subnav-offset";
|
|
39
39
|
/** Widest `Layout.Content` and `Layout.Split` may grow to *together* while the
|
|
40
40
|
* split is open; past it they stay centred with space either side. Defaults
|
|
@@ -2,8 +2,9 @@ import React from "react";
|
|
|
2
2
|
import type { SplitProps } from "../-types";
|
|
3
3
|
/**
|
|
4
4
|
* Desktop split view. Declares the `splitview` slot and portals its content
|
|
5
|
-
* while visible - the right-hand half of `Layout.Content`'s column.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* while visible - the right-hand half of `Layout.Content`'s column. Content
|
|
6
|
+
* tracks the `--ds-layout-subnav-offset` var, so an expanded subnav never
|
|
7
|
+
* covers the panel's top edge. `Layout.SplitHeader` / `Layout.SplitFooter`
|
|
8
|
+
* children stick to the panel edges; the remaining content scrolls.
|
|
8
9
|
*/
|
|
9
10
|
export declare const SplitDocked: React.FC<SplitProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"SplitDocked",{enumerable:!0,get:function(){return SplitDocked}});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"SplitDocked",{enumerable:!0,get:function(){return SplitDocked}});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")),_constants=require("../-constants"),_registry=require("../registry"),_useLayout=require("../useLayout"),_PanelContainer=require("../PanelContainer"),StyledSplitSlot=(0,_styled.default)("div",{target:"e1ldbp5v0",label:"StyledSplitSlot"})(({theme})=>({position:"absolute",right:0,left:0,bottom:0,top:`var(${_constants.SUBNAV_OFFSET_VAR}, 0px)`,overflow:"hidden",transition:`top ${theme.variables.animation.navSlide.open.duration} ${theme.variables.animation.navSlide.open.timingFunction}`})),SplitDocked=({children,background,"aria-label":ariaLabel,scrollContainerRef,onScroll,"data-e2e-test-id":dataE2eTestId})=>{let{isVisible}=(0,_useLayout.useLayout)()[_constants.Slot.splitview];return(0,_registry.useDeclarePanel)(_constants.Slot.splitview,{}),(0,_registry.useLayoutPortal)(_constants.Slot.splitview,isVisible?_react.default.createElement(StyledSplitSlot,null,_react.default.createElement(_PanelContainer.PanelContainer,{background:background,"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll,"data-e2e-test-id":dataE2eTestId},children)):null)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{useCallback}from"react";import styled from"@emotion/styled";import{ScreenReaderText}from"../../Utilities/ScreenReaderText/ScreenReaderText";let ORIGINAL_TABINDEX_ATTRIBUTE="data-ds-censored-tabindex",removeFromTabOrder=element=>{element.hasAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)||(element.setAttribute(ORIGINAL_TABINDEX_ATTRIBUTE,element.getAttribute("tabindex")??""),element.setAttribute("tabindex","-1"))},restoreTabOrder=root=>{root.querySelectorAll(`[${ORIGINAL_TABINDEX_ATTRIBUTE}]`).forEach(element=>{let originalTabIndex=element.getAttribute(ORIGINAL_TABINDEX_ATTRIBUTE);originalTabIndex?element.setAttribute("tabindex",originalTabIndex):element.removeAttribute("tabindex"),element.removeAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)})},StyledBrandName=styled("span",{target:"
|
|
1
|
+
import React,{useCallback}from"react";import styled from"@emotion/styled";import{ScreenReaderText}from"../../Utilities/ScreenReaderText/ScreenReaderText";let ORIGINAL_TABINDEX_ATTRIBUTE="data-ds-censored-tabindex",removeFromTabOrder=element=>{element.hasAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)||(element.setAttribute(ORIGINAL_TABINDEX_ATTRIBUTE,element.getAttribute("tabindex")??""),element.setAttribute("tabindex","-1"))},restoreTabOrder=root=>{root.querySelectorAll(`[${ORIGINAL_TABINDEX_ATTRIBUTE}]`).forEach(element=>{let originalTabIndex=element.getAttribute(ORIGINAL_TABINDEX_ATTRIBUTE);originalTabIndex?element.setAttribute("tabindex",originalTabIndex):element.removeAttribute("tabindex"),element.removeAttribute(ORIGINAL_TABINDEX_ATTRIBUTE)})},StyledBrandName=styled("span",{target:"epwqlh30",label:"StyledBrandName"})(({isCensored})=>({...isCensored&&{display:"inline-block",userSelect:"none"}})),StyledBrandNameText=styled("span",{target:"epwqlh31",label:"StyledBrandNameText"})(({isCensored})=>({...isCensored&&{filter:"blur(5px)",pointerEvents:"none"}}));export const ContentBrandName=React.forwardRef(({children,isCensored,censoredLabel,"data-e2e-test-id":dataE2eTestId,...rest},ref)=>{let blockDescendantFocus=useCallback(node=>{node&&(node.toggleAttribute("inert",isCensored),"boolean"!=typeof node.inert&&(isCensored?node.querySelectorAll("a[href], button, input, select, textarea, [tabindex]").forEach(removeFromTabOrder):restoreTabOrder(node)))},[isCensored]);return React.createElement(StyledBrandName,{ref:ref,"data-ds-id":"ContentBrandName","data-e2e-test-id":dataE2eTestId,isCensored:isCensored,...rest},React.createElement(StyledBrandNameText,{ref:blockDescendantFocus,isCensored:isCensored,"aria-hidden":isCensored||void 0,onFocusCapture:isCensored?event=>{event.target instanceof HTMLElement&&(removeFromTabOrder(event.target),event.target.blur())}:void 0},children),isCensored&&React.createElement(ScreenReaderText,{as:"span"},censoredLabel))});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{useRef}from"react";import styled from"@emotion/styled";import{ContentLink}from"../ContentLink/ContentLink";import{Icon}from"../../Icon/Icon";import{ScreenReaderText}from"../../Utilities/ScreenReaderText/ScreenReaderText";export const CITATION_LINK_ICON_BASELINE_OFFSET="-1px";let StyledLinkText=styled("span",{target:"
|
|
1
|
+
import React,{useRef}from"react";import styled from"@emotion/styled";import{ContentLink}from"../ContentLink/ContentLink";import{Icon}from"../../Icon/Icon";import{ScreenReaderText}from"../../Utilities/ScreenReaderText/ScreenReaderText";export const CITATION_LINK_ICON_BASELINE_OFFSET="-1px";let StyledLinkText=styled("span",{target:"e1xxkmzs0",label:"StyledLinkText"})({overflowWrap:"anywhere"}),StyledCitationLink=styled("span",{target:"e1xxkmzs1",label:"StyledCitationLink"})(({theme})=>({marginRight:theme.variables.size.spacing.xs,"& svg":{marginLeft:theme.variables.size.spacing.xxs,marginBottom:"-1px"}}));export function ContentCitationLink({children,href,onClick,newTabLabel,"data-e2e-test-id":dataE2eTestId}){let linkRef=useRef(null);return React.createElement(StyledCitationLink,{ref:linkRef,"data-ds-id":"ContentCitationLink"},React.createElement(ContentLink,{href:href,target:"_blank",rel:"noopener noreferrer",color:"primary",onClick:onClick,"data-e2e-test-id":dataE2eTestId},React.createElement(StyledLinkText,null,children),newTabLabel&&React.createElement(ScreenReaderText,{as:"span"}," ",newTabLabel),React.createElement(Icon,{inline:!0,name:"external-link",size:"s",color:"tertiary",hoverable:linkRef})))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isDataColumn}from"./types";export function buildColumnSegments(columns){let segments=[];return columns.forEach((column,columnIndex)=>{let group=isDataColumn(column)?column.group:void 0,currentSegment=segments
|
|
1
|
+
import{isDataColumn}from"./types";export function buildColumnSegments(columns){let segments=[];return columns.forEach((column,columnIndex)=>{let group=isDataColumn(column)?column.group:void 0,currentSegment=segments.at(-1);if(group&¤tSegment?.group===group)return void currentSegment.columns.push({column,columnIndex});segments.push({group,columns:[{column,columnIndex}]})}),segments}
|
|
@@ -33,8 +33,8 @@ export declare const LEFT_BAR_BUTTON_INSET: BarButtonInset;
|
|
|
33
33
|
export type TogglableSlotKey = Exclude<SlotKey, typeof Slot.content>;
|
|
34
34
|
/** Slots the app opens/closes, in `PANEL_ORDER`. */
|
|
35
35
|
export declare const TOGGLABLE_SLOTS: TogglableSlotKey[];
|
|
36
|
-
/** Vertical offset for the right panel — set this (e.g.
|
|
37
|
-
* height) and
|
|
36
|
+
/** Vertical offset for the docked right panel and split view — set this (e.g.
|
|
37
|
+
* to a sticky subnav's height) and both track it; defaults to `0` when unset. */
|
|
38
38
|
export declare const SUBNAV_OFFSET_VAR: "--ds-layout-subnav-offset";
|
|
39
39
|
/** Widest `Layout.Content` and `Layout.Split` may grow to *together* while the
|
|
40
40
|
* split is open; past it they stay centred with space either side. Defaults
|
|
@@ -2,8 +2,9 @@ import React from "react";
|
|
|
2
2
|
import type { SplitProps } from "../-types";
|
|
3
3
|
/**
|
|
4
4
|
* Desktop split view. Declares the `splitview` slot and portals its content
|
|
5
|
-
* while visible - the right-hand half of `Layout.Content`'s column.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* while visible - the right-hand half of `Layout.Content`'s column. Content
|
|
6
|
+
* tracks the `--ds-layout-subnav-offset` var, so an expanded subnav never
|
|
7
|
+
* covers the panel's top edge. `Layout.SplitHeader` / `Layout.SplitFooter`
|
|
8
|
+
* children stick to the panel edges; the remaining content scrolls.
|
|
8
9
|
*/
|
|
9
10
|
export declare const SplitDocked: React.FC<SplitProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from"react";import{Slot}from"../-constants";import{useDeclarePanel,useLayoutPortal}from"../registry";import{useLayout}from"../useLayout";import{PanelContainer}from"../PanelContainer";export const SplitDocked=({children,background,"aria-label":ariaLabel,scrollContainerRef,onScroll,"data-e2e-test-id":dataE2eTestId})=>{let{isVisible}=useLayout()[Slot.splitview];return useDeclarePanel(Slot.splitview,{}),useLayoutPortal(Slot.splitview,isVisible?React.createElement(PanelContainer,{background:background,"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll,"data-e2e-test-id":dataE2eTestId},children):null)};
|
|
1
|
+
import React from"react";import styled from"@emotion/styled";import{Slot,SUBNAV_OFFSET_VAR}from"../-constants";import{useDeclarePanel,useLayoutPortal}from"../registry";import{useLayout}from"../useLayout";import{PanelContainer}from"../PanelContainer";let StyledSplitSlot=styled("div",{target:"e1ldbp5v0",label:"StyledSplitSlot"})(({theme})=>({position:"absolute",right:0,left:0,bottom:0,top:`var(${SUBNAV_OFFSET_VAR}, 0px)`,overflow:"hidden",transition:`top ${theme.variables.animation.navSlide.open.duration} ${theme.variables.animation.navSlide.open.timingFunction}`}));export const SplitDocked=({children,background,"aria-label":ariaLabel,scrollContainerRef,onScroll,"data-e2e-test-id":dataE2eTestId})=>{let{isVisible}=useLayout()[Slot.splitview];return useDeclarePanel(Slot.splitview,{}),useLayoutPortal(Slot.splitview,isVisible?React.createElement(StyledSplitSlot,null,React.createElement(PanelContainer,{background:background,"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll,"data-e2e-test-id":dataE2eTestId},children)):null)};
|