@scalably/ui 0.1.0 → 0.2.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 +17 -11
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Scalably
|
|
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,5 +1,9 @@
|
|
|
1
1
|
# Scalably UI Component Library
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
3
7
|
A modern, accessible, and fully isolated React component library built with TypeScript and Tailwind CSS. Designed to work seamlessly across multiple projects without style conflicts.
|
|
4
8
|
|
|
5
9
|
## 🚀 Features
|
|
@@ -55,6 +59,8 @@ export default function App() {
|
|
|
55
59
|
}
|
|
56
60
|
```
|
|
57
61
|
|
|
62
|
+
Note: Toasts in this library are intentionally declarative. Render a `Toast` inside a `ToastContainer` when you want it visible (e.g., based on component state). This avoids hidden globals and keeps UI state predictable. If you prefer an imperative API, you can wrap your own tiny helper around local state to toggle a `Toast` component.
|
|
63
|
+
|
|
58
64
|
### 3. Add the provider once (recommended)
|
|
59
65
|
|
|
60
66
|
Instead of adding the `sui-scope` class manually, wrap your app with the provider:
|
|
@@ -149,9 +155,9 @@ All components use prefixed Tailwind classes (`sui-*`) to ensure complete style
|
|
|
149
155
|
<Button>Isolated Button</Button>
|
|
150
156
|
</div>
|
|
151
157
|
|
|
152
|
-
//
|
|
153
|
-
<div className="p-4"> {/*
|
|
154
|
-
<Button>Button
|
|
158
|
+
// ✅ Your global styles won't break the components
|
|
159
|
+
<div className="p-4 bg-red-500"> {/* These global classes won't affect the button's styles */}
|
|
160
|
+
<Button>Isolated Button</Button>
|
|
155
161
|
</div>
|
|
156
162
|
```
|
|
157
163
|
|
|
@@ -222,14 +228,14 @@ Visit our Storybook documentation for:
|
|
|
222
228
|
|
|
223
229
|
### Colors
|
|
224
230
|
|
|
225
|
-
- **Primary**: `#36499B`
|
|
226
|
-
- **Secondary**: `#F2F6FC`
|
|
227
|
-
- **Success**: `#22BC4D`
|
|
228
|
-
- **Warning**: `#FF7A00`
|
|
229
|
-
- **Info**: `#2772F0`
|
|
230
|
-
- **Error**: `#EA3540`
|
|
231
|
-
- **Inactive**: `#777E90`
|
|
232
|
-
- **Disabled**: `#B2BBC7`
|
|
231
|
+
- **Primary**: `#36499B` – Main brand color for primary actions (`sui-bg-primary`, `sui-text-primary`)
|
|
232
|
+
- **Secondary**: `#F2F6FC` – Light background colors (`sui-bg-secondary`, `sui-text-secondary`)
|
|
233
|
+
- **Success**: `#22BC4D` – Positive actions and success states (`sui-bg-success`, `sui-text-success`)
|
|
234
|
+
- **Warning**: `#FF7A00` – Caution and in-progress states (`sui-bg-warning`, `sui-text-warning`)
|
|
235
|
+
- **Info**: `#2772F0` – Informational content (`sui-bg-info`, `sui-text-info`)
|
|
236
|
+
- **Error**: `#EA3540` – Destructive actions and errors (`sui-bg-error`, `sui-text-error`)
|
|
237
|
+
- **Inactive**: `#777E90` – Inactive or completed states (`sui-text-inactive`, `sui-border-inactive`)
|
|
238
|
+
- **Disabled**: `#B2BBC7` – Disabled elements (`sui-text-disabled`, `sui-border-disabled`)
|
|
233
239
|
|
|
234
240
|
### Typography
|
|
235
241
|
|