ssovee-os-web-ui 0.1.8 → 0.1.9
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 +12 -105
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,79 +1,28 @@
|
|
|
1
1
|
# ssovee-os-web-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Reusable React UI components for consuming projects.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
- Shared UI component exports for multiple applications
|
|
8
|
-
- TypeScript-friendly component interfaces
|
|
9
|
-
- Tree-shakeable package build output
|
|
10
|
-
- SemVer-friendly publish workflow
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
Install the library in your app:
|
|
5
|
+
## Install
|
|
15
6
|
|
|
16
7
|
```bash
|
|
17
8
|
npm install ssovee-os-web-ui
|
|
18
9
|
```
|
|
19
10
|
|
|
20
|
-
If your app does not already include React
|
|
11
|
+
If your app does not already include React, install it as well:
|
|
21
12
|
|
|
22
13
|
```bash
|
|
23
14
|
npm install react react-dom
|
|
24
15
|
```
|
|
25
16
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
The package entry is intended to provide the public React component surface. Internal helper hooks and utilities used by the components remain implementation details and are not part of the consumer-facing API.
|
|
29
|
-
|
|
30
|
-
## Tailwind CSS setup
|
|
31
|
-
|
|
32
|
-
Import the supplied base theme once from your application's global CSS file:
|
|
33
|
-
|
|
34
|
-
```css
|
|
35
|
-
@import "ssovee-os-web-ui/theme.css";
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
For Tailwind v3, add the library build output to `content` and use the supplied preset:
|
|
17
|
+
## CSS import
|
|
39
18
|
|
|
40
|
-
|
|
41
|
-
import ssoveePreset from "ssovee-os-web-ui/tailwind-preset";
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
content: [
|
|
45
|
-
"./src/**/*.{js,ts,jsx,tsx}",
|
|
46
|
-
"./node_modules/ssovee-os-web-ui/dist/**/*.{js,mjs,cjs}",
|
|
47
|
-
],
|
|
48
|
-
presets: [ssoveePreset],
|
|
49
|
-
};
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
For Tailwind v4, import the package theme stylesheet directly in your global CSS. The package theme entry already carries the Tailwind bootstrap and library source scanning for the built dist output, so consumers do not need to repeat the `@source`/`@import "tailwindcss"` lines in their app CSS:
|
|
19
|
+
In the consuming app, add only the package theme stylesheet to your global CSS:
|
|
53
20
|
|
|
54
21
|
```css
|
|
55
22
|
@import "ssovee-os-web-ui/theme.css";
|
|
56
23
|
```
|
|
57
24
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
```js
|
|
61
|
-
import ssoveePreset from "ssovee-os-web-ui/tailwind-preset";
|
|
62
|
-
|
|
63
|
-
export default {
|
|
64
|
-
presets: [ssoveePreset],
|
|
65
|
-
};
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
You can also point your app at the published config file directly via the package export:
|
|
69
|
-
|
|
70
|
-
```js
|
|
71
|
-
import ssoveePreset from "ssovee-os-web-ui/tailwind.config.js";
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
The preset includes the library's semantic colors (`primary`, `secondary`, `surface-*`, `brand-color`, `border-1`, and `muted`). Override the `--ssovee-*` CSS variables in your application to customize the theme.
|
|
75
|
-
|
|
76
|
-
## Usage
|
|
25
|
+
## Use components
|
|
77
26
|
|
|
78
27
|
```tsx
|
|
79
28
|
import { Button, Input, Card } from "ssovee-os-web-ui";
|
|
@@ -88,17 +37,19 @@ export function Example() {
|
|
|
88
37
|
}
|
|
89
38
|
```
|
|
90
39
|
|
|
91
|
-
##
|
|
40
|
+
## Public exports
|
|
92
41
|
|
|
93
|
-
The
|
|
42
|
+
The package exports these components and types for external use:
|
|
94
43
|
|
|
95
44
|
- `Button`
|
|
96
45
|
- `Input`
|
|
97
46
|
- `TextArea`
|
|
98
47
|
- `Select`
|
|
48
|
+
- `SelectOption`
|
|
99
49
|
- `Checkbox`
|
|
100
50
|
- `Toggle`
|
|
101
51
|
- `Dropdown`
|
|
52
|
+
- `DropdownOption`
|
|
102
53
|
- `Loading`
|
|
103
54
|
- `Toast`
|
|
104
55
|
- `Alert`
|
|
@@ -117,50 +68,6 @@ The library publishes the following shared UI components from the package entry
|
|
|
117
68
|
- `Tabs`
|
|
118
69
|
- `Typography`
|
|
119
70
|
- `ImageWithPlaceholder`
|
|
120
|
-
- `Table` and its
|
|
121
|
-
|
|
122
|
-
Internal helper hooks and utilities such as `useShortcutFormatter` and `cn` are used within the component implementation and are not documented as public package exports.
|
|
123
|
-
|
|
124
|
-
## Package structure
|
|
125
|
-
|
|
126
|
-
```text
|
|
127
|
-
src/
|
|
128
|
-
components/
|
|
129
|
-
hooks/
|
|
130
|
-
utils/
|
|
131
|
-
index.ts
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Build
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
npm install
|
|
138
|
-
npm run build
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Internal component helpers
|
|
142
|
-
|
|
143
|
-
The source tree contains helper hooks and utilities used only by the component implementation. These are internal implementation details and are not intended to be consumed directly via the library package entry.
|
|
144
|
-
|
|
145
|
-
## Versioning and release
|
|
146
|
-
|
|
147
|
-
Use semantic versioning for releases:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
npm run release:patch
|
|
151
|
-
npm run release:minor
|
|
152
|
-
npm run release:major
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
Then publish:
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
npm login
|
|
159
|
-
npm publish --access public
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## CI publish workflow
|
|
163
|
-
|
|
164
|
-
This repo is prepared for automated release publishing through GitHub Actions using the `NODE_AUTH_TOKEN` secret.
|
|
71
|
+
- `Table` and its subcomponents
|
|
165
72
|
|
|
166
|
-
|
|
73
|
+
Internal helpers such as `useShortcutFormatter` and `cn` are used inside the library implementation and are not part of the recommended consumer API.
|