gravitas-ui 0.1.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/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +202 -0
- package/SECURITY.md +41 -0
- package/ai/gravitas-component-migration.md +493 -0
- package/fesm2022/gravitas-ui.mjs +3307 -0
- package/fesm2022/gravitas-ui.mjs.map +1 -0
- package/package.json +64 -0
- package/styles/components.css +173 -0
- package/styles/docs-theme.css +225 -0
- package/styles/gravitas-storybook.css +3 -0
- package/styles/gravitas.css +2 -0
- package/styles/theme.css +54 -0
- package/styles/tokens.css +294 -0
- package/types/gravitas-ui.d.ts +877 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Gravitas UI will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 - 2026-04-11
|
|
6
|
+
|
|
7
|
+
Initial public release.
|
|
8
|
+
|
|
9
|
+
Highlights:
|
|
10
|
+
|
|
11
|
+
- Angular standalone component library for Bootstrap-aligned enterprise UI
|
|
12
|
+
- standalone form controls, buttons, cards, tables, tabs, modals, alerts, badges, avatars, loaders, empty states, dropdowns, tooltips, skeletons, and toasts
|
|
13
|
+
- shared Gravitas token system for theme, density, spacing, radius, elevation, and semantic color surfaces
|
|
14
|
+
- Storybook documentation covering introduction, quickstart, foundations, component usage, and AI-assisted migration guidance
|
|
15
|
+
- packaged consumer styles under `styles/`
|
|
16
|
+
- packaged AI migration spec under `ai/gravitas-component-migration.md`
|
|
17
|
+
- MIT licensing and a published security policy
|
|
18
|
+
- runtime dependency ranges updated to safe Angular 21.2.4+ consumer lines
|
|
19
|
+
|
|
20
|
+
Notes:
|
|
21
|
+
|
|
22
|
+
- remaining audit residue is limited to Compodoc-based documentation tooling and does not affect the published runtime package
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gravitas UI contributors
|
|
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
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Gravitas UI
|
|
2
|
+
|
|
3
|
+
Gravitas UI is an Angular standalone component library for Bootstrap-based
|
|
4
|
+
enterprise applications.
|
|
5
|
+
|
|
6
|
+
Current public package version target: `0.1.0`.
|
|
7
|
+
|
|
8
|
+
It is designed for company applications that already use Bootstrap for baseline
|
|
9
|
+
layout and measurements, while Gravitas provides the design-system layer:
|
|
10
|
+
tokens, themes, density, and reusable components.
|
|
11
|
+
|
|
12
|
+
## What Gravitas Is
|
|
13
|
+
|
|
14
|
+
- Angular standalone components for application UI
|
|
15
|
+
- Gravitas-owned visual language on top of Bootstrap-compatible foundations
|
|
16
|
+
- Token-driven theming for company branding and consistency
|
|
17
|
+
- Designed for dense dashboard and admin-style interfaces
|
|
18
|
+
|
|
19
|
+
## Runtime Contract
|
|
20
|
+
|
|
21
|
+
Gravitas expects a Bootstrap 5 application shell.
|
|
22
|
+
|
|
23
|
+
Consumer applications should:
|
|
24
|
+
|
|
25
|
+
1. Install Gravitas and its peer dependencies
|
|
26
|
+
2. Load Bootstrap CSS once at the app shell level
|
|
27
|
+
3. Load Gravitas CSS once at the app shell level
|
|
28
|
+
4. Optionally set Gravitas theme and density attributes globally
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
yarn add gravitas-ui bootstrap
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If the consuming application uses another package manager, install the same
|
|
37
|
+
package set with that tool. The Gravitas repository itself is standardized on
|
|
38
|
+
Yarn 4.
|
|
39
|
+
|
|
40
|
+
Required peer dependencies:
|
|
41
|
+
|
|
42
|
+
- `@angular/common` `21.2.4+`
|
|
43
|
+
- `@angular/core` `21.2.4+`
|
|
44
|
+
- `@angular/forms` `21.2.4+`
|
|
45
|
+
- `bootstrap`
|
|
46
|
+
|
|
47
|
+
## Global Styles
|
|
48
|
+
|
|
49
|
+
Import Bootstrap and Gravitas once in your application's global styles or main
|
|
50
|
+
entrypoint:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
54
|
+
import 'gravitas-ui/styles/gravitas.css';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`gravitas.css` includes the Gravitas token and theme layers.
|
|
58
|
+
|
|
59
|
+
Bootstrap remains part of the supported runtime environment. Gravitas is
|
|
60
|
+
intentionally built for Bootstrap-based applications rather than as a Bootstrap
|
|
61
|
+
replacement.
|
|
62
|
+
|
|
63
|
+
## Theme And Density
|
|
64
|
+
|
|
65
|
+
Gravitas supports global theme and density toggles through root attributes:
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<html data-gv-theme="light" data-gv-density="comfortable">
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Supported theme values:
|
|
72
|
+
|
|
73
|
+
- `light`
|
|
74
|
+
- `dark`
|
|
75
|
+
|
|
76
|
+
Supported density values:
|
|
77
|
+
|
|
78
|
+
- `compact`
|
|
79
|
+
- `comfortable`
|
|
80
|
+
- `spacious`
|
|
81
|
+
|
|
82
|
+
## Usage
|
|
83
|
+
|
|
84
|
+
Import standalone components from the package:
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
import { Button, InputComponent, Tabs } from 'gravitas-ui';
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Example:
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
import { Component } from '@angular/core';
|
|
94
|
+
import { Button } from 'gravitas-ui';
|
|
95
|
+
|
|
96
|
+
@Component({
|
|
97
|
+
standalone: true,
|
|
98
|
+
selector: 'app-save-action',
|
|
99
|
+
imports: [Button],
|
|
100
|
+
template: `<gv-button variant="primary">Save</gv-button>`,
|
|
101
|
+
})
|
|
102
|
+
export class SaveActionComponent {}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Styling Model
|
|
106
|
+
|
|
107
|
+
Gravitas follows a Bootstrap-aligned contract:
|
|
108
|
+
|
|
109
|
+
- Bootstrap provides the baseline application environment
|
|
110
|
+
- Gravitas tokens define color, spacing, density, radius, and elevation
|
|
111
|
+
- Gravitas component styles define the actual UI identity and state behavior
|
|
112
|
+
|
|
113
|
+
Consumers should prefer Gravitas components and Gravitas token overrides over
|
|
114
|
+
direct restyling of component internals.
|
|
115
|
+
|
|
116
|
+
## Token Customization
|
|
117
|
+
|
|
118
|
+
Customize Gravitas through CSS variables instead of changing component APIs:
|
|
119
|
+
|
|
120
|
+
```css
|
|
121
|
+
:root {
|
|
122
|
+
--gv-accent: #0f6cbd;
|
|
123
|
+
--gv-accent-hover: #0b5aa0;
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For scoped branding:
|
|
128
|
+
|
|
129
|
+
```css
|
|
130
|
+
.billing-scope {
|
|
131
|
+
--gv-accent: #0ea5e9;
|
|
132
|
+
--gv-accent-hover: #0284c7;
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Supported Integration Pattern
|
|
137
|
+
|
|
138
|
+
Gravitas is intended to be integrated at the application shell level.
|
|
139
|
+
|
|
140
|
+
Recommended:
|
|
141
|
+
|
|
142
|
+
- Bootstrap CSS imported once globally
|
|
143
|
+
- Gravitas CSS imported once globally
|
|
144
|
+
- Theme and density controlled from the app shell
|
|
145
|
+
- Feature components import only the standalone components they use
|
|
146
|
+
|
|
147
|
+
Avoid:
|
|
148
|
+
|
|
149
|
+
- importing Bootstrap repeatedly in feature code
|
|
150
|
+
- overriding Gravitas internals ad hoc per app
|
|
151
|
+
- mixing one-off Bootstrap markup variants where Gravitas components already
|
|
152
|
+
exist
|
|
153
|
+
|
|
154
|
+
## Documentation
|
|
155
|
+
|
|
156
|
+
Storybook is the source of truth for:
|
|
157
|
+
|
|
158
|
+
- supported components
|
|
159
|
+
- component states and examples
|
|
160
|
+
- foundations and design tokens
|
|
161
|
+
- recommended usage patterns
|
|
162
|
+
|
|
163
|
+
For AI-assisted migrations, the package also includes:
|
|
164
|
+
|
|
165
|
+
- `ai/gravitas-component-migration.md`
|
|
166
|
+
|
|
167
|
+
That document is written as an execution spec for agents replacing existing app
|
|
168
|
+
components with Gravitas equivalents.
|
|
169
|
+
|
|
170
|
+
## Building
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
yarn build
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The built package is output to `dist/gravitas-ui`.
|
|
177
|
+
|
|
178
|
+
## Publishing
|
|
179
|
+
|
|
180
|
+
Build the library first, then publish from the generated package directory:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
yarn build
|
|
184
|
+
cd dist/gravitas-ui
|
|
185
|
+
npm publish
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Package release notes are included in the bundled `CHANGELOG.md`.
|
|
189
|
+
|
|
190
|
+
## Security
|
|
191
|
+
|
|
192
|
+
Gravitas should only be published against Angular peer ranges outside known
|
|
193
|
+
vulnerable lines. The package metadata in this repository now targets the
|
|
194
|
+
patched Angular `21.2.4+` line.
|
|
195
|
+
|
|
196
|
+
Security disclosures should follow the policy in `SECURITY.md` included in the
|
|
197
|
+
published package.
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
Gravitas UI is prepared for public distribution under the MIT license. See the
|
|
202
|
+
bundled `LICENSE` file in the published package root.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Security fixes are applied to the current publishable line of Gravitas UI.
|
|
6
|
+
|
|
7
|
+
At the time of writing, the supported line is:
|
|
8
|
+
|
|
9
|
+
- `0.0.x`
|
|
10
|
+
|
|
11
|
+
Older unpublished or private preview builds should not be treated as supported
|
|
12
|
+
for security maintenance.
|
|
13
|
+
|
|
14
|
+
## Reporting A Vulnerability
|
|
15
|
+
|
|
16
|
+
Do not open a public GitHub issue for a suspected security vulnerability.
|
|
17
|
+
|
|
18
|
+
Report it privately through one of these channels:
|
|
19
|
+
|
|
20
|
+
1. GitHub private vulnerability reporting for the repository, if enabled.
|
|
21
|
+
2. Your company's internal security reporting channel.
|
|
22
|
+
3. Direct contact with the package maintainers, if a dedicated security contact
|
|
23
|
+
has been published.
|
|
24
|
+
|
|
25
|
+
Include the following:
|
|
26
|
+
|
|
27
|
+
- affected package version
|
|
28
|
+
- affected Angular version
|
|
29
|
+
- a short description of the issue
|
|
30
|
+
- reproduction steps or proof of concept
|
|
31
|
+
- impact assessment if known
|
|
32
|
+
|
|
33
|
+
## Response Expectations
|
|
34
|
+
|
|
35
|
+
Maintainers should:
|
|
36
|
+
|
|
37
|
+
1. acknowledge receipt
|
|
38
|
+
2. validate impact
|
|
39
|
+
3. prepare a fix or mitigation
|
|
40
|
+
4. publish an updated package version when appropriate
|
|
41
|
+
5. disclose the issue responsibly after a fix is available
|