@dxos/react-ui-stack 0.8.3-main.7f5a14c → 0.8.3

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 (34) hide show
  1. package/dist/lib/browser/index.mjs +74 -29
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +77 -26
  5. package/dist/lib/node/index.cjs.map +3 -3
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +74 -29
  8. package/dist/lib/node-esm/index.mjs.map +3 -3
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/components/StackContext.d.ts +1 -0
  11. package/dist/types/src/components/StackContext.d.ts.map +1 -1
  12. package/dist/types/src/components/StackItem/StackItem.d.ts +3 -1
  13. package/dist/types/src/components/StackItem/StackItem.d.ts.map +1 -1
  14. package/dist/types/src/components/StackItem/StackItemContent.d.ts +8 -0
  15. package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +1 -1
  16. package/dist/types/src/components/StackItem/StackItemHeading.d.ts +4 -2
  17. package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +1 -1
  18. package/dist/types/src/exemplars/Card/Card.d.ts +4 -0
  19. package/dist/types/src/exemplars/Card/Card.d.ts.map +1 -1
  20. package/dist/types/src/exemplars/Card/fragments.d.ts +9 -3
  21. package/dist/types/src/exemplars/Card/fragments.d.ts.map +1 -1
  22. package/dist/types/src/exemplars/Card/index.d.ts +1 -0
  23. package/dist/types/src/exemplars/Card/index.d.ts.map +1 -1
  24. package/dist/types/src/exemplars/CardStack/CardStack.d.ts.map +1 -1
  25. package/package.json +19 -19
  26. package/src/components/StackContext.tsx +1 -0
  27. package/src/components/StackItem/StackItem.stories.tsx +1 -1
  28. package/src/components/StackItem/StackItem.tsx +10 -1
  29. package/src/components/StackItem/StackItemContent.tsx +27 -11
  30. package/src/components/StackItem/StackItemHeading.tsx +29 -4
  31. package/src/exemplars/Card/Card.tsx +6 -2
  32. package/src/exemplars/Card/fragments.ts +10 -2
  33. package/src/exemplars/Card/index.ts +1 -0
  34. package/src/exemplars/CardStack/CardStack.tsx +1 -0
@@ -25,6 +25,7 @@ export type StackItemContextValue = {
25
25
  setSize: (nextSize: StackItemSize, commit?: boolean) => void;
26
26
  state: ItemDragState;
27
27
  setState: (state: ItemDragState) => void;
28
+ role?: string;
28
29
  };
29
30
  export declare const StackItemContext: import("react").Context<StackItemContextValue>;
30
31
  export declare const useStackItem: () => StackItemContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"StackContext.d.ts","sourceRoot":"","sources":["../../../../src/components/StackContext.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAE5E,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;AAEF,eAAO,MAAM,YAAY,4CAIvB,CAAC;AAEH,eAAO,MAAM,QAAQ,yBAAiC,CAAC;AAEvD,MAAM,MAAM,aAAa,GACrB;IACE,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,GAAG,CAAC;CACX,GACD;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEN,eAAO,MAAM,IAAI,EAAE,aAAgC,CAAC;AAEpD,MAAM,MAAM,qBAAqB,GAAG;IAClC,iBAAiB,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;I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,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,gBAAgB,gDAM3B,CAAC;AAEH,eAAO,MAAM,YAAY,6BAAqC,CAAC"}
@@ -33,10 +33,12 @@ export declare const StackItem: {
33
33
  } & {
34
34
  toolbar?: boolean;
35
35
  statusbar?: boolean;
36
+ layoutManaged?: boolean;
36
37
  size?: "intrinsic" | "video" | "square";
37
38
  } & React.RefAttributes<HTMLDivElement>>;
38
- Heading: ({ children, classNames, asChild, ...props }: StackItemHeadingProps) => React.JSX.Element;
39
+ Heading: ({ children, classNames, asChild, separateOnScroll, ...props }: StackItemHeadingProps) => React.JSX.Element;
39
40
  HeadingLabel: React.ForwardRefExoticComponent<Omit<StackItemHeadingLabelProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
