@dxos/react-ui 0.8.3-main.672df60 → 0.8.3-staging.0fa589b

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 (48) hide show
  1. package/dist/lib/{node-esm/chunk-ANVE7WX5.mjs → browser/chunk-WXW6KSRL.mjs} +39 -20
  2. package/dist/lib/browser/chunk-WXW6KSRL.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +5 -1
  4. package/dist/lib/browser/index.mjs.map +1 -1
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +3 -3
  7. package/dist/lib/browser/testing/index.mjs.map +2 -2
  8. package/dist/lib/node/{chunk-KMS7RFL7.cjs → chunk-3E3QKWX4.cjs} +44 -21
  9. package/dist/lib/node/chunk-3E3QKWX4.cjs.map +7 -0
  10. package/dist/lib/node/index.cjs +73 -69
  11. package/dist/lib/node/index.cjs.map +1 -1
  12. package/dist/lib/node/meta.json +1 -1
  13. package/dist/lib/node/testing/index.cjs +4 -4
  14. package/dist/lib/node/testing/index.cjs.map +2 -2
  15. package/dist/lib/{browser/chunk-5Y5JI6KC.mjs → node-esm/chunk-EQ7EG74H.mjs} +41 -18
  16. package/dist/lib/node-esm/chunk-EQ7EG74H.mjs.map +7 -0
  17. package/dist/lib/node-esm/index.mjs +5 -1
  18. package/dist/lib/node-esm/index.mjs.map +1 -1
  19. package/dist/lib/node-esm/meta.json +1 -1
  20. package/dist/lib/node-esm/testing/index.mjs +3 -3
  21. package/dist/lib/node-esm/testing/index.mjs.map +2 -2
  22. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  23. package/dist/types/src/components/Message/Message.d.ts +14 -5
  24. package/dist/types/src/components/Message/Message.d.ts.map +1 -1
  25. package/dist/types/src/components/Message/Message.stories.d.ts +1 -1
  26. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  27. package/dist/types/src/components/Separator/Separator.d.ts +5 -1
  28. package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
  29. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -0
  30. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
  31. package/dist/types/src/components/Toolbar/Toolbar.d.ts +7 -1
  32. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  33. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +4 -0
  34. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  35. package/dist/types/src/testing/decorators/withSurfaceVariantsLayout.d.ts.map +1 -1
  36. package/package.json +13 -13
  37. package/src/components/Input/Input.stories.tsx +2 -2
  38. package/src/components/Input/Input.tsx +1 -0
  39. package/src/components/Menus/ContextMenu.stories.tsx +1 -1
  40. package/src/components/Message/Message.stories.tsx +7 -10
  41. package/src/components/Message/Message.tsx +50 -19
  42. package/src/components/Separator/Separator.tsx +3 -3
  43. package/src/components/ThemeProvider/TranslationsProvider.tsx +1 -1
  44. package/src/components/Toolbar/Toolbar.tsx +15 -9
  45. package/src/testing/decorators/withSurfaceVariantsLayout.tsx +2 -4
  46. package/dist/lib/browser/chunk-5Y5JI6KC.mjs.map +0 -7
  47. package/dist/lib/node/chunk-KMS7RFL7.cjs.map +0 -7
  48. package/dist/lib/node-esm/chunk-ANVE7WX5.mjs.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/testing/decorators/withTheme.ts", "../../../../src/testing/decorators/withSurfaceVariantsLayout.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator, type StoryContext, type StoryFn } from '@storybook/react';\nimport { useEffect, createElement } from 'react';\n\nimport { defaultTx } from '@dxos/react-ui-theme';\n\nimport { ThemeProvider } from '../../components';\n\nexport const withTheme: Decorator = (Story: StoryFn, context: StoryContext) => {\n const theme = context?.parameters?.theme || context?.globals?.theme;\n useEffect(() => {\n document.documentElement.classList[theme === 'dark' ? 'add' : 'remove']('dark');\n }, [theme]);\n\n return createElement(ThemeProvider, {\n children: createElement(Story),\n tx: defaultTx,\n });\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type ComponentType, type PropsWithChildren } from 'react';\n\nimport { mx, surfaceShadow } from '@dxos/react-ui-theme';\nimport { type Density, type Elevation } from '@dxos/react-ui-types';\n\ntype Config = {\n elevations?: { elevation: Elevation; surface?: string }[];\n densities?: Density[];\n};\n\nconst Container = ({ children, elevation, surface }: PropsWithChildren<{ elevation: Elevation; surface?: string }>) => (\n <div className={mx('p-4 mlb-4 rounded-md border border-separator', surface, surfaceShadow({ elevation }))}>\n {children}\n </div>\n);\n\nconst Panel = ({\n Story,\n elevations,\n densities,\n className,\n}: { Story: ComponentType } & Config & { className?: string }) => (\n <div className={mx('flex flex-col h-full p-4', className)}>\n {elevations?.map(({ elevation, surface }) =>\n densities?.map((density) => (\n <Container key={`${elevation}--${density}`} surface={surface} elevation={elevation}>\n <Story />\n </Container>\n )),\n )}\n </div>\n);\n\nexport const withSurfaceVariantsLayout = ({\n elevations = [\n { elevation: 'base', surface: 'bg-baseSurface' },\n { elevation: 'positioned', surface: 'bg-cardSurface' },\n { elevation: 'dialog', surface: 'bg-modalSurface' },\n ],\n densities = ['coarse'],\n}: Config = {}): Decorator => {\n return (Story) => (\n <div className='fixed inset-0 grid grid-cols-2 overflow-y-auto'>\n <Panel Story={Story} className='light' elevations={elevations} densities={densities} />\n <Panel Story={Story} className='dark' elevations={elevations} densities={densities} />\n </div>\n );\n};\n"],
