@dxos/ui-theme 0.8.4-main.fbb7a13 → 0.8.4-staging.ac66bdf99f
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.
- package/dist/lib/browser/index.mjs +766 -2802
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +766 -2802
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/plugin/node-cjs/main.css +1529 -0
- package/dist/plugin/node-cjs/main.css.map +7 -0
- package/dist/plugin/node-cjs/meta.json +1 -1
- package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs +137 -0
- package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs.map +7 -0
- package/dist/plugin/node-esm/main.css +1529 -0
- package/dist/plugin/node-esm/main.css.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -1
- package/dist/plugin/node-esm/plugins/ThemePlugin.mjs +105 -0
- package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +7 -0
- package/dist/types/src/Theme.stories.d.ts +27 -0
- package/dist/types/src/Theme.stories.d.ts.map +1 -0
- package/dist/types/src/defs.d.ts +21 -0
- package/dist/types/src/defs.d.ts.map +1 -0
- package/dist/types/src/fragments/density.d.ts +4 -0
- package/dist/types/src/fragments/density.d.ts.map +1 -0
- package/dist/types/src/fragments/disabled.d.ts.map +1 -0
- package/dist/types/src/fragments/hover.d.ts +10 -0
- package/dist/types/src/fragments/hover.d.ts.map +1 -0
- package/dist/types/src/fragments/index.d.ts +5 -0
- package/dist/types/src/fragments/index.d.ts.map +1 -0
- package/dist/types/src/fragments/text.d.ts +2 -0
- package/dist/types/src/fragments/text.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -10
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugins/ThemePlugin.d.ts +16 -0
- package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -0
- package/dist/types/src/plugins/dark-mode.d.ts +1 -0
- package/dist/types/src/plugins/dark-mode.d.ts.map +1 -0
- package/dist/types/src/theme/components/avatar.d.ts.map +1 -0
- package/dist/types/src/theme/components/breadcrumb.d.ts.map +1 -0
- package/dist/types/src/theme/components/button.d.ts +15 -0
- package/dist/types/src/theme/components/button.d.ts.map +1 -0
- package/dist/types/src/theme/components/card.d.ts +12 -0
- package/dist/types/src/theme/components/card.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/dialog.d.ts +2 -0
- package/dist/types/src/theme/components/dialog.d.ts.map +1 -0
- package/dist/types/src/theme/components/focus.d.ts +6 -0
- package/dist/types/src/theme/components/focus.d.ts.map +1 -0
- package/dist/types/src/theme/components/icon-button.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/icon.d.ts +3 -0
- package/dist/types/src/theme/components/icon.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/index.d.ts +4 -1
- package/dist/types/src/theme/components/index.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/input.d.ts +25 -21
- package/dist/types/src/theme/components/input.d.ts.map +1 -0
- package/dist/types/src/theme/components/link.d.ts.map +1 -0
- package/dist/types/src/theme/components/list.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/main.d.ts +2 -7
- package/dist/types/src/theme/components/main.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/menu.d.ts +1 -1
- package/dist/types/src/theme/components/menu.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/message.d.ts +1 -0
- package/dist/types/src/theme/components/message.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/popover.d.ts +1 -1
- package/dist/types/src/theme/components/popover.d.ts.map +1 -0
- package/dist/types/src/theme/components/scroll-area.d.ts +32 -0
- package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -0
- package/dist/types/src/theme/components/select.d.ts.map +1 -0
- package/dist/types/src/theme/components/separator.d.ts.map +1 -0
- package/dist/types/src/theme/components/skeleton.d.ts +7 -0
- package/dist/types/src/theme/components/skeleton.d.ts.map +1 -0
- package/dist/types/src/theme/components/splitter.d.ts +4 -0
- package/dist/types/src/theme/components/splitter.d.ts.map +1 -0
- package/dist/types/src/{styles → theme}/components/status.d.ts +1 -1
- package/dist/types/src/theme/components/status.d.ts.map +1 -0
- package/dist/types/src/theme/components/tag.d.ts.map +1 -0
- package/dist/types/src/theme/components/toast.d.ts.map +1 -0
- package/dist/types/src/theme/components/toolbar.d.ts +11 -0
- package/dist/types/src/theme/components/toolbar.d.ts.map +1 -0
- package/dist/types/src/theme/components/tooltip.d.ts.map +1 -0
- package/dist/types/src/theme/components/treegrid.d.ts.map +1 -0
- package/dist/types/src/theme/index.d.ts +4 -0
- package/dist/types/src/theme/index.d.ts.map +1 -0
- package/dist/types/src/theme/primitives/column.d.ts +29 -0
- package/dist/types/src/theme/primitives/column.d.ts.map +1 -0
- package/dist/types/src/theme/primitives/index.d.ts +3 -0
- package/dist/types/src/theme/primitives/index.d.ts.map +1 -0
- package/dist/types/src/theme/primitives/panel.d.ts +13 -0
- package/dist/types/src/theme/primitives/panel.d.ts.map +1 -0
- package/dist/types/src/theme/theme.d.ts +5 -0
- package/dist/types/src/theme/theme.d.ts.map +1 -0
- package/dist/types/src/{styles/fragments → util}/elevation.d.ts +0 -6
- package/dist/types/src/util/elevation.d.ts.map +1 -0
- package/dist/types/src/util/hash-styles.d.ts +8 -5
- package/dist/types/src/util/hash-styles.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/mx.d.ts +36 -0
- package/dist/types/src/util/mx.d.ts.map +1 -1
- package/dist/types/src/util/size.d.ts +27 -0
- package/dist/types/src/util/size.d.ts.map +1 -0
- package/dist/types/src/util/valence.d.ts +4 -0
- package/dist/types/src/util/valence.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -27
- package/src/Theme.stories.tsx +224 -0
- package/src/css/base/base.css +43 -0
- package/src/{styles/layers → css/base}/typography.css +3 -5
- package/src/{styles/layers → css/components}/button.css +23 -14
- package/src/{styles/layers → css/components}/checkbox.css +12 -8
- package/src/{styles/layers → css/components}/dialog.css +16 -15
- package/src/{styles/layers/focus-ring.css → css/components/focus.css} +60 -41
- package/src/css/components/icon.css +9 -0
- package/src/css/components/link.css +9 -0
- package/src/css/components/panel.css +117 -0
- package/src/css/components/scrollbar.css +24 -0
- package/src/css/components/selected.css +30 -0
- package/src/css/components/surface.css +34 -0
- package/src/css/components/tag.css +130 -0
- package/src/css/components/text.css +124 -0
- package/src/css/integrations/codemirror.css +34 -0
- package/src/css/integrations/tldraw.css +14 -0
- package/src/css/layout/main.css +205 -0
- package/src/{styles/layers → css/layout}/native.css +6 -4
- package/src/css/layout/positioning.css +19 -0
- package/src/{styles/layers → css/layout}/size.css +117 -109
- package/src/css/theme/animation.css +229 -0
- package/src/css/theme/border.css +23 -0
- package/src/css/theme/palette.css +36 -0
- package/src/css/theme/semantic.css +116 -0
- package/src/css/theme/spacing.css +147 -0
- package/src/css/theme/styles.css +145 -0
- package/src/css/theme/text.css +37 -0
- package/src/css/utilities.css +76 -0
- package/src/defs.ts +48 -0
- package/src/fragments/AUDIT.md +57 -0
- package/src/fragments/density.ts +16 -0
- package/src/fragments/hover.ts +18 -0
- package/src/fragments/index.ts +10 -0
- package/src/fragments/text.ts +6 -0
- package/src/index.ts +3 -14
- package/src/main.css +87 -0
- package/src/plugins/ThemePlugin.ts +125 -0
- package/src/plugins/dark-mode.ts +22 -0
- package/src/plugins/main.css +45 -0
- package/src/{styles → theme}/components/avatar.ts +12 -13
- package/src/theme/components/button.ts +48 -0
- package/src/theme/components/card.ts +102 -0
- package/src/{styles → theme}/components/dialog.ts +19 -10
- package/src/theme/components/focus.ts +33 -0
- package/src/{styles → theme}/components/icon-button.ts +1 -3
- package/src/theme/components/icon.ts +28 -0
- package/src/{styles → theme}/components/index.ts +4 -1
- package/src/theme/components/input.ts +171 -0
- package/src/{styles → theme}/components/link.ts +3 -4
- package/src/{styles → theme}/components/list.ts +5 -5
- package/src/{styles → theme}/components/main.ts +2 -6
- package/src/{styles → theme}/components/menu.ts +11 -21
- package/src/{styles → theme}/components/message.ts +11 -7
- package/src/{styles → theme}/components/popover.ts +13 -12
- package/src/theme/components/scroll-area.ts +115 -0
- package/src/{styles → theme}/components/select.ts +8 -16
- package/src/{styles → theme}/components/separator.ts +3 -3
- package/src/theme/components/skeleton.ts +23 -0
- package/src/theme/components/splitter.ts +20 -0
- package/src/{styles → theme}/components/status.ts +7 -7
- package/src/{styles → theme}/components/tag.ts +1 -1
- package/src/{styles → theme}/components/toast.ts +6 -8
- package/src/theme/components/toolbar.ts +35 -0
- package/src/{styles → theme}/components/tooltip.ts +4 -6
- package/src/{styles → theme}/components/treegrid.ts +9 -9
- package/src/{styles → theme}/index.ts +2 -2
- package/src/theme/primitives/column.ts +71 -0
- package/src/theme/primitives/index.ts +6 -0
- package/src/theme/primitives/panel.ts +43 -0
- package/src/{styles → theme}/theme.ts +27 -9
- package/src/typings.d.ts +3 -1
- package/src/{styles/fragments → util}/elevation.ts +6 -8
- package/src/util/hash-styles.ts +118 -98
- package/src/util/index.ts +3 -0
- package/src/util/mx.ts +165 -43
- package/src/util/size.ts +103 -0
- package/src/util/valence.ts +33 -0
- package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs +0 -79
- package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs.map +0 -7
- package/dist/plugin/node-cjs/chunk-ZVALPM6U.cjs +0 -1619
- package/dist/plugin/node-cjs/chunk-ZVALPM6U.cjs.map +0 -7
- package/dist/plugin/node-cjs/config/tailwind.cjs +0 -29
- package/dist/plugin/node-cjs/config/tailwind.cjs.map +0 -7
- package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs +0 -90
- package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs.map +0 -7
- package/dist/plugin/node-cjs/plugins/plugin.cjs +0 -124
- package/dist/plugin/node-cjs/plugins/plugin.cjs.map +0 -7
- package/dist/plugin/node-cjs/theme.css +0 -1418
- package/dist/plugin/node-cjs/theme.css.map +0 -7
- package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs +0 -49
- package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs.map +0 -7
- package/dist/plugin/node-esm/chunk-HJE6EZWE.mjs +0 -1614
- package/dist/plugin/node-esm/chunk-HJE6EZWE.mjs.map +0 -7
- package/dist/plugin/node-esm/config/tailwind.mjs +0 -8
- package/dist/plugin/node-esm/config/tailwind.mjs.map +0 -7
- package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs +0 -63
- package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map +0 -7
- package/dist/plugin/node-esm/plugins/plugin.mjs +0 -98
- package/dist/plugin/node-esm/plugins/plugin.mjs.map +0 -7
- package/dist/plugin/node-esm/theme.css +0 -1418
- package/dist/plugin/node-esm/theme.css.map +0 -7
- package/dist/types/src/Tokens.stories.d.ts +0 -10
- package/dist/types/src/Tokens.stories.d.ts.map +0 -1
- package/dist/types/src/config/index.d.ts +0 -3
- package/dist/types/src/config/index.d.ts.map +0 -1
- package/dist/types/src/config/tailwind.d.ts +0 -9
- package/dist/types/src/config/tailwind.d.ts.map +0 -1
- package/dist/types/src/config/tokens/alias-colors.d.ts +0 -21
- package/dist/types/src/config/tokens/alias-colors.d.ts.map +0 -1
- package/dist/types/src/config/tokens/index.d.ts +0 -486
- package/dist/types/src/config/tokens/index.d.ts.map +0 -1
- package/dist/types/src/config/tokens/lengths.d.ts +0 -139
- package/dist/types/src/config/tokens/lengths.d.ts.map +0 -1
- package/dist/types/src/config/tokens/physical-colors.d.ts +0 -23
- package/dist/types/src/config/tokens/physical-colors.d.ts.map +0 -1
- package/dist/types/src/config/tokens/semantic-colors.d.ts +0 -187
- package/dist/types/src/config/tokens/semantic-colors.d.ts.map +0 -1
- package/dist/types/src/config/tokens/sememes-calls.d.ts +0 -3
- package/dist/types/src/config/tokens/sememes-calls.d.ts.map +0 -1
- package/dist/types/src/config/tokens/sememes-codemirror.d.ts +0 -43
- package/dist/types/src/config/tokens/sememes-codemirror.d.ts.map +0 -1
- package/dist/types/src/config/tokens/sememes-hue.d.ts +0 -4
- package/dist/types/src/config/tokens/sememes-hue.d.ts.map +0 -1
- package/dist/types/src/config/tokens/sememes-sheet.d.ts +0 -58
- package/dist/types/src/config/tokens/sememes-sheet.d.ts.map +0 -1
- package/dist/types/src/config/tokens/sememes-system.d.ts +0 -99
- package/dist/types/src/config/tokens/sememes-system.d.ts.map +0 -1
- package/dist/types/src/config/tokens/sizes.d.ts +0 -7
- package/dist/types/src/config/tokens/sizes.d.ts.map +0 -1
- package/dist/types/src/config/tokens/types.d.ts +0 -5
- package/dist/types/src/config/tokens/types.d.ts.map +0 -1
- package/dist/types/src/plugins/esbuild-plugin.d.ts +0 -9
- package/dist/types/src/plugins/esbuild-plugin.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin.d.ts +0 -20
- package/dist/types/src/plugins/plugin.d.ts.map +0 -1
- package/dist/types/src/plugins/resolveContent.d.ts +0 -2
- package/dist/types/src/plugins/resolveContent.d.ts.map +0 -1
- package/dist/types/src/styles/components/anchored-overflow.d.ts +0 -6
- package/dist/types/src/styles/components/anchored-overflow.d.ts.map +0 -1
- package/dist/types/src/styles/components/avatar.d.ts.map +0 -1
- package/dist/types/src/styles/components/breadcrumb.d.ts.map +0 -1
- package/dist/types/src/styles/components/button.d.ts +0 -19
- package/dist/types/src/styles/components/button.d.ts.map +0 -1
- package/dist/types/src/styles/components/dialog.d.ts.map +0 -1
- package/dist/types/src/styles/components/icon-button.d.ts.map +0 -1
- package/dist/types/src/styles/components/icon.d.ts.map +0 -1
- package/dist/types/src/styles/components/index.d.ts.map +0 -1
- package/dist/types/src/styles/components/input.d.ts.map +0 -1
- package/dist/types/src/styles/components/link.d.ts.map +0 -1
- package/dist/types/src/styles/components/list.d.ts.map +0 -1
- package/dist/types/src/styles/components/main.d.ts.map +0 -1
- package/dist/types/src/styles/components/menu.d.ts.map +0 -1
- package/dist/types/src/styles/components/message.d.ts.map +0 -1
- package/dist/types/src/styles/components/popover.d.ts.map +0 -1
- package/dist/types/src/styles/components/scroll-area.d.ts +0 -9
- package/dist/types/src/styles/components/scroll-area.d.ts.map +0 -1
- package/dist/types/src/styles/components/select.d.ts.map +0 -1
- package/dist/types/src/styles/components/separator.d.ts.map +0 -1
- package/dist/types/src/styles/components/status.d.ts.map +0 -1
- package/dist/types/src/styles/components/tag.d.ts.map +0 -1
- package/dist/types/src/styles/components/toast.d.ts.map +0 -1
- package/dist/types/src/styles/components/toolbar.d.ts +0 -11
- package/dist/types/src/styles/components/toolbar.d.ts.map +0 -1
- package/dist/types/src/styles/components/tooltip.d.ts.map +0 -1
- package/dist/types/src/styles/components/treegrid.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/density.d.ts +0 -13
- package/dist/types/src/styles/fragments/density.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/dimension.d.ts +0 -5
- package/dist/types/src/styles/fragments/dimension.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/disabled.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/elevation.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/focus.d.ts +0 -6
- package/dist/types/src/styles/fragments/focus.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/group.d.ts +0 -5
- package/dist/types/src/styles/fragments/group.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/hover.d.ts +0 -17
- package/dist/types/src/styles/fragments/hover.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/index.d.ts +0 -17
- package/dist/types/src/styles/fragments/index.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/layout.d.ts +0 -3
- package/dist/types/src/styles/fragments/layout.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/motion.d.ts +0 -2
- package/dist/types/src/styles/fragments/motion.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/ornament.d.ts +0 -5
- package/dist/types/src/styles/fragments/ornament.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/selected.d.ts +0 -13
- package/dist/types/src/styles/fragments/selected.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/shimmer.d.ts +0 -3
- package/dist/types/src/styles/fragments/shimmer.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/size.d.ts +0 -9
- package/dist/types/src/styles/fragments/size.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/surface.d.ts +0 -9
- package/dist/types/src/styles/fragments/surface.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/text.d.ts +0 -7
- package/dist/types/src/styles/fragments/text.d.ts.map +0 -1
- package/dist/types/src/styles/fragments/valence.d.ts +0 -13
- package/dist/types/src/styles/fragments/valence.d.ts.map +0 -1
- package/dist/types/src/styles/index.d.ts +0 -4
- package/dist/types/src/styles/index.d.ts.map +0 -1
- package/dist/types/src/styles/theme.d.ts +0 -5
- package/dist/types/src/styles/theme.d.ts.map +0 -1
- package/dist/types/src/tailwind.d.ts +0 -3
- package/dist/types/src/tailwind.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -3
- package/dist/types/src/types.d.ts.map +0 -1
- package/dist/types/src/util/withLogical.d.ts +0 -164
- package/dist/types/src/util/withLogical.d.ts.map +0 -1
- package/src/Tokens.stories.tsx +0 -88
- package/src/config/index.ts +0 -6
- package/src/config/tailwind.ts +0 -264
- package/src/config/tokens/alias-colors.ts +0 -39
- package/src/config/tokens/index.ts +0 -92
- package/src/config/tokens/lengths.ts +0 -97
- package/src/config/tokens/physical-colors.ts +0 -125
- package/src/config/tokens/semantic-colors.ts +0 -27
- package/src/config/tokens/sememes-calls.ts +0 -17
- package/src/config/tokens/sememes-codemirror.ts +0 -50
- package/src/config/tokens/sememes-hue.ts +0 -54
- package/src/config/tokens/sememes-sheet.ts +0 -62
- package/src/config/tokens/sememes-system.ts +0 -302
- package/src/config/tokens/sizes.ts +0 -10
- package/src/config/tokens/types.ts +0 -9
- package/src/docs/theme.drawio.svg +0 -635
- package/src/plugins/esbuild-plugin.ts +0 -65
- package/src/plugins/plugin.ts +0 -130
- package/src/plugins/resolveContent.ts +0 -51
- package/src/styles/components/README.md +0 -6
- package/src/styles/components/anchored-overflow.ts +0 -20
- package/src/styles/components/button.ts +0 -48
- package/src/styles/components/icon.ts +0 -19
- package/src/styles/components/input.ts +0 -177
- package/src/styles/components/scroll-area.ts +0 -43
- package/src/styles/components/toolbar.ts +0 -29
- package/src/styles/fragments/density.ts +0 -17
- package/src/styles/fragments/dimension.ts +0 -8
- package/src/styles/fragments/focus.ts +0 -16
- package/src/styles/fragments/group.ts +0 -12
- package/src/styles/fragments/hover.ts +0 -25
- package/src/styles/fragments/index.ts +0 -20
- package/src/styles/fragments/layout.ts +0 -7
- package/src/styles/fragments/motion.ts +0 -6
- package/src/styles/fragments/ornament.ts +0 -10
- package/src/styles/fragments/selected.ts +0 -45
- package/src/styles/fragments/shimmer.ts +0 -9
- package/src/styles/fragments/size.ts +0 -117
- package/src/styles/fragments/surface.ts +0 -29
- package/src/styles/fragments/text.ts +0 -12
- package/src/styles/fragments/valence.ts +0 -46
- package/src/styles/layers/README.md +0 -15
- package/src/styles/layers/anchored-overflow.css +0 -9
- package/src/styles/layers/animation.css +0 -17
- package/src/styles/layers/attention.css +0 -8
- package/src/styles/layers/base.css +0 -25
- package/src/styles/layers/can-scroll.css +0 -26
- package/src/styles/layers/drag-preview.css +0 -18
- package/src/styles/layers/hues.css +0 -110
- package/src/styles/layers/index.css +0 -26
- package/src/styles/layers/main.css +0 -227
- package/src/styles/layers/positioning.css +0 -23
- package/src/styles/layers/surfaces.css +0 -31
- package/src/styles/layers/tag.css +0 -132
- package/src/styles/layers/tldraw.css +0 -91
- package/src/styles/layers/tokens.css +0 -46
- package/src/tailwind.ts +0 -7
- package/src/theme.css +0 -9
- package/src/types.ts +0 -7
- package/src/util/withLogical.ts +0 -114
- /package/dist/types/src/{styles/fragments → fragments}/disabled.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/avatar.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/breadcrumb.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/icon-button.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/link.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/list.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/select.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/separator.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/tag.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/toast.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/tooltip.d.ts +0 -0
- /package/dist/types/src/{styles → theme}/components/treegrid.d.ts +0 -0
- /package/src/{styles/fragments → fragments}/disabled.ts +0 -0
- /package/src/{styles → theme}/components/breadcrumb.ts +0 -0
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ComponentFunction, type Elevation, type MessageValence, type Theme } from '@dxos/ui-types';
|
|
6
6
|
|
|
7
|
-
import { mx } from '../../util';
|
|
8
|
-
import { messageValence } from '../fragments';
|
|
7
|
+
import { mx, messageValence } from '../../util';
|
|
9
8
|
|
|
10
9
|
export type MessageStyleProps = {
|
|
11
10
|
valence?: MessageValence;
|
|
@@ -13,24 +12,29 @@ export type MessageStyleProps = {
|
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
export const messageRoot: ComponentFunction<MessageStyleProps> = ({ valence }, etc) => {
|
|
16
|
-
return mx('p-
|
|
15
|
+
return mx('grid grid-cols-[min-content_1fr] gap-x-2 p-trim-sm rounded-sm', messageValence(valence), etc);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const messageHeader: ComponentFunction<MessageStyleProps> = (_, etc) => {
|
|
19
|
+
return mx('col-span-2 grid grid-cols-subgrid items-center', etc);
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
export const messageTitle: ComponentFunction<MessageStyleProps> = (_, etc) => {
|
|
20
|
-
return mx('
|
|
23
|
+
return mx('col-start-2 gap-trim-sm [&>svg]:inline-block', etc);
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
export const messageIcon: ComponentFunction<MessageStyleProps> = (_, etc) => {
|
|
24
|
-
return mx('
|
|
27
|
+
return mx('col-start-1', etc);
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
export const messageContent: ComponentFunction<MessageStyleProps> = (_, etc) => {
|
|
28
|
-
return mx('first:font-medium', etc);
|
|
31
|
+
return mx('grid grid-cols-subgrid col-start-2 first:font-medium', etc);
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
export const messageTheme: Theme<MessageStyleProps> = {
|
|
32
35
|
root: messageRoot,
|
|
33
|
-
|
|
36
|
+
header: messageHeader,
|
|
34
37
|
icon: messageIcon,
|
|
35
38
|
title: messageTitle,
|
|
39
|
+
content: messageContent,
|
|
36
40
|
};
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ComponentFunction, type Elevation, type Theme } from '@dxos/ui-types';
|
|
6
6
|
|
|
7
|
-
import { mx } from '../../util';
|
|
8
|
-
import { focusRing, modalSurface, surfaceShadow, surfaceZIndex } from '../fragments';
|
|
7
|
+
import { mx, surfaceShadow, surfaceZIndex } from '../../util';
|
|
9
8
|
|
|
10
9
|
export type PopoverStyleProps = Partial<{
|
|
11
10
|
constrainBlock: boolean;
|
|
@@ -13,21 +12,23 @@ export type PopoverStyleProps = Partial<{
|
|
|
13
12
|
elevation: Elevation;
|
|
14
13
|
}>;
|
|
15
14
|
|
|
16
|
-
export const
|
|
15
|
+
export const popoverContent: ComponentFunction<PopoverStyleProps> = ({ elevation }, ...etc) =>
|
|
17
16
|
mx(
|
|
18
|
-
'rounded-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
'dx-modal-surface border border-separator rounded-sm',
|
|
18
|
+
surfaceShadow({ elevation: 'positioned' }),
|
|
19
|
+
surfaceZIndex({ elevation, level: 'menu' }),
|
|
20
|
+
'dx-focus-ring',
|
|
21
21
|
...etc,
|
|
22
22
|
);
|
|
23
23
|
|
|
24
|
-
export const
|
|
24
|
+
export const popoverViewport: ComponentFunction<PopoverStyleProps> = ({ constrainBlock, constrainInline }, ...etc) =>
|
|
25
25
|
mx(
|
|
26
|
-
'
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
'grid grid-rows-[1fr] min-h-0 min-w-popover-min-width',
|
|
27
|
+
(constrainBlock || constrainInline) && 'overflow-hidden',
|
|
28
|
+
constrainBlock && 'max-h-(--radix-popover-content-available-height)',
|
|
29
|
+
constrainBlock &&
|
|
30
|
+
'max-h-[min(var(--radix-popover-content-available-height),calc(100dvh-var(--spacing-screen-border)*2))]',
|
|
31
|
+
constrainInline && 'max-w-(--radix-popover-content-available-width)',
|
|
31
32
|
...etc,
|
|
32
33
|
);
|
|
33
34
|
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type AllowedAxis, type ComponentFunction, type Theme } from '@dxos/ui-types';
|
|
6
|
+
|
|
7
|
+
import { mx } from '../../util';
|
|
8
|
+
import { withColumn } from '../primitives/column';
|
|
9
|
+
|
|
10
|
+
export const scrollbar = {
|
|
11
|
+
thin: {
|
|
12
|
+
size: 4,
|
|
13
|
+
padding: 4,
|
|
14
|
+
},
|
|
15
|
+
coarse: {
|
|
16
|
+
size: 8,
|
|
17
|
+
padding: 8,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type ScrollAreaStyleProps = {
|
|
22
|
+
orientation?: AllowedAxis;
|
|
23
|
+
autoHide?: boolean;
|
|
24
|
+
/** Balance left/right, top/bottom offset with scrollbar. */
|
|
25
|
+
centered?: boolean;
|
|
26
|
+
/** Add default padding. */
|
|
27
|
+
/** TODO(burdon): Integrate with Column.Root padding. */
|
|
28
|
+
padding?: boolean;
|
|
29
|
+
/** Use thin scrollbars. */
|
|
30
|
+
/** TODO(burdon): Density fine/course. */
|
|
31
|
+
thin?: boolean;
|
|
32
|
+
/** Enable snap scrolling. */
|
|
33
|
+
snap?: boolean;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const scrollAreaRoot: ComponentFunction<ScrollAreaStyleProps> = ({ orientation }, ...etc) =>
|
|
37
|
+
mx(
|
|
38
|
+
// Expand
|
|
39
|
+
'dx-container',
|
|
40
|
+
|
|
41
|
+
orientation === 'vertical' && 'group/scroll-v flex flex-col',
|
|
42
|
+
orientation === 'horizontal' && 'group/scroll-h flex',
|
|
43
|
+
orientation === 'all' && 'group/scroll-all',
|
|
44
|
+
|
|
45
|
+
// Apply col-span-full only when inside a Column.Root grid (detected via dx-column-root marker).
|
|
46
|
+
'[.dx-column-root_&]:col-span-full',
|
|
47
|
+
|
|
48
|
+
...etc,
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* NOTE: The browser reserves space for scrollbars.
|
|
53
|
+
*/
|
|
54
|
+
export const scrollAreaViewport: ComponentFunction<ScrollAreaStyleProps> = (
|
|
55
|
+
{ orientation, centered, padding, snap, autoHide },
|
|
56
|
+
...etc
|
|
57
|
+
) => {
|
|
58
|
+
return mx(
|
|
59
|
+
'flex-1 min-h-0 w-full',
|
|
60
|
+
|
|
61
|
+
// Reset --dx-col so nested components don't try to grid-position themselves.
|
|
62
|
+
// ScrollArea has already consumed --gutter for padding.
|
|
63
|
+
withColumn.consumed(),
|
|
64
|
+
|
|
65
|
+
orientation === 'vertical' && 'overflow-y-scroll',
|
|
66
|
+
orientation === 'horizontal' && 'flex overflow-x-scroll overscroll-x-contain',
|
|
67
|
+
orientation === 'all' && 'overflow-scroll',
|
|
68
|
+
|
|
69
|
+
'[&::-webkit-scrollbar-corner]:bg-transparent',
|
|
70
|
+
'[&::-webkit-scrollbar-track]:bg-transparent',
|
|
71
|
+
'[&::-webkit-scrollbar-thumb]:rounded-none',
|
|
72
|
+
|
|
73
|
+
'[&::-webkit-scrollbar]:w-[var(--scroll-width)] [&::-webkit-scrollbar]:h-[var(--scroll-width)]',
|
|
74
|
+
|
|
75
|
+
// If contained within Column.Root grid the gutter is set by that component (--gutter CSS variable).
|
|
76
|
+
// If centered, left padding compensates for scrollbar width so content is visually centered.
|
|
77
|
+
(orientation === 'vertical' || orientation === 'all') &&
|
|
78
|
+
(padding
|
|
79
|
+
? [
|
|
80
|
+
centered ? 'pl-[var(--gutter,calc(var(--scroll-width)+var(--scroll-padding)))]' : 'pl-[var(--gutter,0)]',
|
|
81
|
+
'pr-[calc(var(--gutter,calc(var(--scroll-width)+var(--scroll-padding)))-var(--scroll-width))]',
|
|
82
|
+
]
|
|
83
|
+
: centered && 'pl-[var(--scroll-width)]'),
|
|
84
|
+
|
|
85
|
+
(orientation === 'horizontal' || orientation === 'all') &&
|
|
86
|
+
(padding
|
|
87
|
+
? [centered && 'pt-[calc(var(--scroll-width)+var(--scroll-padding))]', 'pb-[var(--scroll-padding)]']
|
|
88
|
+
: centered && 'pt-[var(--scroll-width)]'),
|
|
89
|
+
|
|
90
|
+
snap && [
|
|
91
|
+
orientation === 'vertical' && 'snap-y snap-mandatory',
|
|
92
|
+
orientation === 'horizontal' && 'snap-x snap-mandatory',
|
|
93
|
+
orientation === 'all' && 'snap-both snap-mandatory',
|
|
94
|
+
],
|
|
95
|
+
|
|
96
|
+
autoHide
|
|
97
|
+
? [
|
|
98
|
+
orientation === 'vertical' && 'group-hover/scroll-v:[&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb',
|
|
99
|
+
orientation === 'horizontal' && 'group-hover/scroll-h:[&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb',
|
|
100
|
+
orientation === 'all' && 'group-hover/scroll-all:[&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb',
|
|
101
|
+
]
|
|
102
|
+
: [
|
|
103
|
+
orientation === 'vertical' && '[&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb',
|
|
104
|
+
orientation === 'horizontal' && '[&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb',
|
|
105
|
+
orientation === 'all' && '[&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb',
|
|
106
|
+
],
|
|
107
|
+
|
|
108
|
+
...etc,
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const scrollAreaTheme: Theme<ScrollAreaStyleProps> = {
|
|
113
|
+
root: scrollAreaRoot,
|
|
114
|
+
viewport: scrollAreaViewport,
|
|
115
|
+
};
|
|
@@ -4,15 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ComponentFunction, type Elevation, type Theme } from '@dxos/ui-types';
|
|
6
6
|
|
|
7
|
-
import { mx } from '../../util';
|
|
8
|
-
import {
|
|
9
|
-
blockSeparator,
|
|
10
|
-
ghostHighlighted,
|
|
11
|
-
modalSurface,
|
|
12
|
-
separatorBorderColor,
|
|
13
|
-
surfaceShadow,
|
|
14
|
-
surfaceZIndex,
|
|
15
|
-
} from '../fragments';
|
|
7
|
+
import { mx, surfaceShadow, surfaceZIndex } from '../../util';
|
|
16
8
|
|
|
17
9
|
export type SelectStyleProps = Partial<{
|
|
18
10
|
elevation: Elevation;
|
|
@@ -20,8 +12,8 @@ export type SelectStyleProps = Partial<{
|
|
|
20
12
|
|
|
21
13
|
export const selectContent: ComponentFunction<SelectStyleProps> = ({ elevation }, ...etc) => {
|
|
22
14
|
return mx(
|
|
23
|
-
'
|
|
24
|
-
|
|
15
|
+
'dx-modal-surface rounded-sm border border-separator',
|
|
16
|
+
'min-w-(--radix-select-trigger-width) max-h-(--radix-select-content-available-height)',
|
|
25
17
|
surfaceShadow({ elevation: 'positioned' }),
|
|
26
18
|
surfaceZIndex({ elevation, level: 'menu' }),
|
|
27
19
|
...etc,
|
|
@@ -32,10 +24,10 @@ export const selectViewport: ComponentFunction<SelectStyleProps> = (_props, ...e
|
|
|
32
24
|
|
|
33
25
|
export const selectItem: ComponentFunction<SelectStyleProps> = (_props, ...etc) =>
|
|
34
26
|
mx(
|
|
35
|
-
'flex items-center min-
|
|
36
|
-
'text-
|
|
27
|
+
'flex items-center min-h-[2rem] px-3 py-1 gap-2',
|
|
28
|
+
'text-base-surface-text leading-none select-none outline-hidden',
|
|
37
29
|
'[&>svg]:invisible [&[data-state=checked]>svg]:visible',
|
|
38
|
-
|
|
30
|
+
'dx-highlighted',
|
|
39
31
|
...etc,
|
|
40
32
|
);
|
|
41
33
|
|
|
@@ -44,10 +36,10 @@ export const selectItemIndicator: ComponentFunction<SelectStyleProps> = (_props,
|
|
|
44
36
|
export const selectArrow: ComponentFunction<SelectStyleProps> = (_props, ...etc) => mx('fill-separator', ...etc);
|
|
45
37
|
|
|
46
38
|
export const selectSeparator: ComponentFunction<SelectStyleProps> = (_props, ...etc) =>
|
|
47
|
-
mx(
|
|
39
|
+
mx('self-stretch border-b my-1 border-separator', ...etc);
|
|
48
40
|
|
|
49
41
|
export const selectScrollButton: ComponentFunction<SelectStyleProps> = (_props, ...etc) =>
|
|
50
|
-
mx(
|
|
42
|
+
mx('dx-modal-surface flex items-center justify-center cursor-default h-6 w-full', ...etc);
|
|
51
43
|
|
|
52
44
|
export const selectTheme: Theme<SelectStyleProps> = {
|
|
53
45
|
content: selectContent,
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { type ComponentFunction, type Theme } from '@dxos/ui-types';
|
|
6
6
|
|
|
7
7
|
import { mx } from '../../util';
|
|
8
|
-
import { blockSeparator, inlineSeparator, separatorBorderColor, subduedSeparatorBorderColor } from '../fragments';
|
|
9
8
|
|
|
10
9
|
export type SeparatorStyleProps = {
|
|
11
10
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -14,8 +13,9 @@ export type SeparatorStyleProps = {
|
|
|
14
13
|
|
|
15
14
|
export const separatorRoot: ComponentFunction<SeparatorStyleProps> = ({ orientation, subdued }, ...etc) =>
|
|
16
15
|
mx(
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
'self-stretch',
|
|
17
|
+
orientation === 'vertical' ? 'border-e mx-1' : 'border-b my-1',
|
|
18
|
+
subdued ? 'border-subdued-separator' : 'border-separator',
|
|
19
19
|
...etc,
|
|
20
20
|
);
|
|
21
21
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type { ComponentFunction, Theme } from '@dxos/ui-types';
|
|
6
|
+
|
|
7
|
+
import { mx } from '../../util';
|
|
8
|
+
|
|
9
|
+
export type SkeletonStyleProps = {
|
|
10
|
+
variant?: 'default' | 'circle' | 'text';
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const skeletonRoot: ComponentFunction<SkeletonStyleProps> = ({ variant = 'default' }, ...etc) =>
|
|
14
|
+
mx(
|
|
15
|
+
'animate-pulse bg-neutral-300 dark:bg-neutral-700 rounded-md',
|
|
16
|
+
variant === 'circle' && 'rounded-full',
|
|
17
|
+
variant === 'text' && 'rounded-sm',
|
|
18
|
+
...etc,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export const skeletonTheme: Theme<SkeletonStyleProps> = {
|
|
22
|
+
root: skeletonRoot,
|
|
23
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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 SplitterStyleProps = {};
|
|
10
|
+
|
|
11
|
+
const splitterRoot: ComponentFunction<SplitterStyleProps> = (_props, ...etc) =>
|
|
12
|
+
mx('relative h-full overflow-hidden', ...etc);
|
|
13
|
+
|
|
14
|
+
const splitterPanel: ComponentFunction<SplitterStyleProps> = (_props, ...etc) =>
|
|
15
|
+
mx('absolute inset-x-0 flex flex-col overflow-hidden', ...etc);
|
|
16
|
+
|
|
17
|
+
export const splitterTheme: Theme<SplitterStyleProps> = {
|
|
18
|
+
root: splitterRoot,
|
|
19
|
+
panel: splitterPanel,
|
|
20
|
+
};
|
|
@@ -7,22 +7,22 @@ import type { ComponentFunction, Theme } from '@dxos/ui-types';
|
|
|
7
7
|
import { mx } from '../../util';
|
|
8
8
|
|
|
9
9
|
export type StatusStyleProps = {
|
|
10
|
-
indeterminate?: boolean;
|
|
11
10
|
variant?: 'default' | 'main-bottom';
|
|
11
|
+
indeterminate?: boolean;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const statusRoot: ComponentFunction<StatusStyleProps> = ({ variant = 'default' }, ...etc) =>
|
|
15
15
|
mx(
|
|
16
|
-
'
|
|
17
|
-
variant === 'main-bottom' ? '
|
|
16
|
+
'h-1 relative rounded-full overflow-hidden',
|
|
17
|
+
variant === 'main-bottom' ? 'w-full block' : 'inline-20 inline-block bg-base-surface',
|
|
18
18
|
...etc,
|
|
19
19
|
);
|
|
20
20
|
|
|
21
|
-
export const statusBar: ComponentFunction<StatusStyleProps> = ({
|
|
21
|
+
export const statusBar: ComponentFunction<StatusStyleProps> = ({ variant = 'default', indeterminate }, ...etc) =>
|
|
22
22
|
mx(
|
|
23
|
-
'absolute inset-
|
|
24
|
-
variant === 'main-bottom' ? 'bg-
|
|
25
|
-
indeterminate ? 'animate-progress-indeterminate' : '
|
|
23
|
+
'absolute inset-y-0 block rounded-full',
|
|
24
|
+
variant === 'main-bottom' ? 'bg-composer-300' : 'bg-un-accent',
|
|
25
|
+
indeterminate ? 'animate-progress-indeterminate' : 'start-0',
|
|
26
26
|
...etc,
|
|
27
27
|
);
|
|
28
28
|
|
|
@@ -16,7 +16,7 @@ export type TagStyleProps = {
|
|
|
16
16
|
palette?: ChromaticPalette | NeutralPalette | MessageValence;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const tagRoot: ComponentFunction<TagStyleProps> = (
|
|
19
|
+
export const tagRoot: ComponentFunction<TagStyleProps> = (_, ...etc) => mx('dx-tag', ...etc);
|
|
20
20
|
|
|
21
21
|
export const tagTheme: Theme<TagStyleProps> = {
|
|
22
22
|
root: tagRoot,
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ComponentFunction, type Theme } from '@dxos/ui-types';
|
|
6
6
|
|
|
7
|
-
import { mx } from '../../util';
|
|
8
|
-
import { descriptionText, focusRing, modalSurface, surfaceShadow } from '../fragments';
|
|
7
|
+
import { mx, surfaceShadow } from '../../util';
|
|
9
8
|
|
|
10
9
|
export type ToastStyleProps = Partial<{
|
|
11
10
|
srOnly: boolean;
|
|
@@ -14,27 +13,26 @@ export type ToastStyleProps = Partial<{
|
|
|
14
13
|
export const toastViewport: ComponentFunction<ToastStyleProps> = (_props, ...etc) =>
|
|
15
14
|
mx(
|
|
16
15
|
// TODO(burdon): block-end should take into account status bar.
|
|
17
|
-
'z-40 fixed
|
|
16
|
+
'z-40 fixed bottom-[calc(env(safe-area-inset-bottom)+1rem)] inset-start-[calc(env(safe-area-inset-left)+1rem)] inset-end-[calc(env(safe-area-inset-right)+1rem)] w-auto md:end-[calc(env(safe-area-inset-right)+1rem)] md:left-auto md:w-full md:max-w-sm',
|
|
18
17
|
'rounded-md flex flex-col gap-2',
|
|
19
18
|
...etc,
|
|
20
19
|
);
|
|
21
20
|
|
|
22
21
|
export const toastRoot: ComponentFunction<ToastStyleProps> = (_props, ...etc) =>
|
|
23
22
|
mx(
|
|
24
|
-
'rounded-md flex p-2 gap-2',
|
|
25
|
-
modalSurface,
|
|
23
|
+
'dx-modal-surface rounded-md flex p-2 gap-2',
|
|
26
24
|
surfaceShadow({ elevation: 'toast' }),
|
|
27
25
|
'radix-state-open:animate-toast-slide-in-bottom md:radix-state-open:animate-toast-slide-in-right',
|
|
28
26
|
'radix-state-closed:animate-toast-hide',
|
|
29
27
|
'radix-swipe-end:animate-toast-swipe-out',
|
|
30
28
|
'translate-x-radix-toast-swipe-move-x',
|
|
31
29
|
'radix-swipe-cancel:translate-x-0 radix-swipe-cancel:duration-200 radix-swipe-cancel:ease-[ease]',
|
|
32
|
-
|
|
30
|
+
'dx-focus-ring',
|
|
33
31
|
...etc,
|
|
34
32
|
);
|
|
35
33
|
|
|
36
34
|
export const toastBody: ComponentFunction<ToastStyleProps> = (_props, ...etc) =>
|
|
37
|
-
mx('grow flex flex-col gap-1 justify-center
|
|
35
|
+
mx('grow flex flex-col gap-1 justify-center pl-2', ...etc);
|
|
38
36
|
|
|
39
37
|
export const toastActions: ComponentFunction<ToastStyleProps> = (_props, ...etc) =>
|
|
40
38
|
mx('shrink-0 flex flex-col gap-1 justify-center', ...etc);
|
|
@@ -43,7 +41,7 @@ export const toastTitle: ComponentFunction<ToastStyleProps> = ({ srOnly }, ...et
|
|
|
43
41
|
mx('shrink-0 font-medium', srOnly && 'sr-only', ...etc);
|
|
44
42
|
|
|
45
43
|
export const toastDescription: ComponentFunction<ToastStyleProps> = ({ srOnly }, ...etc) =>
|
|
46
|
-
mx(
|
|
44
|
+
mx('text-description', 'shrink-0', srOnly && 'sr-only', ...etc);
|
|
47
45
|
|
|
48
46
|
export const toastTheme: Theme<ToastStyleProps> = {
|
|
49
47
|
viewport: toastViewport,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 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 ToolbarStyleProps = Partial<{
|
|
10
|
+
density: Density;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
layoutManaged: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
|
|
15
|
+
export const toolbarLayout =
|
|
16
|
+
'w-full shrink-0 flex flex-nowrap p-1 gap-1 items-center overflow-x-auto scrollbar-none dx-contain-layout';
|
|
17
|
+
|
|
18
|
+
export const toolbarRoot: ComponentFunction<ToolbarStyleProps> = ({ density, disabled, layoutManaged }, ...etc) => {
|
|
19
|
+
return mx(
|
|
20
|
+
'bg-toolbar-surface dx-toolbar',
|
|
21
|
+
density === 'coarse' && 'h-(--dx-rail-size) px-3!',
|
|
22
|
+
disabled && '*:opacity-20',
|
|
23
|
+
!layoutManaged && toolbarLayout,
|
|
24
|
+
...etc,
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const toolbarText: ComponentFunction<ToolbarStyleProps> = (_, ...etc) => {
|
|
29
|
+
return mx('px-2 grow truncate items-center', ...etc);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const toolbarTheme: Theme<ToolbarStyleProps> = {
|
|
33
|
+
root: toolbarRoot,
|
|
34
|
+
text: toolbarText,
|
|
35
|
+
};
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ComponentFunction, type Elevation, type Theme } from '@dxos/ui-types';
|
|
6
6
|
|
|
7
|
-
import { mx } from '../../util';
|
|
8
|
-
import { chromeText, popperMotion, surfaceShadow, surfaceZIndex } from '../fragments';
|
|
7
|
+
import { mx, surfaceShadow, surfaceZIndex } from '../../util';
|
|
9
8
|
|
|
10
9
|
export type TooltipStyleProps = Partial<{
|
|
11
10
|
elevation: Elevation;
|
|
@@ -13,15 +12,14 @@ export type TooltipStyleProps = Partial<{
|
|
|
13
12
|
|
|
14
13
|
export const tooltipContent: ComponentFunction<TooltipStyleProps> = ({ elevation }, ...etc) =>
|
|
15
14
|
mx(
|
|
16
|
-
'inline-flex items-center
|
|
17
|
-
popperMotion,
|
|
15
|
+
'inline-flex items-center p-1 max-w-64 text-sm bg-inverse-surface text-inverse-surface-text rounded-sm',
|
|
18
16
|
surfaceShadow({ elevation: 'positioned' }),
|
|
19
17
|
surfaceZIndex({ elevation, level: 'tooltip' }),
|
|
20
|
-
chromeText,
|
|
21
18
|
...etc,
|
|
22
19
|
);
|
|
23
20
|
|
|
24
|
-
export const tooltipArrow: ComponentFunction<TooltipStyleProps> = (_props, ...etc) =>
|
|
21
|
+
export const tooltipArrow: ComponentFunction<TooltipStyleProps> = (_props, ...etc) =>
|
|
22
|
+
mx('fill-inverse-surface', ...etc);
|
|
25
23
|
|
|
26
24
|
export const tooltipTheme: Theme<TooltipStyleProps> = {
|
|
27
25
|
content: tooltipContent,
|
|
@@ -12,20 +12,20 @@ export type TreegridStyleProps = Partial<{
|
|
|
12
12
|
}>;
|
|
13
13
|
|
|
14
14
|
const levelStyles = new Map<number, string>([
|
|
15
|
-
[1, '[&>.indent:first-of-type]:
|
|
16
|
-
[2, '[&>.indent:first-of-type]:
|
|
17
|
-
[3, '[&>.indent:first-of-type]:
|
|
18
|
-
[4, '[&>.indent:first-of-type]:
|
|
19
|
-
[5, '[&>.indent:first-of-type]:
|
|
20
|
-
[6, '[&>.indent:first-of-type]:
|
|
21
|
-
[7, '[&>.indent:first-of-type]:
|
|
22
|
-
[8, '[&>.indent:first-of-type]:
|
|
15
|
+
[1, '[&>.indent:first-of-type]:pl-0 font-medium'],
|
|
16
|
+
[2, '[&>.indent:first-of-type]:pl-0'],
|
|
17
|
+
[3, '[&>.indent:first-of-type]:pl-1'],
|
|
18
|
+
[4, '[&>.indent:first-of-type]:pl-2'],
|
|
19
|
+
[5, '[&>.indent:first-of-type]:pl-3'],
|
|
20
|
+
[6, '[&>.indent:first-of-type]:pl-4'],
|
|
21
|
+
[7, '[&>.indent:first-of-type]:pl-5'],
|
|
22
|
+
[8, '[&>.indent:first-of-type]:pl-6'],
|
|
23
23
|
]);
|
|
24
24
|
|
|
25
25
|
export const treegridRoot: ComponentFunction<TreegridStyleProps> = (_, ...etc) => mx('grid', ...etc);
|
|
26
26
|
|
|
27
27
|
export const treegridRow: ComponentFunction<TreegridStyleProps> = ({ level = 1 }, ...etc) =>
|
|
28
|
-
mx(
|
|
28
|
+
mx(levelStyles.get(Math.min(Math.max(Math.round(level), 1), 8)), ...etc);
|
|
29
29
|
|
|
30
30
|
export const treegridCell: ComponentFunction<TreegridStyleProps> = ({ indent }, ...etc) =>
|
|
31
31
|
mx(indent && 'indent', ...etc);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentFunction } from '@dxos/ui-types';
|
|
6
|
+
|
|
7
|
+
import { mx } from '../../util';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Column-aware theme utilities.
|
|
11
|
+
* Components apply these in their theme functions to participate in the Column grid
|
|
12
|
+
* without importing Column React components.
|
|
13
|
+
*
|
|
14
|
+
* CSS custom property cascade:
|
|
15
|
+
* - Column.Root sets `--dx-col: 2 / span 1` (center column placement).
|
|
16
|
+
* - ScrollArea.Viewport resets `--dx-col: auto` after consuming `--gutter`.
|
|
17
|
+
* - Components apply `grid-column: var(--dx-col, auto)` to auto-center in Column
|
|
18
|
+
* or do nothing outside Column / inside ScrollArea.
|
|
19
|
+
*/
|
|
20
|
+
export const withColumn = {
|
|
21
|
+
/** Centers element in the Column grid via --dx-col. No-op outside Column or inside ScrollArea. */
|
|
22
|
+
center: () => '[grid-column:var(--dx-col,auto)]',
|
|
23
|
+
|
|
24
|
+
/** Propagates the Column grid to children via subgrid. No-op outside Column.
|
|
25
|
+
* Direct children default to center column unless they are a dx-container (ScrollArea). */
|
|
26
|
+
propagate: () =>
|
|
27
|
+
'[.dx-column-root_&]:col-span-full [.dx-column-root_&]:grid [.dx-column-root_&]:grid-cols-subgrid [.dx-column-root_&]:[&>*:not(.dx-container)]:[grid-column:var(--dx-col,auto)]',
|
|
28
|
+
|
|
29
|
+
/** Resets --dx-col after consuming --gutter. Applied by ScrollArea.Viewport. */
|
|
30
|
+
consumed: () => '[--dx-col:auto]',
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type ColumnStyleProps = {};
|
|
34
|
+
|
|
35
|
+
const columnRoot: ComponentFunction<ColumnStyleProps> = (_, ...etc) => {
|
|
36
|
+
return mx('dx-column-root grid', ...etc);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Three-column icon-slot row: spans all 3 columns of the parent Column.Root grid.
|
|
41
|
+
* Uses CSS subgrid to inherit column sizing from the parent Column.
|
|
42
|
+
* Children map to: [col-1: icon/slot] [col-2: content] [col-3: icon/action].
|
|
43
|
+
* NOTE: Must not use overflow-hidden here since it will clip input focus rings.
|
|
44
|
+
*/
|
|
45
|
+
const columnRow: ComponentFunction<ColumnStyleProps> = (_, ...etc) => {
|
|
46
|
+
return mx('col-span-3 grid grid-cols-subgrid', ...etc);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Bleed placement: spans all 3 columns of the parent Column.Root grid (gutter-to-gutter).
|
|
51
|
+
* Use for `ScrollArea`, full-width dividers, tables, or any content that should ignore gutters.
|
|
52
|
+
*/
|
|
53
|
+
const columnBleed: ComponentFunction<ColumnStyleProps> = (_, ...etc) => {
|
|
54
|
+
return mx('col-span-full grid grid-cols-subgrid min-h-0', ...etc);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Center placement: places the element in column 2 (the central track between gutters) of the
|
|
59
|
+
* parent Column.Root grid. Does NOT use subgrid — placement is explicit on this element only.
|
|
60
|
+
* Safe to nest arbitrary compound components (including those that render `display: contents`).
|
|
61
|
+
*/
|
|
62
|
+
const columnCenter: ComponentFunction<ColumnStyleProps> = (_, ...etc) => {
|
|
63
|
+
return mx(withColumn.center(), 'min-h-0', ...etc);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const columnTheme = {
|
|
67
|
+
root: columnRoot,
|
|
68
|
+
row: columnRow,
|
|
69
|
+
bleed: columnBleed,
|
|
70
|
+
center: columnCenter,
|
|
71
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentFunction } from '@dxos/ui-types';
|
|
6
|
+
|
|
7
|
+
import { mx } from '../../util';
|
|
8
|
+
|
|
9
|
+
type Size = 'lg' | 'md' | 'sm';
|
|
10
|
+
|
|
11
|
+
export type PanelStyleProps = {
|
|
12
|
+
size?: Size;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const sizes: Record<Size, string> = {
|
|
16
|
+
lg: 'h-(--dx-topbar-size)',
|
|
17
|
+
md: 'h-(--dx-toolbar-size)',
|
|
18
|
+
sm: 'h-(--dx-statusbar-size)',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const panelRoot: ComponentFunction<PanelStyleProps> = (_, ...etc) =>
|
|
22
|
+
mx(
|
|
23
|
+
// prettier-ignore
|
|
24
|
+
'dx-container grid grid-cols-[100%] overflow-hidden',
|
|
25
|
+
// Add uncategorized children to content slot.
|
|
26
|
+
'[&>*:not([data-slot])]:[grid-area:content]',
|
|
27
|
+
...etc,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const panelToolbar: ComponentFunction<PanelStyleProps> = ({ size = 'md' }, ...etc) =>
|
|
31
|
+
mx('[grid-area:toolbar]', 'shrink-0', sizes[size], ...etc);
|
|
32
|
+
|
|
33
|
+
const panelContent: ComponentFunction<PanelStyleProps> = (_, ...etc) => mx('[grid-area:content] min-h-0', ...etc);
|
|
34
|
+
|
|
35
|
+
const panelStatusbar: ComponentFunction<PanelStyleProps> = ({ size = 'md' }, ...etc) =>
|
|
36
|
+
mx('[grid-area:statusbar]', 'shrink-0', sizes[size], ...etc);
|
|
37
|
+
|
|
38
|
+
export const panelTheme = {
|
|
39
|
+
root: panelRoot,
|
|
40
|
+
toolbar: panelToolbar,
|
|
41
|
+
content: panelContent,
|
|
42
|
+
statusbar: panelStatusbar,
|
|
43
|
+
};
|