@realminc/ui 0.9.0 → 0.10.0

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.
@@ -1,3 +1,16 @@
1
- import { Config } from 'tailwindcss';
1
+ /**
2
+ * Realm Design System - Tailwind Preset
3
+ * Based on IBM Design Language: https://www.ibm.com/design/language/typography
4
+ *
5
+ * Use this preset in your app's tailwind.config.js:
6
+ *
7
+ * import realmPreset from '@realm/ui/tailwind';
8
+ *
9
+ * export default {
10
+ * presets: [realmPreset],
11
+ * content: [...],
12
+ * }
13
+ */
14
+ import type { Config } from 'tailwindcss';
2
15
  declare const preset: Partial<Config>;
3
16
  export default preset;
package/dist/tailwind.js CHANGED
@@ -1,20 +1,109 @@
1
- "use client";
2
- import { borderRadius as t, fontSize as s, fonts as a, colors as e } from "./theme.js";
3
- const n = {
1
+ 'use client';
2
+
3
+ // src/styles/theme.ts
4
+ var colors = {
5
+ realm: {
6
+ bg: {
7
+ base: "#0a0a0a",
8
+ widget: "#1a1a1a",
9
+ hover: "#222222",
10
+ active: "#303030",
11
+ input: "#111111",
12
+ line: "#111111"
13
+ },
14
+ text: {
15
+ primary: "#f5f5f5",
16
+ secondary: "#d4d4d4",
17
+ tertiary: "#909090",
18
+ muted: "#666666",
19
+ faint: "#4a4a4a"
20
+ },
21
+ border: {
22
+ subtle: "rgba(255, 255, 255, 0.06)",
23
+ DEFAULT: "rgba(255, 255, 255, 0.10)",
24
+ strong: "rgba(255, 255, 255, 0.15)"
25
+ },
26
+ buy: "#30d158",
27
+ buyMuted: "rgba(48, 209, 88, 0.15)",
28
+ sell: "#ff453a",
29
+ sellMuted: "rgba(255, 69, 58, 0.15)",
30
+ accent: {
31
+ DEFAULT: "#6366f1",
32
+ hover: "#818cf8"
33
+ }
34
+ },
35
+ light: {
36
+ bg: {
37
+ base: "#fafafa",
38
+ widget: "#ffffff",
39
+ hover: "#f5f5f5",
40
+ active: "#f0f0f0",
41
+ input: "#ffffff"
42
+ },
43
+ text: {
44
+ primary: "#0a0a0a",
45
+ secondary: "#262626",
46
+ tertiary: "#525252",
47
+ muted: "#737373",
48
+ faint: "#a3a3a3"
49
+ },
50
+ border: {
51
+ subtle: "rgba(0, 0, 0, 0.05)",
52
+ DEFAULT: "rgba(0, 0, 0, 0.08)",
53
+ strong: "rgba(0, 0, 0, 0.12)"
54
+ }
55
+ }
56
+ };
57
+ var fonts = {
58
+ sans: ["IBM Plex Sans", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "sans-serif"],
59
+ mono: ["Intel One Mono", "SF Mono", "Fira Code", "monospace"]
60
+ };
61
+ var fontSize = {
62
+ "display-01": ["2.625rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
63
+ "display-02": ["3.375rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
64
+ "heading-01": ["0.875rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "600" }],
65
+ "heading-02": ["1rem", { lineHeight: "1.25", fontWeight: "600" }],
66
+ "heading-03": ["1.25rem", { lineHeight: "1.25", fontWeight: "500" }],
67
+ "heading-04": ["1.75rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "500" }],
68
+ "heading-05": ["2rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "400" }],
69
+ "heading-06": ["2.625rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
70
+ "heading-07": ["3.375rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
71
+ "body-compact-01": ["0.875rem", { lineHeight: "1.25", fontWeight: "400" }],
72
+ "body-compact-02": ["1rem", { lineHeight: "1.25", fontWeight: "400" }],
73
+ "body-01": ["0.875rem", { lineHeight: "1.5", fontWeight: "400" }],
74
+ "body-02": ["1rem", { lineHeight: "1.5", fontWeight: "400" }],
75
+ "label-01": ["0.75rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "400" }],
76
+ "label-02": ["0.875rem", { lineHeight: "1.25", fontWeight: "500" }],
77
+ "helper-01": ["0.75rem", { lineHeight: "1.5", fontWeight: "400" }],
78
+ "code-01": ["0.75rem", { lineHeight: "1.5", fontWeight: "400" }],
79
+ "code-02": ["0.875rem", { lineHeight: "1.5", fontWeight: "400" }],
80
+ "widget-header": ["0.6875rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "500" }],
81
+ "widget-label": ["0.625rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "400" }],
82
+ price: ["0.8125rem", { lineHeight: "1.25", fontWeight: "400" }],
83
+ "price-lg": ["1.5rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "500" }]
84
+ };
85
+ var borderRadius = {
86
+ sm: "4px",
87
+ DEFAULT: "6px",
88
+ lg: "8px",
89
+ xl: "8px",
90
+ "2xl": "12px"
91
+ };
92
+
93
+ // src/styles/tailwind.preset.ts
94
+ var preset = {
4
95
  theme: {
5
96
  extend: {
6
97
  colors: {
7
- realm: e.realm,
8
- light: e.light
98
+ realm: colors.realm,
99
+ light: colors.light
9
100
  },
10
101
  fontFamily: {
11
- // IBM Plex Sans for all UI
12
- sans: a.sans,
13
- // Intel One Mono for code
14
- mono: a.mono
102
+ sans: fonts.sans,
103
+ mono: fonts.mono
15
104
  },
16
- fontSize: s,
17
- borderRadius: t,
105
+ fontSize,
106
+ borderRadius,
18
107
  animation: {
19
108
  "fade-in": "fadeIn 300ms ease-out",
20
109
  "slide-up": "slideUp 300ms ease-out",
@@ -42,6 +131,7 @@ const n = {
42
131
  }
43
132
  }
44
133
  };
134
+ var tailwind_preset_default = preset;
45
135
  export {
46
- n as default
136
+ tailwind_preset_default as default
47
137
  };
package/dist/theme.js CHANGED
@@ -1,50 +1,37 @@
1
- "use client";
2
- const e = {
3
- // Dark theme - Revolut-inspired neutral greys
1
+ 'use client';
2
+
3
+ // src/styles/theme.ts
4
+ var colors = {
4
5
  realm: {
5
6
  bg: {
6
7
  base: "#0a0a0a",
7
- // Canonical dark background (design.mdc)
8
8
  widget: "#1a1a1a",
9
- // Elevated surface - widget panels
10
9
  hover: "#222222",
11
- // Hover state
12
10
  active: "#303030",
13
- // Active/pressed state
14
11
  input: "#111111",
15
- // Input fields
16
12
  line: "#111111"
17
- // Bordered line tables and API contracts
18
13
  },
19
14
  text: {
20
15
  primary: "#f5f5f5",
21
- // Soft white - headings
22
16
  secondary: "#d4d4d4",
23
- // 83% - body text
24
17
  tertiary: "#909090",
25
- // 56% - labels, hints
26
18
  muted: "#666666",
27
- // 40% - disabled
28
19
  faint: "#4a4a4a"
29
- // 29% - very subtle
30
20
  },
31
21
  border: {
32
22
  subtle: "rgba(255, 255, 255, 0.06)",
33
23
  DEFAULT: "rgba(255, 255, 255, 0.10)",
34
24
  strong: "rgba(255, 255, 255, 0.15)"
35
25
  },
36
- // Trading colors - Apple-style
37
26
  buy: "#30d158",
38
27
  buyMuted: "rgba(48, 209, 88, 0.15)",
39
28
  sell: "#ff453a",
40
29
  sellMuted: "rgba(255, 69, 58, 0.15)",
41
- // Accent
42
30
  accent: {
43
31
  DEFAULT: "#6366f1",
44
32
  hover: "#818cf8"
45
33
  }
46
34
  },
47
- // Light theme (for landing page)
48
35
  light: {
49
36
  bg: {
50
37
  base: "#fafafa",
@@ -66,16 +53,14 @@ const e = {
66
53
  strong: "rgba(0, 0, 0, 0.12)"
67
54
  }
68
55
  }
69
- }, t = {
70
- // UI text, headings, body - IBM Plex Sans
56
+ };
57
+ var fonts = {
71
58
  sans: ["IBM Plex Sans", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "sans-serif"],
72
- // Code blocks, terminals - Intel One Mono
73
59
  mono: ["Intel One Mono", "SF Mono", "Fira Code", "monospace"]
74
- }, i = {
75
- // Display - Hero sections, marketing
60
+ };
61
+ var fontSize = {
76
62
  "display-01": ["2.625rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
77
63
  "display-02": ["3.375rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
78
- // Headings
79
64
  "heading-01": ["0.875rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "600" }],
80
65
  "heading-02": ["1rem", { lineHeight: "1.25", fontWeight: "600" }],
81
66
  "heading-03": ["1.25rem", { lineHeight: "1.25", fontWeight: "500" }],
@@ -83,61 +68,59 @@ const e = {
83
68
  "heading-05": ["2rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "400" }],
84
69
  "heading-06": ["2.625rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
85
70
  "heading-07": ["3.375rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "300" }],
86
- // Body
87
71
  "body-compact-01": ["0.875rem", { lineHeight: "1.25", fontWeight: "400" }],
88
72
  "body-compact-02": ["1rem", { lineHeight: "1.25", fontWeight: "400" }],
89
73
  "body-01": ["0.875rem", { lineHeight: "1.5", fontWeight: "400" }],
90
74
  "body-02": ["1rem", { lineHeight: "1.5", fontWeight: "400" }],
91
- // Utility
92
75
  "label-01": ["0.75rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "400" }],
93
76
  "label-02": ["0.875rem", { lineHeight: "1.25", fontWeight: "500" }],
94
77
  "helper-01": ["0.75rem", { lineHeight: "1.5", fontWeight: "400" }],
95
78
  "code-01": ["0.75rem", { lineHeight: "1.5", fontWeight: "400" }],
96
79
  "code-02": ["0.875rem", { lineHeight: "1.5", fontWeight: "400" }],
97
- // Widget-specific
98
80
  "widget-header": ["0.6875rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "500" }],
99
81
  "widget-label": ["0.625rem", { lineHeight: "1.25", letterSpacing: "0.1em", fontWeight: "400" }],
100
82
  price: ["0.8125rem", { lineHeight: "1.25", fontWeight: "400" }],
101
83
  "price-lg": ["1.5rem", { lineHeight: "1.25", letterSpacing: "-0.02em", fontWeight: "500" }]
102
- }, n = {
84
+ };
85
+ var borderRadius = {
103
86
  sm: "4px",
104
87
  DEFAULT: "6px",
105
88
  lg: "8px",
106
89
  xl: "8px",
107
- // Widgets
108
90
  "2xl": "12px"
109
- }, a = {
91
+ };
92
+ var zIndex = {
110
93
  dropdown: 50,
111
94
  navbar: 50,
112
95
  modalBackdrop: 60,
113
96
  modal: 70,
114
97
  toast: 80
115
- }, g = {
116
- // Page entrance
98
+ };
99
+ var animation = {
117
100
  entrance: {
118
101
  duration: 300,
119
102
  stagger: 30
120
- // ms between each item
121
103
  },
122
- // Hover transitions
123
104
  hover: {
124
105
  duration: 200
125
106
  }
126
- }, r = {
127
- colors: e,
128
- fonts: t,
129
- fontSize: i,
130
- borderRadius: n,
131
- zIndex: a,
132
- animation: g
133
107
  };
108
+ var theme = {
109
+ colors,
110
+ fonts,
111
+ fontSize,
112
+ borderRadius,
113
+ zIndex,
114
+ animation
115
+ };
116
+ var theme_default = theme;
134
117
  export {
135
- g as animation,
136
- n as borderRadius,
137
- e as colors,
138
- r as default,
139
- i as fontSize,
140
- t as fonts,
141
- r as theme,
142
- a as zIndex
118
+ animation,
119
+ borderRadius,
120
+ colors,
121
+ theme_default as default,
122
+ fontSize,
123
+ fonts,
124
+ theme,
125
+ zIndex
143
126
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realminc/ui",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "packageManager": "bun@1.4.2",
5
5
  "description": "Realm Design System - Shared UI components, styles, and assets",
6
6
  "type": "module",
@@ -36,11 +36,12 @@
36
36
  "!public/images/tokens"
37
37
  ],
38
38
  "scripts": {
39
- "dev": "vite build --watch",
40
- "build": "tsc && vite build && bun scripts/copy-package-assets.mjs",
39
+ "dev": "bun --bun scripts/build_package.mjs --watch",
40
+ "build": "bun --bun scripts/build_package.mjs",
41
41
  "lint": "eslint src --ext ts,tsx",
42
- "typecheck": "tsc --noEmit",
43
- "prepublishOnly": "bun run build"
42
+ "typecheck": "bun --bun tsc --noEmit",
43
+ "prepublishOnly": "bun run --bun build",
44
+ "check:package": "bun --bun scripts/verify_package.mjs"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "react": "^18.0.0 || ^19.0.0",
@@ -49,13 +50,10 @@
49
50
  "devDependencies": {
50
51
  "@types/react": "^19.0.0",
51
52
  "@types/react-dom": "^19.0.0",
52
- "@vitejs/plugin-react": "^4.3.4",
53
53
  "react": "^19.0.0",
54
54
  "react-dom": "^19.0.0",
55
55
  "tailwindcss": "^4.1.18",
56
- "typescript": "^5.7.2",
57
- "vite": "^6.0.7",
58
- "vite-plugin-dts": "^4.3.0"
56
+ "typescript": "^5.7.2"
59
57
  },
60
58
  "dependencies": {
61
59
  "@fontsource/ibm-plex-mono": "^5.2.7",