5
- "mappings": ";;;;;;AAKA,SAASA,WAAWC,qBAAqB;AAEzC,SAASC,iBAAiB;AAInB,IAAMC,YAAuB,CAACC,OAAgBC,YAAAA;AACnD,QAAMC,QAAQD,SAASE,YAAYD,SAASD,SAASG,SAASF;AAC9DG,YAAU,MAAA;AACRC,aAASC,gBAAgBC,UAAUN,UAAU,SAAS,QAAQ,QAAA,EAAU,MAAA;EAC1E,GAAG;IAACA;GAAM;AAEV,SAAOO,cAAcC,eAAe;IAClCC,UAAUF,cAAcT,KAAAA;IACxBY,IAAIC;EACN,CAAA;AACF;;;;AChBA,OAAOC,WAA2D;AAElE,SAASC,IAAIC,qBAAqB;AAQlC,IAAMC,YAAY,CAAC,EAAEC,UAAUC,WAAWC,QAAO,MAAiE;;;WAChH,sBAAA,cAACC,OAAAA;MAAIC,WAAWC,GAAG,gDAAgDH,SAASI,cAAc;QAAEL;MAAU,CAAA,CAAA;OACnGD,QAAAA;;;;;AAIL,IAAMO,QAAQ,CAAC,EACbC,OACAC,YACAC,WACAN,UAAS,MACkD;;;WAC3D,sBAAA,cAACD,OAAAA;MAAIC,WAAWC,GAAG,4BAA4BD,SAAAA;OAC5CK,YAAYE,IAAI,CAAC,EAAEV,WAAWC,QAAO,MACpCQ,WAAWC,IAAI,CAACC,YACd,sBAAA,cAACb,WAAAA;MAAUc,KAAK,GAAGZ,SAAAA,KAAcW,OAAAA;MAAWV;MAAkBD;OAC5D,sBAAA,cAACO,OAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;;;;AAOJ,IAAMM,4BAA4B,CAAC,EACxCL,aAAa;EACX;IAAER,WAAW;IAAQC,SAAS;EAAiB;EAC/C;IAAED,WAAW;IAAcC,SAAS;EAAiB;EACrD;IAAED,WAAW;IAAUC,SAAS;EAAkB;GAEpDQ,YAAY;EAAC;EAAS,IACZ,CAAC,MAAC;AACZ,SAAO,CAACF,UACN,sBAAA,cAACL,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACG,OAAAA;IAAMC;IAAcJ,WAAU;IAAQK;IAAwBC;MAC/D,sBAAA,cAACH,OAAAA;IAAMC;IAAcJ,WAAU;IAAOK;IAAwBC;;AAGpE;",
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator, type StoryContext, type StoryFn } from '@storybook/react';\nimport { useEffect, createElement } from 'react';\n\nimport { defaultTx } from '@dxos/react-ui-theme';\n\nimport { ThemeProvider } from '../../components';\n\nexport const withTheme: Decorator = (Story: StoryFn, context: StoryContext) => {\n const theme = context?.parameters?.theme || context?.globals?.theme;\n useEffect(() => {\n document.documentElement.classList[theme === 'dark' ? 'add' : 'remove']('dark');\n }, [theme]);\n\n return createElement(ThemeProvider, {\n children: createElement(Story),\n tx: defaultTx,\n });\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type ComponentType, type PropsWithChildren } from 'react';\n\nimport { mx, surfaceShadow } from '@dxos/react-ui-theme';\nimport { type Density, type Elevation } from '@dxos/react-ui-types';\n\ntype Config = {\n elevations?: { elevation: Elevation; surface?: string }[];\n densities?: Density[];\n};\n\nconst Container = ({ children, elevation, surface }: PropsWithChildren<{ elevation: Elevation; surface?: string }>) => (\n <div className={mx('rounded-md border border-separator', surface, surfaceShadow({ elevation }))}>{children}</div>\n);\n\nconst Panel = ({\n Story,\n elevations,\n densities,\n className,\n}: { Story: ComponentType } & Config & { className?: string }) => (\n <div className={mx('flex flex-col h-full p-4 gap-4', className)}>\n {elevations?.map(({ elevation, surface }) =>\n densities?.map((density) => (\n <Container key={`${elevation}--${density}`} surface={surface} elevation={elevation}>\n <Story />\n </Container>\n )),\n )}\n </div>\n);\n\nexport const withSurfaceVariantsLayout = ({\n elevations = [\n { elevation: 'base', surface: 'bg-baseSurface' },\n { elevation: 'positioned', surface: 'bg-cardSurface' },\n { elevation: 'dialog', surface: 'bg-modalSurface' },\n ],\n densities = ['coarse'],\n}: Config = {}): Decorator => {\n return (Story) => (\n <div className='fixed inset-0 grid grid-cols-2 overflow-y-auto'>\n <Panel Story={Story} className='light' elevations={elevations} densities={densities} />\n <Panel Story={Story} className='dark' elevations={elevations} densities={densities} />\n </div>\n );\n};\n"],
5
+ "mappings": ";;;;;;AAKA,SAASA,WAAWC,qBAAqB;AAEzC,SAASC,iBAAiB;AAInB,IAAMC,YAAuB,CAACC,OAAgBC,YAAAA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;",
6
6
  "names": ["useEffect", "createElement", "defaultTx", "withTheme", "Story", "context", "theme", "parameters", "globals", "useEffect", "document", "documentElement", "classList", "createElement", "ThemeProvider", "children", "tx", "defaultTx", "React", "mx", "surfaceShadow", "Container", "children", "elevation", "surface", "div", "className", "mx", "surfaceShadow", "Panel", "Story", "elevations", "densities", "map", "density", "key", "withSurfaceVariantsLayout"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAA6B,KAAK,aAAa,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEnH,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAA2D,MAAM,OAAO,CAAC;AAEnH,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,IAAI,sBAAsB,EAE5C,KAAK,cAAc,IAAI,uBAAuB,EAE9C,KAAK,aAAa,IAAI,sBAAsB,EAG5C,KAAK,gBAAgB,EAGrB,KAAK,6BAA6B,IAAI,sCAAsC,EAC5E,KAAK,gBAAgB,IAAI,yBAAyB,EAElD,KAAK,UAAU,IAAI,mBAAmB,EAEtC,KAAK,eAAe,IAAI,wBAAwB,EACjD,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAGpG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1C,KAAK,gBAAgB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;AAEnG,KA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primitive } from '@radix-ui/react-primitive';
