@dxos/react-ui-stack 0.8.2-main.fbd8ed0 → 0.8.2-staging.7ac8446

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.
Files changed (73) hide show
  1. package/dist/lib/browser/index.mjs +101 -32
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +93 -22
  5. package/dist/lib/node/index.cjs.map +4 -4
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +101 -32
  8. package/dist/lib/node-esm/index.mjs.map +4 -4
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/components/LayoutControls.d.ts.map +1 -0
  11. package/dist/types/src/components/MenuSignifier.d.ts.map +1 -0
  12. package/dist/types/src/components/{Stack/Stack.d.ts → Stack.d.ts} +1 -2
  13. package/dist/types/src/components/Stack.d.ts.map +1 -0
  14. package/dist/types/src/components/Stack.stories.d.ts +8 -0
  15. package/dist/types/src/components/Stack.stories.d.ts.map +1 -0
  16. package/dist/types/src/components/StackContext.d.ts +10 -1
  17. package/dist/types/src/components/StackContext.d.ts.map +1 -1
  18. package/dist/types/src/components/{StackItem/StackItem.d.ts → StackItem.d.ts} +3 -3
  19. package/dist/types/src/components/StackItem.d.ts.map +1 -0
  20. package/dist/types/src/components/StackItemContent.d.ts.map +1 -0
  21. package/dist/types/src/components/StackItemDragHandle.d.ts.map +1 -0
  22. package/dist/types/src/components/StackItemHeading.d.ts.map +1 -0
  23. package/dist/types/src/components/StackItemResizeHandle.d.ts.map +1 -0
  24. package/dist/types/src/components/StackItemSigil.d.ts.map +1 -0
  25. package/dist/types/src/components/index.d.ts +2 -1
  26. package/dist/types/src/components/index.d.ts.map +1 -1
  27. package/dist/types/src/hooks/useStackDropForElements.d.ts +4 -3
  28. package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -1
  29. package/dist/types/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +20 -20
  31. package/src/components/{deprecated/LayoutControls.tsx → LayoutControls.tsx} +23 -3
  32. package/src/components/{Stack/Stack.stories.tsx → Stack.stories.tsx} +13 -15
  33. package/src/components/{Stack/Stack.tsx → Stack.tsx} +2 -3
  34. package/src/components/StackContext.tsx +13 -1
  35. package/src/components/{StackItem/StackItem.tsx → StackItem.tsx} +2 -4
  36. package/src/components/{StackItem/StackItemContent.tsx → StackItemContent.tsx} +1 -2
  37. package/src/components/{StackItem/StackItemDragHandle.tsx → StackItemDragHandle.tsx} +1 -1
  38. package/src/components/{StackItem/StackItemHeading.tsx → StackItemHeading.tsx} +2 -2
  39. package/src/components/{StackItem/StackItemResizeHandle.tsx → StackItemResizeHandle.tsx} +1 -1
  40. package/src/components/{StackItem/StackItemSigil.tsx → StackItemSigil.tsx} +1 -1
  41. package/src/components/index.ts +2 -2
  42. package/src/hooks/useStackDropForElements.ts +4 -3
  43. package/dist/types/src/components/Stack/Stack.d.ts.map +0 -1
  44. package/dist/types/src/components/Stack/Stack.stories.d.ts +0 -9
  45. package/dist/types/src/components/Stack/Stack.stories.d.ts.map +0 -1
  46. package/dist/types/src/components/Stack/index.d.ts +0 -2
  47. package/dist/types/src/components/Stack/index.d.ts.map +0 -1
  48. package/dist/types/src/components/StackItem/MenuSignifier.d.ts.map +0 -1
  49. package/dist/types/src/components/StackItem/StackItem.d.ts.map +0 -1
  50. package/dist/types/src/components/StackItem/StackItem.stories.d.ts +0 -8
  51. package/dist/types/src/components/StackItem/StackItem.stories.d.ts.map +0 -1
  52. package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +0 -1
  53. package/dist/types/src/components/StackItem/StackItemDragHandle.d.ts.map +0 -1
  54. package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +0 -1
  55. package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts.map +0 -1
  56. package/dist/types/src/components/StackItem/StackItemSigil.d.ts.map +0 -1
  57. package/dist/types/src/components/StackItem/index.d.ts +0 -2
  58. package/dist/types/src/components/StackItem/index.d.ts.map +0 -1
  59. package/dist/types/src/components/defs.d.ts +0 -18
  60. package/dist/types/src/components/defs.d.ts.map +0 -1
  61. package/dist/types/src/components/deprecated/LayoutControls.d.ts.map +0 -1
  62. package/src/components/Stack/index.ts +0 -5
  63. package/src/components/StackItem/StackItem.stories.tsx +0 -49
  64. package/src/components/StackItem/index.ts +0 -5
  65. package/src/components/defs.ts +0 -26
  66. /package/dist/types/src/components/{deprecated/LayoutControls.d.ts → LayoutControls.d.ts} +0 -0
  67. /package/dist/types/src/components/{StackItem/MenuSignifier.d.ts → MenuSignifier.d.ts} +0 -0
  68. /package/dist/types/src/components/{StackItem/StackItemContent.d.ts → StackItemContent.d.ts} +0 -0
  69. /package/dist/types/src/components/{StackItem/StackItemDragHandle.d.ts → StackItemDragHandle.d.ts} +0 -0
  70. /package/dist/types/src/components/{StackItem/StackItemHeading.d.ts → StackItemHeading.d.ts} +0 -0
  71. /package/dist/types/src/components/{StackItem/StackItemResizeHandle.d.ts → StackItemResizeHandle.d.ts} +0 -0
  72. /package/dist/types/src/components/{StackItem/StackItemSigil.d.ts → StackItemSigil.d.ts} +0 -0
  73. /package/src/components/{StackItem/MenuSignifier.tsx → MenuSignifier.tsx} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-stack",
