@dxos/react-ui 0.6.13 → 0.6.14-main.69511f5

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 (126) hide show
  1. package/dist/lib/browser/index.mjs +731 -198
  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 +2925 -0
  5. package/dist/lib/node/index.cjs.map +7 -0
  6. package/dist/lib/node/meta.json +1 -0
  7. package/dist/lib/node-esm/index.mjs +2924 -0
  8. package/dist/lib/node-esm/index.mjs.map +7 -0
  9. package/dist/lib/node-esm/meta.json +1 -0
  10. package/dist/types/src/components/Avatars/Avatar.stories.d.ts +15 -1
  11. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  12. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +6 -1
  13. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
  14. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +9 -1
  15. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  16. package/dist/types/src/components/Buttons/Button.d.ts +1 -1
  17. package/dist/types/src/components/Buttons/Button.d.ts.map +1 -1
  18. package/dist/types/src/components/Buttons/Button.stories.d.ts +12 -17
  19. package/dist/types/src/components/Buttons/Button.stories.d.ts.map +1 -1
  20. package/dist/types/src/components/Buttons/Toggle.stories.d.ts +2 -1
  21. package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +1 -1
  22. package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts +20 -1
  23. package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +1 -1
  24. package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
  25. package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts +12 -1
  26. package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +1 -1
  27. package/dist/types/src/components/Dialogs/Dialog.stories.d.ts +11 -1
  28. package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Icon/Icon.d.ts +1 -1
  30. package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
  31. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  32. package/dist/types/src/components/Input/Input.stories.d.ts +16 -1
  33. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  34. package/dist/types/src/components/Lists/List.stories.d.ts +2 -3
  35. package/dist/types/src/components/Lists/List.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/Lists/Tree.stories.d.ts +5 -1
  37. package/dist/types/src/components/Lists/Tree.stories.d.ts.map +1 -1
  38. package/dist/types/src/components/Lists/Treegrid.stories.d.ts +3 -2
  39. package/dist/types/src/components/Lists/Treegrid.stories.d.ts.map +1 -1
  40. package/dist/types/src/components/Main/Main.stories.d.ts +5 -1
  41. package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/Menus/ContextMenu.stories.d.ts +29 -1
  43. package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +1 -1
  44. package/dist/types/src/components/Menus/DropdownMenu.d.ts +105 -44
  45. package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -1
  46. package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts +29 -1
  47. package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +1 -1
  48. package/dist/types/src/components/Message/Message.stories.d.ts +6 -1
  49. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  50. package/dist/types/src/components/Popover/Popover.d.ts +87 -21
  51. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  52. package/dist/types/src/components/Popover/Popover.stories.d.ts +20 -1
  53. package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
  54. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +20 -1
  55. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  56. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  57. package/dist/types/src/components/Select/Select.stories.d.ts +10 -11
  58. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/Status/Status.stories.d.ts +0 -3
  60. package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
  61. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +4 -5
  62. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  63. package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +4 -4
  64. package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
  65. package/dist/types/src/components/Toast/Toast.stories.d.ts +20 -1
  66. package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
  67. package/dist/types/src/components/Toolbar/Toolbar.d.ts +4 -2
  68. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  69. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +30 -1
  70. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  71. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +13 -1
  72. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  73. package/dist/types/src/hooks/useThemeContext.d.ts.map +1 -1
  74. package/dist/types/src/playground/Controls.stories.d.ts +2 -6
  75. package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
  76. package/dist/types/src/playground/Surfaces.stories.d.ts +6 -2
  77. package/dist/types/src/playground/Surfaces.stories.d.ts.map +1 -1
  78. package/dist/types/src/playground/Typography.stories.d.ts +1 -1
  79. package/dist/types/src/testing/decorators/index.d.ts +1 -0
  80. package/dist/types/src/testing/decorators/index.d.ts.map +1 -1
  81. package/dist/types/src/testing/decorators/withVariants.d.ts +13 -0
  82. package/dist/types/src/testing/decorators/withVariants.d.ts.map +1 -0
  83. package/package.json +28 -17
  84. package/src/components/Avatars/Avatar.stories.tsx +3 -2
  85. package/src/components/Avatars/AvatarGroup.stories.tsx +3 -2
  86. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +3 -2
  87. package/src/components/Buttons/Button.stories.tsx +34 -63
  88. package/src/components/Buttons/Button.tsx +46 -36
  89. package/src/components/Buttons/Toggle.stories.tsx +3 -2
  90. package/src/components/Buttons/ToggleGroup.stories.tsx +3 -2
  91. package/src/components/DensityProvider/DensityProvider.tsx +1 -1
  92. package/src/components/Dialogs/AlertDialog.stories.tsx +3 -2
  93. package/src/components/Dialogs/Dialog.stories.tsx +3 -2
  94. package/src/components/Icon/Icon.tsx +11 -9
  95. package/src/components/Input/Input.stories.tsx +4 -3
  96. package/src/components/Link/Link.stories.tsx +1 -1
  97. package/src/components/Lists/List.stories.tsx +4 -4
  98. package/src/components/Lists/Tree.stories.tsx +3 -2
  99. package/src/components/Lists/Treegrid.stories.tsx +7 -5
  100. package/src/components/Main/Main.stories.tsx +3 -2
  101. package/src/components/Menus/ContextMenu.stories.tsx +3 -2
  102. package/src/components/Menus/DropdownMenu.stories.tsx +43 -3
  103. package/src/components/Menus/DropdownMenu.tsx +518 -69
  104. package/src/components/Message/Message.stories.tsx +3 -2
  105. package/src/components/Popover/Popover.stories.tsx +27 -3
  106. package/src/components/Popover/Popover.tsx +524 -55
  107. package/src/components/ScrollArea/ScrollArea.stories.tsx +3 -2
  108. package/src/components/Select/Select.stories.tsx +14 -31
  109. package/src/components/Select/Select.tsx +9 -10
  110. package/src/components/Status/Status.stories.tsx +1 -2
  111. package/src/components/Tag/Tag.stories.tsx +1 -1
  112. package/src/components/ThemeProvider/ThemeProvider.tsx +17 -18
  113. package/src/components/Toast/Toast.stories.tsx +3 -2
  114. package/src/components/Toast/Toast.tsx +1 -4
  115. package/src/components/Toolbar/Toolbar.stories.tsx +3 -2
  116. package/src/components/Toolbar/Toolbar.tsx +21 -1
  117. package/src/components/Tooltip/Tooltip.stories.tsx +3 -2
  118. package/src/hooks/useThemeContext.ts +3 -1
  119. package/src/playground/Controls.stories.tsx +7 -10
  120. package/src/playground/Surfaces.stories.tsx +4 -3
  121. package/src/playground/Typography.stories.tsx +2 -2
  122. package/src/testing/decorators/index.ts +1 -0
  123. package/src/testing/decorators/withVariants.tsx +45 -0
  124. package/dist/types/src/playground/helpers.d.ts +0 -6
  125. package/dist/types/src/playground/helpers.d.ts.map +0 -1
  126. package/src/playground/helpers.tsx +0 -32
