@dxos/react-ui-stack 0.8.4-main.84f28bd → 0.8.4-main.9735255
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +753 -1001
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{testing → playwright}/index.mjs +5 -1
- package/dist/lib/browser/{testing → playwright}/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +753 -1001
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{testing → playwright}/index.mjs +5 -1
- package/dist/lib/node-esm/{testing → playwright}/index.mjs.map +3 -3
- package/dist/types/src/{exemplars → components}/CardStack/CardStack.d.ts +20 -13
- package/dist/types/src/components/CardStack/CardStack.d.ts.map +1 -0
- package/dist/types/src/components/CardStack/CardStack.stories.d.ts +15 -0
- package/dist/types/src/components/CardStack/CardStack.stories.d.ts.map +1 -0
- package/dist/types/src/{exemplars → components}/CardStack/CardStackDragPreview.d.ts +1 -1
- package/dist/types/src/components/CardStack/CardStackDragPreview.d.ts.map +1 -0
- package/dist/types/src/components/CardStack/index.d.ts.map +1 -0
- package/dist/types/src/components/Stack/Stack.d.ts +15 -7
- package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack/Stack.stories.d.ts +12 -3
- package/dist/types/src/components/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackContext.d.ts +2 -1
- package/dist/types/src/components/StackContext.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.d.ts +9 -12
- package/dist/types/src/components/StackItem/StackItem.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts +13 -5
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemContent.d.ts +4 -37
- package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemSigil.d.ts +2 -2
- package/dist/types/src/components/StackItem/StackItemSigil.d.ts.map +1 -1
- package/dist/types/src/components/deprecated/LayoutControls.d.ts +3 -0
- package/dist/types/src/components/deprecated/LayoutControls.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/{defs.d.ts → types.d.ts} +1 -1
- package/dist/types/src/components/types.d.ts.map +1 -0
- package/dist/types/src/hooks/useStackDropForElements.d.ts +9 -7
- package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playwright/index.d.ts.map +1 -0
- package/dist/types/src/playwright/stack-manager.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -39
- package/src/{exemplars → components}/CardStack/CardStack.stories.tsx +19 -18
- package/src/{exemplars → components}/CardStack/CardStack.tsx +114 -54
- package/src/{exemplars → components}/CardStack/CardStackDragPreview.tsx +3 -3
- package/src/components/Stack/Stack.stories.tsx +8 -9
- package/src/components/Stack/Stack.tsx +225 -26
- package/src/components/StackContext.tsx +2 -1
- package/src/components/StackItem/StackItem.stories.tsx +19 -15
- package/src/components/StackItem/StackItem.tsx +49 -29
- package/src/components/StackItem/StackItemContent.tsx +19 -40
- package/src/components/StackItem/StackItemHeading.tsx +5 -9
- package/src/components/StackItem/StackItemResizeHandle.tsx +2 -1
- package/src/components/StackItem/StackItemSigil.tsx +5 -4
- package/src/components/deprecated/LayoutControls.tsx +3 -0
- package/src/components/index.ts +2 -1
- package/src/hooks/useStackDropForElements.ts +59 -45
- package/src/index.ts +0 -3
- package/src/{testing → playwright}/index.ts +1 -1
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/smoke.spec.ts +1 -1
- package/src/translations.ts +1 -1
- package/dist/types/src/components/defs.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/Card.d.ts +0 -57
- package/dist/types/src/exemplars/Card/Card.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/Card.stories.d.ts +0 -13
- package/dist/types/src/exemplars/Card/Card.stories.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/CardDragPreview.d.ts +0 -6
- package/dist/types/src/exemplars/Card/CardDragPreview.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/fragments.d.ts +0 -12
- package/dist/types/src/exemplars/Card/fragments.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/index.d.ts +0 -4
- package/dist/types/src/exemplars/Card/index.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStack.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts +0 -9
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStackDragPreview.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/index.d.ts.map +0 -1
- package/dist/types/src/exemplars/index.d.ts +0 -3
- package/dist/types/src/exemplars/index.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/stack-manager.d.ts.map +0 -1
- package/src/exemplars/Card/Card.stories.tsx +0 -78
- package/src/exemplars/Card/Card.tsx +0 -167
- package/src/exemplars/Card/CardDragPreview.tsx +0 -22
- package/src/exemplars/Card/fragments.ts +0 -23
- package/src/exemplars/Card/index.ts +0 -7
- package/src/exemplars/index.ts +0 -6
- /package/dist/types/src/{exemplars → components}/CardStack/index.d.ts +0 -0
- /package/dist/types/src/{testing → playwright}/index.d.ts +0 -0
- /package/dist/types/src/{testing → playwright}/stack-manager.d.ts +0 -0
- /package/src/{exemplars → components}/CardStack/index.ts +0 -0
- /package/src/components/{defs.ts → types.ts} +0 -0
- /package/src/{testing → playwright}/stack-manager.ts +0 -0
|
@@ -5,70 +5,47 @@
|
|
|
5
5
|
import React, { type ComponentPropsWithoutRef, forwardRef, useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
8
|
-
import { mx } from '@dxos/
|
|
8
|
+
import { mx } from '@dxos/ui-theme';
|
|
9
9
|
|
|
10
10
|
import { useStack, useStackItem } from '../StackContext';
|
|
11
11
|
|
|
12
|
-
export type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
13
|
-
/**
|
|
14
|
-
* This flag is required in order to clarify a developer experience that seemed like it needed extra boilerplate
|
|
15
|
-
* (`row-span-2`) or was buggy. See the description of the StackItem.Content component itself for more information.
|
|
16
|
-
*/
|
|
12
|
+
export type StackItemContentProps = ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'role' | 'scrollable'>> & {
|
|
17
13
|
toolbar?: boolean;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Whether to provide for the layout of a statusbar after the content.
|
|
21
|
-
*/
|
|
22
14
|
statusbar?: boolean;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Whether the consumer intends to do something custom and typical affordances should not apply
|
|
26
|
-
*/
|
|
27
|
-
layoutManaged?: boolean;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for
|
|
31
|
-
* convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.
|
|
32
|
-
*/
|
|
33
|
-
size?: 'intrinsic' | 'video' | 'square';
|
|
34
15
|
};
|
|
35
16
|
|
|
36
17
|
/**
|
|
37
|
-
* This component should be used by plugins for rendering content within a stack item
|
|
38
|
-
* The `toolbar` flag must be provided since this component provides for the layout of content with the toolbar.
|
|
18
|
+
* This component should be used by plugins for rendering content within a stack item (i.e., a “plank” or “section”).
|
|
39
19
|
*/
|
|
40
20
|
export const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(
|
|
41
|
-
({ children, toolbar, statusbar,
|
|
21
|
+
({ classNames, children, toolbar, statusbar, ...props }, forwardedRef) => {
|
|
42
22
|
const { size: stackItemSize } = useStack();
|
|
43
23
|
const { role } = useStackItem();
|
|
44
24
|
const style = useMemo(
|
|
45
|
-
() =>
|
|
46
|
-
|
|
47
|
-
?
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
].join(' '),
|
|
54
|
-
},
|
|
55
|
-
[toolbar, statusbar, layoutManaged],
|
|
25
|
+
() => ({
|
|
26
|
+
gridTemplateRows: [
|
|
27
|
+
...(toolbar ? [role === 'section' ? 'calc(var(--toolbar-size) - 1px)' : 'var(--toolbar-size)'] : []),
|
|
28
|
+
'1fr',
|
|
29
|
+
...(statusbar ? ['var(--statusbar-size)'] : []),
|
|
30
|
+
].join(' '),
|
|
31
|
+
}),
|
|
32
|
+
[toolbar, statusbar],
|
|
56
33
|
);
|
|
34
|
+
|
|
57
35
|
return (
|
|
58
36
|
<div
|
|
59
|
-
role='none'
|
|
60
37
|
{...props}
|
|
38
|
+
role='none'
|
|
39
|
+
style={style}
|
|
61
40
|
className={mx(
|
|
62
|
-
'group grid grid-cols-[100%]',
|
|
41
|
+
'group grid grid-cols-[100%] density-coarse',
|
|
63
42
|
stackItemSize === 'contain' && 'min-bs-0 overflow-hidden',
|
|
64
|
-
size === 'video' ? 'aspect-video' : size === 'square' && 'aspect-square',
|
|
65
|
-
toolbar && '[&_.dx-toolbar]:relative [&_.dx-toolbar]:border-be [&_.dx-toolbar]:border-subduedSeparator',
|
|
66
43
|
role === 'section' &&
|
|
67
44
|
toolbar &&
|
|
68
45
|
'[&_.dx-toolbar]:sticky [&_.dx-toolbar]:z-[1] [&_.dx-toolbar]:block-start-0 [&_.dx-toolbar]:-mbe-px [&_.dx-toolbar]:min-is-0',
|
|
46
|
+
toolbar && '[&>.dx-toolbar]:relative [&>.dx-toolbar]:border-be [&>.dx-toolbar]:border-subduedSeparator',
|
|
69
47
|
classNames,
|
|
70
48
|
)}
|
|
71
|
-
style={style}
|
|
72
49
|
data-popover-collision-boundary={true}
|
|
73
50
|
ref={forwardedRef}
|
|
74
51
|
>
|
|
@@ -77,3 +54,5 @@ export const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps
|
|
|
77
54
|
);
|
|
78
55
|
},
|
|
79
56
|
);
|
|
57
|
+
|
|
58
|
+
StackItemContent.displayName = 'StackItemContent';
|
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { useFocusableGroup } from '@fluentui/react-tabster';
|
|
6
5
|
import { Slot } from '@radix-ui/react-slot';
|
|
7
6
|
import React, {
|
|
8
|
-
type ComponentPropsWithoutRef,
|
|
9
7
|
type ComponentPropsWithRef,
|
|
10
|
-
|
|
8
|
+
type ComponentPropsWithoutRef,
|
|
11
9
|
type PropsWithChildren,
|
|
10
|
+
forwardRef,
|
|
12
11
|
} from 'react';
|
|
13
12
|
|
|
14
13
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
15
|
-
import {
|
|
16
|
-
import { mx } from '@dxos/
|
|
14
|
+
import { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';
|
|
15
|
+
import { mx } from '@dxos/ui-theme';
|
|
17
16
|
|
|
18
17
|
import { useStack } from '../StackContext';
|
|
19
18
|
|
|
@@ -30,7 +29,6 @@ export const StackItemHeading = ({
|
|
|
30
29
|
...props
|
|
31
30
|
}: StackItemHeadingProps) => {
|
|
32
31
|
const { orientation } = useStack();
|
|
33
|
-
const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });
|
|
34
32
|
|
|
35
33
|
const Root = asChild ? Slot : 'div';
|
|
36
34
|
|
|
@@ -38,10 +36,8 @@ export const StackItemHeading = ({
|
|
|
38
36
|
<Root
|
|
39
37
|
role='heading'
|
|
40
38
|
{...props}
|
|
41
|
-
tabIndex={0}
|
|
42
|
-
{...focusableGroupAttrs}
|
|
43
39
|
className={mx(
|
|
44
|
-
'flex items-center
|
|
40
|
+
'flex items-center !border-is-0 bg-headerSurface',
|
|
45
41
|
separateOnScroll
|
|
46
42
|
? 'border-transparent [[data-scroll-separator="true"]_&]:border-subduedSeparator'
|
|
47
43
|
: 'border-subduedSeparator',
|
|
@@ -6,9 +6,10 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { ResizeHandle } from '@dxos/react-ui-dnd';
|
|
8
8
|
|
|
9
|
-
import { DEFAULT_EXTRINSIC_SIZE } from './StackItem';
|
|
10
9
|
import { useStack, useStackItem } from '../StackContext';
|
|
11
10
|
|
|
11
|
+
import { DEFAULT_EXTRINSIC_SIZE } from './StackItem';
|
|
12
|
+
|
|
12
13
|
const MIN_WIDTH = 20;
|
|
13
14
|
const MIN_HEIGHT = 3;
|
|
14
15
|
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { Fragment, type PropsWithChildren, forwardRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Node } from '@dxos/app-graph';
|
|
8
8
|
import { keySymbols } from '@dxos/keyboard';
|
|
9
9
|
import { Button, type ButtonProps, DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';
|
|
11
|
-
import { descriptionText, mx } from '@dxos/
|
|
11
|
+
import { descriptionText, mx } from '@dxos/ui-theme';
|
|
12
12
|
import { getHostPlatform } from '@dxos/util';
|
|
13
13
|
|
|
14
|
-
import { MenuSignifierHorizontal } from './MenuSignifier';
|
|
15
14
|
import { translationKey } from '../../translations';
|
|
16
15
|
|
|
16
|
+
import { MenuSignifierHorizontal } from './MenuSignifier';
|
|
17
|
+
|
|
17
18
|
export type KeyBinding = {
|
|
18
19
|
windows?: string;
|
|
19
20
|
macos?: string;
|
|
@@ -22,7 +23,7 @@ export type KeyBinding = {
|
|
|
22
23
|
unknown?: string;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
export type StackItemSigilAction = Pick<ActionLike, 'id' | 'properties' | 'data'>;
|
|
26
|
+
export type StackItemSigilAction = Pick<Node.ActionLike, 'id' | 'properties' | 'data'>;
|
|
26
27
|
|
|
27
28
|
export type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> &
|
|
28
29
|
AttendableId &
|
|
@@ -30,6 +30,9 @@ const LayoutControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'>
|
|
|
30
30
|
return <IconButton iconOnly icon={icon} label={label} tooltipSide='bottom' variant='ghost' {...props} />;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated
|
|
35
|
+
*/
|
|
33
36
|
export const LayoutControls = forwardRef<HTMLDivElement, LayoutControlsProps>(
|
|
34
37
|
(
|
|
35
38
|
{ onClick, variant = 'default', capabilities: can, isSolo, pin, close = false, children, ...props },
|
package/src/components/index.ts
CHANGED
|
@@ -8,70 +8,84 @@ import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-sc
|
|
|
8
8
|
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
9
9
|
import { useLayoutEffect, useState } from 'react';
|
|
10
10
|
|
|
11
|
-
import { type
|
|
11
|
+
import { type Orientation, type StackItemData, type StackItemRearrangeHandler } from '../components';
|
|
12
|
+
|
|
13
|
+
const noop = () => {};
|
|
14
|
+
|
|
15
|
+
export type UseStackDropForElementsProps = {
|
|
16
|
+
id?: string;
|
|
17
|
+
element: HTMLDivElement | null;
|
|
18
|
+
scrollElement?: HTMLDivElement | null;
|
|
19
|
+
orientation: Orientation;
|
|
20
|
+
selfDroppable: boolean;
|
|
21
|
+
onRearrange?: StackItemRearrangeHandler;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type UseStackDropForElements = {
|
|
25
|
+
dropping: boolean;
|
|
26
|
+
};
|
|
12
27
|
|
|
13
28
|
/**
|
|
14
|
-
* Hook to handle drag
|
|
29
|
+
* Hook to handle drag-and-drop functionality for Stack components.
|
|
15
30
|
*/
|
|
16
31
|
export const useStackDropForElements = ({
|
|
17
32
|
id,
|
|
18
33
|
element,
|
|
19
34
|
scrollElement = element,
|
|
20
|
-
selfDroppable,
|
|
21
35
|
orientation,
|
|
36
|
+
selfDroppable,
|
|
22
37
|
onRearrange,
|
|
23
|
-
}: {
|
|
24
|
-
id?: string;
|
|
25
|
-
element: HTMLDivElement | null;
|
|
26
|
-
scrollElement?: HTMLDivElement | null;
|
|
27
|
-
selfDroppable: boolean;
|
|
28
|
-
orientation: Orientation;
|
|
29
|
-
onRearrange?: StackItemRearrangeHandler;
|
|
30
|
-
}) => {
|
|
38
|
+
}: UseStackDropForElementsProps): UseStackDropForElements => {
|
|
31
39
|
const [dropping, setDropping] = useState(false);
|
|
32
40
|
|
|
33
41
|
useLayoutEffect(() => {
|
|
34
|
-
if (!element
|
|
42
|
+
if (!element) {
|
|
35
43
|
return;
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
const acceptSourceType = orientation === 'horizontal' ? 'column' : 'card';
|
|
39
47
|
|
|
48
|
+
// TODO(burdon): Use monitor?
|
|
40
49
|
return combine(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
selfDroppable
|
|
51
|
+
? dropTargetForElements({
|
|
52
|
+
element,
|
|
53
|
+
getData: ({ input, element }) => {
|
|
54
|
+
return attachClosestEdge(
|
|
55
|
+
{ id, type: orientation === 'horizontal' ? 'card' : 'column' },
|
|
56
|
+
{ input, element, allowedEdges: [orientation === 'horizontal' ? 'left' : 'top'] },
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
onDragEnter: ({ source }) => {
|
|
60
|
+
if (source.data.type === acceptSourceType) {
|
|
61
|
+
setDropping(true);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
onDrag: ({ source }) => {
|
|
65
|
+
if (source.data.type === acceptSourceType) {
|
|
66
|
+
setDropping(true);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
onDragLeave: () => {
|
|
70
|
+
return setDropping(false);
|
|
71
|
+
},
|
|
72
|
+
onDrop: ({ self, source }) => {
|
|
73
|
+
setDropping(false);
|
|
74
|
+
if (source.data.type === acceptSourceType && selfDroppable && onRearrange) {
|
|
75
|
+
onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
})
|
|
79
|
+
: noop,
|
|
80
|
+
|
|
81
|
+
scrollElement
|
|
82
|
+
? autoScrollForElements({
|
|
83
|
+
element: scrollElement,
|
|
84
|
+
getAllowedAxis: () => orientation,
|
|
85
|
+
})
|
|
86
|
+
: noop,
|
|
73
87
|
);
|
|
74
|
-
}, [element, scrollElement, selfDroppable, orientation,
|
|
88
|
+
}, [id, element, scrollElement, selfDroppable, orientation, onRearrange]);
|
|
75
89
|
|
|
76
90
|
return { dropping };
|
|
77
91
|
};
|
package/src/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default defineConfig({
|
|
|
10
10
|
...e2ePreset(import.meta.dirname),
|
|
11
11
|
// TODO(wittjosiah): Avoid hard-coding ports.
|
|
12
12
|
webServer: {
|
|
13
|
-
command: 'moon run storybook:serve-e2e -- --port=9003',
|
|
13
|
+
command: 'moon run storybook-react:serve-e2e -- --port=9003',
|
|
14
14
|
port: 9003,
|
|
15
15
|
reuseExistingServer: false,
|
|
16
16
|
},
|
package/src/translations.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../src/components/defs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAElF,OAAO,EAAE,KAAK,IAAI,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,MAAM,yBAAyB,CAAC,IAAI,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,IAAI,CACnF,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,IAAI,EACZ,WAAW,EAAE,IAAI,GAAG,IAAI,KACrB,IAAI,CAAC;AAEV,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { cardChrome, cardRoot, cardHeading, cardText, cardSpacing } from './fragments';
|
|
3
|
-
type CardPosterProps = {
|
|
4
|
-
alt: string;
|
|
5
|
-
aspect?: 'video' | 'auto';
|
|
6
|
-
} & Partial<{
|
|
7
|
-
image: string;
|
|
8
|
-
icon: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const Card: {
|
|
11
|
-
StaticRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
|
|
12
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
13
|
-
} & {
|
|
14
|
-
asChild?: boolean;
|
|
15
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
SurfaceRoot: ({ role, children }: PropsWithChildren<{
|
|
17
|
-
role?: string;
|
|
18
|
-
}>) => React.JSX.Element;
|
|
19
|
-
Heading: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
|
|
20
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
21
|
-
} & {
|
|
22
|
-
asChild?: boolean;
|
|
23
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
Toolbar: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toolbar").ToolbarProps, "className"> & {
|
|
25
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
26
|
-
} & {
|
|
27
|
-
layoutManaged?: boolean;
|
|
28
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
ToolbarIconButton: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
-
ToolbarSeparator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
|
|
31
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
32
|
-
} & {
|
|
33
|
-
subdued?: boolean;
|
|
34
|
-
} & {
|
|
35
|
-
variant?: "gap" | "line";
|
|
36
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
DragHandle: React.ForwardRefExoticComponent<{
|
|
38
|
-
toolbarItem?: boolean;
|
|
39
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
40
|
-
DragPreview: ({ children }: import("../..").StackItemDragPreviewProps) => React.ReactPortal | null;
|
|
41
|
-
Menu: React.FC<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
42
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
43
|
-
}>;
|
|
44
|
-
Poster: (props: CardPosterProps) => React.JSX.Element | undefined;
|
|
45
|
-
Chrome: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
|
|
46
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
47
|
-
} & {
|
|
48
|
-
asChild?: boolean;
|
|
49
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
Text: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
|
|
51
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
52
|
-
} & {
|
|
53
|
-
asChild?: boolean;
|
|
54
|
-
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
55
|
-
};
|
|
56
|
-
export { cardRoot, cardHeading, cardText, cardChrome, cardSpacing };
|
|
57
|
-
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/Card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAKZ,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAmFvF,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAgD7C,eAAO,MAAM,IAAI;;;;kBAlIqE,OAAO;;sCAmBtC,iBAAiB,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;;;;kBAnBL,OAAO;;;;;;;;;;;;;;;;sBA4DxB,OAAO;;;;;;oBAwBjD,eAAe;;;;kBApF4C,OAAO;;;;;kBAAP,OAAO;;CA+I5F,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
3
|
-
type CardStoryProps = {
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
image: string;
|
|
7
|
-
showImage: boolean;
|
|
8
|
-
showIcon: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare const meta: Meta<CardStoryProps>;
|
|
11
|
-
export default meta;
|
|
12
|
-
export declare const Default: StoryObj<CardStoryProps>;
|
|
13
|
-
//# sourceMappingURL=Card.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAWjE,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,cAAc,CAgC9B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,cAAc,CAgB5C,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
export declare const CardDragPreview: {
|
|
3
|
-
Root: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
|
|
4
|
-
Content: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=CardDragPreview.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardDragPreview.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/CardDragPreview.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AActD,eAAO,MAAM,eAAe;yBARe,iBAAiB,CAAC,EAAE,CAAC;4BAIlB,iBAAiB,CAAC,EAAE,CAAC;CAOlE,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const cardRoot = "rounded overflow-hidden bg-cardSurface border border-separator dark:border-subduedSeparator dx-focus-ring-group-y-indicator relative min-bs-[--rail-item] group/card";
|
|
2
|
-
export declare const cardSpacing = "pli-cardSpacingInline mlb-cardSpacingBlock";
|
|
3
|
-
export declare const labelSpacing = "mbs-inputSpacingBlock mbe-labelSpacingBlock";
|
|
4
|
-
export declare const cardDialogContent = "p-0 bs-content min-bs-[8rem] max-bs-full md:max-is-[32rem] overflow-hidden";
|
|
5
|
-
export declare const cardDialogHeader = "pli-cardSpacingInline mbs-cardSpacingBlock flex justify-between";
|
|
6
|
-
export declare const cardDialogOverflow = "overflow-y-auto min-bs-0 flex-1";
|
|
7
|
-
export declare const cardDialogPaddedOverflow = "overflow-y-auto min-bs-0 flex-1 plb-cardSpacingBlock";
|
|
8
|
-
export declare const cardDialogSearchListRoot = "pli-cardSpacingInline pbs-cardSpacingBlock [&>input]:mbe-0 min-bs-0 flex-1 flex flex-col";
|
|
9
|
-
export declare const cardText = "pli-cardSpacingInline mlb-cardSpacingBlock";
|
|
10
|
-
export declare const cardHeading = "text-lg font-medium line-clamp-2";
|
|
11
|
-
export declare const cardChrome = "pli-[--dx-cardSpacingChrome] mlb-[--dx-cardSpacingChrome] [&_.dx-button]:text-start [&_.dx-button]:is-full";
|
|
12
|
-
//# sourceMappingURL=fragments.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fragments.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/fragments.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,yKACmJ,CAAC;AAEzK,eAAO,MAAM,WAAW,+CAA+C,CAAC;AACxE,eAAO,MAAM,YAAY,gDAAgD,CAAC;AAE1E,eAAO,MAAM,iBAAiB,+EAA+E,CAAC;AAC9G,eAAO,MAAM,gBAAgB,oEAAoE,CAAC;AAClG,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AACpE,eAAO,MAAM,wBAAwB,yDAA+C,CAAC;AACrF,eAAO,MAAM,wBAAwB,6FACuD,CAAC;AAE7F,eAAO,MAAM,QAAQ,+CAAc,CAAC;AAEpC,eAAO,MAAM,WAAW,qCAAqC,CAAC;AAE9D,eAAO,MAAM,UAAU,+GACuF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardStack.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/CardStack.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAKzE,OAAO,EAA8C,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA+B/F,QAAA,MAAM,gBAAgB,qEAAqE,CAAC;AAgB5F,QAAA,MAAM,eAAe,8GACsF,CAAC;AAgB5G,QAAA,MAAM,gBAAgB,UAGrB,CAAC;AAgBF,QAAA,MAAM,aAAa,8BAA8B,CAAC;AAgBlD,QAAA,MAAM,aAAa,sEAAsE,CAAC;AAgB1F,eAAO,MAAM,SAAS;;;;kBAhHqE,OAAO;;;;;kBAAP,OAAO;;;;;;kBAAP,OAAO;;;;;kBAAP,OAAO;;;;;;;;kBAAP,OAAO;;CAwHjG,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
declare const CardStackStory: () => React.JSX.Element;
|
|
5
|
-
declare const meta: Meta<typeof CardStackStory>;
|
|
6
|
-
export default meta;
|
|
7
|
-
type Story = StoryObj<typeof CardStackStory>;
|
|
8
|
-
export declare const Default: Story;
|
|
9
|
-
//# sourceMappingURL=CardStack.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardStack.stories.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/CardStack.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAgC,MAAM,OAAO,CAAC;AAyBrD,QAAA,MAAM,cAAc,yBA8HnB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAIrC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardStackDragPreview.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/CardStackDragPreview.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKtD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA8CnD,eAAO,MAAM,oBAAoB;yBA3Ce,iBAAiB,CAAC,EAAE,CAAC;4BAUlB,iBAAiB,CAAC,EAAE,CAAC;yCAmBrE,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;2BAUF,iBAAiB,CAAC,EAAE,CAAC;CAStE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exemplars/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stack-manager.d.ts","sourceRoot":"","sources":["../../../../src/testing/stack-manager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAQ,MAAM,kBAAkB,CAAC;AAEtD,qBAAa,YAAY;IAGX,QAAQ,CAAC,OAAO,EAAE,OAAO;IAFrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;gBAER,OAAO,EAAE,OAAO;IAIrC,QAAQ,IAAI,OAAO;IAInB,KAAK;IAIL,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;CAGvC;AAED,qBAAa,cAAc;IAGb,QAAQ,CAAC,OAAO,EAAE,OAAO;IAFrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;gBAER,OAAO,EAAE,OAAO;IAI/B,EAAE,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI5B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,GAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAehG"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
|
|
10
|
-
import { faker } from '@dxos/random';
|
|
11
|
-
import { withTheme } from '@dxos/storybook-utils';
|
|
12
|
-
|
|
13
|
-
import { Card } from './Card';
|
|
14
|
-
|
|
15
|
-
// Set a seed for reproducible random values
|
|
16
|
-
faker.seed(0);
|
|
17
|
-
|
|
18
|
-
type CardStoryProps = {
|
|
19
|
-
title: string;
|
|
20
|
-
description: string;
|
|
21
|
-
image: string;
|
|
22
|
-
showImage: boolean;
|
|
23
|
-
showIcon: boolean;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const meta: Meta<CardStoryProps> = {
|
|
27
|
-
title: 'ui/react-ui-stack/Card',
|
|
28
|
-
decorators: [withTheme],
|
|
29
|
-
argTypes: {
|
|
30
|
-
title: {
|
|
31
|
-
control: 'text',
|
|
32
|
-
description: 'Card title',
|
|
33
|
-
},
|
|
34
|
-
description: {
|
|
35
|
-
control: 'text',
|
|
36
|
-
description: 'Card description',
|
|
37
|
-
},
|
|
38
|
-
image: {
|
|
39
|
-
control: 'text',
|
|
40
|
-
description: 'URL for the poster image',
|
|
41
|
-
},
|
|
42
|
-
showImage: {
|
|
43
|
-
control: 'boolean',
|
|
44
|
-
description: 'Whether to show the image',
|
|
45
|
-
},
|
|
46
|
-
showIcon: {
|
|
47
|
-
control: 'boolean',
|
|
48
|
-
description: 'Whether to show an icon (when image is not shown)',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
args: {
|
|
52
|
-
title: faker.commerce.productName(),
|
|
53
|
-
description: faker.lorem.paragraph(),
|
|
54
|
-
image: faker.image.url(),
|
|
55
|
-
showImage: true,
|
|
56
|
-
showIcon: true,
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default meta;
|
|
61
|
-
|
|
62
|
-
export const Default: StoryObj<CardStoryProps> = {
|
|
63
|
-
render: ({ title, description, image, showImage, showIcon }: CardStoryProps) => (
|
|
64
|
-
<div className='max-is-md'>
|
|
65
|
-
<Card.StaticRoot>
|
|
66
|
-
<Card.Toolbar>
|
|
67
|
-
<Card.DragHandle toolbarItem />
|
|
68
|
-
<Card.ToolbarSeparator variant='gap' />
|
|
69
|
-
<Card.ToolbarIconButton iconOnly variant='ghost' icon='ph--x--regular' label={'remove card label'} />
|
|
70
|
-
</Card.Toolbar>
|
|
71
|
-
{showImage && <Card.Poster alt={title} image={image} />}
|
|
72
|
-
{!showImage && showIcon && <Card.Poster alt={title} icon='ph--building-office--regular' />}
|
|
73
|
-
<Card.Heading>{title}</Card.Heading>
|
|
74
|
-
{description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}
|
|
75
|
-
</Card.StaticRoot>
|
|
76
|
-
</div>
|
|
77
|
-
),
|
|
78
|
-
};
|