@surreal-ui/catalog 0.0.0-stage → 0.9.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/README.md +219 -2
- package/THIRD_PARTY_NOTICES.md +88 -0
- package/dist/aesthetics/claymorphism.css +82 -0
- package/dist/aesthetics/claymorphism.tailwind.css +41 -0
- package/dist/aesthetics/flat-design.css +69 -0
- package/dist/aesthetics/flat-design.tailwind.css +31 -0
- package/dist/aesthetics/glassmorphism.css +78 -0
- package/dist/aesthetics/glassmorphism.tailwind.css +38 -0
- package/dist/aesthetics/ink.css +63 -0
- package/dist/aesthetics/ink.tailwind.css +27 -0
- package/dist/aesthetics/low-fi.css +69 -0
- package/dist/aesthetics/low-fi.tailwind.css +31 -0
- package/dist/aesthetics/minimalist.css +62 -0
- package/dist/aesthetics/minimalist.tailwind.css +26 -0
- package/dist/aesthetics/neubrutalism.css +75 -0
- package/dist/aesthetics/neubrutalism.tailwind.css +36 -0
- package/dist/aesthetics/neumorphism.css +79 -0
- package/dist/aesthetics/neumorphism.tailwind.css +39 -0
- package/dist/aesthetics/skeuomorphism.css +82 -0
- package/dist/aesthetics/skeuomorphism.tailwind.css +41 -0
- package/dist/chunk-25IVRYZA.js +27 -0
- package/dist/chunk-F5CUZM5I.js +45 -0
- package/dist/chunk-G2FSYMIB.js +4592 -0
- package/dist/chunk-GPANDAGY.js +28 -0
- package/dist/chunk-HMNTTISG.js +37 -0
- package/dist/chunk-LABYZELU.js +16 -0
- package/dist/chunk-QXBVF73N.js +9 -0
- package/dist/chunk-RQDMI22F.js +13 -0
- package/dist/chunk-U7AWQRKQ.js +99 -0
- package/dist/chunk-W62I6I7H.js +27 -0
- package/dist/chunk-WMOLNGMX.js +25 -0
- package/dist/chunk-XCNTHMGU.js +22 -0
- package/dist/chunk-XUCGTGMD.js +23 -0
- package/dist/chunk-Y6GB4WUT.js +49 -0
- package/dist/chunk-Z6XYVVZK.js +28 -0
- package/dist/chunk-ZYD3ZW7Q.js +71 -0
- package/dist/components.css +471 -0
- package/dist/index.d.ts +193 -0
- package/dist/index.js +44 -0
- package/dist/lazy.d.ts +28 -0
- package/dist/lazy.js +73 -0
- package/dist/look.d.ts +69 -0
- package/dist/look.js +173 -0
- package/dist/naming.d.ts +46 -0
- package/dist/naming.js +64 -0
- package/dist/node.d.ts +45 -0
- package/dist/node.js +75 -0
- package/dist/react/editor.d.ts +40 -0
- package/dist/react/editor.js +98 -0
- package/dist/react/flair.d.ts +41 -0
- package/dist/react/flair.js +130 -0
- package/dist/react/index.d.ts +126 -0
- package/dist/react/index.js +65 -0
- package/dist/react-56O72WA6.js +7 -0
- package/dist/react-7CADZBSC.js +6 -0
- package/dist/react-AGH5W4PH.js +6 -0
- package/dist/react-DXQG3CE5.js +6 -0
- package/dist/react-FAD2JH2Y.js +6 -0
- package/dist/react-FMP5BE3O.js +6 -0
- package/dist/react-NUMFK32C.js +6 -0
- package/dist/react-OJ5T2WWQ.js +6 -0
- package/dist/react-VJRYMVT4.js +6 -0
- package/dist/react-XUETU4ES.js +6 -0
- package/dist/react-YZTF3C5A.js +6 -0
- package/dist/react-Z2762UX7.js +6 -0
- package/dist/react-ZTIMDIYB.js +6 -0
- package/dist/registry.d.ts +40 -0
- package/dist/registry.js +5 -0
- package/dist/sources/badge/docs.md +19 -0
- package/dist/sources/badge/element.ts +19 -0
- package/dist/sources/badge/react.tsx +15 -0
- package/dist/sources/badge/style.css +19 -0
- package/dist/sources/badge/svelte.svelte +15 -0
- package/dist/sources/bar-chart/react.tsx +77 -0
- package/dist/sources/button/docs.md +19 -0
- package/dist/sources/button/element.ts +36 -0
- package/dist/sources/button/react.tsx +33 -0
- package/dist/sources/button/style.css +64 -0
- package/dist/sources/button/svelte.svelte +40 -0
- package/dist/sources/card/docs.md +24 -0
- package/dist/sources/card/element.ts +68 -0
- package/dist/sources/card/react.tsx +50 -0
- package/dist/sources/card/style.css +54 -0
- package/dist/sources/card/svelte.svelte +47 -0
- package/dist/sources/checkbox/docs.md +19 -0
- package/dist/sources/checkbox/element.ts +72 -0
- package/dist/sources/checkbox/react.tsx +70 -0
- package/dist/sources/checkbox/style.css +54 -0
- package/dist/sources/checkbox/svelte.svelte +49 -0
- package/dist/sources/gauge/react.tsx +59 -0
- package/dist/sources/input/docs.md +19 -0
- package/dist/sources/input/element.ts +45 -0
- package/dist/sources/input/react.tsx +34 -0
- package/dist/sources/input/style.css +28 -0
- package/dist/sources/input/svelte.svelte +31 -0
- package/dist/sources/kbd/docs.md +19 -0
- package/dist/sources/kbd/element.ts +14 -0
- package/dist/sources/kbd/react.tsx +7 -0
- package/dist/sources/kbd/style.css +20 -0
- package/dist/sources/kbd/svelte.svelte +12 -0
- package/dist/sources/label/docs.md +21 -0
- package/dist/sources/label/element.ts +28 -0
- package/dist/sources/label/react.tsx +22 -0
- package/dist/sources/label/style.css +11 -0
- package/dist/sources/label/svelte.svelte +17 -0
- package/dist/sources/progress/docs.md +19 -0
- package/dist/sources/progress/element.ts +42 -0
- package/dist/sources/progress/react.tsx +34 -0
- package/dist/sources/progress/style.css +26 -0
- package/dist/sources/progress/svelte.svelte +30 -0
- package/dist/sources/separator/docs.md +19 -0
- package/dist/sources/separator/element.ts +18 -0
- package/dist/sources/separator/react.tsx +24 -0
- package/dist/sources/separator/style.css +14 -0
- package/dist/sources/separator/svelte.svelte +24 -0
- package/dist/sources/skeleton/docs.md +19 -0
- package/dist/sources/skeleton/element.ts +16 -0
- package/dist/sources/skeleton/react.tsx +27 -0
- package/dist/sources/skeleton/style.css +25 -0
- package/dist/sources/skeleton/svelte.svelte +21 -0
- package/dist/sources/sparkline/react.tsx +53 -0
- package/dist/sources/spinner/docs.md +19 -0
- package/dist/sources/spinner/element.ts +36 -0
- package/dist/sources/spinner/react.tsx +24 -0
- package/dist/sources/spinner/style.css +42 -0
- package/dist/sources/spinner/svelte.svelte +24 -0
- package/dist/sources/switch/docs.md +19 -0
- package/dist/sources/switch/element.ts +53 -0
- package/dist/sources/switch/react.tsx +59 -0
- package/dist/sources/switch/style.css +51 -0
- package/dist/sources/switch/svelte.svelte +41 -0
- package/dist/sources/textarea/docs.md +19 -0
- package/dist/sources/textarea/element.ts +44 -0
- package/dist/sources/textarea/react.tsx +38 -0
- package/dist/sources/textarea/style.css +33 -0
- package/dist/sources/textarea/svelte.svelte +24 -0
- package/dist/svelte/Badge.svelte +15 -0
- package/dist/svelte/Button.svelte +40 -0
- package/dist/svelte/Card.svelte +47 -0
- package/dist/svelte/Checkbox.svelte +49 -0
- package/dist/svelte/Input.svelte +31 -0
- package/dist/svelte/Kbd.svelte +12 -0
- package/dist/svelte/Label.svelte +17 -0
- package/dist/svelte/Progress.svelte +30 -0
- package/dist/svelte/Separator.svelte +24 -0
- package/dist/svelte/Skeleton.svelte +21 -0
- package/dist/svelte/Spinner.svelte +24 -0
- package/dist/svelte/SurrealTheme.svelte +37 -0
- package/dist/svelte/Switch.svelte +41 -0
- package/dist/svelte/Textarea.svelte +24 -0
- package/dist/svelte/index.d.ts +18 -0
- package/dist/svelte/index.js +15 -0
- package/dist/svelte/lazy.d.ts +3 -0
- package/dist/svelte/lazy.js +29 -0
- package/dist/svelte/runtime.d.ts +16 -0
- package/dist/svelte/runtime.js +31 -0
- package/dist/theme-V1Iz-HmC.d.ts +26 -0
- package/dist/theme.d.ts +16 -0
- package/dist/theme.js +384 -0
- package/dist/web/index.d.ts +135 -0
- package/dist/web/index.js +526 -0
- package/llms.txt +62 -0
- package/package.json +151 -3
- package/skills/surreal-author/SKILL.md +59 -0
- package/skills/surreal-author/references/aesthetic.md +52 -0
- package/skills/surreal-author/references/component.md +110 -0
- package/skills/surreal-use/SKILL.md +83 -0
- package/skills/surreal-use/references/aesthetics.md +13 -0
- package/skills/surreal-use/references/components.md +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pixerate
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,220 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @surreal-ui/catalog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Drop-in UI components for React and Svelte: one implementation per component type, restyled by aesthetics, with the catalog and agent skills shipped in the package.</strong>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@surreal-ui/catalog"><img src="https://img.shields.io/npm/v/@surreal-ui/catalog.svg?style=flat-square&color=violet" alt="npm version" /></a>
|
|
9
|
+
<a href="https://ui.pixerate.com"><img src="https://img.shields.io/badge/site-ui.pixerate.com-000000.svg?style=flat-square" alt="Site" /></a>
|
|
10
|
+
<a href="#license"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT License" /></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🌟 Overview
|
|
16
|
+
|
|
17
|
+
Surreal UI does for UI components what [`@pixerate/flair`](https://www.npmjs.com/package/@pixerate/flair) does for visual effects: a library you install and drop into an app, whose catalog grows release by release.
|
|
18
|
+
|
|
19
|
+
- 🧱 **One implementation per component type.** A switch is one React component and one Svelte component, not a copy per look.
|
|
20
|
+
- 🎨 **Aesthetics restyle everything.** An aesthetic (ink, glassmorphism, neubrutalism, minimalist, …) is a CSS pack of colour roles, shape and motion, built from a `ui-aesthetic` skill. Components draw only with those roles, so every component works in every aesthetic, light and dark, and switching one is an attribute.
|
|
21
|
+
- 📚 **The catalog ships in the package.** Every component's contract (props, controlled state, events, accessibility, colour roles), examples and category, and every aesthetic, are data you can query offline from the installed version.
|
|
22
|
+
- 🤖 **Ready for coding agents.** Two agent skills (`surreal-use`, `surreal-author`) and an `llms.txt` come in the package, generated from the same catalog.
|
|
23
|
+
- ✅ **Checked in a real browser.** Every example is rendered in every aesthetic, light and dark, in Chromium, and checked for text contrast (WCAG AA), hit targets and reduced motion before release.
|
|
24
|
+
|
|
25
|
+
## 🧩 What's in the catalog
|
|
26
|
+
|
|
27
|
+
- **Baseline components** (the shadcn/ui set, growing each release): badge, button, card, checkbox, input, kbd, label, progress, separator, skeleton, spinner, switch and textarea, each for React, Svelte and as a WebComponent.
|
|
28
|
+
- **Data visuals** from [`@pixerate/editor`](https://www.npmjs.com/package/@pixerate/editor) (bar chart, sparkline) and [`@pixerate/flair`](https://www.npmjs.com/package/@pixerate/flair) (gauge), plus Flair alternatives for switch and progress, coloured by the aesthetic's roles.
|
|
29
|
+
- **Aesthetics**: claymorphism, flat design, glassmorphism, ink, low-fi, minimalist, neubrutalism, neumorphism and skeuomorphism.
|
|
30
|
+
|
|
31
|
+
The old aesthetic-prefixed components (`MinimalistButton`, …) of `@surreal-ui/react`, `svelte` and `web` are deprecated aliases of these types in their aesthetic, for the types collapsed so far (#44); `replacementFor('MinimalistButton')` says which.
|
|
32
|
+
|
|
33
|
+
The package's `llms.txt` and `skills/surreal-use/references/` list every component and aesthetic in the installed version, one line each; `COMPONENTS` and `AESTHETICS` are the same lists in code.
|
|
34
|
+
|
|
35
|
+
## 📦 Install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @surreal-ui/catalog
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
React 18+ or Svelte 5. Install `@pixerate/flair` or `@pixerate/editor` only if you use the components that come from them.
|
|
42
|
+
|
|
43
|
+
| Entry point | What it has |
|
|
44
|
+
| ------------------------------------ | ---------------------------------------------------------------------------- |
|
|
45
|
+
| `@surreal-ui/catalog` | The catalog API: components, categories, aesthetics, contracts, packs |
|
|
46
|
+
| `@surreal-ui/catalog/lazy` | The same metadata, with each React component loaded on demand |
|
|
47
|
+
| `@surreal-ui/catalog/react` | React components |
|
|
48
|
+
| `@surreal-ui/catalog/react/flair` | Components drawn by Flair (needs `@pixerate/flair`) |
|
|
49
|
+
| `@surreal-ui/catalog/react/editor` | Charts from editor (needs `@pixerate/editor`) |
|
|
50
|
+
| `@surreal-ui/catalog/svelte` | Svelte 5 components (`/svelte/lazy` to load them on demand) |
|
|
51
|
+
| `@surreal-ui/catalog/components.css` | The styles every component needs |
|
|
52
|
+
| `@surreal-ui/catalog/aesthetics/*` | One CSS pack per aesthetic, e.g. `@surreal-ui/catalog/aesthetics/ink.css` |
|
|
53
|
+
| `@surreal-ui/catalog/web` | WebComponents: importing it defines `<surreal-button>`, `<surreal-theme>`, … |
|
|
54
|
+
| `@surreal-ui/catalog/node` | `installSkills` (Node only) |
|
|
55
|
+
| `@surreal-ui/catalog/naming` | Naming helpers shared by the packages, the CLI and the service |
|
|
56
|
+
| `@surreal-ui/catalog/registry` | The hosted registry's item types (shadcn registry-item compatible) |
|
|
57
|
+
| `@surreal-ui/catalog/theme` | A `Theme` as Tailwind v4 custom properties |
|
|
58
|
+
| `@surreal-ui/catalog/look` | The deterministic look checks (contrast, hit targets, reduced motion) |
|
|
59
|
+
|
|
60
|
+
## 🚀 Drop in
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import '@surreal-ui/catalog/components.css';
|
|
64
|
+
import '@surreal-ui/catalog/aesthetics/ink.css';
|
|
65
|
+
import { Button, Switch } from '@surreal-ui/catalog/react';
|
|
66
|
+
|
|
67
|
+
export function Settings() {
|
|
68
|
+
const [on, setOn] = useState(true);
|
|
69
|
+
return (
|
|
70
|
+
<div data-aesthetic="ink" data-theme="system">
|
|
71
|
+
<Switch label="Email alerts" checked={on} onCheckedChange={setOn} />
|
|
72
|
+
<Button>Save changes</Button>
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Svelte 5:
|
|
79
|
+
|
|
80
|
+
```svelte
|
|
81
|
+
<script lang="ts">
|
|
82
|
+
import '@surreal-ui/catalog/components.css';
|
|
83
|
+
import '@surreal-ui/catalog/aesthetics/ink.css';
|
|
84
|
+
import { Button, Switch } from '@surreal-ui/catalog/svelte';
|
|
85
|
+
|
|
86
|
+
let on = $state(true);
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<div data-aesthetic="ink" data-theme="system">
|
|
90
|
+
<Switch label="Email alerts" bind:checked={on} />
|
|
91
|
+
<Button>Save changes</Button>
|
|
92
|
+
</div>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Controlled state follows each component's contract: `checked` with `onCheckedChange` in React, `bind:checked` in Svelte; leave it out for an uncontrolled component.
|
|
96
|
+
|
|
97
|
+
Components from Flair and editor have their own entries, so the core components need neither:
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
import { FlairToggleSwitch, Gauge } from '@surreal-ui/catalog/react/flair'; // needs @pixerate/flair
|
|
101
|
+
import { Sparkline, BarChart } from '@surreal-ui/catalog/react/editor'; // needs @pixerate/editor
|
|
102
|
+
|
|
103
|
+
<FlairToggleSwitch checked={on} onCheckedChange={setOn} label="Wi-Fi" />
|
|
104
|
+
<Sparkline values={[3, 5, 4, 8, 6, 9]} />
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 🎨 Apply an aesthetic
|
|
108
|
+
|
|
109
|
+
Load a pack and wrap the subtree in `<SurrealTheme>` (or put `data-aesthetic="<id>"` on any ancestor, for styling alone); different parts of a page can use different aesthetics. Dark mode follows a `.dark` ancestor or `data-theme="dark"`, and `data-theme="system"` follows the OS. Switch aesthetics by changing the attribute and loading that pack.
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import { SurrealTheme, Card } from '@surreal-ui/catalog/react';
|
|
113
|
+
|
|
114
|
+
<SurrealTheme aesthetic="glassmorphism" mode="system">
|
|
115
|
+
<Card title="Quarterly report">…</Card>
|
|
116
|
+
</SurrealTheme>;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`<SurrealTheme>` (React and Svelte; `<surreal-theme aesthetic="ink">` for WebComponents) sets `data-aesthetic`/`data-theme` and tells components their aesthetic. A type declares **structural variants** where an aesthetic needs different structure, not just different tokens, and the pack picks one. For example, `card` has `default` and `layered`, and the glassmorphism pack picks `layered`, which adds backdrop and sheen layers.
|
|
120
|
+
|
|
121
|
+
A pack is `aesthetics/<id>/aesthetic.json` (tokens and roles) plus an optional `pack.json` (`structures`, `presets`) and `pack.css` (per-type overrides, nested under the pack's selector). Each aesthetic also ships as a Tailwind v4 theme: `@surreal-ui/catalog/aesthetics/<id>.tailwind.css`.
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { AESTHETICS, aestheticPack, aestheticSkillFiles } from '@surreal-ui/catalog';
|
|
125
|
+
|
|
126
|
+
AESTHETICS.map((a) => a.id); // every aesthetic in this version
|
|
127
|
+
aestheticPack('ink'); // { stylesheet, tailwind, attribute: { 'data-aesthetic': 'ink' }, structures, presets }
|
|
128
|
+
aestheticSkillFiles('ink'); // its SKILL.md (the look's rules) and aesthetic.json (tokens, roles, shape, motion)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
`aestheticPackCss(id, profile, COLOR_ROLES, { scope: ':root' })` writes a pack for a page that is entirely in one aesthetic, and `aestheticPackVars` returns one mode's variables to set inline.
|
|
132
|
+
|
|
133
|
+
## 🔎 Browse the catalog
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
import {
|
|
137
|
+
CATEGORIES,
|
|
138
|
+
findComponents,
|
|
139
|
+
getComponent,
|
|
140
|
+
componentContract,
|
|
141
|
+
componentExamples
|
|
142
|
+
} from '@surreal-ui/catalog';
|
|
143
|
+
|
|
144
|
+
CATEGORIES.map((c) => c.id); // action, form, display, feedback, layout, navigation, overlay, data-visual
|
|
145
|
+
findComponents({ category: 'form', platform: 'svelte' });
|
|
146
|
+
findComponents({ implements: 'switch' }); // the type and its alternatives
|
|
147
|
+
componentContract('switch'); // props (JSON Schema), controlled state, events, a11y, colour roles, sizing
|
|
148
|
+
componentExamples('switch'); // named props that render well
|
|
149
|
+
getComponent('gauge'); // { entry: '@surreal-ui/catalog/react/flair', export: 'Gauge', group: 'data-visual', runtime, … }
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
`findComponents` takes `group` (`baseline`, `data-visual`, `paradigm`), `category`, `tags`, `implements`, `platform`, `provider` and `text`. Every component reports its `category`, `group`, `runtime` (`engine` for a paradigm drawn by a runtime) and, where it can't run everywhere, a `fallback` type.
|
|
153
|
+
|
|
154
|
+
### Loading components on demand
|
|
155
|
+
|
|
156
|
+
Where the catalog is browsed or offered to an agent and only some components are drawn, import `@surreal-ui/catalog/lazy`: it has the same metadata and queries, and `loadComponent(id)` imports one React component on first use (each component is its own chunk).
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
import { findComponents, loadComponent } from '@surreal-ui/catalog/lazy';
|
|
160
|
+
|
|
161
|
+
const Switch = await loadComponent('switch');
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Svelte apps use `loadComponent(id)` from `@surreal-ui/catalog/svelte/lazy`.
|
|
165
|
+
|
|
166
|
+
## 🤖 Use with agents
|
|
167
|
+
|
|
168
|
+
The package ships two [agent skills](https://docs.claude.com/en/docs/claude-code/skills) in `skills/`, for coding agents (Claude Code, Cursor and others):
|
|
169
|
+
|
|
170
|
+
- **`surreal-use`**: finding a component (a generated index of every component and aesthetic, one line each), adding it with npm or the CLI, applying an aesthetic, and checking the result.
|
|
171
|
+
- **`surreal-author`**: writing a component type or an aesthetic in the library's repo, syncing provider components, and running the checks.
|
|
172
|
+
|
|
173
|
+
Copy them into a project with `npx @surreal-ui/cli skills install` (into `.claude/skills`; `--dir` for another folder, `--skill surreal-use` for one of them). Run it again after upgrading: it brings changed files up to date and leaves your own files alone. From code, `installSkills({ dir, skills })` from `@surreal-ui/catalog/node` does the same. `llms.txt` in the package summarises the library and lists the catalog for agents that read it. A test checks that the skills, `llms.txt` and this README name only entry points, functions, scripts and components that exist.
|
|
174
|
+
|
|
175
|
+
## 💻 CLI
|
|
176
|
+
|
|
177
|
+
`npx @surreal-ui/cli add button --aesthetic ink` copies the type (React, Svelte or WebComponent), its stylesheet and the pack from the catalog into your project, for when the app should own the source. Old names work too (`surreal add MinimalistButton`), and types the catalog doesn't have yet come from the hosted, shadcn-compatible registry at [ui.pixerate.com/r](https://ui.pixerate.com/r). `npx @surreal-ui/cli skills install` installs the agent skills above.
|
|
178
|
+
|
|
179
|
+
## 🛠️ Development
|
|
180
|
+
|
|
181
|
+
The `check:deps` script (the repo's `pnpm check:deps` for this package) fails if the package would depend on anything private or unpublished, or imports a package it doesn't declare.
|
|
182
|
+
|
|
183
|
+
Components live in the repo's `components/<type>/` and aesthetics in `aesthetics/<id>/`; this package is generated from them. See `CONTRIBUTING.md` in the repo, and the `surreal-author` skill.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
pnpm --filter @surreal-ui/catalog generate # rewrite the generated catalog, llms.txt and skill indexes
|
|
187
|
+
pnpm --filter @surreal-ui/catalog test # build, then check the catalog, skills and entries
|
|
188
|
+
pnpm --filter @surreal-ui/catalog look # render everything in Chromium and run the look checks
|
|
189
|
+
pnpm --filter @surreal-ui/catalog sync # after bumping @pixerate/flair or @pixerate/editor
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
MIT © Pixerate. Some components follow the structure and documentation of [shadcn/ui](https://ui.shadcn.com) and [Radix UI](https://www.radix-ui.com) (both MIT); see `THIRD_PARTY_NOTICES.md`.
|
|
195
|
+
An item that implements a type the catalog already has (Flair's toggle implements `switch`) is an
|
|
196
|
+
**alternative** for that type (`getComponent('switch').alternatives`,
|
|
197
|
+
`findComponents({ implements: 'switch' })`); any other item is a new type. After bumping a provider,
|
|
198
|
+
run `pnpm --filter @surreal-ui/catalog sync`: it rewrites the synced folders (never hand-written
|
|
199
|
+
ones), removes items the provider dropped, and regenerates the catalog. CI fails if the repo is
|
|
200
|
+
behind its installed providers (`check:sync`).
|
|
201
|
+
|
|
202
|
+
## How it's built
|
|
203
|
+
|
|
204
|
+
- `components/<type>/`: `component.json` (contract, examples), `react.tsx`, `svelte.svelte`,
|
|
205
|
+
`style.css`, `docs.md`. Components draw only with colour-role variables (`--sui-accent`,
|
|
206
|
+
`--sui-ink`, …), never literal colours.
|
|
207
|
+
- `aesthetics/<id>/`: a `ui-aesthetic` skill (`SKILL.md` + `aesthetic.json`, see
|
|
208
|
+
`@pixerate/schemas`). Its `roles` map every colour role to a token, in light and dark. Reference
|
|
209
|
+
pictures go in `references/` (png, jpg, webp, gif or avif, at most 4 MB) and are listed in the
|
|
210
|
+
profile's `references` with a note; the build fails if a listed file is missing or not a
|
|
211
|
+
picture. `AESTHETIC_SKILL_FILES` embeds them as `{ base64 }`, and they count towards the
|
|
212
|
+
skill's `contentHash` by their bytes' sha256. Keep them small: they ship in the bundle.
|
|
213
|
+
- `pnpm --filter @surreal-ui/catalog generate` writes `src/catalog.generated.ts` and
|
|
214
|
+
`src/react.ts`; CI fails if they are stale (`check:generated`).
|
|
215
|
+
- `pnpm --filter @surreal-ui/catalog build` also writes `dist/components.css`, the packs and the
|
|
216
|
+
Svelte entry.
|
|
217
|
+
- `pnpm --filter @surreal-ui/catalog look` renders every example in every aesthetic, light and
|
|
218
|
+
dark, in Chromium, checks text contrast (WCAG AA) and hit targets (24px), and writes contact
|
|
219
|
+
sheets and `LookResult`s to `look/`.
|
|
220
|
+
- `check:deps` (the repo's `pnpm check:deps` for this package) fails if the package would depend on anything private or unpublished, or imports a package it doesn't declare.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
Surreal UI is MIT-licensed (see `LICENSE`). It includes or is derived from the material below, each under its own licence. Packages it depends on at run time (for example `@radix-ui/react-hover-card`, `lucide-react`, `@lucide/svelte`, `lit`) are installed from npm with their own licences and aren't copied here.
|
|
4
|
+
|
|
5
|
+
## shadcn/ui
|
|
6
|
+
|
|
7
|
+
The baseline component types follow [shadcn/ui](https://ui.shadcn.com): their names, their one-sentence descriptions (in `components/<type>/component.json` and the catalog generated from them, `@surreal-ui/catalog`), their variants and their structure.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2023 shadcn
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## shadcn-svelte
|
|
34
|
+
|
|
35
|
+
The app's UI components (`apps/web/src/lib/components/ui`) were added with the [shadcn-svelte](https://www.shadcn-svelte.com) CLI, and the `Shadcn*` components in `@surreal-ui/react`, `@surreal-ui/svelte` and `@surreal-ui/web` were converted from them (`scripts/ingest-shadcn-components.ts`).
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
MIT License
|
|
39
|
+
|
|
40
|
+
Copyright (c) 2023 Hunter Johnston <https://github.com/huntabyte>
|
|
41
|
+
Copyright (c) 2023 CokaKoala <https://github.com/adriangonz97>
|
|
42
|
+
|
|
43
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
44
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
45
|
+
in the Software without restriction, including without limitation the rights
|
|
46
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
47
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
48
|
+
furnished to do so, subject to the following conditions:
|
|
49
|
+
|
|
50
|
+
The above copyright notice and this permission notice shall be included in all
|
|
51
|
+
copies or substantial portions of the Software.
|
|
52
|
+
|
|
53
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
54
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
55
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
56
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
57
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
58
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
59
|
+
SOFTWARE.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Radix UI Primitives
|
|
63
|
+
|
|
64
|
+
shadcn/ui builds on [Radix UI Primitives](https://www.radix-ui.com/primitives). The components' accessibility contracts (roles, keyboard behaviour, controlled and uncontrolled state, in `contract.a11y` and `contract.state`) follow Radix's conventions, and `@surreal-ui/react`'s hover cards use `@radix-ui/react-hover-card`.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
MIT License
|
|
68
|
+
|
|
69
|
+
Copyright (c) 2022 WorkOS
|
|
70
|
+
|
|
71
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
72
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
73
|
+
in the Software without restriction, including without limitation the rights
|
|
74
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
75
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
76
|
+
furnished to do so, subject to the following conditions:
|
|
77
|
+
|
|
78
|
+
The above copyright notice and this permission notice shall be included in all
|
|
79
|
+
copies or substantial portions of the Software.
|
|
80
|
+
|
|
81
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
82
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
83
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
84
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
85
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
86
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
87
|
+
SOFTWARE.
|
|
88
|
+
```
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* Surreal UI aesthetic pack: claymorphism. Generated from aesthetics/claymorphism/aesthetic.json; do not edit. */
|
|
2
|
+
[data-aesthetic='claymorphism'] {
|
|
3
|
+
--sui-accent: #b0185a;
|
|
4
|
+
--sui-accent-ink: #ffffff;
|
|
5
|
+
--sui-border: #e2d9fb;
|
|
6
|
+
--sui-danger: #b3261e;
|
|
7
|
+
--sui-focus: #b0185a;
|
|
8
|
+
--sui-ink: #2a2140;
|
|
9
|
+
--sui-ink-muted: #574d70;
|
|
10
|
+
--sui-success: #1f6b48;
|
|
11
|
+
--sui-surface: #f3efff;
|
|
12
|
+
--sui-surface-raised: #ffffff;
|
|
13
|
+
--sui-track-off: #ddd3fa;
|
|
14
|
+
--sui-track-on: #ff7aa8;
|
|
15
|
+
--sui-warning: #845100;
|
|
16
|
+
--sui-color-track-on: #ff7aa8;
|
|
17
|
+
--sui-color-track-off: #ddd3fa;
|
|
18
|
+
--sui-color-success: #1f6b48;
|
|
19
|
+
--sui-color-warning: #845100;
|
|
20
|
+
--sui-color-shade: rgba(92,62,170,0.22);
|
|
21
|
+
--sui-color-inner: rgba(92,62,170,0.12);
|
|
22
|
+
--sui-color-puff: rgba(255,255,255,0.9);
|
|
23
|
+
--sui-radius: 24px;
|
|
24
|
+
--sui-border-width: 0px;
|
|
25
|
+
--sui-font: 'Nunito', 'Quicksand', system-ui, sans-serif;
|
|
26
|
+
--sui-shadow-raised: 8px 8px 16px var(--sui-color-shade), inset -4px -4px 8px var(--sui-color-inner), inset 4px 4px 8px var(--sui-color-puff);
|
|
27
|
+
--sui-shadow-pressed: 4px 4px 8px var(--sui-color-shade), inset -2px -2px 6px var(--sui-color-inner), inset 2px 2px 6px var(--sui-color-puff);
|
|
28
|
+
--sui-shadow-inset: inset 3px 3px 6px var(--sui-color-inner);
|
|
29
|
+
--sui-shadow-control: 3px 3px 6px var(--sui-color-shade), inset -2px -2px 4px var(--sui-color-inner);
|
|
30
|
+
--sui-ease: cubic-bezier(.2,0,0,1);
|
|
31
|
+
--sui-duration-short: 180ms;
|
|
32
|
+
--sui-duration-long: 320ms;
|
|
33
|
+
color: var(--sui-ink);
|
|
34
|
+
}
|
|
35
|
+
.dark [data-aesthetic='claymorphism'],
|
|
36
|
+
[data-aesthetic='claymorphism'].dark,
|
|
37
|
+
[data-aesthetic='claymorphism'][data-theme='dark'] {
|
|
38
|
+
--sui-accent: #ff9cc2;
|
|
39
|
+
--sui-accent-ink: #24192f;
|
|
40
|
+
--sui-border: #3d3350;
|
|
41
|
+
--sui-danger: #ff8f8f;
|
|
42
|
+
--sui-focus: #ff9cc2;
|
|
43
|
+
--sui-ink: #f4effc;
|
|
44
|
+
--sui-ink-muted: #c3b8d9;
|
|
45
|
+
--sui-success: #86dcb0;
|
|
46
|
+
--sui-surface: #1c1626;
|
|
47
|
+
--sui-surface-raised: #2a2238;
|
|
48
|
+
--sui-track-off: #3d3350;
|
|
49
|
+
--sui-track-on: #ff7aa8;
|
|
50
|
+
--sui-warning: #f6c370;
|
|
51
|
+
--sui-color-track-on: #ff7aa8;
|
|
52
|
+
--sui-color-track-off: #3d3350;
|
|
53
|
+
--sui-color-success: #86dcb0;
|
|
54
|
+
--sui-color-warning: #f6c370;
|
|
55
|
+
--sui-color-shade: rgba(0,0,0,0.5);
|
|
56
|
+
--sui-color-inner: rgba(0,0,0,0.35);
|
|
57
|
+
--sui-color-puff: rgba(255,255,255,0.08);
|
|
58
|
+
}
|
|
59
|
+
@media (prefers-color-scheme: dark) {
|
|
60
|
+
[data-aesthetic='claymorphism'][data-theme='system'] {
|
|
61
|
+
--sui-accent: #ff9cc2;
|
|
62
|
+
--sui-accent-ink: #24192f;
|
|
63
|
+
--sui-border: #3d3350;
|
|
64
|
+
--sui-danger: #ff8f8f;
|
|
65
|
+
--sui-focus: #ff9cc2;
|
|
66
|
+
--sui-ink: #f4effc;
|
|
67
|
+
--sui-ink-muted: #c3b8d9;
|
|
68
|
+
--sui-success: #86dcb0;
|
|
69
|
+
--sui-surface: #1c1626;
|
|
70
|
+
--sui-surface-raised: #2a2238;
|
|
71
|
+
--sui-track-off: #3d3350;
|
|
72
|
+
--sui-track-on: #ff7aa8;
|
|
73
|
+
--sui-warning: #f6c370;
|
|
74
|
+
--sui-color-track-on: #ff7aa8;
|
|
75
|
+
--sui-color-track-off: #3d3350;
|
|
76
|
+
--sui-color-success: #86dcb0;
|
|
77
|
+
--sui-color-warning: #f6c370;
|
|
78
|
+
--sui-color-shade: rgba(0,0,0,0.5);
|
|
79
|
+
--sui-color-inner: rgba(0,0,0,0.35);
|
|
80
|
+
--sui-color-puff: rgba(255,255,255,0.08);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* Theme: Claymorphism (claymorphism) */
|
|
2
|
+
@theme {
|
|
3
|
+
--color-primary: #b0185a;
|
|
4
|
+
--color-primary-foreground: #ffffff;
|
|
5
|
+
--color-background: #f3efff;
|
|
6
|
+
--color-foreground: #2a2140;
|
|
7
|
+
--color-surface: #ffffff;
|
|
8
|
+
--color-muted-foreground: #574d70;
|
|
9
|
+
--color-border: #e2d9fb;
|
|
10
|
+
--color-ring: #b0185a;
|
|
11
|
+
--trackOn: #ff7aa8;
|
|
12
|
+
--trackOff: #ddd3fa;
|
|
13
|
+
--success: #1f6b48;
|
|
14
|
+
--warning: #845100;
|
|
15
|
+
--shade: rgba(92,62,170,0.22);
|
|
16
|
+
--inner: rgba(92,62,170,0.12);
|
|
17
|
+
--puff: rgba(255,255,255,0.9);
|
|
18
|
+
--font-sans: 'Nunito', 'Quicksand', system-ui, sans-serif;
|
|
19
|
+
--shadow-raised: 8px 8px 16px var(--sui-color-shade), inset -4px -4px 8px var(--sui-color-inner), inset 4px 4px 8px var(--sui-color-puff);
|
|
20
|
+
--shadow-pressed: 4px 4px 8px var(--sui-color-shade), inset -2px -2px 6px var(--sui-color-inner), inset 2px 2px 6px var(--sui-color-puff);
|
|
21
|
+
--shadow-inset: inset 3px 3px 6px var(--sui-color-inner);
|
|
22
|
+
--shadow-control: 3px 3px 6px var(--sui-color-shade), inset -2px -2px 4px var(--sui-color-inner);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark, [data-mode="dark"] {
|
|
26
|
+
--color-primary: #ff9cc2;
|
|
27
|
+
--color-primary-foreground: #24192f;
|
|
28
|
+
--color-background: #1c1626;
|
|
29
|
+
--color-foreground: #f4effc;
|
|
30
|
+
--color-surface: #2a2238;
|
|
31
|
+
--color-muted-foreground: #c3b8d9;
|
|
32
|
+
--color-border: #3d3350;
|
|
33
|
+
--color-ring: #ff9cc2;
|
|
34
|
+
--trackOn: #ff7aa8;
|
|
35
|
+
--trackOff: #3d3350;
|
|
36
|
+
--success: #86dcb0;
|
|
37
|
+
--warning: #f6c370;
|
|
38
|
+
--shade: rgba(0,0,0,0.5);
|
|
39
|
+
--inner: rgba(0,0,0,0.35);
|
|
40
|
+
--puff: rgba(255,255,255,0.08);
|
|
41
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* Surreal UI aesthetic pack: flat-design. Generated from aesthetics/flat-design/aesthetic.json; do not edit. */
|
|
2
|
+
[data-aesthetic='flat-design'] {
|
|
3
|
+
--sui-accent: #1d4ed8;
|
|
4
|
+
--sui-accent-ink: #ffffff;
|
|
5
|
+
--sui-border: #e5e7eb;
|
|
6
|
+
--sui-danger: #b91c1c;
|
|
7
|
+
--sui-focus: #1d4ed8;
|
|
8
|
+
--sui-ink: #1f2937;
|
|
9
|
+
--sui-ink-muted: #4b5563;
|
|
10
|
+
--sui-success: #15803d;
|
|
11
|
+
--sui-surface: #ffffff;
|
|
12
|
+
--sui-surface-raised: #f3f4f6;
|
|
13
|
+
--sui-track-off: #d1d5db;
|
|
14
|
+
--sui-track-on: #2563eb;
|
|
15
|
+
--sui-warning: #a16207;
|
|
16
|
+
--sui-color-track-on: #2563eb;
|
|
17
|
+
--sui-color-track-off: #d1d5db;
|
|
18
|
+
--sui-color-success: #15803d;
|
|
19
|
+
--sui-color-warning: #a16207;
|
|
20
|
+
--sui-radius: 4px;
|
|
21
|
+
--sui-border-width: 0px;
|
|
22
|
+
--sui-font: 'Roboto', 'Helvetica Neue', system-ui, sans-serif;
|
|
23
|
+
--sui-ease: cubic-bezier(.2,0,0,1);
|
|
24
|
+
--sui-duration-short: 100ms;
|
|
25
|
+
--sui-duration-long: 150ms;
|
|
26
|
+
color: var(--sui-ink);
|
|
27
|
+
}
|
|
28
|
+
.dark [data-aesthetic='flat-design'],
|
|
29
|
+
[data-aesthetic='flat-design'].dark,
|
|
30
|
+
[data-aesthetic='flat-design'][data-theme='dark'] {
|
|
31
|
+
--sui-accent: #60a5fa;
|
|
32
|
+
--sui-accent-ink: #0b1220;
|
|
33
|
+
--sui-border: #374151;
|
|
34
|
+
--sui-danger: #f87171;
|
|
35
|
+
--sui-focus: #60a5fa;
|
|
36
|
+
--sui-ink: #f3f4f6;
|
|
37
|
+
--sui-ink-muted: #9ca3af;
|
|
38
|
+
--sui-success: #4ade80;
|
|
39
|
+
--sui-surface: #111827;
|
|
40
|
+
--sui-surface-raised: #1f2937;
|
|
41
|
+
--sui-track-off: #4b5563;
|
|
42
|
+
--sui-track-on: #3b82f6;
|
|
43
|
+
--sui-warning: #facc15;
|
|
44
|
+
--sui-color-track-on: #3b82f6;
|
|
45
|
+
--sui-color-track-off: #4b5563;
|
|
46
|
+
--sui-color-success: #4ade80;
|
|
47
|
+
--sui-color-warning: #facc15;
|
|
48
|
+
}
|
|
49
|
+
@media (prefers-color-scheme: dark) {
|
|
50
|
+
[data-aesthetic='flat-design'][data-theme='system'] {
|
|
51
|
+
--sui-accent: #60a5fa;
|
|
52
|
+
--sui-accent-ink: #0b1220;
|
|
53
|
+
--sui-border: #374151;
|
|
54
|
+
--sui-danger: #f87171;
|
|
55
|
+
--sui-focus: #60a5fa;
|
|
56
|
+
--sui-ink: #f3f4f6;
|
|
57
|
+
--sui-ink-muted: #9ca3af;
|
|
58
|
+
--sui-success: #4ade80;
|
|
59
|
+
--sui-surface: #111827;
|
|
60
|
+
--sui-surface-raised: #1f2937;
|
|
61
|
+
--sui-track-off: #4b5563;
|
|
62
|
+
--sui-track-on: #3b82f6;
|
|
63
|
+
--sui-warning: #facc15;
|
|
64
|
+
--sui-color-track-on: #3b82f6;
|
|
65
|
+
--sui-color-track-off: #4b5563;
|
|
66
|
+
--sui-color-success: #4ade80;
|
|
67
|
+
--sui-color-warning: #facc15;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* Theme: Flat Design (flat-design) */
|
|
2
|
+
@theme {
|
|
3
|
+
--color-primary: #1d4ed8;
|
|
4
|
+
--color-primary-foreground: #ffffff;
|
|
5
|
+
--color-background: #ffffff;
|
|
6
|
+
--color-foreground: #1f2937;
|
|
7
|
+
--color-surface: #f3f4f6;
|
|
8
|
+
--color-muted-foreground: #4b5563;
|
|
9
|
+
--color-border: #e5e7eb;
|
|
10
|
+
--color-ring: #1d4ed8;
|
|
11
|
+
--trackOn: #2563eb;
|
|
12
|
+
--trackOff: #d1d5db;
|
|
13
|
+
--success: #15803d;
|
|
14
|
+
--warning: #a16207;
|
|
15
|
+
--font-sans: 'Roboto', 'Helvetica Neue', system-ui, sans-serif;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dark, [data-mode="dark"] {
|
|
19
|
+
--color-primary: #60a5fa;
|
|
20
|
+
--color-primary-foreground: #0b1220;
|
|
21
|
+
--color-background: #111827;
|
|
22
|
+
--color-foreground: #f3f4f6;
|
|
23
|
+
--color-surface: #1f2937;
|
|
24
|
+
--color-muted-foreground: #9ca3af;
|
|
25
|
+
--color-border: #374151;
|
|
26
|
+
--color-ring: #60a5fa;
|
|
27
|
+
--trackOn: #3b82f6;
|
|
28
|
+
--trackOff: #4b5563;
|
|
29
|
+
--success: #4ade80;
|
|
30
|
+
--warning: #facc15;
|
|
31
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* Surreal UI aesthetic pack: glassmorphism. Generated from aesthetics/glassmorphism/aesthetic.json; do not edit. */
|
|
2
|
+
[data-aesthetic='glassmorphism'] {
|
|
3
|
+
--sui-accent: #3346c9;
|
|
4
|
+
--sui-accent-ink: #ffffff;
|
|
5
|
+
--sui-border: rgba(255,255,255,0.85);
|
|
6
|
+
--sui-danger: #b4232c;
|
|
7
|
+
--sui-focus: #3346c9;
|
|
8
|
+
--sui-ink: #0f1530;
|
|
9
|
+
--sui-ink-muted: #3c4466;
|
|
10
|
+
--sui-success: #1d6b3f;
|
|
11
|
+
--sui-surface: #dfe5f7;
|
|
12
|
+
--sui-surface-raised: rgba(255,255,255,0.55);
|
|
13
|
+
--sui-track-off: #c3cbe3;
|
|
14
|
+
--sui-track-on: #3346c9;
|
|
15
|
+
--sui-warning: #8a5300;
|
|
16
|
+
--sui-color-track-on: #3346c9;
|
|
17
|
+
--sui-color-track-off: #c3cbe3;
|
|
18
|
+
--sui-color-success: #1d6b3f;
|
|
19
|
+
--sui-color-warning: #8a5300;
|
|
20
|
+
--sui-color-glow: rgba(51,70,201,0.18);
|
|
21
|
+
--sui-color-sheen: rgba(255,255,255,0.7);
|
|
22
|
+
--sui-radius: 16px;
|
|
23
|
+
--sui-border-width: 1px;
|
|
24
|
+
--sui-font: 'Inter', system-ui, sans-serif;
|
|
25
|
+
--sui-shadow-raised: 0 8px 32px var(--sui-color-glow), inset 0 1px 0 var(--sui-color-sheen);
|
|
26
|
+
--sui-shadow-inset: inset 0 1px 2px var(--sui-color-glow);
|
|
27
|
+
--sui-shadow-control: 0 2px 8px var(--sui-color-glow), inset 0 1px 0 var(--sui-color-sheen);
|
|
28
|
+
--sui-ease: cubic-bezier(.2,0,0,1);
|
|
29
|
+
--sui-duration-short: 120ms;
|
|
30
|
+
--sui-duration-long: 320ms;
|
|
31
|
+
color: var(--sui-ink);
|
|
32
|
+
}
|
|
33
|
+
.dark [data-aesthetic='glassmorphism'],
|
|
34
|
+
[data-aesthetic='glassmorphism'].dark,
|
|
35
|
+
[data-aesthetic='glassmorphism'][data-theme='dark'] {
|
|
36
|
+
--sui-accent: #8ab4ff;
|
|
37
|
+
--sui-accent-ink: #0b1020;
|
|
38
|
+
--sui-border: rgba(255,255,255,0.18);
|
|
39
|
+
--sui-danger: #ff8a8a;
|
|
40
|
+
--sui-focus: #8ab4ff;
|
|
41
|
+
--sui-ink: #eef2ff;
|
|
42
|
+
--sui-ink-muted: #aab3d1;
|
|
43
|
+
--sui-success: #7ee0a6;
|
|
44
|
+
--sui-surface: #0b1020;
|
|
45
|
+
--sui-surface-raised: rgba(255,255,255,0.08);
|
|
46
|
+
--sui-track-off: #2c3456;
|
|
47
|
+
--sui-track-on: #8ab4ff;
|
|
48
|
+
--sui-warning: #ffc46b;
|
|
49
|
+
--sui-color-track-on: #8ab4ff;
|
|
50
|
+
--sui-color-track-off: #2c3456;
|
|
51
|
+
--sui-color-success: #7ee0a6;
|
|
52
|
+
--sui-color-warning: #ffc46b;
|
|
53
|
+
--sui-color-glow: rgba(0,0,0,0.45);
|
|
54
|
+
--sui-color-sheen: rgba(255,255,255,0.14);
|
|
55
|
+
}
|
|
56
|
+
@media (prefers-color-scheme: dark) {
|
|
57
|
+
[data-aesthetic='glassmorphism'][data-theme='system'] {
|
|
58
|
+
--sui-accent: #8ab4ff;
|
|
59
|
+
--sui-accent-ink: #0b1020;
|
|
60
|
+
--sui-border: rgba(255,255,255,0.18);
|
|
61
|
+
--sui-danger: #ff8a8a;
|
|
62
|
+
--sui-focus: #8ab4ff;
|
|
63
|
+
--sui-ink: #eef2ff;
|
|
64
|
+
--sui-ink-muted: #aab3d1;
|
|
65
|
+
--sui-success: #7ee0a6;
|
|
66
|
+
--sui-surface: #0b1020;
|
|
67
|
+
--sui-surface-raised: rgba(255,255,255,0.08);
|
|
68
|
+
--sui-track-off: #2c3456;
|
|
69
|
+
--sui-track-on: #8ab4ff;
|
|
70
|
+
--sui-warning: #ffc46b;
|
|
71
|
+
--sui-color-track-on: #8ab4ff;
|
|
72
|
+
--sui-color-track-off: #2c3456;
|
|
73
|
+
--sui-color-success: #7ee0a6;
|
|
74
|
+
--sui-color-warning: #ffc46b;
|
|
75
|
+
--sui-color-glow: rgba(0,0,0,0.45);
|
|
76
|
+
--sui-color-sheen: rgba(255,255,255,0.14);
|
|
77
|
+
}
|
|
78
|
+
}
|