@@ -2,15 +2,14 @@ import React, { type PropsWithChildren } from 'react';
2
2
  import { type Density, type Elevation, type ThemeFunction } from '@dxos/react-ui-types';
3
3
  import { type TranslationsProviderProps } from './TranslationsProvider';
4
4
  export type ThemeMode = 'light' | 'dark';
5
- export interface ThemeContextValue {
5
+ export type ThemeContextValue = {
6
6
  tx: ThemeFunction<any>;
7
7
  themeMode: ThemeMode;
8
8
  hasIosKeyboard: boolean;
9
- }
9
+ };
10
10
  export type ThemeProviderProps = Omit<TranslationsProviderProps, 'children'> & Partial<ThemeContextValue> & PropsWithChildren<{
11
- rootElevation?: Elevation;
12
11
  rootDensity?: Density;
12
+ rootElevation?: Elevation;
13
13
  }>;
14
- export declare const ThemeContext: React.Context<ThemeContextValue>;
15
- export declare const ThemeProvider: ({ children, fallback, resourceExtensions, appNs, tx, themeMode, rootElevation, rootDensity, }: ThemeProviderProps) => React.JSX.Element;
14
+ export declare const ThemeProvider: ({ children, fallback, resourceExtensions, appNs, tx, themeMode, rootDensity, rootElevation, }: ThemeProviderProps) => React.JSX.Element;
16
15
  //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAiB,KAAK,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAEhF,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAExF,OAAO,EAAwB,K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OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC,CAAC;AAEL,eAAO,MAAM,aAAa,kGASvB,kBAAkB,sBAwBpB,CAAC"}