3
- "version": "0.8.2-main.fbd8ed0",
3
+ "version": "0.8.2-staging.7ac8446",
4
4
  "description": "A stack component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -47,12 +47,12 @@
47
47
  "@radix-ui/react-slot": "1.1.2",
48
48
  "@radix-ui/react-use-controllable-state": "1.1.0",
49
49
  "react-resize-detector": "^11.0.1",
50
- "@dxos/keyboard": "0.8.2-main.fbd8ed0",
51
- "@dxos/live-object": "0.8.2-main.fbd8ed0",
52
- "@dxos/react-ui-attention": "0.8.2-main.fbd8ed0",
53
- "@dxos/echo-schema": "0.8.2-main.fbd8ed0",
54
- "@dxos/react-ui-dnd": "0.8.2-main.fbd8ed0",
55
- "@dxos/util": "0.8.2-main.fbd8ed0"
50
+ "@dxos/echo-schema": "0.8.2-staging.7ac8446",
51
+ "@dxos/keyboard": "0.8.2-staging.7ac8446",
52
+ "@dxos/live-object": "0.8.2-staging.7ac8446",
53
+ "@dxos/react-ui-attention": "0.8.2-staging.7ac8446",
54
+ "@dxos/react-ui-dnd": "0.8.2-staging.7ac8446",
55
+ "@dxos/util": "0.8.2-staging.7ac8446"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@phosphor-icons/react": "^2.1.5",
@@ -61,24 +61,24 @@
61
61
  "react": "~18.2.0",
62
62
  "react-dom": "~18.2.0",
63
63
  "vite": "5.4.7",
64
- "@dxos/app-graph": "0.8.2-main.fbd8ed0",
65
- "@dxos/echo-schema": "0.8.2-main.fbd8ed0",
66
- "@dxos/client": "0.8.2-main.fbd8ed0",
67
- "@dxos/random": "0.8.2-main.fbd8ed0",
68
- "@dxos/react-ui-editor": "0.8.2-main.fbd8ed0",
69
- "@dxos/react-ui": "0.8.2-main.fbd8ed0",
70
- "@dxos/react-ui-theme": "0.8.2-main.fbd8ed0",
71
- "@dxos/storybook-utils": "0.8.2-main.fbd8ed0",
72
- "@dxos/test-utils": "0.8.2-main.fbd8ed0"
64
+ "@dxos/client": "0.8.2-staging.7ac8446",
65
+ "@dxos/app-graph": "0.8.2-staging.7ac8446",
66
+ "@dxos/echo-schema": "0.8.2-staging.7ac8446",
67
+ "@dxos/random": "0.8.2-staging.7ac8446",
68
+ "@dxos/react-ui": "0.8.2-staging.7ac8446",
69
+ "@dxos/react-ui-editor": "0.8.2-staging.7ac8446",
70
+ "@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
71
+ "@dxos/test-utils": "0.8.2-staging.7ac8446",
72
+ "@dxos/storybook-utils": "0.8.2-staging.7ac8446"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@phosphor-icons/react": "^2.1.5",
76
76
  "react": "~18.2.0",
