sigpro-ui 1.0.6
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 +146 -0
- package/dist/sigpro-ui.cjs +1677 -0
- package/dist/sigpro-ui.esm.js +1621 -0
- package/dist/sigpro-ui.umd.js +1680 -0
- package/dist/sigpro-ui.umd.min.js +1 -0
- package/index.js +40 -0
- package/package.json +52 -0
- package/src/components/Accordion.js +24 -0
- package/src/components/Alert.js +50 -0
- package/src/components/Autocomplete.js +95 -0
- package/src/components/Badge.js +6 -0
- package/src/components/Button.js +39 -0
- package/src/components/Checkbox.js +21 -0
- package/src/components/Colorpicker.js +81 -0
- package/src/components/Datepicker.js +252 -0
- package/src/components/Drawer.js +18 -0
- package/src/components/Dropdown.js +37 -0
- package/src/components/Fab.js +51 -0
- package/src/components/Fieldset.js +19 -0
- package/src/components/Fileinput.js +113 -0
- package/src/components/Indicator.js +9 -0
- package/src/components/Input.js +77 -0
- package/src/components/List.js +18 -0
- package/src/components/Loading.js +13 -0
- package/src/components/Menu.js +25 -0
- package/src/components/Modal.js +31 -0
- package/src/components/Navbar.js +6 -0
- package/src/components/Radio.js +25 -0
- package/src/components/Range.js +24 -0
- package/src/components/Rating.js +34 -0
- package/src/components/Select.js +36 -0
- package/src/components/Stack.js +6 -0
- package/src/components/Stat.js +11 -0
- package/src/components/Swap.js +13 -0
- package/src/components/Table.js +60 -0
- package/src/components/Tabs.js +46 -0
- package/src/components/Timeline.js +52 -0
- package/src/components/Toast.js +63 -0
- package/src/components/Tooltip.js +6 -0
- package/src/components/index.js +110 -0
- package/src/core/i18n.js +26 -0
- package/src/core/icons.js +17 -0
- package/src/core/utils.js +5 -0
package/Readme.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# SigPro UI (W.I.P.)
|
|
2
|
+
|
|
3
|
+
**SigPro UI** is a lightweight, ultra-fast, and reactive component library built for the **SigPro** reactivity core. It provides a set of high-quality, accessible, and themeable UI components leveraging the power of **Tailwind CSS v4** and **daisyUI v5**.
|
|
4
|
+
|
|
5
|
+
Unlike heavy frameworks, SigPro UI focuses on a **"Zero-Build"** philosophy, allowing you to build complex reactive interfaces with a functional, declarative syntax that runs natively in the browser.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
* **Signals-Based Reactivity**: Powered by SigPro for granular DOM updates.
|
|
12
|
+
* **DaisyUI v5 Integration**: Beautiful, semantic components out of the box.
|
|
13
|
+
* **Tree Shaking Ready**: Import only what you need.
|
|
14
|
+
* **Zero-Import Option**: Inject all components into the global scope with one command.
|
|
15
|
+
* **Lightweight**: Minimal footprint with a focus on performance.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
To use SigPro UI, your project must include:
|
|
22
|
+
|
|
23
|
+
1. **SigPro Core**: `npm install sigpro` (or via CDN).
|
|
24
|
+
2. **Tailwind CSS v4**: For utility-first styling.
|
|
25
|
+
3. **daisyUI v5**: The component engine for Tailwind.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 1. Prerequisites & Installation
|
|
29
|
+
SigPro UI is built as an extension of the SigPro reactivity system. You need to install the core library first.
|
|
30
|
+
|
|
31
|
+
### Step 1: Install SigPro Core
|
|
32
|
+
|
|
33
|
+
```Bash
|
|
34
|
+
bun add sigpro
|
|
35
|
+
# or
|
|
36
|
+
npm install sigpro
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Step 2: Install SigPro UI
|
|
40
|
+
|
|
41
|
+
```Bash
|
|
42
|
+
bun add sigpro-ui
|
|
43
|
+
# or
|
|
44
|
+
npm install sigpro-ui
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Via CDN (Browser)
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<script src="https://unpkg.com/sigpro"></script>
|
|
51
|
+
<script src="https://unpkg.com/sigpro-ui"></script>
|
|
52
|
+
```
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 2. Styling Setup (Tailwind CSS v4)
|
|
56
|
+
SigPro UI components rely on **Tailwind CSS** and **daisyUI** for styling. You don't need a complex tailwind.config.js; simply configure your main CSS entry point.
|
|
57
|
+
|
|
58
|
+
Create or edit your global CSS file (e.g., style.css):
|
|
59
|
+
|
|
60
|
+
```css
|
|
61
|
+
/* src/style.css */
|
|
62
|
+
@import "tailwindcss";
|
|
63
|
+
@plugin "daisyui";
|
|
64
|
+
|
|
65
|
+
/* Optional: Your custom theme overrides */
|
|
66
|
+
:root {
|
|
67
|
+
--primary: #570df8;
|
|
68
|
+
--secondary: #f000b8;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
---
|
|
72
|
+
## Setup & Usage
|
|
73
|
+
|
|
74
|
+
You can use SigPro UI in two ways: **Modular** (Recommended for production) or **Global** (Fastest for prototyping).
|
|
75
|
+
|
|
76
|
+
### 1. Modular Approach (Tree Shaking)
|
|
77
|
+
Import only the components you need. This keeps your bundle small.
|
|
78
|
+
|
|
79
|
+
```javascript
|
|
80
|
+
import { $, $mount } from "sigpro";
|
|
81
|
+
import { Button, Modal, Table } from "sigpro-ui";
|
|
82
|
+
|
|
83
|
+
const App = () => {
|
|
84
|
+
const show = $(false);
|
|
85
|
+
return Button({ onclick: () => show(true) }, "Open Modal");
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
$mount(App, "#app");
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 2. Global Approach (Zero-Import)
|
|
92
|
+
Inject all components and utilities into the `window` object. This makes all components available everywhere without manual imports.
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
import SigproUI from "sigpro-ui";
|
|
96
|
+
|
|
97
|
+
// Injects Button, Table, Input, Icons, Utils, etc. into window
|
|
98
|
+
SigproUI.install();
|
|
99
|
+
|
|
100
|
+
// Now you can use them directly anywhere:
|
|
101
|
+
const myApp = () => Table({ items: [], columns: [] });
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Basic Example
|
|
107
|
+
|
|
108
|
+
```javascript
|
|
109
|
+
import { $ } from "sigpro";
|
|
110
|
+
import { Button, Toast, Div, H1 } from "sigpro-ui";
|
|
111
|
+
|
|
112
|
+
const App = () => {
|
|
113
|
+
const count = $(0);
|
|
114
|
+
|
|
115
|
+
return Div({ class: "p-10 flex flex-col gap-4" }, [
|
|
116
|
+
H1({ class: "text-2xl font-bold" }, "Welcome to SigPro UI"),
|
|
117
|
+
|
|
118
|
+
Button({
|
|
119
|
+
class: "btn-primary",
|
|
120
|
+
onclick: () => {
|
|
121
|
+
count(c => c + 1);
|
|
122
|
+
Toast(`Count is now ${count()}`, "alert-success");
|
|
123
|
+
}
|
|
124
|
+
}, () => `Clicks: ${count()}`)
|
|
125
|
+
]);
|
|
126
|
+
};
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Components Included
|
|
132
|
+
|
|
133
|
+
| Category | Components |
|
|
134
|
+
| :--- | :--- |
|
|
135
|
+
| **Form** | `Input`, `Select`, `Checkbox`, `Radio`, `Range`, `Datepicker`, `Colorpicker`, `Autocomplete`, `Rating` |
|
|
136
|
+
| **Data** | `Table`, `List`, `Stat`, `Timeline`, `Badge`, `Indicator` |
|
|
137
|
+
| **Layout** | `Navbar`, `Menu`, `Drawer`, `Fieldset`, `Stack`, `Tabs`, `Accordion` |
|
|
138
|
+
| **Feedback** | `Alert`, `Modal`, `Toast`, `Loading`, `Tooltip` |
|
|
139
|
+
| **Interaction** | `Button`, `Dropdown`, `Swap`, `Fab` |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
MIT © 2026 **SigPro Team**.
|
|
146
|
+
*Engineered for speed, designed for clarity, built for the modern web.*
|