@dxos/react-ui-stack 0.6.12-main.ed7cda7 → 0.6.12-staging.0b4bb48
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 +4 -6
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +3 -5
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/types/src/components/CaretDownUp.d.ts.map +1 -1
- package/dist/types/src/components/Deck.stories.d.ts.map +1 -1
- package/dist/types/src/components/Section.d.ts +3 -2
- package/dist/types/src/components/Section.d.ts.map +1 -1
- package/dist/types/src/playwright/playwright.config.d.ts +2 -2
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
- package/dist/types/src/testing/TableContent.d.ts.map +1 -1
- package/package.json +21 -24
- package/src/components/CaretDownUp.tsx +0 -1
- package/src/components/Deck.stories.tsx +16 -6
- package/src/components/Section.tsx +13 -6
- package/src/playwright/playwright.config.ts +2 -13
- package/src/playwright/smoke.spec.ts +19 -11
- package/src/testing/TableContent.tsx +0 -1
- package/dist/lib/node-esm/index.mjs +0 -379
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/testing/index.mjs +0 -161
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type IconProps } from '@phosphor-icons/react';
|
|
1
2
|
import React, { type ForwardRefExoticComponent, type RefAttributes, type FC, type PropsWithChildren, type ComponentPropsWithRef } from 'react';
|
|
2
3
|
import { type Label, type ThemedClassName } from '@dxos/react-ui';
|
|
3
4
|
import { type MosaicActiveType, type MosaicDataItem, type MosaicTileComponent, type MosaicTileProps } from '@dxos/react-ui-mosaic';
|
|
@@ -29,13 +30,13 @@ export type StackSectionItem = MosaicDataItem & {
|
|
|
29
30
|
custom?: Record<string, any>;
|
|
30
31
|
};
|
|
31
32
|
metadata?: {
|
|
32
|
-
icon?:
|
|
33
|
+
icon?: FC<IconProps>;
|
|
33
34
|
placeholder?: Label;
|
|
34
35
|
viewActions?: (item: StackSectionItem) => StackAction;
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
38
|
export type StackAction = {
|
|
38
|
-
icon:
|
|
39
|
+
icon: FC<IconProps>;
|
|
39
40
|
label: Label;
|
|
40
41
|
onClick: () => void;
|
|
41
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/components/Section.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/components/Section.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
1
|
+
import { defaultPlaywrightConfig } from '@dxos/test/playwright';
|
|
2
|
+
export default defaultPlaywrightConfig;
|
|
3
3
|
//# sourceMappingURL=playwright.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright.config.d.ts","sourceRoot":"","sources":["../../../../src/playwright/playwright.config.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"playwright.config.d.ts","sourceRoot":"","sources":["../../../../src/playwright/playwright.config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAe,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableContent.d.ts","sourceRoot":"","sources":["../../../../src/testing/TableContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableContent.d.ts","sourceRoot":"","sources":["../../../../src/testing/TableContent.tsx"],"names":[],"mappings":"AAIA,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-stack",
|
|
3
|
-
"version": "0.6.12-
|
|
3
|
+
"version": "0.6.12-staging.0b4bb48",
|
|
4
4
|
"description": "A stack component.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,16 +10,14 @@
|
|
|
10
10
|
".": {
|
|
11
11
|
"browser": "./dist/lib/browser/index.mjs",
|
|
12
12
|
"node": {
|
|
13
|
-
"
|
|
14
|
-
"default": "./dist/lib/node-esm/index.mjs"
|
|
13
|
+
"default": "./dist/lib/node/index.cjs"
|
|
15
14
|
},
|
|
16
15
|
"types": "./dist/types/src/index.d.ts"
|
|
17
16
|
},
|
|
18
17
|
"./testing": {
|
|
19
18
|
"browser": "./dist/lib/browser/testing/index.mjs",
|
|
20
19
|
"node": {
|
|
21
|
-
"
|
|
22
|
-
"default": "./dist/lib/node-esm/testing/index.mjs"
|
|
20
|
+
"default": "./dist/lib/node/testing/index.cjs"
|
|
23
21
|
},
|
|
24
22
|
"types": "./dist/types/src/testing/index.d.ts"
|
|
25
23
|
}
|
|
@@ -45,11 +43,11 @@
|
|
|
45
43
|
"@radix-ui/react-menu": "^2.0.6",
|
|
46
44
|
"@radix-ui/react-use-controllable-state": "^1.0.0",
|
|
47
45
|
"react-resize-detector": "^11.0.1",
|
|
48
|
-
"@dxos/react-ui": "0.6.12-
|
|
49
|
-
"@dxos/react-ui-attention": "0.6.12-
|
|
50
|
-
"@dxos/react-ui-deck": "0.6.12-
|
|
51
|
-
"@dxos/react-ui-
|
|
52
|
-
"@dxos/react-ui-
|
|
46
|
+
"@dxos/react-ui": "0.6.12-staging.0b4bb48",
|
|
47
|
+
"@dxos/react-ui-attention": "0.6.12-staging.0b4bb48",
|
|
48
|
+
"@dxos/react-ui-deck": "0.6.12-staging.0b4bb48",
|
|
49
|
+
"@dxos/react-ui-theme": "0.6.12-staging.0b4bb48",
|
|
50
|
+
"@dxos/react-ui-mosaic": "0.6.12-staging.0b4bb48"
|
|
53
51
|
},
|
|
54
52
|
"devDependencies": {
|
|
55
53
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -57,23 +55,22 @@
|
|
|
57
55
|
"@types/react-dom": "~18.2.0",
|
|
58
56
|
"react": "~18.2.0",
|
|
59
57
|
"react-dom": "~18.2.0",
|
|
60
|
-
"vite": "5.4
|
|
61
|
-
"@dxos/client": "0.6.12-
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/react-ui-table": "0.6.12-
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/test-utils": "0.6.12-main.ed7cda7"
|
|
58
|
+
"vite": "^5.3.4",
|
|
59
|
+
"@dxos/client": "0.6.12-staging.0b4bb48",
|
|
60
|
+
"@dxos/echo-schema": "0.6.12-staging.0b4bb48",
|
|
61
|
+
"@dxos/random": "0.6.12-staging.0b4bb48",
|
|
62
|
+
"@dxos/react-ui-editor": "0.6.12-staging.0b4bb48",
|
|
63
|
+
"@dxos/react-ui-table": "0.6.12-staging.0b4bb48",
|
|
64
|
+
"@dxos/util": "0.6.12-staging.0b4bb48",
|
|
65
|
+
"@dxos/storybook-utils": "0.6.12-staging.0b4bb48"
|
|
69
66
|
},
|
|
70
67
|
"peerDependencies": {
|
|
71
68
|
"@phosphor-icons/react": "^2.1.5",
|
|
72
|
-
"react": "
|
|
73
|
-
"react-dom": "
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/random": "0.6.12-
|
|
69
|
+
"react": "^18.0.0",
|
|
70
|
+
"react-dom": "^18.0.0",
|
|
71
|
+
"@dxos/client": "0.6.12-staging.0b4bb48",
|
|
72
|
+
"@dxos/echo-schema": "0.6.12-staging.0b4bb48",
|
|
73
|
+
"@dxos/random": "0.6.12-staging.0b4bb48"
|
|
77
74
|
},
|
|
78
75
|
"publishConfig": {
|
|
79
76
|
"access": "public"
|
|
@@ -4,13 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
Books,
|
|
9
|
+
CardsThree,
|
|
10
|
+
CaretLeft,
|
|
11
|
+
CaretLineLeft,
|
|
12
|
+
CaretLineRight,
|
|
13
|
+
CaretRight,
|
|
14
|
+
SidebarSimple,
|
|
15
|
+
TextAa,
|
|
16
|
+
X,
|
|
17
|
+
} from '@phosphor-icons/react';
|
|
8
18
|
import React, { type PropsWithChildren, useState, type ComponentProps } from 'react';
|
|
9
19
|
|
|
10
20
|
import { faker } from '@dxos/random';
|
|
11
|
-
import { Button,
|
|
21
|
+
import { Button, Main } from '@dxos/react-ui';
|
|
12
22
|
import { AttentionProvider } from '@dxos/react-ui-attention';
|
|
13
|
-
import { PlankHeading, Deck as NaturalDeck, Plank } from '@dxos/react-ui-deck';
|
|
23
|
+
import { PlankHeading, plankHeadingIconProps, Deck as NaturalDeck, Plank } from '@dxos/react-ui-deck';
|
|
14
24
|
import { Mosaic, type MosaicDataItem } from '@dxos/react-ui-mosaic';
|
|
15
25
|
import { withTheme } from '@dxos/storybook-utils';
|
|
16
26
|
import { arrayMove } from '@dxos/util';
|
|
@@ -41,7 +51,7 @@ const SimpleContent = ({ data }: { data: MosaicDataItem & { title?: string; body
|
|
|
41
51
|
const rollItems = (n: number): StackSectionItem[] => {
|
|
42
52
|
return [...Array(n)].map(() => ({
|
|
43
53
|
id: faker.string.uuid(),
|
|
44
|
-
icon:
|
|
54
|
+
icon: TextAa,
|
|
45
55
|
isResizable: true,
|
|
46
56
|
object: {
|
|
47
57
|
id: faker.string.uuid(),
|
|
@@ -64,7 +74,7 @@ const StackPlank = ({ label, items, id, children }: PropsWithChildren<PlankProps
|
|
|
64
74
|
<>
|
|
65
75
|
<PlankHeading.Root classNames='pli-px'>
|
|
66
76
|
<PlankHeading.Button>
|
|
67
|
-
<
|
|
77
|
+
<CardsThree {...plankHeadingIconProps} />
|
|
68
78
|
</PlankHeading.Button>
|
|
69
79
|
<PlankHeading.Label classNames='flex-1 truncate'>{label}</PlankHeading.Label>
|
|
70
80
|
{children}
|
|
@@ -234,7 +244,7 @@ export const DynamicBasicStacks = () => {
|
|
|
234
244
|
<>
|
|
235
245
|
<PlankHeading.Root classNames='pli-px'>
|
|
236
246
|
<PlankHeading.Button>
|
|
237
|
-
<
|
|
247
|
+
<Books {...plankHeadingIconProps} />
|
|
238
248
|
</PlankHeading.Button>
|
|
239
249
|
<PlankHeading.Label classNames='grow'>Menu</PlankHeading.Label>
|
|
240
250
|
{c11yContent === MENU ? (
|
|
@@ -3,7 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { useFocusableGroup, useTabsterAttributes } from '@fluentui/react-tabster';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
ArrowLineDown,
|
|
8
|
+
ArrowLineUp,
|
|
9
|
+
ArrowSquareOut,
|
|
10
|
+
CaretUpDown,
|
|
11
|
+
DotsNine,
|
|
12
|
+
type IconProps,
|
|
13
|
+
Trash,
|
|
14
|
+
} from '@phosphor-icons/react';
|
|
7
15
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
8
16
|
import React, {
|
|
9
17
|
forwardRef,
|
|
@@ -18,7 +26,6 @@ import React, {
|
|
|
18
26
|
import {
|
|
19
27
|
Button,
|
|
20
28
|
DropdownMenu,
|
|
21
|
-
Icon,
|
|
22
29
|
type Label,
|
|
23
30
|
List,
|
|
24
31
|
ListItem,
|
|
@@ -85,14 +92,14 @@ export type StackSectionItem = MosaicDataItem & {
|
|
|
85
92
|
};
|
|
86
93
|
// TODO(wittjosiah): Common type? Factor out?
|
|
87
94
|
metadata?: {
|
|
88
|
-
icon?:
|
|
95
|
+
icon?: FC<IconProps>;
|
|
89
96
|
placeholder?: Label;
|
|
90
97
|
viewActions?: (item: StackSectionItem) => StackAction;
|
|
91
98
|
};
|
|
92
99
|
};
|
|
93
100
|
|
|
94
101
|
export type StackAction = {
|
|
95
|
-
icon:
|
|
102
|
+
icon: FC<IconProps>;
|
|
96
103
|
label: Label;
|
|
97
104
|
onClick: () => void;
|
|
98
105
|
};
|
|
@@ -126,7 +133,7 @@ export const Section: ForwardRefExoticComponent<SectionProps & RefAttributes<HTM
|
|
|
126
133
|
{
|
|
127
134
|
id,
|
|
128
135
|
title,
|
|
129
|
-
icon =
|
|
136
|
+
icon: Icon = DotsNine,
|
|
130
137
|
size = 'intrinsic',
|
|
131
138
|
collapsed,
|
|
132
139
|
active,
|
|
@@ -199,7 +206,7 @@ export const Section: ForwardRefExoticComponent<SectionProps & RefAttributes<HTM
|
|
|
199
206
|
}}
|
|
200
207
|
>
|
|
201
208
|
<DropDownMenuDragHandleTrigger active={!!active} variant='ghost' classNames='m-0' {...draggableProps}>
|
|
202
|
-
<Icon
|
|
209
|
+
<Icon className={mx(getSize(5), 'transition-opacity')} />
|
|
203
210
|
</DropDownMenuDragHandleTrigger>
|
|
204
211
|
<DropdownMenu.Portal>
|
|
205
212
|
<DropdownMenu.Content>
|
|
@@ -2,17 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { defineConfig } from '@playwright/test';
|
|
5
|
+
import { defaultPlaywrightConfig } from '@dxos/test/playwright';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export default defineConfig({
|
|
11
|
-
...nxE2EPreset(__filename, { testDir: __dirname }),
|
|
12
|
-
...e2ePreset(__dirname),
|
|
13
|
-
webServer: {
|
|
14
|
-
command: 'pnpm -w nx storybook-e2e stories',
|
|
15
|
-
port: 9009,
|
|
16
|
-
reuseExistingServer: !process.env.CI,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
7
|
+
export default defaultPlaywrightConfig;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { expect, test } from '@playwright/test';
|
|
6
6
|
|
|
7
|
-
import { setupPage } from '@dxos/test
|
|
7
|
+
import { setupPage } from '@dxos/test/playwright';
|
|
8
8
|
|
|
9
9
|
import { StackManager } from '../testing';
|
|
10
10
|
|
|
@@ -13,8 +13,10 @@ const storybookUrl = (storyId: string) => `http://localhost:9009/iframe.html?id=
|
|
|
13
13
|
|
|
14
14
|
test.describe('Stack', () => {
|
|
15
15
|
test('remove', async ({ browser }) => {
|
|
16
|
-
const { page } = await setupPage(browser, {
|
|
17
|
-
|
|
16
|
+
const { page } = await setupPage(browser, {
|
|
17
|
+
url: storybookUrl('react-ui-stack-stack--transfer'),
|
|
18
|
+
waitFor: (page) => page.getByTestId('stack-transfer').isVisible(),
|
|
19
|
+
});
|
|
18
20
|
|
|
19
21
|
const stack = new StackManager(page.getByTestId('stack-1'));
|
|
20
22
|
await expect(stack.sections()).toHaveCount(8);
|
|
@@ -26,8 +28,10 @@ test.describe('Stack', () => {
|
|
|
26
28
|
});
|
|
27
29
|
|
|
28
30
|
test('rearrange', async ({ browser }) => {
|
|
29
|
-
const { page } = await setupPage(browser, {
|
|
30
|
-
|
|
31
|
+
const { page } = await setupPage(browser, {
|
|
32
|
+
url: storybookUrl('react-ui-stack-stack--transfer'),
|
|
33
|
+
waitFor: (page) => page.getByTestId('stack-transfer').isVisible(),
|
|
34
|
+
});
|
|
31
35
|
|
|
32
36
|
const stack = new StackManager(page.getByTestId('stack-1'));
|
|
33
37
|
const sectionText = await stack.section(0).locator.innerText();
|
|
@@ -38,13 +42,15 @@ test.describe('Stack', () => {
|
|
|
38
42
|
});
|
|
39
43
|
|
|
40
44
|
test('transfer', async ({ browser, browserName }) => {
|
|
41
|
-
if (browserName
|
|
42
|
-
// TODO(wittjosiah): This test is
|
|
45
|
+
if (browserName === 'webkit') {
|
|
46
|
+
// TODO(wittjosiah): This test is failing consistently on WebKit in CI specifically.
|
|
43
47
|
test.skip();
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
const { page } = await setupPage(browser, {
|
|
47
|
-
|
|
50
|
+
const { page } = await setupPage(browser, {
|
|
51
|
+
url: storybookUrl('react-ui-stack-stack--transfer'),
|
|
52
|
+
waitFor: (page) => page.getByTestId('stack-transfer').isVisible(),
|
|
53
|
+
});
|
|
48
54
|
|
|
49
55
|
const stack1 = new StackManager(page.getByTestId('stack-1'));
|
|
50
56
|
const stack2 = new StackManager(page.getByTestId('stack-2'));
|
|
@@ -63,8 +69,10 @@ test.describe('Stack', () => {
|
|
|
63
69
|
});
|
|
64
70
|
|
|
65
71
|
test('copy', async ({ browser }) => {
|
|
66
|
-
const { page } = await setupPage(browser, {
|
|
67
|
-
|
|
72
|
+
const { page } = await setupPage(browser, {
|
|
73
|
+
url: storybookUrl('react-ui-stack-stack--copy'),
|
|
74
|
+
waitFor: (page) => page.getByTestId('stack-copy').isVisible(),
|
|
75
|
+
});
|
|
68
76
|
|
|
69
77
|
const stack1 = new StackManager(page.getByTestId('stack-1'));
|
|
70
78
|
const stack2 = new StackManager(page.getByTestId('stack-2'));
|