@atlaskit/side-navigation 11.1.14 → 11.1.16
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/CHANGELOG.md +14 -0
- package/dist/cjs/components/Item/button-item.js +2 -2
- package/dist/cjs/components/Item/custom-item.js +2 -2
- package/dist/cjs/components/Item/link-item.js +2 -2
- package/dist/cjs/components/Item/skeleton-item.js +2 -2
- package/dist/cjs/components/LoadingItems/index.js +2 -2
- package/dist/cjs/components/NavigationContent/container-css.js +33 -0
- package/dist/cjs/components/NavigationContent/index.js +2 -2
- package/dist/cjs/components/NavigationContent/inner-container-css.js +51 -0
- package/dist/cjs/components/NavigationContent/outer-container-css.js +44 -0
- package/dist/cjs/components/NestableNavigationContent/index.js +2 -2
- package/dist/cjs/components/NestableNavigationContent/nested-context.js +10 -0
- package/dist/cjs/components/NestableNavigationContent/use-nested-context.js +19 -0
- package/dist/cjs/components/NestableNavigationContent/use-should-nested-element-render.js +19 -0
- package/dist/cjs/components/NestingItem/index.js +4 -3
- package/dist/cjs/components/Section/heading-item.js +2 -3
- package/dist/cjs/components/Section/section.js +2 -2
- package/dist/cjs/components/Section/skeleton-heading-item.js +2 -3
- package/dist/cjs/index.js +8 -6
- package/dist/es2019/components/Item/button-item.js +1 -1
- package/dist/es2019/components/Item/custom-item.js +1 -1
- package/dist/es2019/components/Item/go-back-item.js +1 -0
- package/dist/es2019/components/Item/link-item.js +1 -1
- package/dist/es2019/components/Item/skeleton-item.js +2 -1
- package/dist/es2019/components/LoadingItems/index.js +1 -1
- package/dist/es2019/components/NavigationContent/container-css.js +25 -0
- package/dist/es2019/components/NavigationContent/index.js +1 -1
- package/dist/es2019/components/NavigationContent/inner-container-css.js +41 -0
- package/dist/es2019/components/NavigationContent/outer-container-css.js +36 -0
- package/dist/es2019/components/NestableNavigationContent/index.js +1 -1
- package/dist/es2019/components/NestableNavigationContent/nested-context.js +3 -0
- package/dist/es2019/components/NestableNavigationContent/use-nested-context.js +18 -0
- package/dist/es2019/components/NestableNavigationContent/use-should-nested-element-render.js +13 -0
- package/dist/es2019/components/NestingItem/index.js +2 -1
- package/dist/es2019/components/Section/heading-item.js +1 -2
- package/dist/es2019/components/Section/section.js +1 -1
- package/dist/es2019/components/Section/skeleton-heading-item.js +1 -2
- package/dist/es2019/index.js +4 -2
- package/dist/esm/components/Item/button-item.js +1 -1
- package/dist/esm/components/Item/custom-item.js +1 -1
- package/dist/esm/components/Item/go-back-item.js +1 -0
- package/dist/esm/components/Item/link-item.js +1 -1
- package/dist/esm/components/Item/skeleton-item.js +2 -1
- package/dist/esm/components/LoadingItems/index.js +1 -1
- package/dist/esm/components/NavigationContent/container-css.js +27 -0
- package/dist/esm/components/NavigationContent/index.js +1 -1
- package/dist/esm/components/NavigationContent/inner-container-css.js +44 -0
- package/dist/esm/components/NavigationContent/outer-container-css.js +38 -0
- package/dist/esm/components/NestableNavigationContent/index.js +1 -1
- package/dist/esm/components/NestableNavigationContent/nested-context.js +3 -0
- package/dist/esm/components/NestableNavigationContent/use-nested-context.js +13 -0
- package/dist/esm/components/NestableNavigationContent/use-should-nested-element-render.js +13 -0
- package/dist/esm/components/NestingItem/index.js +2 -1
- package/dist/esm/components/Section/heading-item.js +1 -2
- package/dist/esm/components/Section/section.js +1 -1
- package/dist/esm/components/Section/skeleton-heading-item.js +1 -2
- package/dist/esm/index.js +4 -2
- package/dist/types/components/Item/button-item.d.ts +0 -1
- package/dist/types/components/Item/custom-item.d.ts +3 -2
- package/dist/types/components/Item/go-back-item.d.ts +0 -1
- package/dist/types/components/Item/link-item.d.ts +0 -1
- package/dist/types/components/Item/skeleton-item.d.ts +0 -1
- package/dist/types/components/NavigationContent/container-css.d.ts +18 -0
- package/dist/types/components/NavigationContent/inner-container-css.d.ts +34 -0
- package/dist/types/components/NavigationContent/outer-container-css.d.ts +36 -0
- package/dist/types/components/NestableNavigationContent/{context.d.ts → nested-context.d.ts} +0 -15
- package/dist/types/components/NestableNavigationContent/use-nested-context.d.ts +2 -0
- package/dist/types/components/NestableNavigationContent/use-should-nested-element-render.d.ts +3 -0
- package/dist/types/components/Section/heading-item.d.ts +3 -2
- package/dist/types/components/Section/skeleton-heading-item.d.ts +3 -2
- package/dist/types/index.d.ts +12 -8
- package/dist/types-ts4.5/components/Item/button-item.d.ts +0 -1
- package/dist/types-ts4.5/components/Item/custom-item.d.ts +3 -2
- package/dist/types-ts4.5/components/Item/go-back-item.d.ts +0 -1
- package/dist/types-ts4.5/components/Item/link-item.d.ts +0 -1
- package/dist/types-ts4.5/components/Item/skeleton-item.d.ts +0 -1
- package/dist/types-ts4.5/components/NavigationContent/container-css.d.ts +18 -0
- package/dist/types-ts4.5/components/NavigationContent/inner-container-css.d.ts +34 -0
- package/dist/types-ts4.5/components/NavigationContent/outer-container-css.d.ts +36 -0
- package/dist/types-ts4.5/components/NestableNavigationContent/{context.d.ts → nested-context.d.ts} +0 -15
- package/dist/types-ts4.5/components/NestableNavigationContent/use-nested-context.d.ts +2 -0
- package/dist/types-ts4.5/components/NestableNavigationContent/use-should-nested-element-render.d.ts +3 -0
- package/dist/types-ts4.5/components/Section/heading-item.d.ts +3 -2
- package/dist/types-ts4.5/components/Section/skeleton-heading-item.d.ts +3 -2
- package/dist/types-ts4.5/index.d.ts +12 -8
- package/package.json +8 -8
- package/dist/cjs/components/NavigationContent/styles.js +0 -127
- package/dist/cjs/components/NestableNavigationContent/context.js +0 -43
- package/dist/cjs/components/Section/index.js +0 -27
- package/dist/es2019/components/NavigationContent/styles.js +0 -113
- package/dist/es2019/components/NestableNavigationContent/context.js +0 -43
- package/dist/es2019/components/Section/index.js +0 -3
- package/dist/esm/components/NavigationContent/styles.js +0 -120
- package/dist/esm/components/NestableNavigationContent/context.js +0 -38
- package/dist/esm/components/Section/index.js +0 -3
- package/dist/types/components/NavigationContent/styles.d.ts +0 -91
- package/dist/types/components/Section/index.d.ts +0 -6
- package/dist/types-ts4.5/components/NavigationContent/styles.d.ts +0 -91
- package/dist/types-ts4.5/components/Section/index.d.ts +0 -6
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export const NestedContext = /*#__PURE__*/createContext(undefined);
|
|
11
|
-
export const useNestedContext = () => {
|
|
12
|
-
const context = useContext(NestedContext);
|
|
13
|
-
if (!context) {
|
|
14
|
-
let error = '';
|
|
15
|
-
if (process.env.NODE_ENV === 'development') {
|
|
16
|
-
error = `
|
|
17
|
-
To use a <NestingItem /> it needs to be a descendant of <NestableNavigationContent>.
|
|
18
|
-
You probably need to replace your <NavigationContent> with <NestableNavigationContent>.
|
|
19
|
-
|
|
20
|
-
import { NestableNavigationContent } from '@atlaskit/side-navigation';
|
|
21
|
-
`;
|
|
22
|
-
}
|
|
23
|
-
throw new Error(error);
|
|
24
|
-
}
|
|
25
|
-
return context;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Used by children of the NestableNavigationContent component to see if they should render or not.
|
|
30
|
-
* If `shouldRender` returns `true` - return your nodes.
|
|
31
|
-
* If it returns `false` - either return `null` or `children` if you have children.
|
|
32
|
-
*/
|
|
33
|
-
export const useShouldNestedElementRender = () => {
|
|
34
|
-
const context = useContext(NestedContext);
|
|
35
|
-
if (!context) {
|
|
36
|
-
return {
|
|
37
|
-
shouldRender: true
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
shouldRender: context.currentStackId === context.parentId
|
|
42
|
-
};
|
|
43
|
-
};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
|
|
5
|
-
var scrollIndicatorMaskZIndex = 2;
|
|
6
|
-
var scrollIndicatorZIndex = 1;
|
|
7
|
-
var scrollIndicatorHeight = 2;
|
|
8
|
-
var scrollIndicatorBorderRadius = '1px';
|
|
9
|
-
var containerPadding = 8;
|
|
10
|
-
var itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
|
|
11
|
-
var skeletonHeadingHeight = containerPadding;
|
|
12
|
-
var skeletonHeadingMarginOffset = 3;
|
|
13
|
-
// Skeleton content is slightly shorter than the real content.
|
|
14
|
-
// Because of that we slightly increase the top margin to offset this so the
|
|
15
|
-
// containing size both real and skeleton always equal approx 30px.
|
|
16
|
-
var skeletonHeadingTopMargin = containerPadding * 2.5 + (itemHeadingContentHeight - skeletonHeadingHeight) - skeletonHeadingMarginOffset;
|
|
17
|
-
// We want to move the entire body up by 3px without affecting the height of the skeleton container.
|
|
18
|
-
var skeletonHeadingBottomMargin = containerPadding * 0.75 + skeletonHeadingMarginOffset;
|
|
19
|
-
/**
|
|
20
|
-
* This outer container css contains the "real" scroll indicators which are
|
|
21
|
-
* always rendered to the screen.
|
|
22
|
-
* They are "conditionally" shown from the users perspective using the inner container CSS
|
|
23
|
-
* which has other pseudo elements which "mask" the "real" scroll indicators.
|
|
24
|
-
*/
|
|
25
|
-
export var outerContainerCSS = function outerContainerCSS(opts) {
|
|
26
|
-
return {
|
|
27
|
-
// Flex is needed to ensure the overflow indicators are positioned correctly.
|
|
28
|
-
display: 'flex',
|
|
29
|
-
height: '100%',
|
|
30
|
-
overflow: 'hidden',
|
|
31
|
-
position: 'relative',
|
|
32
|
-
'&::before': {
|
|
33
|
-
content: "''",
|
|
34
|
-
display: 'block',
|
|
35
|
-
left: "var(--ds-space-100, 8px)",
|
|
36
|
-
right: containerPadding + opts.scrollbarWidth,
|
|
37
|
-
height: scrollIndicatorHeight,
|
|
38
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
39
|
-
backgroundColor: "var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, #0B120E24)", ")"),
|
|
40
|
-
position: 'absolute',
|
|
41
|
-
zIndex: scrollIndicatorZIndex
|
|
42
|
-
},
|
|
43
|
-
'&::after': {
|
|
44
|
-
content: "''",
|
|
45
|
-
position: 'absolute',
|
|
46
|
-
display: 'block',
|
|
47
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
48
|
-
flexShrink: 0,
|
|
49
|
-
height: scrollIndicatorHeight,
|
|
50
|
-
left: "var(--ds-space-100, 8px)",
|
|
51
|
-
right: containerPadding + opts.scrollbarWidth,
|
|
52
|
-
bottom: 0,
|
|
53
|
-
zIndex: scrollIndicatorZIndex,
|
|
54
|
-
backgroundColor: "var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, #0B120E24)", ")")
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* This inner container css contains the "mask" logic for the scroll indicators.
|
|
61
|
-
* Essentially they cover (mask) the "real" scroll indicators when the user is scrolled
|
|
62
|
-
* to the top or bottom of the container.
|
|
63
|
-
*/
|
|
64
|
-
export var innerContainerCSS = function innerContainerCSS(opts) {
|
|
65
|
-
return _objectSpread(_objectSpread({
|
|
66
|
-
display: 'flex',
|
|
67
|
-
overflow: 'auto',
|
|
68
|
-
width: '100%',
|
|
69
|
-
position: 'relative',
|
|
70
|
-
boxSizing: 'border-box',
|
|
71
|
-
flexDirection: 'column'
|
|
72
|
-
}, !opts.showTopScrollIndicator && {
|
|
73
|
-
'&::before': {
|
|
74
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
75
|
-
content: "''",
|
|
76
|
-
left: 0,
|
|
77
|
-
right: 0,
|
|
78
|
-
height: scrollIndicatorHeight,
|
|
79
|
-
backgroundColor: "var(".concat(VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, #FFFFFF)", ")"),
|
|
80
|
-
position: 'absolute',
|
|
81
|
-
display: 'block',
|
|
82
|
-
zIndex: scrollIndicatorMaskZIndex
|
|
83
|
-
}
|
|
84
|
-
}), {}, {
|
|
85
|
-
// This after pseudo element abuses being a flex child and pushes itself down to the
|
|
86
|
-
// very bottom of the container - doing so ends up "masking" the actual scroll indicator.
|
|
87
|
-
'&::after': {
|
|
88
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
89
|
-
content: "''",
|
|
90
|
-
display: 'block',
|
|
91
|
-
flexShrink: 0,
|
|
92
|
-
height: scrollIndicatorHeight,
|
|
93
|
-
// This is used to "push" the element to the bottom of the flex container.
|
|
94
|
-
marginTop: 'auto',
|
|
95
|
-
position: 'relative',
|
|
96
|
-
zIndex: scrollIndicatorMaskZIndex,
|
|
97
|
-
backgroundColor: "var(".concat(VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, #FFFFFF)", ")")
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
export var containerCSS = function containerCSS(opts) {
|
|
102
|
-
return {
|
|
103
|
-
// When the scroll indicator is always shown we need to add some padding
|
|
104
|
-
// so the spacing between matches what it would be if the indicator was a "block" element.
|
|
105
|
-
// We use margin here so any child absolutely positioned elements are positioned correctly.
|
|
106
|
-
marginTop: opts.showTopScrollIndicator ? scrollIndicatorHeight : 0,
|
|
107
|
-
marginLeft: "var(--ds-space-100, 8px)",
|
|
108
|
-
marginRight: "var(--ds-space-100, 8px)",
|
|
109
|
-
// Enables child absolutely positioned elements to be positioned relative to this element.
|
|
110
|
-
position: 'relative',
|
|
111
|
-
'& [data-ds--menu--heading-item]': {
|
|
112
|
-
marginBottom: "var(--ds-space-075, 6px)",
|
|
113
|
-
marginTop: "var(--ds-space-200, 16px)"
|
|
114
|
-
},
|
|
115
|
-
'& [data-ds--menu--skeleton-heading-item]': {
|
|
116
|
-
marginTop: skeletonHeadingTopMargin,
|
|
117
|
-
marginBottom: skeletonHeadingBottomMargin
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export var NestedContext = /*#__PURE__*/createContext(undefined);
|
|
11
|
-
export var useNestedContext = function useNestedContext() {
|
|
12
|
-
var context = useContext(NestedContext);
|
|
13
|
-
if (!context) {
|
|
14
|
-
var error = '';
|
|
15
|
-
if (process.env.NODE_ENV === 'development') {
|
|
16
|
-
error = "\nTo use a <NestingItem /> it needs to be a descendant of <NestableNavigationContent>.\nYou probably need to replace your <NavigationContent> with <NestableNavigationContent>.\n\nimport { NestableNavigationContent } from '@atlaskit/side-navigation';\n ";
|
|
17
|
-
}
|
|
18
|
-
throw new Error(error);
|
|
19
|
-
}
|
|
20
|
-
return context;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Used by children of the NestableNavigationContent component to see if they should render or not.
|
|
25
|
-
* If `shouldRender` returns `true` - return your nodes.
|
|
26
|
-
* If it returns `false` - either return `null` or `children` if you have children.
|
|
27
|
-
*/
|
|
28
|
-
export var useShouldNestedElementRender = function useShouldNestedElementRender() {
|
|
29
|
-
var context = useContext(NestedContext);
|
|
30
|
-
if (!context) {
|
|
31
|
-
return {
|
|
32
|
-
shouldRender: true
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
shouldRender: context.currentStackId === context.parentId
|
|
37
|
-
};
|
|
38
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
interface StyleOpts {
|
|
2
|
-
showTopScrollIndicator?: boolean;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* This outer container css contains the "real" scroll indicators which are
|
|
6
|
-
* always rendered to the screen.
|
|
7
|
-
* They are "conditionally" shown from the users perspective using the inner container CSS
|
|
8
|
-
* which has other pseudo elements which "mask" the "real" scroll indicators.
|
|
9
|
-
*/
|
|
10
|
-
export declare const outerContainerCSS: (opts: StyleOpts & {
|
|
11
|
-
scrollbarWidth: number;
|
|
12
|
-
}) => {
|
|
13
|
-
readonly display: "flex";
|
|
14
|
-
readonly height: "100%";
|
|
15
|
-
readonly overflow: "hidden";
|
|
16
|
-
readonly position: "relative";
|
|
17
|
-
readonly "&::before": {
|
|
18
|
-
readonly content: "''";
|
|
19
|
-
readonly display: "block";
|
|
20
|
-
readonly left: "var(--ds-space-100)";
|
|
21
|
-
readonly right: number;
|
|
22
|
-
readonly height: 2;
|
|
23
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
24
|
-
readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
|
|
25
|
-
readonly position: "absolute";
|
|
26
|
-
readonly zIndex: 1;
|
|
27
|
-
};
|
|
28
|
-
readonly "&::after": {
|
|
29
|
-
readonly content: "''";
|
|
30
|
-
readonly position: "absolute";
|
|
31
|
-
readonly display: "block";
|
|
32
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
33
|
-
readonly flexShrink: 0;
|
|
34
|
-
readonly height: 2;
|
|
35
|
-
readonly left: "var(--ds-space-100)";
|
|
36
|
-
readonly right: number;
|
|
37
|
-
readonly bottom: 0;
|
|
38
|
-
readonly zIndex: 1;
|
|
39
|
-
readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* This inner container css contains the "mask" logic for the scroll indicators.
|
|
44
|
-
* Essentially they cover (mask) the "real" scroll indicators when the user is scrolled
|
|
45
|
-
* to the top or bottom of the container.
|
|
46
|
-
*/
|
|
47
|
-
export declare const innerContainerCSS: (opts: StyleOpts) => {
|
|
48
|
-
readonly "&::after": {
|
|
49
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
50
|
-
readonly content: "''";
|
|
51
|
-
readonly display: "block";
|
|
52
|
-
readonly flexShrink: 0;
|
|
53
|
-
readonly height: 2;
|
|
54
|
-
readonly marginTop: "auto";
|
|
55
|
-
readonly position: "relative";
|
|
56
|
-
readonly zIndex: 2;
|
|
57
|
-
readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
|
|
58
|
-
};
|
|
59
|
-
readonly "&::before"?: {
|
|
60
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
61
|
-
readonly content: "''";
|
|
62
|
-
readonly left: 0;
|
|
63
|
-
readonly right: 0;
|
|
64
|
-
readonly height: 2;
|
|
65
|
-
readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
|
|
66
|
-
readonly position: "absolute";
|
|
67
|
-
readonly display: "block";
|
|
68
|
-
readonly zIndex: 2;
|
|
69
|
-
} | undefined;
|
|
70
|
-
readonly display: "flex";
|
|
71
|
-
readonly overflow: "auto";
|
|
72
|
-
readonly width: "100%";
|
|
73
|
-
readonly position: "relative";
|
|
74
|
-
readonly boxSizing: "border-box";
|
|
75
|
-
readonly flexDirection: "column";
|
|
76
|
-
};
|
|
77
|
-
export declare const containerCSS: (opts: StyleOpts) => {
|
|
78
|
-
readonly marginTop: 0 | 2;
|
|
79
|
-
readonly marginLeft: "var(--ds-space-100)";
|
|
80
|
-
readonly marginRight: "var(--ds-space-100)";
|
|
81
|
-
readonly position: "relative";
|
|
82
|
-
readonly "& [data-ds--menu--heading-item]": {
|
|
83
|
-
readonly marginBottom: "var(--ds-space-075)";
|
|
84
|
-
readonly marginTop: "var(--ds-space-200)";
|
|
85
|
-
};
|
|
86
|
-
readonly "& [data-ds--menu--skeleton-heading-item]": {
|
|
87
|
-
readonly marginTop: number;
|
|
88
|
-
readonly marginBottom: number;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as HeadingItem } from './heading-item';
|
|
2
|
-
export type { HeadingItemProps } from './heading-item';
|
|
3
|
-
export { default as Section } from './section';
|
|
4
|
-
export type { SectionProps } from './section';
|
|
5
|
-
export { default as SkeletonHeadingItem } from './skeleton-heading-item';
|
|
6
|
-
export type { SkeletonHeadingItemProps } from './skeleton-heading-item';
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
interface StyleOpts {
|
|
2
|
-
showTopScrollIndicator?: boolean;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* This outer container css contains the "real" scroll indicators which are
|
|
6
|
-
* always rendered to the screen.
|
|
7
|
-
* They are "conditionally" shown from the users perspective using the inner container CSS
|
|
8
|
-
* which has other pseudo elements which "mask" the "real" scroll indicators.
|
|
9
|
-
*/
|
|
10
|
-
export declare const outerContainerCSS: (opts: StyleOpts & {
|
|
11
|
-
scrollbarWidth: number;
|
|
12
|
-
}) => {
|
|
13
|
-
readonly display: "flex";
|
|
14
|
-
readonly height: "100%";
|
|
15
|
-
readonly overflow: "hidden";
|
|
16
|
-
readonly position: "relative";
|
|
17
|
-
readonly "&::before": {
|
|
18
|
-
readonly content: "''";
|
|
19
|
-
readonly display: "block";
|
|
20
|
-
readonly left: "var(--ds-space-100)";
|
|
21
|
-
readonly right: number;
|
|
22
|
-
readonly height: 2;
|
|
23
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
24
|
-
readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
|
|
25
|
-
readonly position: "absolute";
|
|
26
|
-
readonly zIndex: 1;
|
|
27
|
-
};
|
|
28
|
-
readonly "&::after": {
|
|
29
|
-
readonly content: "''";
|
|
30
|
-
readonly position: "absolute";
|
|
31
|
-
readonly display: "block";
|
|
32
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
33
|
-
readonly flexShrink: 0;
|
|
34
|
-
readonly height: 2;
|
|
35
|
-
readonly left: "var(--ds-space-100)";
|
|
36
|
-
readonly right: number;
|
|
37
|
-
readonly bottom: 0;
|
|
38
|
-
readonly zIndex: 1;
|
|
39
|
-
readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* This inner container css contains the "mask" logic for the scroll indicators.
|
|
44
|
-
* Essentially they cover (mask) the "real" scroll indicators when the user is scrolled
|
|
45
|
-
* to the top or bottom of the container.
|
|
46
|
-
*/
|
|
47
|
-
export declare const innerContainerCSS: (opts: StyleOpts) => {
|
|
48
|
-
readonly "&::after": {
|
|
49
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
50
|
-
readonly content: "''";
|
|
51
|
-
readonly display: "block";
|
|
52
|
-
readonly flexShrink: 0;
|
|
53
|
-
readonly height: 2;
|
|
54
|
-
readonly marginTop: "auto";
|
|
55
|
-
readonly position: "relative";
|
|
56
|
-
readonly zIndex: 2;
|
|
57
|
-
readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
|
|
58
|
-
};
|
|
59
|
-
readonly "&::before"?: {
|
|
60
|
-
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
61
|
-
readonly content: "''";
|
|
62
|
-
readonly left: 0;
|
|
63
|
-
readonly right: 0;
|
|
64
|
-
readonly height: 2;
|
|
65
|
-
readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
|
|
66
|
-
readonly position: "absolute";
|
|
67
|
-
readonly display: "block";
|
|
68
|
-
readonly zIndex: 2;
|
|
69
|
-
} | undefined;
|
|
70
|
-
readonly display: "flex";
|
|
71
|
-
readonly overflow: "auto";
|
|
72
|
-
readonly width: "100%";
|
|
73
|
-
readonly position: "relative";
|
|
74
|
-
readonly boxSizing: "border-box";
|
|
75
|
-
readonly flexDirection: "column";
|
|
76
|
-
};
|
|
77
|
-
export declare const containerCSS: (opts: StyleOpts) => {
|
|
78
|
-
readonly marginTop: 0 | 2;
|
|
79
|
-
readonly marginLeft: "var(--ds-space-100)";
|
|
80
|
-
readonly marginRight: "var(--ds-space-100)";
|
|
81
|
-
readonly position: "relative";
|
|
82
|
-
readonly "& [data-ds--menu--heading-item]": {
|
|
83
|
-
readonly marginBottom: "var(--ds-space-075)";
|
|
84
|
-
readonly marginTop: "var(--ds-space-200)";
|
|
85
|
-
};
|
|
86
|
-
readonly "& [data-ds--menu--skeleton-heading-item]": {
|
|
87
|
-
readonly marginTop: number;
|
|
88
|
-
readonly marginBottom: number;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as HeadingItem } from './heading-item';
|
|
2
|
-
export type { HeadingItemProps } from './heading-item';
|
|
3
|
-
export { default as Section } from './section';
|
|
4
|
-
export type { SectionProps } from './section';
|
|
5
|
-
export { default as SkeletonHeadingItem } from './skeleton-heading-item';
|
|
6
|
-
export type { SkeletonHeadingItemProps } from './skeleton-heading-item';
|