@@ -66,9 +66,9 @@ export declare const useTranslation: (ns?: string | string[] | readonly string[]
66
66
  findIndex(predicate: (value: boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>, index: number, obj: (boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>)[]) => unknown, thisArg?: any): number;
67
67
  fill(value: boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>, start?: number, end?: number): import("react-i18next").UseTranslationResponse<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>;
68
68
  copyWithin(target: number, start: number, end?: number): import("react-i18next").UseTranslationResponse<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>;
69
- entries(): IterableIterator<[number, boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>]>;
70
- keys(): IterableIterator<number>;
71
- values(): IterableIterator<boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>>;
69
+ entries(): ArrayIterator<[number, boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>]>;
70
+ keys(): ArrayIterator<number>;
71
+ values(): ArrayIterator<boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>>;
72
72
  includes(searchElement: boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>, fromIndex?: number): boolean;
73
73
  flatMap<U, This = undefined>(callback: (this: This, value: boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>, index: number, array: (boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>)[]) => U | readonly U[], thisArg?: This | undefined): U[];
74
74
  flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
@@ -81,7 +81,7 @@ export declare const useTranslation: (ns?: string | string[] | readonly string[]
81
81
  toSpliced(start: number, deleteCount: number, ...items: (boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>)[]): (boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>)[];
82
82
  toSpliced(start: number, deleteCount?: number): (boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>)[];
83
83
  with(index: number, value: boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>): (boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>)[];
84
- [Symbol.iterator](): IterableIterator<boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>>;
84
+ [Symbol.iterator](): ArrayIterator<boolean | import("i18next").i18n | import("react-i18next").TFunction<import("react-i18next").Namespace<string>, import("react-i18next").KeyPrefix<import("react-i18next").Namespace<string>>>>;
85
85
  [Symbol.unscopables]: {
86
86
  [x: number]: boolean | undefined;
87
87
  length?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAEL,KAAK,kBAAkB,IAAI,2BAA2B,EAEtD,KAAK,kBAAkB,IAAI,2BAA2B,EAEtD,KAAK,UAAU,IAAI,uBAAuB,EAE1C,KAAK,eAAe,IAAI,wBAAwB,EAEhD,KAAK,qBAAqB,IAAI,8BAA8B,EAE5D,KAAK,gBAAgB,IAAI,yBAAyB,EAElD,KAAK,eAAe,IAAI,wBAAwB,EACjD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAsC,MAAM,OAAO,CAAC;AAG9F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,KAAK,kBAAkB,GAAG,2BAA2B,CAAC;AAItD,KAAK,kBAAkB,GAAG,eAAe,CAAC,2BAA2B,CAAC,CAAC;AASvE,KAAK,cAAc,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAa/D,KAAK,cAAc,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAQnF,KAAK,eAAe,GAAG,eAAe,CAAC,wBAAwB,CAAC,CAAC;AAUjE,KAAK,qBAAqB,GAAG,eAAe,CAAC,8BAA8B,CAAC,CAAC;AAY7E,KAAK,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAUtF,KAAK,gBAAgB,GAAG,yBAAyB,CAAC;AAIlD,KAAK,eAAe,GAAG,wBAAwB,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AgB,GAAG,yBAAyB,CAAC;AAIlD,KAAK,eAAe,GAAG,wBAAwB,CAAC;AAIhD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;CAUjB,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,GAChB,CAAC"}
@@ -13,7 +13,26 @@ type StorybookToastProps = Partial<{
13
13
  }>;
14
14
  declare const _default: {
15
15
  title: string;
16
- component: (props: StorybookToastProps) => React.JSX.Element;
16
+ component: {
17
+ Provider: React.FunctionComponent<import("@radix-ui/react-toast").ToastProviderProps>;
18
+ Viewport: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toast").ToastViewportProps, "className"> & {
19
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
20
+ } & React.RefAttributes<HTMLOListElement>>;
21
+ Root: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toast").ToastProps, "className"> & {
22
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
23
+ } & React.RefAttributes<HTMLLIElement>>;
24
+ Body: React.ForwardRefExoticComponent<Omit<import("./Toast").ToastBodyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ Title: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toast").ToastTitleProps, "className"> & {
26
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
27
+ } & React.RefAttributes<HTMLHeadingElement>>;
28
+ Description: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toast").ToastDescriptionProps, "className"> & {
29
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
30
+ } & React.RefAttributes<HTMLParagraphElement>>;
31
+ Actions: React.ForwardRefExoticComponent<Omit<import("./Toast").ToastActionsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
32
+ Action: React.FunctionComponent<import("@radix-ui/react-toast").ToastActionProps>;
33
+ Close: React.FunctionComponent<import("@radix-ui/react-toast").ToastCloseProps>;
34
+ };
35
+ render: (props: StorybookToastProps) => React.JSX.Element;
17
36
  decorators: import("@storybook/react/*").Decorator[];
