@dxos/ui-theme 0.8.4-staging.ac66bdf99f → 0.9.1-main.c7dcc2e112

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 (169) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +89 -867
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/node-esm/index.mjs +89 -867
  7. package/dist/lib/node-esm/index.mjs.map +4 -4
  8. package/dist/lib/node-esm/meta.json +1 -1
  9. package/dist/plugin/node-cjs/main.css +279 -120
  10. package/dist/plugin/node-cjs/main.css.map +3 -3
  11. package/dist/plugin/node-cjs/meta.json +1 -1
  12. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs +82 -10
  13. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs.map +3 -3
  14. package/dist/plugin/node-esm/main.css +279 -120
  15. package/dist/plugin/node-esm/main.css.map +3 -3
  16. package/dist/plugin/node-esm/meta.json +1 -1
  17. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs +84 -12
  18. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +3 -3
  19. package/dist/types/src/Theme.stories.d.ts.map +1 -1
  20. package/dist/types/src/defs.d.ts +1 -1
  21. package/dist/types/src/defs.d.ts.map +1 -1
  22. package/dist/types/src/fragments/density.d.ts +2 -2
  23. package/dist/types/src/fragments/density.d.ts.map +1 -1
  24. package/dist/types/src/fragments/hover.d.ts +0 -1
  25. package/dist/types/src/fragments/hover.d.ts.map +1 -1
  26. package/dist/types/src/index.d.ts +0 -1
  27. package/dist/types/src/index.d.ts.map +1 -1
  28. package/dist/types/src/plugins/ThemePlugin.d.ts +3 -2
  29. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -1
  30. package/dist/types/src/util/hash-styles.d.ts +12 -2
  31. package/dist/types/src/util/hash-styles.d.ts.map +1 -1
  32. package/dist/types/src/util/mx.d.ts +0 -36
  33. package/dist/types/src/util/mx.d.ts.map +1 -1
  34. package/dist/types/src/util/size.d.ts.map +1 -1
  35. package/dist/types/src/util/valence.d.ts +8 -2
  36. package/dist/types/src/util/valence.d.ts.map +1 -1
  37. package/dist/types/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +14 -21
  39. package/src/Theme.stories.tsx +94 -27
  40. package/src/css/DESIGN_SYSTEM.md +187 -0
  41. package/src/css/base/base.css +2 -2
  42. package/src/css/components/button.css +57 -12
  43. package/src/css/components/card.css +14 -0
  44. package/src/css/components/checkbox.css +3 -3
  45. package/src/css/components/focus.css +12 -12
  46. package/src/css/components/link.css +4 -1
  47. package/src/css/components/panel.css +45 -45
  48. package/src/css/components/state.css +76 -0
  49. package/src/css/components/state.md +101 -0
  50. package/src/css/components/surface.css +86 -11
  51. package/src/css/components/tag.css +25 -24
  52. package/src/css/integrations/codemirror.css +4 -3
  53. package/src/css/integrations/tldraw.css +1 -1
  54. package/src/css/layout/main.css +6 -0
  55. package/src/css/layout/size.css +17 -4
  56. package/src/css/theme/animation.css +31 -0
  57. package/src/css/theme/palette.css +34 -0
  58. package/src/css/theme/semantic.css +190 -68
  59. package/src/css/theme/spacing.css +30 -13
  60. package/src/css/theme/styles.css +172 -119
  61. package/src/css/utilities.css +42 -0
  62. package/src/defs.ts +3 -1
  63. package/src/fragments/AUDIT.md +0 -2
  64. package/src/fragments/density.ts +34 -7
  65. package/src/fragments/hover.ts +0 -2
  66. package/src/index.ts +1 -1
  67. package/src/main.css +68 -9
  68. package/src/plugins/ThemePlugin.ts +102 -14
  69. package/src/plugins/main.css +10 -7
  70. package/src/util/hash-styles.ts +54 -42
  71. package/src/util/mx.ts +1 -126
  72. package/src/util/valence.ts +15 -5
  73. package/dist/types/src/theme/components/avatar.d.ts +0 -21
  74. package/dist/types/src/theme/components/avatar.d.ts.map +0 -1
  75. package/dist/types/src/theme/components/breadcrumb.d.ts +0 -9
  76. package/dist/types/src/theme/components/breadcrumb.d.ts.map +0 -1
  77. package/dist/types/src/theme/components/button.d.ts +0 -15
  78. package/dist/types/src/theme/components/button.d.ts.map +0 -1
  79. package/dist/types/src/theme/components/card.d.ts +0 -12
  80. package/dist/types/src/theme/components/card.d.ts.map +0 -1
  81. package/dist/types/src/theme/components/dialog.d.ts +0 -17
  82. package/dist/types/src/theme/components/dialog.d.ts.map +0 -1
  83. package/dist/types/src/theme/components/focus.d.ts +0 -6
  84. package/dist/types/src/theme/components/focus.d.ts.map +0 -1
  85. package/dist/types/src/theme/components/icon-button.d.ts +0 -8
  86. package/dist/types/src/theme/components/icon-button.d.ts.map +0 -1
  87. package/dist/types/src/theme/components/icon.d.ts +0 -10
  88. package/dist/types/src/theme/components/icon.d.ts.map +0 -1
  89. package/dist/types/src/theme/components/index.d.ts +0 -27
  90. package/dist/types/src/theme/components/index.d.ts.map +0 -1
  91. package/dist/types/src/theme/components/input.d.ts +0 -115
  92. package/dist/types/src/theme/components/input.d.ts.map +0 -1
  93. package/dist/types/src/theme/components/link.d.ts +0 -7
  94. package/dist/types/src/theme/components/link.d.ts.map +0 -1
  95. package/dist/types/src/theme/components/list.d.ts +0 -14
  96. package/dist/types/src/theme/components/list.d.ts.map +0 -1
  97. package/dist/types/src/theme/components/main.d.ts +0 -28
  98. package/dist/types/src/theme/components/main.d.ts.map +0 -1
  99. package/dist/types/src/theme/components/menu.d.ts +0 -13
  100. package/dist/types/src/theme/components/menu.d.ts.map +0 -1
  101. package/dist/types/src/theme/components/message.d.ts +0 -12
  102. package/dist/types/src/theme/components/message.d.ts.map +0 -1
  103. package/dist/types/src/theme/components/popover.d.ts +0 -11
  104. package/dist/types/src/theme/components/popover.d.ts.map +0 -1
  105. package/dist/types/src/theme/components/scroll-area.d.ts +0 -32
  106. package/dist/types/src/theme/components/scroll-area.d.ts.map +0 -1
  107. package/dist/types/src/theme/components/select.d.ts +0 -13
  108. package/dist/types/src/theme/components/select.d.ts.map +0 -1
  109. package/dist/types/src/theme/components/separator.d.ts +0 -8
  110. package/dist/types/src/theme/components/separator.d.ts.map +0 -1
  111. package/dist/types/src/theme/components/skeleton.d.ts +0 -7
  112. package/dist/types/src/theme/components/skeleton.d.ts.map +0 -1
  113. package/dist/types/src/theme/components/splitter.d.ts +0 -4
  114. package/dist/types/src/theme/components/splitter.d.ts.map +0 -1
  115. package/dist/types/src/theme/components/status.d.ts +0 -9
  116. package/dist/types/src/theme/components/status.d.ts.map +0 -1
  117. package/dist/types/src/theme/components/tag.d.ts +0 -7
  118. package/dist/types/src/theme/components/tag.d.ts.map +0 -1
  119. package/dist/types/src/theme/components/toast.d.ts +0 -12
  120. package/dist/types/src/theme/components/toast.d.ts.map +0 -1
  121. package/dist/types/src/theme/components/toolbar.d.ts +0 -11
  122. package/dist/types/src/theme/components/toolbar.d.ts.map +0 -1
  123. package/dist/types/src/theme/components/tooltip.d.ts +0 -8
  124. package/dist/types/src/theme/components/tooltip.d.ts.map +0 -1
  125. package/dist/types/src/theme/components/treegrid.d.ts +0 -10
  126. package/dist/types/src/theme/components/treegrid.d.ts.map +0 -1
  127. package/dist/types/src/theme/index.d.ts +0 -4
  128. package/dist/types/src/theme/index.d.ts.map +0 -1
  129. package/dist/types/src/theme/primitives/column.d.ts +0 -29
  130. package/dist/types/src/theme/primitives/column.d.ts.map +0 -1
  131. package/dist/types/src/theme/primitives/index.d.ts +0 -3
  132. package/dist/types/src/theme/primitives/index.d.ts.map +0 -1
  133. package/dist/types/src/theme/primitives/panel.d.ts +0 -13
  134. package/dist/types/src/theme/primitives/panel.d.ts.map +0 -1
  135. package/dist/types/src/theme/theme.d.ts +0 -5
  136. package/dist/types/src/theme/theme.d.ts.map +0 -1
  137. package/src/css/components/selected.css +0 -30
  138. package/src/theme/components/avatar.ts +0 -95
  139. package/src/theme/components/breadcrumb.ts +0 -29
  140. package/src/theme/components/button.ts +0 -48
  141. package/src/theme/components/card.ts +0 -102
  142. package/src/theme/components/dialog.ts +0 -61
  143. package/src/theme/components/focus.ts +0 -33
  144. package/src/theme/components/icon-button.ts +0 -18
  145. package/src/theme/components/icon.ts +0 -28
  146. package/src/theme/components/index.ts +0 -30
  147. package/src/theme/components/input.ts +0 -171
  148. package/src/theme/components/link.ts +0 -25
  149. package/src/theme/components/list.ts +0 -46
  150. package/src/theme/components/main.ts +0 -34
  151. package/src/theme/components/menu.ts +0 -50
  152. package/src/theme/components/message.ts +0 -40
  153. package/src/theme/components/popover.ts +0 -41
  154. package/src/theme/components/scroll-area.ts +0 -115
  155. package/src/theme/components/select.ts +0 -52
  156. package/src/theme/components/separator.ts +0 -24
  157. package/src/theme/components/skeleton.ts +0 -23
  158. package/src/theme/components/splitter.ts +0 -20
  159. package/src/theme/components/status.ts +0 -32
  160. package/src/theme/components/tag.ts +0 -23
  161. package/src/theme/components/toast.ts +0 -53
  162. package/src/theme/components/toolbar.ts +0 -35
  163. package/src/theme/components/tooltip.ts +0 -27
  164. package/src/theme/components/treegrid.ts +0 -37
  165. package/src/theme/index.ts +0 -7
  166. package/src/theme/primitives/column.ts +0 -71
  167. package/src/theme/primitives/index.ts +0 -6
  168. package/src/theme/primitives/panel.ts +0 -43
  169. package/src/theme/theme.ts +0 -87
