@dxos/react-ui 0.3.9-main.f8fc6b9 → 0.3.9-next.35264cb

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 (88) hide show
  1. package/dist/lib/browser/index.mjs +2 -1
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -0
  5. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  6. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +1 -0
  7. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
  8. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +1 -0
  9. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  10. package/dist/types/src/components/Buttons/Button.stories.d.ts +1 -0
  11. package/dist/types/src/components/Buttons/Button.stories.d.ts.map +1 -1
  12. package/dist/types/src/components/Buttons/Toggle.stories.d.ts +1 -0
  13. package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +1 -1
  14. package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts +1 -0
  15. package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +1 -1
  16. package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts +1 -0
  17. package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +1 -1
  18. package/dist/types/src/components/Dialogs/Dialog.stories.d.ts +1 -0
  19. package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +1 -1
  20. package/dist/types/src/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -0
  21. package/dist/types/src/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
  22. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  23. package/dist/types/src/components/Input/Input.stories.d.ts +1 -0
  24. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  25. package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
  26. package/dist/types/src/components/Lists/List.stories.d.ts +1 -0
  27. package/dist/types/src/components/Lists/List.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Lists/Tree.stories.d.ts +1 -0
  29. package/dist/types/src/components/Lists/Tree.stories.d.ts.map +1 -1
  30. package/dist/types/src/components/Main/Main.stories.d.ts +1 -0
  31. package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
  32. package/dist/types/src/components/Message/Message.stories.d.ts +1 -0
  33. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  34. package/dist/types/src/components/Popover/Popover.stories.d.ts +6 -0
  35. package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +6 -0
  37. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  38. package/dist/types/src/components/Select/Select.stories.d.ts +6 -0
  39. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  40. package/dist/types/src/components/Status/Status.stories.d.ts +6 -0
  41. package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
  43. package/dist/types/src/components/Toast/Toast.stories.d.ts +6 -0
  44. package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
  45. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +6 -0
  46. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  47. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +6 -0
  48. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  49. package/dist/types/src/playground/Controls.stories.d.ts +6 -0
  50. package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
  51. package/dist/types/src/playground/Surfaces.stories.d.ts +6 -0
  52. package/dist/types/src/playground/Surfaces.stories.d.ts.map +1 -1
  53. package/dist/types/src/testing/decorators/index.d.ts +2 -0
  54. package/dist/types/src/testing/decorators/index.d.ts.map +1 -0
  55. package/dist/types/src/testing/decorators/with-theme.d.ts +3 -0
  56. package/dist/types/src/testing/decorators/with-theme.d.ts.map +1 -0
  57. package/dist/types/src/testing/index.d.ts +2 -0
  58. package/dist/types/src/testing/index.d.ts.map +1 -0
  59. package/package.json +8 -14
  60. package/src/components/Avatars/Avatar.stories.tsx +2 -0
  61. package/src/components/Avatars/AvatarGroup.stories.tsx +2 -0
  62. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +2 -0
  63. package/src/components/Buttons/Button.stories.tsx +2 -0
  64. package/src/components/Buttons/Toggle.stories.tsx +2 -0
  65. package/src/components/Buttons/ToggleGroup.stories.tsx +2 -0
  66. package/src/components/Dialogs/AlertDialog.stories.tsx +2 -0
  67. package/src/components/Dialogs/Dialog.stories.tsx +2 -0
  68. package/src/components/DropdownMenu/DropdownMenu.stories.tsx +2 -0
  69. package/src/components/Input/Input.stories.tsx +2 -0
  70. package/src/components/Input/Input.tsx +3 -1
  71. package/src/components/Link/Link.stories.tsx +2 -0
  72. package/src/components/Lists/List.stories.tsx +2 -0
  73. package/src/components/Lists/Tree.stories.tsx +2 -0
  74. package/src/components/Main/Main.stories.tsx +5 -1
  75. package/src/components/Message/Message.stories.tsx +2 -0
  76. package/src/components/Popover/Popover.stories.tsx +3 -0
  77. package/src/components/ScrollArea/ScrollArea.stories.tsx +3 -0
  78. package/src/components/Select/Select.stories.tsx +3 -0
  79. package/src/components/Status/Status.stories.tsx +3 -0
  80. package/src/components/Tag/Tag.stories.tsx +3 -0
  81. package/src/components/Toast/Toast.stories.tsx +3 -0
  82. package/src/components/Toolbar/Toolbar.stories.tsx +3 -0
  83. package/src/components/Tooltip/Tooltip.stories.tsx +3 -0
  84. package/src/playground/Controls.stories.tsx +3 -0
  85. package/src/playground/Surfaces.stories.tsx +4 -0
  86. package/src/testing/decorators/index.ts +5 -0
  87. package/src/testing/decorators/with-theme.ts +22 -0
  88. package/src/testing/index.ts +5 -0
