@cloudscape-design/components 3.0.1409 → 3.0.1411
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/autosuggest/index.d.ts.map +1 -1
- package/autosuggest/index.js +1 -1
- package/autosuggest/index.js.map +1 -1
- package/autosuggest/internal.d.ts +8 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js +2 -2
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/styles.css.js +3 -3
- package/autosuggest/styles.scoped.css +5 -3
- package/autosuggest/styles.selectors.js +3 -3
- package/button/styles.css.js +24 -24
- package/button/styles.scoped.css +83 -79
- package/button/styles.selectors.js +24 -24
- package/cards/index.js +1 -1
- package/cards/index.js.map +1 -1
- package/container/internal.d.ts +3 -2
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +2 -2
- package/container/internal.js.map +1 -1
- package/container/use-sticky-header.d.ts +0 -14
- package/container/use-sticky-header.d.ts.map +1 -1
- package/container/use-sticky-header.js +9 -92
- package/container/use-sticky-header.js.map +1 -1
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js +16 -50
- package/copy-to-clipboard/internal.js.map +1 -1
- package/copy-to-clipboard/styles.css.js +5 -10
- package/copy-to-clipboard/styles.scoped.css +6 -38
- package/copy-to-clipboard/styles.selectors.js +5 -10
- package/flashbar/collapsible-flashbar.d.ts +1 -0
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +10 -4
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts +6 -0
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js +6 -6
- package/flashbar/flash.js.map +1 -1
- package/flashbar/internal-interfaces.d.ts +11 -1
- package/flashbar/internal-interfaces.d.ts.map +1 -1
- package/flashbar/internal-interfaces.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/non-collapsible-flashbar.js +8 -1
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +184 -161
- package/flashbar/styles.selectors.js +50 -50
- package/icon/generated/icons.d.ts +4 -0
- package/icon/generated/icons.d.ts.map +1 -1
- package/icon/generated/icons.js +14 -0
- package/icon/generated/icons.js.map +1 -1
- package/icon/styles.css.js +44 -43
- package/icon/styles.scoped.css +109 -107
- package/icon/styles.selectors.js +44 -43
- package/icon-provider/interfaces.d.ts +1 -1
- package/icon-provider/interfaces.d.ts.map +1 -1
- package/icon-provider/interfaces.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/base-theme/styles.scoped.css +1 -0
- package/internal/components/autosuggest-input/index.d.ts +5 -0
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js +2 -2
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/option/index.d.ts.map +1 -1
- package/internal/components/option/index.js +2 -2
- package/internal/components/option/index.js.map +1 -1
- package/internal/components/option/styles.css.js +19 -18
- package/internal/components/option/styles.scoped.css +39 -33
- package/internal/components/option/styles.selectors.js +19 -18
- package/internal/components/radio-button/index.d.ts +1 -1
- package/internal/components/radio-button/index.d.ts.map +1 -1
- package/internal/components/radio-button/index.js.map +1 -1
- package/internal/components/radio-button/styles.css.js +7 -7
- package/internal/components/radio-button/styles.scoped.css +36 -12
- package/internal/components/radio-button/styles.selectors.js +7 -7
- package/internal/components/sortable-area/index.d.ts.map +1 -1
- package/internal/components/sortable-area/index.js +34 -4
- package/internal/components/sortable-area/index.js.map +1 -1
- package/internal/components/sortable-area/keyboard-sensor/index.js +1 -1
- package/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -1
- package/{table → internal/components/sticky-header}/sticky-scrolling.d.ts +1 -6
- package/internal/components/sticky-header/sticky-scrolling.d.ts.map +1 -0
- package/{table → internal/components/sticky-header}/sticky-scrolling.js +2 -7
- package/internal/components/sticky-header/sticky-scrolling.js.map +1 -0
- package/internal/components/sticky-header/use-cells-resize-observer.d.ts +1 -0
- package/internal/components/sticky-header/use-cells-resize-observer.d.ts.map +1 -0
- package/internal/components/sticky-header/use-cells-resize-observer.js +39 -0
- package/internal/components/sticky-header/use-cells-resize-observer.js.map +1 -0
- package/internal/components/sticky-header/use-header-stuck.d.ts +7 -0
- package/internal/components/sticky-header/use-header-stuck.d.ts.map +1 -0
- package/internal/components/sticky-header/use-header-stuck.js +35 -0
- package/internal/components/sticky-header/use-header-stuck.js.map +1 -0
- package/internal/components/sticky-header/use-sticky-header-copy.d.ts +19 -0
- package/internal/components/sticky-header/use-sticky-header-copy.d.ts.map +1 -0
- package/{table/use-sticky-header.js → internal/components/sticky-header/use-sticky-header-copy.js} +7 -8
- package/internal/components/sticky-header/use-sticky-header-copy.js.map +1 -0
- package/internal/components/sticky-header/use-sticky-position.d.ts +27 -0
- package/internal/components/sticky-header/use-sticky-position.d.ts.map +1 -0
- package/internal/components/sticky-header/use-sticky-position.js +57 -0
- package/internal/components/sticky-header/use-sticky-position.js.map +1 -0
- package/internal/components/sticky-scrollbar/index.d.ts.map +1 -0
- package/internal/components/sticky-scrollbar/index.js.map +1 -0
- package/{table → internal/components}/sticky-scrollbar/sticky-scrollbar.d.ts +2 -1
- package/internal/components/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -0
- package/{table → internal/components}/sticky-scrollbar/sticky-scrollbar.js +8 -5
- package/internal/components/sticky-scrollbar/sticky-scrollbar.js.map +1 -0
- package/internal/components/sticky-scrollbar/styles.css.js +11 -0
- package/{table → internal/components}/sticky-scrollbar/styles.scoped.css +8 -8
- package/internal/components/sticky-scrollbar/styles.selectors.js +12 -0
- package/{table → internal/components}/sticky-scrollbar/use-sticky-scrollbar.d.ts +11 -2
- package/internal/components/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +1 -0
- package/{table → internal/components}/sticky-scrollbar/use-sticky-scrollbar.js +17 -16
- package/internal/components/sticky-scrollbar/use-sticky-scrollbar.js.map +1 -0
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +1 -0
- package/internal/generated/styles/tokens.js +1 -0
- package/internal/generated/theming/index.cjs +4 -0
- package/internal/generated/theming/index.d.cts +9 -0
- package/internal/generated/theming/index.d.ts +9 -0
- package/internal/generated/theming/index.js +4 -0
- package/internal/manifest.json +1 -1
- package/manifest.json +2 -2
- package/multiselect/index.d.ts.map +1 -1
- package/multiselect/index.js +1 -1
- package/multiselect/index.js.map +1 -1
- package/multiselect/internal.d.ts +12 -1
- package/multiselect/internal.d.ts.map +1 -1
- package/multiselect/internal.js +9 -5
- package/multiselect/internal.js.map +1 -1
- package/multiselect/styles.css.js +5 -5
- package/multiselect/styles.scoped.css +17 -5
- package/multiselect/styles.selectors.js +5 -5
- package/package.json +1 -1
- package/radio-button/styles.css.js +1 -1
- package/radio-button/styles.scoped.css +1 -25
- package/radio-button/styles.selectors.js +1 -1
- package/radio-group/internal.d.ts +7 -1
- package/radio-group/internal.d.ts.map +1 -1
- package/radio-group/internal.js +2 -2
- package/radio-group/internal.js.map +1 -1
- package/radio-group/styles.css.js +5 -5
- package/radio-group/styles.scoped.css +7 -6
- package/radio-group/styles.selectors.js +5 -5
- package/segmented-control/internal-segmented-control.d.ts +4 -1
- package/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/segmented-control/internal-segmented-control.js +3 -3
- package/segmented-control/internal-segmented-control.js.map +1 -1
- package/segmented-control/internal.d.ts +11 -1
- package/segmented-control/internal.d.ts.map +1 -1
- package/segmented-control/internal.js +3 -2
- package/segmented-control/internal.js.map +1 -1
- package/segmented-control/segment.d.ts +2 -0
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js +4 -2
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +31 -31
- package/segmented-control/styles.scoped.css +119 -82
- package/segmented-control/styles.selectors.js +31 -31
- package/select/index.d.ts.map +1 -1
- package/select/index.js +1 -1
- package/select/index.js.map +1 -1
- package/select/internal.d.ts +8 -0
- package/select/internal.d.ts.map +1 -1
- package/select/internal.js +4 -4
- package/select/internal.js.map +1 -1
- package/select/parts/styles.css.js +22 -21
- package/select/parts/styles.scoped.css +28 -24
- package/select/parts/styles.selectors.js +22 -21
- package/select/parts/trigger.d.ts +6 -0
- package/select/parts/trigger.d.ts.map +1 -1
- package/select/parts/trigger.js +4 -4
- package/select/parts/trigger.js.map +1 -1
- package/select/styles.css.js +3 -3
- package/select/styles.scoped.css +14 -3
- package/select/styles.selectors.js +3 -3
- package/styling/autosuggest.scss +1 -0
- package/styling/flashbar.scss +127 -0
- package/styling/multiselect.scss +80 -0
- package/styling/radio-group.scss +1 -0
- package/styling/segmented-control.scss +111 -0
- package/styling/select.scss +80 -0
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +1 -1
- package/table/internal.js.map +1 -1
- package/table/resizer/styles.css.js +17 -17
- package/table/resizer/styles.scoped.css +30 -29
- package/table/resizer/styles.selectors.js +17 -17
- package/table/sticky-header.d.ts.map +1 -1
- package/table/sticky-header.js +8 -2
- package/table/sticky-header.js.map +1 -1
- package/table/styles.css.js +37 -37
- package/table/styles.scoped.css +47 -47
- package/table/styles.selectors.js +37 -37
- package/table/use-column-widths.d.ts.map +1 -1
- package/table/use-column-widths.js +4 -16
- package/table/use-column-widths.js.map +1 -1
- package/table-root/internal.d.ts.map +1 -1
- package/table-root/internal.js +17 -3
- package/table-root/internal.js.map +1 -1
- package/table-root/styles.css.js +5 -5
- package/table-root/styles.scoped.css +10 -6
- package/table-root/styles.selectors.js +5 -5
- package/tabs/styles.css.js +30 -31
- package/tabs/styles.scoped.css +51 -67
- package/tabs/styles.selectors.js +30 -31
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +5 -54
- package/tabs/tab-header-bar.js.map +1 -1
- package/token/styles.css.js +14 -14
- package/token/styles.scoped.css +25 -24
- package/token/styles.selectors.js +14 -14
- package/token-group/internal.d.ts +5 -0
- package/token-group/internal.d.ts.map +1 -1
- package/token-group/internal.js +2 -2
- package/token-group/internal.js.map +1 -1
- package/table/sticky-scrollbar/index.d.ts.map +0 -1
- package/table/sticky-scrollbar/index.js.map +0 -1
- package/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +0 -1
- package/table/sticky-scrollbar/sticky-scrollbar.js.map +0 -1
- package/table/sticky-scrollbar/styles.css.js +0 -11
- package/table/sticky-scrollbar/styles.selectors.js +0 -12
- package/table/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +0 -1
- package/table/sticky-scrollbar/use-sticky-scrollbar.js.map +0 -1
- package/table/sticky-scrolling.d.ts.map +0 -1
- package/table/sticky-scrolling.js.map +0 -1
- package/table/use-sticky-header.d.ts +0 -5
- package/table/use-sticky-header.d.ts.map +0 -1
- package/table/use-sticky-header.js.map +0 -1
- /package/{table → internal/components}/sticky-scrollbar/index.d.ts +0 -0
- /package/{table → internal/components}/sticky-scrollbar/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-header-stuck.js","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-header/use-header-stuck.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAOpE,MAAM,UAAU,cAAc,CAC5B,OAA+B,EAC/B,SAAiC,EACjC,QAAiB;IAEjB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9D,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;QAC9B,IAAI,IAAI,KAAK,QAAQ,IAAI,MA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M,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;YAC/E,OAAO,GAAG,EAAE;gBACV,UAAU,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAE7B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AACtC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useCallback, useEffect, useState } from 'react';\n\ninterface UseHeaderStuckResult {\n isStuck: boolean;\n isStuckAtBottom: boolean;\n}\n\nexport function useHeaderStuck(\n rootRef: RefObject<HTMLElement>,\n headerRef: RefObject<HTMLElement>,\n isSticky: boolean\n): UseHeaderStuckResult {\n const [isStuck, setIsStuck] = useState(false);\n const [isStuckAtBottom, setIsStuckAtBottom] = useState(false);\n\n const checkIfStuck = useCallback(\n ({ isTrusted, target, type }) => {\n if (type === 'resize' && target === window && !isTrusted) {\n // The window size didn't actually change, it was a synthetic event\n return;\n }\n if (rootRef.current && headerRef.current) {\n const rootTopBorderWidth = parseFloat(getComputedStyle(rootRef.current).borderTopWidth) || 0;\n\n // Using Math.round to adjust for rounding errors in floating-point arithmetic and timing issues\n const rootTop = Math.round(rootRef.current.getBoundingClientRect().top + rootTopBorderWidth);\n const headerTop = Math.round(headerRef.current.getBoundingClientRect().top);\n setIsStuck(rootTop < headerTop);\n\n const rootBottom = Math.round(rootRef.current.getBoundingClientRect().bottom - rootTopBorderWidth);\n const headerBottom = Math.round(headerRef.current.getBoundingClientRect().bottom);\n setIsStuckAtBottom(rootBottom <= headerBottom);\n }\n },\n [rootRef, headerRef]\n );\n\n useEffect(() => {\n if (isSticky) {\n const controller = new AbortController();\n window.addEventListener('scroll', checkIfStuck, { capture: true, signal: controller.signal });\n window.addEventListener('resize', checkIfStuck, { signal: controller.signal });\n return () => {\n controller.abort();\n };\n }\n }, [isSticky, checkIfStuck]);\n\n return { isStuck, isStuckAtBottom };\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
interface StickyHeaderCopyProps {
|
|
3
|
+
tableRef: RefObject<HTMLElement>;
|
|
4
|
+
theadRef: RefObject<HTMLElement>;
|
|
5
|
+
secondaryTheadRef: RefObject<HTMLElement>;
|
|
6
|
+
secondaryTableRef: RefObject<HTMLElement>;
|
|
7
|
+
tableWrapperRef: RefObject<HTMLElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useStickyHeaderCopy({
|
|
10
|
+
tableRef,
|
|
11
|
+
theadRef,
|
|
12
|
+
secondaryTheadRef,
|
|
13
|
+
secondaryTableRef,
|
|
14
|
+
tableWrapperRef
|
|
15
|
+
}: StickyHeaderCopyProps): {
|
|
16
|
+
scrollToRow: (itemNode: HTMLElement | null) => void;
|
|
17
|
+
scrollToTop: () => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sticky-header-copy.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-header/use-sticky-header-copy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAgC,MAAM,OAAO,CAAC;AAOhE,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACjC,QAAQ,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACjC,iBAAiB,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAC1C,iBAAiB,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAC1C,eAAe,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACzC;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,EAAE,qBAAqB;4BA4BS,WAAW,GAAG,IAAI;;EAMlD"}
|
package/{table/use-sticky-header.js → internal/components/sticky-header/use-sticky-header-copy.js}
RENAMED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { useCallback, useLayoutEffect } from 'react';
|
|
4
4
|
import { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';
|
|
5
|
-
import { useMobile } from '
|
|
5
|
+
import { useMobile } from '../../hooks/use-mobile';
|
|
6
6
|
import stickyScrolling, { calculateScrollingOffset, scrollUpBy } from './sticky-scrolling';
|
|
7
|
-
export
|
|
7
|
+
export function useStickyHeaderCopy({ tableRef, theadRef, secondaryTheadRef, secondaryTableRef, tableWrapperRef, }) {
|
|
8
8
|
const isMobile = useMobile();
|
|
9
|
-
|
|
10
|
-
const syncColumnHeaderWidths = useCallback(() => {
|
|
9
|
+
const hideHeaderUnderCopy = useCallback(() => {
|
|
11
10
|
var _a;
|
|
12
11
|
if (tableRef.current &&
|
|
13
12
|
theadRef.current &&
|
|
@@ -20,9 +19,9 @@ export const useStickyHeader = (tableRef, theadRef, secondaryTheadRef, secondary
|
|
|
20
19
|
}
|
|
21
20
|
}, [theadRef, secondaryTheadRef, secondaryTableRef, tableWrapperRef, tableRef]);
|
|
22
21
|
useLayoutEffect(() => {
|
|
23
|
-
|
|
22
|
+
hideHeaderUnderCopy();
|
|
24
23
|
});
|
|
25
|
-
useResizeObserver(theadRef,
|
|
24
|
+
useResizeObserver(theadRef, hideHeaderUnderCopy);
|
|
26
25
|
const scrollToTop = () => {
|
|
27
26
|
if (!isMobile && theadRef.current && secondaryTheadRef.current && tableWrapperRef.current) {
|
|
28
27
|
const scrollDist = calculateScrollingOffset(theadRef.current, secondaryTheadRef.current);
|
|
@@ -38,5 +37,5 @@ export const useStickyHeader = (tableRef, theadRef, secondaryTheadRef, secondary
|
|
|
38
37
|
}
|
|
39
38
|
};
|
|
40
39
|
return { scrollToRow, scrollToTop };
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=use-sticky-header.js.map
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=use-sticky-header-copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sticky-header-copy.js","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-header/use-sticky-header-copy.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,WAAW,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,eAAe,EAAE,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAU3F,MAAM,UAAU,mBAAmB,CAAC,EAClC,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GACO;IACtB,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,MAAM,mBAAmB,GAAG,WAAW,CAAC,GAAG,EAAE;;QAC3C,IACE,QAAQ,CAAC,OAAO;YAChB,QAAQ,CAAC,OAAO;YAChB,iBAAiB,CAAC,OAAO;YACzB,iBAAiB,CAAC,OAAO;YACzB,eAAe,CAAC,OAAO,EACvB,CAAC;YACD,gFAAgF;YAChF,MAAM,KAAK,GAAG,MAAA,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,mCAAI,QAAQ,CAAC,OAAO,CAAC;YACpE,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,KAAK,CAAC,qBAAqB,EAAE,CAAC,MAAM,IAAI,CAAC;QAChG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;IAChF,eAAe,CAAC,GAAG,EAAE;QACnB,mBAAmB,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IACH,iBAAiB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,OAAO,IAAI,iBAAiB,CAAC,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,CAAC;YAC1F,MAAM,UAAU,GAAG,wBAAwB,CAAC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;YACzF,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;gBACnB,UAAU,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IACF,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;IAC7E,MAAM,WAAW,GAAG,CAAC,QAA4B,EAAE,EAAE;QACnD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,YAAY,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC;IACH,CAAC,CAAC;IACF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AACtC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useCallback, useLayoutEffect } from 'react';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useMobile } from '../../hooks/use-mobile';\nimport stickyScrolling, { calculateScrollingOffset, scrollUpBy } from './sticky-scrolling';\n\ninterface StickyHeaderCopyProps {\n tableRef: RefObject<HTMLElement>;\n theadRef: RefObject<HTMLElement>;\n secondaryTheadRef: RefObject<HTMLElement>;\n secondaryTableRef: RefObject<HTMLElement>;\n tableWrapperRef: RefObject<HTMLElement>;\n}\n\nexport function useStickyHeaderCopy({\n tableRef,\n theadRef,\n secondaryTheadRef,\n secondaryTableRef,\n tableWrapperRef,\n}: StickyHeaderCopyProps) {\n const isMobile = useMobile();\n const hideHeaderUnderCopy = useCallback(() => {\n if (\n tableRef.current &&\n theadRef.current &&\n secondaryTheadRef.current &&\n secondaryTableRef.current &&\n tableWrapperRef.current\n ) {\n // Use the full thead height to account for multi-row headers (grouped columns).\n const thead = theadRef.current.closest('thead') ?? theadRef.current;\n tableWrapperRef.current.style.marginBlockStart = `-${thead.getBoundingClientRect().height}px`;\n }\n }, [theadRef, secondaryTheadRef, secondaryTableRef, tableWrapperRef, tableRef]);\n useLayoutEffect(() => {\n hideHeaderUnderCopy();\n });\n useResizeObserver(theadRef, hideHeaderUnderCopy);\n const scrollToTop = () => {\n if (!isMobile && theadRef.current && secondaryTheadRef.current && tableWrapperRef.current) {\n const scrollDist = calculateScrollingOffset(theadRef.current, secondaryTheadRef.current);\n if (scrollDist > 0) {\n scrollUpBy(scrollDist, tableWrapperRef.current);\n }\n }\n };\n const { scrollToItem } = stickyScrolling(tableWrapperRef, secondaryTheadRef);\n const scrollToRow = (itemNode: HTMLElement | null) => {\n if (!isMobile) {\n scrollToItem(itemNode);\n }\n };\n return { scrollToRow, scrollToTop };\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
interface StickyPositionOptions {
|
|
3
|
+
sticky?: boolean;
|
|
4
|
+
offset?: number;
|
|
5
|
+
mobileOffset?: number;
|
|
6
|
+
disableMobile?: boolean;
|
|
7
|
+
additionalOffset?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function useStickyPosition(rootRef: RefObject<HTMLElement>, headerRef: RefObject<HTMLElement>, {
|
|
10
|
+
sticky,
|
|
11
|
+
offset,
|
|
12
|
+
mobileOffset,
|
|
13
|
+
disableMobile,
|
|
14
|
+
additionalOffset
|
|
15
|
+
}: StickyPositionOptions): {
|
|
16
|
+
isSticky: boolean;
|
|
17
|
+
isStuck: boolean;
|
|
18
|
+
isStuckAtBottom: boolean;
|
|
19
|
+
stickyStyles: {
|
|
20
|
+
style: {
|
|
21
|
+
top: string;
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
style?: undefined;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sticky-position.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-header/use-sticky-position.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AAkC7D,UAAU,qBAAqB;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,EAC/B,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,EACjC,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAwB,EAAE,EAAE,qBAAqB;;;;;;;;;;;EA8CjG"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { useLayoutEffect, useState } from 'react';
|
|
4
|
+
import { findUpUntil } from '@cloudscape-design/component-toolkit/dom';
|
|
5
|
+
import * as tokens from '../../generated/styles/tokens';
|
|
6
|
+
import { useMobile } from '../../hooks/use-mobile';
|
|
7
|
+
import globalVars from '../../styles/global-vars';
|
|
8
|
+
import { getOverflowParents } from '../../utils/scrollable-containers';
|
|
9
|
+
import { useHeaderStuck } from './use-header-stuck';
|
|
10
|
+
function computeOffset({ isMobile, __stickyOffset, __mobileStickyOffset, hasInnerOverflowParents, __additionalOffset, }) {
|
|
11
|
+
const localOffset = isMobile ? (__stickyOffset !== null && __stickyOffset !== void 0 ? __stickyOffset : 0) - (__mobileStickyOffset !== null && __mobileStickyOffset !== void 0 ? __mobileStickyOffset : 0) : (__stickyOffset !== null && __stickyOffset !== void 0 ? __stickyOffset : 0);
|
|
12
|
+
if (hasInnerOverflowParents || __stickyOffset !== undefined) {
|
|
13
|
+
return `${localOffset}px`;
|
|
14
|
+
}
|
|
15
|
+
const globalOffset = `var(${globalVars.stickyVerticalTopOffset}, 0px)`;
|
|
16
|
+
return `calc(${globalOffset} + ${localOffset}px + ${__additionalOffset ? tokens.spaceScaledS : '0px'})`;
|
|
17
|
+
}
|
|
18
|
+
export function useStickyPosition(rootRef, headerRef, { sticky, offset, mobileOffset, disableMobile, additionalOffset = false }) {
|
|
19
|
+
const isMobile = useMobile();
|
|
20
|
+
const disableSticky = isMobile && disableMobile;
|
|
21
|
+
const isSticky = !disableSticky && !!sticky;
|
|
22
|
+
// If it has overflow parents inside the app layout, we shouldn't apply a sticky offset.
|
|
23
|
+
const [hasInnerOverflowParents, setHasInnerOverflowParents] = useState(false);
|
|
24
|
+
useLayoutEffect(() => {
|
|
25
|
+
if (rootRef.current) {
|
|
26
|
+
const overflowParents = getOverflowParents(rootRef.current);
|
|
27
|
+
const mainElement = findUpUntil(rootRef.current, elem => elem.tagName === 'MAIN');
|
|
28
|
+
// In both versions of the app layout, the scrolling element for disableBodyScroll
|
|
29
|
+
// is the <main>. If the closest overflow parent is also the closest <main> and we have
|
|
30
|
+
// offset values, it's safe to assume that it's the app layout scroll root and we
|
|
31
|
+
// should stop there.
|
|
32
|
+
setHasInnerOverflowParents(overflowParents.length > 0 && overflowParents[0] !== mainElement);
|
|
33
|
+
}
|
|
34
|
+
}, [rootRef]);
|
|
35
|
+
const computedOffset = computeOffset({
|
|
36
|
+
isMobile,
|
|
37
|
+
__stickyOffset: offset,
|
|
38
|
+
__mobileStickyOffset: mobileOffset,
|
|
39
|
+
hasInnerOverflowParents,
|
|
40
|
+
__additionalOffset: additionalOffset,
|
|
41
|
+
});
|
|
42
|
+
const stickyStyles = isSticky
|
|
43
|
+
? {
|
|
44
|
+
style: {
|
|
45
|
+
top: computedOffset,
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
: {};
|
|
49
|
+
const { isStuck, isStuckAtBottom } = useHeaderStuck(rootRef, headerRef, isSticky);
|
|
50
|
+
return {
|
|
51
|
+
isSticky,
|
|
52
|
+
isStuck,
|
|
53
|
+
isStuckAtBottom,
|
|
54
|
+
stickyStyles,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=use-sticky-position.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sticky-position.js","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-header/use-sticky-position.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAUpD,SAAS,aAAa,CAAC,EACrB,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,GACC;IACnB,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,CAAC,GAAG,CAAC,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,aAAd,cAAc,cAAd,c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AAC;IAEd,MAAM,cAAc,GAAG,aAAa,CAAC;QACnC,QAAQ;QACR,cAAc,EAAE,MAAM;QACtB,oBAAoB,EAAE,YAAY;QAClC,uBAAuB;QACvB,kBAAkB,EAAE,gBAAgB;KACrC,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,QAAQ;QAC3B,CAAC,CAAC;YACE,KAAK,EAAE;gBACL,GAAG,EAAE,cAAc;aACpB;SACF;QACH,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAElF,OAAO;QACL,QAAQ;QACR,OAAO;QACP,eAAe;QACf,YAAY;KACb,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useLayoutEffect, useState } from 'react';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport * as tokens from '../../generated/styles/tokens';\nimport { useMobile } from '../../hooks/use-mobile';\nimport globalVars from '../../styles/global-vars';\nimport { getOverflowParents } from '../../utils/scrollable-containers';\nimport { useHeaderStuck } from './use-header-stuck';\n\ninterface ComputeOffsetProps {\n isMobile: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n hasInnerOverflowParents: boolean;\n __additionalOffset?: boolean;\n}\n\nfunction computeOffset({\n isMobile,\n __stickyOffset,\n __mobileStickyOffset,\n hasInnerOverflowParents,\n __additionalOffset,\n}: ComputeOffsetProps): string {\n const localOffset = isMobile ? (__stickyOffset ?? 0) - (__mobileStickyOffset ?? 0) : (__stickyOffset ?? 0);\n if (hasInnerOverflowParents || __stickyOffset !== undefined) {\n return `${localOffset}px`;\n }\n const globalOffset = `var(${globalVars.stickyVerticalTopOffset}, 0px)`;\n\n return `calc(${globalOffset} + ${localOffset}px + ${__additionalOffset ? tokens.spaceScaledS : '0px'})`;\n}\n\ninterface StickyPositionOptions {\n sticky?: boolean;\n offset?: number;\n mobileOffset?: number;\n disableMobile?: boolean;\n additionalOffset?: boolean;\n}\n\nexport function useStickyPosition(\n rootRef: RefObject<HTMLElement>,\n headerRef: RefObject<HTMLElement>,\n { sticky, offset, mobileOffset, disableMobile, additionalOffset = false }: StickyPositionOptions\n) {\n const isMobile = useMobile();\n const disableSticky = isMobile && disableMobile;\n const isSticky = !disableSticky && !!sticky;\n\n // If it has overflow parents inside the app layout, we shouldn't apply a sticky offset.\n const [hasInnerOverflowParents, setHasInnerOverflowParents] = useState(false);\n\n useLayoutEffect(() => {\n if (rootRef.current) {\n const overflowParents = getOverflowParents(rootRef.current);\n const mainElement = findUpUntil(rootRef.current, elem => elem.tagName === 'MAIN');\n\n // In both versions of the app layout, the scrolling element for disableBodyScroll\n // is the <main>. If the closest overflow parent is also the closest <main> and we have\n // offset values, it's safe to assume that it's the app layout scroll root and we\n // should stop there.\n setHasInnerOverflowParents(overflowParents.length > 0 && overflowParents[0] !== mainElement);\n }\n }, [rootRef]);\n\n const computedOffset = computeOffset({\n isMobile,\n __stickyOffset: offset,\n __mobileStickyOffset: mobileOffset,\n hasInnerOverflowParents,\n __additionalOffset: additionalOffset,\n });\n\n const stickyStyles = isSticky\n ? {\n style: {\n top: computedOffset,\n },\n }\n : {};\n\n const { isStuck, isStuckAtBottom } = useHeaderStuck(rootRef, headerRef, isSticky);\n\n return {\n isSticky,\n isStuck,\n isStuckAtBottom,\n stickyStyles,\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-scrollbar/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-scrollbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { default as StickyScrollbar } from './sticky-scrollbar';\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { StickyScrollbarContentOptions } from './use-sticky-scrollbar';
|
|
3
|
+
interface StickyScrollbarProps extends StickyScrollbarContentOptions {
|
|
3
4
|
wrapperRef: React.RefObject<HTMLDivElement>;
|
|
4
5
|
tableRef: React.RefObject<HTMLTableElement>;
|
|
5
6
|
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sticky-scrollbar.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-scrollbar/sticky-scrollbar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,OAAO,EAAE,6BAA6B,EAAsB,MAAM,wBAAwB,CAAC;AAI3F,UAAU,oBAAqB,SAAQ,6BAA6B;IAClE,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;;AAED,wBAA2C"}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
|
|
6
|
-
import { useIntersectionObserver } from '../../
|
|
7
|
-
import { useVisualRefresh } from '../../
|
|
8
|
-
import { browserScrollbarSize } from '../../
|
|
6
|
+
import { useIntersectionObserver } from '../../hooks/use-intersection-observer';
|
|
7
|
+
import { useVisualRefresh } from '../../hooks/use-visual-mode';
|
|
8
|
+
import { browserScrollbarSize } from '../../utils/browser-scrollbar-size';
|
|
9
9
|
import { useStickyScrollbar } from './use-sticky-scrollbar';
|
|
10
10
|
import styles from './styles.css.js';
|
|
11
11
|
export default forwardRef(StickyScrollbar);
|
|
12
|
-
function StickyScrollbar({ wrapperRef, tableRef, onScroll, hasStickyColumns }, ref) {
|
|
12
|
+
function StickyScrollbar({ wrapperRef, tableRef, onScroll, hasStickyColumns, getContentInlineSize, contentKey }, ref) {
|
|
13
13
|
const isVisualRefresh = useVisualRefresh();
|
|
14
14
|
const scrollbarRef = React.useRef(null);
|
|
15
15
|
const scrollbarContentRef = React.useRef(null);
|
|
@@ -19,7 +19,10 @@ function StickyScrollbar({ wrapperRef, tableRef, onScroll, hasStickyColumns }, r
|
|
|
19
19
|
* overlay scrollbars (e.g. Mac).
|
|
20
20
|
*/
|
|
21
21
|
const offsetScrollbar = hasStickyColumns || browserScrollbarSize().height === 0;
|
|
22
|
-
useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef, wrapperRef, offsetScrollbar
|
|
22
|
+
useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef, wrapperRef, offsetScrollbar, {
|
|
23
|
+
getContentInlineSize,
|
|
24
|
+
contentKey,
|
|
25
|
+
});
|
|
23
26
|
const { ref: stickyDetectionRef, isIntersecting: isStickyDetectionVisible } = useIntersectionObserver();
|
|
24
27
|
return (React.createElement(React.Fragment, null,
|
|
25
28
|
React.createElement("div", { ref: mergedRef, className: clsx(styles['sticky-scrollbar'], offsetScrollbar && styles['sticky-scrollbar-offset'], isVisualRefresh && styles['is-visual-refresh']), onScroll: onScroll, "data-stuck": !isStickyDetectionVisible },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sticky-scrollbar.js","sourceR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,EAAE,CAAC;IAExG,OAAO,CACL;QACE,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,kBAAkB,CAAC,EAC1B,eAAe,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACpD,eAAe,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAC/C,EACD,QAAQ,EAAE,QAAQ,gBACN,CAAC,wBAAwB;YAErC,6BAAK,GAAG,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC,GAAI,CAC5E;QACN,6BAAK,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAI,CACzG,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useIntersectionObserver } from '../../hooks/use-intersection-observer';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { browserScrollbarSize } from '../../utils/browser-scrollbar-size';\nimport { StickyScrollbarContentOptions, useStickyScrollbar } from './use-sticky-scrollbar';\n\nimport styles from './styles.css.js';\n\ninterface StickyScrollbarProps extends StickyScrollbarContentOptions {\n wrapperRef: React.RefObject<HTMLDivElement>;\n tableRef: React.RefObject<HTMLTableElement>;\n onScroll?: React.UIEventHandler<HTMLDivElement>;\n hasStickyColumns?: boolean;\n}\n\nexport default forwardRef(StickyScrollbar);\n\nfunction StickyScrollbar(\n { wrapperRef, tableRef, onScroll, hasStickyColumns, getContentInlineSize, contentKey }: StickyScrollbarProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const isVisualRefresh = useVisualRefresh();\n const scrollbarRef = React.useRef<HTMLDivElement>(null);\n const scrollbarContentRef = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(ref, scrollbarRef);\n\n /**\n * If the height of the scrollbar is 0, we're likely on a platform that uses\n * overlay scrollbars (e.g. Mac).\n */\n const offsetScrollbar = hasStickyColumns || browserScrollbarSize().height === 0;\n\n useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef, wrapperRef, offsetScrollbar, {\n getContentInlineSize,\n contentKey,\n });\n\n const { ref: stickyDetectionRef, isIntersecting: isStickyDetectionVisible } = useIntersectionObserver();\n\n return (\n <>\n <div\n ref={mergedRef}\n className={clsx(\n styles['sticky-scrollbar'],\n offsetScrollbar && styles['sticky-scrollbar-offset'],\n isVisualRefresh && styles['is-visual-refresh']\n )}\n onScroll={onScroll}\n data-stuck={!isStickyDetectionVisible}\n >\n <div ref={scrollbarContentRef} className={styles['sticky-scrollbar-content']} />\n </div>\n <div ref={stickyDetectionRef} style={{ position: 'absolute', right: 0, bottom: 0, left: 0, height: 1 }} />\n </>\n );\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import './styles.scoped.css';
|
|
3
|
+
export default {
|
|
4
|
+
"sticky-scrollbar": "awsui_sticky-scrollbar_7a840_1vm15_9",
|
|
5
|
+
"sticky-scrollbar-content": "awsui_sticky-scrollbar-content_7a840_1vm15_21",
|
|
6
|
+
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_7a840_1vm15_24",
|
|
7
|
+
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-invisible_7a840_1vm15_27",
|
|
8
|
+
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-offset_7a840_1vm15_30",
|
|
9
|
+
"is-visual-refresh": "awsui_is-visual-refresh_7a840_1vm15_33"
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
7
7
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
8
8
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
9
|
-
.awsui_sticky-
|
|
9
|
+
.awsui_sticky-scrollbar_7a840_1vm15_9:not(#\9) {
|
|
10
10
|
block-size: 15px;
|
|
11
11
|
position: sticky;
|
|
12
12
|
display: none;
|
|
@@ -15,27 +15,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
15
15
|
inset-block-end: 0;
|
|
16
16
|
inline-size: 100%;
|
|
17
17
|
}
|
|
18
|
-
.awsui_sticky-
|
|
18
|
+
.awsui_sticky-scrollbar_7a840_1vm15_9[data-stuck=false]:not(#\9) {
|
|
19
19
|
clip-path: inset(-9999px 0 0 0 round var(--border-radius-container-cjce5i, 16px));
|
|
20
20
|
}
|
|
21
|
-
.awsui_sticky-scrollbar-
|
|
21
|
+
.awsui_sticky-scrollbar-content_7a840_1vm15_21:not(#\9) {
|
|
22
22
|
block-size: 15px;
|
|
23
23
|
}
|
|
24
|
-
.awsui_sticky-scrollbar-
|
|
24
|
+
.awsui_sticky-scrollbar-visible_7a840_1vm15_24:not(#\9) {
|
|
25
25
|
display: block;
|
|
26
26
|
}
|
|
27
|
-
.awsui_sticky-scrollbar-native-
|
|
27
|
+
.awsui_sticky-scrollbar-native-invisible_7a840_1vm15_27:not(#\9) {
|
|
28
28
|
margin-block-start: -15px;
|
|
29
29
|
}
|
|
30
|
-
.awsui_sticky-scrollbar-
|
|
30
|
+
.awsui_sticky-scrollbar-offset_7a840_1vm15_30:not(#\9) {
|
|
31
31
|
z-index: 799;
|
|
32
32
|
}
|
|
33
|
-
.awsui_sticky-scrollbar-
|
|
33
|
+
.awsui_sticky-scrollbar-offset_7a840_1vm15_30:not(#\9):not(.awsui_is-visual-refresh_7a840_1vm15_33) {
|
|
34
34
|
background-color: var(--color-background-container-content-0odjoo, #ffffff);
|
|
35
35
|
block-size: 15px;
|
|
36
36
|
margin-block-start: calc(-1 * var(--border-divider-section-width-ljhehl, 1px));
|
|
37
37
|
border-block-start: var(--border-divider-section-width-ljhehl, 1px) solid var(--color-border-divider-default-8vuq97, #c6c6cd);
|
|
38
38
|
}
|
|
39
|
-
.awsui_sticky-scrollbar-
|
|
39
|
+
.awsui_sticky-scrollbar-offset_7a840_1vm15_30.awsui_is-visual-refresh_7a840_1vm15_33:not(#\9) {
|
|
40
40
|
margin-block-start: -5px;
|
|
41
41
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
// es-module interop with Babel and Typescript
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
module.exports.default = {
|
|
5
|
+
"sticky-scrollbar": "awsui_sticky-scrollbar_7a840_1vm15_9",
|
|
6
|
+
"sticky-scrollbar-content": "awsui_sticky-scrollbar-content_7a840_1vm15_21",
|
|
7
|
+
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_7a840_1vm15_24",
|
|
8
|
+
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-invisible_7a840_1vm15_27",
|
|
9
|
+
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-offset_7a840_1vm15_30",
|
|
10
|
+
"is-visual-refresh": "awsui_is-visual-refresh_7a840_1vm15_33"
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
|
|
3
|
-
export declare
|
|
2
|
+
type ContentInlineSizeGetter = (tableEl: HTMLElement, wrapperEl: HTMLElement) => number;
|
|
3
|
+
export declare const updatePosition: (tableEl: HTMLElement | null, wrapperEl: HTMLElement | null, scrollbarEl: HTMLElement | null, scrollbarContentEl: HTMLElement | null, inScrollableContainer: boolean, getContentInlineSize?: ContentInlineSizeGetter) => void;
|
|
4
|
+
export interface StickyScrollbarContentOptions {
|
|
5
|
+
getContentInlineSize?: ContentInlineSizeGetter;
|
|
6
|
+
contentKey?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function useStickyScrollbar(scrollbarRef: RefObject<HTMLDivElement>, scrollbarContentRef: RefObject<HTMLDivElement>, tableRef: RefObject<HTMLTableElement>, wrapperRef: RefObject<HTMLDivElement>, offsetScrollbar: boolean, {
|
|
9
|
+
getContentInlineSize,
|
|
10
|
+
contentKey
|
|
11
|
+
}: StickyScrollbarContentOptions): void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sticky-scrollbar.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-scrollbar/use-sticky-scrollbar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAW/D,KAAK,uBAAuB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,KAAK,MAAM,CAAC;AAExF,eAAO,MAAM,cAAc,GACzB,SAAS,WAAW,GAAG,IAAI,EAC3B,WAAW,WAAW,GAAG,IAAI,EAC7B,aAAa,WAAW,GAAG,IAAI,EAC/B,oBAAoB,WAAW,GAAG,IAAI,EACtC,uBAAuB,OAAO,EAC9B,uBAAsB,uBAAqF,SA8C5G,CAAC;AAEF,MAAM,WAAW,6BAA6B;IAE5C,oBAAoB,CAAC,EAAE,uBAAuB,CAAC;IAE/C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,EACvC,mBAAmB,EAAE,SAAS,CAAC,cAAc,CAAC,EAC9C,QAAQ,EAAE,SAAS,CAAC,gBAAgB,CAAC,EACrC,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,EACrC,eAAe,EAAE,OAAO,EACxB,EAAE,oBAAoB,EAAE,UAAU,EAAE,EAAE,6BAA6B,QAyDpE"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { getLogicalBoundingClientRect } from '@cloudscape-design/component-toolkit/internal';
|
|
5
|
-
import globalVars from '../../
|
|
6
|
-
import { browserScrollbarSize } from '../../
|
|
7
|
-
import { getContainingBlock } from '../../
|
|
8
|
-
import { getOverflowParents } from '../../
|
|
5
|
+
import globalVars from '../../styles/global-vars';
|
|
6
|
+
import { browserScrollbarSize } from '../../utils/browser-scrollbar-size';
|
|
7
|
+
import { getContainingBlock } from '../../utils/dom';
|
|
8
|
+
import { getOverflowParents } from '../../utils/scrollable-containers';
|
|
9
9
|
import styles from './styles.css.js';
|
|
10
|
-
export const updatePosition = (tableEl, wrapperEl, scrollbarEl, scrollbarContentEl, inScrollableContainer) => {
|
|
10
|
+
export const updatePosition = (tableEl, wrapperEl, scrollbarEl, scrollbarContentEl, inScrollableContainer, getContentInlineSize = tableEl => getLogicalBoundingClientRect(tableEl).inlineSize) => {
|
|
11
11
|
if (!tableEl || !scrollbarEl || !wrapperEl) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const tableInlineSize = getContentInlineSize(tableEl, wrapperEl);
|
|
15
15
|
const { inlineSize: wrapperInlineSize } = getLogicalBoundingClientRect(wrapperEl);
|
|
16
16
|
// using 15 px as a height of transparent scrollbar on mac
|
|
17
17
|
const scrollbarHeight = browserScrollbarSize().height;
|
|
@@ -38,10 +38,8 @@ export const updatePosition = (tableEl, wrapperEl, scrollbarEl, scrollbarContent
|
|
|
38
38
|
scrollbarContentEl.style.blockSize = `${scrollbarHeight}px`;
|
|
39
39
|
}
|
|
40
40
|
if (tableEl && wrapperEl && scrollbarContentEl && scrollbarEl) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
scrollbarEl.style.inlineSize = `${wrapperElRect.inlineSize}px`;
|
|
44
|
-
scrollbarContentEl.style.inlineSize = `${tableElRect.inlineSize}px`;
|
|
41
|
+
scrollbarEl.style.inlineSize = `${wrapperInlineSize}px`;
|
|
42
|
+
scrollbarContentEl.style.inlineSize = `${tableInlineSize}px`;
|
|
45
43
|
// when using sticky scrollbars in containers
|
|
46
44
|
// we agreed to ignore dynamic bottom calculations for footer overlap
|
|
47
45
|
scrollbarEl.style.insetBlockEnd = inScrollableContainer
|
|
@@ -49,8 +47,10 @@ export const updatePosition = (tableEl, wrapperEl, scrollbarEl, scrollbarContent
|
|
|
49
47
|
: `var(${globalVars.stickyVerticalBottomOffset}, 0px)`;
|
|
50
48
|
}
|
|
51
49
|
};
|
|
52
|
-
export function useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef, wrapperRef, offsetScrollbar) {
|
|
50
|
+
export function useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef, wrapperRef, offsetScrollbar, { getContentInlineSize, contentKey }) {
|
|
53
51
|
const [inScrollableContainer, setInScrollableContainer] = useState(false);
|
|
52
|
+
const getContentInlineSizeRef = useRef(getContentInlineSize);
|
|
53
|
+
getContentInlineSizeRef.current = getContentInlineSize;
|
|
54
54
|
const wrapperEl = wrapperRef.current;
|
|
55
55
|
useEffect(() => {
|
|
56
56
|
if (wrapperEl) {
|
|
@@ -62,7 +62,7 @@ export function useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef,
|
|
|
62
62
|
if (wrapperRef.current && tableRef.current && typeof ResizeObserver !== 'undefined') {
|
|
63
63
|
const observer = new ResizeObserver(() => {
|
|
64
64
|
if (scrollbarContentRef.current) {
|
|
65
|
-
updatePosition(tableRef.current, wrapperRef.current, scrollbarRef.current, scrollbarContentRef.current, inScrollableContainer);
|
|
65
|
+
updatePosition(tableRef.current, wrapperRef.current, scrollbarRef.current, scrollbarContentRef.current, inScrollableContainer, getContentInlineSizeRef.current);
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
// Scrollbar width must be in sync with wrapper width.
|
|
@@ -74,16 +74,17 @@ export function useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef,
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
}, [scrollbarContentRef, scrollbarRef, tableRef, wrapperRef, inScrollableContainer, offsetScrollbar]);
|
|
77
|
-
// Update scrollbar position when window resizes (vertically)
|
|
77
|
+
// Update scrollbar position when window resizes (vertically), or when the content changes width without
|
|
78
|
+
// resizing either observed element.
|
|
78
79
|
useEffect(() => {
|
|
79
80
|
const resizeHandler = () => {
|
|
80
|
-
updatePosition(tableRef.current, wrapperRef.current, scrollbarRef.current, scrollbarContentRef.current, inScrollableContainer);
|
|
81
|
+
updatePosition(tableRef.current, wrapperRef.current, scrollbarRef.current, scrollbarContentRef.current, inScrollableContainer, getContentInlineSizeRef.current);
|
|
81
82
|
};
|
|
82
83
|
resizeHandler();
|
|
83
84
|
window.addEventListener('resize', resizeHandler);
|
|
84
85
|
return () => {
|
|
85
86
|
window.removeEventListener('resize', resizeHandler);
|
|
86
87
|
};
|
|
87
|
-
}, [tableRef, wrapperRef, scrollbarRef, scrollbarContentRef, inScrollableContainer]);
|
|
88
|
+
}, [tableRef, wrapperRef, scrollbarRef, scrollbarContentRef, inScrollableContainer, contentKey]);
|
|
88
89
|
}
|
|
89
90
|
//# sourceMappingURL=use-sticky-scrollbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sticky-scrollbar.js","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-scrollbar/use-sticky-scrollbar.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,UAAU,MAAM,0BAA0B,C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AAC;QACJ,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;QAChB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QACjD,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,UAAU,CAAC,CAAC,CAAC;AACnG,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useEffect, useRef, useState } from 'react';\n\nimport { getLogicalBoundingClientRect } from '@cloudscape-design/component-toolkit/internal';\n\nimport globalVars from '../../styles/global-vars';\nimport { browserScrollbarSize } from '../../utils/browser-scrollbar-size';\nimport { getContainingBlock } from '../../utils/dom';\nimport { getOverflowParents } from '../../utils/scrollable-containers';\n\nimport styles from './styles.css.js';\n\ntype ContentInlineSizeGetter = (tableEl: HTMLElement, wrapperEl: HTMLElement) => number;\n\nexport const updatePosition = (\n tableEl: HTMLElement | null,\n wrapperEl: HTMLElement | null,\n scrollbarEl: HTMLElement | null,\n scrollbarContentEl: HTMLElement | null,\n inScrollableContainer: boolean,\n getContentInlineSize: ContentInlineSizeGetter = tableEl => getLogicalBoundingClientRect(tableEl).inlineSize\n) => {\n if (!tableEl || !scrollbarEl || !wrapperEl) {\n return;\n }\n\n const tableInlineSize = getContentInlineSize(tableEl, wrapperEl);\n const { inlineSize: wrapperInlineSize } = getLogicalBoundingClientRect(wrapperEl);\n\n // using 15 px as a height of transparent scrollbar on mac\n const scrollbarHeight = browserScrollbarSize().height;\n const areaIsScrollable = tableInlineSize > wrapperInlineSize;\n\n if (!areaIsScrollable) {\n scrollbarEl.classList.remove(styles['sticky-scrollbar-visible']);\n } else {\n // when scrollbar is not displayed scrollLeft property cannot be set by useScrollSync\n // that's why syncing it separately\n if (!scrollbarEl.classList.contains(styles['sticky-scrollbar-visible'])) {\n requestAnimationFrame(() => {\n scrollbarEl.scrollLeft = wrapperEl.scrollLeft;\n });\n }\n\n scrollbarEl.classList.add(styles['sticky-scrollbar-visible']);\n if (!scrollbarHeight) {\n /* istanbul ignore next: covered by screenshot tests */\n scrollbarEl.classList.add(styles['sticky-scrollbar-native-invisible']);\n }\n }\n\n if (scrollbarHeight && scrollbarEl && scrollbarContentEl) {\n scrollbarEl.style.blockSize = `${scrollbarHeight}px`;\n scrollbarContentEl.style.blockSize = `${scrollbarHeight}px`;\n }\n\n if (tableEl && wrapperEl && scrollbarContentEl && scrollbarEl) {\n scrollbarEl.style.inlineSize = `${wrapperInlineSize}px`;\n scrollbarContentEl.style.inlineSize = `${tableInlineSize}px`;\n\n // when using sticky scrollbars in containers\n // we agreed to ignore dynamic bottom calculations for footer overlap\n scrollbarEl.style.insetBlockEnd = inScrollableContainer\n ? '0px'\n : `var(${globalVars.stickyVerticalBottomOffset}, 0px)`;\n }\n};\n\nexport interface StickyScrollbarContentOptions {\n // Measures the scrollable content's width; defaults to the table's width.\n getContentInlineSize?: ContentInlineSizeGetter;\n // Re-measures when this changes, for content that changes width without resizing the table or wrapper.\n contentKey?: unknown;\n}\n\nexport function useStickyScrollbar(\n scrollbarRef: RefObject<HTMLDivElement>,\n scrollbarContentRef: RefObject<HTMLDivElement>,\n tableRef: RefObject<HTMLTableElement>,\n wrapperRef: RefObject<HTMLDivElement>,\n offsetScrollbar: boolean,\n { getContentInlineSize, contentKey }: StickyScrollbarContentOptions\n) {\n const [inScrollableContainer, setInScrollableContainer] = useState(false);\n const getContentInlineSizeRef = useRef(getContentInlineSize);\n getContentInlineSizeRef.current = getContentInlineSize;\n\n const wrapperEl = wrapperRef.current;\n useEffect(() => {\n if (wrapperEl) {\n setInScrollableContainer(!!getContainingBlock(wrapperEl) || !!getOverflowParents(wrapperEl)[0]);\n }\n }, [wrapperEl]);\n\n // Update scrollbar position wrapper or table size change.\n useEffect(() => {\n if (wrapperRef.current && tableRef.current && typeof ResizeObserver !== 'undefined') {\n const observer = new ResizeObserver(() => {\n if (scrollbarContentRef.current) {\n updatePosition(\n tableRef.current,\n wrapperRef.current,\n scrollbarRef.current,\n scrollbarContentRef.current,\n inScrollableContainer,\n getContentInlineSizeRef.current\n );\n }\n });\n // Scrollbar width must be in sync with wrapper width.\n observer.observe(wrapperRef.current);\n // Scrollbar content width must be in sync with table width.\n observer.observe(tableRef.current);\n return () => {\n observer.disconnect();\n };\n }\n }, [scrollbarContentRef, scrollbarRef, tableRef, wrapperRef, inScrollableContainer, offsetScrollbar]);\n\n // Update scrollbar position when window resizes (vertically), or when the content changes width without\n // resizing either observed element.\n useEffect(() => {\n const resizeHandler = () => {\n updatePosition(\n tableRef.current,\n wrapperRef.current,\n scrollbarRef.current,\n scrollbarContentRef.current,\n inScrollableContainer,\n getContentInlineSizeRef.current\n );\n };\n resizeHandler();\n window.addEventListener('resize', resizeHandler);\n return () => {\n window.removeEventListener('resize', resizeHandler);\n };\n }, [tableRef, wrapperRef, scrollbarRef, scrollbarContentRef, inScrollableContainer, contentKey]);\n}\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (f6f7a334)";
|
|
3
|
+
export var GIT_SHA = "f6f7a334";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "core";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -806,6 +806,7 @@ export const fontBoxValueLargeWeight: string;
|
|
|
806
806
|
export const fontButtonLetterSpacing: string;
|
|
807
807
|
export const fontChartDetailSize: string;
|
|
808
808
|
export const fontDecorationStyleLink: string;
|
|
809
|
+
export const fontDecorationLineButtonInlineLink: string;
|
|
809
810
|
export const fontDecorationLineLinkSecondary: string;
|
|
810
811
|
export const fontDecorationThicknessLink: string;
|
|
811
812
|
export const fontDecorationThicknessLinkDisplayL: string;
|
|
@@ -806,6 +806,7 @@ export var fontBoxValueLargeWeight = "var(--font-box-value-large-weight-x66hzl,
|
|
|
806
806
|
export var fontButtonLetterSpacing = "var(--font-button-letter-spacing-ki7gj3, 0.005em)";
|
|
807
807
|
export var fontChartDetailSize = "var(--font-chart-detail-size-5il5az, 12px)";
|
|
808
808
|
export var fontDecorationStyleLink = "var(--font-decoration-style-link-azri03, solid)";
|
|
809
|
+
export var fontDecorationLineButtonInlineLink = "var(--font-decoration-line-button-inline-link-14tvpm, none)";
|
|
809
810
|
export var fontDecorationLineLinkSecondary = "var(--font-decoration-line-link-secondary-henot1, none)";
|
|
810
811
|
export var fontDecorationThicknessLink = "var(--font-decoration-thickness-link-ue2y2g, 1px)";
|
|
811
812
|
export var fontDecorationThicknessLinkDisplayL = "var(--font-decoration-thickness-link-display-l-9280qx, 2px)";
|
|
@@ -3259,6 +3259,7 @@ module.exports.preset = {
|
|
|
3259
3259
|
"fontButtonLetterSpacing": "0.005em",
|
|
3260
3260
|
"fontChartDetailSize": "{fontSizeBodyS}",
|
|
3261
3261
|
"fontDecorationStyleLink": "solid",
|
|
3262
|
+
"fontDecorationLineButtonInlineLink": "none",
|
|
3262
3263
|
"fontDecorationLineLinkSecondary": "none",
|
|
3263
3264
|
"fontDecorationThicknessLink": "1px",
|
|
3264
3265
|
"fontDecorationThicknessLinkDisplayL": "2px",
|
|
@@ -17045,6 +17046,7 @@ module.exports.preset = {
|
|
|
17045
17046
|
"colorTextBadgeRed",
|
|
17046
17047
|
"colorBackgroundCodeView",
|
|
17047
17048
|
"fontDecorationStyleLink",
|
|
17049
|
+
"fontDecorationLineButtonInlineLink",
|
|
17048
17050
|
"fontDecorationThicknessLink",
|
|
17049
17051
|
"fontDecorationThicknessLinkDisplayL",
|
|
17050
17052
|
"fontSizeExpandableHeading",
|
|
@@ -18572,6 +18574,7 @@ module.exports.preset = {
|
|
|
18572
18574
|
"fontButtonLetterSpacing": "font-button-letter-spacing",
|
|
18573
18575
|
"fontChartDetailSize": "font-chart-detail-size",
|
|
18574
18576
|
"fontDecorationStyleLink": "font-decoration-style-link",
|
|
18577
|
+
"fontDecorationLineButtonInlineLink": "font-decoration-line-button-inline-link",
|
|
18575
18578
|
"fontDecorationLineLinkSecondary": "font-decoration-line-link-secondary",
|
|
18576
18579
|
"fontDecorationThicknessLink": "font-decoration-thickness-link",
|
|
18577
18580
|
"fontDecorationThicknessLinkDisplayL": "font-decoration-thickness-link-display-l",
|
|
@@ -19746,6 +19749,7 @@ module.exports.preset = {
|
|
|
19746
19749
|
"fontButtonLetterSpacing": "--font-button-letter-spacing-ki7gj3",
|
|
19747
19750
|
"fontChartDetailSize": "--font-chart-detail-size-5il5az",
|
|
19748
19751
|
"fontDecorationStyleLink": "--font-decoration-style-link-azri03",
|
|
19752
|
+
"fontDecorationLineButtonInlineLink": "--font-decoration-line-button-inline-link-14tvpm",
|
|
19749
19753
|
"fontDecorationLineLinkSecondary": "--font-decoration-line-link-secondary-henot1",
|
|
19750
19754
|
"fontDecorationThicknessLink": "--font-decoration-thickness-link-ue2y2g",
|
|
19751
19755
|
"fontDecorationThicknessLinkDisplayL": "--font-decoration-thickness-link-display-l-9280qx",
|
|
@@ -335,6 +335,7 @@ export declare interface TypedOverride {
|
|
|
335
335
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
336
336
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
337
337
|
fontDecorationStyleLink?: GlobalValue;
|
|
338
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
338
339
|
fontDecorationThicknessLink?: GlobalValue;
|
|
339
340
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
340
341
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -815,6 +816,7 @@ export declare interface TypedOverride {
|
|
|
815
816
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
816
817
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
817
818
|
fontDecorationStyleLink?: GlobalValue;
|
|
819
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
818
820
|
fontDecorationThicknessLink?: GlobalValue;
|
|
819
821
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
820
822
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -1295,6 +1297,7 @@ export declare interface TypedOverride {
|
|
|
1295
1297
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1296
1298
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1297
1299
|
fontDecorationStyleLink?: GlobalValue;
|
|
1300
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
1298
1301
|
fontDecorationThicknessLink?: GlobalValue;
|
|
1299
1302
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
1300
1303
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -1775,6 +1778,7 @@ export declare interface TypedOverride {
|
|
|
1775
1778
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1776
1779
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1777
1780
|
fontDecorationStyleLink?: GlobalValue;
|
|
1781
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
1778
1782
|
fontDecorationThicknessLink?: GlobalValue;
|
|
1779
1783
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
1780
1784
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -2255,6 +2259,7 @@ export declare interface TypedOverride {
|
|
|
2255
2259
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2256
2260
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2257
2261
|
fontDecorationStyleLink?: GlobalValue;
|
|
2262
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
2258
2263
|
fontDecorationThicknessLink?: GlobalValue;
|
|
2259
2264
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
2260
2265
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -2735,6 +2740,7 @@ export declare interface TypedOverride {
|
|
|
2735
2740
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2736
2741
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2737
2742
|
fontDecorationStyleLink?: GlobalValue;
|
|
2743
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
2738
2744
|
fontDecorationThicknessLink?: GlobalValue;
|
|
2739
2745
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
2740
2746
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -3215,6 +3221,7 @@ export declare interface TypedOverride {
|
|
|
3215
3221
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3216
3222
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3217
3223
|
fontDecorationStyleLink?: GlobalValue;
|
|
3224
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
3218
3225
|
fontDecorationThicknessLink?: GlobalValue;
|
|
3219
3226
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
3220
3227
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -3695,6 +3702,7 @@ export declare interface TypedOverride {
|
|
|
3695
3702
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3696
3703
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3697
3704
|
fontDecorationStyleLink?: GlobalValue;
|
|
3705
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
3698
3706
|
fontDecorationThicknessLink?: GlobalValue;
|
|
3699
3707
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
3700
3708
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -4175,6 +4183,7 @@ export declare interface TypedOverride {
|
|
|
4175
4183
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
4176
4184
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
4177
4185
|
fontDecorationStyleLink?: GlobalValue;
|
|
4186
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
4178
4187
|
fontDecorationThicknessLink?: GlobalValue;
|
|
4179
4188
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
4180
4189
|
fontSizeExpandableHeading?: GlobalValue;
|