@abstractframework/ui-kit 0.1.0 → 0.1.2
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 +8 -7
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @abstractframework/ui-kit
|
|
2
2
|
|
|
3
3
|
Shared theme tokens + small UI primitives used across AbstractUIC packages and host apps.
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ This package provides:
|
|
|
7
7
|
- **Theme tokens** (CSS variables + theme classes): `ui-kit/src/theme.css`
|
|
8
8
|
- **Theme + typography helpers**: `applyTheme(...)`, `applyTypography(...)`
|
|
9
9
|
- **Common inputs**: `AfSelect`, `ThemeSelect`, `ProviderModelSelect`, etc.
|
|
10
|
-
- **Icons**: `Icon` (used by `@
|
|
10
|
+
- **Icons**: `Icon` (used by `@abstractframework/panel-chat`)
|
|
11
11
|
|
|
12
12
|
## Install / peer dependencies
|
|
13
13
|
|
|
@@ -15,21 +15,21 @@ This is a React package with peer dependencies on `react@^18` and `react-dom@^18
|
|
|
15
15
|
|
|
16
16
|
## Install
|
|
17
17
|
|
|
18
|
-
- Workspace: add a dependency on `@
|
|
19
|
-
- npm (once published): `npm i @
|
|
18
|
+
- Workspace: add a dependency on `@abstractframework/ui-kit`
|
|
19
|
+
- npm (once published): `npm i @abstractframework/ui-kit`
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
23
|
Import the theme tokens once in your app:
|
|
24
24
|
|
|
25
25
|
```ts
|
|
26
|
-
import "@
|
|
26
|
+
import "@abstractframework/ui-kit/theme.css";
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Apply a theme at runtime (optional):
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
|
-
import { applyTheme } from "@
|
|
32
|
+
import { applyTheme } from "@abstractframework/ui-kit";
|
|
33
33
|
|
|
34
34
|
applyTheme("dark"); // sets a `theme-*` class on <html>
|
|
35
35
|
```
|
|
@@ -37,7 +37,7 @@ applyTheme("dark"); // sets a `theme-*` class on <html>
|
|
|
37
37
|
Use UI components:
|
|
38
38
|
|
|
39
39
|
```tsx
|
|
40
|
-
import { ThemeSelect, Icon } from "@
|
|
40
|
+
import { ThemeSelect, Icon } from "@abstractframework/ui-kit";
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
## Exported API
|
|
@@ -47,5 +47,6 @@ See `ui-kit/src/index.ts` for the authoritative export list.
|
|
|
47
47
|
## Related docs
|
|
48
48
|
|
|
49
49
|
- Getting started: [`docs/getting-started.md`](../docs/getting-started.md)
|
|
50
|
+
- API reference: [`docs/api.md`](../docs/api.md)
|
|
50
51
|
- Repo docs index: [`docs/README.md`](../docs/README.md)
|
|
51
52
|
- Architecture: [`docs/architecture.md`](../docs/architecture.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abstractframework/ui-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Shared UI tokens + themes for AbstractFramework thin clients (AbstractFlow, AbstractObserver, etc.).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Laurent-Philippe Albou",
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
"react-dom": "^18.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
+
"react": "^18.0.0",
|
|
48
|
+
"react-dom": "^18.0.0",
|
|
47
49
|
"@types/react": "^18.2.48",
|
|
48
50
|
"@types/react-dom": "^18.2.18",
|
|
49
51
|
"typescript": "^5.3.3"
|