@sgx4u/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/CHANGELOG.md +69 -0
- package/LICENSE +7 -0
- package/README.md +161 -0
- package/SECURITY.md +5 -0
- package/SUPPORT.md +5 -0
- package/dist/bin.cjs +1218 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +4 -0
- package/dist/chunk-SWLJZFBL.js +890 -0
- package/dist/cli-UJKWK2HV.js +200 -0
- package/dist/index.cjs +924 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +10 -0
- package/logo.svg +18 -0
- package/package.json +88 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@sgx4u/ui` are documented in this file.
|
|
4
|
+
This project adheres to Semantic Versioning.
|
|
5
|
+
|
|
6
|
+
## [1.0.0]
|
|
7
|
+
|
|
8
|
+
#### Date - 30th Nov 2025
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial public release of `@sgx4u/ui`.
|
|
13
|
+
- CLI commands: init, add, list, info, config, help with registry + dependency resolution.
|
|
14
|
+
- Elements:
|
|
15
|
+
- `accordion`: A vertically stacked set of interactive headings that each reveal a section of content.
|
|
16
|
+
- `aspect-ratio`: Container that preserves a fixed width-to-height ratio for media and other content.
|
|
17
|
+
- `auto-complete`: Text input that suggests and lets users pick from a filtered list of options as they type.
|
|
18
|
+
- `backdrop`: A dimmed, often blurred layer that sits behind overlays to draw attention to foreground content.
|
|
19
|
+
- `background`: Decorative background components for applying animated gradients and ambient color effects behind your UI.
|
|
20
|
+
- `badge`: Compact label used to display counts, statuses, or short pieces of metadata.
|
|
21
|
+
- `breadcrumb`: A horizontal trail of links that helps users understand and navigate the hierarchy of a site or app.
|
|
22
|
+
- `button`: Pressable control used to trigger actions or events, with support for visual variants, sizes, and loading states.
|
|
23
|
+
- `button-group`: A collection of related buttons displayed as a single, visually connected group.
|
|
24
|
+
- `checkbox`: A square box that users can check or uncheck to represent boolean choices or multi-select lists.
|
|
25
|
+
- `click-away-listener`:Click away listener that uses a unique data-click-away-id for outside click detection.
|
|
26
|
+
- `container`: Layout wrapper used to arrange and align content using consistent flex or grid primitives.
|
|
27
|
+
- `dialog`: A window overlaid on the current page that focuses the user on a specific task or piece of information.
|
|
28
|
+
- `focus-trap`: Utility that keeps keyboard focus inside a given region while it is active.
|
|
29
|
+
- `highlight`: Text helper that visually emphasizes matches within content, often used for search results.
|
|
30
|
+
- `hover-card`: A small floating panel that reveals supplemental content when users hover or focus a trigger element.
|
|
31
|
+
- `icons`: Small reusable icon components, including controls like the password show/hide toggle.
|
|
32
|
+
- `image`: Enhanced image primitives for displaying pictures with optional progressive loading and performance-friendly defaults.
|
|
33
|
+
- `indicators`: Small visual markers, such as asterisks, used to call out required or special fields in forms.
|
|
34
|
+
- `input`: Single-line text field for capturing short pieces of information such as names, emails, or search queries.
|
|
35
|
+
- `label`: Text caption that describes and links to a form control, often showing required or validation state.
|
|
36
|
+
- `link`: A navigational element that takes users to another page, view, or section when activated.
|
|
37
|
+
- `list`: A semantic container for ordered or unordered groups of related list items.
|
|
38
|
+
- `list-item`: A single item inside a list, typically representing one entry in a collection of related content.
|
|
39
|
+
- `loader`: Visual indicator that communicates to users that content or actions are in progress.
|
|
40
|
+
- `popover`: A small overlay that appears near a trigger to display contextual information or actions.
|
|
41
|
+
- `portal`: Mechanism for rendering content into a different part of the DOM tree, often used for overlays and dialogs.
|
|
42
|
+
- `presence`: Helper that controls whether a child stays mounted while its enter and exit animations complete.
|
|
43
|
+
- `radio`: Single-selection form control typically used in groups where only one option can be active at a time.
|
|
44
|
+
- `select`: A dropdown control for choosing one or more options from a list, with an optional searchable variant.
|
|
45
|
+
- `separator`: Thin rule used to visually divide groups of content or UI controls.
|
|
46
|
+
- `sheet`: A panel that slides in from the edge of the screen to display contextual content without leaving the current page.
|
|
47
|
+
- `skeleton`: Placeholder UI used to represent content that is still loading.
|
|
48
|
+
- `slot`: Composition utility that lets components render their children as the actual DOM element while still receiving styling and behavior.
|
|
49
|
+
- `switch`: A two-state toggle used for turning a setting or feature on and off.
|
|
50
|
+
- `table`: A tabular data structure that organizes information into rows and columns.
|
|
51
|
+
- `tabs`: A set of stacked triggers that switch between different views or panels in the same space.
|
|
52
|
+
- `text`: Typography primitive for rendering semantic headings, paragraphs, and inline text.
|
|
53
|
+
- `text-style`: Inline text formatting primitives for emphasizing, underlining, or annotating existing content.
|
|
54
|
+
- `textarea`: Multiline text field for collecting longer free-form input such as comments, notes, or descriptions.
|
|
55
|
+
- `timeline`: Visual representation of a sequence of events or steps in a process.
|
|
56
|
+
- `toggle`: A pressable control that switches between on and off states, similar to a button with persistent pressed state.
|
|
57
|
+
- `tooltip`: A brief, non-interactive label that appears on hover or focus to describe another element.
|
|
58
|
+
- `visually-hidden`: Utility for content that should be available to screen readers but not visible on screen.
|
|
59
|
+
|
|
60
|
+
<!--
|
|
61
|
+
Add new versions below this line, following the same structure:
|
|
62
|
+
|
|
63
|
+
## [x.y.z]
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
### Changed
|
|
67
|
+
### Fixed
|
|
68
|
+
### Removed
|
|
69
|
+
-->
|
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2024 Subhajit Ghosh
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://github.com/sgx4u/sgx4u-ui/blob/production/logo.svg?raw=true" width="75px" align="center" alt="SGX4U" />
|
|
3
|
+
<h2 align="center">🌟 @sgx4u/ui 🌟</h2>
|
|
4
|
+
<p align="center">Accessible, efficient and customizable components to start your own project. Use this to build any project of any scale.</p>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<br/>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<!-- NPM Version -->
|
|
11
|
+
<img src="https://img.shields.io/npm/v/%40sgx4u%2Fui?style=for-the-badge&labelColor=353535&color=3b82f6" alt="Version">
|
|
12
|
+
<!-- License -->
|
|
13
|
+
<img src="https://img.shields.io/github/license/sgx4u/sgx4u-ui?style=for-the-badge&labelColor=353535&color=4f46e5" alt="License">
|
|
14
|
+
<!-- TypeScript -->
|
|
15
|
+
<img src="https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript">
|
|
16
|
+
<!-- JavaScript -->
|
|
17
|
+
<img src="https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E" alt="JavaScript">
|
|
18
|
+
<!-- LinkedIn -->
|
|
19
|
+
<a href="https://www.linkedin.com/in/sgx4u" rel="nofollow"><img src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fsgx4u%2F&style=for-the-badge&logo=linkedin&label=SGX4U&labelColor=%230077B5&color=%23353535" alt="LinkedIn"></a>
|
|
20
|
+
<!-- X (Twitter) -->
|
|
21
|
+
<a href="https://x.com/sgx4u" rel="nofollow"><img src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2Fsgx4u&style=for-the-badge&logo=x&label=sgx4u&labelColor=353535" alt="X (Twitter)"></a>
|
|
22
|
+
<!-- Last Update -->
|
|
23
|
+
<img src="https://img.shields.io/npm/last-update/%40sgx4u%2Fui?style=for-the-badge&labelColor=353535&color=f15b2a" alt="Update">
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<br/>
|
|
27
|
+
|
|
28
|
+
## ⚜️ Table of Contents
|
|
29
|
+
|
|
30
|
+
- [Overview](#overview)
|
|
31
|
+
- [Links](#️-links)
|
|
32
|
+
- [Features](#features)
|
|
33
|
+
- [Requirements](#requirements)
|
|
34
|
+
- [Installation](#installation)
|
|
35
|
+
- [Quick Start](#quick-start)
|
|
36
|
+
- [CLI Usage](#-cli-usage)
|
|
37
|
+
- [Theming and Customization](#theming-and-customization)
|
|
38
|
+
- [Contributing](#contributing)
|
|
39
|
+
- [Versioning and Changelog](#versioning-and-changelog)
|
|
40
|
+
|
|
41
|
+
<br/>
|
|
42
|
+
|
|
43
|
+
## 💎 Overview
|
|
44
|
+
|
|
45
|
+
`@sgx4u/ui` is a transparent, TypeScript-first React component library, designed to be fully readable, extendable, and production-ready. The main goal with this UI library is raw code accessibility, so that there is nothing hidden from the developer.
|
|
46
|
+
|
|
47
|
+
`@sgx4u/ui` focuses on:
|
|
48
|
+
|
|
49
|
+
- **No hidden abstractions**: You install real source code, not a black-box design system.
|
|
50
|
+
- **Scalability**: Suitable for small prototypes and large-scale applications alike.
|
|
51
|
+
- **Consistency**: Opinionated defaults that still stay easy to customize.
|
|
52
|
+
- **Developer experience**: A CLI that lets you add and inspect components quickly.
|
|
53
|
+
|
|
54
|
+
<br/>
|
|
55
|
+
|
|
56
|
+
## 🔗 Links
|
|
57
|
+
|
|
58
|
+
- [`SGX4U UI Docs`](ui.sgx4u.com) ‐ Package documentation and component examples.
|
|
59
|
+
|
|
60
|
+
<br/>
|
|
61
|
+
|
|
62
|
+
## Features
|
|
63
|
+
|
|
64
|
+
- **Accessible by default**: Components are built with proper semantics, ARIA attributes, accessibility, and keyboard interactions in mind.
|
|
65
|
+
- **TypeScript-first**: Fully typed APIs with explicit, predictable props for each component.
|
|
66
|
+
- **Tailwind CSS-based**: Utility classes by default, with clear escape hatches for customization.
|
|
67
|
+
- **CLI-driven**: Use the `sgx4u-ui` CLI to initialize projects, inspect components, and add new building blocks.
|
|
68
|
+
- **Animation-ready**: Subtle, CSS-only animations are included to keep interfaces feeling smooth and responsive.
|
|
69
|
+
- **Composable primitives**: Focus on primitives like `button`, `dialog`, `tabs`, and `text` that compose into more advanced UIs.
|
|
70
|
+
|
|
71
|
+
<br/>
|
|
72
|
+
|
|
73
|
+
## Requirements
|
|
74
|
+
|
|
75
|
+
- **Node.js**: `>= 22.0.0`.
|
|
76
|
+
- **Package manager**: `pnpm` is recommended for the best experience.
|
|
77
|
+
- **Library & Framework**: React.js 19+, Next.js 16+.
|
|
78
|
+
- **Styling**: Tailwind CSS 4+ configured in your project.
|
|
79
|
+
|
|
80
|
+
## 💡Installation
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
npm install @sgx4u/ui # npm
|
|
84
|
+
yarn add @sgx4u/ui # yarn
|
|
85
|
+
pnpm add @sgx4u/ui # pnpm
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
<br/>
|
|
89
|
+
|
|
90
|
+
## Quick Start
|
|
91
|
+
|
|
92
|
+
1. **Install the library**.
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
pnpm add @sgx4u/ui
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
2. **Initialize SGX4U UI in your project**.
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
pnpm dlx @sgx4u/ui init
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
3. **Add components in your project**.
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
sgx4u-ui add button
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
4. **Start your dev server** (for example, with Next.js or Vite) and verify the component renders and behaves as expected.
|
|
111
|
+
|
|
112
|
+
<br/>
|
|
113
|
+
|
|
114
|
+
## 🚀 CLI Usage
|
|
115
|
+
|
|
116
|
+
Install and use the CLI via `pnpm` (recommended) or your preferred package manager.
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
pnpm add @sgx4u/ui
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Then use the `sgx4u-ui` commands:
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
# Initialize SGX4U UI in your project
|
|
126
|
+
sgx4u-ui init
|
|
127
|
+
|
|
128
|
+
# Install a component
|
|
129
|
+
sgx4u-ui add <component-name>
|
|
130
|
+
|
|
131
|
+
# Show available components
|
|
132
|
+
sgx4u-ui list
|
|
133
|
+
|
|
134
|
+
# Show information about a component
|
|
135
|
+
sgx4u-ui info
|
|
136
|
+
|
|
137
|
+
# Show configuration
|
|
138
|
+
sgx4u-ui config
|
|
139
|
+
|
|
140
|
+
# Show this help information
|
|
141
|
+
sgx4u-ui help
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
<br/>
|
|
145
|
+
|
|
146
|
+
## Theming and Customization
|
|
147
|
+
|
|
148
|
+
`@sgx4u/ui` is designed to be themed and adapted to your design system.
|
|
149
|
+
|
|
150
|
+
- **Tailwind tokens**: Extend your Tailwind configuration to align colors, spacing, and typography with your brand.
|
|
151
|
+
- **Component overrides**: Because the source is fully accessible, you can copy and adapt components to your own conventions.
|
|
152
|
+
- **Utility-first styling**: Use Tailwind utility classes to quickly adjust layout, spacing, and appearance without sacrificing consistency.
|
|
153
|
+
|
|
154
|
+
For detailed theming guidance, see the docs in `ui.sgx4u.com/docs/styling`.
|
|
155
|
+
|
|
156
|
+
<br/>
|
|
157
|
+
|
|
158
|
+
## Versioning and Changelog
|
|
159
|
+
|
|
160
|
+
This project follows Semantic Versioning.
|
|
161
|
+
All notable changes are documented in [`CHANGELOG.md`](./CHANGELOG.md).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a Vulnerability
|
|
4
|
+
|
|
5
|
+
Please report (suspected) security vulnerabilities to **[sgx2050@gmail.com](mailto:sgx2050@gmail.com)**. I will try my best to respond as soon as I can. If the issue is confirmed, I will release a patch as soon as possible depending on complexity.
|
package/SUPPORT.md
ADDED