@dxos/ui-theme 0.8.4-main.fbb7a13 → 0.8.4-main.fcc0d83b33
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 +762 -2803
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +762 -2803
- 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 +1561 -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 +1561 -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/{styles → theme}/components/icon-button.d.ts +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 +31 -27
- 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 +56 -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 +25 -35
- 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 +132 -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 +129 -108
- package/src/css/theme/animation.css +260 -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 +118 -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 +6 -5
- 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/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
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color styles
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
/*
|
|
7
|
+
* Semantic
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
--color-info-fill: var(--color-cyan-fill);
|
|
11
|
+
--color-info-surface: var(--color-cyan-surface);
|
|
12
|
+
--color-info-surface-text: var(--color-cyan-surface-text);
|
|
13
|
+
--color-info-text: var(--color-cyan-text);
|
|
14
|
+
--color-info-border: var(--color-cyan-border);
|
|
15
|
+
|
|
16
|
+
--color-success-fill: var(--color-emerald-fill);
|
|
17
|
+
--color-success-surface: var(--color-emerald-surface);
|
|
18
|
+
--color-success-surface-text: var(--color-emerald-surface-text);
|
|
19
|
+
--color-success-text: var(--color-emerald-text);
|
|
20
|
+
--color-success-border: var(--color-emerald-border);
|
|
21
|
+
|
|
22
|
+
--color-warning-fill: var(--color-amber-fill);
|
|
23
|
+
--color-warning-surface: var(--color-amber-surface);
|
|
24
|
+
--color-warning-surface-text: var(--color-amber-surface-text);
|
|
25
|
+
--color-warning-text: var(--color-amber-text);
|
|
26
|
+
--color-warning-border: var(--color-amber-border);
|
|
27
|
+
|
|
28
|
+
--color-error-fill: var(--color-rose-fill);
|
|
29
|
+
--color-error-surface: var(--color-rose-surface);
|
|
30
|
+
--color-error-surface-text: var(--color-rose-surface-text);
|
|
31
|
+
--color-error-text: var(--color-rose-text);
|
|
32
|
+
--color-error-border: var(--color-rose-border);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Hue
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
--color-neutral-fill: light-dark(var(--color-neutral-300), var(--color-neutral-700));
|
|
39
|
+
--color-neutral-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
|
|
40
|
+
--color-neutral-surface-text: light-dark(var(--color-neutral-800), var(--color-neutral-200));
|
|
41
|
+
--color-neutral-text: light-dark(var(--color-neutral-700), var(--color-neutral-300));
|
|
42
|
+
--color-neutral-border: light-dark(var(--color-neutral-400), var(--color-neutral-600));
|
|
43
|
+
|
|
44
|
+
--color-red-fill: light-dark(var(--color-red-300), var(--color-red-700));
|
|
45
|
+
--color-red-surface: light-dark(var(--color-red-200), var(--color-red-800));
|
|
46
|
+
--color-red-surface-text: light-dark(var(--color-red-800), var(--color-red-200));
|
|
47
|
+
--color-red-text: light-dark(var(--color-red-700), var(--color-red-300));
|
|
48
|
+
--color-red-border: light-dark(var(--color-red-400), var(--color-red-600));
|
|
49
|
+
|
|
50
|
+
--color-orange-fill: light-dark(var(--color-orange-300), var(--color-orange-700));
|
|
51
|
+
--color-orange-surface: light-dark(var(--color-orange-200), var(--color-orange-800));
|
|
52
|
+
--color-orange-surface-text: light-dark(var(--color-orange-800), var(--color-orange-200));
|
|
53
|
+
--color-orange-text: light-dark(var(--color-orange-700), var(--color-orange-300));
|
|
54
|
+
--color-orange-border: light-dark(var(--color-orange-400), var(--color-orange-600));
|
|
55
|
+
|
|
56
|
+
--color-amber-fill: light-dark(var(--color-amber-300), var(--color-amber-700));
|
|
57
|
+
--color-amber-surface: light-dark(var(--color-amber-200), var(--color-amber-800));
|
|
58
|
+
--color-amber-surface-text: light-dark(var(--color-amber-800), var(--color-amber-200));
|
|
59
|
+
--color-amber-text: light-dark(var(--color-amber-700), var(--color-amber-300));
|
|
60
|
+
--color-amber-border: light-dark(var(--color-amber-400), var(--color-amber-600));
|
|
61
|
+
|
|
62
|
+
--color-yellow-fill: light-dark(var(--color-yellow-300), var(--color-yellow-700));
|
|
63
|
+
--color-yellow-surface: light-dark(var(--color-yellow-200), var(--color-yellow-800));
|
|
64
|
+
--color-yellow-surface-text: light-dark(var(--color-yellow-800), var(--color-yellow-200));
|
|
65
|
+
--color-yellow-text: light-dark(var(--color-yellow-700), var(--color-yellow-300));
|
|
66
|
+
--color-yellow-border: light-dark(var(--color-yellow-400), var(--color-yellow-600));
|
|
67
|
+
|
|
68
|
+
--color-lime-fill: light-dark(var(--color-lime-300), var(--color-lime-700));
|
|
69
|
+
--color-lime-surface: light-dark(var(--color-lime-200), var(--color-lime-800));
|
|
70
|
+
--color-lime-surface-text: light-dark(var(--color-lime-800), var(--color-lime-200));
|
|
71
|
+
--color-lime-text: light-dark(var(--color-lime-700), var(--color-lime-300));
|
|
72
|
+
--color-lime-border: light-dark(var(--color-lime-400), var(--color-lime-600));
|
|
73
|
+
|
|
74
|
+
--color-green-fill: light-dark(var(--color-green-300), var(--color-green-700));
|
|
75
|
+
--color-green-surface: light-dark(var(--color-green-200), var(--color-green-800));
|
|
76
|
+
--color-green-surface-text: light-dark(var(--color-green-800), var(--color-green-200));
|
|
77
|
+
--color-green-text: light-dark(var(--color-green-700), var(--color-green-300));
|
|
78
|
+
--color-green-border: light-dark(var(--color-green-400), var(--color-green-600));
|
|
79
|
+
|
|
80
|
+
--color-emerald-fill: light-dark(var(--color-emerald-300), var(--color-emerald-700));
|
|
81
|
+
--color-emerald-surface: light-dark(var(--color-emerald-200), var(--color-emerald-800));
|
|
82
|
+
--color-emerald-surface-text: light-dark(var(--color-emerald-800), var(--color-emerald-200));
|
|
83
|
+
--color-emerald-text: light-dark(var(--color-emerald-700), var(--color-emerald-300));
|
|
84
|
+
--color-emerald-border: light-dark(var(--color-emerald-400), var(--color-emerald-600));
|
|
85
|
+
|
|
86
|
+
--color-teal-fill: light-dark(var(--color-teal-300), var(--color-teal-700));
|
|
87
|
+
--color-teal-surface: light-dark(var(--color-teal-200), var(--color-teal-800));
|
|
88
|
+
--color-teal-surface-text: light-dark(var(--color-teal-800), var(--color-teal-200));
|
|
89
|
+
--color-teal-text: light-dark(var(--color-teal-700), var(--color-teal-300));
|
|
90
|
+
--color-teal-border: light-dark(var(--color-teal-400), var(--color-teal-600));
|
|
91
|
+
|
|
92
|
+
--color-cyan-fill: light-dark(var(--color-cyan-300), var(--color-cyan-700));
|
|
93
|
+
--color-cyan-surface: light-dark(var(--color-cyan-200), var(--color-cyan-800));
|
|
94
|
+
--color-cyan-surface-text: light-dark(var(--color-cyan-800), var(--color-cyan-200));
|
|
95
|
+
--color-cyan-text: light-dark(var(--color-cyan-700), var(--color-cyan-300));
|
|
96
|
+
--color-cyan-border: light-dark(var(--color-cyan-400), var(--color-cyan-600));
|
|
97
|
+
|
|
98
|
+
--color-sky-fill: light-dark(var(--color-sky-300), var(--color-sky-700));
|
|
99
|
+
--color-sky-surface: light-dark(var(--color-sky-200), var(--color-sky-800));
|
|
100
|
+
--color-sky-surface-text: light-dark(var(--color-sky-800), var(--color-sky-200));
|
|
101
|
+
--color-sky-text: light-dark(var(--color-sky-700), var(--color-sky-300));
|
|
102
|
+
--color-sky-border: light-dark(var(--color-sky-400), var(--color-sky-600));
|
|
103
|
+
|
|
104
|
+
--color-blue-fill: light-dark(var(--color-blue-300), var(--color-blue-700));
|
|
105
|
+
--color-blue-surface: light-dark(var(--color-blue-200), var(--color-blue-800));
|
|
106
|
+
--color-blue-surface-text: light-dark(var(--color-blue-800), var(--color-blue-200));
|
|
107
|
+
--color-blue-text: light-dark(var(--color-blue-700), var(--color-blue-300));
|
|
108
|
+
--color-blue-border: light-dark(var(--color-blue-400), var(--color-blue-600));
|
|
109
|
+
|
|
110
|
+
--color-indigo-fill: light-dark(var(--color-indigo-300), var(--color-indigo-700));
|
|
111
|
+
--color-indigo-surface: light-dark(var(--color-indigo-200), var(--color-indigo-800));
|
|
112
|
+
--color-indigo-surface-text: light-dark(var(--color-indigo-800), var(--color-indigo-200));
|
|
113
|
+
--color-indigo-text: light-dark(var(--color-indigo-700), var(--color-indigo-300));
|
|
114
|
+
--color-indigo-border: light-dark(var(--color-indigo-400), var(--color-indigo-600));
|
|
115
|
+
|
|
116
|
+
--color-violet-fill: light-dark(var(--color-violet-300), var(--color-violet-700));
|
|
117
|
+
--color-violet-surface: light-dark(var(--color-violet-200), var(--color-violet-800));
|
|
118
|
+
--color-violet-surface-text: light-dark(var(--color-violet-800), var(--color-violet-200));
|
|
119
|
+
--color-violet-text: light-dark(var(--color-violet-700), var(--color-violet-300));
|
|
120
|
+
--color-violet-border: light-dark(var(--color-violet-400), var(--color-violet-600));
|
|
121
|
+
|
|
122
|
+
--color-purple-fill: light-dark(var(--color-purple-300), var(--color-purple-700));
|
|
123
|
+
--color-purple-surface: light-dark(var(--color-purple-200), var(--color-purple-800));
|
|
124
|
+
--color-purple-surface-text: light-dark(var(--color-purple-800), var(--color-purple-200));
|
|
125
|
+
--color-purple-text: light-dark(var(--color-purple-700), var(--color-purple-300));
|
|
126
|
+
--color-purple-border: light-dark(var(--color-purple-400), var(--color-purple-600));
|
|
127
|
+
|
|
128
|
+
--color-fuchsia-fill: light-dark(var(--color-fuchsia-300), var(--color-fuchsia-700));
|
|
129
|
+
--color-fuchsia-surface: light-dark(var(--color-fuchsia-200), var(--color-fuchsia-800));
|
|
130
|
+
--color-fuchsia-surface-text: light-dark(var(--color-fuchsia-800), var(--color-fuchsia-200));
|
|
131
|
+
--color-fuchsia-text: light-dark(var(--color-fuchsia-700), var(--color-fuchsia-300));
|
|
132
|
+
--color-fuchsia-border: light-dark(var(--color-fuchsia-400), var(--color-fuchsia-600));
|
|
133
|
+
|
|
134
|
+
--color-pink-fill: light-dark(var(--color-pink-300), var(--color-pink-700));
|
|
135
|
+
--color-pink-surface: light-dark(var(--color-pink-200), var(--color-pink-800));
|
|
136
|
+
--color-pink-surface-text: light-dark(var(--color-pink-800), var(--color-pink-200));
|
|
137
|
+
--color-pink-text: light-dark(var(--color-pink-700), var(--color-pink-300));
|
|
138
|
+
--color-pink-border: light-dark(var(--color-pink-400), var(--color-pink-600));
|
|
139
|
+
|
|
140
|
+
--color-rose-fill: light-dark(var(--color-rose-300), var(--color-rose-700));
|
|
141
|
+
--color-rose-surface: light-dark(var(--color-rose-200), var(--color-rose-800));
|
|
142
|
+
--color-rose-surface-text: light-dark(var(--color-rose-800), var(--color-rose-200));
|
|
143
|
+
--color-rose-text: light-dark(var(--color-rose-700), var(--color-rose-300));
|
|
144
|
+
--color-rose-border: light-dark(var(--color-rose-400), var(--color-rose-600));
|
|
145
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
/* Font families */
|
|
7
|
+
--font-body: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
|
|
8
|
+
--font-mono: 'JetBrains Mono Variable', ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
|
|
9
|
+
|
|
10
|
+
/* Font size scale (Tailwind v4 defaults — clean rem/px values) */
|
|
11
|
+
--text-xs: 0.75rem;
|
|
12
|
+
--text-xs--line-height: 1rem;
|
|
13
|
+
--text-sm: 0.875rem;
|
|
14
|
+
--text-sm--line-height: 1.25rem;
|
|
15
|
+
--text-base: 1rem;
|
|
16
|
+
--text-base--line-height: 1.5rem;
|
|
17
|
+
--text-lg: 1.125rem;
|
|
18
|
+
--text-lg--line-height: 1.75rem;
|
|
19
|
+
--text-xl: 1.25rem;
|
|
20
|
+
--text-xl--line-height: 1.75rem;
|
|
21
|
+
--text-2xl: 1.5rem;
|
|
22
|
+
--text-2xl--line-height: 2rem;
|
|
23
|
+
--text-3xl: 1.875rem;
|
|
24
|
+
--text-3xl--line-height: 2.25rem;
|
|
25
|
+
--text-4xl: 2.25rem;
|
|
26
|
+
--text-4xl--line-height: 2.5rem;
|
|
27
|
+
--text-5xl: 3rem;
|
|
28
|
+
--text-5xl--line-height: 1;
|
|
29
|
+
--text-6xl: 3.75rem;
|
|
30
|
+
--text-6xl--line-height: 1;
|
|
31
|
+
--text-7xl: 4.5rem;
|
|
32
|
+
--text-7xl--line-height: 1;
|
|
33
|
+
--text-8xl: 6rem;
|
|
34
|
+
--text-8xl--line-height: 1;
|
|
35
|
+
--text-9xl: 8rem;
|
|
36
|
+
--text-9xl--line-height: 1;
|
|
37
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tailwind utility classes.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Layout rules for flex-based scroll containment:
|
|
7
|
+
* `flex flex-col`
|
|
8
|
+
* On a container: makes it a flex column so children stack and can use `flex-1`.
|
|
9
|
+
* `flex-1`
|
|
10
|
+
* On a child: grows to fill the flex parent. Requires the parent to be `flex`.
|
|
11
|
+
* `min-h-0` (alongside `flex-1`):
|
|
12
|
+
* Overrides default flex children: `min-height:auto` (sized to content), which prevents shrinking.
|
|
13
|
+
* Allows element to shrink and trigger overflow/scrolling.
|
|
14
|
+
* Always pair with `flex-1` when scroll is needed.
|
|
15
|
+
* `h-full`:
|
|
16
|
+
* Fills 100% of the parent's *computed* height.
|
|
17
|
+
* Use when the parent has a definite height but is not a flex container (e.g. `overflow:hidden` wrapper).
|
|
18
|
+
* Unlike `flex-1`, does not require the parent to be flex.
|
|
19
|
+
*
|
|
20
|
+
* Pattern for a scrollable region inside a flex ancestor:
|
|
21
|
+
* ancestor → `flex flex-col` (or `flex flex-row`)
|
|
22
|
+
* scroll root → `flex-1 min-h-0` (fills ancestor, can shrink)
|
|
23
|
+
* scroll viewport → `h-full overflow-y-scroll` (fills root, scrolls)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Fills the available space.
|
|
28
|
+
*/
|
|
29
|
+
@utility dx-expander {
|
|
30
|
+
@apply flex-1 min-h-0 min-w-0 h-full w-full;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Container that fills the available space (extends dx-expander with overflow clipping).
|
|
35
|
+
*/
|
|
36
|
+
@utility dx-container {
|
|
37
|
+
@apply dx-expander overflow-hidden;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Column that fills the available space (extends dx-expander with overflow clipping).
|
|
42
|
+
*/
|
|
43
|
+
@utility dx-column {
|
|
44
|
+
@apply flex-1 min-w-0 w-full;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Fullscreen
|
|
49
|
+
*/
|
|
50
|
+
@utility dx-fullscreen {
|
|
51
|
+
@apply absolute inset-0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Visual warning to indicate incorrect usage of `slottable`.
|
|
56
|
+
*/
|
|
57
|
+
@utility dx-slot-warning {
|
|
58
|
+
@apply border border-rose-500 border-dashed;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Pseudo-element overlay for ring indicators (focus, current, etc.).
|
|
63
|
+
*
|
|
64
|
+
* A standard CSS `box-shadow` ring is painted behind child content, so children with
|
|
65
|
+
* opaque backgrounds (e.g., cards, avatars) obscure it. By painting the ring on an
|
|
66
|
+
* absolutely-positioned `::after` pseudo-element that sits above the element's children
|
|
67
|
+
* in stacking order, the ring is always visible regardless of child backgrounds.
|
|
68
|
+
*
|
|
69
|
+
* The pseudo-element inherits `border-radius` from its parent and is `pointer-events-none`
|
|
70
|
+
* so it doesn't interfere with interactions. The ring starts transparent; consumers
|
|
71
|
+
* activate it conditionally (e.g., `focus:after:ring-*`, `aria-[current=true]:after:ring-*`).
|
|
72
|
+
*/
|
|
73
|
+
@utility dx-ring-pseudo {
|
|
74
|
+
@apply relative after:content-[""] after:absolute after:inset-0 after:rounded-[inherit]
|
|
75
|
+
after:pointer-events-none after:ring after:ring-inset after:ring-transparent;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Shimmer text — animates opacity left → right across the contained text.
|
|
80
|
+
* See @keyframes shimmer-text in theme/animation.css for the keyframe definition.
|
|
81
|
+
* Geometry: mask-size 200% 100% with mask-repeat: repeat-x means each tile is
|
|
82
|
+
* 2× the element width; the keyframe slides mask-position-x by 200% (one full
|
|
83
|
+
* tile period), giving a seamless loop. The 5-stop gradient (0.4 → 1.0 → 0.4)
|
|
84
|
+
* produces a single bright pulse per cycle that traverses left → right during
|
|
85
|
+
* the first half, with a brief calm interval during the second half.
|
|
86
|
+
*/
|
|
87
|
+
@utility shimmer-text {
|
|
88
|
+
mask-image: linear-gradient(
|
|
89
|
+
90deg,
|
|
90
|
+
rgba(0, 0, 0, 0.4) 0%,
|
|
91
|
+
rgba(0, 0, 0, 0.4) 30%,
|
|
92
|
+
rgba(0, 0, 0, 1) 50%,
|
|
93
|
+
rgba(0, 0, 0, 0.4) 70%,
|
|
94
|
+
rgba(0, 0, 0, 0.4) 100%
|
|
95
|
+
);
|
|
96
|
+
-webkit-mask-image: linear-gradient(
|
|
97
|
+
90deg,
|
|
98
|
+
rgba(0, 0, 0, 0.4) 0%,
|
|
99
|
+
rgba(0, 0, 0, 0.4) 30%,
|
|
100
|
+
rgba(0, 0, 0, 1) 50%,
|
|
101
|
+
rgba(0, 0, 0, 0.4) 70%,
|
|
102
|
+
rgba(0, 0, 0, 0.4) 100%
|
|
103
|
+
);
|
|
104
|
+
mask-size: 200% 100%;
|
|
105
|
+
-webkit-mask-size: 200% 100%;
|
|
106
|
+
mask-repeat: repeat-x;
|
|
107
|
+
-webkit-mask-repeat: repeat-x;
|
|
108
|
+
animation: shimmer-text 2s linear infinite;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (prefers-reduced-motion: reduce) {
|
|
112
|
+
.shimmer-text {
|
|
113
|
+
animation: none;
|
|
114
|
+
mask-image: none;
|
|
115
|
+
-webkit-mask-image: none;
|
|
116
|
+
opacity: 0.6;
|
|
117
|
+
}
|
|
118
|
+
}
|
package/src/defs.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ChromaticPalette } from '@dxos/ui-types';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Translation namespace for OS-level translations.
|
|
9
|
+
*/
|
|
10
|
+
export const osTranslations = 'org.dxos.i18n.os';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Available color hues for UI components.
|
|
14
|
+
*/
|
|
15
|
+
export const hues: ChromaticPalette[] = [
|
|
16
|
+
'red',
|
|
17
|
+
'orange',
|
|
18
|
+
'amber',
|
|
19
|
+
'yellow',
|
|
20
|
+
'lime',
|
|
21
|
+
'green',
|
|
22
|
+
'emerald',
|
|
23
|
+
'teal',
|
|
24
|
+
'cyan',
|
|
25
|
+
'sky',
|
|
26
|
+
'blue',
|
|
27
|
+
'indigo',
|
|
28
|
+
'violet',
|
|
29
|
+
'purple',
|
|
30
|
+
'fuchsia',
|
|
31
|
+
'pink',
|
|
32
|
+
'rose',
|
|
33
|
+
] as const;
|
|
34
|
+
|
|
35
|
+
export const hueShades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;
|
|
36
|
+
|
|
37
|
+
export const roles = ['fill', 'surface', 'surface-text', 'text', 'border'] as const;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Card size constants (Tailwind spacing units).
|
|
41
|
+
* Cards should be no larger than 320px per WCAG 2.1 SC 1.4.10.
|
|
42
|
+
*/
|
|
43
|
+
// TODO(burdon): Replace usage of these with semantic tokens.
|
|
44
|
+
export const cardMinInlineSize = 18;
|
|
45
|
+
export const cardDefaultInlineSize = 20; // 320px
|
|
46
|
+
export const cardMaxInlineSize = 22;
|
|
47
|
+
export const cardMinBlockSize = 18;
|
|
48
|
+
export const cardMaxBlockSize = 30;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Fragment Definitions Audit
|
|
2
|
+
|
|
3
|
+
External packages importing fragment definitions from `ui-theme/src/fragments`.
|
|
4
|
+
|
|
5
|
+
## Current Fragment Exports
|
|
6
|
+
|
|
7
|
+
| File | Definition | External | Internal |
|
|
8
|
+
| ------------- | ------------------------------------- | -------- | -------- |
|
|
9
|
+
| `density.ts` | `densityBlockSize` | - | 1 |
|
|
10
|
+
| `density.ts` | `coarseBlockSize` | - | 1 |
|
|
11
|
+
| `density.ts` | `coarseDimensions` | - | 1 |
|
|
12
|
+
| `density.ts` | `fineBlockSize` | - | 1 |
|
|
13
|
+
| `density.ts` | `fineDimensions` | - | 1 |
|
|
14
|
+
| `disabled.ts` | `staticDisabled` | - | 1 |
|
|
15
|
+
| `disabled.ts` | `dataDisabled` | - | 1 |
|
|
16
|
+
| `focus.ts` | `focusRing` | 2 | 5 |
|
|
17
|
+
| `focus.ts` | `subduedFocus` | - | 2 |
|
|
18
|
+
| `focus.ts` | `staticFocusRing` | - | 1 |
|
|
19
|
+
| `hover.ts` | `subtleHover` | 4 | - |
|
|
20
|
+
| `hover.ts` | `ghostHover` | 8 | 2 |
|
|
21
|
+
| `hover.ts` | `ghostFocusWithin` | 1 | - |
|
|
22
|
+
| `hover.ts` | `hoverableControls` | 9 | - |
|
|
23
|
+
| `hover.ts` | `groupHoverControlItemWithTransition` | 2 | - |
|
|
24
|
+
| `hover.ts` | `hoverableFocusedKeyboardControls` | 1 | - |
|
|
25
|
+
| `hover.ts` | `hoverableFocusedWithinControls` | 9 | - |
|
|
26
|
+
| `hover.ts` | `hoverableOpenControlItem` | 3 | - |
|
|
27
|
+
| `hover.ts` | `hoverableControlItem` | 7 | - |
|
|
28
|
+
| `text.ts` | `descriptionTextPrimary` | 1 | - |
|
|
29
|
+
| `text.ts` | `descriptionMessage` | 5 | - |
|
|
30
|
+
|
|
31
|
+
## Summary
|
|
32
|
+
|
|
33
|
+
**Total fragments:** 21
|
|
34
|
+
**Total imports (external + internal):** 96
|
|
35
|
+
|
|
36
|
+
- **External:** 63
|
|
37
|
+
- **Internal:** 33
|
|
38
|
+
|
|
39
|
+
**Most imported overall:**
|
|
40
|
+
|
|
41
|
+
- `hoverableControls` (9 external)
|
|
42
|
+
- `hoverableFocusedWithinControls` (9 external)
|
|
43
|
+
- `ghostHover` (8 external + 2 internal = 10 total)
|
|
44
|
+
- `hoverableControlItem` (7 external)
|
|
45
|
+
- `focusRing` (2 external + 5 internal = 7 total)
|
|
46
|
+
|
|
47
|
+
**Internal imports by file:**
|
|
48
|
+
|
|
49
|
+
- `input.ts`: 8 definitions (coarseBlockSize, coarseDimensions, fineBlockSize, fineDimensions, focusRing, staticDisabled, staticFocusRing, subduedFocus)
|
|
50
|
+
- `list.ts`: 3 definitions (densityBlockSize, focusRing, ghostHover)
|
|
51
|
+
- `menu.ts`: 2 definitions (dataDisabled, subduedFocus)
|
|
52
|
+
- `button.ts`, `link.ts`, `popover.ts`, `toast.ts`: 1 definition each (ghostHover, focusRing, focusRing, focusRing)
|
|
53
|
+
|
|
54
|
+
**Completely unused:** 7 fragments
|
|
55
|
+
|
|
56
|
+
- `subtleHover` from `hover.ts`
|
|
57
|
+
- `hoverableOpenControlItem`, `groupHoverControlItemWithTransition` from `hover.ts` (only 2-3 uses)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Density } from '@dxos/ui-types';
|
|
6
|
+
|
|
7
|
+
const fineBlockSize = 'min-h-[2.5rem] pointer-fine:min-h-[2rem]';
|
|
8
|
+
const coarseBlockSize = 'min-h-[2.5rem]';
|
|
9
|
+
|
|
10
|
+
const fineDimensions = `${fineBlockSize} px-2`;
|
|
11
|
+
const coarseDimensions = `${coarseBlockSize} px-3`;
|
|
12
|
+
|
|
13
|
+
export const densityDimensions = (density: Density = 'fine') =>
|
|
14
|
+
density === 'fine' ? fineDimensions : coarseDimensions;
|
|
15
|
+
|
|
16
|
+
export const densityBlockSize = (density: Density = 'fine') => (density === 'fine' ? fineBlockSize : coarseBlockSize);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
export const subtleHover = 'hover:bg-hover-overlay';
|
|
6
|
+
|
|
7
|
+
export const ghostHover = 'hover:bg-hover-surface';
|
|
8
|
+
export const ghostFocusWithin = 'focus-within:bg-hover-surface';
|
|
9
|
+
|
|
10
|
+
export const hoverableControls =
|
|
11
|
+
'[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]';
|
|
12
|
+
|
|
13
|
+
export const groupHoverControlItemWithTransition = 'transition-opacity duration-200 opacity-0 group-hover:opacity-100';
|
|
14
|
+
|
|
15
|
+
export const hoverableFocusedKeyboardControls = 'focus-visible:[--controls-opacity:1]';
|
|
16
|
+
export const hoverableFocusedWithinControls = 'focus-within:[--controls-opacity:1]';
|
|
17
|
+
export const hoverableOpenControlItem = 'hover-hover:aria-[expanded=true]:[--controls-opacity:1]';
|
|
18
|
+
export const hoverableControlItem = 'opacity-(--controls-opacity)';
|
package/src/index.ts
CHANGED
|
@@ -2,18 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export * from './styles';
|
|
9
|
-
export * from './types';
|
|
5
|
+
export * from './defs';
|
|
6
|
+
export * from './fragments';
|
|
7
|
+
export * from './theme';
|
|
10
8
|
export * from './util';
|
|
11
|
-
|
|
12
|
-
const tokens: TailwindConfig['theme'] = tailwindConfig({}).theme;
|
|
13
|
-
|
|
14
|
-
export { tokens };
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Translation namespace for OS-level translations.
|
|
18
|
-
*/
|
|
19
|
-
export const osTranslations = 'dxos.org/i18n/os';
|
package/src/main.css
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main theme.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Establish CSS cascade layer order before Tailwind sets its own.
|
|
7
|
+
* First mention of a layer name wins its position in the order.
|
|
8
|
+
*
|
|
9
|
+
* NOTE: `utilities` must be last so it overrides all base and component layers.
|
|
10
|
+
* NOTE: This must be in sync with the `transformIndexHtml` function in `packages/ui/ui-theme/src/plugins/plugin.ts`.
|
|
11
|
+
*/
|
|
12
|
+
@layer properties, theme, dx-tokens, user-tokens, base, tw-base, dx-base, components, tw-components, dx-components, utilities;
|
|
13
|
+
|
|
14
|
+
@import 'tailwindcss';
|
|
15
|
+
|
|
16
|
+
/* @theme extensions */
|
|
17
|
+
@import './css/theme/animation.css';
|
|
18
|
+
@import './css/theme/border.css';
|
|
19
|
+
@import './css/theme/palette.css';
|
|
20
|
+
@import './css/theme/semantic.css';
|
|
21
|
+
@import './css/theme/spacing.css';
|
|
22
|
+
@import './css/theme/styles.css';
|
|
23
|
+
@import './css/theme/text.css';
|
|
24
|
+
|
|
25
|
+
/* @layer dx-base, dx-tokens */
|
|
26
|
+
@import './css/base/base.css';
|
|
27
|
+
@import './css/base/typography.css';
|
|
28
|
+
|
|
29
|
+
/* @layer dx-components (components) */
|
|
30
|
+
@import './css/components/button.css';
|
|
31
|
+
@import './css/components/checkbox.css';
|
|
32
|
+
@import './css/components/dialog.css';
|
|
33
|
+
@import './css/components/focus.css';
|
|
34
|
+
@import './css/components/icon.css';
|
|
35
|
+
@import './css/components/panel.css';
|
|
36
|
+
@import './css/components/link.css';
|
|
37
|
+
@import './css/components/scrollbar.css';
|
|
38
|
+
@import './css/components/selected.css';
|
|
39
|
+
@import './css/components/surface.css';
|
|
40
|
+
@import './css/components/tag.css';
|
|
41
|
+
@import './css/components/text.css';
|
|
42
|
+
|
|
43
|
+
/* @layer dx-components (layout) */
|
|
44
|
+
@import './css/layout/main.css';
|
|
45
|
+
@import './css/layout/native.css';
|
|
46
|
+
@import './css/layout/positioning.css';
|
|
47
|
+
@import './css/layout/size.css';
|
|
48
|
+
|
|
49
|
+
/* @layer dx-utilities */
|
|
50
|
+
@import './css/utilities.css';
|
|
51
|
+
|
|
52
|
+
/* Third-party integrations */
|
|
53
|
+
@import './css/integrations/codemirror.css';
|
|
54
|
+
@import './css/integrations/tldraw.css';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Force-emit CSS variables for the full color palette for all:
|
|
58
|
+
* --color-{hue}-{shade}
|
|
59
|
+
* --color-{hue}-{style}
|
|
60
|
+
*/
|
|
61
|
+
@source inline("bg-{neutral,red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose}-{50,100,200,300,400,500,600,700,800,900,950}");
|
|
62
|
+
@source inline("bg-{neutral,red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose}-{fill,surface,surface-text,text,border}");
|
|
63
|
+
@source inline("border-{neutral,red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose}-border");
|
|
64
|
+
@source inline("bg-{info,success,warning,error}-{fill,surface,surface-text,text,border}");
|
|
65
|
+
@source inline("border-{info,success,warning,error}-border");
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Plugins must come after all imports.
|
|
69
|
+
*/
|
|
70
|
+
@plugin '@tailwindcss/forms';
|
|
71
|
+
@plugin 'tailwind-scrollbar';
|
|
72
|
+
@plugin 'tailwindcss-radix';
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Class-based dark mode.
|
|
76
|
+
* The `.dark` class on an ancestor toggles `dark:` utilities.
|
|
77
|
+
*/
|
|
78
|
+
@variant dark (&:where(.dark, .dark *));
|
|
79
|
+
|
|
80
|
+
/** Mobile */
|
|
81
|
+
@custom-variant pointer-coarse (@media (pointer: coarse));
|
|
82
|
+
/** Web */
|
|
83
|
+
@custom-variant pointer-fine (@media (pointer: fine));
|
|
84
|
+
/** Supports mouse/trackpad (Web) */
|
|
85
|
+
@custom-variant hover-hover (@media (hover: hover));
|
|
86
|
+
/** Active navigation */
|
|
87
|
+
@custom-variant is-current (&[aria-current]:not([aria-current="false"]));
|