2
2
  import React, { type ComponentPropsWithRef } from 'react';
3
3
  import { type MessageValence, type Elevation } from '@dxos/react-ui-types';
4
- type MessageRootProps = ComponentPropsWithRef<typeof Primitive.div> & {
4
+ import { type ThemedClassName } from '../../util';
5
+ declare const messageIcons: Record<MessageValence, string>;
6
+ type MessageRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
5
7
  valence?: MessageValence;
6
8
  elevation?: Elevation;
7
9
  asChild?: boolean;
8
10
  titleId?: string;
9
11
  descriptionId?: string;
10
12
  };
11
- type MessageTitleProps = Omit<ComponentPropsWithRef<typeof Primitive.h2>, 'id'> & {
13
+ type MessageTitleProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {
12
14
  asChild?: boolean;
15
+ icon?: string;
13
16
  };
14
- type MessageBodyProps = Omit<ComponentPropsWithRef<typeof Primitive.h2>, 'id'> & {
17
+ type MessageContentProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {
15
18
  asChild?: boolean;
16
19
  };
17
20
  export declare const Message: {
18
21
  Root: React.ForwardRefExoticComponent<Omit<MessageRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
22
  Title: React.ForwardRefExoticComponent<Omit<MessageTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
20
- Body: React.ForwardRefExoticComponent<Omit<MessageBodyProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
23
+ Content: React.ForwardRefExoticComponent<Omit<MessageContentProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
21
24
  };
22
- export type { MessageRootProps, MessageTitleProps, MessageBodyProps };
25
+ export declare const Callout: {
26
+ Root: React.ForwardRefExoticComponent<Omit<MessageRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ Title: React.ForwardRefExoticComponent<Omit<MessageTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
28
+ Content: React.ForwardRefExoticComponent<Omit<MessageContentProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
29
+ };
30
+ export type { MessageRootProps, MessageTitleProps, MessageContentProps };
31
+ export { messageIcons };
23
32
  //# sourceMappingURL=Message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAI3E,KAAK,gBAAgB,GAAG,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG;IACpE,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AA2CF,KAAK,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAmBxG,KAAK,gBAAgB,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAwBvG,eAAO,MAAM,OAAO;;;;CAAgE,CAAC;AAErF,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAA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ForwardRefExoticComponent<Omit<import("./Message").MessageRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
13
  Title: React.ForwardRefExoticComponent<Omit<import("./Message").MessageTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
14
- Body: React.ForwardRefExoticComponent<Omit<import("./Message").MessageBodyProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
14
+ Content: React.ForwardRefExoticComponent<Omit<import("./Message").MessageContentProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
15
15
  };
16
16
  render: ({ valence, title, body }: StoryProps) => React.JSX.Element;
17
17
  decorators: import("@storybook/react").Decorator[];
@@ -1 +1 @@
1
- {"version":3,"file":"Message.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAK3D,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;;;;;;;;uCAE8C,UAAU;;;;;;;;;;;;;;AAS1D,wBAYE;AAEF,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAC"}
1
+ {"version":3,"file":"Message.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAK3D,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;;;;;;;;uCAE8C,UAAU;;;;;;;;;;;;;;AAO1D,wBAYE;AAEF,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAC"}
@@ -1,9 +1,13 @@
1
1
  import { type SeparatorProps as SeparatorPrimitiveProps } from '@radix-ui/react-separator';
2
2
  import React from 'react';
3
3
  import { type ThemedClassName } from '../../util';
4
- type SeparatorProps = ThemedClassName<SeparatorPrimitiveProps>;
4
+ type SeparatorProps = ThemedClassName<SeparatorPrimitiveProps> & {
5
+ subdued?: boolean;
6
+ };
5
7
  declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitiveProps, "className"> & {
6
8
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
9
+ } & {
10
+ subdued?: boolean;
7
11
  } & React.RefAttributes<HTMLDivElement>>;
8
12
  export type { SeparatorProps };
9
13
  export { Separator };
@@ -1 +1 @@
1
- {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../../../src/components/Separator/Separator.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,IAAI,uBAAuB,EAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,KAAK,cAAc,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAE/D,QAAA,MAAM,SAAS;;wCAYd,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../../../src/components/Separator/Separator.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,IAAI,uBAAuB,EAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,KAAK,cAAc,GAAG,eAAe,CAAC,uBAAuB,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEvF,QAAA,MAAM,SAAS;;;cAF8D,OAAO;wCAcnF,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -5,6 +5,7 @@ import { useTranslation as useI18NextTranslation } from 'react-i18next';
5
5
  export type Label = string | [string, {
6
6
  ns: string;
7
7
  count?: number;
8
+ defaultValue?: string;
8
9
  }];
9
10
  export declare const isLabel: (o: any) => o is Label;
10
11
  export declare const toLocalizedString: (label: Label, t: TFunction) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationsProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThemeProvider/TranslationsProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAgB,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAA4D,MAAM,OAAO,CAAC;AACxG,OAAO,EAAoB,cAAc,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAO1F,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtE,eAAO,MAAM,OAAO,GAAI,GAAG,GAAG,KAAG,CAAC,IAAI,KAQN,CAAC;AAEjC,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,EAAE,GAAG,SAAS,WAAiD,CAAC;AAE9G,eAAO,MAAM,SAAS;;;;;;CAMZ,CAAC;AAWX,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAChC,KAAK,CAAC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AAkB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB;;;EAG9B,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,GAAG,MAAM,UAAU,CAAC,OAAO,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/E,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,8DAMlC,yBAAyB,sBAwB3B,CAAC"}
@@ -5,7 +5,9 @@ import { type ThemedClassName } from '../../util';
5
5
  import { type ButtonGroupProps, type ButtonProps, type ToggleGroupItemProps, type ToggleProps, type IconButtonProps } from '../Buttons';
6
6
  import { type LinkProps } from '../Link';
7
7
  import { type SeparatorProps } from '../Separator';
8
- type ToolbarRootProps = ThemedClassName<ToolbarPrimitive.ToolbarProps>;
8
+ type ToolbarRootProps = ThemedClassName<ToolbarPrimitive.ToolbarProps> & {
9
+ layoutManaged?: boolean;
10
+ };
9
11
  type ToolbarButtonProps = ButtonProps;
10
12
  type ToolbarIconButtonProps = IconButtonProps;
11
13
  type ToolbarToggleProps = ToggleProps;
@@ -19,6 +21,8 @@ type ToolbarSeparatorProps = SeparatorProps & {
19
21
  export declare const Toolbar: {
20
22
  Root: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarProps, "className"> & {
21
23
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
24
+ } & {
25
+ layoutManaged?: boolean;
22
26
  } & React.RefAttributes<HTMLDivElement>>;
23
27
  Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
24
28
  IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -47,6 +51,8 @@ export declare const Toolbar: {
47
51
  ToggleGroupIconItem: React.ForwardRefExoticComponent<Omit<ToolbarToggleGroupIconItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
48
52
  Separator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
49
53
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
54
+ } & {
55
+ subdued?: boolean;
50
56
  } & {
51
57
  variant?: "gap" | "line";
52
58
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,IAAI,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC1G,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAEhB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAEhB,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,KAAK,gBAAgB,GAAG,eAAe,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAWvE,KAAK,kBAAkB,GAAG,WAAW,CAAC;AAUtC,KAAK,sBAAsB,GAAG,eAAe,CAAC;AAU9C,KAAK,kBAAkB,GAAG,WAAW,CAAC;AAUtC,KAAK,gBAAgB,GAAG,SAAS,CAAC;AAUlC,KAAK,uBAAuB,GAAG,CAC3B,IAAI,CAAC,gBAAgB,CAAC,6BAA6B,EAAE,WAAW,CAAC,GACjE,IAAI,CAAC,gBAAg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,kBAAkB,GAAG,WAAW,CAAC;AAUtC,KAAK,sBAAsB,GAAG,eAAe,CAAC;AAU9C,KAAK,kBAAkB,GAAG,WAAW,CAAC;AAUtC,KAAK,gBAAgB,GAAG,SAAS,CAAC;AAUlC,KAAK,uBAAuB,GAAG,CAC3B,IAAI,CAAC,gBAAgB,CAAC,6BAA6B,EAAE,WAAW,CAAC,GACjE,IAAI,CAAC,gBAAgB,CAAC,+BAA+B,EAAE,WAAW,CAAC,CACtE,GACC,gBAAgB,CAAC;AAYnB,KAAK,2BAA2B,GAAG,oBAAoB,CAAC;AAYxD,KAAK,+BAA+B,GAAG,IAAI,CAAC,6BAA6B,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC;AAY1G,KAAK,qBAAqB,GAAG,cAAc,GAAG;IAAE,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE,CAAC;AAc3E,eAAO,MAAM,OAAO;;;;wBA/GuE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiGxC,KAAK,GAAG,MAAM;;CAwBvE,CAAC;AAEF,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,GACtB,CAAC"}
@@ -6,6 +6,8 @@ declare const _default: {
6
6
  component: {
7
7
  Root: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toolbar").ToolbarProps, "className"> & {
8
8
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
9
+ } & {
10
+ layoutManaged?: boolean;
9
11
  } & React.RefAttributes<HTMLDivElement>>;
10
12
  Button: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
13
  IconButton: React.ForwardRefExoticComponent<Omit<import("..").IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -34,6 +36,8 @@ declare const _default: {
34
36
  ToggleGroupIconItem: React.ForwardRefExoticComponent<Omit<import("./Toolbar").ToolbarToggleGroupIconItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
35
37
  Separator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
36
38
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
39
+ } & {
40
+ subdued?: boolean;
37
41
  } & {
38
42
  variant?: "gap" | "line";
39
43
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,KAAK,qBAAqB,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEH,qBAAqB;;;;;;;;AAuDlD,wBAME;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
1
+ {"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,KAAK,qBAAqB,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEH,qBAAqB;;;;;;;;AAuDlD,wBAME;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"withSurfaceVariantsLayout.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/withSurfaceVariantsLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEpE,KAAK,MAAM,GAAG;IACZ,UAAU,CAAC,EAAE;QAAE,SAAS,EAAE,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1D,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;CACvB,CAAC;AAyBF,eAAO,MAAM,yBAAyB,GAAI,6BAOvC,MAAW,KAAG,SAOhB,CAAC"}
1
+ {"version":3,"file":"withSurfaceVariantsLayout.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/withSurfaceVariantsLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEpE,KAAK,MAAM,GAAG;IACZ,UAAU,CAAC,EAAE;QAAE,SAAS,EAAE,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1D,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;CACvB,CAAC;AAuBF,eAAO,MAAM,yBAAyB,GAAI,6BAOvC,MAAW,KAAG,SAOhB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui",
3
- "version": "0.8.3-main.672df60",
3
+ "version": "0.8.3-staging.0fa589b",
4
4
  "description": "Low-level React components for DXOS, applying a theme to a core group of primitives",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -72,14 +72,14 @@
72
72
  "keyborg": "^2.5.0",
73
73
  "react-i18next": "^11.18.6",
74
74
  "react-remove-scroll": "^2.6.0",
75
- "@dxos/debug": "0.8.3-main.672df60",
76
- "@dxos/lit-ui": "0.8.3-main.672df60",
77
- "@dxos/log": "0.8.3-main.672df60",
78
- "@dxos/react-hooks": "0.8.3-main.672df60",
79
- "@dxos/react-list": "0.8.3-main.672df60",
80
- "@dxos/react-ui-types": "0.8.3-main.672df60",
81
- "@dxos/react-input": "0.8.3-main.672df60",
82
- "@dxos/util": "0.8.3-main.672df60"
75
+ "@dxos/debug": "0.8.3-staging.0fa589b",
76
+ "@dxos/lit-ui": "0.8.3-staging.0fa589b",
77
+ "@dxos/log": "0.8.3-staging.0fa589b",
78
+ "@dxos/react-hooks": "0.8.3-staging.0fa589b",
79
+ "@dxos/react-list": "0.8.3-staging.0fa589b",
80
+ "@dxos/react-input": "0.8.3-staging.0fa589b",
81
+ "@dxos/react-ui-types": "0.8.3-staging.0fa589b",
82
+ "@dxos/util": "0.8.3-staging.0fa589b"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@dnd-kit/core": "^6.0.5",
@@ -91,15 +91,15 @@
91
91
  "react": "~18.2.0",
92
92
  "react-dom": "~18.2.0",
93
93
  "vite": "5.4.7",
94
- "@dxos/random": "0.8.3-main.672df60",
95
- "@dxos/react-ui-theme": "0.8.3-main.672df60",
96
- "@dxos/util": "0.8.3-main.672df60"
94
+ "@dxos/react-ui-theme": "0.8.3-staging.0fa589b",
95
+ "@dxos/random": "0.8.3-staging.0fa589b",
96
+ "@dxos/util": "0.8.3-staging.0fa589b"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "@phosphor-icons/react": "^2.1.5",
100
100
  "react": "~18.2.0",
101
101
  "react-dom": "~18.2.0",
102
- "@dxos/react-ui-theme": "0.8.3-main.672df60"
102
+ "@dxos/react-ui-theme": "0.8.3-staging.0fa589b"
103
103
  },
104
104
  "publishConfig": {
105
105
  "access": "public"
@@ -78,10 +78,10 @@ const DefaultStory = (props: BaseProps) => {
78
78
  <div className={mx(baseSurface, 'p-4')}>
79
79
  <Wrapper {...props} />
80
80
  </div>
81
- <div className={mx(activeSurface, 'p-4 rounded-lg', surfaceShadow({ elevation: 'positioned' }))}>
81
+ <div className={mx(activeSurface, 'p-4 rounded-md', surfaceShadow({ elevation: 'positioned' }))}>
82
82
  <Wrapper {...props} />
83
83
  </div>
84
- <div className={mx(modalSurface, 'p-4 rounded-lg', surfaceShadow({ elevation: 'dialog' }))}>
84
+ <div className={mx(modalSurface, 'p-4 rounded-md', surfaceShadow({ elevation: 'dialog' }))}>
85
85
  <Wrapper {...props} />
86
86
  </div>
87
87
  </div>
@@ -220,6 +220,7 @@ const TextArea = forwardRef<HTMLTextAreaElement, InputScopedProps<TextAreaProps>
220
220
  elevation,
221
221
  validationValence,
222
222
  },
223
+ '-mbe-labelSpacingBlock',
223
224
  classNames,
224
225
  )}
225
226
  {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}
@@ -13,7 +13,7 @@ const DefaultStory = () => {
13
13
  // NOTE(thure): Since long-tap will select text in some OSs, apply `select-none` to `ContextMenu.Trigger` where possible.
14
14
  return (
15
15
  <ContextMenu.Root>
16
- <ContextMenu.Trigger className='select-none border border-dashed border-neutral-400/50 rounded-lg flex items-center justify-center p-8 font-normal'>
16
+ <ContextMenu.Trigger className='select-none border border-dashed border-neutral-400/50 rounded-md flex items-center justify-center p-8 font-normal'>
17
17
  Right-click / long-tap here.
18
18
  </ContextMenu.Trigger>
19
19
 
@@ -4,12 +4,11 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { Info } from '@phosphor-icons/react';
8
7
  import React from 'react';
9
8
 
10
9
  import { type MessageValence } from '@dxos/react-ui-types';
11
10
 
12
- import { Message } from './Message';
11
+ import { Callout } from './Message';
13
12
  import { withTheme } from '../../testing';
14
13
 
15
14
  type StoryProps = {
@@ -19,17 +18,15 @@ type StoryProps = {
19
18
  };
20
19
 
21
20
  const DefaultStory = ({ valence, title, body }: StoryProps) => (
22
- <Message.Root valence={valence}>
23
- <Message.Title>
24
- <Info className='inline w-5 h-5 mb-1' weight='duotone' /> {title}
25
- </Message.Title>
26
- <Message.Body>{body}</Message.Body>
27
- </Message.Root>
21
+ <Callout.Root valence={valence}>
22
+ {title && <Callout.Title>{title}</Callout.Title>}
23
+ {body && <Callout.Content>{body}</Callout.Content>}
24
+ </Callout.Root>
28
25
  );
29
26
 
30
27
  export default {
31
- title: 'ui/react-ui-core/Message',
32
- component: Message,
28
+ title: 'ui/react-ui-core/Callout',
29
+ component: Callout,
33
30
  render: DefaultStory,
34
31
  decorators: [withTheme],
35
32
  parameters: { chromatic: { disableSnapshot: false } },
@@ -11,8 +11,18 @@ import { useId } from '@dxos/react-hooks';
11
11
  import { type MessageValence, type Elevation } from '@dxos/react-ui-types';
12
12
 
13
13
  import { useElevationContext, useThemeContext } from '../../hooks';
14
+ import { type ThemedClassName } from '../../util';
15
+ import { Icon } from '../Icon';
16
+
17
+ const messageIcons: Record<MessageValence, string> = {
18
+ success: 'ph--check-circle--duotone',
19
+ info: 'ph--info--duotone',
20
+ warning: 'ph--warning--duotone',
21
+ error: 'ph--warning-circle--duotone',
22
+ neutral: 'ph--info--duotone',
23
+ };
14
24
 
15
- type MessageRootProps = ComponentPropsWithRef<typeof Primitive.div> & {
25
+ type MessageRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
16
26
  valence?: MessageValence;
17
27
  elevation?: Elevation;
18
28
  asChild?: boolean;
@@ -20,7 +30,7 @@ type MessageRootProps = ComponentPropsWithRef<typeof Primitive.div> & {
20
30
  descriptionId?: string;
21
31
  };
22
32
 
23
- type MessageContextValue = { titleId?: string; descriptionId: string };
33
+ type MessageContextValue = { titleId?: string; descriptionId: string; valence: MessageValence };
24
34
  const MESSAGE_NAME = 'Message';
25
35
  const [MessageProvider, useMessageContext] = createContext<MessageContextValue>(MESSAGE_NAME);
26
36
 
@@ -28,9 +38,9 @@ const MessageRoot = forwardRef<HTMLDivElement, MessageRootProps>(
28
38
  (
29
39
  {
30
40
  asChild,
31
- valence,
41
+ valence = 'neutral',
32
42
  elevation: propsElevation,
33
- className,
43
+ classNames,
34
44
  titleId: propsTitleId,
35
45
  descriptionId: propsDescriptionId,
36
46
  children,
@@ -44,10 +54,11 @@ const MessageRoot = forwardRef<HTMLDivElement, MessageRootProps>(
44
54
  const elevation = useElevationContext(propsElevation);
45
55
  const Root = asChild ? Slot : Primitive.div;
46
56
  return (
47
- <MessageProvider {...{ titleId, descriptionId }}>
57
+ <MessageProvider {...{ titleId, descriptionId, valence }}>
48
58
  <Root
59
+ role={valence === 'neutral' ? 'paragraph' : 'alert'}
49
60
  {...props}
50
- className={tx('message.root', 'message', { valence, elevation }, className)}
61
+ className={tx('message.root', 'message', { valence, elevation }, classNames)}
51
62
  aria-labelledby={titleId}
52
63
  aria-describedby={descriptionId}
53
64
  ref={forwardedRef}
@@ -61,18 +72,33 @@ const MessageRoot = forwardRef<HTMLDivElement, MessageRootProps>(
61
72
 
62
73
  MessageRoot.displayName = MESSAGE_NAME;
63
74
 
64
- type MessageTitleProps = Omit<ComponentPropsWithRef<typeof Primitive.h2>, 'id'> & { asChild?: boolean };
75
+ type MessageTitleProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {
76
+ asChild?: boolean;
77
+ icon?: string;
78
+ };
65
79
 
66
80
  const MESSAGE_TITLE_NAME = 'MessageTitle';
67
81
 
68
82
  const MessageTitle = forwardRef<HTMLHeadingElement, MessageTitleProps>(
69
- ({ asChild, className, children, ...props }, forwardedRef) => {
83
+ ({ asChild, classNames, children, icon, ...props }, forwardedRef) => {
70
84
  const { tx } = useThemeContext();
71
- const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
85
+ const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);
72
86
  const Root = asChild ? Slot : Primitive.h2;
73
87
  return (
74
- <Root {...props} className={tx('message.title', 'message__title', {}, className)} id={titleId} ref={forwardedRef}>
75
- {children}
88
+ <Root
89
+ {...props}
90
+ className={tx('message.title', 'message__title', {}, classNames)}
91
+ id={titleId}
92
+ ref={forwardedRef}
93
+ >
94
+ {!icon && valence === 'neutral' ? null : (
95
+ <Icon
96
+ size={5}
97
+ icon={icon ?? messageIcons[valence]}
98
+ classNames={tx('message.icon', 'message__icon', { valence })}
99
+ />
100
+ )}
101
+ <span>{children}</span>
76
102
  </Root>
77
103
  );
78
104
  },
@@ -80,19 +106,21 @@ const MessageTitle = forwardRef<HTMLHeadingElement, MessageTitleProps>(
80
106
 
81
107
  MessageTitle.displayName = MESSAGE_TITLE_NAME;
82
108
 
83
- type MessageBodyProps = Omit<ComponentPropsWithRef<typeof Primitive.h2>, 'id'> & { asChild?: boolean };
109
+ type MessageContentProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {
110
+ asChild?: boolean;
111
+ };
84
112
 
85
- const MESSAGE_BODY_NAME = 'MessageBody';
113
+ const MESSAGE_BODY_NAME = 'MessageContent';
86
114
 
87
- const MessageBody = forwardRef<HTMLParagraphElement, MessageBodyProps>(
88
- ({ asChild, className, children, ...props }, forwardedRef) => {
115
+ const MessageContent = forwardRef<HTMLParagraphElement, MessageContentProps>(
116
+ ({ asChild, classNames, children, ...props }, forwardedRef) => {
89
117
  const { tx } = useThemeContext();
90
118
  const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
91
119
  const Root = asChild ? Slot : Primitive.p;
92
120
  return (
93
121
  <Root
94
122
  {...props}
95
- className={tx('message.body', 'message__body', {}, className)}
123
+ className={tx('message.content', 'message__content', {}, classNames)}
96
124
  id={descriptionId}
97
125
  ref={forwardedRef}
98
126
  >
@@ -102,8 +130,11 @@ const MessageBody = forwardRef<HTMLParagraphElement, MessageBodyProps>(
102
130
  },
103
131
  );
104
132
 
105
- MessageBody.displayName = MESSAGE_BODY_NAME;
133
+ MessageContent.displayName = MESSAGE_BODY_NAME;
134
+
135
+ export const Message = { Root: MessageRoot, Title: MessageTitle, Content: MessageContent };
136
+ export const Callout = Message;
106
137
 
107
- export const Message = { Root: MessageRoot, Title: MessageTitle, Body: MessageBody };
138
+ export type { MessageRootProps, MessageTitleProps, MessageContentProps };
108
139
 
109
- export type { MessageRootProps, MessageTitleProps, MessageBodyProps };
140
+ export { messageIcons };
@@ -10,16 +10,16 @@ import React, { forwardRef } from 'react';
10
10
  import { useThemeContext } from '../../hooks';
11
11
  import { type ThemedClassName } from '../../util';
12
12
 
13
- type SeparatorProps = ThemedClassName<SeparatorPrimitiveProps>;
13
+ type SeparatorProps = ThemedClassName<SeparatorPrimitiveProps> & { subdued?: boolean };
14
14
 
15
15
  const Separator = forwardRef<HTMLDivElement, SeparatorProps>(
16
- ({ classNames, orientation = 'horizontal', ...props }, forwardedRef) => {
16
+ ({ classNames, orientation = 'horizontal', subdued, ...props }, forwardedRef) => {
17
17
  const { tx } = useThemeContext();
18
18
  return (
19
19
  <SeparatorPrimitive
20
20
  orientation={orientation}
21
21
  {...props}
22
- className={tx('separator.root', 'separator', { orientation }, classNames)}
22
+ className={tx('separator.root', 'separator', { orientation, subdued }, classNames)}
23
23
  ref={forwardedRef}
24
24
  />
25
25
  );
@@ -12,7 +12,7 @@ const initialNs = 'dxos-common';
12
12
  const initialDtLocale = dtLocaleEnUs;
13
13
 
14
14
  // TODO(thure): `Parameters<TFunction>` causes typechecking issues because `TFunction` has so many signatures.
15
- export type Label = string | [string, { ns: string; count?: number }];
15
+ export type Label = string | [string, { ns: string; count?: number; defaultValue?: string }];
16
16
 
17
17
  export const isLabel = (o: any): o is Label =>
18
18
  typeof o === 'string' ||
@@ -22,16 +22,22 @@ import {
22
22
  import { Link, type LinkProps } from '../Link';
23
23
  import { Separator, type SeparatorProps } from '../Separator';
24
24
 
25
- type ToolbarRootProps = ThemedClassName<ToolbarPrimitive.ToolbarProps>;
25
+ type ToolbarRootProps = ThemedClassName<ToolbarPrimitive.ToolbarProps> & { layoutManaged?: boolean };
26
26
 
27
- const ToolbarRoot = forwardRef<HTMLDivElement, ToolbarRootProps>(({ classNames, children, ...props }, forwardedRef) => {
28
- const { tx } = useThemeContext();
29
- return (
30
- <ToolbarPrimitive.Root {...props} className={tx('toolbar.root', 'toolbar', {}, classNames)} ref={forwardedRef}>
31
- {children}
32
- </ToolbarPrimitive.Root>
33
- );
34
- });
27
+ const ToolbarRoot = forwardRef<HTMLDivElement, ToolbarRootProps>(
28
+ ({ classNames, children, layoutManaged, ...props }, forwardedRef) => {
29
+ const { tx } = useThemeContext();
30
+ return (
31
+ <ToolbarPrimitive.Root
32
+ {...props}
33
+ className={tx('toolbar.root', 'toolbar', { layoutManaged }, classNames)}
34
+ ref={forwardedRef}
35
+ >
36
+ {children}
37
+ </ToolbarPrimitive.Root>
38
+ );
39
+ },
40
+ );
35
41
 
36
42
  type ToolbarButtonProps = ButtonProps;
37
43
 
@@ -14,9 +14,7 @@ type Config = {
14
14
  };
15
15
 
16
16
  const Container = ({ children, elevation, surface }: PropsWithChildren<{ elevation: Elevation; surface?: string }>) => (
17
- <div className={mx('p-4 mlb-4 rounded-md border border-separator', surface, surfaceShadow({ elevation }))}>
18
- {children}
19
- </div>
17
+ <div className={mx('rounded-md border border-separator', surface, surfaceShadow({ elevation }))}>{children}</div>
20
18
  );
21
19
 
22
20
  const Panel = ({
@@ -25,7 +23,7 @@ const Panel = ({
25
23
  densities,
26
24
  className,
27
25
  }: { Story: ComponentType } & Config & { className?: string }) => (
28
- <div className={mx('flex flex-col h-full p-4', className)}>
26
+ <div className={mx('flex flex-col h-full p-4 gap-4', className)}>
29
27
  {elevations?.map(({ elevation, surface }) =>
30
28
  densities?.map((density) => (
31
29
  <Container key={`${elevation}--${density}`} surface={surface} elevation={elevation}>