@scalio-cloud/ui 0.0.0-stage → 0.1.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1
4
+ - Published publicly on npmjs.com instead of GitHub Packages (no token needed to install). Content unchanged.
5
+
6
+ ## 0.1.0
7
+ - First version: Control Room tokens (light/dark, taken 1:1 from Scalio Nexus), Tailwind preset, self-hosted
8
+ fonts Chivo / IBM Plex Sans / JetBrains Mono. Compiled against Nexus it gives the same CSS as Nexus's own config.
package/README.md CHANGED
@@ -1,3 +1,56 @@
1
- # Temporary Holding Version
1
+ # @scalio-cloud/ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared look and feel for the Scalio apps (Nexus, Compass, Rosetta, Citadel, later Foundry and Pulse):
4
+ the "Control Room" design tokens, a Tailwind preset and the fonts, served from the app itself.
5
+ Spec: `spezifikation/UISPEC.md` in `Scalio-Cloud/scalio-rosetta`.
6
+
7
+ | File | What it is |
8
+ |---|---|
9
+ | `tokens.css` | shadcn/ui CSS variables, light on `:root`, dark on `.dark` (Klein Blue `#002FA7`, radius 4px) |
10
+ | `fonts.css` | `@font-face` for Chivo, IBM Plex Sans, JetBrains Mono (woff2, latin, SIL OFL 1.1). No Google Fonts request |
11
+ | `base.css` | body / heading / code font families |
12
+ | `index.css` | all three in one import |
13
+ | `tailwind-preset.js` | colors, fonts, radius, accordion animation, `brand` colors, `h-switcher`, `h-header`, `w-sidebar` |
14
+ | `tokens.js` | raw values for code without CSS (charts, e-mails, PDFs) |
15
+
16
+ ## Use it in an app (CRA/craco or Vite)
17
+
18
+ ```js
19
+ // tailwind.config.js
20
+ module.exports = {
21
+ presets: [require("@scalio-cloud/ui/tailwind-preset")],
22
+ content: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"],
23
+ plugins: [require("tailwindcss-animate")],
24
+ };
25
+ ```
26
+
27
+ ```css
28
+ /* src/index.css, first line */
29
+ @import "@scalio-cloud/ui/index.css";
30
+ @tailwind base;
31
+ @tailwind components;
32
+ @tailwind utilities;
33
+ ```
34
+
35
+ Then remove the app's own `:root { --... }` / `.dark { --... }` blocks and the Google Fonts `@import` / `<link>`.
36
+ Classes like `bg-primary`, `rounded-sm`, `font-display` keep working unchanged.
37
+
38
+ ## Installing
39
+
40
+ Public on npmjs.com, no token needed: `yarn add @scalio-cloud/ui` (pin the exact version).
41
+ The package holds only design values and fonts under the SIL OFL, nothing confidential.
42
+
43
+ ## License
44
+
45
+ Design tokens and preset: (c) Scalio Cloud LLC, free to use in Scalio apps. Fonts: SIL Open Font License 1.1,
46
+ see `fonts/licenses/`.
47
+
48
+ ## Release
49
+
50
+ 1. Change the files, add a line to `CHANGELOG.md`, bump `version` in `package.json` (semver; tag without `v`).
51
+ 2. Merge to `main`, then create the tag (e.g. `0.1.1`, GitHub Releases or `git push origin <tag>`). The `publish`
52
+ workflow tests and publishes that version to npmjs.com (secret `NPM_TOKEN`, npm org `scalio-cloud`).
53
+ 3. Apps update with `yarn upgrade @scalio-cloud/ui@<version>` in their own PR.
54
+
55
+ `npm test` checks: light/dark variables match, the preset only uses defined variables, all font files exist,
56
+ nothing is loaded from the network.
package/base.css ADDED
@@ -0,0 +1,12 @@
1
+ /* Base typography of the Control Room style. Plain CSS, works with or without Tailwind. */
2
+ body {
3
+ font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
4
+ -webkit-font-smoothing: antialiased;
5
+ -moz-osx-font-smoothing: grayscale;
6
+ }
7
+ h1, h2, h3, h4, .font-display {
8
+ font-family: 'Chivo', 'IBM Plex Sans', sans-serif;
9
+ }
10
+ code, pre, kbd, .font-mono {
11
+ font-family: 'JetBrains Mono', ui-monospace, monospace;
12
+ }
@@ -0,0 +1,93 @@
1
+ Copyright 2019 The Chivo Project Authors (https://github.com/Omnibus-Type/Chivo) Chivo-Italic[wght].ttf: Copyright 2019 The Chivo Project Authors (https://github.com/Omnibus-Type/Chivo)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2019 IBM Corp. All rights reserved. IBMPlexSans-Italic[wdth,wght].ttf: Copyright 2019 IBM Corp. All rights reserved.
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/fonts.css ADDED
@@ -0,0 +1,71 @@
1
+ /* Scalio fonts, served from the app itself (no Google Fonts request). Latin subset, SIL OFL 1.1 (see fonts/licenses). */
2
+ @font-face {
3
+ font-family: 'Chivo';
4
+ font-style: normal;
5
+ font-display: swap;
6
+ font-weight: 400;
7
+ src: url('./fonts/chivo-latin-400-normal.woff2') format('woff2');
8
+ }
9
+ @font-face {
10
+ font-family: 'Chivo';
11
+ font-style: normal;
12
+ font-display: swap;
13
+ font-weight: 700;
14
+ src: url('./fonts/chivo-latin-700-normal.woff2') format('woff2');
15
+ }
16
+ @font-face {
17
+ font-family: 'Chivo';
18
+ font-style: normal;
19
+ font-display: swap;
20
+ font-weight: 900;
21
+ src: url('./fonts/chivo-latin-900-normal.woff2') format('woff2');
22
+ }
23
+ @font-face {
24
+ font-family: 'IBM Plex Sans';
25
+ font-style: normal;
26
+ font-display: swap;
27
+ font-weight: 400;
28
+ src: url('./fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
29
+ }
30
+ @font-face {
31
+ font-family: 'IBM Plex Sans';
32
+ font-style: normal;
33
+ font-display: swap;
34
+ font-weight: 500;
35
+ src: url('./fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
36
+ }
37
+ @font-face {
38
+ font-family: 'IBM Plex Sans';
39
+ font-style: normal;
40
+ font-display: swap;
41
+ font-weight: 600;
42
+ src: url('./fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
43
+ }
44
+ @font-face {
45
+ font-family: 'IBM Plex Sans';
46
+ font-style: normal;
47
+ font-display: swap;
48
+ font-weight: 700;
49
+ src: url('./fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2');
50
+ }
51
+ @font-face {
52
+ font-family: 'JetBrains Mono';
53
+ font-style: normal;
54
+ font-display: swap;
55
+ font-weight: 400;
56
+ src: url('./fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
57
+ }
58
+ @font-face {
59
+ font-family: 'JetBrains Mono';
60
+ font-style: normal;
61
+ font-display: swap;
62
+ font-weight: 500;
63
+ src: url('./fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
64
+ }
65
+ @font-face {
66
+ font-family: 'JetBrains Mono';
67
+ font-style: normal;
68
+ font-display: swap;
69
+ font-weight: 600;
70
+ src: url('./fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2');
71
+ }
package/index.css ADDED
@@ -0,0 +1,4 @@
1
+ /* Everything at once: fonts + tokens + base typography. */
2
+ @import './fonts.css';
3
+ @import './tokens.css';
4
+ @import './base.css';
package/package.json CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
2
  "name": "@scalio-cloud/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Scalio Control Room design tokens, Tailwind preset and self-hosted fonts",
5
+ "license": "SEE LICENSE IN README.md",
6
+ "private": false,
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/Scalio-Cloud/scalio-ui.git"
10
+ },
11
+ "main": "tokens.js",
12
+ "exports": {
13
+ ".": "./tokens.js",
14
+ "./tokens": "./tokens.js",
15
+ "./tailwind-preset": "./tailwind-preset.js",
16
+ "./index.css": "./index.css",
17
+ "./tokens.css": "./tokens.css",
18
+ "./fonts.css": "./fonts.css",
19
+ "./base.css": "./base.css",
20
+ "./fonts/*": "./fonts/*",
21
+ "./package.json": "./package.json"
22
+ },
23
+ "files": [
24
+ "tokens.js",
25
+ "tailwind-preset.js",
26
+ "index.css",
27
+ "tokens.css",
28
+ "fonts.css",
29
+ "base.css",
30
+ "fonts/",
31
+ "README.md",
32
+ "CHANGELOG.md"
33
+ ],
34
+ "publishConfig": {
35
+ "registry": "https://registry.npmjs.org",
36
+ "access": "public"
37
+ },
38
+ "peerDependencies": {
39
+ "tailwindcss": ">=3.3 <4"
40
+ },
41
+ "peerDependenciesMeta": {
42
+ "tailwindcss": {
43
+ "optional": true
44
+ }
45
+ },
46
+ "scripts": {
47
+ "test": "node --test test/*.test.js"
48
+ },
49
+ "engines": {
50
+ "node": ">=18"
51
+ }
52
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Tailwind preset for Scalio apps:
3
+ * // tailwind.config.js
4
+ * module.exports = { presets: [require("@scalio-cloud/ui/tailwind-preset")], content: [...] };
5
+ * Colors read the CSS variables from tokens.css, so light/dark follow the `.dark` class.
6
+ */
7
+ const { brand, fonts } = require("./tokens");
8
+
9
+ const v = (name) => `hsl(var(--${name}))`;
10
+ const pair = (name) => ({ DEFAULT: v(name), foreground: v(`${name}-foreground`) });
11
+
12
+ module.exports = {
13
+ darkMode: ["class"],
14
+ theme: {
15
+ extend: {
16
+ fontFamily: { ...fonts },
17
+ borderRadius: {
18
+ lg: "var(--radius)",
19
+ // Same steps as shadcn/ui and today's apps, so existing classes keep their look.
20
+ md: "calc(var(--radius) - 2px)",
21
+ sm: "calc(var(--radius) - 4px)",
22
+ },
23
+ colors: {
24
+ background: v("background"),
25
+ foreground: v("foreground"),
26
+ card: pair("card"),
27
+ popover: pair("popover"),
28
+ primary: pair("primary"),
29
+ secondary: pair("secondary"),
30
+ muted: pair("muted"),
31
+ accent: pair("accent"),
32
+ destructive: pair("destructive"),
33
+ border: v("border"),
34
+ input: v("input"),
35
+ ring: v("ring"),
36
+ chart: { 1: v("chart-1"), 2: v("chart-2"), 3: v("chart-3"), 4: v("chart-4"), 5: v("chart-5") },
37
+ brand: { DEFAULT: brand.primary, hover: brand.primaryHover, danger: brand.danger },
38
+ },
39
+ height: { switcher: "var(--scalio-switcher-height)", header: "var(--scalio-header-height)" },
40
+ width: { sidebar: "var(--scalio-sidebar-width)" },
41
+ keyframes: {
42
+ "accordion-down": { from: { height: "0" }, to: { height: "var(--radix-accordion-content-height)" } },
43
+ "accordion-up": { from: { height: "var(--radix-accordion-content-height)" }, to: { height: "0" } },
44
+ },
45
+ animation: {
46
+ "accordion-down": "accordion-down 0.2s ease-out",
47
+ "accordion-up": "accordion-up 0.2s ease-out",
48
+ },
49
+ },
50
+ },
51
+ };
package/tokens.css ADDED
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Scalio "Control Room" design tokens (shadcn/ui CSS variables, HSL without hsl()).
3
+ * Source of truth: spezifikation/UISPEC.md in scalio-rosetta. Light on :root, dark on .dark.
4
+ * Apps import this once (before their own index.css) and drop their own :root/.dark blocks.
5
+ */
6
+ :root {
7
+ --background: 0 0% 100%;
8
+ --foreground: 240 6% 6%;
9
+ --card: 0 0% 100%;
10
+ --card-foreground: 240 6% 6%;
11
+ --popover: 0 0% 100%;
12
+ --popover-foreground: 240 6% 6%;
13
+ --primary: 223 100% 33%;
14
+ --primary-foreground: 0 0% 100%;
15
+ --secondary: 240 5% 96%;
16
+ --secondary-foreground: 240 6% 10%;
17
+ --muted: 240 5% 96%;
18
+ --muted-foreground: 240 4% 40%;
19
+ --accent: 240 5% 95%;
20
+ --accent-foreground: 240 6% 10%;
21
+ --destructive: 0 72% 51%;
22
+ --destructive-foreground: 0 0% 100%;
23
+ --border: 240 6% 90%;
24
+ --input: 240 6% 88%;
25
+ --ring: 223 100% 33%;
26
+ --chart-1: 223 100% 33%;
27
+ --chart-2: 160 84% 39%;
28
+ --chart-3: 38 92% 50%;
29
+ --chart-4: 0 72% 51%;
30
+ --chart-5: 262 60% 50%;
31
+ --radius: 0.25rem;
32
+ --scalio-switcher-height: 32px;
33
+ --scalio-header-height: 60px;
34
+ --scalio-sidebar-width: 240px;
35
+ }
36
+
37
+ .dark {
38
+ --background: 240 6% 7%;
39
+ --foreground: 0 0% 98%;
40
+ --card: 240 5% 11%;
41
+ --card-foreground: 0 0% 98%;
42
+ --popover: 240 6% 10%;
43
+ --popover-foreground: 0 0% 98%;
44
+ --primary: 223 85% 62%;
45
+ --primary-foreground: 0 0% 100%;
46
+ --secondary: 240 4% 16%;
47
+ --secondary-foreground: 0 0% 98%;
48
+ --muted: 240 4% 16%;
49
+ --muted-foreground: 240 5% 65%;
50
+ --accent: 240 4% 18%;
51
+ --accent-foreground: 0 0% 98%;
52
+ --destructive: 0 62% 50%;
53
+ --destructive-foreground: 0 0% 100%;
54
+ --border: 240 4% 20%;
55
+ --input: 240 4% 22%;
56
+ --ring: 223 85% 62%;
57
+ color-scheme: dark;
58
+ }
package/tokens.js ADDED
@@ -0,0 +1,18 @@
1
+ /** Raw Scalio design values for code that cannot read CSS variables (charts, emails, PDFs). */
2
+ const brand = {
3
+ primary: "#002FA7", // Klein Blue
4
+ primaryHover: "#002480",
5
+ danger: "#E53935",
6
+ };
7
+
8
+ const fonts = {
9
+ sans: ["IBM Plex Sans", "ui-sans-serif", "system-ui", "sans-serif"],
10
+ display: ["Chivo", "IBM Plex Sans", "ui-sans-serif", "sans-serif"],
11
+ mono: ["JetBrains Mono", "ui-monospace", "monospace"],
12
+ };
13
+
14
+ const radius = "0.25rem";
15
+
16
+ const layout = { switcherHeight: 32, headerHeight: 60, sidebarWidth: 240 };
17
+
18
+ module.exports = { brand, fonts, radius, layout };