77
77
  "react-dom": "~18.2.0",
78
- "@dxos/random": "0.8.2-main.fbd8ed0",
79
- "@dxos/react-ui": "0.8.2-main.fbd8ed0",
80
- "@dxos/client": "0.8.2-main.fbd8ed0",
81
- "@dxos/react-ui-theme": "0.8.2-main.fbd8ed0"
78
+ "@dxos/client": "0.8.2-staging.7ac8446",
79
+ "@dxos/random": "0.8.2-staging.7ac8446",
80
+ "@dxos/react-ui": "0.8.2-staging.7ac8446",
81
+ "@dxos/react-ui-theme": "0.8.2-staging.7ac8446"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public"
@@ -4,9 +4,17 @@
4
4
 
5
5
  import React, { forwardRef } from 'react';
6
6
 
7
- import { ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, useTranslation } from '@dxos/react-ui';
7
+ import {
8
+ Button,
9
+ ButtonGroup,
10
+ type ButtonGroupProps,
11
+ type ButtonProps,
12
+ Icon,
13
+ Tooltip,
14
+ useTranslation,
15
+ } from '@dxos/react-ui';
8
16
 
9
- import { translationKey } from '../../translations';
17
+ import { translationKey } from '../translations';
10
18
 
11
19
  export type LayoutControlEvent = 'solo' | 'close' | `${'pin' | 'increment'}-${'start' | 'end'}`;
12
20
  export type LayoutControlHandler = (event: LayoutControlEvent) => void;
@@ -27,7 +35,19 @@ export type LayoutControlsProps = Omit<ButtonGroupProps, 'onClick'> & {
27
35
  };
28
36
 
29
37
  const LayoutControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {
30
- return <IconButton iconOnly icon={icon} label={label} tooltipSide='bottom' variant='ghost' {...props} />;
38
+ return (
39
+ <Tooltip.Root>
40
+ <Tooltip.Trigger asChild>
41
+ <Button variant='ghost' {...props}>
42
+ <span className='sr-only'>{label}</span>
43
+ <Icon icon={icon} />
44
+ </Button>
45
+ </Tooltip.Trigger>
46
+ <Tooltip.Portal>
47
+ <Tooltip.Content side='bottom'>{label}</Tooltip.Content>
48
+ </Tooltip.Portal>
49
+ </Tooltip.Root>
50
+ );
31
51
  };
32
52
 
