@underlayerdev/ui 0.0.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/README.md +147 -0
- package/fesm2022/underlayerdev-ui.mjs +3320 -0
- package/fesm2022/underlayerdev-ui.mjs.map +1 -0
- package/fonts/RobotoMono.ttf +0 -0
- package/fonts/UltraBrand.otf +0 -0
- package/fonts/UltraIcons-v4-VF.ttf +0 -0
- package/fonts/UltraNunitoSans.ttf +0 -0
- package/fonts/index.css +23 -0
- package/img/logo.png +0 -0
- package/package.json +24 -0
- package/styles/fonts/RobotoMono.ttf +0 -0
- package/styles/fonts/UltraBrand.otf +0 -0
- package/styles/fonts/UltraIcons-v4-VF.ttf +0 -0
- package/styles/fonts/UltraNunitoSans.ttf +0 -0
- package/styles/fonts/index.css +23 -0
- package/styles/foundations.css +15994 -0
- package/types/underlayerdev-ui.d.ts +1464 -0
package/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# UI Library
|
|
2
|
+
|
|
3
|
+
Reusable Angular UI library and design system. Built with [Angular CLI](https://github.com/angular/angular-cli) (v21), intended for publishing as an npm package and consumption by applications (e.g. gaming, arena, or dashboard products).
|
|
4
|
+
|
|
5
|
+
**Try the library:** [**Live Storybook demo →**](https://lyamone.github.io/base/) (deployed via [GitHub Pages](../../.github/workflows/deploy-storybook.yml)).
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
- [Design direction](#design-direction)
|
|
10
|
+
- [Accessibility & interaction patterns](#accessibility--interaction-patterns)
|
|
11
|
+
- [Development](#development)
|
|
12
|
+
- [Building & publishing](#building--publishing)
|
|
13
|
+
- [Testing](#testing)
|
|
14
|
+
- [Code scaffolding](#code-scaffolding)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Design direction
|
|
19
|
+
|
|
20
|
+
The library follows an **Industrial Arena Minimal** aesthetic:
|
|
21
|
+
|
|
22
|
+
- **Tone**: Industrial / utilitarian core with restrained neon sport accents.
|
|
23
|
+
- **Differentiation**: Dense, dark surfaces with sharp neon typography, bold uppercase brand labels, and precise, chunky control geometry.
|
|
24
|
+
- **Primary use**: Gaming, arena, and high-intensity dashboards where clarity and power matter more than softness.
|
|
25
|
+
|
|
26
|
+
### DFII (Design Feasibility & Impact Index)
|
|
27
|
+
|
|
28
|
+
| Dimension | Score | Notes |
|
|
29
|
+
|-------------------------|-------|----------------------------------------------------------------------|
|
|
30
|
+
| Aesthetic impact | 5 | Highly distinctive neon-on-carbon look with strong brand typography. |
|
|
31
|
+
| Context fit | 4 | Well-suited for Ultra-branded gaming, wallets, and marketplaces. |
|
|
32
|
+
| Implementation feasibility | 4 | Built on existing tokens (Ultra Brand, Ultra Nunito Sans, dark BG, neon). |
|
|
33
|
+
| Performance safety | 4 | Minimal shadows/blur; motion kept sharp and sparse. |
|
|
34
|
+
| Consistency risk | 2 | Rich token set; requires discipline on spacing, motion, naming. |
|
|
35
|
+
|
|
36
|
+
**DFII score**: (5 + 4 + 4 + 4) − 2 = **15** → _Excellent_. Execute this direction consistently across all components.
|
|
37
|
+
|
|
38
|
+
### System principles
|
|
39
|
+
|
|
40
|
+
- **Typography**: `Ultra Nunito Sans` for functional text; `Ultra Brand` for loud, uppercase brand labels and key headlines.
|
|
41
|
+
- **Color**: Dark grey/black surfaces as base; purple as primary brand; green/yellow/orange only as functional status accents.
|
|
42
|
+
- **Spacing**: Tight baseline grid from tokenized spacing; no ad-hoc pixel values in components.
|
|
43
|
+
- **Motion**: Snappy, low-latency transitions — responsive and “mechanical”, not soft or bouncy.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Accessibility & interaction patterns
|
|
48
|
+
|
|
49
|
+
### Disabled state
|
|
50
|
+
|
|
51
|
+
- Prefer the native `disabled` attribute on real form controls (`button`, `input`).
|
|
52
|
+
- When a component behaves like a control without a native element (e.g. complex cards), mirror state with `aria-disabled="true"`.
|
|
53
|
+
- Visually: reduced contrast, no hover/active effects, `cursor: not-allowed`.
|
|
54
|
+
|
|
55
|
+
### Keyboard activation
|
|
56
|
+
|
|
57
|
+
- Toggle-like components (accordion, collapse, selectable pills) must respond to **Space** and **Enter** as well as click.
|
|
58
|
+
- Shared pattern: if `event.key === ' '` or `'Enter'`, call `preventDefault()` and invoke the same handler as for click.
|
|
59
|
+
|
|
60
|
+
### ARIA patterns
|
|
61
|
+
|
|
62
|
+
- **Disclosure / accordion**
|
|
63
|
+
- Triggers: `aria-expanded`, `aria-controls` pointing to content regions.
|
|
64
|
+
- Content: `role="region"`, `aria-labelledby` pointing to the trigger.
|
|
65
|
+
- **Menus** (dropdown, carousel pagination)
|
|
66
|
+
- Triggers: `aria-haspopup="menu"`, `aria-expanded` when open.
|
|
67
|
+
- Items: clear labels and, where applicable, `aria-current` for the active item.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
### Storybook
|
|
74
|
+
|
|
75
|
+
From the **workspace root**:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm run storybook
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Storybook runs at [http://localhost:6006](http://localhost:6006) and loads foundations CSS and fonts. Use it as the main way to develop and document components.
|
|
82
|
+
|
|
83
|
+
### Build (local)
|
|
84
|
+
|
|
85
|
+
Always use the full pipeline so foundations and fonts are up to date:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm run build:ui
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This runs, in order: **copy-fonts** → **sass** (foundations SCSS → CSS) → **ng build ui**. Artifacts go to `dist/ui/`, with pre-built styles under `dist/ui/styles/` (e.g. `foundations.css`, `fonts/`).
|
|
92
|
+
|
|
93
|
+
Running only `ng build ui` does **not** regenerate foundations or utility CSS; run `npm run build:ui` (or at least `ui:copy-fonts` and `ui:sass`) first.
|
|
94
|
+
|
|
95
|
+
Optional standalone steps:
|
|
96
|
+
|
|
97
|
+
- `npm run ui:copy-fonts` — copy font files into `projects/ui/assets/styles/fonts/`
|
|
98
|
+
- `npm run ui:sass` — compile foundations SCSS to `projects/ui/assets/styles/foundations.css`
|
|
99
|
+
- `ng build ui` — package the library (ng-packagr)
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Building & publishing
|
|
104
|
+
|
|
105
|
+
1. Build the library: `npm run build:ui` (from workspace root).
|
|
106
|
+
2. Go to the built package:
|
|
107
|
+
```bash
|
|
108
|
+
cd dist/ui
|
|
109
|
+
```
|
|
110
|
+
3. Publish to npm:
|
|
111
|
+
```bash
|
|
112
|
+
npm publish
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Testing
|
|
118
|
+
|
|
119
|
+
From the workspace root:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
ng test
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Unit tests use Vitest (see root `angular.json` and `projects/ui` test configuration).
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Code scaffolding
|
|
130
|
+
|
|
131
|
+
From the **workspace root**, generate components (or other schematics) in the UI library:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
ng generate component component-name --project=ui
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
List available schematics:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
ng generate --help
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Additional resources
|
|
146
|
+
|
|
147
|
+
- [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli)
|