@dbcdk/react-components 0.0.63 → 0.0.65
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/dist/components/nav-bar/NavBar.js +1 -1
- package/dist/components/overlay/fade-overlay/FadeOverlay.d.ts +13 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.js +8 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +54 -0
- package/dist/components/page-layout/components/layout-footer/LayoutFooter.module.css +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -25,5 +25,5 @@ export function NavBar({ logo, items, productName, addition, activeLink, size, }
|
|
|
25
25
|
};
|
|
26
26
|
return (_jsx("li", { className: styles.navItem, role: "listitem", children: Component ? (_jsxs(Component, { ...commonProps, children: [icon, _jsx("span", { className: styles.label, children: label })] })) : (_jsxs("a", { ...commonProps, children: [icon, _jsx("span", { className: styles.label, children: label })] })) }, id));
|
|
27
27
|
});
|
|
28
|
-
return (_jsx(AppHeader, { size: size, children: _jsxs("nav", { ref: navRef, className: styles.container, "aria-label": productName ? `${productName} navigation` : 'Main navigation', children: [(logo || productName) && (_jsxs("div", { className: styles.logoRow, children: [logo, productName && (_jsxs("span", { className: styles.productName, children: [_jsx(Logo, {}), _jsx(Headline, { disableMargin: true, size: 1, children: productName })] }))] })), _jsx("div", { className: styles.navContent, children: _jsx("ul", { className: styles.navItems, role: "list", children: navLinks }) }), addition && !isMobile && _jsx("div", { className: styles.addition, children: addition }), isMobile && (_jsx(Popover, { open: mobileOpen, onOpenChange: setMobileOpen, matchTriggerWidth: true, fullWidth: false, autoFocusContent: true, anchorRef: navRef, trigger: (toggle, _icon, open) => (_jsx("button", { type: "button", className: styles.burgerButton, "aria-label": open ? 'Close navigation menu' : 'Open navigation menu', "aria-expanded": open, onClick: toggle, children: open ? _jsx(X, { size: 20 }) : _jsx(MenuIcon, { size: 20 }) })), children: close => (_jsxs("div", { className: styles.mobileMenu, children: [_jsx("ul", { className: styles.mobileNavItems, role: "list", onClick: close, children: navLinks }), addition && _jsx("div", { className: styles.mobileAddition, children: addition })] })) }))] }) }));
|
|
28
|
+
return (_jsx(AppHeader, { size: size, children: _jsxs("nav", { ref: navRef, className: styles.container, "aria-label": productName ? `${productName} navigation` : 'Main navigation', children: [(logo || productName) && (_jsxs("div", { className: styles.logoRow, children: [logo, productName && (_jsxs("span", { className: styles.productName, children: [_jsx(Logo, {}), _jsx(Headline, { disableMargin: true, size: 1, children: productName })] }))] })), (navLinks === null || navLinks === void 0 ? void 0 : navLinks.length) > 0 && (_jsx("div", { className: styles.navContent, children: _jsx("ul", { className: styles.navItems, role: "list", children: navLinks }) })), addition && !isMobile && _jsx("div", { className: styles.addition, children: addition }), isMobile && (_jsx(Popover, { open: mobileOpen, onOpenChange: setMobileOpen, matchTriggerWidth: true, fullWidth: false, autoFocusContent: true, anchorRef: navRef, trigger: (toggle, _icon, open) => (_jsx("button", { type: "button", className: styles.burgerButton, "aria-label": open ? 'Close navigation menu' : 'Open navigation menu', "aria-expanded": open, onClick: toggle, children: open ? _jsx(X, { size: 20 }) : _jsx(MenuIcon, { size: 20 }) })), children: close => (_jsxs("div", { className: styles.mobileMenu, children: [_jsx("ul", { className: styles.mobileNavItems, role: "list", onClick: close, children: navLinks }), addition && _jsx("div", { className: styles.mobileAddition, children: addition })] })) }))] }) }));
|
|
29
29
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
export interface FadeOverlayProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Which edge should have the solid background color.
|
|
5
|
+
* Defaults to bottom, which fits preview/paywall-style fades.
|
|
6
|
+
*/
|
|
7
|
+
edge?: 'top' | 'right' | 'bottom' | 'left';
|
|
8
|
+
/**
|
|
9
|
+
* How far the fade reaches into the container.
|
|
10
|
+
*/
|
|
11
|
+
size?: 'sm' | 'md' | 'lg';
|
|
12
|
+
}
|
|
13
|
+
export declare function FadeOverlay({ edge, size, className, 'aria-hidden': ariaHidden, ...rest }: FadeOverlayProps): ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from './FadeOverlay.module.css';
|
|
3
|
+
function cx(...parts) {
|
|
4
|
+
return parts.filter(Boolean).join(' ');
|
|
5
|
+
}
|
|
6
|
+
export function FadeOverlay({ edge = 'bottom', size = 'md', className, 'aria-hidden': ariaHidden = true, ...rest }) {
|
|
7
|
+
return (_jsx("div", { "aria-hidden": ariaHidden, className: cx(styles.overlay, styles[edge], styles[size], className), ...rest }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.overlay {
|
|
2
|
+
--fade-overlay-color: var(--color-bg-surface);
|
|
3
|
+
--fade-overlay-size: 65%;
|
|
4
|
+
|
|
5
|
+
position: absolute;
|
|
6
|
+
inset: 0;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
border-radius: inherit;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.bottom {
|
|
13
|
+
background: linear-gradient(
|
|
14
|
+
to top,
|
|
15
|
+
var(--fade-overlay-color) 0%,
|
|
16
|
+
transparent var(--fade-overlay-size)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.top {
|
|
21
|
+
background: linear-gradient(
|
|
22
|
+
to bottom,
|
|
23
|
+
var(--fade-overlay-color) 0%,
|
|
24
|
+
transparent var(--fade-overlay-size)
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.left {
|
|
29
|
+
background: linear-gradient(
|
|
30
|
+
to right,
|
|
31
|
+
var(--fade-overlay-color) 0%,
|
|
32
|
+
transparent var(--fade-overlay-size)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.right {
|
|
37
|
+
background: linear-gradient(
|
|
38
|
+
to left,
|
|
39
|
+
var(--fade-overlay-color) 0%,
|
|
40
|
+
transparent var(--fade-overlay-size)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.sm {
|
|
45
|
+
--fade-overlay-size: 40%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.md {
|
|
49
|
+
--fade-overlay-size: 65%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.lg {
|
|
53
|
+
--fade-overlay-size: 85%;
|
|
54
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.footer {
|
|
2
2
|
inline-size: 100%;
|
|
3
3
|
background: var(--color-bg-surface-subtle);
|
|
4
|
+
line-height: var(--line-height-normal);
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.inner {
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
font-style: normal;
|
|
38
39
|
margin: 0;
|
|
39
40
|
color: var(--color-fg-subtle);
|
|
40
|
-
line-height: var(--line-height-
|
|
41
|
+
line-height: var(--line-height-normal);
|
|
41
42
|
display: flex;
|
|
42
43
|
flex-direction: column;
|
|
43
44
|
gap: 1px;
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
flex-direction: column;
|
|
53
54
|
align-items: flex-start;
|
|
54
55
|
gap: 0;
|
|
56
|
+
line-height: var(--line-height-normal);
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
.linkGroup {
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export * from './components/filtering/chip-multi-toggle/ChipMultiToggle';
|
|
|
54
54
|
export * from './components/forms/checkbox-group/CheckboxGroup';
|
|
55
55
|
export * from './components/overlay/side-panel/SidePanel';
|
|
56
56
|
export * from './components/overlay/side-panel/useSidePanel';
|
|
57
|
+
export * from './components/overlay/fade-overlay/FadeOverlay';
|
|
57
58
|
export * from './components/forms/input-container/InputContainer';
|
|
58
59
|
export * from './components/hyperlink/Hyperlink';
|
|
59
60
|
export * from './components/overlay/tooltip/Tooltip';
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,7 @@ export * from './components/filtering/chip-multi-toggle/ChipMultiToggle';
|
|
|
54
54
|
export * from './components/forms/checkbox-group/CheckboxGroup';
|
|
55
55
|
export * from './components/overlay/side-panel/SidePanel';
|
|
56
56
|
export * from './components/overlay/side-panel/useSidePanel';
|
|
57
|
+
export * from './components/overlay/fade-overlay/FadeOverlay';
|
|
57
58
|
export * from './components/forms/input-container/InputContainer';
|
|
58
59
|
export * from './components/hyperlink/Hyperlink';
|
|
59
60
|
export * from './components/overlay/tooltip/Tooltip';
|