18
37
  parameters: {
19
38
  chromatic: {
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toast/Toast.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,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;AAElE,KAAK,mBAAmB,GAAG,OAAO,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,EAAE,CAAC;IACrC,YAAY,EAAE,SAAS,CAAC;CACzB,CAAC,CAAC;;;uBAE4B,mBAAmB;;;;;;;;AAwBlD,wBAKE;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,aAAa,CAAC;AAErB,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;AAElE,KAAK,mBAAmB,GAAG,OAAO,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,EAAE,CAAC;IACrC,YAAY,EAAE,SAAS,CAAC;CACzB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;oBAE4B,mBAAmB;;;;;;;;AAwBlD,wBAME;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAWnB,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
2
2
  import React from 'react';
3
3
  import { type ThemedClassName } from '../../util';
4
- import { type ButtonGroupProps, type ButtonProps, type ToggleGroupItemProps } from '../Buttons';
4
+ import { type ButtonGroupProps, type ButtonProps, type ToggleGroupItemProps, type ToggleProps } from '../Buttons';
5
5
  import { type LinkProps } from '../Link';
6
6
  import { type SeparatorProps } from '../Separator';
7
7
  type ToolbarRootProps = ThemedClassName<ToolbarPrimitive.ToolbarProps>;
8
8
  type ToolbarButtonProps = ButtonProps;
9
+ type ToolbarToggleProps = ToggleProps;
9
10
  type ToolbarLinkProps = LinkProps;
10
11
  type ToolbarToggleGroupProps = (Omit<ToolbarPrimitive.ToolbarToggleGroupSingleProps, 'className'> | Omit<ToolbarPrimitive.ToolbarToggleGroupMultipleProps, 'className'>) & ButtonGroupProps;
11
12
  type ToolbarToggleGroupItemProps = ToggleGroupItemProps;
@@ -16,6 +17,7 @@ export declare const Toolbar: {
16
17
  } & React.RefAttributes<HTMLDivElement>>;
17
18
  Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
19
  Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
20
+ Toggle: React.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
21
  ToggleGroup: React.ForwardRefExoticComponent<(Omit<Omit<ToolbarPrimitive.ToolbarToggleGroupSingleProps, "className"> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
20
22
  ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
21
23
  } & {
@@ -38,5 +40,5 @@ export declare const Toolbar: {
38
40
  ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
39
41
  Separator: (props: SeparatorProps) => React.JSX.Element;
40
42
  };
41
- export type { ToolbarRootProps, ToolbarButtonProps, ToolbarLinkProps, ToolbarToggleGroupProps, ToolbarToggleGroupItemProps, ToolbarSeparatorProps, };
43
+ export type { ToolbarRootProps, ToolbarButtonProps, ToolbarLinkProps, ToolbarToggleProps, ToolbarToggleGroupProps, ToolbarToggleGroupItemProps, ToolbarSeparatorProps, };
42
44
  //# sourceMappingURL=Toolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAuB,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACrH,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,gBAAgB,GAAG,SAAS,CAAC;AAUlC,KAAK,uBAAuB,GAAG,C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CAAC;AAYnB,KAAK,2BAA2B,GAAG,oBAAoB,CAAC;AAYxD,KAAK,qBAAqB,GAAG,cAAc,CAAC;AAU5C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;uBARa,cAAc;CAgB9C,CAAC;AAEF,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,GACtB,CAAC"}
@@ -3,7 +3,36 @@ import React from 'react';
3
3
  type StorybookToolbarProps = {};
4
4
  declare const _default: {
5
5
  title: string;
6
- component: (props: StorybookToolbarProps) => React.JSX.Element;
6
+ component: {
7
+ Root: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toolbar").ToolbarProps, "className"> & {
8
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
9
+ } & React.RefAttributes<HTMLDivElement>>;
10
+ Button: React.ForwardRefExoticComponent<Omit<import("../Buttons").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ Link: React.ForwardRefExoticComponent<Omit<import("..").LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
12
+ Toggle: React.ForwardRefExoticComponent<Omit<import("../Buttons").ToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
13
+ ToggleGroup: React.ForwardRefExoticComponent<(Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleGroupSingleProps, "className"> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
+ ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
15
+ } & {
16
+ asChild?: boolean;
17
+ }, "className"> & {
18
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
19
+ } & {
20
+ elevation?: import("packages/ui/react-ui-types/dist/types/src").Elevation;
21
+ asChild?: boolean;
22
+ }, "ref"> | Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleGroupMultipleProps, "className"> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
23
+ ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
24
+ } & {
25
+ asChild?: boolean;
26
+ }, "className"> & {
27
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
28
+ } & {
29
+ elevation?: import("packages/ui/react-ui-types/dist/types/src").Elevation;
30
+ asChild?: boolean;
31
+ }, "ref">) & React.RefAttributes<HTMLDivElement>>;
32
+ ToggleGroupItem: React.ForwardRefExoticComponent<Omit<import("../Buttons").ToggleGroupItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
33
+ Separator: (props: import("..").SeparatorProps) => React.JSX.Element;
34
+ };
35
+ render: (props: StorybookToolbarProps) => React.JSX.Element;
7
36
  decorators: import("@storybook/react/*").Decorator[];
8
37
  parameters: {
9
38
  chromatic: {
@@ -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;;;uBAEC,qBAAqB;;;;;;;;AAuDtD,wBAKE;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEC,qBAAqB;;;;;;;;AAuDtD,wBAME;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
@@ -5,7 +5,19 @@ type StoryTooltipProps = {
5
5
  };
6
6
  declare const _default: {
7
7
  title: string;
8
- component: ({ content }: StoryTooltipProps) => React.JSX.Element;
8
+ component: {
9
+ Provider: React.FunctionComponent<import("@radix-ui/react-tooltip").TooltipProviderProps>;
10
+ Root: React.FunctionComponent<import("@radix-ui/react-tooltip").TooltipProps>;
11
+ Portal: React.FC<import("@radix-ui/react-tooltip").TooltipPortalProps>;
12
+ Trigger: React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
13
+ Arrow: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tooltip").TooltipArrowProps, "className"> & {
14
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
15
+ } & React.RefAttributes<SVGSVGElement>>;
16
+ Content: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tooltip").TooltipContentProps, "className"> & {
17
+ classNames?: import("packages/ui/react-ui-types/dist/types/src").ClassNameValue;
18
+ } & React.RefAttributes<HTMLDivElement>>;
19
+ };
20
+ render: ({ content }: StoryTooltipProps) => React.JSX.Element;
9
21
  decorators: import("@storybook/react/*").Decorator[];
10
22
  parameters: {
11
23
  chromatic: {
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;;;6BAEiC,iBAAiB;;;;;;;;AAcpD,wBAKE;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,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;;;;;;;;;;;;;;;0BAEiC,iBAAiB;;;;;;;;AAcpD,wBAME;AAEF,eAAO,MAAM,OAAO;;;;;;;;;CAOnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeContext.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,iDAAiC,CAAC"}
1
+ {"version":3,"file":"useThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeContext.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,iDAA6E,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import '@dxos-theme';
2
2
  import React from 'react';
3
+ export declare const Default: {};
3
4
  declare const _default: {
4
5
  title: string;
5
- component: () => React.JSX.Element;
6
+ render: () => React.JSX.Element;
6
7
  decorators: import("@storybook/react/*").Decorator[];
7
8
  parameters: {
8
9
  chromatic: {
@@ -11,9 +12,4 @@ declare const _default: {
11
12
  };
12
13
  };
13
14
  export default _default;
14
- export declare const Default: {
15
- render: ({ ...props }: {
16
- [x: string]: any;
17
- }) => React.JSX.Element;
18
- };
19
15
  //# sourceMappingURL=Controls.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Controls.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Controls.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAmB,MAAM,OAAO,CAAC;;;;;;;;;;;AA6ExC,wBAKE;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,aAAa,CAAC;AAGrB,OAAO,KAAmB,MAAM,OAAO,CAAC;AA4ExC,eAAO,MAAM,OAAO,IAAK,CAAC;;;;;;;;;;;AAE1B,wBAKE"}
@@ -1,8 +1,12 @@
1
1
  import '@dxos-theme';
2
- import React from 'react';
2
+ import React, { type PropsWithChildren } from 'react';
3
+ type SurfaceLevel = 'base' | 'group' | 'chrome' | 'fixed' | 'input' | 'accent';
3
4
  declare const _default: {
4
5
  title: string;
5
- component: () => React.JSX.Element;
6
+ component: ({ children, level }: PropsWithChildren & {
7
+ level: SurfaceLevel;
8
+ }) => React.JSX.Element;
9
+ render: () => React.JSX.Element;
6
10
  decorators: import("@storybook/react/*").Decorator[];
7
11
  parameters: {
8
12
  chromatic: {
@@ -1 +1 @@
1
- {"version":3,"file":"Surfaces.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Surfaces.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAiC,MAAM,OAAO,CAAC;;;;;;;;;;;AAwDtD,wBAKE;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,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAgBtD,KAAK,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;;;qCAEzC,iBAAiB,GAAG;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE;;;;;;;;;AAsCjF,wBAME;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
@@ -2,7 +2,7 @@ import '@dxos-theme';
2
2
  import React from 'react';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: () => React.JSX.Element;
5
+ render: () => React.JSX.Element;
6
6
  decorators: import("@storybook/react/*").Decorator[];
7
7
  parameters: {
8
8
  chromatic: {
@@ -1,2 +1,3 @@
1
1
  export * from './withTheme';
2
+ export * from './withVariants';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import '@dxos-theme';
2
+ import { type Decorator } from '@storybook/react';
3
+ import { type Density, type Elevation } from '@dxos/react-ui-types';
4
+ type Config = {
5
+ elevations?: {
6
+ elevation: Elevation;
7
+ surface?: string;
8
+ }[];
9
+ densities?: Density[];
10
+ };
11
+ export declare const withVariants: ({ elevations, densities, }?: Config) => Decorator;
12
+ export {};
13
+ //# sourceMappingURL=withVariants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withVariants.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/withVariants.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIpE,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;AAEF,eAAO,MAAM,YAAY,gCAOtB,MAAM,KAAQ,SAkBhB,CAAC"}
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@dxos/react-ui",
3
- "version": "0.6.13",
3
+ "version": "0.6.14-main.69511f5",
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",
7
7
  "license": "MIT",
8
8
  "author": "DXOS.org",
9
+ "sideEffects": true,
9
10
  "exports": {
10
11
  ".": {
12
+ "types": "./dist/types/src/index.d.ts",
11
13
  "browser": "./dist/lib/browser/index.mjs",
12
- "types": "./dist/types/src/index.d.ts"
14
+ "node": "./dist/lib/node-esm/index.mjs"
13
15
  }
14
16
  },
15
17
  "types": "dist/types/src/index.d.ts",
@@ -22,6 +24,7 @@
22
24
  ],
23
25
  "dependencies": {
24
26
  "@fluentui/react-tabster": "^9.19.0",
27
+ "@radix-ui/primitive": "^1.0.0",
25
28
  "@radix-ui/react-alert-dialog": "^1.0.3",
26
29
  "@radix-ui/react-avatar": "^1.0.2",
27
30
  "@radix-ui/react-checkbox": "^1.0.3",
@@ -30,9 +33,14 @@
30
33
  "@radix-ui/react-context": "^1.0.0",
31
34
  "@radix-ui/react-context-menu": "^2.1.5",
32
35
  "@radix-ui/react-dialog": "^1.0.3",
33
- "@radix-ui/react-dropdown-menu": "2.0.7-rc.10",
34
- "@radix-ui/react-popover": "1.0.8-rc.8",
36
+ "@radix-ui/react-dismissable-layer": "^1.1.1",
37
+ "@radix-ui/react-focus-guards": "^1.1.1",
38
+ "@radix-ui/react-focus-scope": "^1.1.0",
39
+ "@radix-ui/react-id": "^1.1.0",
40
+ "@radix-ui/react-menu": "^2.0.6",
35
41
  "@radix-ui/react-popper": "^1.1.2",
42
+ "@radix-ui/react-portal": "^1.1.2",
43
+ "@radix-ui/react-presence": "^1.1.1",
36
44
  "@radix-ui/react-primitive": "^1.0.2",
37
45
  "@radix-ui/react-scroll-area": "^1.0.3",
38
46
  "@radix-ui/react-select": "^1.2.1",
@@ -45,16 +53,19 @@
45
53
  "@radix-ui/react-toolbar": "^1.0.3",
46
54
  "@radix-ui/react-tooltip": "^1.1.2",
47
55
  "@radix-ui/react-use-controllable-state": "^1.0.0",
56
+ "aria-hidden": "^1.2.4",
48
57
  "date-fns": "^3.3.1",
49
58
  "i18next": "^21.10.0",
50
59
  "keyborg": "^2.5.0",
51
60
  "react-i18next": "^11.18.6",
52
- "@dxos/react-hooks": "0.6.13",
53
- "@dxos/log": "0.6.13",
54
- "@dxos/react-ui-types": "0.6.13",
55
- "@dxos/react-list": "0.6.13",
56
- "@dxos/util": "0.6.13",
57
- "@dxos/react-input": "0.6.13"
61
+ "react-remove-scroll": "^2.6.0",
62
+ "@dxos/debug": "0.6.14-main.69511f5",
63
+ "@dxos/log": "0.6.14-main.69511f5",
64
+ "@dxos/react-hooks": "0.6.14-main.69511f5",
65
+ "@dxos/react-input": "0.6.14-main.69511f5",
66
+ "@dxos/react-ui-types": "0.6.14-main.69511f5",
67
+ "@dxos/util": "0.6.14-main.69511f5",
68
+ "@dxos/react-list": "0.6.14-main.69511f5"
58
69
  },
59
70
  "devDependencies": {
60
71
  "@dnd-kit/core": "^6.0.5",
@@ -65,16 +76,16 @@
65
76
  "@types/react-dom": "~18.2.0",
66
77
  "react": "~18.2.0",
67
78
  "react-dom": "~18.2.0",
68
- "vite": "^5.3.4",
69
- "@dxos/react-ui-theme": "0.6.13",
70
- "@dxos/random": "0.6.13",
71
- "@dxos/util": "0.6.13"
79
+ "vite": "5.4.7",
80
+ "@dxos/random": "0.6.14-main.69511f5",
81
+ "@dxos/react-ui-theme": "0.6.14-main.69511f5",
82
+ "@dxos/util": "0.6.14-main.69511f5"
72
83
  },
73
84
  "peerDependencies": {
74
85
  "@phosphor-icons/react": "^2.1.5",
75
- "date-fns": "^3.3.1",
76
- "react": "^18.0.0",
77
- "react-dom": "^18.0.0"
86
+ "react": "~18.2.0",
87
+ "react-dom": "~18.2.0",
88
+ "@dxos/react-ui-theme": "0.6.14-main.69511f5"
78
89
  },
79
90
  "publishConfig": {
80
91
  "access": "public"
@@ -57,8 +57,9 @@ const StorybookAvatar = (props: PropsWithChildren<StorybookAvatarProps>) => {
57
57
  };
58
58
 
59
59
  export default {
60
- title: 'react-ui/Avatar',
61
- component: StorybookAvatar,
60
+ title: 'ui/react-ui-core/Avatar',
61
+ component: Avatar,
62
+ render: StorybookAvatar,
62
63
  decorators: [withTheme],
63
64
  parameters: { chromatic: { disableSnapshot: false } },
64
65
  };
@@ -44,8 +44,9 @@ const StorybookAvatarGroup = () => {
44
44
  };
45
45
 
46
46
  export default {
47
- title: 'react-ui/Avatar Group',
48
- component: StorybookAvatarGroup,
47
+ title: 'ui/react-ui-core/AvatarGroup',
48
+ component: AvatarGroup,
49
+ render: StorybookAvatarGroup,
49
50
  decorators: [withTheme],
50
51
  parameters: { chromatic: { disableSnapshot: false } },
51
52
  };
@@ -39,8 +39,9 @@ const StorybookBreadcrumb = () => {
39
39
  };
40
40
 
41
41
  export default {
42
- title: 'react-ui/Breadcrumb',
43
- component: StorybookBreadcrumb,
42
+ title: 'ui/react-ui-core/Breadcrumb',
43
+ component: Breadcrumb,
44
+ render: StorybookBreadcrumb,
44
45
  decorators: [withTheme],
45
46
  parameters: { chromatic: { disableSnapshot: false } },
46
47
  };
@@ -5,67 +5,17 @@
5
5
  import '@dxos-theme';
6
6
 
7
7
  import { CaretLeft, CaretRight } from '@phosphor-icons/react';
8
- import React, { type PropsWithChildren } from 'react';
9
-
10
- import { modalSurface, groupSurface, mx, surfaceElevation } from '@dxos/react-ui-theme';
8
+ import React from 'react';
11
9
 
12
10
  import { Button, ButtonGroup, type ButtonProps } from './Button';
13
- import { withTheme } from '../../testing';
14
- import { DensityProvider } from '../DensityProvider';
15
- import { ElevationProvider } from '../ElevationProvider';
11
+ import { withVariants, withTheme } from '../../testing';
16
12
 
17
- export default {
18
- title: 'react-ui/Button',
19
- component: Button,
20
- decorators: [withTheme],
21
- parameters: { chromatic: { disableSnapshot: false } },
22
- };
23
-
24
- const Container = ({ children }: PropsWithChildren<{}>) => (
25
- <>
26
- <div role='group' className={mx('flex flex-col gap-4 mbe-4 p-4')}>
27
- <ElevationProvider elevation='base'>
28
- <div className='flex gap-4'>{children}</div>
29
- <DensityProvider density='fine'>
30
- <div className='flex gap-4'>{children}</div>
31
- </DensityProvider>
32
- </ElevationProvider>
33
- </div>
34
- <div
35
- role='group'
36
- className={mx('flex flex-col gap-4 mbe-4 p-4 rounded-lg', groupSurface, surfaceElevation({ elevation: 'group' }))}
37
- >
38
- <ElevationProvider elevation='group'>
39
- <div className='flex gap-4'>{children}</div>
40
- <DensityProvider density='fine'>
41
- <div className='flex gap-4'>{children}</div>
42
- </DensityProvider>
43
- </ElevationProvider>
44
- </div>
45
- <div
46
- role='group'
47
- className={mx(
48
- 'flex flex-col gap-4 mbe-4 p-4 rounded-lg',
49
- modalSurface,
50
- surfaceElevation({ elevation: 'chrome' }),
51
- )}
52
- >
53
- <ElevationProvider elevation='chrome'>
54
- <div className='flex gap-4'>{children}</div>
55
- <DensityProvider density='fine'>
56
- <div className='flex gap-4'>{children}</div>
57
- </DensityProvider>
58
- </ElevationProvider>
59
- </div>
60
- </>
61
- );
62
-
63
- export const Default = {
64
- render: ({ children, ...args }: Omit<ButtonProps, 'ref'>) => (
65
- <Container>
13
+ const DefaultStory = ({ children, ...args }: Omit<ButtonProps, 'ref'>) => {
14
+ return (
15
+ <div>
66
16
  <Button {...args}>{children}</Button>
67
17
  <Button {...args} disabled>
68
- Disabled
18
+ {children}
69
19
  </Button>
70
20
  {(args.variant === 'default' || args.variant === 'primary') && (
71
21
  <ButtonGroup>
@@ -77,15 +27,36 @@ export const Default = {
77
27
  </Button>
78
28
  </ButtonGroup>
79
29
  )}
80
- </Container>
81
- ),
82
- args: { children: 'Hello', disabled: false, variant: 'default' },
30
+ </div>
31
+ );
83
32
  };
84
33
 
85
- export const Primary = { ...Default, args: { variant: 'primary', children: 'Hello' } };
34
+ const defaults = { children: 'Test' };
86
35
 
87
- export const Destructive = { ...Default, args: { variant: 'destructive', children: 'Delete' } };
36
+ export const Default = {
37
+ args: { ...defaults, variant: 'default' },
38
+ };
39
+
40
+ export const Primary = {
41
+ args: { ...defaults, variant: 'primary' },
42
+ };
88
43
 
89
- export const Outline = { ...Default, args: { variant: 'outline', children: 'Hello' } };
44
+ export const Destructive = {
45
+ args: { ...defaults, variant: 'destructive' },
46
+ };
47
+
48
+ export const Outline = {
49
+ args: { ...defaults, variant: 'outline' },
50
+ };
90
51
 
91
- export const Ghost = { ...Default, args: { variant: 'ghost', children: 'Hello' } };
52
+ export const Ghost = {
53
+ args: { ...defaults, variant: 'ghost' },
54
+ };
55
+
56
+ export default {
57
+ title: 'ui/react-ui-core/Button',
58
+ component: Button,
59
+ decorators: [withVariants(), withTheme],
60
+ render: DefaultStory,
61
+ parameters: { chromatic: { disableSnapshot: false } },
62
+ };