41
+ HeadingStickyContent: ({ children }: React.PropsWithChildren<{}>) => React.JSX.Element;
40
42
  ResizeHandle: () => React.JSX.Element;
41
43
  DragHandle: ({ asChild, children }: StackItemDragHandleProps) => React.JSX.Element;
42
44
  Sigil: React.ForwardRefExoticComponent<{
@@ -1 +1 @@
1
- {"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,EAIZ,KAAK,qBAAqB,EAE1B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,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,q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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;AAqMF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,KAAK,SAAS,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,cAAc,yBAAyB,6BAG3E,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;gCAL6B,yBAAyB;CAgB3E,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
@@ -10,6 +10,10 @@ export type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'di
10
10
  * Whether to provide for the layout of a statusbar after the content.
11
11
  */
12
12
  statusbar?: boolean;
13
+ /**
14
+ * Whether the consumer intends to do something custom and typical affordances should not apply
15
+ */
16
+ layoutManaged?: boolean;
13
17
  /**
14
18
  * Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for
15
19
  * convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.
@@ -32,6 +36,10 @@ export declare const StackItemContent: React.ForwardRefExoticComponent<Omit<Omit
32
36
  * Whether to provide for the layout of a statusbar after the content.
33
37
  */
34
38
  statusbar?: boolean;
39
+ /**
40
+ * Whether the consumer intends to do something custom and typical affordances should not apply
41
+ */
42
+ layoutManaged?: boolean;
35
43
  /**
36
44
  * Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for
37
45
  * convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.
@@ -1 +1 @@
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
+ {"version":3,"file":"StackItemContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAuB,MAAM,OAAO,CAAC;AAElF,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;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;IA3B3B;;;OAGG;cACO,OAAO;IAEjB;;OAEG;gBACS,OAAO;IAEnB;;OAEG;oBACa,OAAO;IAEvB;;;OAGG;WACI,WAAW,GAAG,OAAO,GAAG,QAAQ;wCA8CxC,CAAC"}
@@ -1,10 +1,12 @@
1
- import React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type PropsWithChildren } from 'react';
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
3
  import { type AttendableId, type Related } from '@dxos/react-ui-attention';
4
4
  export type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
5
5
  asChild?: boolean;
6
+ separateOnScroll?: boolean;
6
7
  };
7
- export declare const StackItemHeading: ({ children, classNames, asChild, ...props }: StackItemHeadingProps) => React.JSX.Element;
8
+ export declare const StackItemHeading: ({ children, classNames, asChild, separateOnScroll, ...props }: StackItemHeadingProps) => React.JSX.Element;
9
+ export declare const StackItemHeadingStickyContent: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
8
10
  export type StackItemHeadingLabelProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & AttendableId & Related;
9
11
  export declare const StackItemHeadingLabel: React.ForwardRefExoticComponent<Omit<StackItemHeadingLabelProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
10
12
  //# sourceMappingURL=StackItemHeading.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackItemHeading.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemHeading.tsx"],"names":[],"mappings":"AAMA,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,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7G,eAAO,MAAM,gBAAgB,GAAI,6CAA6C,qBAAqB,sBAsBlG,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
+ {"version":3,"file":"StackItemHeading.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemHeading.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EACZ,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAE1B,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAEf,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,GAAG;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,+DAM9B,qBAAqB,sBAyBvB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,cAAc,iBAAiB,CAAC,EAAE,CAAC,sBAMhF,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"}
@@ -28,10 +28,14 @@ export declare const Card: {
28
28
  } & React.RefAttributes<HTMLDivElement>>;
29
29
  Toolbar: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toolbar").ToolbarProps, "className"> & {
30
30
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
31
+ } & {
32
+ layoutManaged?: boolean;
31
33
  } & React.RefAttributes<HTMLDivElement>>;
32
34
  ToolbarIconButton: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
33
35
  ToolbarSeparator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
34
36
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
37
+ } & {
38
+ subdued?: boolean;
35
39
  } & {
36
40
  variant?: "gap" | "line";
37
41
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
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,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA6FpG,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;;;;kBA5IqE,OAAO;;;;;kBAAP,OAAO;;oCAiCzC,iBAAiB,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;;;;kBAjCF,OAAO;;;;;;;;;;;;sBAsExB,OAAO;;;;;;oBAwBjD,eAAe;;;;kBA9F4C,OAAO;;;;;kBAAP,OAAO;;CA0J5F,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"}
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,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiGpG,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;;;;kBAhJqE,OAAO;;;;;kBAAP,OAAO;;oCAiCzC,iBAAiB,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;;;;kBAjCF,OAAO;;;;;;;;;;;;;;;;sBA0ExB,OAAO;;;;;;oBAwBjD,eAAe;;;;kBAlG4C,OAAO;;;;;kBAAP,OAAO;;CA8J5F,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"}
@@ -1,7 +1,13 @@
1
1
  export declare const cardRoot = "contain-layout pli-2 plb-1 first-of-type:pbs-0 last-of-type:pbe-0";
2
2
  export declare const cardContent = "rounded overflow-hidden bg-cardSurface border border-separator dark:border-subduedSeparator dx-focus-ring-group-y-indicator relative min-bs-[--rail-item] group/card";
3
- export declare const cardSpacing = "pli-card-spacing-inline mlb-card-spacing-block";
4
- export declare const cardText = "pli-card-spacing-inline mlb-card-spacing-block";
3
+ export declare const cardSpacing = "pli-cardSpacingInline mlb-cardSpacingBlock";
4
+ export declare const labelSpacing = "mbs-inputSpacingBlock mbe-labelSpacingBlock";
5
+ export declare const cardDialogContent = "p-0 bs-content min-bs-[8rem] max-bs-full md:max-is-[32rem] overflow-hidden";
6
+ export declare const cardDialogHeader = "pli-cardSpacingInline mbs-cardSpacingBlock flex justify-between";
7
+ export declare const cardDialogOverflow = "overflow-y-auto min-bs-0 flex-1";
8
+ export declare const cardDialogPaddedOverflow = "overflow-y-auto min-bs-0 flex-1 plb-cardSpacingBlock";
9
+ export declare const cardDialogSearchListRoot = "pli-cardSpacingInline pbs-cardSpacingBlock [&>input]:mbe-0 min-bs-0 flex-1 flex flex-col";
10
+ export declare const cardText = "pli-cardSpacingInline mlb-cardSpacingBlock";
5
11
  export declare const cardHeading = "text-lg font-medium line-clamp-2";
6
- export declare const cardChrome = "pli-[--dx-card-spacing-chrome] mlb-[--dx-card-spacing-chrome] [&_.dx-button]:text-start [&_.dx-button]:is-full";
12
+ export declare const cardChrome = "pli-[--dx-cardSpacingChrome] mlb-[--dx-cardSpacingChrome] [&_.dx-button]:text-start [&_.dx-button]:is-full";
7
13
  //# sourceMappingURL=fragments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fragments.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/fragments.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,sEAAsE,CAAC;AAE5F,eAAO,MAAM,WAAW,yKACgJ,CAAC;AAEzK,eAAO,MAAM,WAAW,mDAAmD,CAAC;AAE5E,eAAO,MAAM,QAAQ,mDAAc,CAAC;AAEpC,eAAO,MAAM,WAAW,qCAAqC,CAAC;AAE9D,eAAO,MAAM,UAAU,mHAC2F,CAAC"}
1
+ {"version":3,"file":"fragments.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/fragments.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,sEAAsE,CAAC;AAE5F,eAAO,MAAM,WAAW,yKACgJ,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,3 +1,4 @@
1
1
  export * from './Card';
2
2
  export * from './CardDragPreview';
3
+ export * from './fragments';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
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 +1 @@
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;AA8B/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,eAAO,MAAM,SAAS;;;;kBA/FqE,OAAO;;;;;kBAAP,OAAO;;;;;;kBAAP,OAAO;;;;;kBAAP,OAAO;;;;;CAsGjG,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
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,eAAO,MAAM,SAAS;;;;kBAhGqE,OAAO;;;;;kBAAP,OAAO;;;;;;kBAAP,OAAO;;;;;kBAAP,OAAO;;;;;CAuGjG,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-stack",
3
- "version": "0.8.3-main.7f5a14c",
3
+ "version": "0.8.3",
4
4
  "description": "A stack component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -49,12 +49,12 @@
49
49
  "@radix-ui/react-slot": "1.1.2",
50
50
  "@radix-ui/react-use-controllable-state": "1.1.0",
51
51
  "react-resize-detector": "^11.0.1",
52
- "@dxos/echo-schema": "0.8.3-main.7f5a14c",
53
- "@dxos/keyboard": "0.8.3-main.7f5a14c",
54
- "@dxos/react-ui-attention": "0.8.3-main.7f5a14c",
55
- "@dxos/react-ui-dnd": "0.8.3-main.7f5a14c",
56
- "@dxos/util": "0.8.3-main.7f5a14c",
57
- "@dxos/live-object": "0.8.3-main.7f5a14c"
52
+ "@dxos/echo-schema": "0.8.3",
53
+ "@dxos/keyboard": "0.8.3",
54
+ "@dxos/react-ui-attention": "0.8.3",
55
+ "@dxos/live-object": "0.8.3",
56
+ "@dxos/react-ui-dnd": "0.8.3",
57
+ "@dxos/util": "0.8.3"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@phosphor-icons/react": "^2.1.5",
@@ -63,23 +63,23 @@
63
63
  "react": "~18.2.0",
64
64
  "react-dom": "~18.2.0",
65
65
  "vite": "5.4.7",
66
- "@dxos/app-graph": "0.8.3-main.7f5a14c",
67
- "@dxos/client": "0.8.3-main.7f5a14c",
68
- "@dxos/echo-schema": "0.8.3-main.7f5a14c",
69
- "@dxos/random": "0.8.3-main.7f5a14c",
70
- "@dxos/react-ui": "0.8.3-main.7f5a14c",
71
- "@dxos/react-ui-theme": "0.8.3-main.7f5a14c",
72
- "@dxos/storybook-utils": "0.8.3-main.7f5a14c",
73
- "@dxos/test-utils": "0.8.3-main.7f5a14c"
66
+ "@dxos/app-graph": "0.8.3",
67
+ "@dxos/client": "0.8.3",
68
+ "@dxos/echo-schema": "0.8.3",
69
+ "@dxos/react-ui": "0.8.3",
70
+ "@dxos/random": "0.8.3",
71
+ "@dxos/react-ui-theme": "0.8.3",
72
+ "@dxos/test-utils": "0.8.3",
73
+ "@dxos/storybook-utils": "0.8.3"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@phosphor-icons/react": "^2.1.5",
77
77
  "react": "~18.2.0",
78
78
  "react-dom": "~18.2.0",
79
- "@dxos/random": "0.8.3-main.7f5a14c",
80
- "@dxos/client": "0.8.3-main.7f5a14c",
81
- "@dxos/react-ui": "0.8.3-main.7f5a14c",
82
- "@dxos/react-ui-theme": "0.8.3-main.7f5a14c"
79
+ "@dxos/client": "0.8.3",
80
+ "@dxos/random": "0.8.3",
81
+ "@dxos/react-ui-theme": "0.8.3",
82
+ "@dxos/react-ui": "0.8.3"
83
83
  },
84
84
  "publishConfig": {
85
85
  "access": "public"
@@ -44,6 +44,7 @@ export type StackItemContextValue = {
44
44
  setSize: (nextSize: StackItemSize, commit?: boolean) => void;
45
45
  state: ItemDragState;
46
46
  setState: (state: ItemDragState) => void;
47
+ role?: string;
47
48
  };
48
49
 
49
50
  export const StackItemContext = createContext<StackItemContextValue>({
@@ -23,7 +23,7 @@ const meta: Meta<typeof StackItem.Root> = {
23
23
  <DropdownMenu.Root>
24
24
  <DropdownMenu.Trigger asChild>
25
25
  <StackItem.SigilButton>
26
- <Icon icon={'ph--dots-three--regular'} size={5} />
26
+ <Icon icon='ph--dots-three--regular' size={5} />
27
27
  </StackItem.SigilButton>
28
28
  </DropdownMenu.Trigger>
29
29
  </DropdownMenu.Root>
@@ -20,6 +20,7 @@ import React, {
20
20
  type ComponentPropsWithRef,
21
21
  useCallback,
22
22
  type ReactNode,
23
+ useMemo,
23
24
  } from 'react';
24
25
  import { createPortal } from 'react-dom';
25
26
 
@@ -34,6 +35,7 @@ import {
34
35
  StackItemHeadingLabel,
35
36
  type StackItemHeadingProps,
36
37
  type StackItemHeadingLabelProps,
38
+ StackItemHeadingStickyContent,
37
39
  } from './StackItemHeading';
38
40
  import { StackItemResizeHandle, type StackItemResizeHandleProps } from './StackItemResizeHandle';
39
41
  import {
@@ -214,8 +216,13 @@ const StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(
214
216
  return true;
215
217
  };
216
218
 
219
+ const stackItemContextValue = useMemo(
220
+ () => ({ selfDragHandleRef, size, setSize, state: dragState, setState: setDragState, role }),
221
+ [selfDragHandleRef, size, setSize, dragState, setDragState, role],
222
+ );
223
+
217
224
  return (
218
- <StackItemContext.Provider value={{ selfDragHandleRef, size, setSize, state: dragState, setState: setDragState }}>
225
+ <StackItemContext.Provider value={stackItemContextValue}>
219
226
  <Root
220
227
  {...props}
221
228
  tabIndex={0}
@@ -229,6 +236,7 @@ const StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(
229
236
  : 'dx-focus-ring-group-y',
230
237
  orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',
231
238
  rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),
239
+ role === 'section' && orientation !== 'horizontal' && 'border-be border-subduedSeparator',
232
240
  classNames,
233
241
  )}
234
242
  data-dx-stack-item
@@ -266,6 +274,7 @@ export const StackItem = {
266
274
  Content: StackItemContent,
267
275
  Heading: StackItemHeading,
268
276
  HeadingLabel: StackItemHeadingLabel,
277
+ HeadingStickyContent: StackItemHeadingStickyContent,
269
278
  ResizeHandle: StackItemResizeHandle,
270
279
  DragHandle: StackItemDragHandle,
271
280
  Sigil: StackItemSigil,
@@ -2,12 +2,12 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import React, { type ComponentPropsWithoutRef, forwardRef } from 'react';
5
+ import React, { type ComponentPropsWithoutRef, forwardRef, useMemo } from 'react';
6
6
 
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, useStackItem } from '../StackContext';
11
11
 
12
12
  export type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
13
13
  /**
@@ -21,6 +21,11 @@ export type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'di
21
21
  */
22
22
  statusbar?: boolean;
23
23
 
24
+ /**
25
+ * Whether the consumer intends to do something custom and typical affordances should not apply
26
+ */
27
+ layoutManaged?: boolean;
28
+
24
29
  /**
25
30
  * Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for
26
31
  * convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.
@@ -33,9 +38,22 @@ export type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'di
33
38
  * The `toolbar` flag must be provided since this component provides for the layout of content with the toolbar.
34
39
  */
35
40
  export const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(
36
- ({ children, toolbar, statusbar, classNames, size = 'intrinsic', ...props }, forwardedRef) => {
41
+ ({ children, toolbar, statusbar, layoutManaged, classNames, size = 'intrinsic', ...props }, forwardedRef) => {
37
42
  const { size: stackItemSize } = useStack();
38
-
43
+ const { role } = useStackItem();
44
+ const style = useMemo(
45
+ () =>
46
+ layoutManaged
47
+ ? {}
48
+ : {
49
+ gridTemplateRows: [
50
+ ...(toolbar ? [role === 'section' ? 'calc(var(--toolbar-size) - 1px)' : 'var(--toolbar-size)'] : []),
51
+ '1fr',
52
+ ...(statusbar ? ['var(--statusbar-size)'] : []),
53
+ ].join(' '),
54
+ },
55
+ [toolbar, statusbar, layoutManaged],
56
+ );
39
57
  return (
40
58
  <div
41
59
  role='none'
@@ -44,15 +62,13 @@ export const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps
44
62
  'group grid grid-cols-[100%]',
45
63
  stackItemSize === 'contain' && 'min-bs-0 overflow-hidden',
46
64
  size === 'video' ? 'aspect-video' : size === 'square' && 'aspect-square',
65
+ toolbar && '[&_.dx-toolbar]:relative [&_.dx-toolbar]:border-be [&_.dx-toolbar]:border-subduedSeparator',
66
+ role === 'section' &&
67
+ toolbar &&
68
+ '[&_.dx-toolbar]:sticky [&_.dx-toolbar]:z-[1] [&_.dx-toolbar]:block-start-0 [&_.dx-toolbar]:-mbe-px [&_.dx-toolbar]:min-is-0',
47
69
  classNames,
48
70
  )}
49
- style={{
50
- gridTemplateRows: [
51
- ...(toolbar ? ['var(--rail-action)'] : []),
52
- '1fr',
53
- ...(statusbar ? ['var(--statusbar-size)'] : []),
54
- ].join(' '),
55
- }}
71
+ style={style}
56
72
  data-popover-collision-boundary={true}
57
73
  ref={forwardedRef}
58
74
  >
@@ -4,7 +4,12 @@
4
4
 
5
5
  import { useFocusableGroup } from '@fluentui/react-tabster';
6
6
  import { Slot } from '@radix-ui/react-slot';
7
- import React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, forwardRef } from 'react';
7
+ import React, {
8
+ type ComponentPropsWithoutRef,
9
+ type ComponentPropsWithRef,
10
+ forwardRef,
11
+ type PropsWithChildren,
12
+ } from 'react';
8
13
 
9
14
  import { type ThemedClassName } from '@dxos/react-ui';
10
15
  import { useAttention, type AttendableId, type Related } from '@dxos/react-ui-attention';
@@ -12,9 +17,18 @@ import { mx } from '@dxos/react-ui-theme';
12
17
 
13
18
  import { useStack } from '../StackContext';
14
19
 
15
- export type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & { asChild?: boolean };
20
+ export type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
21
+ asChild?: boolean;
22
+ separateOnScroll?: boolean;
23
+ };
16
24
 
17
- export const StackItemHeading = ({ children, classNames, asChild, ...props }: StackItemHeadingProps) => {
25
+ export const StackItemHeading = ({
26
+ children,
27
+ classNames,
28
+ asChild,
29
+ separateOnScroll,
30
+ ...props
31
+ }: StackItemHeadingProps) => {
18
32
  const { orientation } = useStack();
19
33
  const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });
20
34
 
@@ -27,7 +41,10 @@ export const StackItemHeading = ({ children, classNames, asChild, ...props }: St
27
41
  tabIndex={0}
28
42
  {...focusableGroupAttrs}
29
43
  className={mx(
30
- 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0 bg-headerSurface border-transparent [[data-scroll-separator="true"]_&]:border-subduedSeparator',
44
+ 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0 bg-headerSurface',
45
+ separateOnScroll
46
+ ? 'border-transparent [[data-scroll-separator="true"]_&]:border-subduedSeparator'
47
+ : 'border-subduedSeparator',
31
48
  orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',
32
49
  orientation === 'horizontal' ? 'border-be' : 'border-ie',
33
50
  classNames,
@@ -38,6 +55,14 @@ export const StackItemHeading = ({ children, classNames, asChild, ...props }: St
38
55
  );
39
56
  };
40
57
 
58
+ export const StackItemHeadingStickyContent = ({ children }: PropsWithChildren<{}>) => {
59
+ return (
60
+ <div role='none' className='sticky block-start-0 bg-[--sticky-bg] p-1 is-full'>
61
+ {children}
62
+ </div>
63
+ );
64
+ };
65
+
41
66
  export type StackItemHeadingLabelProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & AttendableId & Related;
42
67
 
43
68
  export const StackItemHeadingLabel = forwardRef<HTMLHeadingElement, StackItemHeadingLabelProps>(
@@ -13,7 +13,7 @@ import React, {
13
13
  } from 'react';
14
14
 
15
15
  import { Icon, IconButton, type ThemedClassName, Toolbar, type ToolbarRootProps, useTranslation } from '@dxos/react-ui';
16
- import { mx } from '@dxos/react-ui-theme';
16
+ import { hoverableControls, mx } from '@dxos/react-ui-theme';
17
17
 
18
18
  import { cardChrome, cardContent, cardHeading, cardRoot, cardText, cardSpacing } from './fragments';
19
19
  import { StackItem } from '../../components';
@@ -60,7 +60,11 @@ const CardConditionalContent = ({ role, children }: PropsWithChildren<{ role?: s
60
60
  </div>
61
61
  );
62
62
  } else {
63
- return <CardContent>{children}</CardContent>;
63
+ return (
64
+ <CardContent {...(role === 'card--document' && { classNames: ['mlb-[1em]', hoverableControls] })}>
65
+ {children}
66
+ </CardContent>
67
+ );
64
68
  }
65
69
  };
66
70
 
@@ -7,11 +7,19 @@ export const cardRoot = 'contain-layout pli-2 plb-1 first-of-type:pbs-0 last-of-
7
7
  export const cardContent =
8
8
  'rounded overflow-hidden bg-cardSurface border border-separator dark:border-subduedSeparator dx-focus-ring-group-y-indicator relative min-bs-[--rail-item] group/card';
9
9
 
10
- export const cardSpacing = 'pli-card-spacing-inline mlb-card-spacing-block';
10
+ export const cardSpacing = 'pli-cardSpacingInline mlb-cardSpacingBlock';
11
+ export const labelSpacing = 'mbs-inputSpacingBlock mbe-labelSpacingBlock';
12
+
13
+ export const cardDialogContent = 'p-0 bs-content min-bs-[8rem] max-bs-full md:max-is-[32rem] overflow-hidden';
14
+ export const cardDialogHeader = 'pli-cardSpacingInline mbs-cardSpacingBlock flex justify-between';
15
+ export const cardDialogOverflow = 'overflow-y-auto min-bs-0 flex-1';
16
+ export const cardDialogPaddedOverflow = `${cardDialogOverflow} plb-cardSpacingBlock`;
17
+ export const cardDialogSearchListRoot =
18
+ 'pli-cardSpacingInline pbs-cardSpacingBlock [&>input]:mbe-0 min-bs-0 flex-1 flex flex-col';
11
19
 
12
20
  export const cardText = cardSpacing;
13
21
 
14
22
  export const cardHeading = 'text-lg font-medium line-clamp-2';
15
23
 
16
24
  export const cardChrome =
17
- 'pli-[--dx-card-spacing-chrome] mlb-[--dx-card-spacing-chrome] [&_.dx-button]:text-start [&_.dx-button]:is-full';
25
+ 'pli-[--dx-cardSpacingChrome] mlb-[--dx-cardSpacingChrome] [&_.dx-button]:text-start [&_.dx-button]:is-full';
@@ -4,3 +4,4 @@
4
4
 
5
5
  export * from './Card';
6
6
  export * from './CardDragPreview';
7
+ export * from './fragments';
@@ -28,6 +28,7 @@ const CardStackStack = forwardRef<
28
28
  }
29
29
  itemsCount={itemsCount}
30
30
  separatorOnScroll={9}
31
+ data-density='fine'
31
32
  {...props}
32
33
  ref={forwardedRef}
33
34
  >