@coinbase/cds-web 8.50.0 → 8.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dts/animation/Lottie.d.ts +3 -12
- package/dts/animation/Lottie.d.ts.map +1 -1
- package/dts/animation/LottieStatusAnimation.d.ts +23 -3
- package/dts/animation/LottieStatusAnimation.d.ts.map +1 -1
- package/dts/animation/types.d.ts +3 -4
- package/dts/animation/types.d.ts.map +1 -1
- package/dts/cells/ContentCellFallback.d.ts +3 -1
- package/dts/cells/ContentCellFallback.d.ts.map +1 -1
- package/dts/cells/ListCellFallback.d.ts +2 -0
- package/dts/cells/ListCellFallback.d.ts.map +1 -1
- package/dts/cells/MediaFallback.d.ts +2 -2
- package/dts/cells/MediaFallback.d.ts.map +1 -1
- package/dts/layout/Fallback.d.ts +5 -13
- package/dts/layout/Fallback.d.ts.map +1 -1
- package/dts/media/RemoteImage.d.ts.map +1 -1
- package/dts/media/RemoteImageGroup.d.ts.map +1 -1
- package/dts/overlays/tooltip/Tooltip.d.ts +3 -2
- package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/dts/overlays/tooltip/TooltipProps.d.ts +4 -0
- package/dts/overlays/tooltip/TooltipProps.d.ts.map +1 -1
- package/dts/tables/TableCellFallback.d.ts +4 -2
- package/dts/tables/TableCellFallback.d.ts.map +1 -1
- package/dts/visualizations/ProgressBar.d.ts.map +1 -1
- package/esm/animation/Lottie.js +2 -2
- package/esm/animation/LottieStatusAnimation.js +9 -3
- package/esm/cells/ContentCellFallback.css +1 -0
- package/esm/cells/ContentCellFallback.js +14 -3
- package/esm/cells/ListCellFallback.css +1 -0
- package/esm/cells/ListCellFallback.js +20 -6
- package/esm/cells/MediaFallback.js +15 -9
- package/esm/layout/Fallback.css +2 -1
- package/esm/layout/Fallback.js +16 -35
- package/esm/media/RemoteImage.css +3 -3
- package/esm/media/RemoteImage.js +1 -0
- package/esm/media/RemoteImageGroup.css +2 -2
- package/esm/media/RemoteImageGroup.js +1 -0
- package/esm/overlays/popover/Popover.js +2 -2
- package/esm/overlays/tooltip/Tooltip.js +24 -6
- package/esm/tables/TableCellFallback.css +2 -1
- package/esm/tables/TableCellFallback.js +15 -5
- package/esm/visualizations/ProgressBar.js +8 -14
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,25 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.52.0 (3/10/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- A11y improvements to Fallback, Spinner, and LottieStatusAnimation. [[#388](https://github.com/coinbase/cds/pull/388)]
|
|
16
|
+
- Simplify the ProgressBar component implementation. [[#388](https://github.com/coinbase/cds/pull/388)]
|
|
17
|
+
- Use shapeBorderRadius tokens in RemoteImage/RemoteImageGroup. [[#388](https://github.com/coinbase/cds/pull/388)]
|
|
18
|
+
- Removed useFallbackShape implementation from web and reuse the same hook defined in common. [[#388](https://github.com/coinbase/cds/pull/388)]
|
|
19
|
+
|
|
20
|
+
## 8.51.0 (3/9/2026 PST)
|
|
21
|
+
|
|
22
|
+
#### 🚀 Updates
|
|
23
|
+
|
|
24
|
+
- Added hasInteractiveContent prop to Tooltip to correctly handle keyboard navigation when content includes interactive elements. [[#469](https://github.com/coinbase/cds/pull/469)] [DX-5097]
|
|
25
|
+
|
|
26
|
+
#### 🐞 Fixes
|
|
27
|
+
|
|
28
|
+
- Fixed issue when tooltip does not announce its content when content is a React Node instead of a string. [[#469](https://github.com/coinbase/cds/pull/469)]
|
|
29
|
+
|
|
11
30
|
## 8.50.0 (3/6/2026 PST)
|
|
12
31
|
|
|
13
32
|
#### 🚀 Updates
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LottiePlayer } from '@coinbase/cds-common/types/LottiePlayer';
|
|
3
3
|
import type { LottieSource } from '@coinbase/cds-common/types/LottieSource';
|
|
4
|
+
import type { LottieProps } from './types';
|
|
4
5
|
export declare const Lottie: React.MemoExoticComponent<
|
|
5
6
|
React.ForwardRefExoticComponent<
|
|
6
|
-
Omit<
|
|
7
|
-
|
|
8
|
-
'justifyContent' | 'alignContent' | 'flexDirection' | 'flexWrap'
|
|
9
|
-
> & {
|
|
10
|
-
autoplay?: boolean;
|
|
11
|
-
loop?: boolean;
|
|
12
|
-
onAnimationFinish?: () => void;
|
|
13
|
-
resizeMode?: 'cover' | 'contain' | 'center';
|
|
14
|
-
source: LottieSource<string>;
|
|
15
|
-
handlers?: import('./types').LottieEventHandlersMap;
|
|
16
|
-
filterSize?: import('lottie-web').SVGRendererConfig['filterSize'];
|
|
17
|
-
} & React.RefAttributes<LottiePlayer<LottieSource<any>>>
|
|
7
|
+
Omit<LottieProps<string, LottieSource<string>>, 'ref'> &
|
|
8
|
+
React.RefAttributes<LottiePlayer<LottieSource<any>>>
|
|
18
9
|
>
|
|
19
10
|
>;
|
|
20
11
|
//# sourceMappingURL=Lottie.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lottie.d.ts","sourceRoot":"","sources":["../../src/animation/Lottie.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAsB,YAAY,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"Lottie.d.ts","sourceRoot":"","sources":["../../src/animation/Lottie.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAsB,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAMhG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAgL3C,eAAO,MAAM,MAAM,2KAyElB,CAAC"}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
1
|
+
import type { DimensionValue } from '@coinbase/cds-common/types/DimensionStyles';
|
|
2
|
+
import type { SharedAccessibilityProps } from '@coinbase/cds-common/types/SharedAccessibilityProps';
|
|
3
|
+
import type { SharedProps } from '@coinbase/cds-common/types/SharedProps';
|
|
4
|
+
import type { LottieStatus } from 'packages/common/dts/types/LottieStatus';
|
|
5
|
+
type LottieStatusAnimationBaseProps = {
|
|
6
|
+
status?: LottieStatus;
|
|
7
|
+
onFinish?: () => void;
|
|
8
|
+
};
|
|
9
|
+
type LottieStatusAnimationPropsWithWidth = {
|
|
10
|
+
width: DimensionValue;
|
|
11
|
+
} & LottieStatusAnimationBaseProps;
|
|
12
|
+
type LottieStatusAnimationPropsWithHeight = {
|
|
13
|
+
height: DimensionValue;
|
|
14
|
+
} & LottieStatusAnimationBaseProps;
|
|
15
|
+
export type LottieStatusAnimationProps = (
|
|
16
|
+
| LottieStatusAnimationPropsWithWidth
|
|
17
|
+
| LottieStatusAnimationPropsWithHeight
|
|
18
|
+
) &
|
|
19
|
+
SharedProps &
|
|
20
|
+
SharedAccessibilityProps;
|
|
21
|
+
export declare const LottieStatusAnimation: import('react').MemoExoticComponent<
|
|
4
22
|
({
|
|
5
23
|
status,
|
|
6
24
|
onFinish,
|
|
7
25
|
testID,
|
|
26
|
+
accessibilityLabel,
|
|
8
27
|
...otherProps
|
|
9
28
|
}: LottieStatusAnimationProps) => import('react/jsx-runtime').JSX.Element
|
|
10
29
|
>;
|
|
30
|
+
export {};
|
|
11
31
|
//# sourceMappingURL=LottieStatusAnimation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LottieStatusAnimation.d.ts","sourceRoot":"","sources":["../../src/animation/LottieStatusAnimation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LottieStatusAnimation.d.ts","sourceRoot":"","sources":["../../src/animation/LottieStatusAnimation.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAEjF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAG1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAM3E,KAAK,8BAA8B,GAAG;IACpC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,KAAK,EAAE,cAAc,CAAC;CACvB,GAAG,8BAA8B,CAAC;AAEnC,KAAK,oCAAoC,GAAG;IAC1C,MAAM,EAAE,cAAc,CAAC;CACxB,GAAG,8BAA8B,CAAC;AAEnC,MAAM,MAAM,0BAA0B,GAAG,CACrC,mCAAmC,GACnC,oCAAoC,CACvC,GACC,WAAW,GACX,wBAAwB,CAAC;AAC3B,eAAO,MAAM,qBAAqB,wGAO7B,0BAA0B,6CAmC9B,CAAC"}
|
package/dts/animation/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LottieSource } from '@coinbase/cds-common/types/LottieSource';
|
|
2
2
|
import type { AnimationEventName, AnimationItem, SVGRendererConfig } from 'lottie-web';
|
|
3
|
-
import type { BoxBaseProps } from '../layout';
|
|
3
|
+
import type { BoxBaseProps, BoxDefaultElement, BoxProps } from '../layout';
|
|
4
4
|
export type LottieEventHandlersMap = {
|
|
5
5
|
[key in LottieListener['name']]?: LottieListener['handler'];
|
|
6
6
|
};
|
|
@@ -15,12 +15,10 @@ export type LottieBaseProps<T extends string, Source extends LottieSource<T>> =
|
|
|
15
15
|
/**
|
|
16
16
|
* A boolean flag indicating whether or not the animation should start automatically when
|
|
17
17
|
* mounted. This only affects the imperative API.
|
|
18
|
-
* @default false
|
|
19
18
|
*/
|
|
20
19
|
autoplay?: boolean;
|
|
21
20
|
/**
|
|
22
21
|
* A boolean flag indicating whether or not the animation should loop.
|
|
23
|
-
* @default false
|
|
24
22
|
*/
|
|
25
23
|
loop?: boolean;
|
|
26
24
|
/**
|
|
@@ -50,6 +48,7 @@ export type LottieBaseProps<T extends string, Source extends LottieSource<T>> =
|
|
|
50
48
|
export type LottieProps<T extends string, Source extends LottieSource<T>> = LottieBaseProps<
|
|
51
49
|
T,
|
|
52
50
|
Source
|
|
53
|
-
|
|
51
|
+
> &
|
|
52
|
+
BoxProps<BoxDefaultElement>;
|
|
54
53
|
export type LottieAnimationRef = React.MutableRefObject<AnimationItem | undefined>;
|
|
55
54
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/animation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/animation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG;KAClC,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,SAAS,YAAY,CAAC,CAAC,CAAC,IAAI,IAAI,CAClF,YAAY,EACZ,cAAc,GAAG,gBAAgB,GAAG,UAAU,GAAG,eAAe,CACjE,GAAG;IACF;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC5C;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,SAAS,YAAY,CAAC,CAAC,CAAC,IAAI,eAAe,CACzF,CAAC,EACD,MAAM,CACP,GACC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAE9B,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,gBAAgB,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FallbackRectWidthProps } from '@coinbase/cds-common/types';
|
|
3
|
+
import type { SharedAccessibilityProps } from '@coinbase/cds-common/types/SharedAccessibilityProps';
|
|
3
4
|
import { type CellAccessoryType } from './CellAccessory';
|
|
4
5
|
import type { CellMediaType } from './CellMedia';
|
|
5
6
|
import type { ContentCellBaseProps } from './ContentCell';
|
|
@@ -8,7 +9,8 @@ type ContentCellFallbackSpacingProps = Pick<
|
|
|
8
9
|
'innerSpacing' | 'outerSpacing' | 'spacingVariant'
|
|
9
10
|
>;
|
|
10
11
|
export type ContentCellFallbackProps = FallbackRectWidthProps &
|
|
11
|
-
ContentCellFallbackSpacingProps &
|
|
12
|
+
ContentCellFallbackSpacingProps &
|
|
13
|
+
Pick<SharedAccessibilityProps, 'accessibilityLabel'> & {
|
|
12
14
|
/** Accessory to display at the end of the cell. */
|
|
13
15
|
accessory?: CellAccessoryType;
|
|
14
16
|
/** Custom accessory rendered at the end of the cell. Takes precedence over `accessory`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ContentCellFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ContentCellFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAQpG,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAgB1D,KAAK,+BAA+B,GAAG,IAAI,CACzC,oBAAoB,EACpB,cAAc,GAAG,cAAc,GAAG,gBAAgB,CACnD,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAC3D,+BAA+B,GAC/B,IAAI,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,GAAG;IACrD,mDAAmD;IACnD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,2FAA2F;IAC3F,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAMJ,eAAO,MAAM,mBAAmB,sDAmG9B,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { FallbackRectWidthProps, SharedProps } from '@coinbase/cds-common/types';
|
|
3
|
+
import type { SharedAccessibilityProps } from '@coinbase/cds-common/types/SharedAccessibilityProps';
|
|
3
4
|
import { type CellAccessoryType } from './CellAccessory';
|
|
4
5
|
import type { CellMediaType } from './CellMedia';
|
|
5
6
|
import { type ListCellBaseProps } from './ListCell';
|
|
6
7
|
export type ListCellFallbackBaseProps = SharedProps &
|
|
7
8
|
FallbackRectWidthProps &
|
|
9
|
+
Pick<SharedAccessibilityProps, 'accessibilityLabel'> &
|
|
8
10
|
Pick<ListCellBaseProps, 'innerSpacing' | 'outerSpacing' | 'spacingVariant'> & {
|
|
9
11
|
/** Accessory to display at the end of the cell. */
|
|
10
12
|
accessory?: CellAccessoryType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ListCellFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ListCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ListCellFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAoBpG,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAgD,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGlG,MAAM,MAAM,yBAAyB,GAAG,WAAW,GACjD,sBAAsB,GACtB,IAAI,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,GACpD,IAAI,CAAC,iBAAiB,EAAE,cAAc,GAAG,cAAc,GAAG,gBAAgB,CAAC,GAAG;IAC5E,mDAAmD;IACnD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,2FAA2F;IAC3F,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAAG;IAC9D,0DAA0D;IAC1D,UAAU,CAAC,EAAE;QACX,uDAAuD;QACvD,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,yCAAyC;QACzC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,4CAA4C;QAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,8CAA8C;QAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,2CAA2C;QAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,wCAAwC;QACxC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,8CAA8C;QAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,qDAAqD;IACrD,MAAM,CAAC,EAAE;QACP,kEAAkE;QAClE,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,4CAA4C;QAC5C,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,+CAA+C;QAC/C,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,iDAAiD;QACjD,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,8CAA8C;QAC9C,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,2CAA2C;QAC3C,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,iDAAiD;QACjD,WAAW,CAAC,EAAE,aAAa,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,gBAAgB,6DAsM3B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type fallbackDefaultElement, type FallbackProps } from '../layout/Fallback';
|
|
3
3
|
import type { CellMediaType } from './CellMedia';
|
|
4
4
|
export type MediaFallbackProps = {
|
|
5
5
|
type: CellMediaType;
|
|
6
|
-
} &
|
|
6
|
+
} & Omit<FallbackProps<typeof fallbackDefaultElement>, 'width' | 'height' | 'shape'>;
|
|
7
7
|
export declare const MediaFallback: React.NamedExoticComponent<MediaFallbackProps>;
|
|
8
8
|
//# sourceMappingURL=MediaFallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaFallback.d.ts","sourceRoot":"","sources":["../../src/cells/MediaFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MediaFallback.d.ts","sourceRoot":"","sources":["../../src/cells/MediaFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAY,KAAK,sBAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,aAAa,CAAC;CACrB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,sBAAsB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AAErF,eAAO,MAAM,aAAa,gDASxB,CAAC"}
|
package/dts/layout/Fallback.d.ts
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
useFallbackShape,
|
|
4
|
+
type UseFallbackShapeOptions,
|
|
5
|
+
} from '@coinbase/cds-common/hooks/useFallbackShape';
|
|
2
6
|
import type { Shape } from '@coinbase/cds-common/types';
|
|
3
7
|
import type { Polymorphic } from '../core/polymorphism';
|
|
4
8
|
import { type BoxBaseProps } from './Box';
|
|
5
|
-
export type UseFallbackShapeOptions = {
|
|
6
|
-
disableRandomRectWidth?: boolean;
|
|
7
|
-
rectWidthVariant?: number;
|
|
8
|
-
};
|
|
9
|
-
export declare function useFallbackShape(
|
|
10
|
-
shape: Shape,
|
|
11
|
-
baseWidth: number | string,
|
|
12
|
-
options?: UseFallbackShapeOptions,
|
|
13
|
-
): {
|
|
14
|
-
borderRadius: number;
|
|
15
|
-
width: string | number;
|
|
16
|
-
};
|
|
17
9
|
export declare const fallbackDefaultElement = 'div';
|
|
18
10
|
export type FallbackDefaultElement = typeof fallbackDefaultElement;
|
|
19
11
|
export type FallbackBaseProps = Polymorphic.ExtendableProps<
|
|
@@ -45,5 +37,5 @@ type FallbackComponent = (<AsComponent extends React.ElementType = FallbackDefau
|
|
|
45
37
|
) => Polymorphic.ReactReturn) &
|
|
46
38
|
Polymorphic.ReactNamed;
|
|
47
39
|
export declare const Fallback: FallbackComponent;
|
|
48
|
-
export {};
|
|
40
|
+
export { useFallbackShape, type UseFallbackShapeOptions };
|
|
49
41
|
//# sourceMappingURL=Fallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fallback.d.ts","sourceRoot":"","sources":["../../src/layout/Fallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"Fallback.d.ts","sourceRoot":"","sources":["../../src/layout/Fallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC7B,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA+C/C,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAE5C,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,eAAe,CACzD,YAAY,EACZ;IACE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,uDAAuD;IACvD,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CACF,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,IAAI,WAAW,CAAC,KAAK,CAClF,WAAW,EACX,iBAAiB,CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,sBAAsB,EACvF,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAC9B,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,QAAQ,EAAE,iBAqDtB,CAAC;AAIF,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteImage.d.ts","sourceRoot":"","sources":["../../src/media/RemoteImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RemoteImage.d.ts","sourceRoot":"","sources":["../../src/media/RemoteImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAM7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAI3E,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQnD,QAAA,MAAM,SAAS;;;CAOd,CAAC;AAsCF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,GAAG;IACxE,yIAAyI;IACzI,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;IACpC;;;SAGK;IACL,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;;;SAKK;IACL,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAEpD,eAAO,MAAM,WAAW,yJAenB,gBAAgB,6CA2CpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteImageGroup.d.ts","sourceRoot":"","sources":["../../src/media/RemoteImageGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RemoteImageGroup.d.ts","sourceRoot":"","sources":["../../src/media/RemoteImageGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EAEV,KAAK,EACL,wBAAwB,EACxB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK3E,MAAM,MAAM,yBAAyB,GAAG,WAAW,GACjD,wBAAwB,GACxB,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,aAAa,GAAG,aAAa,CAAC,GAAG;IACjE;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,uBAAuB;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AA4B9D,eAAO,MAAM,gBAAgB,GAAI,4EAS9B,qBAAqB,4CAwFvB,CAAC"}
|
|
@@ -5,14 +5,15 @@ export declare const Tooltip: ({
|
|
|
5
5
|
elevation,
|
|
6
6
|
placement,
|
|
7
7
|
gap,
|
|
8
|
-
disablePortal,
|
|
9
8
|
testID,
|
|
10
9
|
zIndex,
|
|
11
10
|
tooltipId: tooltipIdDefault,
|
|
12
11
|
visible,
|
|
12
|
+
hasInteractiveContent,
|
|
13
13
|
invertColorScheme,
|
|
14
|
-
disableFocusTrap,
|
|
15
14
|
disableAutoFocus,
|
|
15
|
+
disableFocusTrap,
|
|
16
|
+
disablePortal,
|
|
16
17
|
disableTypeFocus,
|
|
17
18
|
focusTabIndexElements,
|
|
18
19
|
respectNegativeTabIndex,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD,eAAO,MAAM,OAAO,GAAI,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD,eAAO,MAAM,OAAO,GAAI,+SAqBrB,YAAY,4CAoFd,CAAC"}
|
|
@@ -58,6 +58,10 @@ export type TooltipBaseProps = SharedProps &
|
|
|
58
58
|
* A unique ID used to ensure tooltips are accessible
|
|
59
59
|
*/
|
|
60
60
|
tooltipId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the tooltip has interactive elements inside the content.
|
|
63
|
+
*/
|
|
64
|
+
hasInteractiveContent?: boolean;
|
|
61
65
|
};
|
|
62
66
|
export type TooltipProps = TooltipBaseProps;
|
|
63
67
|
export type PopperTooltipProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipProps.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/TooltipProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,WAAW,GACxC,cAAc,GACd,IAAI,CACF,YAAY,EACV,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,yBAAyB,GACzB,uBAAuB,GACvB,gBAAgB,CACnB,GAAG;IACF,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,gDAAgD;IAChD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;OAIG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sDAAsD;IACtD,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;SAGK;IACL,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TooltipProps.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/TooltipProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,WAAW,GACxC,cAAc,GACd,IAAI,CACF,YAAY,EACV,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,yBAAyB,GACzB,uBAAuB,GACvB,gBAAgB,CACnB,GAAG;IACF,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,gDAAgD;IAChD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;OAIG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sDAAsD;IACtD,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;SAGK;IACL,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEJ,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { FallbackRectWidthProps } from '@coinbase/cds-common/types/FallbackBaseProps';
|
|
2
|
+
import type { SharedAccessibilityProps } from '@coinbase/cds-common/types/SharedAccessibilityProps';
|
|
3
3
|
import type { SharedProps } from '@coinbase/cds-common/types/SharedProps';
|
|
4
4
|
import type { CellMediaType } from '../cells/CellMedia';
|
|
5
5
|
import type { TableCellProps } from './TableCell';
|
|
@@ -14,8 +14,9 @@ export type TableCellFallbackProps = {
|
|
|
14
14
|
end?: CellMediaType;
|
|
15
15
|
} & SharedProps &
|
|
16
16
|
FallbackRectWidthProps &
|
|
17
|
+
Pick<SharedAccessibilityProps, 'accessibilityLabel'> &
|
|
17
18
|
Pick<TableCellProps, 'width' | 'outerSpacing' | 'innerSpacing' | 'as'>;
|
|
18
|
-
export declare const TableCellFallback:
|
|
19
|
+
export declare const TableCellFallback: import('react').MemoExoticComponent<
|
|
19
20
|
({
|
|
20
21
|
title,
|
|
21
22
|
start,
|
|
@@ -27,6 +28,7 @@ export declare const TableCellFallback: React.MemoExoticComponent<
|
|
|
27
28
|
innerSpacing,
|
|
28
29
|
disableRandomRectWidth,
|
|
29
30
|
rectWidthVariant,
|
|
31
|
+
accessibilityLabel,
|
|
30
32
|
...props
|
|
31
33
|
}: TableCellFallbackProps) => import('react/jsx-runtime').JSX.Element
|
|
32
34
|
>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCellFallback.d.ts","sourceRoot":"","sources":["../../src/tables/TableCellFallback.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableCellFallback.d.ts","sourceRoot":"","sources":["../../src/tables/TableCellFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAK1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAclD,MAAM,MAAM,sBAAsB,GAAG;IACnC,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB,GAAG,WAAW,GACb,sBAAsB,GACtB,IAAI,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,GACpD,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,cAAc,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC;AASzE,eAAO,MAAM,iBAAiB,wLAczB,sBAAsB,6CAsD1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../src/visualizations/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../src/visualizations/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAOhG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3D,MAAM,MAAM,iBAAiB,GAAG,WAAW,GACzC,IAAI,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,GAClD,IAAI,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,GAAG;IACrD,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB;;SAEK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,MAAM,CAAC,EAAE;QACP,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B,4BAA4B;QAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAChC,CAAC;IACF,8EAA8E;IAC9E,UAAU,CAAC,EAAE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,4BAA4B;QAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAQF,eAAO,MAAM,WAAW;IAlDpB,8DAA8D;cACpD,MAAM;IAChB;;SAEK;aACI,MAAM;IACf;;OAEG;eACQ,OAAO;IAClB;;;OAGG;YACK,SAAS,CAAC,KAAK;IACvB;;OAEG;qBACc,MAAM,IAAI;IAC3B;;OAEG;uBACgB,MAAM,IAAI;;YAIvB,KAAK,CAAC,aAAa;gBACf,MAAM;IAClB,yEAAyE;aAChE;QACP,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B,4BAA4B;QAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAChC;IACD,8EAA8E;iBACjE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,4BAA4B;QAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;yCA2FF,CAAC"}
|
package/esm/animation/Lottie.js
CHANGED
|
@@ -31,7 +31,7 @@ export const Lottie = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forwarded
|
|
|
31
31
|
resizeMode = 'contain',
|
|
32
32
|
filterSize = defaultFilterSize
|
|
33
33
|
} = _ref,
|
|
34
|
-
|
|
34
|
+
boxProps = _objectWithoutProperties(_ref, _excluded);
|
|
35
35
|
const {
|
|
36
36
|
containerRef,
|
|
37
37
|
animationRef
|
|
@@ -77,7 +77,7 @@ export const Lottie = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forwarded
|
|
|
77
77
|
ref: containerRef,
|
|
78
78
|
as: "div",
|
|
79
79
|
className: lottieCss
|
|
80
|
-
},
|
|
80
|
+
}, boxProps));
|
|
81
81
|
}));
|
|
82
82
|
Lottie.displayName = 'Lottie';
|
|
83
83
|
import "./Lottie.css";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["status", "onFinish", "testID"];
|
|
1
|
+
const _excluded = ["status", "onFinish", "testID", "accessibilityLabel"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -6,7 +6,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
-
import
|
|
9
|
+
import { memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
10
|
+
import { lottieStatusToAccessibilityLabel } from '@coinbase/cds-common/lottie/statusToAccessibilityLabel';
|
|
10
11
|
import { useStatusAnimationPoller } from '@coinbase/cds-common/lottie/useStatusAnimationPoller';
|
|
11
12
|
import { tradeStatus } from '@coinbase/cds-lottie-files/tradeStatus';
|
|
12
13
|
import { Lottie } from './Lottie';
|
|
@@ -16,7 +17,8 @@ export const LottieStatusAnimation = /*#__PURE__*/memo(_ref => {
|
|
|
16
17
|
let {
|
|
17
18
|
status = 'loading',
|
|
18
19
|
onFinish,
|
|
19
|
-
testID
|
|
20
|
+
testID,
|
|
21
|
+
accessibilityLabel
|
|
20
22
|
} = _ref,
|
|
21
23
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
22
24
|
const [, forceUpdate] = useState(0);
|
|
@@ -32,9 +34,13 @@ export const LottieStatusAnimation = /*#__PURE__*/memo(_ref => {
|
|
|
32
34
|
forceUpdate(prev => prev + 1);
|
|
33
35
|
}
|
|
34
36
|
}, []);
|
|
37
|
+
const label = useMemo(() => accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : lottieStatusToAccessibilityLabel[status], [accessibilityLabel, status]);
|
|
35
38
|
return /*#__PURE__*/_jsx(Lottie, _objectSpread({
|
|
36
39
|
ref: handleRef,
|
|
40
|
+
accessibilityLabel: label,
|
|
41
|
+
"aria-live": "polite",
|
|
37
42
|
onAnimationFinish: handlePolling,
|
|
43
|
+
role: "status",
|
|
38
44
|
source: tradeStatus,
|
|
39
45
|
testID: testID
|
|
40
46
|
}, otherProps));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cds{.visuallyHiddenCss-vcqrmp1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;-webkit-clip:rect(0,0,0,0);clip:rect(0,0,0,0);white-space:nowrap;border:0;}}
|
|
@@ -8,6 +8,7 @@ import { CellAccessory } from './CellAccessory';
|
|
|
8
8
|
import { condensedInnerSpacing, condensedOuterSpacing } from './ListCell';
|
|
9
9
|
import { MediaFallback } from './MediaFallback';
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const visuallyHiddenCss = "visuallyHiddenCss-vcqrmp1";
|
|
11
12
|
const fullWidthStyle = {
|
|
12
13
|
width: '100%',
|
|
13
14
|
display: 'block'
|
|
@@ -29,7 +30,8 @@ export const ContentCellFallback = /*#__PURE__*/memo(function ContentCellFallbac
|
|
|
29
30
|
rectWidthVariant,
|
|
30
31
|
spacingVariant = 'normal',
|
|
31
32
|
innerSpacing,
|
|
32
|
-
outerSpacing
|
|
33
|
+
outerSpacing,
|
|
34
|
+
accessibilityLabel = 'Loading'
|
|
33
35
|
} = _ref;
|
|
34
36
|
// We can't use ContentCell here as we need to account for percentage based widths.
|
|
35
37
|
// Flexbox collides with percentages also, so we need to wrap in normal divs.
|
|
@@ -44,6 +46,7 @@ export const ContentCellFallback = /*#__PURE__*/memo(function ContentCellFallbac
|
|
|
44
46
|
borderRadius: spacingVariant === 'condensed' ? 0 : undefined,
|
|
45
47
|
innerSpacing: innerSpacing !== null && innerSpacing !== void 0 ? innerSpacing : spacingVariant === 'condensed' ? condensedInnerSpacing : undefined,
|
|
46
48
|
media: media && /*#__PURE__*/_jsx(MediaFallback, {
|
|
49
|
+
"aria-hidden": true,
|
|
47
50
|
type: media
|
|
48
51
|
}),
|
|
49
52
|
minHeight: minHeight,
|
|
@@ -59,12 +62,16 @@ export const ContentCellFallback = /*#__PURE__*/memo(function ContentCellFallbac
|
|
|
59
62
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
60
63
|
paddingTop: spacingVariant === 'condensed' ? 0.5 : 0,
|
|
61
64
|
style: fullWidthStyle,
|
|
62
|
-
children: [
|
|
65
|
+
children: [accessibilityLabel && /*#__PURE__*/_jsx("span", {
|
|
66
|
+
className: visuallyHiddenCss,
|
|
67
|
+
children: accessibilityLabel
|
|
68
|
+
}), meta && /*#__PURE__*/_jsx("div", {
|
|
63
69
|
style: floatStyle,
|
|
64
70
|
children: /*#__PURE__*/_jsx(Box, {
|
|
65
71
|
flexShrink: 0,
|
|
66
72
|
justifyContent: "flex-end",
|
|
67
73
|
children: /*#__PURE__*/_jsx(Fallback, {
|
|
74
|
+
"aria-hidden": true,
|
|
68
75
|
percentage: true,
|
|
69
76
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
70
77
|
height: 18,
|
|
@@ -73,12 +80,14 @@ export const ContentCellFallback = /*#__PURE__*/memo(function ContentCellFallbac
|
|
|
73
80
|
})
|
|
74
81
|
})
|
|
75
82
|
}), title && /*#__PURE__*/_jsx(Fallback, {
|
|
83
|
+
"aria-hidden": true,
|
|
76
84
|
percentage: true,
|
|
77
85
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
78
86
|
height: 18,
|
|
79
87
|
rectWidthVariant: getRectWidthVariant(rectWidthVariant, 1),
|
|
80
88
|
width: 45
|
|
81
89
|
}), subtitle && /*#__PURE__*/_jsx(Fallback, {
|
|
90
|
+
"aria-hidden": true,
|
|
82
91
|
percentage: true,
|
|
83
92
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
84
93
|
height: subtitleHeight,
|
|
@@ -86,6 +95,7 @@ export const ContentCellFallback = /*#__PURE__*/memo(function ContentCellFallbac
|
|
|
86
95
|
rectWidthVariant: getRectWidthVariant(rectWidthVariant, 2),
|
|
87
96
|
width: 35
|
|
88
97
|
}), description && /*#__PURE__*/_jsx(Fallback, {
|
|
98
|
+
"aria-hidden": true,
|
|
89
99
|
percentage: true,
|
|
90
100
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
91
101
|
height: 24,
|
|
@@ -95,4 +105,5 @@ export const ContentCellFallback = /*#__PURE__*/memo(function ContentCellFallbac
|
|
|
95
105
|
})]
|
|
96
106
|
})
|
|
97
107
|
});
|
|
98
|
-
});
|
|
108
|
+
});
|
|
109
|
+
import "./ContentCellFallback.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cds{.visuallyHiddenCss-vzen5l{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;-webkit-clip:rect(0,0,0,0);clip:rect(0,0,0,0);white-space:nowrap;border:0;}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["accessory", "accessoryNode", "classNames", "styles", "title", "description", "detail", "subdetail", "media", "disableRandomRectWidth", "rectWidthVariant", "helperText", "subtitle", "spacingVariant", "innerSpacing", "outerSpacing"];
|
|
1
|
+
const _excluded = ["accessory", "accessoryNode", "classNames", "styles", "title", "description", "detail", "subdetail", "media", "disableRandomRectWidth", "rectWidthVariant", "helperText", "subtitle", "spacingVariant", "innerSpacing", "outerSpacing", "accessibilityLabel"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -10,6 +10,7 @@ import { memo, useMemo } from 'react';
|
|
|
10
10
|
import { getRectWidthVariant } from '@coinbase/cds-common/utils/getRectWidthVariant';
|
|
11
11
|
import { VStack } from '../layout';
|
|
12
12
|
import { Fallback } from '../layout/Fallback';
|
|
13
|
+
const visuallyHiddenCss = "visuallyHiddenCss-vzen5l";
|
|
13
14
|
import { Cell } from './Cell';
|
|
14
15
|
import { CellAccessory } from './CellAccessory';
|
|
15
16
|
import { condensedInnerSpacing, condensedOuterSpacing } from './ListCell';
|
|
@@ -32,7 +33,8 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
32
33
|
subtitle,
|
|
33
34
|
spacingVariant,
|
|
34
35
|
innerSpacing,
|
|
35
|
-
outerSpacing
|
|
36
|
+
outerSpacing,
|
|
37
|
+
accessibilityLabel = 'Loading'
|
|
36
38
|
} = _ref,
|
|
37
39
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
38
40
|
// We cant use ListCell here as we need to account for percentage based widths.
|
|
@@ -43,6 +45,7 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
43
45
|
return null;
|
|
44
46
|
}
|
|
45
47
|
return /*#__PURE__*/_jsx(Fallback, {
|
|
48
|
+
"aria-hidden": true,
|
|
46
49
|
percentage: true,
|
|
47
50
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.helperText,
|
|
48
51
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
@@ -65,6 +68,7 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
65
68
|
style: styles === null || styles === void 0 ? void 0 : styles.detail,
|
|
66
69
|
testID: "list-cell-fallback-detail",
|
|
67
70
|
children: [/*#__PURE__*/_jsx(Fallback, {
|
|
71
|
+
"aria-hidden": true,
|
|
68
72
|
percentage: true,
|
|
69
73
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.detail,
|
|
70
74
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
@@ -73,6 +77,7 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
73
77
|
style: styles === null || styles === void 0 ? void 0 : styles.detail,
|
|
74
78
|
width: 60
|
|
75
79
|
}), /*#__PURE__*/_jsx(Fallback, {
|
|
80
|
+
"aria-hidden": true,
|
|
76
81
|
percentage: true,
|
|
77
82
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.subdetail,
|
|
78
83
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
@@ -88,6 +93,7 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
88
93
|
return null;
|
|
89
94
|
}
|
|
90
95
|
return /*#__PURE__*/_jsx(Fallback, {
|
|
96
|
+
"aria-hidden": true,
|
|
91
97
|
percentage: true,
|
|
92
98
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.title,
|
|
93
99
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
@@ -103,6 +109,7 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
103
109
|
return null;
|
|
104
110
|
}
|
|
105
111
|
return /*#__PURE__*/_jsx(Fallback, {
|
|
112
|
+
"aria-hidden": true,
|
|
106
113
|
percentage: true,
|
|
107
114
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.subtitle,
|
|
108
115
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
@@ -118,6 +125,7 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
118
125
|
return null;
|
|
119
126
|
}
|
|
120
127
|
return /*#__PURE__*/_jsx(Fallback, {
|
|
128
|
+
"aria-hidden": true,
|
|
121
129
|
percentage: true,
|
|
122
130
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.description,
|
|
123
131
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
@@ -133,11 +141,12 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
133
141
|
return undefined;
|
|
134
142
|
}
|
|
135
143
|
return /*#__PURE__*/_jsx(MediaFallback, {
|
|
144
|
+
"aria-hidden": true,
|
|
136
145
|
testID: "list-cell-fallback-media",
|
|
137
146
|
type: media
|
|
138
147
|
});
|
|
139
148
|
}, [media]);
|
|
140
|
-
return /*#__PURE__*/
|
|
149
|
+
return /*#__PURE__*/_jsxs(Cell, _objectSpread(_objectSpread({
|
|
141
150
|
accessory: accessory ? /*#__PURE__*/_jsx(CellAccessory, {
|
|
142
151
|
type: accessory
|
|
143
152
|
}) : undefined,
|
|
@@ -150,13 +159,18 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
150
159
|
innerSpacing: innerSpacing !== null && innerSpacing !== void 0 ? innerSpacing : spacingVariant === 'condensed' ? condensedInnerSpacing : undefined,
|
|
151
160
|
media: mediaFallback,
|
|
152
161
|
outerSpacing: outerSpacing !== null && outerSpacing !== void 0 ? outerSpacing : spacingVariant === 'condensed' ? condensedOuterSpacing : undefined,
|
|
162
|
+
position: "relative",
|
|
153
163
|
styles: {
|
|
154
164
|
accessory: styles === null || styles === void 0 ? void 0 : styles.accessory
|
|
155
165
|
}
|
|
156
166
|
}, props), {}, {
|
|
157
|
-
children: /*#__PURE__*/
|
|
167
|
+
children: [accessibilityLabel && /*#__PURE__*/_jsx("span", {
|
|
168
|
+
className: visuallyHiddenCss,
|
|
169
|
+
children: accessibilityLabel
|
|
170
|
+
}), /*#__PURE__*/_jsxs(VStack, {
|
|
158
171
|
gap: 0.5,
|
|
159
172
|
children: [titleFallback, subtitleFallback, descriptionFallback]
|
|
160
|
-
})
|
|
173
|
+
})]
|
|
161
174
|
}));
|
|
162
|
-
});
|
|
175
|
+
});
|
|
176
|
+
import "./ListCellFallback.css";
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
+
const _excluded = ["type"];
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
1
9
|
import React, { memo } from 'react';
|
|
2
10
|
import { imageSize, mediaSize } from '@coinbase/cds-common/tokens/cell';
|
|
3
11
|
import { Fallback } from '../layout/Fallback';
|
|
4
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
13
|
export const MediaFallback = /*#__PURE__*/memo(function MediaFallback(_ref) {
|
|
6
14
|
let {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
type
|
|
16
|
+
} = _ref,
|
|
17
|
+
fallbackProps = _objectWithoutProperties(_ref, _excluded);
|
|
10
18
|
if (type === 'image') {
|
|
11
|
-
return /*#__PURE__*/_jsx(Fallback, {
|
|
19
|
+
return /*#__PURE__*/_jsx(Fallback, _objectSpread(_objectSpread({}, fallbackProps), {}, {
|
|
12
20
|
height: imageSize,
|
|
13
21
|
shape: "squircle",
|
|
14
|
-
testID: testID,
|
|
15
22
|
width: imageSize
|
|
16
|
-
});
|
|
23
|
+
}));
|
|
17
24
|
}
|
|
18
|
-
return /*#__PURE__*/_jsx(Fallback, {
|
|
25
|
+
return /*#__PURE__*/_jsx(Fallback, _objectSpread(_objectSpread({}, fallbackProps), {}, {
|
|
19
26
|
height: mediaSize,
|
|
20
27
|
shape: "circle",
|
|
21
|
-
testID: testID,
|
|
22
28
|
width: mediaSize
|
|
23
|
-
});
|
|
29
|
+
}));
|
|
24
30
|
});
|
package/esm/layout/Fallback.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@layer cds{.fallbackCss-f1n296p1{display:inline-block;position:relative;overflow:hidden;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:shimmer-fallbackCss-f1n296p1;animation-name:shimmer-fallbackCss-f1n296p1;-webkit-animation-timing-function:linear;animation-timing-function:linear;background-color:rgba(var(--gray60),0.05);background-repeat:no-repeat;background-image:linear-gradient( to right, rgb(var(--gray60),0.05) 0%, rgb(var(--gray60),0) 25%, rgb(var(--gray60),0.1) 50%, rgb(var(--gray60),0) 75%, rgb(var(--gray60),0.05) 100% );}@-webkit-keyframes shimmer-fallbackCss-f1n296p1{0%{background-position:-600px 0;}100%{background-position:600px 0;}}@keyframes shimmer-fallbackCss-f1n296p1{0%{background-position:-600px 0;}100%{background-position:600px 0;}}
|
|
1
|
+
@layer cds{.fallbackCss-f1n296p1{display:inline-block;position:relative;overflow:hidden;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:shimmer-fallbackCss-f1n296p1;animation-name:shimmer-fallbackCss-f1n296p1;-webkit-animation-timing-function:linear;animation-timing-function:linear;background-color:rgba(var(--gray60),0.05);background-repeat:no-repeat;background-image:linear-gradient( to right, rgb(var(--gray60),0.05) 0%, rgb(var(--gray60),0) 25%, rgb(var(--gray60),0.1) 50%, rgb(var(--gray60),0) 75%, rgb(var(--gray60),0.05) 100% );}@-webkit-keyframes shimmer-fallbackCss-f1n296p1{0%{background-position:-600px 0;}100%{background-position:600px 0;}}@keyframes shimmer-fallbackCss-f1n296p1{0%{background-position:-600px 0;}100%{background-position:600px 0;}}
|
|
2
|
+
.visuallyHiddenCss-v1e56i3u{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;-webkit-clip:rect(0,0,0,0);clip:rect(0,0,0,0);white-space:nowrap;border:0;}}
|
package/esm/layout/Fallback.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["as", "height", "shape", "width", "percentage", "disableRandomRectWidth", "rectWidthVariant"];
|
|
1
|
+
const _excluded = ["as", "height", "shape", "width", "percentage", "disableRandomRectWidth", "rectWidthVariant", "accessibilityLabel"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -7,36 +7,11 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
9
|
import React, { forwardRef, memo, useMemo } from 'react';
|
|
10
|
+
import { useFallbackShape } from '@coinbase/cds-common/hooks/useFallbackShape';
|
|
10
11
|
import { Box } from './Box';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
const WIDTH_MODIFIERS = [0.5, 0, 0.6, 0.8, 0.1, 0.9, 0.4, 0.2, 0.7, 0.3];
|
|
13
|
-
export function useFallbackShape(shape, baseWidth, options) {
|
|
14
|
-
const width = useMemo(() => {
|
|
15
|
-
// When rectangle, lets vary the width a bit so things are
|
|
16
|
-
// a little less... uniform. Variety is nice.
|
|
17
|
-
if (shape === 'rectangle' && typeof baseWidth === 'number' && (!(options !== null && options !== void 0 && options.disableRandomRectWidth) || (options === null || options === void 0 ? void 0 : options.rectWidthVariant) !== undefined)) {
|
|
18
|
-
const modifier = (options === null || options === void 0 ? void 0 : options.rectWidthVariant) !== undefined ? WIDTH_MODIFIERS[options.rectWidthVariant % WIDTH_MODIFIERS.length] : Math.random();
|
|
19
|
-
const quarter = Math.round(baseWidth / 4);
|
|
20
|
-
const min = Math.max(baseWidth - quarter, 1);
|
|
21
|
-
const max = baseWidth + quarter;
|
|
22
|
-
return Math.floor(modifier * (max - min + 1)) + min;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// All other shapes need a fixed aspect ratio
|
|
26
|
-
return baseWidth;
|
|
27
|
-
}, [baseWidth, options, shape]);
|
|
28
|
-
const borderRadius = useMemo(() => {
|
|
29
|
-
if (shape === 'circle' && Number.isInteger(width)) {
|
|
30
|
-
return Number(width) / 2;
|
|
31
|
-
}
|
|
32
|
-
return shape === 'squircle' ? 8 : 0;
|
|
33
|
-
}, [shape, width]);
|
|
34
|
-
return useMemo(() => ({
|
|
35
|
-
borderRadius,
|
|
36
|
-
width
|
|
37
|
-
}), [borderRadius, width]);
|
|
38
|
-
}
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
39
13
|
const fallbackCss = "fallbackCss-f1n296p1";
|
|
14
|
+
const visuallyHiddenCss = "visuallyHiddenCss-v1e56i3u";
|
|
40
15
|
export const fallbackDefaultElement = 'div';
|
|
41
16
|
export const Fallback = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
42
17
|
let {
|
|
@@ -46,7 +21,8 @@ export const Fallback = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =>
|
|
|
46
21
|
width: baseWidth,
|
|
47
22
|
percentage,
|
|
48
23
|
disableRandomRectWidth,
|
|
49
|
-
rectWidthVariant
|
|
24
|
+
rectWidthVariant,
|
|
25
|
+
accessibilityLabel = 'Loading'
|
|
50
26
|
} = _ref,
|
|
51
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
52
28
|
const Component = as !== null && as !== void 0 ? as : fallbackDefaultElement;
|
|
@@ -65,19 +41,24 @@ export const Fallback = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =>
|
|
|
65
41
|
height,
|
|
66
42
|
borderRadius
|
|
67
43
|
}), [percentage, width, backgroundSizeHeight, height, borderRadius]);
|
|
68
|
-
return /*#__PURE__*/
|
|
44
|
+
return /*#__PURE__*/_jsxs(Box, _objectSpread(_objectSpread({
|
|
69
45
|
ref: ref,
|
|
70
46
|
as: Component,
|
|
71
47
|
flexGrow: 0,
|
|
72
48
|
flexShrink: 0,
|
|
49
|
+
position: "relative",
|
|
73
50
|
width: percentage && typeof width === 'number' ? "".concat(Math.min(width, 100), "%") : width
|
|
74
51
|
}, props), {}, {
|
|
75
|
-
children: /*#__PURE__*/_jsx(
|
|
52
|
+
children: [accessibilityLabel && /*#__PURE__*/_jsx("span", {
|
|
53
|
+
className: visuallyHiddenCss,
|
|
54
|
+
children: accessibilityLabel
|
|
55
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
56
|
+
"aria-hidden": "true",
|
|
76
57
|
className: fallbackCss,
|
|
77
|
-
style: style
|
|
78
|
-
|
|
79
|
-
})
|
|
58
|
+
style: style
|
|
59
|
+
})]
|
|
80
60
|
}));
|
|
81
61
|
}));
|
|
82
62
|
Fallback.displayName = 'Fallback';
|
|
63
|
+
export { useFallbackShape };
|
|
83
64
|
import "./Fallback.css";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
.contain-ct639h6{object-fit:contain;}
|
|
4
4
|
.hexagonOverflowCss-h106avb5{overflow:visible;}
|
|
5
5
|
.fallbackCss-fmd7ixe{background-repeat:no-repeat;background-size:cover;background-position:center;}.light .fallbackCss-fmd7ixe{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IiM1QjYxNkUiLz4KPGNpcmNsZSBjeD0iMTYiIGN5PSIxNSIgcj0iMyIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeD0iMTEiIHk9IjYiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik01IDE1TDguNSA5TDEyIDE1SDVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K);}.dark .fallbackCss-fmd7ixe{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IiM4QTkxOUUiLz4KPGNpcmNsZSBjeD0iMTYiIGN5PSIxNSIgcj0iMyIgZmlsbD0iIzBBMEIwRCIvPgo8cmVjdCB4PSIxMSIgeT0iNiIgd2lkdGg9IjUiIGhlaWdodD0iNSIgZmlsbD0iIzBBMEIwRCIvPgo8cGF0aCBkPSJNNSAxNUw4LjUgOUwxMiAxNUg1WiIgZmlsbD0iIzBBMEIwRCIvPgo8L3N2Zz4K);}
|
|
6
|
-
.circle-c1oh4yoq{border-radius:
|
|
6
|
+
.circle-c1oh4yoq{border-radius:100000px;}
|
|
7
7
|
.squircle-s1exwfs9{border-radius:8px;}
|
|
8
8
|
.square-s117wpuw{border-radius:4px;}
|
|
9
|
-
.rectangle-r18cj7oi{border-radius:
|
|
10
|
-
.hexagon-h4bc24o{border-radius:
|
|
9
|
+
.rectangle-r18cj7oi{border-radius:0px;}
|
|
10
|
+
.hexagon-h4bc24o{border-radius:0px;}}
|
package/esm/media/RemoteImage.js
CHANGED
|
@@ -8,6 +8,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
9
|
import React, { memo, useMemo } from 'react';
|
|
10
10
|
import { remoteImageDarkFallbackSrc, remoteImageLightFallbackSrc } from '@coinbase/cds-common/media/remoteImageFallbackSrc';
|
|
11
|
+
import { shapeBorderRadius } from '@coinbase/cds-common/tokens/borderRadius';
|
|
11
12
|
import { cx } from '../cx';
|
|
12
13
|
import { Box } from '../layout/Box';
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer cds{.circle-cat65m8{border-radius:100%;}
|
|
2
2
|
.square-s4x9tgq{border-radius:4px;}
|
|
3
|
-
.hexagon-h112niag{border-radius:
|
|
3
|
+
.hexagon-h112niag{border-radius:0px;}
|
|
4
4
|
.squircle-s8clfq8{border-radius:8px;}
|
|
5
|
-
.rectangle-ra2rof2{border-radius:
|
|
5
|
+
.rectangle-ra2rof2{border-radius:0px;}
|
|
6
6
|
.isolateCss-i1shf7o1{isolation:isolate;}
|
|
7
7
|
.excessContainerCss-e1lnj2ws{box-sizing:content-box;}}
|
|
@@ -7,6 +7,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
9
|
import React, { Children, isValidElement, useMemo } from 'react';
|
|
10
|
+
import { shapeBorderRadius } from '@coinbase/cds-common/tokens/borderRadius';
|
|
10
11
|
import { cx } from '../cx';
|
|
11
12
|
import { useTheme } from '../hooks/useTheme';
|
|
12
13
|
import { Box } from '../layout/Box';
|
|
@@ -101,7 +101,7 @@ export const Popover = /*#__PURE__*/memo(_ref => {
|
|
|
101
101
|
children: content
|
|
102
102
|
}))
|
|
103
103
|
})
|
|
104
|
-
})), [setPopper, popperStyles.popper, popperAttributes.popper, handleCaptureEvents,
|
|
104
|
+
})), [setPopper, popperStyles.popper, popperAttributes.popper, handleCaptureEvents, autoFocusDelay, disableAutoFocus, disableFocusTrap, disableTypeFocus, focusTabIndexElements, handleClose, respectNegativeTabIndex, restoreFocusOnUnmount, testID, controlledElementAccessibilityProps, content]);
|
|
105
105
|
const renderContent = hasHoverInteractions ? memoizedContent : /*#__PURE__*/_jsx(Box, {
|
|
106
106
|
"aria-label": accessibilityLabel,
|
|
107
107
|
"aria-modal": "true",
|
|
@@ -115,12 +115,12 @@ export const Popover = /*#__PURE__*/memo(_ref => {
|
|
|
115
115
|
const Wrapper = invertColorScheme ? InvertedThemeProvider : React.Fragment;
|
|
116
116
|
return /*#__PURE__*/_jsxs("div", {
|
|
117
117
|
className: block ? blockCss : undefined,
|
|
118
|
+
onBlur: onBlur,
|
|
118
119
|
onMouseEnter: disabled ? undefined : onMouseEnter,
|
|
119
120
|
onMouseLeave: disabled ? undefined : onMouseLeave,
|
|
120
121
|
children: [/*#__PURE__*/_jsx("div", {
|
|
121
122
|
ref: setSubject,
|
|
122
123
|
className: cx(subjectCss, block && blockCss),
|
|
123
|
-
onBlur: onBlur,
|
|
124
124
|
onClick: disabled ? undefined : onPressSubject,
|
|
125
125
|
onFocus: disabled ? undefined : onFocus,
|
|
126
126
|
onMouseDown: disabled ? undefined : onMouseDown,
|
|
@@ -14,14 +14,15 @@ export const Tooltip = _ref => {
|
|
|
14
14
|
elevation,
|
|
15
15
|
placement = 'top',
|
|
16
16
|
gap = 1,
|
|
17
|
-
disablePortal,
|
|
18
17
|
testID,
|
|
19
18
|
zIndex,
|
|
20
19
|
tooltipId: tooltipIdDefault,
|
|
21
20
|
visible,
|
|
21
|
+
hasInteractiveContent,
|
|
22
22
|
invertColorScheme = true,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
disableAutoFocus = hasInteractiveContent,
|
|
24
|
+
disableFocusTrap = hasInteractiveContent,
|
|
25
|
+
disablePortal = hasInteractiveContent,
|
|
25
26
|
disableTypeFocus,
|
|
26
27
|
focusTabIndexElements,
|
|
27
28
|
respectNegativeTabIndex,
|
|
@@ -50,14 +51,31 @@ export const Tooltip = _ref => {
|
|
|
50
51
|
}
|
|
51
52
|
}, [handleOnMouseEnter]);
|
|
52
53
|
const clonedChild = useMemo(() => {
|
|
53
|
-
|
|
54
|
+
const isStringContent = typeof content === 'string';
|
|
55
|
+
return /*#__PURE__*/cloneElement(children,
|
|
56
|
+
// String content: Use only aria-label so the trigger is announced on focus without
|
|
57
|
+
// double announcement (aria-describedby would point to the same text when the tooltip is open).
|
|
58
|
+
// Non-string content: Use only aria-describedby to associate the visible tooltip (id=tooltipId).
|
|
59
|
+
// We cannot use aria-label here (it accepts only strings). May not announce on focus for
|
|
60
|
+
// non-button triggers due to timing (describedby target mounts when tooltip opens).
|
|
61
|
+
isStringContent ? {
|
|
62
|
+
'aria-label': content
|
|
63
|
+
} : {
|
|
54
64
|
'aria-describedby': tooltipId
|
|
55
65
|
});
|
|
56
|
-
}, [children, tooltipId]);
|
|
66
|
+
}, [children, content, tooltipId]);
|
|
57
67
|
const contentPosition = useMemo(() => ({
|
|
58
68
|
placement
|
|
59
69
|
}), [placement]);
|
|
60
70
|
const isVisible = useMemo(() => visible !== false && isOpen, [visible, isOpen]);
|
|
71
|
+
const handleBlur = useCallback(event => {
|
|
72
|
+
const relatedTarget = event === null || event === void 0 ? void 0 : event.relatedTarget;
|
|
73
|
+
const currentTarget = event === null || event === void 0 ? void 0 : event.currentTarget;
|
|
74
|
+
if (relatedTarget && currentTarget !== null && currentTarget !== void 0 && currentTarget.contains(relatedTarget)) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
handleOnBlur();
|
|
78
|
+
}, [handleOnBlur]);
|
|
61
79
|
return /*#__PURE__*/_jsx(Popover, {
|
|
62
80
|
autoFocusDelay: autoFocusDelay,
|
|
63
81
|
content: /*#__PURE__*/_jsx(TooltipContent, {
|
|
@@ -77,7 +95,7 @@ export const Tooltip = _ref => {
|
|
|
77
95
|
disableTypeFocus: disableTypeFocus,
|
|
78
96
|
focusTabIndexElements: focusTabIndexElements,
|
|
79
97
|
invertColorScheme: invertColorScheme,
|
|
80
|
-
onBlur:
|
|
98
|
+
onBlur: handleBlur,
|
|
81
99
|
onFocus: handleOnFocus,
|
|
82
100
|
onMouseDown: preventMouseDown,
|
|
83
101
|
onMouseEnter: handleMouseEnter,
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@layer cds{.
|
|
1
|
+
@layer cds{.visuallyHiddenCss-v1l01hi5{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;-webkit-clip:rect(0,0,0,0);clip:rect(0,0,0,0);white-space:nowrap;border:0;}
|
|
2
|
+
.tableCellCss-t189mbuy{padding:0;margin:0;vertical-align:middle;border:none;}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["title", "start", "end", "subtitle", "testID", "as", "outerSpacing", "innerSpacing", "disableRandomRectWidth", "rectWidthVariant"];
|
|
1
|
+
const _excluded = ["title", "start", "end", "subtitle", "testID", "as", "outerSpacing", "innerSpacing", "disableRandomRectWidth", "rectWidthVariant", "accessibilityLabel"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -6,14 +6,15 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
-
import
|
|
9
|
+
import { memo } from 'react';
|
|
10
10
|
import { getRectWidthVariant } from '@coinbase/cds-common/utils/getRectWidthVariant';
|
|
11
11
|
import { Cell } from '../cells/Cell';
|
|
12
12
|
import { MediaFallback } from '../cells/MediaFallback';
|
|
13
13
|
import { Fallback } from '../layout';
|
|
14
14
|
import { useTableCellSpacing, useTableCellTag, useTableContext } from './hooks/useTable';
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
const
|
|
16
|
+
const visuallyHiddenCss = "visuallyHiddenCss-v1l01hi5";
|
|
17
|
+
const tableCellCss = "tableCellCss-t189mbuy";
|
|
17
18
|
export const TableCellFallback = /*#__PURE__*/memo(_ref => {
|
|
18
19
|
let {
|
|
19
20
|
title,
|
|
@@ -25,7 +26,8 @@ export const TableCellFallback = /*#__PURE__*/memo(_ref => {
|
|
|
25
26
|
outerSpacing,
|
|
26
27
|
innerSpacing,
|
|
27
28
|
disableRandomRectWidth,
|
|
28
|
-
rectWidthVariant
|
|
29
|
+
rectWidthVariant,
|
|
30
|
+
accessibilityLabel = 'Loading Cell'
|
|
29
31
|
} = _ref,
|
|
30
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
33
|
const TableCellComponent = useTableCellTag(as);
|
|
@@ -46,17 +48,24 @@ export const TableCellFallback = /*#__PURE__*/memo(_ref => {
|
|
|
46
48
|
}, props), {}, {
|
|
47
49
|
children: /*#__PURE__*/_jsxs(Cell, {
|
|
48
50
|
accessory: end && /*#__PURE__*/_jsx(MediaFallback, {
|
|
51
|
+
"aria-hidden": true,
|
|
49
52
|
testID: "table-cell-fallback-accessory",
|
|
50
53
|
type: end
|
|
51
54
|
}),
|
|
52
55
|
gap: cellGap,
|
|
53
56
|
innerSpacing: cellInnerSpacing,
|
|
54
57
|
media: start && /*#__PURE__*/_jsx(MediaFallback, {
|
|
58
|
+
"aria-hidden": true,
|
|
55
59
|
testID: "table-cell-fallback-media",
|
|
56
60
|
type: start
|
|
57
61
|
}),
|
|
58
62
|
outerSpacing: cellOuterSpacing,
|
|
59
|
-
|
|
63
|
+
position: "relative",
|
|
64
|
+
children: [accessibilityLabel && /*#__PURE__*/_jsx("span", {
|
|
65
|
+
className: visuallyHiddenCss,
|
|
66
|
+
children: accessibilityLabel
|
|
67
|
+
}), title && /*#__PURE__*/_jsx(Fallback, {
|
|
68
|
+
"aria-hidden": true,
|
|
60
69
|
percentage: true,
|
|
61
70
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
62
71
|
height: 24,
|
|
@@ -64,6 +73,7 @@ export const TableCellFallback = /*#__PURE__*/memo(_ref => {
|
|
|
64
73
|
testID: "table-cell-fallback-title",
|
|
65
74
|
width: 45
|
|
66
75
|
}), subtitle && /*#__PURE__*/_jsx(Fallback, {
|
|
76
|
+
"aria-hidden": true,
|
|
67
77
|
percentage: true,
|
|
68
78
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
69
79
|
height: 16,
|
|
@@ -5,7 +5,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import React, { forwardRef, memo } from 'react';
|
|
7
7
|
import { animateProgressBaseSpec } from '@coinbase/cds-common/animation/progress';
|
|
8
|
-
import { usePreviousValues } from '@coinbase/cds-common/hooks/usePreviousValues';
|
|
9
8
|
import { useProgressSize } from '@coinbase/cds-common/visualizations/useProgressSize';
|
|
10
9
|
import { m as motion } from 'framer-motion';
|
|
11
10
|
import { cx } from '../cx';
|
|
@@ -16,7 +15,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
15
|
const MotionBox = motion(Box);
|
|
17
16
|
const boxCss = "boxCss-bnvjmt8";
|
|
18
17
|
export const ProgressBar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forwardedRef) => {
|
|
19
|
-
var _getPreviousPercent;
|
|
20
18
|
let {
|
|
21
19
|
weight = 'normal',
|
|
22
20
|
progress,
|
|
@@ -33,26 +31,22 @@ export const ProgressBar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forw
|
|
|
33
31
|
onAnimationStart
|
|
34
32
|
} = _ref;
|
|
35
33
|
const height = useProgressSize(weight);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
addPreviousPercent(progress);
|
|
41
|
-
const previousPercent = (_getPreviousPercent = getPreviousPercent()) !== null && _getPreviousPercent !== void 0 ? _getPreviousPercent : 0;
|
|
42
|
-
const translateXStart = isRtl() ? 100 - previousPercent * 100 : -100 + previousPercent * 100;
|
|
43
|
-
const translateXEnd = isRtl() ? 100 - progress * 100 : -100 + progress * 100;
|
|
34
|
+
|
|
35
|
+
// start position of the progress bar on mount
|
|
36
|
+
const initialTranslateX = isRtl() ? 100 : -100;
|
|
37
|
+
const translateX = isRtl() ? 100 - progress * 100 : -100 + progress * 100;
|
|
44
38
|
const motionProps = useMotionProps({
|
|
45
39
|
style: {
|
|
46
40
|
originX: isRtl() ? 'right' : 'left'
|
|
47
41
|
},
|
|
48
42
|
animate: {
|
|
49
|
-
x:
|
|
43
|
+
x: "".concat(translateX, "%"),
|
|
50
44
|
opacity: 1
|
|
51
45
|
},
|
|
52
46
|
transition: animateProgressBaseSpec,
|
|
53
|
-
initial: !progress ? false : {
|
|
54
|
-
x: "".concat(
|
|
55
|
-
} // skip initial animation if no progress
|
|
47
|
+
initial: !progress || disableAnimateOnMount ? false : {
|
|
48
|
+
x: "".concat(initialTranslateX, "%")
|
|
49
|
+
} // skip initial animation if no progress or disableAnimateOnMount is true
|
|
56
50
|
});
|
|
57
51
|
return /*#__PURE__*/_jsx(HStack, {
|
|
58
52
|
ref: forwardedRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.52.0",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"react-dom": "^18.3.1"
|
|
208
208
|
},
|
|
209
209
|
"dependencies": {
|
|
210
|
-
"@coinbase/cds-common": "^8.
|
|
210
|
+
"@coinbase/cds-common": "^8.52.0",
|
|
211
211
|
"@coinbase/cds-icons": "^5.12.0",
|
|
212
212
|
"@coinbase/cds-illustrations": "^4.32.0",
|
|
213
213
|
"@coinbase/cds-lottie-files": "^3.3.4",
|