@dxos/react-ui-stack 0.6.14-staging.9e90729 → 0.6.14-staging.c117501
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 +494 -335
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +3 -6
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +478 -326
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +3 -6
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +494 -335
- 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/index.mjs +3 -6
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/components/LayoutControls.d.ts +19 -0
- package/dist/types/src/components/LayoutControls.d.ts.map +1 -0
- package/dist/types/src/components/MenuSignifier.d.ts +4 -0
- package/dist/types/src/components/MenuSignifier.d.ts.map +1 -0
- package/dist/types/src/components/Stack.d.ts +12 -12
- package/dist/types/src/components/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack.stories.d.ts +6 -83
- package/dist/types/src/components/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackContext.d.ts +19 -0
- package/dist/types/src/components/StackContext.d.ts.map +1 -0
- package/dist/types/src/components/StackItem.d.ts +41 -0
- package/dist/types/src/components/StackItem.d.ts.map +1 -0
- package/dist/types/src/components/StackItemContent.d.ts +9 -0
- package/dist/types/src/components/StackItemContent.d.ts.map +1 -0
- package/dist/types/src/components/StackItemHeading.d.ts +8 -0
- package/dist/types/src/components/StackItemHeading.d.ts.map +1 -0
- package/dist/types/src/components/StackItemResizeHandle.d.ts +3 -0
- package/dist/types/src/components/StackItemResizeHandle.d.ts.map +1 -0
- package/dist/types/src/components/StackItemSigil.d.ts +31 -0
- package/dist/types/src/components/StackItemSigil.d.ts.map +1 -0
- 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/testing/EditorContent.d.ts +2 -2
- package/dist/types/src/testing/EditorContent.d.ts.map +1 -1
- package/dist/types/src/testing/stack-manager.d.ts +0 -1
- package/dist/types/src/testing/stack-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +8 -8
- package/package.json +19 -20
- package/src/components/LayoutControls.tsx +131 -0
- package/src/components/MenuSignifier.tsx +33 -0
- package/src/components/Stack.stories.tsx +109 -182
- package/src/components/Stack.tsx +61 -156
- package/src/components/StackContext.tsx +38 -0
- package/src/components/StackItem.tsx +173 -0
- package/src/components/StackItemContent.tsx +49 -0
- package/src/components/StackItemHeading.tsx +55 -0
- package/src/components/StackItemResizeHandle.tsx +115 -0
- package/src/components/StackItemSigil.tsx +170 -0
- package/src/components/index.ts +3 -2
- package/src/playwright/smoke.spec.ts +3 -3
- package/src/testing/EditorContent.tsx +4 -4
- package/src/testing/stack-manager.ts +3 -7
- package/src/translations.ts +8 -8
- package/dist/types/src/components/CaretDownUp.d.ts +0 -4
- package/dist/types/src/components/CaretDownUp.d.ts.map +0 -1
- package/dist/types/src/components/ContentTypes.stories.d.ts +0 -96
- package/dist/types/src/components/ContentTypes.stories.d.ts.map +0 -1
- package/dist/types/src/components/Deck.stories.d.ts +0 -19
- package/dist/types/src/components/Deck.stories.d.ts.map +0 -1
- package/dist/types/src/components/Section.d.ts +0 -53
- package/dist/types/src/components/Section.d.ts.map +0 -1
- package/dist/types/src/components/Section.stories.d.ts +0 -36
- package/dist/types/src/components/Section.stories.d.ts.map +0 -1
- package/dist/types/src/components/style-fragments.d.ts +0 -2
- package/dist/types/src/components/style-fragments.d.ts.map +0 -1
- package/dist/types/src/next/Stack.d.ts +0 -9
- package/dist/types/src/next/Stack.d.ts.map +0 -1
- package/dist/types/src/next/Stack.stories.d.ts +0 -8
- package/dist/types/src/next/Stack.stories.d.ts.map +0 -1
- package/dist/types/src/next/StackItem.d.ts +0 -14
- package/dist/types/src/next/StackItem.d.ts.map +0 -1
- package/dist/types/src/next/index.d.ts +0 -2
- package/dist/types/src/next/index.d.ts.map +0 -1
- package/dist/types/src/testing/TableContent.d.ts +0 -20
- package/dist/types/src/testing/TableContent.d.ts.map +0 -1
- package/src/components/CaretDownUp.tsx +0 -31
- package/src/components/ContentTypes.stories.tsx +0 -104
- package/src/components/Deck.stories.tsx +0 -362
- package/src/components/Section.stories.tsx +0 -50
- package/src/components/Section.tsx +0 -378
- package/src/components/style-fragments.ts +0 -5
- package/src/next/Stack.stories.tsx +0 -148
- package/src/next/Stack.tsx +0 -30
- package/src/next/StackItem.tsx +0 -78
- package/src/next/index.ts +0 -5
- package/src/testing/TableContent.tsx +0 -119
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CaretDownUp.d.ts","sourceRoot":"","sources":["../../../../src/components/CaretDownUp.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,WAAW,mCAAoC,SAAS,sBAuBpE,CAAC"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { StackSectionItem } from './Section';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: ({ items }: {
|
|
7
|
-
items: StackSectionItem[];
|
|
8
|
-
}) => React.JSX.Element;
|
|
9
|
-
decorators: import("@storybook/react/*").Decorator[];
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
12
|
-
export declare const Editors: {
|
|
13
|
-
args: {
|
|
14
|
-
items: {
|
|
15
|
-
id: string;
|
|
16
|
-
object: {
|
|
17
|
-
id: string;
|
|
18
|
-
content: string;
|
|
19
|
-
};
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
parameters: {
|
|
23
|
-
layout: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare const Tables: {
|
|
27
|
-
args: {
|
|
28
|
-
items: {
|
|
29
|
-
id: string;
|
|
30
|
-
size: string;
|
|
31
|
-
object: {
|
|
32
|
-
id: string;
|
|
33
|
-
columns: import("packages/ui/react-ui-table/dist/types/src").TableColumnDef<{
|
|
34
|
-
publicKey: import("packages/common/keys/dist/types/src").PublicKey;
|
|
35
|
-
name: string;
|
|
36
|
-
company?: string;
|
|
37
|
-
count?: number;
|
|
38
|
-
started?: Date;
|
|
39
|
-
complete?: boolean;
|
|
40
|
-
}, any>[];
|
|
41
|
-
data: {
|
|
42
|
-
publicKey: import("packages/common/keys/dist/types/src").PublicKey;
|
|
43
|
-
name: string;
|
|
44
|
-
company?: string;
|
|
45
|
-
count?: number;
|
|
46
|
-
started?: Date;
|
|
47
|
-
complete?: boolean;
|
|
48
|
-
}[];
|
|
49
|
-
};
|
|
50
|
-
}[];
|
|
51
|
-
};
|
|
52
|
-
parameters: {
|
|
53
|
-
layout: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
export declare const EditorsAndTables: {
|
|
57
|
-
args: {
|
|
58
|
-
items: ({
|
|
59
|
-
id: string;
|
|
60
|
-
object: {
|
|
61
|
-
id: string;
|
|
62
|
-
content: string;
|
|
63
|
-
columns?: undefined;
|
|
64
|
-
data?: undefined;
|
|
65
|
-
};
|
|
66
|
-
size?: undefined;
|
|
67
|
-
} | {
|
|
68
|
-
id: string;
|
|
69
|
-
size: string;
|
|
70
|
-
object: {
|
|
71
|
-
id: string;
|
|
72
|
-
columns: import("packages/ui/react-ui-table/dist/types/src").TableColumnDef<{
|
|
73
|
-
publicKey: import("packages/common/keys/dist/types/src").PublicKey;
|
|
74
|
-
name: string;
|
|
75
|
-
company?: string;
|
|
76
|
-
count?: number;
|
|
77
|
-
started?: Date;
|
|
78
|
-
complete?: boolean;
|
|
79
|
-
}, any>[];
|
|
80
|
-
data: {
|
|
81
|
-
publicKey: import("packages/common/keys/dist/types/src").PublicKey;
|
|
82
|
-
name: string;
|
|
83
|
-
company?: string;
|
|
84
|
-
count?: number;
|
|
85
|
-
started?: Date;
|
|
86
|
-
complete?: boolean;
|
|
87
|
-
}[];
|
|
88
|
-
content?: undefined;
|
|
89
|
-
};
|
|
90
|
-
})[];
|
|
91
|
-
};
|
|
92
|
-
parameters: {
|
|
93
|
-
layout: string;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=ContentTypes.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypes.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ContentTypes.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAuB,gBAAgB,EAAE,MAAM,WAAW,CAAC;;;2BAiB5B;QAAE,KAAK,EAAE,gBAAgB,EAAE,CAAA;KAAE;;;AAcxE,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAUnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAelB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB5B,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui-deck").DeckRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
decorators: import("@storybook/react/*").Decorator[];
|
|
7
|
-
args: {};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
|
-
export declare const StaticBasicStacks: {
|
|
11
|
-
args: {};
|
|
12
|
-
render: () => React.JSX.Element;
|
|
13
|
-
};
|
|
14
|
-
export declare const StaticBasicStacksWithOverscrolling: {
|
|
15
|
-
args: {};
|
|
16
|
-
render: () => React.JSX.Element;
|
|
17
|
-
};
|
|
18
|
-
export declare const DynamicBasicStacks: () => React.JSX.Element;
|
|
19
|
-
//# sourceMappingURL=Deck.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Deck.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Deck.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAgE,MAAM,OAAO,CAAC;;;;;;;AAsFrF,wBAME;AAEF,eAAO,MAAM,iBAAiB;;;CAoB7B,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;CAoB9C,CAAC;AA2CF,eAAO,MAAM,kBAAkB,yBA+K9B,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React, { type ForwardRefExoticComponent, type RefAttributes, type FC, type PropsWithChildren, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { type Label, type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
-
import { type MosaicActiveType, type MosaicDataItem, type MosaicTileComponent, type MosaicTileProps } from '@dxos/react-ui-mosaic';
|
|
4
|
-
export type StackSectionContent = MosaicDataItem;
|
|
5
|
-
export type CollapsedSections = Record<string, boolean>;
|
|
6
|
-
export type AddSectionPosition = 'before' | 'after' | 'beforeAll' | 'afterAll';
|
|
7
|
-
export type StackContextValue<TData extends StackSectionContent = StackSectionContent> = {
|
|
8
|
-
SectionContent: FC<{
|
|
9
|
-
data: TData;
|
|
10
|
-
}>;
|
|
11
|
-
separation?: boolean;
|
|
12
|
-
isResizable?: boolean;
|
|
13
|
-
transform?: (item: MosaicDataItem, type?: string) => StackSectionItem;
|
|
14
|
-
onDeleteSection?: (path: string) => void;
|
|
15
|
-
onAddSection?: (path: string, position: AddSectionPosition) => void;
|
|
16
|
-
onNavigateToSection?: (object: MosaicDataItem) => void;
|
|
17
|
-
onCollapseSection?: (id: string, collapsed: boolean) => void;
|
|
18
|
-
};
|
|
19
|
-
export type StackItem = MosaicDataItem & {
|
|
20
|
-
items: StackSectionItem[];
|
|
21
|
-
};
|
|
22
|
-
export type StackSectionItem = MosaicDataItem & {
|
|
23
|
-
object: StackSectionContent;
|
|
24
|
-
view?: {
|
|
25
|
-
title?: string;
|
|
26
|
-
size?: SectionSize;
|
|
27
|
-
height?: number;
|
|
28
|
-
collapsed?: boolean;
|
|
29
|
-
custom?: Record<string, any>;
|
|
30
|
-
};
|
|
31
|
-
metadata?: {
|
|
32
|
-
icon?: string;
|
|
33
|
-
placeholder?: Label;
|
|
34
|
-
viewActions?: (item: StackSectionItem) => StackAction;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export type StackAction = {
|
|
38
|
-
icon: string;
|
|
39
|
-
label: Label;
|
|
40
|
-
onClick: () => void;
|
|
41
|
-
};
|
|
42
|
-
export type SectionSize = 'intrinsic' | 'extrinsic';
|
|
43
|
-
export type SectionProps = PropsWithChildren<{
|
|
44
|
-
id: string;
|
|
45
|
-
title: string;
|
|
46
|
-
active?: MosaicActiveType;
|
|
47
|
-
} & Pick<MosaicTileProps, 'draggableProps' | 'draggableStyle' | 'onDelete' | 'onNavigate' | 'onAddAfter' | 'onAddBefore'> & Pick<StackContextValue, 'separation' | 'isResizable' | 'onCollapseSection'> & Pick<Required<StackSectionItem>['view'], 'collapsed' | 'size'> & Pick<Required<StackSectionItem>['metadata'], 'icon'>>;
|
|
48
|
-
export declare const Section: ForwardRefExoticComponent<SectionProps & RefAttributes<HTMLLIElement>>;
|
|
49
|
-
export type SectionToolbarProps = ThemedClassName<ComponentPropsWithRef<'div'>>;
|
|
50
|
-
export declare const sectionToolbarLayout = "bs-[--rail-action] bg-[--sticky-bg] sticky block-start-0 __-block-start-px transition-opacity";
|
|
51
|
-
export declare const SectionToolbar: ({ children, classNames }: SectionToolbarProps) => React.JSX.Element;
|
|
52
|
-
export declare const SectionTile: MosaicTileComponent<StackSectionItem, HTMLLIElement>;
|
|
53
|
-
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/components/Section.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { type SectionProps } from './Section';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: any;
|
|
7
|
-
decorators: import("@storybook/react/*").Decorator[];
|
|
8
|
-
args: {
|
|
9
|
-
id: string;
|
|
10
|
-
title: string;
|
|
11
|
-
};
|
|
12
|
-
render: (args: SectionProps) => React.JSX.Element;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
|
15
|
-
export declare const Default: {};
|
|
16
|
-
export declare const ActiveRearrange: {
|
|
17
|
-
args: {
|
|
18
|
-
active: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare const ActiveOrigin: {
|
|
22
|
-
args: {
|
|
23
|
-
active: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare const ActiveDestination: {
|
|
27
|
-
args: {
|
|
28
|
-
active: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export declare const ActiveOverlay: {
|
|
32
|
-
args: {
|
|
33
|
-
active: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=Section.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Section.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Section.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;;;eAI/B,GAAG;;;;;;mBAMV,YAAY;;AAR7B,wBAiBE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,eAAO,MAAM,eAAe;;;;CAE3B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAExB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;CAE7B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;CAEzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style-fragments.d.ts","sourceRoot":"","sources":["../../../../src/components/style-fragments.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,6DAA6D,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
-
type Orientation = 'horizontal' | 'vertical';
|
|
4
|
-
export type StackProps = Omit<ThemedClassName<ComponentPropsWithoutRef<'div'>>, 'aria-orientation'> & {
|
|
5
|
-
orientation?: Orientation;
|
|
6
|
-
};
|
|
7
|
-
export declare const Stack: ({ children, classNames, style, orientation, ...props }: StackProps) => React.JSX.Element;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../src/next/Stack.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAgC,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAE3F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAE7C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,GAAG;IACpG,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,KAAK,2DAA4D,UAAU,sBAcvF,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare const StorybookStack: () => React.JSX.Element;
|
|
4
|
-
type Story = StoryObj<typeof StorybookStack>;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
declare const meta: Meta<typeof StorybookStack>;
|
|
7
|
-
export default meta;
|
|
8
|
-
//# sourceMappingURL=Stack.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/next/Stack.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAgC,MAAM,OAAO,CAAC;AA4BrD,QAAA,MAAM,cAAc,yBAgGnB,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAKrC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
2
|
-
import React, { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
-
import { type StackProps } from './Stack';
|
|
5
|
-
export type StackItemProps = Omit<ThemedClassName<ComponentPropsWithoutRef<'div'>>, 'aria-orientation'> & {
|
|
6
|
-
item: {
|
|
7
|
-
id: string;
|
|
8
|
-
type: 'column' | 'card';
|
|
9
|
-
};
|
|
10
|
-
orientation?: StackProps['orientation'];
|
|
11
|
-
onReorder: (sourceId: string, targetId: string, closestEdge: Edge | null) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const StackItem: ({ item, children, classNames, orientation, onReorder, ...props }: StackItemProps) => React.JSX.Element;
|
|
14
|
-
//# sourceMappingURL=StackItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../../../src/next/StackItem.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,IAAI,EAEV,MAAM,uDAAuD,CAAC;AAE/D,OAAO,KAAK,EAAE,EAA+B,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAE1F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,GAAG;IACxG,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAA;KAAE,CAAC;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACxC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACnF,CAAC;AAEF,eAAO,MAAM,SAAS,qEAAsE,cAAc,sBAoDzG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/next/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PublicKey } from '@dxos/keys';
|
|
3
|
-
import { type TableColumnDef, type TableProps, type ValueUpdater } from '@dxos/react-ui-table';
|
|
4
|
-
import type { StackSectionContent } from '../components/Section';
|
|
5
|
-
type Item = {
|
|
6
|
-
publicKey: PublicKey;
|
|
7
|
-
name: string;
|
|
8
|
-
company?: string;
|
|
9
|
-
count?: number;
|
|
10
|
-
started?: Date;
|
|
11
|
-
complete?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const makeColumns: (onUpdate?: ValueUpdater<Item, any>) => TableColumnDef<Item, any>[];
|
|
14
|
-
export declare const createItems: (count: number) => Item[];
|
|
15
|
-
export type TableContentProps = StackSectionContent & Pick<TableProps<Item>, 'columns' | 'data'>;
|
|
16
|
-
export declare const TableContent: ({ data: { columns, data } }: {
|
|
17
|
-
data: TableContentProps;
|
|
18
|
-
}) => React.JSX.Element;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=TableContent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableContent.d.ts","sourceRoot":"","sources":["../../../../src/testing/TableContent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,KAAK,IAAI,GAAG;IACV,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA8BF,eAAO,MAAM,WAAW,cAAe,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,KAAG,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,EAqCzF,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,MAAM,WAWtC,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;AAEjG,eAAO,MAAM,YAAY,gCAAiC;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,sBAMpF,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type IconProps } from '@phosphor-icons/react';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
export const CaretDownUp = ({ children, weight, ...props }: IconProps) => {
|
|
9
|
-
return (
|
|
10
|
-
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' {...props}>
|
|
11
|
-
<rect width='256' height='256' fill='none' />
|
|
12
|
-
<polyline
|
|
13
|
-
points='80 224 128 176 176 224'
|
|
14
|
-
fill='none'
|
|
15
|
-
stroke='currentColor'
|
|
16
|
-
strokeLinecap='round'
|
|
17
|
-
strokeLinejoin='round'
|
|
18
|
-
strokeWidth='16'
|
|
19
|
-
/>
|
|
20
|
-
<polyline
|
|
21
|
-
points='80 32 128 80 176 32'
|
|
22
|
-
fill='none'
|
|
23
|
-
stroke='currentColor'
|
|
24
|
-
strokeLinecap='round'
|
|
25
|
-
strokeLinejoin='round'
|
|
26
|
-
strokeWidth='16'
|
|
27
|
-
/>
|
|
28
|
-
{children}
|
|
29
|
-
</svg>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
|
|
9
|
-
import { faker } from '@dxos/random';
|
|
10
|
-
import { Mosaic } from '@dxos/react-ui-mosaic';
|
|
11
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
12
|
-
|
|
13
|
-
import type { StackSectionContent, StackSectionItem } from './Section';
|
|
14
|
-
import { Stack, type StackProps } from './Stack';
|
|
15
|
-
import { EditorContent } from '../testing/EditorContent';
|
|
16
|
-
import { makeColumns, createItems, TableContent, type TableContentProps } from '../testing/TableContent';
|
|
17
|
-
|
|
18
|
-
faker.seed(1234);
|
|
19
|
-
|
|
20
|
-
const ContentTypeDelegator: StackProps['SectionContent'] = (section: { data: StackSectionContent }) => {
|
|
21
|
-
if ('content' in section.data) {
|
|
22
|
-
return <EditorContent {...section} />;
|
|
23
|
-
} else if ('columns' in section.data) {
|
|
24
|
-
return <TableContent data={section.data as TableContentProps} />;
|
|
25
|
-
} else {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const ContentTypesStoryStack = ({ items }: { items: StackSectionItem[] }) => {
|
|
31
|
-
return (
|
|
32
|
-
<Mosaic.Root>
|
|
33
|
-
<Mosaic.DragOverlay />
|
|
34
|
-
<Stack
|
|
35
|
-
id='stack-editors'
|
|
36
|
-
SectionContent={ContentTypeDelegator}
|
|
37
|
-
items={items}
|
|
38
|
-
classNames='max-is-[min(100dvw,60rem)]'
|
|
39
|
-
/>
|
|
40
|
-
</Mosaic.Root>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default {
|
|
45
|
-
title: 'ui/react-ui-stack/ContentTypes',
|
|
46
|
-
component: ContentTypesStoryStack,
|
|
47
|
-
decorators: [withTheme, withLayout({ tooltips: true })],
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const Editors = {
|
|
51
|
-
args: {
|
|
52
|
-
items: [...Array(12)].map(() => ({
|
|
53
|
-
id: faker.string.uuid(),
|
|
54
|
-
object: { id: faker.string.uuid(), content: faker.lorem.paragraphs(4) },
|
|
55
|
-
})),
|
|
56
|
-
},
|
|
57
|
-
parameters: {
|
|
58
|
-
layout: 'fullscreen',
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const Tables = {
|
|
63
|
-
args: {
|
|
64
|
-
items: [...Array(12)].map(() => ({
|
|
65
|
-
id: faker.string.uuid(),
|
|
66
|
-
size: 'extrinsic',
|
|
67
|
-
object: {
|
|
68
|
-
id: faker.string.uuid(),
|
|
69
|
-
columns: makeColumns(),
|
|
70
|
-
data: createItems(faker.number.int({ min: 4, max: 12 })),
|
|
71
|
-
},
|
|
72
|
-
})),
|
|
73
|
-
},
|
|
74
|
-
parameters: {
|
|
75
|
-
layout: 'fullscreen',
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const EditorsAndTables = {
|
|
80
|
-
args: {
|
|
81
|
-
items: [...Array(12)].map(() =>
|
|
82
|
-
faker.number.float(1) < 0.5
|
|
83
|
-
? {
|
|
84
|
-
id: faker.string.uuid(),
|
|
85
|
-
object: {
|
|
86
|
-
id: faker.string.uuid(),
|
|
87
|
-
content: faker.lorem.paragraphs(4),
|
|
88
|
-
},
|
|
89
|
-
}
|
|
90
|
-
: {
|
|
91
|
-
id: faker.string.uuid(),
|
|
92
|
-
size: 'extrinsic',
|
|
93
|
-
object: {
|
|
94
|
-
id: faker.string.uuid(),
|
|
95
|
-
columns: makeColumns(),
|
|
96
|
-
data: createItems(faker.number.int({ min: 4, max: 12 })),
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
),
|
|
100
|
-
},
|
|
101
|
-
parameters: {
|
|
102
|
-
layout: 'fullscreen',
|
|
103
|
-
},
|
|
104
|
-
};
|