@@ -1,13 +0,0 @@
1
- import { type ComponentFunction, type Elevation, type Theme } from '@dxos/ui-types';
2
- export type SelectStyleProps = Partial<{
3
- elevation: Elevation;
4
- }>;
5
- export declare const selectContent: ComponentFunction<SelectStyleProps>;
6
- export declare const selectViewport: ComponentFunction<SelectStyleProps>;
7
- export declare const selectItem: ComponentFunction<SelectStyleProps>;
8
- export declare const selectItemIndicator: ComponentFunction<SelectStyleProps>;
9
- export declare const selectArrow: ComponentFunction<SelectStyleProps>;
10
- export declare const selectSeparator: ComponentFunction<SelectStyleProps>;
11
- export declare const selectScrollButton: ComponentFunction<SelectStyleProps>;
12
- export declare const selectTheme: Theme<SelectStyleProps>;
13
- //# sourceMappingURL=select.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/select.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIpF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,gBAAgB,CAQ7D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,gBAAgB,CAAkC,CAAC;AAElG,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,gBAAgB,CAOxD,CAAC;AAEJ,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,gBAAgB,CAAkD,CAAC;AAEvH,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAAoD,CAAC;AAEjH,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,gBAAgB,CACL,CAAC;AAE5D,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,gBAAgB,CACwB,CAAC;AAE5F,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAQ/C,CAAC"}
@@ -1,8 +0,0 @@
1
- import { type ComponentFunction, type Theme } from '@dxos/ui-types';
2
- export type SeparatorStyleProps = {
3
- orientation?: 'horizontal' | 'vertical';
4
- subdued?: boolean;
5
- };
6
- export declare const separatorRoot: ComponentFunction<SeparatorStyleProps>;
7
- export declare const separatorTheme: Theme<SeparatorStyleProps>;
8
- //# sourceMappingURL=separator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/separator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIpE,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,mBAAmB,CAM9D,CAAC;AAEJ,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,mBAAmB,CAErD,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { ComponentFunction, Theme } from '@dxos/ui-types';
2
- export type SkeletonStyleProps = {
3
- variant?: 'default' | 'circle' | 'text';
4
- };
5
- export declare const skeletonRoot: ComponentFunction<SkeletonStyleProps>;
6
- export declare const skeletonTheme: Theme<SkeletonStyleProps>;
7
- //# sourceMappingURL=skeleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/skeleton.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,kBAAkB,CAM5D,CAAC;AAEJ,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,kBAAkB,CAEnD,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type Theme } from '@dxos/ui-types';
2
- export type SplitterStyleProps = {};
3
- export declare const splitterTheme: Theme<SplitterStyleProps>;
4
- //# sourceMappingURL=splitter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splitter.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/splitter.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIpE,MAAM,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAQpC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,kBAAkB,CAGnD,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { ComponentFunction, Theme } from '@dxos/ui-types';
2
- export type StatusStyleProps = {
3
- variant?: 'default' | 'main-bottom';
4
- indeterminate?: boolean;
5
- };
6
- export declare const statusRoot: ComponentFunction<StatusStyleProps>;
7
- export declare const statusBar: ComponentFunction<StatusStyleProps>;
8
- export declare const statusTheme: Theme<StatusStyleProps>;
9
- //# sourceMappingURL=status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/status.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACpC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,gBAAgB,CAKxD,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,gBAAgB,CAMvD,CAAC;AAEJ,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAG/C,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type ChromaticPalette, type ComponentFunction, type MessageValence, type NeutralPalette, type Theme } from '@dxos/ui-types';
2
- export type TagStyleProps = {
3
- palette?: ChromaticPalette | NeutralPalette | MessageValence;
4
- };
5
- export declare const tagRoot: ComponentFunction<TagStyleProps>;
6
- export declare const tagTheme: Theme<TagStyleProps>;
7
- //# sourceMappingURL=tag.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/tag.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,KAAK,EACX,MAAM,gBAAgB,CAAC;AAIxB,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,gBAAgB,GAAG,cAAc,GAAG,cAAc,CAAC;CAC9D,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,aAAa,CAAuC,CAAC;AAE7F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,aAAa,CAEzC,CAAC"}
@@ -1,12 +0,0 @@
1
- import { type ComponentFunction, type Theme } from '@dxos/ui-types';
2
- export type ToastStyleProps = Partial<{
3
- srOnly: boolean;
4
- }>;
5
- export declare const toastViewport: ComponentFunction<ToastStyleProps>;
6
- export declare const toastRoot: ComponentFunction<ToastStyleProps>;
7
- export declare const toastBody: ComponentFunction<ToastStyleProps>;
8
- export declare const toastActions: ComponentFunction<ToastStyleProps>;
9
- export declare const toastTitle: ComponentFunction<ToastStyleProps>;
10
- export declare const toastDescription: ComponentFunction<ToastStyleProps>;
11
- export declare const toastTheme: Theme<ToastStyleProps>;
12
- //# sourceMappingURL=toast.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/toast.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIpE,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,eAAe,CAM1D,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,eAAe,CAWtD,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,eAAe,CACG,CAAC;AAE7D,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,eAAe,CACD,CAAC;AAE5D,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CACD,CAAC;AAE1D,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,eAAe,CACC,CAAC;AAElE,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,eAAe,CAO7C,CAAC"}
@@ -1,11 +0,0 @@
1
- import { type ComponentFunction, type Density, type Theme } from '@dxos/ui-types';
2
- export type ToolbarStyleProps = Partial<{
3
- density: Density;
4
- disabled: boolean;
5
- layoutManaged: boolean;
6
- }>;
7
- export declare const toolbarLayout = "w-full shrink-0 flex flex-nowrap p-1 gap-1 items-center overflow-x-auto scrollbar-none dx-contain-layout";
8
- export declare const toolbarRoot: ComponentFunction<ToolbarStyleProps>;
9
- export declare const toolbarText: ComponentFunction<ToolbarStyleProps>;
10
- export declare const toolbarTheme: Theme<ToolbarStyleProps>;
11
- //# sourceMappingURL=toolbar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/toolbar.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIlF,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa,6GACkF,CAAC;AAE7G,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,iBAAiB,CAQ5D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,iBAAiB,CAE5D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAGjD,CAAC"}
@@ -1,8 +0,0 @@
1
- import { type ComponentFunction, type Elevation, type Theme } from '@dxos/ui-types';
2
- export type TooltipStyleProps = Partial<{
3
- elevation: Elevation;
4
- }>;
5
- export declare const tooltipContent: ComponentFunction<TooltipStyleProps>;
6
- export declare const tooltipArrow: ComponentFunction<TooltipStyleProps>;
7
- export declare const tooltipTheme: Theme<TooltipStyleProps>;
8
- //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/tooltip.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIpF,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;IACtC,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,iBAAiB,CAM7D,CAAC;AAEJ,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAC1B,CAAC;AAErC,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAGjD,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { ComponentFunction, Theme } from '@dxos/ui-types';
2
- export type TreegridStyleProps = Partial<{
3
- level: number;
4
- indent: boolean;
5
- }>;
6
- export declare const treegridRoot: ComponentFunction<TreegridStyleProps>;
7
- export declare const treegridRow: ComponentFunction<TreegridStyleProps>;
8
- export declare const treegridCell: ComponentFunction<TreegridStyleProps>;
9
- export declare const treegridTheme: Theme<TreegridStyleProps>;
10
- //# sourceMappingURL=treegrid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"treegrid.d.ts","sourceRoot":"","sources":["../../../../../src/theme/components/treegrid.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI/D,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC;AAaH,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,kBAAkB,CAAqC,CAAC;AAErG,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,kBAAkB,CACY,CAAC;AAE3E,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,kBAAkB,CAC/B,CAAC;AAEjC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,kBAAkB,CAInD,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './components';
2
- export * from './primitives';
3
- export * from './theme';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1,29 +0,0 @@
1
- import { type ComponentFunction } from '@dxos/ui-types';
2
- /**
3
- * Column-aware theme utilities.
4
- * Components apply these in their theme functions to participate in the Column grid
5
- * without importing Column React components.
6
- *
7
- * CSS custom property cascade:
8
- * - Column.Root sets `--dx-col: 2 / span 1` (center column placement).
9
- * - ScrollArea.Viewport resets `--dx-col: auto` after consuming `--gutter`.
10
- * - Components apply `grid-column: var(--dx-col, auto)` to auto-center in Column
11
- * or do nothing outside Column / inside ScrollArea.
12
- */
13
- export declare const withColumn: {
14
- /** Centers element in the Column grid via --dx-col. No-op outside Column or inside ScrollArea. */
15
- center: () => string;
16
- /** Propagates the Column grid to children via subgrid. No-op outside Column.
17
- * Direct children default to center column unless they are a dx-container (ScrollArea). */
18
- propagate: () => string;
19
- /** Resets --dx-col after consuming --gutter. Applied by ScrollArea.Viewport. */
20
- consumed: () => string;
21
- };
22
- export type ColumnStyleProps = {};
23
- export declare const columnTheme: {
24
- root: ComponentFunction<ColumnStyleProps>;
25
- row: ComponentFunction<ColumnStyleProps>;
26
- bleed: ComponentFunction<ColumnStyleProps>;
27
- center: ComponentFunction<ColumnStyleProps>;
28
- };
29
- //# sourceMappingURL=column.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../../../src/theme/primitives/column.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;IACrB,kGAAkG;;IAGlG;gGAC4F;;IAI5F,gFAAgF;;CAEjF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAiClC,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './column';
2
- export * from './panel';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/primitives/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -1,13 +0,0 @@
1
- import { type ComponentFunction } from '@dxos/ui-types';
2
- type Size = 'lg' | 'md' | 'sm';
3
- export type PanelStyleProps = {
4
- size?: Size;
5
- };
6
- export declare const panelTheme: {
7
- root: ComponentFunction<PanelStyleProps>;
8
- toolbar: ComponentFunction<PanelStyleProps>;
9
- content: ComponentFunction<PanelStyleProps>;
10
- statusbar: ComponentFunction<PanelStyleProps>;
11
- };
12
- export {};
13
- //# sourceMappingURL=panel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../../src/theme/primitives/panel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/B,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAyBF,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { type Theme, type ThemeFunction } from '@dxos/ui-types';
2
- export declare const defaultTheme: Theme<Record<string, any>>;
3
- export declare const bindTheme: <P extends Record<string, any>>(theme: Theme<Record<string, any>>) => ThemeFunction<P>;
4
- export declare const defaultTx: ThemeFunction<Record<string, any>>;
5
- //# sourceMappingURL=theme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAA+C,KAAK,KAAK,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAiC7G,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAwCnD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAG,aAAa,CAAC,CAAC,CAK3G,CAAC;AAEF,eAAO,MAAM,SAAS,oCAA0B,CAAC"}
@@ -1,30 +0,0 @@
1
- /**
2
- * Selected / Highlighted state utilities
3
- */
4
-
5
- @layer dx-components {
6
- .dx-hover {
7
- @apply cursor-pointer hover:bg-highlight-surface! hover:text-highlight-surface-text!;
8
- }
9
-
10
- /** TODO(burdon): Disambiguate from dx-hover */
11
- .dx-highlighted {
12
- @apply data-[highlighted]:bg-highlight-surface
13
- data-[highlighted]:text-highlight-surface-text
14
- hover:data-[highlighted]:bg-highlight-surface-hover;
15
- }
16
-
17
- /** TODO(burdon): Only show active if container has attention. */
18
- .dx-current {
19
- @apply dx-ring-pseudo
20
- aria-[current=true]:bg-highlight-surface aria-[current=true]:text-highlight-surface-text
21
- aria-[current=true]:after:ring-active-separator!;
22
- }
23
-
24
- .dx-selected {
25
- @apply aria-selected:bg-selected-surface
26
- aria-selected:text-selected-surface-text hover:aria-selected:text-selected-surface-text
27
- aria-selected:font-semibold aria-selected:tracking-normal
28
- transition-[color,font-variation-settings,letter-spacing];
29
- }
30
- }
@@ -1,95 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { type ComponentFunction, type Size, type Theme } from '@dxos/ui-types';
6
-
7
- import { mx, getSize, getHeight } from '../../util';
8
-
9
- export type AvatarStyleProps = Partial<{
10
- size: Size;
11
- srOnly: boolean;
12
- status: 'active' | 'inactive' | 'current' | 'error' | 'warning' | 'internal';
13
- animation: 'pulse' | 'none';
14
- variant: 'circle' | 'square';
15
- inGroup: boolean;
16
- }>;
17
-
18
- export const avatarRoot: ComponentFunction<AvatarStyleProps> = ({ size = 10, inGroup }, ...etc) =>
19
- mx(
20
- 'relative inline-flex shrink-0',
21
- getSize(size),
22
- inGroup && (size === 'px' || size <= 3 ? '-mr-1' : '-mr-2'),
23
- ...etc,
24
- );
25
-
26
- export const avatarLabel: ComponentFunction<AvatarStyleProps> = ({ srOnly }, ...etc) => mx(srOnly && 'sr-only', ...etc);
27
-
28
- export const avatarDescription: ComponentFunction<AvatarStyleProps> = ({ srOnly }, ...etc) =>
29
- mx('text-description', srOnly && 'sr-only', ...etc);
30
-
31
- export const avatarFrame: ComponentFunction<AvatarStyleProps> = ({ variant }, ...etc) =>
32
- mx('h-full w-full bg-(--surface-bg)', variant === 'circle' ? 'rounded-full' : 'rounded-sm', ...etc);
33
-
34
- export const avatarStatusIcon: ComponentFunction<AvatarStyleProps> = ({ status, size = 3 }, ...etc) =>
35
- mx(
36
- 'absolute bottom-0 end-0',
37
- getSize(size),
38
- status === 'inactive'
39
- ? 'text-amber-400 dark:text-amber-300'
40
- : status === 'active'
41
- ? 'text-emerald-400 dark:text-emerald-300'
42
- : 'text-neutral-400 dark:text-neutral-300',
43
- ...etc,
44
- );
45
-
46
- export const avatarRing: ComponentFunction<AvatarStyleProps> = ({ status, variant, animation }, ...etc) =>
47
- mx(
48
- 'absolute inset-0 border-2',
49
- variant === 'circle' ? 'rounded-full' : 'rounded-sm',
50
- status === 'current'
51
- ? 'border-primary-400 dark:border-primary-500'
52
- : status === 'active'
53
- ? 'border-emerald-400 dark:border-emerald-400'
54
- : status === 'error'
55
- ? 'border-rose-400 dark:border-rose-500'
56
- : status === 'warning'
57
- ? 'border-amber-400 dark:border-amber-500'
58
- : status === 'inactive'
59
- ? 'border-separator'
60
- : status === 'internal'
61
- ? 'border-fuchsia-600'
62
- : 'border-[color:var(--surface-bg)]',
63
- animation === 'pulse' ? 'animate-halo-pulse' : '',
64
- ...etc,
65
- );
66
-
67
- export const avatarFallbackText: ComponentFunction<AvatarStyleProps> = (_props, ...etc) => mx('fill-white', ...etc);
68
-
69
- export const avatarGroup: ComponentFunction<AvatarStyleProps> = (_props, ...etc) =>
70
- mx('inline-flex items-center', ...etc);
71
-
72
- export const avatarGroupLabel: ComponentFunction<AvatarStyleProps> = ({ size, srOnly }, ...etc) =>
73
- mx(
74
- srOnly
75
- ? 'sr-only'
76
- : 'rounded-full truncate text-sm leading-none py-1 px-2 relative z-[1] flex items-center justify-center',
77
- size && getHeight(size),
78
- ...etc,
79
- );
80
-
81
- export const avatarGroupDescription: ComponentFunction<AvatarStyleProps> = ({ srOnly }, ...etc) =>
82
- mx(srOnly ? 'sr-only' : 'text-description', ...etc);
83
-
84
- export const avatarTheme: Theme<AvatarStyleProps> = {
85
- root: avatarRoot,
86
- label: avatarLabel,
87
- description: avatarDescription,
88
- statusIcon: avatarStatusIcon,
89
- frame: avatarFrame,
90
- ring: avatarRing,
91
- fallbackText: avatarFallbackText,
92
- group: avatarGroup,
93
- groupLabel: avatarGroupLabel,
94
- groupDescription: avatarGroupDescription,
95
- };
@@ -1,29 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { type ComponentFunction, type Theme } from '@dxos/ui-types';
6
-
7
- import { mx } from '../../util';
8
-
9
- export type breadcrumbStyleProps = {};
10
-
11
- export const breadcrumbRoot: ComponentFunction<breadcrumbStyleProps> = (_props, ...etc) =>
12
- mx('shrink-0 flex items-center', ...etc);
13
-
14
- export const breadcrumbList: ComponentFunction<breadcrumbStyleProps> = (_props, ...etc) => mx('contents', ...etc);
15
-
16
- export const breadcrumbListItem: ComponentFunction<breadcrumbStyleProps> = (_props, ...etc) => mx('contents', ...etc);
17
-
18
- export const breadcrumbCurrent: ComponentFunction<breadcrumbStyleProps> = (_props, ...etc) => mx(...etc);
19
-
20
- export const breadcrumbSeparator: ComponentFunction<breadcrumbStyleProps> = (_props, ...etc) =>
21
- mx('opacity-50', ...etc);
22
-
23
- export const breadcrumbTheme: Theme<breadcrumbStyleProps> = {
24
- root: breadcrumbRoot,
25
- list: breadcrumbList,
26
- listItem: breadcrumbListItem,
27
- current: breadcrumbCurrent,
28
- separator: breadcrumbSeparator,
29
- };
@@ -1,48 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
-
5
- import type { ComponentFunction, Density, Elevation, Theme } from '@dxos/ui-types';
6
-
7
- import { ghostHover } from '../../fragments';
8
- import { mx } from '../../util';
9
-
10
- export const primaryButtonColors =
11
- 'text-accent-surface-text bg-accent-surface hover:bg-accent-surface-hover aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100';
12
-
13
- export const staticDefaultButtonColors = 'bg-input-surface text-input-surface-text';
14
-
15
- export const defaultButtonColors = mx(
16
- staticDefaultButtonColors,
17
- 'data-[state=open]:bg-input-surface aria-pressed:text-accent-text aria-pressed:bg-base-surface aria-checked:text-accent-text aria-checked:bg-base-surface',
18
- );
19
-
20
- export const ghostButtonColors = mx(
21
- ghostHover,
22
- 'hover:text-inherit data-[state=open]:bg-input-surface aria-pressed:text-accent-text aria-pressed:bg-base-surface aria-checked:text-accent-text aria-checked:bg-base-surface',
23
- );
24
-
25
- export type ButtonStyleProps = Partial<{
26
- inGroup?: boolean;
27
- textWrap?: boolean;
28
- density: Density;
29
- elevation: Elevation;
30
- disabled: boolean;
31
- variant: 'default' | 'primary' | 'ghost' | 'outline';
32
- }>;
33
-
34
- const buttonRoot: ComponentFunction<ButtonStyleProps> = (_props, ...etc) => {
35
- return mx('dx-button dx-focus-ring group [&_span]:truncate', ...etc);
36
- };
37
-
38
- const buttonGroup: ComponentFunction<{ elevation?: Elevation }> = (_props, ...etc) => {
39
- return mx(
40
- 'inline-flex rounded-xs [&>:first-child]:rounded-w-sm [&>:last-child]:rounded-ie-sm [&>button]:relative',
41
- ...etc,
42
- );
43
- };
44
-
45
- export const buttonTheme: Theme<ButtonStyleProps> = {
46
- root: buttonRoot,
47
- group: buttonGroup,
48
- };
@@ -1,102 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { type ComponentFunction, type Density, type Theme } from '@dxos/ui-types';
6
-
7
- import { mx } from '../../util';
8
-
9
- export type CardStyleProps = {
10
- border?: boolean;
11
- fullWidth?: boolean;
12
- srOnly?: boolean;
13
- variant?: 'default' | 'subtitle' | 'description';
14
- density?: Density;
15
- truncate?: boolean;
16
- padding?: boolean;
17
- };
18
-
19
- const cardRoot: ComponentFunction<CardStyleProps> = ({ border, fullWidth }, ...etc) =>
20
- mx(
21
- 'dx-card dx-card-min-width dx-card-max-width min-h-(--dx-rail-item) group/card relative overflow-hidden',
22
- border &&
23
- 'bg-card-surface border border-separator dark:border-subdued-separator rounded-xs dx-focus-ring-group-y-indicator',
24
- fullWidth && 'max-w-none!',
25
- ...etc,
26
- );
27
-
28
- const cardToolbar: ComponentFunction<CardStyleProps> = (_, ...etc) =>
29
- mx(
30
- 'dx-card__toolbar dx-density-fine bg-transparent p-0! gap-0! col-span-3 grid! grid-cols-subgrid! [contain:none]',
31
- ...etc,
32
- );
33
-
34
- const cardTitle: ComponentFunction<CardStyleProps> = (_props, ...etc) => mx('dx-card__title grow truncate', ...etc);
35
-
36
- const cardContent: ComponentFunction<CardStyleProps> = (_props, ...etc) =>
37
- mx('dx-card__content contents pb-1 last:pb-0', ...etc);
38
-
39
- const cardHeading: ComponentFunction<CardStyleProps> = ({ variant = 'default' }, ...etc) =>
40
- mx(
41
- 'dx-card__heading',
42
- variant === 'default' && 'py-1',
43
- variant === 'subtitle' && 'py-2 text-xs text-description font-medium uppercase',
44
- ...etc,
45
- );
46
-
47
- const cardText: ComponentFunction<CardStyleProps> = ({ variant = 'default', truncate: _truncate }, ...etc) =>
48
- mx(
49
- 'dx-card__text items-center overflow-hidden',
50
- variant === 'default' && 'py-1',
51
- variant === 'description' && 'py-1.5 text-description',
52
- ...etc,
53
- );
54
-
55
- const cardTextSpan: ComponentFunction<CardStyleProps> = ({ variant = 'default', truncate }, ...etc) =>
56
- mx(variant === 'description' && 'text-sm text-description line-clamp-3', truncate && 'truncate', ...etc);
57
-
58
- const cardPoster: ComponentFunction<CardStyleProps> = (_props, ...etc) =>
59
- mx('dx-card__poster col-span-3 max-h-[200px]', ...etc);
60
-
61
- const cardPosterIcon: ComponentFunction<CardStyleProps> = (_props, ...etc) =>
62
- mx('dx-card__poster-icon col-span-3 grid place-items-center bg-input-surface text-subdued max-h-[200px]', ...etc);
63
-
64
- const cardAction: ComponentFunction<CardStyleProps> = (_props, ...etc) =>
65
- mx('dx-card__acztion col-span-3 !grid grid-cols-subgrid p-0! w-full text-start overflow-hidden', ...etc);
66
-
67
- const cardActionLabel: ComponentFunction<CardStyleProps> = (_props, ...etc) =>
68
- mx('dx-card__action-label min-w-0 flex-1 truncate', ...etc);
69
-
70
- const cardLink: ComponentFunction<CardStyleProps> = (_props, ...etc) =>
71
- mx('dx-card__link col-span-3 !grid grid-cols-subgrid group p-0! dx-button dx-focus-ring min-h-1!', ...etc);
72
-
73
- const cardLinkLabel: ComponentFunction<CardStyleProps> = (_props, ...etc) =>
74
- mx('dx-card__link-label min-w-0 flex-1 truncate', ...etc);
75
-
76
- const cardRow: ComponentFunction<CardStyleProps> = (_, ...etc) =>
77
- mx('dx-card__row col-span-3 grid grid-cols-subgrid', ...etc);
78
-
79
- const cardIconBlock: ComponentFunction<CardStyleProps> = ({ padding }, ...etc) =>
80
- mx(
81
- 'dx-card__icon-block grid h-[var(--dx-rail-item)] w-[var(--dx-rail-item)] place-items-center',
82
- padding && '[&>*]:p-1',
83
- ...etc,
84
- );
85
-
86
- export const cardTheme: Theme<CardStyleProps> = {
87
- root: cardRoot,
88
- toolbar: cardToolbar,
89
- title: cardTitle,
90
- content: cardContent,
91
- row: cardRow,
92
- heading: cardHeading,
93
- text: cardText,
94
- 'text-span': cardTextSpan,
95
- poster: cardPoster,
96
- 'poster-icon': cardPosterIcon,
97
- action: cardAction,
98
- 'action-label': cardActionLabel,
99
- link: cardLink,
100
- 'link-label': cardLinkLabel,
101
- 'icon-block': cardIconBlock,
102
- };
@@ -1,61 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { type ComponentFunction, type Elevation, type Theme } from '@dxos/ui-types';
6
-
7
- import { mx } from '../../util';
8
- import { withColumn } from '../primitives/column';
9
-
10
- export type DialogSize = 'sm' | 'md' | 'lg' | 'xl';
11
-
12
- const sizeMap: Record<DialogSize, string> = {
13
- sm: 'md:max-w-[24rem]',
14
- md: 'md:max-w-[32rem]!',
15
- lg: 'md:max-w-[40rem]!',
16
- xl: 'md:max-w-[60rem]!',
17
- };
18
-
19
- export type DialogStyleProps = {
20
- srOnly?: boolean;
21
- inOverlayLayout?: boolean;
22
- elevation?: Elevation;
23
- size?: DialogSize;
24
- };
25
-
26
- export const dialogOverlay: ComponentFunction<DialogStyleProps> = (_props, ...etc) => mx('dx-dialog__overlay', ...etc);
27
-
28
- export const dialogContent: ComponentFunction<DialogStyleProps> = ({ inOverlayLayout, size = 'md' }, ...etc) => {
29
- return mx(
30
- '@container',
31
- 'dx-dialog__content dx-focus-ring dx-modal-surface dx-density-coarse py-4',
32
- !inOverlayLayout && 'fixed z-50 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]',
33
- sizeMap[size],
34
- ...etc,
35
- );
36
- };
37
-
38
- export const dialogHeader: ComponentFunction<DialogStyleProps> = (_props, ...etc) =>
39
- mx('dx-dialog__header flex pb-4 items-center justify-between', withColumn.center(), ...etc);
40
-
41
- export const dialogBody: ComponentFunction<DialogStyleProps> = (_props, ...etc) =>
42
- mx('dx-dialog__body dx-expander', withColumn.propagate(), ...etc);
43
-
44
- export const dialogActionBar: ComponentFunction<DialogStyleProps> = (_props, ...etc) =>
45
- mx('dx-dialog__actionbar flex items-center pt-4 gap-2 dx-density-coarse', withColumn.center(), ...etc);
46
-
47
- export const dialogTitle: ComponentFunction<DialogStyleProps> = ({ srOnly }, ...etc) =>
48
- mx('dx-dialog__title', srOnly && 'sr-only', ...etc);
49
-
50
- export const dialogDescription: ComponentFunction<DialogStyleProps> = ({ srOnly }, ...etc) =>
51
- mx('dx-dialog__description', 'text-description', srOnly && 'sr-only', ...etc);
52
-
53
- export const dialogTheme: Theme<DialogStyleProps> = {
54
- overlay: dialogOverlay,
55
- content: dialogContent,
56
- header: dialogHeader,
57
- body: dialogBody,
58
- actionbar: dialogActionBar,
59
- title: dialogTitle,
60
- description: dialogDescription,
61
- };
@@ -1,33 +0,0 @@
1
- //
2
- // Copyright 2026 DXOS.org
3
- //
4
-
5
- import { type ComponentFunction, type Theme } from '@dxos/ui-types';
6
-
7
- import { mx } from '../../util';
8
-
9
- export type FocusStyleProps = {
10
- border?: boolean;
11
- };
12
-
13
- /**
14
- * Focus ring styles shared by Focus.Group and Focus.Item.
15
- * Uses a `::after` pseudo-element overlay so the ring paints above child content
16
- * (inset box-shadow alone is obscured by children with backgrounds).
17
- * The pseudo-element is `pointer-events-none` and absolutely positioned over the element.
18
- * When `border` is true, a subdued CSS border is always visible (e.g., for grid cell edges).
19
- */
20
- const focusRing: ComponentFunction<FocusStyleProps> = ({ border }, ...etc) =>
21
- mx(
22
- 'dx-ring-pseudo outline-hidden',
23
- 'focus:after:ring-neutral-focus-indicator',
24
- 'data-[focus-state=active]:after:ring-neutral-focus-indicator',
25
- 'data-[focus-state=error]:after:ring-rose-500',
26
- border && 'border border-separator',
27
- ...etc,
28
- );
29
-
30
- export const focusTheme: Theme<FocusStyleProps> = {
31
- group: focusRing,
32
- item: focusRing,
33
- };