@dxos/react-ui 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a

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 (239) hide show
  1. package/dist/lib/browser/{chunk-HFJYTGHU.mjs → chunk-CMHHVHX3.mjs} +4 -1
  2. package/dist/lib/browser/chunk-CMHHVHX3.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-F3PLXTDA.mjs → chunk-GTHV4WYK.mjs} +123 -232
  4. package/dist/lib/browser/chunk-GTHV4WYK.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +1069 -976
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/testing/index.mjs +5 -5
  9. package/dist/lib/browser/testing/index.mjs.map +2 -2
  10. package/dist/lib/browser/translations.mjs +1 -1
  11. package/dist/lib/node-esm/{chunk-LLVUYLAM.mjs → chunk-3VSKWNCQ.mjs} +123 -232
  12. package/dist/lib/node-esm/chunk-3VSKWNCQ.mjs.map +7 -0
  13. package/dist/lib/node-esm/{chunk-OJYUPUCY.mjs → chunk-P4KFQGJI.mjs} +4 -1
  14. package/dist/lib/node-esm/chunk-P4KFQGJI.mjs.map +7 -0
  15. package/dist/lib/node-esm/index.mjs +1069 -976
  16. package/dist/lib/node-esm/index.mjs.map +4 -4
  17. package/dist/lib/node-esm/meta.json +1 -1
  18. package/dist/lib/node-esm/testing/index.mjs +5 -5
  19. package/dist/lib/node-esm/testing/index.mjs.map +2 -2
  20. package/dist/lib/node-esm/translations.mjs +1 -1
  21. package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
  22. package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
  23. package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts +3 -3
  24. package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  25. package/dist/types/src/components/Button/Button.d.ts +2 -2
  26. package/dist/types/src/components/Button/Button.d.ts.map +1 -1
  27. package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
  28. package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Button/MicButton.d.ts +24 -0
  30. package/dist/types/src/components/Button/MicButton.d.ts.map +1 -0
  31. package/dist/types/src/components/Button/MicButton.stories.d.ts +57 -0
  32. package/dist/types/src/components/Button/MicButton.stories.d.ts.map +1 -0
  33. package/dist/types/src/components/Button/SystemIconButton.d.ts +15 -2
  34. package/dist/types/src/components/Button/SystemIconButton.d.ts.map +1 -1
  35. package/dist/types/src/components/Button/SystemIconButton.stories.d.ts +51 -0
  36. package/dist/types/src/components/Button/SystemIconButton.stories.d.ts.map +1 -0
  37. package/dist/types/src/components/Button/ToggleGroup.d.ts +2 -2
  38. package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
  39. package/dist/types/src/components/Button/index.d.ts +1 -0
  40. package/dist/types/src/components/Button/index.d.ts.map +1 -1
  41. package/dist/types/src/components/Calendar/Calendar.d.ts.map +1 -1
  42. package/dist/types/src/components/Calendar/Calendar.theme.d.ts.map +1 -1
  43. package/dist/types/src/components/Card/Card.d.ts +8 -8
  44. package/dist/types/src/components/Card/Card.d.ts.map +1 -1
  45. package/dist/types/src/components/Card/Card.stories.d.ts +2 -2
  46. package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -1
  47. package/dist/types/src/components/Carousel/Carousel.d.ts +29 -6
  48. package/dist/types/src/components/Carousel/Carousel.d.ts.map +1 -1
  49. package/dist/types/src/components/Carousel/Carousel.stories.d.ts +48 -2
  50. package/dist/types/src/components/Carousel/Carousel.stories.d.ts.map +1 -1
  51. package/dist/types/src/components/Column/Column.d.ts +2 -2
  52. package/dist/types/src/components/Column/Column.d.ts.map +1 -1
  53. package/dist/types/src/components/Dialog/AlertDialog.d.ts +2 -2
  54. package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
  55. package/dist/types/src/components/Dialog/Dialog.d.ts +1 -1
  56. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  57. package/dist/types/src/components/Dialog/Dialog.stories.d.ts +2 -2
  58. package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/Icon/Icon.stories.d.ts +5 -0
  60. package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
  61. package/dist/types/src/components/Input/Input.d.ts +4 -1
  62. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  63. package/dist/types/src/components/Input/Input.stories.d.ts +3 -3
  64. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  65. package/dist/types/src/components/Input/Input.theme.d.ts +10 -10
  66. package/dist/types/src/components/Input/Input.theme.d.ts.map +1 -1
  67. package/dist/types/src/components/Input/SegmentedInput.d.ts +8 -8
  68. package/dist/types/src/components/Input/SegmentedInput.d.ts.map +1 -1
  69. package/dist/types/src/components/Input/index.d.ts +0 -1
  70. package/dist/types/src/components/Input/index.d.ts.map +1 -1
  71. package/dist/types/src/components/Main/Main.d.ts +3 -3
  72. package/dist/types/src/components/Main/Main.d.ts.map +1 -1
  73. package/dist/types/src/components/Menu/ContextMenu.d.ts +1 -1
  74. package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -1
  75. package/dist/types/src/components/Menu/DropdownMenu.d.ts +2 -2
  76. package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -1
  77. package/dist/types/src/components/Message/Message.d.ts +1 -1
  78. package/dist/types/src/components/Message/Message.d.ts.map +1 -1
  79. package/dist/types/src/components/Message/Message.stories.d.ts +2 -2
  80. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  81. package/dist/types/src/components/Panel/Panel.d.ts +1 -1
  82. package/dist/types/src/components/Panel/Panel.d.ts.map +1 -1
  83. package/dist/types/src/components/Panel/Panel.theme.d.ts.map +1 -1
  84. package/dist/types/src/components/Popover/Popover.d.ts +2 -2
  85. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  86. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +2 -0
  87. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  88. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +1 -0
  89. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  90. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +1 -1
  91. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
  92. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +2 -2
  93. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
  94. package/dist/types/src/components/Select/Select.d.ts +1 -1
  95. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  96. package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
  97. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  98. package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
  99. package/dist/types/src/components/Splitter/Splitter.d.ts +30 -16
  100. package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -1
  101. package/dist/types/src/components/Splitter/Splitter.stories.d.ts +6 -1
  102. package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -1
  103. package/dist/types/src/components/Splitter/Splitter.theme.d.ts +3 -1
  104. package/dist/types/src/components/Splitter/Splitter.theme.d.ts.map +1 -1
  105. package/dist/types/src/components/Tag/Tag.d.ts +1 -1
  106. package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
  107. package/dist/types/src/components/Tag/Tag.theme.d.ts +1 -1
  108. package/dist/types/src/components/Tag/Tag.theme.d.ts.map +1 -1
  109. package/dist/types/src/components/Toast/Toast.d.ts +1 -1
  110. package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
  111. package/dist/types/src/components/Toast/Toast.theme.d.ts.map +1 -1
  112. package/dist/types/src/components/Toolbar/Toolbar.d.ts +1 -1
  113. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  114. package/dist/types/src/components/Tooltip/Tooltip.d.ts +3 -3
  115. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  116. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +2 -2
  117. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  118. package/dist/types/src/components/index.d.ts +0 -1
  119. package/dist/types/src/components/index.d.ts.map +1 -1
  120. package/dist/types/src/index.d.ts +1 -1
  121. package/dist/types/src/index.d.ts.map +1 -1
  122. package/dist/types/src/primitives/ThemeProvider/TranslationsProvider.d.ts +1 -8
  123. package/dist/types/src/primitives/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
  124. package/dist/types/src/theme/defaultTheme.d.ts.map +1 -1
  125. package/dist/types/src/theme/index.d.ts +0 -2
  126. package/dist/types/src/theme/index.d.ts.map +1 -1
  127. package/dist/types/src/translations.d.ts +3 -0
  128. package/dist/types/src/translations.d.ts.map +1 -1
  129. package/dist/types/src/util/slots.d.ts +1 -1
  130. package/dist/types/src/util/slots.d.ts.map +1 -1
  131. package/dist/types/tsconfig.tsbuildinfo +1 -1
  132. package/package.json +22 -21
  133. package/src/components/Avatars/Avatar.stories.tsx +2 -2
  134. package/src/components/Avatars/Avatar.theme.ts +1 -1
  135. package/src/components/Avatars/Avatar.tsx +3 -3
  136. package/src/components/Breadcrumb/Breadcrumb.tsx +6 -6
  137. package/src/components/Button/Button.tsx +2 -2
  138. package/src/components/Button/MicButton.stories.tsx +60 -0
  139. package/src/components/Button/MicButton.tsx +117 -0
  140. package/src/components/Button/SystemIconButton.stories.tsx +91 -0
  141. package/src/components/Button/SystemIconButton.tsx +113 -2
  142. package/src/components/Button/ToggleGroup.tsx +2 -2
  143. package/src/components/Button/index.ts +1 -0
  144. package/src/components/Calendar/Calendar.theme.ts +2 -0
  145. package/src/components/Calendar/Calendar.tsx +3 -3
  146. package/src/components/Card/Card.stories.tsx +2 -2
  147. package/src/components/Card/Card.tsx +11 -11
  148. package/src/components/Carousel/Carousel.stories.tsx +42 -18
  149. package/src/components/Carousel/Carousel.tsx +169 -33
  150. package/src/components/Column/Column.tsx +4 -7
  151. package/src/components/Dialog/AlertDialog.stories.tsx +2 -2
  152. package/src/components/Dialog/AlertDialog.tsx +13 -13
  153. package/src/components/Dialog/Dialog.stories.tsx +3 -4
  154. package/src/components/Dialog/Dialog.theme.ts +1 -1
  155. package/src/components/Dialog/Dialog.tsx +12 -12
  156. package/src/components/Icon/Icon.stories.tsx +23 -0
  157. package/src/components/Icon/Icon.theme.ts +1 -1
  158. package/src/components/Input/Input.stories.tsx +13 -5
  159. package/src/components/Input/Input.theme.ts +17 -39
  160. package/src/components/Input/Input.tsx +30 -13
  161. package/src/components/Input/SegmentedInput.tsx +50 -41
  162. package/src/components/Input/index.ts +0 -1
  163. package/src/components/Main/Main.tsx +3 -3
  164. package/src/components/MediaPlayer/MediaPlayer.tsx +4 -4
  165. package/src/components/Menu/ContextMenu.tsx +8 -8
  166. package/src/components/Menu/DropdownMenu.tsx +12 -13
  167. package/src/components/Message/Message.stories.tsx +2 -2
  168. package/src/components/Message/Message.theme.ts +1 -1
  169. package/src/components/Message/Message.tsx +2 -2
  170. package/src/components/Panel/Panel.theme.ts +2 -1
  171. package/src/components/Panel/Panel.tsx +1 -1
  172. package/src/components/Popover/Popover.tsx +9 -9
  173. package/src/components/ScrollArea/ScrollArea.tsx +7 -4
  174. package/src/components/ScrollContainer/ScrollContainer.stories.tsx +2 -2
  175. package/src/components/ScrollContainer/ScrollContainer.tsx +2 -2
  176. package/src/components/Select/Select.stories.tsx +2 -2
  177. package/src/components/Select/Select.theme.ts +1 -1
  178. package/src/components/Select/Select.tsx +14 -14
  179. package/src/components/Separator/Separator.tsx +1 -0
  180. package/src/components/Splitter/Splitter.stories.tsx +84 -20
  181. package/src/components/Splitter/Splitter.theme.ts +20 -3
  182. package/src/components/Splitter/Splitter.tsx +320 -47
  183. package/src/components/Tag/Tag.stories.tsx +1 -1
  184. package/src/components/Tag/Tag.theme.ts +1 -1
  185. package/src/components/Tag/Tag.tsx +3 -5
  186. package/src/components/Toast/Toast.theme.ts +3 -2
  187. package/src/components/Toast/Toast.tsx +5 -5
  188. package/src/components/Toolbar/Toolbar.tsx +10 -10
  189. package/src/components/Tooltip/Tooltip.stories.tsx +2 -2
  190. package/src/components/Tooltip/Tooltip.tsx +3 -3
  191. package/src/components/index.ts +0 -1
  192. package/src/exemplars/tabster.stories.tsx +1 -1
  193. package/src/index.ts +1 -1
  194. package/src/primitives/ThemeProvider/TranslationsProvider.tsx +10 -30
  195. package/src/testing/decorators/withLayout.tsx +4 -4
  196. package/src/theme/defaultTheme.ts +0 -4
  197. package/src/theme/index.ts +0 -2
  198. package/src/translations.ts +8 -0
  199. package/src/util/slots.ts +5 -5
  200. package/dist/lib/browser/chunk-F3PLXTDA.mjs.map +0 -7
  201. package/dist/lib/browser/chunk-HFJYTGHU.mjs.map +0 -7
  202. package/dist/lib/node-esm/chunk-LLVUYLAM.mjs.map +0 -7
  203. package/dist/lib/node-esm/chunk-OJYUPUCY.mjs.map +0 -7
  204. package/dist/types/src/components/Input/constants.d.ts +0 -5
  205. package/dist/types/src/components/Input/constants.d.ts.map +0 -1
  206. package/dist/types/src/components/List/List.d.ts +0 -29
  207. package/dist/types/src/components/List/List.d.ts.map +0 -1
  208. package/dist/types/src/components/List/List.stories.d.ts +0 -16
  209. package/dist/types/src/components/List/List.stories.d.ts.map +0 -1
  210. package/dist/types/src/components/List/List.theme.d.ts +0 -7
  211. package/dist/types/src/components/List/List.theme.d.ts.map +0 -1
  212. package/dist/types/src/components/List/ListDropIndicator.d.ts +0 -13
  213. package/dist/types/src/components/List/ListDropIndicator.d.ts.map +0 -1
  214. package/dist/types/src/components/List/Tree.d.ts +0 -23
  215. package/dist/types/src/components/List/Tree.d.ts.map +0 -1
  216. package/dist/types/src/components/List/Tree.stories.d.ts +0 -15
  217. package/dist/types/src/components/List/Tree.stories.d.ts.map +0 -1
  218. package/dist/types/src/components/List/TreeDropIndicator.d.ts +0 -8
  219. package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +0 -1
  220. package/dist/types/src/components/List/Treegrid.d.ts +0 -33
  221. package/dist/types/src/components/List/Treegrid.d.ts.map +0 -1
  222. package/dist/types/src/components/List/Treegrid.stories.d.ts +0 -12
  223. package/dist/types/src/components/List/Treegrid.stories.d.ts.map +0 -1
  224. package/dist/types/src/components/List/Treegrid.theme.d.ts +0 -7
  225. package/dist/types/src/components/List/Treegrid.theme.d.ts.map +0 -1
  226. package/dist/types/src/components/List/index.d.ts +0 -4
  227. package/dist/types/src/components/List/index.d.ts.map +0 -1
  228. package/src/components/Input/constants.ts +0 -8
  229. package/src/components/List/List.stories.tsx +0 -234
  230. package/src/components/List/List.theme.ts +0 -47
  231. package/src/components/List/List.tsx +0 -171
  232. package/src/components/List/ListDropIndicator.tsx +0 -69
  233. package/src/components/List/Tree.stories.tsx +0 -87
  234. package/src/components/List/Tree.tsx +0 -74
  235. package/src/components/List/TreeDropIndicator.tsx +0 -70
  236. package/src/components/List/Treegrid.stories.tsx +0 -156
  237. package/src/components/List/Treegrid.theme.ts +0 -35
  238. package/src/components/List/Treegrid.tsx +0 -187
  239. package/src/components/List/index.ts +0 -7