33
53
  export const LayoutControls = forwardRef<HTMLDivElement, LayoutControlsProps>(
@@ -2,8 +2,6 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
8
6
  import { type Meta, type StoryObj } from '@storybook/react';
9
7
  import React, { useState, useCallback } from 'react';
@@ -12,8 +10,8 @@ import { faker } from '@dxos/random';
12
10
  import { withTheme } from '@dxos/storybook-utils';
13
11
 
14
12
  import { Stack } from './Stack';
15
- import { StackItem } from '../StackItem';
16
- import { type StackItemData } from '../defs';
13
+ import { type StackItemData } from './StackContext';
14
+ import { StackItem } from './StackItem';
17
15
 
18
16
  type StoryStackItem = {
19
17
  id: string;
@@ -29,7 +27,7 @@ const KanbanBlock = ({ item }: { item: StoryStackItem }) => {
29
27
  );
30
28
  };
31
29
 
32
- const DefaultStory = () => {
30
+ const StorybookStack = () => {
33
31
  const [columns, setColumns] = useState<StoryStackItem[]>(
34
32
  faker.helpers.multiple(
35
33
  () =>
@@ -119,19 +117,19 @@ const DefaultStory = () => {
119
117
  );
120
118
  };
121
119
 
122
- const meta: Meta<typeof DefaultStory> = {
123
- title: 'ui/react-ui-stack/Stack',
124
- component: DefaultStory,
125
- decorators: [withTheme],
126
- argTypes: { orientation: { control: 'radio', options: ['horizontal', 'vertical'] } },
127
- };
128
-
129
- export default meta;
130
-
131
- type Story = StoryObj<typeof DefaultStory>;
120
+ type Story = StoryObj<typeof StorybookStack>;
132
121
 
133
122
  export const Default: Story = {
134
123
  args: {
135
124
  orientation: 'horizontal',
136
125
  },
137
126
  };
127
+
128
+ const meta: Meta<typeof StorybookStack> = {
129
+ title: 'ui/react-ui-stack/Stack',
130
+ component: StorybookStack,
131
+ decorators: [withTheme],
132
+ argTypes: { orientation: { control: 'radio', options: ['horizontal', 'vertical'] } },
133
+ };
134
+
135
+ export default meta;
@@ -9,9 +9,8 @@ import React, { Children, type CSSProperties, type ComponentPropsWithRef, forwar
9
9
  import { type ThemedClassName, ListItem } from '@dxos/react-ui';
10
10
  import { mx } from '@dxos/react-ui-theme';
11
11
 
12
- import { useStackDropForElements } from '../../hooks';
13
- import { StackContext } from '../StackContext';
14
- import { type StackContextValue } from '../defs';
12
+ import { type StackContextValue, StackContext } from './StackContext';
13
+ import { useStackDropForElements } from '../hooks';
15
14
 
16
15
  export type Orientation = 'horizontal' | 'vertical';
17
16
  export type Size = 'intrinsic' | 'contain' | 'contain-fit-content';
@@ -2,10 +2,22 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
5
6
  import { createContext, useContext } from 'react';
6
7
 
8
+ import { type Size as DndSize } from '@dxos/react-ui-dnd';
9
+
7
10
  import { type Orientation, type Size } from './Stack';
8
- import { type StackItemSize, type StackItemRearrangeHandler } from './defs';
11
+
12
+ export type StackItemSize = DndSize;
13
+
14
+ export type StackItemData = { id: string; type: 'column' | 'card' };
15
+
16
+ export type StackItemRearrangeHandler<Data extends { id: string } = StackItemData> = (
17
+ source: Data,
18
+ target: Data,
19
+ closestEdge: Edge | null,
20
+ ) => void;
9
21
 
10
22
  export type StackContextValue = {
11
23
  orientation: Orientation;
@@ -19,6 +19,7 @@ import { type ThemedClassName, ListItem } from '@dxos/react-ui';
19
19
  import { resizeAttributes, sizeStyle } from '@dxos/react-ui-dnd';
20
20
  import { mx } from '@dxos/react-ui-theme';
21
21
 
22
+ import { useStack, StackItemContext, type StackItemSize, type StackItemData } from './StackContext';
22
23
  import { StackItemContent, type StackItemContentProps } from './StackItemContent';
23
24
  import { StackItemDragHandle, type StackItemDragHandleProps } from './StackItemDragHandle';
24
25
  import {
@@ -35,15 +36,13 @@ import {
35
36
  type StackItemSigilButtonProps,
36
37
  StackItemSigilButton,
37
38
  } from './StackItemSigil';
38
- import { useStack, StackItemContext } from '../StackContext';
39
- import { type StackItemSize, type StackItemData } from '../defs';
40
39
 
41
40
  // NOTE: 48rem fills the screen on a MacbookPro with the sidebars closed.
42
41
  export const DEFAULT_HORIZONTAL_SIZE = 48 satisfies StackItemSize;
43
42
  export const DEFAULT_VERTICAL_SIZE = 'min-content' satisfies StackItemSize;
44
43
  export const DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE satisfies StackItemSize;
45
44
 
46
- type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {
45
+ export type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {
47
46
  item: Omit<StackItemData, 'type'>;
48
47
  order?: number;
49
48
  size?: StackItemSize;
@@ -198,7 +197,6 @@ export const StackItem = {
198
197
  };
199
198
 
200
199
  export type {
201
- StackItemRootProps,
202
200
  StackItemContentProps,
203
201
  StackItemHeadingProps,
204
202
  StackItemHeadingLabelProps,
@@ -7,7 +7,7 @@ import React, { type ComponentPropsWithoutRef, forwardRef } from 'react';
7
7
  import { type ThemedClassName } from '@dxos/react-ui';
8
8
  import { mx } from '@dxos/react-ui-theme';
9
9
 
10
- import { useStack } from '../StackContext';
10
+ import { useStack } from './StackContext';
11
11
 
12
12
  export type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
13
13
  /**
@@ -53,7 +53,6 @@ export const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps
53
53
  ...(statusbar ? ['var(--statusbar-size)'] : []),
54
54
  ].join(' '),
55
55
  }}
56
- data-popover-collision-boundary={true}
57
56
  ref={forwardedRef}
58
57
  >
59
58
  {children}
@@ -5,7 +5,7 @@
5
5
  import { Slot } from '@radix-ui/react-slot';
6
6
  import React, { type ComponentPropsWithoutRef } from 'react';
7
7
 
8
- import { useStackItem } from '../StackContext';
8
+ import { useStackItem } from './StackContext';
9
9
 
10
10
  export type StackItemDragHandleProps = ComponentPropsWithoutRef<'button'> & { asChild: boolean };
11
11
 
@@ -9,7 +9,7 @@ import { type ThemedClassName } from '@dxos/react-ui';
9
9
  import { useAttention, type AttendableId, type Related } from '@dxos/react-ui-attention';
10
10
  import { mx } from '@dxos/react-ui-theme';
11
11
 
12
- import { useStack } from '../StackContext';
12
+ import { useStack } from './StackContext';
13
13
 
14
14
  export type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;
15
15
 
@@ -24,7 +24,7 @@ export const StackItemHeading = ({ children, classNames, ...props }: StackItemHe
24
24
  tabIndex={0}
25
25
  {...focusableGroupAttrs}
26
26
  className={mx(
27
- 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0 bg-headerSurface',
27
+ 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0',
28
28
  orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',
29
29
  classNames,
30
30
  )}
@@ -6,8 +6,8 @@ import React from 'react';
6
6
 
7
7
  import { ResizeHandle } from '@dxos/react-ui-dnd';
8
8
 
9
+ import { useStack, useStackItem } from './StackContext';
9
10
  import { DEFAULT_EXTRINSIC_SIZE } from './StackItem';
10
- import { useStack, useStackItem } from '../StackContext';
11
11
 
12
12
  const MIN_WIDTH = 20;
13
13
  const MIN_HEIGHT = 3;
@@ -12,7 +12,7 @@ import { descriptionText, mx } from '@dxos/react-ui-theme';
12
12
  import { getHostPlatform } from '@dxos/util';
13
13
 
14
14
  import { MenuSignifierHorizontal } from './MenuSignifier';
15
- import { translationKey } from '../../translations';
15
+ import { translationKey } from '../translations';
16
16
 
17
17
  export type KeyBinding = {
18
18
  windows?: string;
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- export * from './defs';
6
-
7
5
  export * from './Stack';
8
6
  export * from './StackItem';
7
+ export * from './LayoutControls';
8
+ export * from './StackContext';
@@ -8,22 +8,23 @@ 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 StackItemRearrangeHandler, type StackItemData, type Orientation } from '../components';
11
+ import { type Orientation } from '../components/Stack';
12
+ import { type StackItemRearrangeHandler, type StackItemData } from '../components/StackContext';
12
13
 
13
14
  /**
14
15
  * Hook to handle drag and drop functionality for Stack components.
15
16
  */
16
17
  export const useStackDropForElements = ({
17
- id,
18
18
  element,
19
19
  selfDroppable,
20
20
  orientation,
21
+ id,
21
22
  onRearrange,
22
23
  }: {
23
- id?: string;
24
24
  element: HTMLDivElement | null;
25
25
  selfDroppable: boolean;
26
26
  orientation: Orientation;
27
+ id?: string;
27
28
  onRearrange?: StackItemRearrangeHandler;
28
29
  }) => {
29
30
  const [dropping, setDropping] = useState(false);
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAgC,KAAK,qBAAqB,EAAiC,MAAM,OAAO,CAAC;AAEvH,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,gBAAgB,CAAC;AAIhE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AACpD,MAAM,MAAM,IAAI,GAAG,WAAW,GAAG,SAAS,GAAG,qBAAqB,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,GAC9F,OAAO,CAAC,iBAAiB,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,kBAAkB,gFAAgF,CAAC;AAChH,eAAO,MAAM,gBAAgB,gFAAgF,CAAC;AAG9G,eAAO,MAAM,mCAAmC,2HAC0E,CAAC;AAC3H,eAAO,MAAM,iCAAiC,2HAC4E,CAAC;AAE3H,eAAO,MAAM,wBAAwB;;CAAqC,CAAC;AAE3E,eAAO,MAAM,KAAK,gGA8EjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import '@dxos-theme';
2
- import { type Meta, type StoryObj } from '@storybook/react';
3
- import React from 'react';
4
- declare const DefaultStory: () => React.JSX.Element;
5
- declare const meta: Meta<typeof DefaultStory>;
6
- export default meta;
7
- type Story = StoryObj<typeof DefaultStory>;
8
- export declare const Default: Story;
9
- //# sourceMappingURL=Stack.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAgC,MAAM,OAAO,CAAC;AAuBrD,QAAA,MAAM,YAAY,yBAwFjB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAKnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './Stack';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuSignifier.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/MenuSignifier.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,uBAAuB,yBAoBnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAIjC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,EAAyC,KAAK,qBAAqB,EAAe,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,gBAAgB,CAAC;AAIhE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAE/B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAGjE,eAAO,MAAM,uBAAuB,KAA6B,CAAC;AAClE,eAAO,MAAM,qBAAqB,gBAAwC,CAAC;AAC3E,eAAO,MAAM,sBAAsB,KAAkD,CAAC;AAEtF,KAAK,kBAAkB,GAAG,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,GAAG;IACxE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qBAAqB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;CAC9C,CAAC;AAuIF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;CASrB,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,CAAC"}
@@ -1,8 +0,0 @@
1
- import '@dxos-theme';
2
- import { type Meta, type StoryObj } from '@storybook/react';
3
- import { StackItem } from './StackItem';
4
- declare const meta: Meta<typeof StackItem.Root>;
5
- export default meta;
6
- type Story = StoryObj<typeof StackItem.Root>;
7
- export declare const Default: Story;
8
- //# sourceMappingURL=StackItem.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackItem.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAM5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAAC,IAAI,CAwBrC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackItemContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IACrF;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;IAtB3B;;;OAGG;cACO,OAAO;IAEjB;;OAEG;gBACS,OAAO;IAEnB;;;OAGG;WACI,WAAW,GAAG,OAAO,GAAG,QAAQ;wCAmCxC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackItemDragHandle.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemDragHandle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAI7D,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjG,eAAO,MAAM,mBAAmB,GAAI,uBAAuB,wBAAwB,sBAUlF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackItemHeading.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemHeading.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,KAAK,qBAAqB,EAAc,MAAM,OAAO,CAAC;AAErG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAgB,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAKzF,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AAErF,eAAO,MAAM,gBAAgB,GAAI,oCAAoC,qBAAqB,sBAmBzF,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG,YAAY,GAAG,OAAO,CAAC;AAE/G,eAAO,MAAM,qBAAqB,oHAgBjC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackItemResizeHandle.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemResizeHandle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE5C,eAAO,MAAM,qBAAqB,yBAajC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackItemSigil.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemSigil.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAY,KAAK,iBAAiB,EAAgC,MAAM,OAAO,CAAC;AAE9F,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAU,KAAK,WAAW,EAAyD,MAAM,gBAAgB,CAAC;AACjH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAgB,MAAM,0BAA0B,CAAC;AAOzF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,YAAY,GAAG,MAAM,CAAC,CAAC;AAElF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAClE,YAAY,GACZ,OAAO,GAAG;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEJ,eAAO,MAAM,oBAAoB,kHAiBhC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CACjD;IACE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD,GAAG,OAAO,CACZ,CAAC;AAEF,eAAO,MAAM,cAAc;mBARR,MAAM;kBACP,MAAM;cACV,oBAAoB,EAAE,EAAE;UAC5B,MAAM;eACD,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI;;;2CAyGpD,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './StackItem';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
- import { type Size as DndSize } from '@dxos/react-ui-dnd';
3
- import { type Orientation, type Size } from './Stack';
4
- export type StackItemSize = DndSize;
5
- export type StackItemData = {
6
- id: string;
7
- type: 'column' | 'card';
8
- };
9
- export type StackItemRearrangeHandler<Data extends {
10
- id: string;
11
- } = StackItemData> = (source: Data, target: Data, closestEdge: Edge | null) => void;
12
- export type StackContextValue = {
13
- orientation: Orientation;
14
- rail: boolean;
15
- size: Size;
16
- onRearrange?: StackItemRearrangeHandler;
17
- };
18
- //# sourceMappingURL=defs.d.ts.map
@@ -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 +0,0 @@
1
- {"version":3,"file":"LayoutControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/deprecated/LayoutControls.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAe,KAAK,gBAAgB,EAAgD,MAAM,gBAAgB,CAAC;AAIlH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,GAAG,KAAK,GAAG,WAAW,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;AAChG,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IACpE,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;IAChD,YAAY,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;CAChC,CAAC;AAMF,eAAO,MAAM,cAAc,yGA4E1B,CAAC"}
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- export * from './Stack';
@@ -1,49 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta, type StoryObj } from '@storybook/react';
8
- import React from 'react';
9
-
10
- import { Icon, DropdownMenu } from '@dxos/react-ui';
11
- import { withTheme } from '@dxos/storybook-utils';
12
-
13
- import { StackItem } from './StackItem';
14
-
15
- const meta: Meta<typeof StackItem.Root> = {
16
- title: 'ui/react-ui-stack/StackItem',
17
- component: StackItem.Root,
18
- render: (args) => (
19
- <StackItem.Root role='section' {...args} classNames='w-[20rem] border border-separator'>
20
- <StackItem.Heading>
21
- <span className='sr-only'>Title</span>
22
- <div role='none' className='sticky -block-start-px bg-[--sticky-bg] p-1 is-full'>
23
- <DropdownMenu.Root>
24
- <DropdownMenu.Trigger asChild>
25
- <StackItem.SigilButton>
26
- <Icon icon={'ph--dots-three--regular'} size={5} />
27
- </StackItem.SigilButton>
28
- </DropdownMenu.Trigger>
29
- </DropdownMenu.Root>
30
- </div>
31
- </StackItem.Heading>
32
- <StackItem.Content classNames='p-2'>Content</StackItem.Content>
33
- </StackItem.Root>
34
- ),
35
- decorators: [withTheme],
36
- parameters: {
37
- layout: 'centered',
38
- },
39
- };
40
-
41
- export default meta;
42
-
43
- type Story = StoryObj<typeof StackItem.Root>;
44
-
45
- export const Default: Story = {
46
- args: {
47
- item: { id: '1' },
48
- },
49
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- export * from './StackItem';
@@ -1,26 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
6
-
7
- import { type Size as DndSize } from '@dxos/react-ui-dnd';
8
-
9
- import { type Orientation, type Size } from './Stack';
10
-
11
- export type StackItemSize = DndSize;
12
-
13
- export type StackItemData = { id: string; type: 'column' | 'card' };
14
-
15
- export type StackItemRearrangeHandler<Data extends { id: string } = StackItemData> = (
16
- source: Data,
17
- target: Data,
18
- closestEdge: Edge | null,
19
- ) => void;
20
-
21
- export type StackContextValue = {
22
- orientation: Orientation;
23
- rail: boolean;
24
- size: Size;
25
- onRearrange?: StackItemRearrangeHandler;
26
- };