@@ -4,6 +4,12 @@ declare const _default: {
4
4
  component: ({ children }: {
5
5
  children?: React.ReactNode;
6
6
  }) => JSX.Element;
7
+ decorators: import("@storybook/react").Decorator[];
8
+ parameters: {
9
+ chromatic: {
10
+ disableSnapshot: boolean;
11
+ };
12
+ };
7
13
  };
8
14
  export default _default;
9
15
  export declare const Default: {
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollArea.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScrollArea/ScrollArea.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAGpB,OAAO,KAAiC,MAAM,OAAO,CAAC;;;;;;AA2BtD,wBAEE;AAEF,eAAO,MAAM,OAAO;;;;CAInB,CAAC"}
1
+ {"version":3,"file":"ScrollArea.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScrollArea/ScrollArea.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAGpB,OAAO,KAAiC,MAAM,OAAO,CAAC;;;;;;;;;;;;AA4BtD,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;CAInB,CAAC"}
@@ -3,6 +3,12 @@ declare const _default: {
3
3
  component: ({ ...props }: {
4
4
  [x: string]: any;
5
5
  }) => JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ chromatic: {
9
+ disableSnapshot: boolean;
10
+ };
11
+ };
6
12
  };
7
13
  export default _default;
8
14
  export declare const Default: {
@@ -1 +1 @@
1
- {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/Select.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;;;AAuDpB,wBAEE;AAEF,eAAO,MAAM,OAAO;;;;;;;CAInB,CAAC"}
1
+ {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/Select.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;;;;;;;;;AAwDpB,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;;;;CAInB,CAAC"}
@@ -5,6 +5,12 @@ declare const _default: {
5
5
  actions: {
6
6
  argTypesRegex: string;
7
7
  };
8
+ decorators: import("@storybook/react").Decorator[];
9
+ parameters: {
10
+ chromatic: {
11
+ disableSnapshot: boolean;
12
+ };
13
+ };
8
14
  };
9
15
  export default _default;
10
16
  export declare const Normal: (props: any) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Status.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Status/Status.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;AAI1B,wBAGE;AAEF,eAAO,MAAM,MAAM,UAAW,GAAG,gBAShC,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,GAAG,gBAMvC,CAAC"}
1
+ {"version":3,"file":"Status.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Status/Status.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;AAK1B,wBAKE;AAEF,eAAO,MAAM,MAAM,UAAW,GAAG,gBAShC,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,GAAG,gBAMvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tag/Tag.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;AAIpB,wBA+BS;AAET,eAAO,MAAM,OAAO;;;;;CAAsD,CAAC"}
1
+ {"version":3,"file":"Tag.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tag/Tag.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;AAKpB,wBAiCS;AAET,eAAO,MAAM,OAAO;;;;;CAAsD,CAAC"}
@@ -12,6 +12,12 @@ declare const _default: {
12
12
  actionTriggers: ActionTriggerProps[];
13
13
  closeTrigger: React.ReactNode;
14
14
  }>) => JSX.Element;
15
+ decorators: import("@storybook/react").Decorator[];
16
+ parameters: {
17
+ chromatic: {
18
+ disableSnapshot: boolean;
19
+ };
20
+ };
15
21
  };
16
22
  export default _default;
17
23
  export declare const Default: {
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toast/Toast.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAKxD,KAAK,kBAAkB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;;;;;;;;;;AAkClE,wBAEE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAWnB,CAAC"}
1
+ {"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toast/Toast.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAMxD,KAAK,kBAAkB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;;;;;;;;;;;;;;;;AAkClE,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAWnB,CAAC"}
@@ -2,6 +2,12 @@ import '@dxosTheme';
2
2
  type StorybookToolbarProps = {};
3
3
  declare const _default: {
4
4
  component: (props: StorybookToolbarProps) => JSX.Element;
5
+ decorators: import("@storybook/react").Decorator[];
6
+ parameters: {
7
+ chromatic: {
8
+ disableSnapshot: boolean;
9
+ };
10
+ };
5
11
  };
6
12
  export default _default;
7
13
  export declare const Default: {
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AASpB,KAAK,qBAAqB,GAAG,EAAE,CAAC;;;;AAyDhC,wBAEE;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,YAAY,CAAC;AAUpB,KAAK,qBAAqB,GAAG,EAAE,CAAC;;;;;;;;;;AAyDhC,wBAIE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
@@ -4,6 +4,12 @@ type StoryTooltipProps = {
4
4
  };
5
5
  declare const _default: {
6
6
  component: ({ content }: StoryTooltipProps) => JSX.Element;
7
+ decorators: import("@storybook/react").Decorator[];
8
+ parameters: {
9
+ chromatic: {
10
+ disableSnapshot: boolean;
11
+ };
12
+ };
7
13
  };
8
14
  export default _default;
9
15
  export declare const Default: {
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAOpB,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;;;;AAgBF,wBAEE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;CAOnB,CAAC"}
1
+ {"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAQpB,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;;;;;;;;;;AAgBF,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;CAOnB,CAAC"}
@@ -1,6 +1,12 @@
1
1
  import '@dxosTheme';
2
2
  declare const _default: {
3
3
  component: () => JSX.Element;
4
+ decorators: import("@storybook/react").Decorator[];
5
+ parameters: {
6
+ chromatic: {
7
+ disableSnapshot: boolean;
8
+ };
9
+ };
4
10
  };
5
11
  export default _default;
6
12
  export declare const Default: {
@@ -1 +1 @@
1
- {"version":3,"file":"Controls.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Controls.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;AA+EpB,wBAEE;AAEF,eAAO,MAAM,OAAO;;;;CAEnB,CAAC"}
1
+ {"version":3,"file":"Controls.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Controls.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;;;;;;;AAgFpB,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;CAEnB,CAAC"}
@@ -1,6 +1,12 @@
1
1
  import '@dxosTheme';
2
2
  declare const _default: {
3
3
  component: () => JSX.Element;
4
+ decorators: import("@storybook/react").Decorator[];
5
+ parameters: {
6
+ chromatic: {
7
+ disableSnapshot: boolean;
8
+ };
9
+ };
4
10
  };
5
11
  export default _default;
6
12
  export declare const Default: {
@@ -1 +1 @@
1
- {"version":3,"file":"Surfaces.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Surfaces.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;AAqDpB,wBAEE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
1
+ {"version":3,"file":"Surfaces.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Surfaces.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;;;;;;;AAuDpB,wBAIE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './with-theme';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Decorator } from '@storybook/react';
2
+ export declare const withTheme: Decorator;
3
+ //# sourceMappingURL=with-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-theme.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/with-theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAOlD,eAAO,MAAM,SAAS,EAAE,SAUvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './decorators';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxos/react-ui",
3
- "version": "0.3.9-main.f8fc6b9",
4
- "description": "Opinionated, styled, low-level React components for DXOS.",
3
+ "version": "0.3.9-next.35264cb",
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",
7
7
  "license": "MIT",
@@ -10,9 +10,7 @@
10
10
  "types": "dist/types/src/index.d.ts",
11
11
  "files": [
12
12
  "dist",
13
- "src",
14
- "plugin.js",
15
- "plugin.d.ts"
13
+ "src"
16
14
  ],
17
15
  "dependencies": {
18
16
  "@radix-ui/react-alert-dialog": "^1.0.3",
@@ -39,10 +37,10 @@
39
37
  "jdenticon": "^3.2.0",
40
38
  "keyborg": "^2.0.0",
41
39
  "react-i18next": "^11.18.6",
42
- "@dxos/react-hooks": "0.3.9-main.f8fc6b9",
43
- "@dxos/react-input": "0.3.9-main.f8fc6b9",
44
- "@dxos/react-ui-types": "0.3.9-main.f8fc6b9",
45
- "@dxos/react-list": "0.3.9-main.f8fc6b9"
40
+ "@dxos/react-hooks": "0.3.9-next.35264cb",
41
+ "@dxos/react-ui-types": "0.3.9-next.35264cb",
42
+ "@dxos/react-list": "0.3.9-next.35264cb",
43
+ "@dxos/react-input": "0.3.9-next.35264cb"
46
44
  },
47
45
  "devDependencies": {
48
46
  "@dnd-kit/core": "^6.0.5",
@@ -52,12 +50,11 @@
52
50
  "@phosphor-icons/react": "^2.0.5",
53
51
  "@types/react": "^18.0.21",
54
52
  "@types/react-dom": "^18.0.6",
55
- "chromatic": "^7.5.0",
56
53
  "react": "^18.2.0",
57
54
  "react-dom": "^18.2.0",
58
55
  "vite": "^4.3.9",
59
56
  "vite-plugin-turbosnap": "^1.0.2",
60
- "@dxos/react-ui-theme": "0.3.9-main.f8fc6b9"
57
+ "@dxos/react-ui-theme": "0.3.9-next.35264cb"
61
58
  },
62
59
  "peerDependencies": {
63
60
  "@phosphor-icons/react": "^2.0.5",
@@ -66,8 +63,5 @@
66
63
  },
67
64
  "publishConfig": {
68
65
  "access": "public"
69
- },
70
- "scripts": {
71
- "chromatic": "chromatic --only-changed --project-token=\"44ade288043a\" --storybook-build-dir out/react-ui --exit-zero-on-changes"
72
66
  }
73
67
  }
@@ -10,6 +10,7 @@ import { getColorForValue } from '@dxos/react-ui-theme';
10
10
  import { type Size } from '@dxos/react-ui-types';
11
11
 
12
12
  import { Avatar, useJdenticonHref, type AvatarVariant, type AvatarStatus, type AvatarAnimation } from './Avatar';
13
+ import { withTheme } from '../../testing';
13
14
 
14
15
  const randomColor = () => getColorForValue({ value: Math.random().toString(16), type: 'color' });
15
16
 
@@ -62,6 +63,7 @@ const StorybookAvatar = (props: PropsWithChildren<StorybookAvatarProps>) => {
62
63
 
63
64
  export default {
64
65
  component: StorybookAvatar,
66
+ decorators: [withTheme],
65
67
  };
66
68
 
67
69
  const sampleImage =
@@ -8,6 +8,7 @@ import React from 'react';
8
8
 
9
9
  import { Avatar, useJdenticonHref } from './Avatar';
10
10
  import { AvatarGroup, AvatarGroupItem } from './AvatarGroup';
11
+ import { withTheme } from '../../testing';
11
12
 
12
13
  const items = [
13
14
  '[&_.avatarFrameFill]:fill-lime-500',
@@ -42,6 +43,7 @@ const StorybookAvatarGroup = () => {
42
43
 
43
44
  export default {
44
45
  component: StorybookAvatarGroup,
46
+ decorators: [withTheme],
45
47
  };
46
48
 
47
49
  export const Default = {
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { Breadcrumb } from './Breadcrumb';
10
+ import { withTheme } from '../../testing';
10
11
  import { Button } from '../Buttons';
11
12
 
12
13
  const StorybookBreadcrumb = () => {
@@ -39,6 +40,7 @@ const StorybookBreadcrumb = () => {
39
40
 
40
41
  export default {
41
42
  component: StorybookBreadcrumb,
43
+ decorators: [withTheme],
42
44
  };
43
45
 
44
46
  export const Default = {
@@ -10,11 +10,13 @@ import React, { type PropsWithChildren } from 'react';
10
10
  import { chromeSurface, groupSurface, mx, surfaceElevation } from '@dxos/react-ui-theme';
11
11
 
12
12
  import { Button, ButtonGroup, type ButtonProps } from './Button';
13
+ import { withTheme } from '../../testing';
13
14
  import { DensityProvider } from '../DensityProvider';
14
15
  import { ElevationProvider } from '../ElevationProvider';
15
16
 
16
17
  export default {
17
18
  component: Button,
19
+ decorators: [withTheme],
18
20
  };
19
21
 
20
22
  const Container = ({ children }: PropsWithChildren<{}>) => (
@@ -8,6 +8,7 @@ import { TextB } from '@phosphor-icons/react';
8
8
  import React from 'react';
9
9
 
10
10
  import { Toggle } from './Toggle';
11
+ import { withTheme } from '../../testing';
11
12
 
12
13
  type StorybookToggleProps = {};
13
14
 
@@ -21,6 +22,7 @@ const StorybookToggle = (props: StorybookToggleProps) => {
21
22
 
22
23
  export default {
23
24
  component: StorybookToggle,
25
+ decorators: [withTheme],
24
26
  };
25
27
 
26
28
  export const Default = {
@@ -8,6 +8,7 @@ import { TextB, TextItalic } from '@phosphor-icons/react';
8
8
  import React from 'react';
9
9
 
10
10
  import { ToggleGroup, ToggleGroupItem, type ToggleGroupProps } from './ToggleGroup';
11
+ import { withTheme } from '../../testing';
11
12
 
12
13
  type StorybookToggleGroupProps = {
13
14
  type: ToggleGroupProps['type'];
@@ -29,6 +30,7 @@ const StorybookToggleGroup = (props: StorybookToggleGroupProps) => {
29
30
 
30
31
  export default {
31
32
  component: StorybookToggleGroup,
33
+ decorators: [withTheme],
32
34
  };
33
35
 
34
36
  export const Default = {
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { AlertDialog } from './AlertDialog';
10
+ import { withTheme } from '../../testing';
10
11
  import { Button } from '../Buttons';
11
12
  import { Toolbar } from '../Toolbar';
12
13
 
@@ -54,6 +55,7 @@ const StorybookAlertDialog = ({
54
55
 
55
56
  export default {
56
57
  component: StorybookAlertDialog,
58
+ decorators: [withTheme],
57
59
  };
58
60
 
59
61
  export const Default = {
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { Dialog } from './Dialog';
10
+ import { withTheme } from '../../testing';
10
11
  import { Button } from '../Buttons';
11
12
 
12
13
  type StorybookDialogProps = Partial<{
@@ -39,6 +40,7 @@ const StorybookDialog = ({ title, openTrigger, description, body, closeTrigger }
39
40
 
40
41
  export default {
41
42
  component: StorybookDialog,
43
+ decorators: [withTheme],
42
44
  };
43
45
 
44
46
  export const Default = {
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { DropdownMenu } from './DropdownMenu';
10
+ import { withTheme } from '../../testing';
10
11
  import { Button } from '../Buttons';
11
12
 
12
13
  const StorybookDropdownMenu = () => {
@@ -92,6 +93,7 @@ const StorybookDropdownMenu = () => {
92
93
 
93
94
  export default {
94
95
  component: StorybookDropdownMenu,
96
+ decorators: [withTheme],
95
97
  };
96
98
 
97
99
  export const Default = {
@@ -10,6 +10,7 @@ import { baseSurface, chromeSurface, groupSurface, mx, surfaceElevation } from '
10
10
  import { type MessageValence } from '@dxos/react-ui-types';
11
11
 
12
12
  import { Input } from './Input';
13
+ import { withTheme } from '../../testing';
13
14
 
14
15
  type StoryInputProps = Partial<{
15
16
  label: string;
@@ -86,6 +87,7 @@ export default {
86
87
  options: ['default', 'textarea', 'pin'],
87
88
  },
88
89
  },
90
+ decorators: [withTheme],
89
91
  };
90
92
 
91
93
  export const Default = {
@@ -175,11 +175,13 @@ type TextInputProps = InputSharedProps & ThemedClassName<TextInputPrimitiveProps
175
175
  const TextInput = forwardRef<HTMLInputElement, InputScopedProps<TextInputProps>>(
176
176
  ({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
177
177
  const { hasIosKeyboard } = useThemeContext();
178
- const { tx } = useThemeContext();
178
+ const themeContextValue = useThemeContext();
179
179
  const density = useDensityContext(propsDensity);
180
180
  const elevation = useElevationContext(propsElevation);
181
181
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
182
182
 
183
+ const { tx } = themeContextValue;
184
+
183
185
  return (
184
186
  <TextInputPrimitive
185
187
  {...props}
@@ -5,9 +5,11 @@
5
5
  import '@dxosTheme';
6
6
 
7
7
  import { Link } from './Link';
8
+ import { withTheme } from '../../testing';
8
9
 
9
10
  export default {
10
11
  component: Link,
12
+ decorators: [withTheme],
11
13
  } as any;
12
14
 
13
15
  export const Default = { args: { children: 'Hello', href: '#' } };
@@ -13,9 +13,11 @@ import React, { type FC, type ReactNode, useState } from 'react';
13
13
  import { getSize, mx, surfaceElevation } from '@dxos/react-ui-theme';
14
14
 
15
15
  import { List, ListItem, type ListProps, type ListScopedProps } from './List';
16
+ import { withTheme } from '../../testing';
16
17
 
17
18
  export default {
18
19
  component: List as FC<ListProps>,
20
+ decorators: [withTheme],
19
21
  };
20
22
 
21
23
  const UniformListItem = ({ id, text }: { id: string; text: string }) => {
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { Tree, TreeItem } from './Tree';
10
+ import { withTheme } from '../../testing';
10
11
 
11
12
  type StorybookTreeProps = {
12
13
  data: any;
@@ -56,6 +57,7 @@ const StorybookTree = ({ data }: StorybookTreeProps) => {
56
57
 
57
58
  export default {
58
59
  component: StorybookTree,
60
+ decorators: [withTheme],
59
61
  };
60
62
 
61
63
  export const Default = {
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { Main, useSidebars } from './Main';
10
+ import { withTheme } from '../../testing';
10
11
  import { Button } from '../Buttons';
11
12
 
12
13
  type StoryMainArgs = {};
@@ -44,7 +45,10 @@ const StoryMain = (_args: StoryMainArgs) => {
44
45
  );
45
46
  };
46
47
 
47
- export default { component: StoryMain };
48
+ export default {
49
+ component: StoryMain,
50
+ decorators: [withTheme],
51
+ };
48
52
 
49
53
  export const Default = {
50
54
  args: {},
@@ -10,6 +10,7 @@ import React from 'react';
10
10
  import { type MessageValence } from '@dxos/react-ui-types';
11
11
 
12
12
  import { Message } from './Message';
13
+ import { withTheme } from '../../testing';
13
14
 
14
15
  type StoryMessageProps = {
15
16
  valence: MessageValence;
@@ -28,6 +29,7 @@ const StoryMessage = ({ valence, title, body }: StoryMessageProps) => (
28
29
 
29
30
  export default {
30
31
  component: StoryMessage,
32
+ decorators: [withTheme],
31
33
  };
32
34
 
33
35
  export const Default = {
@@ -8,6 +8,7 @@ import { faker } from '@faker-js/faker';
8
8
  import React, { type PropsWithChildren, type ReactNode } from 'react';
9
9
 
10
10
  import { Popover } from './Popover';
11
+ import { withTheme } from '../../testing';
11
12
  import { Button } from '../Buttons';
12
13
 
13
14
  faker.seed(1234);
@@ -28,6 +29,8 @@ const StorybookPopover = ({ openTrigger, children }: PropsWithChildren<{ openTri
28
29
 
29
30
  export default {
30
31
  component: StorybookPopover,
32
+ decorators: [withTheme],
33
+ parameters: { chromatic: { disableSnapshot: false } },
31
34
  };
32
35
 
33
36
  export const Default = {
@@ -10,6 +10,7 @@ import React, { type PropsWithChildren } from 'react';
10
10
  import { groupSurface, surfaceElevation } from '@dxos/react-ui-theme';
11
11
 
12
12
  import { ScrollArea } from './ScrollArea';
13
+ import { withTheme } from '../../testing';
13
14
 
14
15
  faker.seed(1234);
15
16
 
@@ -34,6 +35,8 @@ const StorybookScrollArea = ({ children }: PropsWithChildren<{}>) => {
34
35
 
35
36
  export default {
36
37
  component: StorybookScrollArea,
38
+ decorators: [withTheme],
39
+ parameters: { chromatic: { disableSnapshot: false } },
37
40
  };
38
41
 
39
42
  export const Default = {
@@ -10,6 +10,7 @@ import React, { type FC, type PropsWithChildren, useState } from 'react';
10
10
  import { type Density } from '@dxos/react-ui-types';
11
11
 
12
12
  import { Select } from './Select';
13
+ import { withTheme } from '../../testing';
13
14
  import { DensityProvider } from '../DensityProvider';
14
15
 
15
16
  faker.seed(1234);
@@ -59,6 +60,8 @@ const StorybookSelect = ({ items = [] }: PropsWithChildren<{ items: ItemProps[]
59
60
 
60
61
  export default {
61
62
  component: createDensityTest(StorybookSelect),
63
+ decorators: [withTheme],
64
+ parameters: { chromatic: { disableSnapshot: false } },
62
65
  };
63
66
 
64
67
  export const Default = {
@@ -7,10 +7,13 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { Status } from './Status';
10
+ import { withTheme } from '../../testing';
10
11
 
11
12
  export default {
12
13
  component: Status,
13
14
  actions: { argTypesRegex: '^on.*' },
15
+ decorators: [withTheme],
16
+ parameters: { chromatic: { disableSnapshot: false } },
14
17
  };
15
18
 
16
19
  export const Normal = (props: any) => {
@@ -5,9 +5,12 @@
5
5
  import '@dxosTheme';
6
6
 
7
7
  import { Tag } from './Tag';
8
+ import { withTheme } from '../../testing';
8
9
 
9
10
  export default {
10
11
  component: Tag,
12
+ decorators: [withTheme],
13
+ parameters: { chromatic: { disableSnapshot: false } },
11
14
  argTypes: {
12
15
  palette: {
13
16
  control: 'select',
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React, { type ReactNode, useState } from 'react';
8
8
 
9
9
  import { Toast } from './Toast';
10
+ import { withTheme } from '../../testing';
10
11
  import { Button } from '../Buttons';
11
12
 
12
13
  type ActionTriggerProps = { altText: string; trigger: ReactNode };
@@ -45,6 +46,8 @@ const StorybookToast = (props: StorybookToastProps) => {
45
46
 
46
47
  export default {
47
48
  component: StorybookToast,
49
+ decorators: [withTheme],
50
+ parameters: { chromatic: { disableSnapshot: false } },
48
51
  };
49
52
 
50
53
  export const Default = {
@@ -8,6 +8,7 @@ import { ArrowClockwise, Bug, FileJs, FileTs, TextB, TextItalic, TextUnderline }
8
8
  import React from 'react';
9
9
 
10
10
  import { Toolbar } from './Toolbar';
11
+ import { withTheme } from '../../testing';
11
12
  import { Toggle } from '../Buttons';
12
13
  import { Select } from '../Select';
13
14
 
@@ -70,6 +71,8 @@ const StorybookToolbar = (props: StorybookToolbarProps) => {
70
71
 
71
72
  export default {
72
73
  component: StorybookToolbar,
74
+ decorators: [withTheme],
75
+ parameters: { chromatic: { disableSnapshot: false } },
73
76
  };
74
77
 
75
78
  export const Default = {
@@ -7,6 +7,7 @@ import '@dxosTheme';
7
7
  import React from 'react';
8
8
 
9
9
  import { Tooltip } from './Tooltip';
10
+ import { withTheme } from '../../testing';
10
11
  import { Button } from '../Buttons';
11
12
 
12
13
  type StoryTooltipProps = {
@@ -29,6 +30,8 @@ const StoryTooltip = ({ content }: StoryTooltipProps) => (
29
30
 
30
31
  export default {
31
32
  component: StoryTooltip,
33
+ decorators: [withTheme],
34
+ parameters: { chromatic: { disableSnapshot: false } },
32
35
  };
33
36
 
34
37
  export const Default = {