@cloudscape-design/components-themeable 3.0.1401 → 3.0.1402
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/button/styles.scss +3 -0
- package/lib/internal/scss/copy-to-clipboard/styles.scss +0 -41
- package/lib/internal/scss/internal/components/sticky-scrollbar/mixins.scss +10 -0
- package/lib/internal/scss/{table → internal/components}/sticky-scrollbar/styles.scss +2 -2
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/table-root/styles.scss +3 -0
- package/lib/internal/scss/tabs/styles.scss +0 -1
- package/lib/internal/scss/tabs/tab-header-bar.scss +20 -42
- package/lib/internal/scss/token/styles.scss +1 -0
- package/lib/internal/template/button/styles.css.js +24 -24
- package/lib/internal/template/button/styles.scoped.css +83 -79
- package/lib/internal/template/button/styles.selectors.js +24 -24
- package/lib/internal/template/copy-to-clipboard/internal.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js +16 -36
- package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
- package/lib/internal/template/copy-to-clipboard/styles.css.js +5 -10
- package/lib/internal/template/copy-to-clipboard/styles.scoped.css +6 -38
- package/lib/internal/template/copy-to-clipboard/styles.selectors.js +5 -10
- package/lib/internal/template/icon/generated/icons.d.ts +1 -1
- package/lib/internal/template/icon/generated/icons.js +3 -3
- package/lib/internal/template/icon/generated/icons.js.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/base-theme/styles.scoped.css +1 -0
- package/lib/internal/template/internal/components/sticky-scrollbar/index.d.ts.map +1 -0
- package/lib/internal/template/internal/components/sticky-scrollbar/index.js.map +1 -0
- package/lib/internal/template/{table → internal/components}/sticky-scrollbar/sticky-scrollbar.d.ts +2 -1
- package/lib/internal/template/internal/components/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -0
- package/lib/internal/template/{table → internal/components}/sticky-scrollbar/sticky-scrollbar.js +8 -5
- package/lib/internal/template/internal/components/sticky-scrollbar/sticky-scrollbar.js.map +1 -0
- package/lib/internal/template/internal/components/sticky-scrollbar/styles.css.js +11 -0
- package/lib/internal/template/{table → internal/components}/sticky-scrollbar/styles.scoped.css +8 -8
- package/lib/internal/template/internal/components/sticky-scrollbar/styles.selectors.js +12 -0
- package/lib/internal/template/internal/components/sticky-scrollbar/use-sticky-scrollbar.d.ts +10 -0
- package/lib/internal/template/internal/components/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +1 -0
- package/lib/internal/template/{table → internal/components}/sticky-scrollbar/use-sticky-scrollbar.js +17 -16
- package/lib/internal/template/internal/components/sticky-scrollbar/use-sticky-scrollbar.js.map +1 -0
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +1 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +4 -0
- package/lib/internal/template/internal/generated/theming/index.d.cts +9 -0
- package/lib/internal/template/internal/generated/theming/index.d.ts +9 -0
- package/lib/internal/template/internal/generated/theming/index.js +4 -0
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +1 -1
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/table-root/internal.d.ts.map +1 -1
- package/lib/internal/template/table-root/internal.js +17 -3
- package/lib/internal/template/table-root/internal.js.map +1 -1
- package/lib/internal/template/table-root/styles.css.js +5 -5
- package/lib/internal/template/table-root/styles.scoped.css +10 -6
- package/lib/internal/template/table-root/styles.selectors.js +5 -5
- package/lib/internal/template/tabs/styles.css.js +30 -31
- package/lib/internal/template/tabs/styles.scoped.css +51 -67
- package/lib/internal/template/tabs/styles.selectors.js +30 -31
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +5 -54
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/lib/internal/template/toggle/internal.d.ts.map +1 -1
- package/lib/internal/template/toggle/internal.js +1 -1
- package/lib/internal/template/toggle/internal.js.map +1 -1
- package/lib/internal/template/token/styles.css.js +14 -14
- package/lib/internal/template/token/styles.scoped.css +25 -24
- package/lib/internal/template/token/styles.selectors.js +14 -14
- package/package.json +1 -1
- package/lib/internal/scss/copy-to-clipboard/motion.scss +0 -31
- package/lib/internal/scss/tabs/motion.scss +0 -22
- package/lib/internal/template/table/sticky-scrollbar/index.d.ts.map +0 -1
- package/lib/internal/template/table/sticky-scrollbar/index.js.map +0 -1
- package/lib/internal/template/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +0 -1
- package/lib/internal/template/table/sticky-scrollbar/sticky-scrollbar.js.map +0 -1
- package/lib/internal/template/table/sticky-scrollbar/styles.css.js +0 -11
- package/lib/internal/template/table/sticky-scrollbar/styles.selectors.js +0 -12
- package/lib/internal/template/table/sticky-scrollbar/use-sticky-scrollbar.d.ts +0 -4
- package/lib/internal/template/table/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +0 -1
- package/lib/internal/template/table/sticky-scrollbar/use-sticky-scrollbar.js.map +0 -1
- /package/lib/internal/template/{table → internal/components}/sticky-scrollbar/index.d.ts +0 -0
- /package/lib/internal/template/{table → internal/components}/sticky-scrollbar/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/icon-provider/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,aAAa,GACb,mBAAmB,GACnB,YAAY,GACZ,oBAAoB,GACpB,aAAa,GACb,UAAU,GACV,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,aAAa,GACb,UAAU,GACV,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,qBAAqB,GACrB,KAAK,GACL,MAAM,GACN,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,mBAAmB,GACnB,oBAAoB,GACpB,iBAAiB,GACjB,UAAU,GACV,OAAO,GACP,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/icon-provider/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,aAAa,GACb,mBAAmB,GACnB,YAAY,GACZ,oBAAoB,GACpB,aAAa,GACb,UAAU,GACV,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,aAAa,GACb,UAAU,GACV,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,qBAAqB,GACrB,WAAW,GACX,KAAK,GACL,MAAM,GACN,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,mBAAmB,GACnB,oBAAoB,GACpB,iBAAiB,GACjB,UAAU,GACV,OAAO,GACP,SAAS,GACT,OAAO,GACP,gBAAgB,GAChB,4BAA4B,GAC5B,MAAM,GACN,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,MAAM,GACN,aAAa,GACb,UAAU,GACV,UAAU,GACV,kBAAkB,GAClB,QAAQ,GACR,UAAU,GACV,KAAK,GACL,YAAY,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K,EAAE;YAAE,QAAQ,EAAE,OAAO,CAAA;SAAE,KAAK,SAAS,CAAC;KAC5D;IAED,UAAiB,sBAAsB;QACrC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;YAAE,QAAQ,EAAE,OAAO,CAAA;SAAE,KAAK,SAAS,CAAC;KAC5D;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/icon-provider/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ReactNode } from 'react';\n\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\n\n// Why not enums? Explained there\n// https://stackoverflow.com/questions/52393730/typescript-string-literal-union-type-from-enum\nexport type BuiltInIconName =\n | 'add-plus'\n | 'anchor-link'\n | 'angle-left-double'\n | 'angle-left'\n | 'angle-right-double'\n | 'angle-right'\n | 'angle-up'\n | 'angle-down'\n | 'announcement'\n | 'arrow-left'\n | 'arrow-right'\n | 'arrow-up'\n | 'arrow-down'\n | 'at-symbol'\n | 'audio-full'\n | 'audio-half'\n | 'audio-off'\n | 'backward-10-seconds'\n | 'bug'\n | 'call'\n | 'calendar'\n | 'caret-down-filled'\n | 'caret-down'\n | 'caret-left-filled'\n | 'caret-right-filled'\n | 'caret-up-filled'\n | 'caret-up'\n | '
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/icon-provider/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ReactNode } from 'react';\n\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\n\n// Why not enums? Explained there\n// https://stackoverflow.com/questions/52393730/typescript-string-literal-union-type-from-enum\nexport type BuiltInIconName =\n | 'add-plus'\n | 'anchor-link'\n | 'angle-left-double'\n | 'angle-left'\n | 'angle-right-double'\n | 'angle-right'\n | 'angle-up'\n | 'angle-down'\n | 'announcement'\n | 'arrow-left'\n | 'arrow-right'\n | 'arrow-up'\n | 'arrow-down'\n | 'at-symbol'\n | 'audio-full'\n | 'audio-half'\n | 'audio-off'\n | 'backward-10-seconds'\n | 'bar-chart'\n | 'bug'\n | 'call'\n | 'calendar'\n | 'caret-down-filled'\n | 'caret-down'\n | 'caret-left-filled'\n | 'caret-right-filled'\n | 'caret-up-filled'\n | 'caret-up'\n | 'check'\n | 'contact'\n | 'close'\n | 'closed-caption'\n | 'closed-caption-unavailable'\n | 'copy'\n | 'command-prompt'\n | 'convert-code'\n | 'delete-marker'\n | 'dot'\n | 'download'\n | 'drag-indicator'\n | 'edit'\n | 'edit-gen-ai'\n | 'ellipsis'\n | 'envelope'\n | 'exit-full-screen'\n | 'expand'\n | 'external'\n | 'eye'\n | 'face-happy'\n | 'face-happy-filled'\n | 'face-neutral'\n | 'face-neutral-filled'\n | 'face-sad'\n | 'face-sad-filled'\n | 'file-open'\n | 'file'\n | 'filter'\n | 'flag'\n | 'folder-open'\n | 'folder'\n | 'forward-10-seconds'\n | 'full-screen'\n | 'gen-ai'\n | 'gen-ai-token'\n | 'globe'\n | 'grid-view'\n | 'group-active'\n | 'group'\n | 'heart'\n | 'heart-filled'\n | 'history'\n | 'insert-row'\n | 'internal-link'\n | 'key'\n | 'keyboard'\n | 'light-dark'\n | 'list-view'\n | 'location-pin'\n | 'lock-private'\n | 'map'\n | 'menu'\n | 'microphone'\n | 'microphone-off'\n | 'mini-player'\n | 'multiscreen'\n | 'notification'\n | 'pause'\n | 'play'\n | 'redo'\n | 'refresh'\n | 'remove'\n | 'resize-area'\n | 'script'\n | 'search'\n | 'search-gen-ai'\n | 'security'\n | 'settings'\n | 'send'\n | 'share'\n | 'shrink'\n | 'sign-out'\n | 'side-bar'\n | 'slash'\n | 'slash-divider'\n | 'sliders'\n | 'star-filled'\n | 'star-half'\n | 'star'\n | 'status-in-progress'\n | 'status-info'\n | 'status-negative'\n | 'status-not-started'\n | 'status-pending'\n | 'status-positive'\n | 'status-stopped'\n | 'status-warning'\n | 'stop-circle'\n | 'subtract-minus'\n | 'suggestions'\n | 'suggestions-gen-ai'\n | 'support'\n | 'thumbs-down-filled'\n | 'thumbs-down'\n | 'thumbs-up-filled'\n | 'thumbs-up'\n | 'ticket'\n | 'transcript'\n | 'treeview-collapse'\n | 'treeview-expand'\n | 'undo'\n | 'unlocked'\n | 'upload-download'\n | 'upload'\n | 'user-profile-active'\n | 'user-profile'\n | 'video-off'\n | 'video-on'\n | 'video-unavailable'\n | 'video-camera-off'\n | 'video-camera-on'\n | 'video-camera-unavailable'\n | 'view-full'\n | 'view-horizontal'\n | 'view-vertical'\n | 'view-vertical-start'\n | 'zoom-in'\n | 'zoom-out'\n | 'zoom-to-fit';\n\n/**\n * Augment this interface using `declare module` to register custom icon names.\n * Registered names become valid across all icon-accepting components.\n *\n * @example\n * declare module \"@cloudscape-design/components/icon-provider\" {\n * interface IconRegistry extends IconMap<typeof myIcons> {}\n * }\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface IconRegistry {}\n\n/** Union of all icon names in the {@link IconRegistry}. */\nexport type IconRegistryIconName = keyof IconRegistry & string;\n\nexport type DefineIconsInput = Partial<Record<BuiltInIconName | (string & {}), ReactNode>>;\n\n/** Extracts the keys of a `defineIcons` result into the shape that {@link IconRegistry} expects. */\nexport type IconMap<T> = { [K in keyof T & string]: T[K] };\n\nexport interface IconProviderProps extends BaseComponentProps {\n children: ReactNode;\n\n /**\n * Specifies icon overrides using existing icon names, for example, `{'add-plus': <svg>...</svg>}`.\n *\n * These icon overrides will automatically be applied to any component that is a descendant of this provider, including nested providers.\n *\n * Set to `null` to reset the icons to the default set or set specific icon names to `null` to change them back to the default set.\n *\n * For example, override `AppLayout` icons but not icons in the content slot by wrapping content with an `IconProvider` with this property set to `null`.\n *\n * `<Icon ... />` component can be used as an override (for example, `{'close': <Icon name='arrow-left' />}`).\n * However, if the icon name is the same as the key, for example, `{'close': <Icon name='close' />}` an infinite loop will be created.\n * The same applies to switching icons in the same configuration (for example, `{'close': <Icon name='arrow-left' />, 'arrow-left': <Icon name='close' />}`).\n */\n icons?: IconProviderProps.Icons | null;\n\n /**\n * Custom icons for specific components, replacing built-in stateful icons such as expand toggles\n * and sorting indicators. Unlike `icons`, these target a specific component and receive the icon's\n * current state.\n *\n * Each entry is a render function: it receives the state and returns the icon to display. The\n * custom icon replaces the default rendering entirely (including built-in animations), so it must\n * represent every state. Return `null` to fall back to the default icon. Use `size=\"inherit\"` on\n * a custom `<Icon>` (or provide a plain SVG) so it matches the default icon size.\n *\n * Component icons apply to nested usage as well, for example, expandable sections rendered inside\n * side navigation or wizard. They are inherited by nested providers (closest provider wins).\n * Set to `null` to reset all component icons, or set a specific component to `null` to reset its icons.\n */\n componentIcons?: IconProviderProps.ComponentIcons | null;\n}\n\nexport namespace IconProviderProps {\n export type Icons = {\n [name in IconProps.Name]?: ReactNode | null;\n };\n\n export interface ComponentIcons {\n table?: TableIcons | null;\n 'tree-view'?: TreeViewIcons | null;\n 'expandable-section'?: ExpandableSectionIcons | null;\n }\n\n export interface TableIcons {\n expandToggle?: (state: { expanded: boolean }) => ReactNode;\n sortingIndicator?: (state: { sortingState: 'sortable' | 'ascending' | 'descending' }) => ReactNode;\n }\n\n export interface TreeViewIcons {\n expandToggle?: (state: { expanded: boolean }) => ReactNode;\n }\n\n export interface ExpandableSectionIcons {\n expandToggle?: (state: { expanded: boolean }) => ReactNode;\n }\n}\n"]}
|
|
@@ -666,6 +666,7 @@
|
|
|
666
666
|
--font-button-letter-spacing-7mz5n3:0.25px;
|
|
667
667
|
--font-chart-detail-size-gadmd0:var(--font-size-body-m-tq5a14);
|
|
668
668
|
--font-decoration-style-link-lw1s9g:solid;
|
|
669
|
+
--font-decoration-line-button-inline-link-3n3v4w:none;
|
|
669
670
|
--font-decoration-line-link-secondary-tcr1f6:none;
|
|
670
671
|
--font-decoration-thickness-link-n3u7wl:1px;
|
|
671
672
|
--font-decoration-thickness-link-display-l-9n3xpw:2px;
|
|
@@ -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"]}
|
package/lib/internal/template/{table → internal/components}/sticky-scrollbar/sticky-scrollbar.d.ts
RENAMED
|
@@ -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"}
|
package/lib/internal/template/{table → internal/components}/sticky-scrollbar/sticky-scrollbar.js
RENAMED
|
@@ -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","sourceRoot":"","sources":["../../../../../src/internal/components/sticky-scrollbar/sticky-scrollbar.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAiC,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE3F,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC,eAAe,UAAU,CAAC,eAAe,CAAC,CAAC;AAE3C,SAAS,eAAe,CACtB,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,UAAU,EAAwB,EAC5G,GAA8B;IAE9B,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAElD;;;OAGG;IACH,MAAM,eAAe,GAAG,gBAAgB,IAAI,oBAAoB,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;IAEhF,kBAAkB,CAAC,YAAY,EAAE,mBAAmB,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE;QAC3F,oBAAoB;QACpB,UAAU;KACX,CAAC,CAAC;IAEH,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,cAAc,EAAE,wBAAwB,EAAE,GAAG,uBAAuB,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_17w1n_9",
|
|
5
|
+
"sticky-scrollbar-content": "awsui_sticky-scrollbar-content_7a840_17w1n_21",
|
|
6
|
+
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_7a840_17w1n_24",
|
|
7
|
+
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-invisible_7a840_17w1n_27",
|
|
8
|
+
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-offset_7a840_17w1n_30",
|
|
9
|
+
"is-visual-refresh": "awsui_is-visual-refresh_7a840_17w1n_33"
|
|
10
|
+
};
|
|
11
|
+
|
package/lib/internal/template/{table → internal/components}/sticky-scrollbar/styles.scoped.css
RENAMED
|
@@ -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_17w1n_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_17w1n_9[data-stuck=false]:not(#\9) {
|
|
19
19
|
clip-path: inset(-9999px 0 0 0 round var(--border-radius-container-33hhdh, 0px));
|
|
20
20
|
}
|
|
21
|
-
.awsui_sticky-scrollbar-
|
|
21
|
+
.awsui_sticky-scrollbar-content_7a840_17w1n_21:not(#\9) {
|
|
22
22
|
block-size: 15px;
|
|
23
23
|
}
|
|
24
|
-
.awsui_sticky-scrollbar-
|
|
24
|
+
.awsui_sticky-scrollbar-visible_7a840_17w1n_24:not(#\9) {
|
|
25
25
|
display: block;
|
|
26
26
|
}
|
|
27
|
-
.awsui_sticky-scrollbar-native-
|
|
27
|
+
.awsui_sticky-scrollbar-native-invisible_7a840_17w1n_27:not(#\9) {
|
|
28
28
|
margin-block-start: -15px;
|
|
29
29
|
}
|
|
30
|
-
.awsui_sticky-scrollbar-
|
|
30
|
+
.awsui_sticky-scrollbar-offset_7a840_17w1n_30:not(#\9) {
|
|
31
31
|
z-index: 799;
|
|
32
32
|
}
|
|
33
|
-
.awsui_sticky-scrollbar-
|
|
33
|
+
.awsui_sticky-scrollbar-offset_7a840_17w1n_30:not(#\9):not(.awsui_is-visual-refresh_7a840_17w1n_33) {
|
|
34
34
|
background-color: var(--color-background-container-content-mjfil9, #ffffff);
|
|
35
35
|
block-size: 15px;
|
|
36
36
|
margin-block-start: calc(-1 * var(--border-divider-section-width-dlkb8v, 1px));
|
|
37
37
|
border-block-start: var(--border-divider-section-width-dlkb8v, 1px) solid var(--color-border-divider-default-diwd4w, #eaeded);
|
|
38
38
|
}
|
|
39
|
-
.awsui_sticky-scrollbar-
|
|
39
|
+
.awsui_sticky-scrollbar-offset_7a840_17w1n_30.awsui_is-visual-refresh_7a840_17w1n_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_17w1n_9",
|
|
6
|
+
"sticky-scrollbar-content": "awsui_sticky-scrollbar-content_7a840_17w1n_21",
|
|
7
|
+
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_7a840_17w1n_24",
|
|
8
|
+
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-invisible_7a840_17w1n_27",
|
|
9
|
+
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-offset_7a840_17w1n_30",
|
|
10
|
+
"is-visual-refresh": "awsui_is-visual-refresh_7a840_17w1n_33"
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
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, { getContentInlineSize, contentKey }: StickyScrollbarContentOptions): void;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=use-sticky-scrollbar.d.ts.map
|
package/lib/internal/template/internal/components/sticky-scrollbar/use-sticky-scrollbar.d.ts.map
ADDED
|
@@ -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"}
|
package/lib/internal/template/{table → internal/components}/sticky-scrollbar/use-sticky-scrollbar.js
RENAMED
|
@@ -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
|
package/lib/internal/template/internal/components/sticky-scrollbar/use-sticky-scrollbar.js.map
ADDED
|
@@ -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,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAA2B,EAC3B,SAA6B,EAC7B,WAA+B,EAC/B,kBAAsC,EACtC,qBAA8B,EAC9B,uBAAgD,OAAO,CAAC,EAAE,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC,UAAU,EAC3G,EAAE;IACF,IAAI,CAAC,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,S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AAU,CAAC,OAAO,EAClB,YAAY,CAAC,OAAO,EACpB,mBAAmB,CAAC,OAAO,EAC3B,qBAAqB,EACrB,uBAAuB,CAAC,OAAO,CAChC,CAAC;gBACJ,CAAC;YACH,CAAC,CAAC,CAAC;YACH,sDAAsD;YACtD,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACrC,4DAA4D;YAC5D,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACnC,OAAO,GAAG,EAAE;gBACV,QAAQ,CAAC,UAAU,EAAE,CAAC;YACxB,CAAC,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,qBAAqB,EAAE,eAAe,CAAC,CAAC,CAAC;IAEtG,wGAAwG;IACxG,oCAAoC;IACpC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,cAAc,CACZ,QAAQ,CAAC,OAAO,EAChB,UAAU,CAAC,OAAO,EAClB,YAAY,CAAC,OAAO,EACpB,mBAAmB,CAAC,OAAO,EAC3B,qBAAqB,EACrB,uBAAuB,CAAC,OAAO,CAChC,CAAC;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"]}
|
|
@@ -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;
|
|
@@ -334,6 +334,7 @@ export declare interface TypedOverride {
|
|
|
334
334
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
335
335
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
336
336
|
fontDecorationStyleLink?: GlobalValue;
|
|
337
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
337
338
|
fontDecorationThicknessLink?: GlobalValue;
|
|
338
339
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
339
340
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -814,6 +815,7 @@ export declare interface TypedOverride {
|
|
|
814
815
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
815
816
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
816
817
|
fontDecorationStyleLink?: GlobalValue;
|
|
818
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
817
819
|
fontDecorationThicknessLink?: GlobalValue;
|
|
818
820
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
819
821
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -1294,6 +1296,7 @@ export declare interface TypedOverride {
|
|
|
1294
1296
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1295
1297
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1296
1298
|
fontDecorationStyleLink?: GlobalValue;
|
|
1299
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
1297
1300
|
fontDecorationThicknessLink?: GlobalValue;
|
|
1298
1301
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
1299
1302
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -1774,6 +1777,7 @@ export declare interface TypedOverride {
|
|
|
1774
1777
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1775
1778
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1776
1779
|
fontDecorationStyleLink?: GlobalValue;
|
|
1780
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
1777
1781
|
fontDecorationThicknessLink?: GlobalValue;
|
|
1778
1782
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
1779
1783
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -2254,6 +2258,7 @@ export declare interface TypedOverride {
|
|
|
2254
2258
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2255
2259
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2256
2260
|
fontDecorationStyleLink?: GlobalValue;
|
|
2261
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
2257
2262
|
fontDecorationThicknessLink?: GlobalValue;
|
|
2258
2263
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
2259
2264
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -2734,6 +2739,7 @@ export declare interface TypedOverride {
|
|
|
2734
2739
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2735
2740
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2736
2741
|
fontDecorationStyleLink?: GlobalValue;
|
|
2742
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
2737
2743
|
fontDecorationThicknessLink?: GlobalValue;
|
|
2738
2744
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
2739
2745
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -3214,6 +3220,7 @@ export declare interface TypedOverride {
|
|
|
3214
3220
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3215
3221
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3216
3222
|
fontDecorationStyleLink?: GlobalValue;
|
|
3223
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
3217
3224
|
fontDecorationThicknessLink?: GlobalValue;
|
|
3218
3225
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
3219
3226
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -3694,6 +3701,7 @@ export declare interface TypedOverride {
|
|
|
3694
3701
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3695
3702
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3696
3703
|
fontDecorationStyleLink?: GlobalValue;
|
|
3704
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
3697
3705
|
fontDecorationThicknessLink?: GlobalValue;
|
|
3698
3706
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
3699
3707
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -4174,6 +4182,7 @@ export declare interface TypedOverride {
|
|
|
4174
4182
|
colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
4175
4183
|
colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
4176
4184
|
fontDecorationStyleLink?: GlobalValue;
|
|
4185
|
+
fontDecorationLineButtonInlineLink?: GlobalValue;
|
|
4177
4186
|
fontDecorationThicknessLink?: GlobalValue;
|
|
4178
4187
|
fontDecorationThicknessLinkDisplayL?: GlobalValue;
|
|
4179
4188
|
fontSizeExpandableHeading?: GlobalValue;
|
|
@@ -3259,6 +3259,7 @@ export var 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 @@ export var 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 @@ export var 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 @@ export var 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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/table/internal.tsx"],"names":[],"mappings":"AA8CA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,cAAc,CAAC;AA8CzE,eAAO,MAAM,sBAAsB,EAW9B,mBAAmB,CAAC;AAEzB,QAAA,MAAM,aAAa,EAozBd,mBAAmB,CAAC;AAEzB,eAAe,aAAa,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { getAnalyticsMetadataAttribute, } from '@cloudscape-design/component-too
|
|
|
8
8
|
import InternalContainer from '../container/internal';
|
|
9
9
|
import { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';
|
|
10
10
|
import { getAnalyticsMetadataProps, getBaseProps } from '../internal/base-component';
|
|
11
|
+
import { StickyScrollbar } from '../internal/components/sticky-scrollbar';
|
|
11
12
|
import { getVisualContextClassname } from '../internal/components/visual-context';
|
|
12
13
|
import { CollectionLabelContext } from '../internal/context/collection-label-context';
|
|
13
14
|
import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
|
|
@@ -41,7 +42,6 @@ import { useGroupSelection } from './selection/use-group-selection';
|
|
|
41
42
|
import { SkeletonRows } from './skeleton-rows';
|
|
42
43
|
import { useStickyColumns } from './sticky-columns';
|
|
43
44
|
import StickyHeader from './sticky-header';
|
|
44
|
-
import { StickyScrollbar } from './sticky-scrollbar';
|
|
45
45
|
import { getTableRoleProps, getTableRowRoleProps, getTableWrapperRoleProps, GridNavigationProvider, } from './table-role';
|
|
46
46
|
import Thead from './thead';
|
|
47
47
|
import ToolsHeader from './tools-header';
|