@@ -33,7 +33,7 @@ type VariantMap = {
33
33
 
34
34
  type Variant = { [K in keyof VariantMap]: { type: K } & VariantMap[K] }[keyof VariantMap];
35
35
 
36
- type DefaultStoryProps = Partial<{
36
+ type StoryArgs = Partial<{
37
37
  kind: keyof VariantMap;
38
38
  label: string;
39
39
  labelVisuallyHidden: boolean;
@@ -52,7 +52,7 @@ const DefaultStory = ({
52
52
  validationValence,
53
53
  validationMessage,
54
54
  ...props
55
- }: DefaultStoryProps) => {
55
+ }: StoryArgs) => {
56
56
  return (
57
57
  <Input.Root {...{ validationValence }}>
58
58
  <Input.Label srOnly={labelVisuallyHidden}>{label}</Input.Label>
@@ -63,8 +63,16 @@ const DefaultStory = ({
63
63
  {kind === 'time' && <Input.Time {...props} />}
64
64
  {kind === 'date' && <Input.Date {...props} />}
65
65
  {kind === 'datetime' && <Input.DateTime {...props} />}
66
- {kind === 'checkbox' && <Input.Checkbox {...props} />}
67
- {kind === 'switch' && <Input.Switch {...props} />}
66
+ {kind === 'checkbox' && (
67
+ <Input.Block>
68
+ <Input.Checkbox {...props} />
69
+ </Input.Block>
70
+ )}
71
+ {kind === 'switch' && (
72
+ <Input.Block>
73
+ <Input.Switch {...props} />
74
+ </Input.Block>
75
+ )}
68
76
 
69
77
  <Input.DescriptionAndValidation srOnly={descriptionVisuallyHidden}>
70
78
  {validationMessage && <Input.Validation classNames='block'>{validationMessage}</Input.Validation>}
@@ -83,7 +91,7 @@ const meta = {
83
91
 
84
92
  export default meta;
85
93
 
86
- type Story = StoryObj<DefaultStoryProps & Variant>;
94
+ type Story = StoryObj<StoryArgs & Variant>;
87
95
 
88
96
  export const Density: Story = {
89
97
  render: () => (
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { densityDimensions, staticDisabled } from '@dxos/ui-theme';
6
- import { getSize, getHeight, getWidth, mx, snapSize, sizeValue, textValence } from '@dxos/ui-theme';
6
+ import { getSize, mx, sizeValue, snapSize, textValence } from '@dxos/ui-theme';
7
7
  import {
8
8
  type ComponentFragment,
9
9
  type ComponentFunction,
@@ -13,8 +13,6 @@ import {
13
13
  type Size,
14
14
  } from '@dxos/ui-types';
15
15
 
16
- import { inputTextLabel } from './constants';
17
-
18
16
  export type InputStyleProps = Partial<{
19
17
  variant: 'default' | 'subdued' | 'static';
20
18
  density: Density;
@@ -32,16 +30,10 @@ export type InputMetaStyleProps = Partial<{
32
30
  }>;
33
31
 
34
32
  const textInputSurfaceFocus =
35
- 'transition-colors bg-input-surface focus:bg-focus-surface border border-separator focus:border-separator';
33
+ 'transition-colors bg-input-surface focus:bg-focus-surface border border-input-separator focus:border-separator';
36
34
 
37
35
  const textInputSurfaceHover = 'hover:bg-focus-surface';
38
36
 
39
- const booleanInputSurface =
40
- 'shadow-inner transition-colors bg-un-accent aria-checked:bg-accent-bg aria-[checked=mixed]:bg-accent-bg';
41
-
42
- const booleanInputSurfaceHover =
43
- 'hover:bg-un-accent-hover hover:aria-checked:bg-accent-bg-hover hover:aria-[checked=mixed]:bg-accent-bg-hover';
44
-
45
37
  // TODO(burdon): Replace with semantic tokens.
46
38
  const valence = (valence?: MessageValence) => {
47
39
  switch (valence) {
@@ -97,32 +89,15 @@ const input: ComponentFunction<InputStyleProps> = (props, ...etc) =>
97
89
 
98
90
  const textArea: ComponentFunction<InputStyleProps> = (props, ...etc) => input(props, ...etc);
99
91
 
100
- const checkbox: ComponentFunction<InputStyleProps> = ({ size = 5 }, ...etc) =>
92
+ const checkbox: ComponentFunction<InputStyleProps> = ({ size = 4 }, ...etc) =>
101
93
  mx('dx-checkbox dx-focus-ring', getSize(size), ...etc);
102
94
 
103
- const checkboxIndicator: ComponentFunction<InputStyleProps> = ({ size = 5, checked }, ...etc) =>
95
+ const checkboxIndicator: ComponentFunction<InputStyleProps> = ({ size = 4, checked }, ...etc) =>
104
96
  mx(getSize(snapSize(sizeValue(size) * 0.65, 4)), !checked && 'invisible', ...etc);
105
97
 
106
- const switchRoot: ComponentFunction<InputStyleProps> = ({ size = 5, disabled }, ...etc) =>
107
- mx(
108
- getHeight(size),
109
- getWidth(snapSize(sizeValue(size) * 1.75, 9)),
110
- booleanInputSurface,
111
- !disabled && booleanInputSurfaceHover,
112
- // TODO(burdon): Added m-1 margin to make 40px width to align with 40px icon button.
113
- 'cursor-pointer shrink-0 rounded-full px-1 mx-1 relative',
114
- 'dx-focus-ring',
115
- ...etc,
116
- );
117
-
118
- const switchThumb: ComponentFunction<InputStyleProps> = ({ size = 5 }, ...etc) =>
119
- mx(
120
- getSize(size === 'px' ? 'px' : ((size - 2) as Size)),
121
- 'block bg-white rounded-full transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[100%]',
122
- ...etc,
123
- );
98
+ const switch_: ComponentFunction<InputStyleProps> = (_props, ...etc) => mx('dx-checkbox--switch dx-focus-ring', ...etc);
124
99
 
125
- const withSegmentsInput: ComponentFunction<InputStyleProps> = (props, ...etc) =>
100
+ const pin: ComponentFunction<InputStyleProps> = (props, ...etc) =>
126
101
  mx(
127
102
  'font-mono selection:bg-transparent mx-auto',
128
103
  props.density === 'lg'
@@ -138,7 +113,7 @@ const withSegmentsInput: ComponentFunction<InputStyleProps> = (props, ...etc) =>
138
113
 
139
114
  const segment: ComponentFunction<InputStyleProps> = (props, ...etc) =>
140
115
  mx(
141
- 'flex items-center justify-center font-mono',
116
+ 'flex items-center justify-center tabular-nums',
142
117
  props.density === 'lg'
143
118
  ? 'size-12 rounded-xs'
144
119
  : props.density === 'sm'
@@ -155,7 +130,7 @@ const segment: ComponentFunction<InputStyleProps> = (props, ...etc) =>
155
130
  );
156
131
 
157
132
  const label: ComponentFunction<InputMetaStyleProps> = (props, ...etc) =>
158
- mx('block', inputTextLabel, props.srOnly && 'sr-only', ...etc);
133
+ mx('block text-sm text-description', props.srOnly && 'sr-only', ...etc);
159
134
 
160
135
  const description: ComponentFunction<InputMetaStyleProps> = (props, ...etc) =>
161
136
  mx('text-description', props.srOnly && 'sr-only', ...etc);
@@ -164,7 +139,7 @@ const descriptionAndValidation: ComponentFunction<InputMetaStyleProps> = (props,
164
139
  mx('leading-none my-1.5', props.srOnly && 'sr-only', ...etc);
165
140
 
166
141
  const validation: ComponentFunction<InputMetaStyleProps> = (props, ...etc) =>
167
- mx(inputTextLabel, props.srOnly ? 'sr-only' : textValence(props.validationValence), ...etc);
142
+ mx('text-sm text-description', props.srOnly ? 'sr-only' : textValence(props.validationValence), ...etc);
168
143
 
169
144
  const triggerIcon: ComponentFunction<{}> = (_p, ...etc) =>
170
145
  mx(
@@ -174,17 +149,20 @@ const triggerIcon: ComponentFunction<{}> = (_p, ...etc) =>
174
149
  ...etc,
175
150
  );
176
151
 
152
+ const block: ComponentFunction<InputStyleProps> = (props, ...etc) =>
153
+ mx('grid place-items-center w-[var(--dx-rail-item)] h-[var(--dx-rail-item)]', ...etc);
154
+
177
155
  export const inputTheme = {
178
156
  input,
179
157
  textArea,
180
- inputWithSegments: withSegmentsInput,
158
+ pin,
181
159
  segment,
182
- checkbox,
183
- checkboxIndicator,
184
160
  label,
185
161
  description,
186
- switch: switchRoot,
187
- switchThumb,
162
+ checkbox,
163
+ checkboxIndicator,
164
+ switch: switch_,
165
+ block,
188
166
  validation,
189
167
  descriptionAndValidation,
190
168
  triggerIcon,
@@ -8,6 +8,7 @@ import { useControllableState } from '@radix-ui/react-use-controllable-state';
8
8
  import React, {
9
9
  type ComponentPropsWithRef,
10
10
  type ForwardRefExoticComponent,
11
+ PropsWithChildren,
11
12
  forwardRef,
12
13
  useCallback,
13
14
  useEffect,
@@ -37,7 +38,6 @@ import {
37
38
  type ValidationProps as ValidationPrimitiveProps,
38
39
  useInputContext,
39
40
  } from '@dxos/react-input';
40
- import { mx } from '@dxos/ui-theme';
41
41
  import { type Density, type Elevation, type Size } from '@dxos/ui-types';
42
42
 
43
43
  import { translationKey } from '#translations';
@@ -262,7 +262,7 @@ const PinInput = forwardRef<HTMLInputElement, PinInputProps>(
262
262
  ...props,
263
263
  ...(props.autoFocus && !hasIosKeyboard && { autoFocus: true }),
264
264
  }}
265
- className={tx('input.inputWithSegments', { disabled: props.disabled }, classNames) || ''}
265
+ className={tx('input.pin', { disabled: props.disabled }, classNames) || ''}
266
266
  segmentClassName={tx('input.segment', { disabled: props.disabled, density, elevation }) || ''}
267
267
  ref={forwardedRef}
268
268
  />
@@ -400,7 +400,7 @@ const Checkbox: ForwardRefExoticComponent<CheckboxProps> = forwardRef<
400
400
  'aria-invalid': 'true' as const,
401
401
  'aria-errormessage': errorMessageId,
402
402
  }),
403
- className: tx('input.checkbox', { size }, 'shrink-0', classNames),
403
+ 'className': tx('input.checkbox', { size }, 'shrink-0', classNames),
404
404
  }}
405
405
  ref={forwardedRef}
406
406
  >
@@ -435,6 +435,7 @@ const Switch = forwardRef<HTMLInputElement, InputScopedProps<SwitchProps>>(
435
435
  },
436
436
  forwardedRef,
437
437
  ) => {
438
+ const { tx } = useThemeContext();
438
439
  const [checked, onCheckedChange] = useControllableState({
439
440
  prop: propsChecked,
440
441
  defaultProp: propsDefaultChecked ?? false,
@@ -446,7 +447,7 @@ const Switch = forwardRef<HTMLInputElement, InputScopedProps<SwitchProps>>(
446
447
  return (
447
448
  <input
448
449
  type='checkbox'
449
- className={mx('dx-checkbox--switch dx-focus-ring', classNames)}
450
+ className={tx('input.switch', { disabled: props.disabled }, classNames)}
450
451
  checked={checked}
451
452
  onChange={(event) => {
452
453
  onCheckedChange(event.target.checked);
@@ -466,6 +467,21 @@ const Switch = forwardRef<HTMLInputElement, InputScopedProps<SwitchProps>>(
466
467
 
467
468
  Switch.displayName = 'Input.Switch';
468
469
 
470
+ //
471
+ // Wrapper for Switch/Checkbox to center them within the input row height.
472
+ //
473
+
474
+ const Block = forwardRef<HTMLDivElement, PropsWithChildren>(({ children, ...props }, forwardedRef) => {
475
+ const { tx } = useThemeContext();
476
+ return (
477
+ <div {...props} className={tx('input.block')} ref={forwardedRef}>
478
+ {children}
479
+ </div>
480
+ );
481
+ });
482
+
483
+ Block.displayName = 'Input.Block';
484
+
469
485
  //
470
486
  // Date / Time / DateTime — segmented react-aria-components fields with locale-aware ordering,
471
487
  // spinbutton semantics, and immutable separators. ISO string API:
@@ -499,6 +515,7 @@ export const Input = {
499
515
  DateTime,
500
516
  Checkbox,
501
517
  Switch,
518
+ Block,
502
519
  Label,
503
520
  Description,
504
521
  Validation,
@@ -508,19 +525,19 @@ export const Input = {
508
525
  export { useInputTrigger };
509
526
 
510
527
  export type {
511
- InputVariant,
528
+ CheckboxProps,
529
+ DateInputProps,
530
+ DateTimeInputProps,
531
+ DescriptionAndValidationProps,
532
+ DescriptionProps,
512
533
  InputRootProps,
513
534
  InputSharedProps,
535
+ InputVariant,
536
+ LabelProps,
514
537
  PinInputProps,
515
- TextInputProps,
538
+ SwitchProps,
516
539
  TextAreaProps,
540
+ TextInputProps,
517
541
  TimeProps,
518
- DateInputProps,
519
- DateTimeInputProps,
520
- CheckboxProps,
521
- SwitchProps,
522
- LabelProps,
523
- DescriptionProps,
524
542
  ValidationProps,
525
- DescriptionAndValidationProps,
526
543
  };
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { CalendarDate, CalendarDateTime, Time, parseDate, parseDateTime, parseTime } from '@internationalized/date';
6
6
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
7
- import React, { forwardRef, useCallback, useState } from 'react';
7
+ import React, { type ComponentProps, ReactNode, forwardRef, useCallback, useState } from 'react';
8
8
  import {
9
9
  DateField,
10
10
  type DateFieldProps,
@@ -53,7 +53,9 @@ const toCalendarDate = (date: Date) => new CalendarDate(date.getFullYear(), date
53
53
  // Theming.
54
54
  //
55
55
 
56
- const fieldClass = 'inline-flex items-center gap-px font-mono tabular-nums focus-within:bg-attention-surface';
56
+ // TODO(burdon): Move to theme.
57
+ const fieldClassNames =
58
+ 'inline-flex flex-nowrap items-center gap-px whitespace-nowrap tabular-nums focus-within:bg-attention-surface';
57
59
 
58
60
  // React Aria sets `caret-color: transparent` inline on each segment because spinbuttons replace
59
61
  // the whole value rather than inserting at a caret position. We override with `!important` so a
@@ -63,16 +65,18 @@ const fieldClass = 'inline-flex items-center gap-px font-mono tabular-nums focus
63
65
  // width regardless of value (so e.g. month `1` and `12` occupy the same space). `text-align: end`
64
66
  // right-aligns the digits within that fixed width.
65
67
  // TODO(burdon): Move to Input.theme.ts
66
- const segmentClass =
67
- 'rounded-xs outline-none text-end [caret-color:currentColor]! ' +
68
+ const segmentClassNames =
69
+ 'shrink-0 rounded-xs outline-none text-end [caret-color:currentColor]! ' +
68
70
  'data-[type=year]:min-w-[4ch] ' +
69
- 'data-[type=month]:min-w-[2ch] data-[type=day]:min-w-[2ch] ' +
70
- 'data-[type=hour]:min-w-[2ch] data-[type=minute]:min-w-[2ch] ' +
71
+ 'data-[type=month]:min-w-[1ch] data-[type=day]:min-w-[1ch] ' +
72
+ 'data-[type=hour]:min-w-[1ch] data-[type=minute]:min-w-[1ch] ' +
71
73
  'data-[placeholder]:text-subdued data-[type=literal]:text-subdued ' +
72
74
  'data-[focused]:bg-accent-bg data-[focused]:text-accent-fg ' +
73
75
  'data-[invalid]:text-rose-500 ' +
74
76
  'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50';
75
77
 
78
+ const timeSegmentClassNames = `${segmentClassNames} data-[type=dayPeriod]:text-xs data-[type=dayPeriod]:text-description`;
79
+
76
80
  // Match bidi format characters (LRI/RLI/PDI/LRE/RLE/PDF/LRO/RLO) that React Aria inserts to
77
81
  // isolate locale-formatted portions. These are invisible glyphs but the browser still gives
78
82
  // them ~4px of width, which pushes the first visible character of time-only fields out of
@@ -80,18 +84,22 @@ const segmentClass =
80
84
  // collapse them to zero width.
81
85
  const BIDI_FORMAT_RE = /^[‪-‮⁦-⁩]+$/;
82
86
 
87
+ // The segment object react-aria passes to the `DateInput` render function and expects back on
88
+ // `DateSegment` — derived from the component so no extra dependency on `react-stately` is needed.
89
+ type DateSegmentData = ComponentProps<typeof DateSegment>['segment'];
90
+
83
91
  /**
84
92
  * Render a single DateSegment. Locale-specific literals between date and time portions
85
93
  * (e.g. en-US's `", "`) become a plain space; bidi format markers are kept but rendered
86
94
  * zero-width so the visible content lines up at the field's left edge.
87
95
  */
88
- const renderSegment = (segment: { type: string; text: string }) => {
96
+ const renderSegment = (segment: DateSegmentData, classNames = segmentClassNames) => {
89
97
  if (segment.type === 'literal') {
90
98
  if (BIDI_FORMAT_RE.test(segment.text)) {
91
99
  // Render as a fixed-width spacer (between date and time portions of a datetime field),
92
100
  // but hide when at the field's edges — opening LRI is the first child of a time-only
93
101
  // field and would push everything right; closing PDI is the last child everywhere.
94
- return <span aria-hidden className='select-none w-[2ch] first:hidden last:hidden' />;
102
+ return <span aria-hidden className='select-none w-[1ch] first:hidden last:hidden' />;
95
103
  }
96
104
  if (segment.text.includes(',')) {
97
105
  return (
@@ -101,7 +109,8 @@ const renderSegment = (segment: { type: string; text: string }) => {
101
109
  );
102
110
  }
103
111
  }
104
- return <DateSegment segment={segment as any} className={segmentClass} />;
112
+
113
+ return <DateSegment segment={segment} className={classNames} />;
105
114
  };
106
115
 
107
116
  //
@@ -110,12 +119,12 @@ const renderSegment = (segment: { type: string; text: string }) => {
110
119
 
111
120
  type SegmentedInputBaseProps = InputSharedProps &
112
121
  ThemedClassName<{
113
- id?: string;
114
- value?: string;
115
- defaultValue?: string;
116
- onValueChange?: (value: string) => void;
117
- disabled?: boolean;
118
- autoFocus?: boolean;
122
+ 'id'?: string;
123
+ 'value'?: string;
124
+ 'defaultValue'?: string;
125
+ 'onValueChange'?: (value: string) => void;
126
+ 'disabled'?: boolean;
127
+ 'autoFocus'?: boolean;
119
128
  'aria-label'?: string;
120
129
  }>;
121
130
 
@@ -150,19 +159,19 @@ const useFieldChrome = ({
150
159
  * `Input.Root`) calls the registered handler on press; the popover anchors to this field.
151
160
  */
152
161
  const PickerWrapper = ({
162
+ children,
153
163
  pickerValue,
154
- onPickerChange,
155
164
  withTime,
156
165
  disabled = false,
157
- children,
158
166
  calendar,
167
+ onPickerChange,
159
168
  }: {
169
+ children: ReactNode;
160
170
  pickerValue: Date | undefined;
161
- onPickerChange: (next: Date | undefined) => void;
162
171
  withTime: boolean;
163
172
  disabled?: boolean;
164
- children: React.ReactNode;
165
- calendar: React.ReactNode;
173
+ calendar: ReactNode;
174
+ onPickerChange: (next: Date | undefined) => void;
166
175
  }) => {
167
176
  const [open, setOpen] = useState(false);
168
177
  const openPicker = useCallback(() => {
@@ -225,13 +234,13 @@ const SegmentedDate = forwardRef<HTMLDivElement, InputScopedProps<SegmentedDateP
225
234
  const parsed = tryParse(parseDate, stringValue);
226
235
 
227
236
  const fieldProps: DateFieldProps<CalendarDate> = {
228
- value: parsed,
229
- onChange: (next) => setStringValue(next ? formatCalendarDate(next) : ''),
230
- isDisabled: disabled,
237
+ 'value': parsed,
238
+ 'onChange': (next) => setStringValue(next ? formatCalendarDate(next) : ''),
239
+ 'isDisabled': disabled,
231
240
  autoFocus,
232
241
  'aria-label': ariaLabel ?? 'date',
233
- granularity: 'day',
234
- shouldForceLeadingZeros: true,
242
+ 'granularity': 'day',
243
+ 'shouldForceLeadingZeros': true,
235
244
  };
236
245
 
237
246
  const field = (
@@ -247,7 +256,7 @@ const SegmentedDate = forwardRef<HTMLDivElement, InputScopedProps<SegmentedDateP
247
256
  className={tx(
248
257
  'input.input',
249
258
  { variant, disabled, density, elevation, validationValence },
250
- fieldClass,
259
+ fieldClassNames,
251
260
  classNames,
252
261
  )}
253
262
  >
@@ -311,14 +320,14 @@ const SegmentedTime = forwardRef<HTMLDivElement, InputScopedProps<SegmentedTimeP
311
320
  const parsed = tryParse(parseTime, stringValue);
312
321
 
313
322
  const fieldProps: TimeFieldProps<Time> = {
314
- value: parsed,
315
- onChange: (next) => setStringValue(next ? formatTime(next) : ''),
316
- isDisabled: disabled,
323
+ 'value': parsed,
324
+ 'onChange': (next) => setStringValue(next ? formatTime(next) : ''),
325
+ 'isDisabled': disabled,
317
326
  autoFocus,
318
327
  'aria-label': ariaLabel ?? 'time',
319
- granularity: 'minute',
328
+ 'granularity': 'minute',
320
329
  hourCycle,
321
- shouldForceLeadingZeros: true,
330
+ 'shouldForceLeadingZeros': true,
322
331
  };
323
332
 
324
333
  return (
@@ -334,11 +343,11 @@ const SegmentedTime = forwardRef<HTMLDivElement, InputScopedProps<SegmentedTimeP
334
343
  className={tx(
335
344
  'input.input',
336
345
  { variant, disabled, density, elevation, validationValence },
337
- fieldClass,
346
+ fieldClassNames,
338
347
  classNames,
339
348
  )}
340
349
  >
341
- {renderSegment}
350
+ {(segment) => renderSegment(segment, timeSegmentClassNames)}
342
351
  </DateInput>
343
352
  </TimeField>
344
353
  );
@@ -386,14 +395,14 @@ const SegmentedDateTime = forwardRef<HTMLDivElement, InputScopedProps<SegmentedD
386
395
  const parsed = tryParse(parseDateTime, stringValue);
387
396
 
388
397
  const fieldProps: DateFieldProps<CalendarDateTime> = {
389
- value: parsed,
390
- onChange: (next) => setStringValue(next ? formatCalendarDateTime(next) : ''),
391
- isDisabled: disabled,
398
+ 'value': parsed,
399
+ 'onChange': (next) => setStringValue(next ? formatCalendarDateTime(next) : ''),
400
+ 'isDisabled': disabled,
392
401
  autoFocus,
393
402
  'aria-label': ariaLabel ?? 'date-time',
394
- granularity: 'minute',
403
+ 'granularity': 'minute',
395
404
  hourCycle,
396
- shouldForceLeadingZeros: true,
405
+ 'shouldForceLeadingZeros': true,
397
406
  };
398
407
 
399
408
  const field = (
@@ -409,7 +418,7 @@ const SegmentedDateTime = forwardRef<HTMLDivElement, InputScopedProps<SegmentedD
409
418
  className={tx(
410
419
  'input.input',
411
420
  { variant, disabled, density, elevation, validationValence },
412
- fieldClass,
421
+ fieldClassNames,
413
422
  classNames,
414
423
  )}
415
424
  >
@@ -449,6 +458,6 @@ const SegmentedDateTime = forwardRef<HTMLDivElement, InputScopedProps<SegmentedD
449
458
  );
450
459
  SegmentedDateTime.displayName = 'Input.SegmentedDateTime';
451
460
 
452
- export { SegmentedDate, SegmentedTime, SegmentedDateTime };
461
+ export { SegmentedDate, SegmentedDateTime, SegmentedTime };
453
462
 
454
- export type { SegmentedDateProps, SegmentedTimeProps, SegmentedDateTimeProps };
463
+ export type { SegmentedDateProps, SegmentedDateTimeProps, SegmentedTimeProps };
@@ -4,4 +4,3 @@
4
4
 
5
5
  export * from './Input';
6
6
  export * from './SegmentedInput';
7
- export * from './constants';
@@ -9,8 +9,8 @@ import { Primitive } from '@radix-ui/react-primitive';
9
9
  import { Slot } from '@radix-ui/react-slot';
10
10
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
11
11
  import React, {
12
- type ComponentPropsWithRef,
13
12
  type ComponentPropsWithoutRef,
13
+ type ComponentPropsWithRef,
14
14
  type Dispatch,
15
15
  type KeyboardEvent,
16
16
  type PropsWithChildren,
@@ -428,6 +428,6 @@ export const Main = {
428
428
  ComplementarySidebar: MainComplementarySidebar,
429
429
  };
430
430
 
431
- export { useMainContext, useSidebars, useLandmarkMover };
431
+ export { useLandmarkMover, useMainContext, useSidebars };
432
432
 
433
- export type { MainRootProps, MainOverlayProps, MainContentProps, MainNavigationSidebarProps, SidebarState };
433
+ export type { MainContentProps, MainNavigationSidebarProps, MainOverlayProps, MainRootProps, SidebarState };
@@ -14,10 +14,10 @@ export type MediaFit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
14
14
 
15
15
  /** Static map to keep Tailwind's class scanner happy (no dynamic `object-${fit}`). */
16
16
  const FIT_CLASS: Record<MediaFit, string> = {
17
- cover: 'object-cover',
18
- contain: 'object-contain',
19
- fill: 'object-fill',
20
- none: 'object-none',
17
+ 'cover': 'object-cover',
18
+ 'contain': 'object-contain',
19
+ 'fill': 'object-fill',
20
+ 'none': 'object-none',
21
21
  'scale-down': 'object-scale-down',
22
22
  };
23
23
 
@@ -134,16 +134,16 @@ export const ContextMenu = {
134
134
  };
135
135
 
136
136
  export type {
137
- ContextMenuRootProps,
138
- ContextMenuTriggerProps,
139
- ContextMenuPortalProps,
140
- ContextMenuContentProps,
141
- ContextMenuViewportProps,
142
137
  ContextMenuArrowProps,
143
- ContextMenuGroupProps,
144
- ContextMenuItemProps,
145
138
  ContextMenuCheckboxItemProps,
139
+ ContextMenuContentProps,
140
+ ContextMenuGroupLabelProps,
141
+ ContextMenuGroupProps,
146
142
  ContextMenuItemIndicatorProps,
143
+ ContextMenuItemProps,
144
+ ContextMenuPortalProps,
145
+ ContextMenuRootProps,
147
146
  ContextMenuSeparatorProps,
148
- ContextMenuGroupLabelProps,
147
+ ContextMenuTriggerProps,
148
+ ContextMenuViewportProps,
149
149
  };
@@ -15,8 +15,8 @@ import { Primitive } from '@radix-ui/react-primitive';
15
15
  import { Slot } from '@radix-ui/react-slot';
16
16
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
17
17
  import React, {
18
- type ComponentPropsWithRef,
19
18
  type ComponentPropsWithoutRef,
19
+ type ComponentPropsWithRef,
20
20
  type ComponentRef,
21
21
  type FC,
22
22
  PropsWithChildren,
@@ -29,8 +29,7 @@ import React, {
29
29
  useRef,
30
30
  } from 'react';
31
31
 
32
- import { useElevationContext, useThemeContext } from '../../hooks';
33
- import { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';
32
+ import { useElevationContext, useSafeCollisionPadding, useThemeContext } from '../../hooks';
34
33
  import { type ThemedClassName } from '../../util';
35
34
 
36
35
  type Direction = 'ltr' | 'rtl';
@@ -653,22 +652,22 @@ const useDropdownMenuMenuScope: (scope?: DropdownMenuScope) => any = useMenuScop
653
652
  export { createDropdownMenuScope, useDropdownMenuContext, useDropdownMenuMenuScope };
654
653
 
655
654
  export type {
656
- DropdownMenuRootProps,
657
- DropdownMenuTriggerProps,
658
- DropdownMenuVirtualTriggerProps,
659
- DropdownMenuPortalProps,
655
+ DropdownMenuArrowProps,
656
+ DropdownMenuCheckboxItemProps,
660
657
  DropdownMenuContentProps,
661
- DropdownMenuViewportProps,
662
658
  DropdownMenuGroupProps,
663
- DropdownMenuLabelProps,
659
+ DropdownMenuItemIndicatorProps,
664
660
  DropdownMenuItemProps,
665
- DropdownMenuCheckboxItemProps,
661
+ DropdownMenuLabelProps,
662
+ DropdownMenuPortalProps,
666
663
  DropdownMenuRadioGroupProps,
667
664
  DropdownMenuRadioItemProps,
668
- DropdownMenuItemIndicatorProps,
665
+ DropdownMenuRootProps,
669
666
  DropdownMenuSeparatorProps,
670
- DropdownMenuArrowProps,
667
+ DropdownMenuSubContentProps,
671
668
  DropdownMenuSubProps,
672
669
  DropdownMenuSubTriggerProps,
673
- DropdownMenuSubContentProps,
670
+ DropdownMenuTriggerProps,
671
+ DropdownMenuViewportProps,
672
+ DropdownMenuVirtualTriggerProps,
674
673
  };
@@ -14,14 +14,14 @@ import { Message } from './Message';
14
14
 
15
15
  random.seed(123);
16
16
 
17
- type DefaultStoryProps = {
17
+ type StoryArgs = {
18
18
  valence: MessageValence;
19
19
  title: string;
20
20
  body: string;
21
21
  button?: boolean;
22
22
  };
23
23
 
24
- const DefaultStory = ({ valence, title, body, button }: DefaultStoryProps) => (
24
+ const DefaultStory = ({ valence, title, body, button }: StoryArgs) => (
25
25
  <div className='w-[30rem]'>
26
26
  <Message.Root valence={valence}>
27
27
  {title && <Message.Title onClose={() => console.log('close')}>{title}</Message.Title>}
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { mx, messageValence } from '@dxos/ui-theme';
5
+ import { messageValence, mx } from '@dxos/ui-theme';
6
6
  import { type ComponentFunction, type Elevation, type MessageValence, type Theme } from '@dxos/ui-types';
7
7
 
8
8
  export type MessageStyleProps = {
@@ -5,7 +5,7 @@
5
5
  import { createContext } from '@radix-ui/react-context';
6
6
  import { Primitive } from '@radix-ui/react-primitive';
7
7
  import { Slot } from '@radix-ui/react-slot';
8
- import React, { type CSSProperties, type ComponentPropsWithRef, forwardRef } from 'react';
8
+ import React, { type ComponentPropsWithRef, type CSSProperties, forwardRef } from 'react';
9
9
  import { useTranslation } from 'react-i18next';
10
10
 
11
11
  import { useId } from '@dxos/react-hooks';
@@ -204,6 +204,6 @@ export const Message = {
204
204
 
205
205
  export const Callout = Message;
206
206
 
207
- export type { MessageRootProps, MessageTitleProps, MessageContentProps };
207
+ export type { MessageContentProps, MessageRootProps, MessageTitleProps };
208
208
 
209
209
  export { messageIcons };