@inkorange/space-ui 1.0.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.
- package/LICENSE +21 -0
- package/dist/components/AlertDialog.d.ts +8 -0
- package/dist/components/Badge.d.ts +42 -0
- package/dist/components/Box.d.ts +15 -0
- package/dist/components/Button.d.ts +20 -0
- package/dist/components/Card.d.ts +13 -0
- package/dist/components/Dialog.d.ts +81 -0
- package/dist/components/DropdownMenu.d.ts +62 -0
- package/dist/components/Flex.d.ts +29 -0
- package/dist/components/Grid.d.ts +28 -0
- package/dist/components/Heading.d.ts +28 -0
- package/dist/components/IconToggle.d.ts +29 -0
- package/dist/components/Link.d.ts +22 -0
- package/dist/components/Loader.d.ts +15 -0
- package/dist/components/Progress.d.ts +14 -0
- package/dist/components/RadioGroup.d.ts +32 -0
- package/dist/components/ScrollArea.d.ts +14 -0
- package/dist/components/Select.d.ts +70 -0
- package/dist/components/Separator.d.ts +11 -0
- package/dist/components/Slider.d.ts +28 -0
- package/dist/components/Tabs.d.ts +61 -0
- package/dist/components/Text.d.ts +34 -0
- package/dist/components/TextArea.d.ts +16 -0
- package/dist/components/TextField.d.ts +30 -0
- package/dist/components/Tooltip.d.ts +18 -0
- package/dist/components/icons.d.ts +27 -0
- package/dist/components/propShared.d.ts +11 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +1356 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/seededRandom.d.ts +6 -0
- package/dist/space-ui.css +1 -0
- package/dist/spaceControls.cjs +2 -0
- package/dist/spaceControls.cjs.map +1 -0
- package/dist/spaceControls.js +6 -0
- package/dist/spaceControls.js.map +1 -0
- package/dist/spaceControls.module-Bk7m5-Ag.js +13 -0
- package/dist/spaceControls.module-Bk7m5-Ag.js.map +1 -0
- package/dist/spaceControls.module-yIFvZ0rt.cjs +2 -0
- package/dist/spaceControls.module-yIFvZ0rt.cjs.map +1 -0
- package/dist/styles/spaceControls.d.ts +2 -0
- package/dist/tokens.css +176 -0
- package/package.json +60 -0
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
Space design-system tokens — Phase 1 of the Radix removal.
|
|
3
|
+
Grays are 7 ROLE tokens (consolidated from 15 Radix variants);
|
|
4
|
+
spacing is a t-shirt scale on the 8pt grid (xs is the 4px
|
|
5
|
+
half-step). Accent/type values are seeded from the measured
|
|
6
|
+
Radix dark theme so the swap is visually silent.
|
|
7
|
+
Spec: docs/superpowers/specs/2026-07-31-radix-removal-design.md
|
|
8
|
+
============================================================ */
|
|
9
|
+
:root {
|
|
10
|
+
/* Grays — role-based (seeded from Radix slate, dark) */
|
|
11
|
+
--sp-gray-text: #edeef0; /* headings, primary text (was gray-12) */
|
|
12
|
+
--sp-gray-text-dim: #b0b4ba; /* secondary text, labels (was gray-11) */
|
|
13
|
+
--sp-gray-muted: #696e77; /* placeholder, disabled, faint (was gray-9) */
|
|
14
|
+
--sp-gray-border: #d6ebfd30; /* hairlines, control borders (was gray-a6) */
|
|
15
|
+
--sp-gray-surface: #d8f4f609; /* subtle washes: hovers, wells (was gray-a2) */
|
|
16
|
+
--sp-gray-panel: #18191b; /* solid card/panel fills (was gray-2);
|
|
17
|
+
split from surface after visual review —
|
|
18
|
+
one alpha value can't serve both the old
|
|
19
|
+
solid panels and the old 3.5% washes */
|
|
20
|
+
--sp-gray-track: #272a2d; /* recessed meter/progress tracks (was gray-4);
|
|
21
|
+
split from border after visual review —
|
|
22
|
+
tracks need the old solid, not 19% alpha */
|
|
23
|
+
|
|
24
|
+
/* ---- Accents ------------------------------------------------------
|
|
25
|
+
Named for the job, never the hue or a step on a ramp — the treatment
|
|
26
|
+
the grays above already had. Two axes, because emphasis and status
|
|
27
|
+
answer different questions: calling "success" a secondary colour
|
|
28
|
+
would say less than "green" did.
|
|
29
|
+
|
|
30
|
+
Suffixes are roles, not tones: -solid fills a shape, -text sits on
|
|
31
|
+
the dark ground, -soft is a wash behind it, -border outlines, -glow
|
|
32
|
+
is a halo. Values are the measured Radix dark theme, so the swap was
|
|
33
|
+
visually silent. */
|
|
34
|
+
|
|
35
|
+
/* Emphasis */
|
|
36
|
+
--sp-primary-solid: #0090ff; /* solid fill: badges, progress */
|
|
37
|
+
--sp-primary-text: #70b8ff; /* links and text on the dark ground */
|
|
38
|
+
--sp-primary-soft: #0077ff3a; /* wash behind soft badges */
|
|
39
|
+
--sp-primary-border: #2870bd; /* focus outlines */
|
|
40
|
+
--sp-primary-glow: #0f89fd7f; /* halo on the loader */
|
|
41
|
+
--sp-primary-deep: #111927; /* deepest tint, gradient ends */
|
|
42
|
+
|
|
43
|
+
/* Status */
|
|
44
|
+
--sp-success-solid: #30a46c;
|
|
45
|
+
--sp-success-text: #3dd68c;
|
|
46
|
+
--sp-success-soft: #22ff991e;
|
|
47
|
+
--sp-warning-text: #ffca16;
|
|
48
|
+
--sp-warning-soft: #fa820022;
|
|
49
|
+
--sp-danger-text: #ff9592;
|
|
50
|
+
--sp-danger-soft: #ff173f2d;
|
|
51
|
+
--sp-accent-text: #baa7ff;
|
|
52
|
+
--sp-accent-soft: #8354fe36;
|
|
53
|
+
|
|
54
|
+
/* ---- Component sizing ---------------------------------------------
|
|
55
|
+
Defaults a consumer can move without touching a component. */
|
|
56
|
+
|
|
57
|
+
/* A Select sizes itself to its widest option, so it never changes width as
|
|
58
|
+
you select. This caps that, past which the label ellipsizes. */
|
|
59
|
+
/* One height for every single-line control, so a field, a select and a
|
|
60
|
+
button line up in a row. Shared as a token because two stylesheets used
|
|
61
|
+
to state it separately with a "keep in sync" comment — and had already
|
|
62
|
+
drifted, the field having no height at all. */
|
|
63
|
+
--sp-control-height: 40px;
|
|
64
|
+
|
|
65
|
+
--sp-select-trigger-max-width: 20rem;
|
|
66
|
+
|
|
67
|
+
/* The option panel grows past the trigger to fit its longest option, so a
|
|
68
|
+
label need not wrap just because the control is narrow. min() keeps it on
|
|
69
|
+
screen on a small viewport. */
|
|
70
|
+
--sp-select-panel-max-width: min(90vw, 28rem);
|
|
71
|
+
|
|
72
|
+
/* ---- Component colours --------------------------------------------
|
|
73
|
+
Values specific to one component's identity rather than a shared role.
|
|
74
|
+
They live here, not in the component, so the promise holds: every colour
|
|
75
|
+
in the system is in this file and swapping it restyles everything. */
|
|
76
|
+
/* Tabs are folder-shaped: they seat onto the surface below and the active
|
|
77
|
+
one breaks through its top border, so the component needs to know that
|
|
78
|
+
surface's colour to recreate it. Set this to whatever the tabs sit on. */
|
|
79
|
+
--sp-tabs-surface-color: #16181b;
|
|
80
|
+
--sp-tabs-rest-from-color: rgba(15, 20, 40, 0.6);
|
|
81
|
+
--sp-tabs-rest-to-color: rgba(7, 10, 20, 0.3);
|
|
82
|
+
--sp-tabs-hover-from-color: rgba(24, 32, 62, 0.75);
|
|
83
|
+
--sp-tabs-hover-to-color: rgba(10, 14, 28, 0.45);
|
|
84
|
+
--sp-tabs-active-from-color: rgba(30, 40, 76, 0.9);
|
|
85
|
+
--sp-tabs-active-edge-color: rgba(190, 215, 255, 0.45);
|
|
86
|
+
|
|
87
|
+
--sp-select-panel-color: #101216;
|
|
88
|
+
|
|
89
|
+
--sp-radio-group-orb-highlight-color: #cfe0ff;
|
|
90
|
+
--sp-radio-group-orb-mid-color: #8fb4ff;
|
|
91
|
+
--sp-radio-group-orb-rim-color: rgba(150, 195, 255, 0.9);
|
|
92
|
+
--sp-radio-group-orb-glow-color: rgba(190, 215, 255, 0.85);
|
|
93
|
+
--sp-radio-group-orb-halo-color: rgba(120, 170, 255, 0.55);
|
|
94
|
+
|
|
95
|
+
--sp-icon-toggle-label-color: #dbe6ef;
|
|
96
|
+
--sp-icon-toggle-label-dim-color: rgba(219, 230, 239, 0.55);
|
|
97
|
+
--sp-icon-toggle-active-from-color: rgba(90, 130, 220, 0.28);
|
|
98
|
+
--sp-icon-toggle-active-rim-color: rgba(140, 170, 255, 0.45);
|
|
99
|
+
--sp-icon-toggle-active-to-color: rgba(90, 130, 220, 0.35);
|
|
100
|
+
|
|
101
|
+
--sp-slider-thumb-highlight-color: #e6f0ff;
|
|
102
|
+
--sp-slider-thumb-mid-color: #86abe8;
|
|
103
|
+
--sp-slider-thumb-shade-color: #23386b;
|
|
104
|
+
--sp-slider-thumb-limb-color: #0b1330;
|
|
105
|
+
--sp-slider-thumb-rim-color: rgba(160, 195, 255, 0.75);
|
|
106
|
+
--sp-slider-thumb-rim-hover-color: rgba(190, 215, 255, 0.9);
|
|
107
|
+
--sp-slider-thumb-glow-hover-color: rgba(130, 175, 255, 0.75);
|
|
108
|
+
--sp-slider-range-from-color: rgba(70, 110, 210, 0.85);
|
|
109
|
+
--sp-panel-item-highlight-color: rgba(220, 230, 255, 0.45);
|
|
110
|
+
|
|
111
|
+
/* A faint neutral wash, for a badge carrying no status. */
|
|
112
|
+
--sp-muted-soft: #ffffff12;
|
|
113
|
+
--sp-on-solid: #ffffff; /* text on a solid accent fill */
|
|
114
|
+
|
|
115
|
+
/* ---- Categorical --------------------------------------------------
|
|
116
|
+
For telling data apart — star classes, planet types — where colour
|
|
117
|
+
distinguishes rather than signals. These keep hue names on purpose:
|
|
118
|
+
in a categorical scale the hue IS the identity, and a ranking word
|
|
119
|
+
like "tertiary" would imply an order that does not exist. */
|
|
120
|
+
--sp-category-cyan-soft: #00befd28;
|
|
121
|
+
--sp-category-cyan-text: #4ccce6;
|
|
122
|
+
--sp-category-purple-soft: #c150ff2d;
|
|
123
|
+
--sp-category-purple-text: #d19dff;
|
|
124
|
+
--sp-category-orange-soft: #fb6a0025;
|
|
125
|
+
--sp-category-orange-text: #ffa057;
|
|
126
|
+
--sp-category-yellow-soft: #ffaa001e;
|
|
127
|
+
--sp-category-yellow-text: #f5e147;
|
|
128
|
+
|
|
129
|
+
/* ---- Lit-glass surfaces -------------------------------------------
|
|
130
|
+
Stored as raw channels, not colours, so a component can vary alpha
|
|
131
|
+
locally — `rgb(var(--sp-rim-rgb) / 0.4)` — while the hue stays a
|
|
132
|
+
single system-level decision. Alpha is about layering; hue is brand.
|
|
133
|
+
Change one line here and every glass surface moves with it. */
|
|
134
|
+
--sp-glass-rgb: 15 20 40; /* panel/button fill, upper stop */
|
|
135
|
+
--sp-glass-deep-rgb: 5 7 15; /* the same fill, lower stop */
|
|
136
|
+
--sp-sheen-rgb: 96 150 250; /* top-left light catching the glass */
|
|
137
|
+
--sp-rim-rgb: 150 190 255; /* the lit atmosphere limb */
|
|
138
|
+
--sp-glow-rgb: 110 160 255; /* hover/focus bloom */
|
|
139
|
+
--sp-glint-rgb: 225 238 255; /* the sweep across the surface */
|
|
140
|
+
--sp-star-rgb: 255 255 255; /* speck highlights */
|
|
141
|
+
--sp-shadow-rgb: 0 0 0; /* ambient drop shadow */
|
|
142
|
+
--sp-glass-text: #eaf2ff; /* text sitting on a glass surface */
|
|
143
|
+
--sp-focus-ring: #9cc0ff; /* keyboard focus outline */
|
|
144
|
+
|
|
145
|
+
/* Ember — the warm variant, for destructive-leaning controls. */
|
|
146
|
+
--sp-ember-glass-rgb: 30 16 14;
|
|
147
|
+
--sp-ember-glass-deep-rgb: 12 6 5;
|
|
148
|
+
--sp-ember-sheen-rgb: 250 150 96;
|
|
149
|
+
--sp-ember-rim-rgb: 255 180 130;
|
|
150
|
+
--sp-ember-glow-rgb: 255 150 100;
|
|
151
|
+
|
|
152
|
+
/* Spacing — 8pt grid, xs = 4px half-step */
|
|
153
|
+
--spacing-xs: 4px;
|
|
154
|
+
--spacing-sm: 8px;
|
|
155
|
+
--spacing-md: 16px;
|
|
156
|
+
--spacing-lg: 24px;
|
|
157
|
+
--spacing-xl: 32px;
|
|
158
|
+
|
|
159
|
+
/* Font family. The library does NOT set a family on any component —
|
|
160
|
+
everything inherits the host app's font, and nothing portals out of
|
|
161
|
+
the tree, so inheritance always reaches it. Badge is the sole
|
|
162
|
+
exception: Radix deliberately pinned badges to the system stack and
|
|
163
|
+
the port kept that for parity. This token IS that pin, exposed so a
|
|
164
|
+
consumer can bring badges onto their own brand font instead of being
|
|
165
|
+
stuck on the system stack. Override it and only Badge changes;
|
|
166
|
+
everything else already follows your app. */
|
|
167
|
+
--sp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI (Custom)", Roboto,
|
|
168
|
+
"Helvetica Neue", "Open Sans (Custom)", system-ui, sans-serif,
|
|
169
|
+
"Apple Color Emoji", "Segoe UI Emoji";
|
|
170
|
+
|
|
171
|
+
/* Type scale (seeded from Radix font-size steps in use) */
|
|
172
|
+
--sp-font-xs: 12px;
|
|
173
|
+
--sp-font-sm: 14px;
|
|
174
|
+
--sp-font-md: 16px;
|
|
175
|
+
--sp-font-xl: 24px;
|
|
176
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inkorange/space-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "SpaceUI — a space-themed React component library and design system",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"provenance": true
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/inkorange/space-ui"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"**/*.css"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"main": "./dist/index.cjs",
|
|
22
|
+
"module": "./dist/index.js",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./styles.css": "./dist/space-ui.css",
|
|
31
|
+
"./tokens.css": "./dist/tokens.css",
|
|
32
|
+
"./spaceControls": {
|
|
33
|
+
"types": "./dist/spaceControls.d.ts",
|
|
34
|
+
"import": "./dist/spaceControls.js",
|
|
35
|
+
"require": "./dist/spaceControls.cjs"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"react": ">=19",
|
|
40
|
+
"react-dom": ">=19"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@testing-library/react": "^16.3.0",
|
|
44
|
+
"@types/react": "^19",
|
|
45
|
+
"@types/react-dom": "^19",
|
|
46
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
47
|
+
"happy-dom": "^18.0.0",
|
|
48
|
+
"react": "^19",
|
|
49
|
+
"react-dom": "^19",
|
|
50
|
+
"sass": "^1.89.0",
|
|
51
|
+
"typescript": "^5.8.0",
|
|
52
|
+
"vite": "^6.3.0",
|
|
53
|
+
"vitest": "^3.2.0"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly && cp src/styles/tokens.css dist/tokens.css",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"typecheck": "tsc --noEmit"
|
|
59
|
+
}
|
|
60
|
+
}
|