@aristobyte-ui/radio 1.0.8 → 1.0.11

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 ADDED
@@ -0,0 +1,98 @@
1
+ # @aristobyte-ui/radio
2
+
3
+ <p align="center">
4
+ <img src="https://img.shields.io/badge/TypeScript-5.8-blue?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript" />
5
+ <img src="https://img.shields.io/badge/Build-Turbo-green?style=for-the-badge&logo=turbo&logoColor=white" alt="TurboRepo" />
6
+ <img src="https://img.shields.io/badge/Lint-Strict-red?style=for-the-badge&logo=eslint&logoColor=white" alt="ESLint" />
7
+ <img src="https://img.shields.io/badge/License-MIT-black?style=for-the-badge&logo=open-source-initiative&logoColor=white" alt="License" />
8
+ <img src="https://img.shields.io/badge/AristoByte-UI-purple?style=for-the-badge&logo=react&logoColor=white" alt="AristoByte UI" />
9
+ <img src="https://img.shields.io/badge/Node-20.17.0+-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js >=20.17.0" />
10
+ <img src="https://img.shields.io/badge/Yarn-1.22+-2C8EBB?style=for-the-badge&logo=yarn&logoColor=white" alt="Yarn >=1.22" />
11
+ <img src="https://img.shields.io/badge/NPM-10.8+-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="NPM >=10.8" />
12
+ </p>
13
+
14
+ Fully-typed, composable Radio and RadioGroup components for AristoByteUI, supporting multiple variants, sizes, appearances, alignments, and optional label highlights.
15
+
16
+ ## 📦 Installation
17
+
18
+ ```bash
19
+ # Install via Yarn
20
+ yarn add -D @aristobyte-ui/radio
21
+
22
+ # Or via npm
23
+ npm install -D @aristobyte-ui/radio
24
+
25
+ # Or via pnpm
26
+ pnpm add -D @aristobyte-ui/radio
27
+ ```
28
+
29
+ ## 🛠 Usage
30
+
31
+ ```tsx
32
+ import { Radio, RadioGroup } from "@aristobyte-ui/radio";
33
+
34
+ <RadioGroup
35
+ name="options"
36
+ value="option1"
37
+ onChange={(val) => console.log(val)}
38
+ variant="primary"
39
+ size="md"
40
+ align="horizontal"
41
+ alignLabel="right"
42
+ >
43
+ <Radio value="option1">Option 1</Radio>
44
+ <Radio value="option2">Option 2</Radio>
45
+ </RadioGroup>;
46
+ ```
47
+
48
+ ##📂 Presets Available
49
+
50
+ - **variant**: `default` | `primary` | `secondary` | `success` | `error` | `warning`
51
+ - **appearance**: `default` | `solid` | `outline` | `outline-dashed` | `no-outline` | `glowing`
52
+ - **size**: `xsm` | `sm` | `md` | `lg` | `xlg`
53
+ - **align**: `horizontal` | `vertical`
54
+ - **alignLabel**: `top` | `right` | `bottom` | `left`
55
+ - **highlightLabel**: `boolean`
56
+
57
+ ## 🔧 Example in a Package
58
+
59
+ ```tsx
60
+ <Radio
61
+ value="radio1"
62
+ size="lg"
63
+ variant="success"
64
+ appearance="glowing"
65
+ alignLabel="top"
66
+ >
67
+ Radio Option
68
+ </Radio>
69
+ ```
70
+
71
+ ## 📊 Why This Matters
72
+
73
+ - **Performance-first:** Lightweight CSS ensures fast rendering and smooth transitions.
74
+ - **Fully typed:** TypeScript-first API ensures predictable usage and IDE autocomplete.
75
+ - **AristoByteUI ready:** Seamlessly integrates with design tokens and SCSS modules.
76
+ - **Flexible:** Supports multiple variants, sizes, appearances, alignments, and optional label highlights.
77
+
78
+ ## 🏆 Philosophy
79
+
80
+ - **Modular architecture:** Radio and RadioGroup components are fully composable.
81
+ - **Declarative styling:** SCSS modules keep styles maintainable and scoped.
82
+ - **Strict typing & runtime flexibility:** Props fully typed while allowing runtime overrides.
83
+ - **Developer experience optimized:** Easy to use with predictable behavior and minimal boilerplate.
84
+
85
+ ## 📜 License
86
+
87
+ [MIT](./LICENSE) © AristoByte
88
+
89
+ ## 🛡 Shields Showcase
90
+
91
+ <p align="center">
92
+ <img src="https://img.shields.io/badge/Consistency-100%25-green?style=for-the-badge&logo=typescript" />
93
+ <img src="https://img.shields.io/badge/Maintained-Active-brightgreen?style=for-the-badge&logo=github" />
94
+ <img src="https://img.shields.io/badge/Strictness-High-critical?style=for-the-badge&logo=eslint" />
95
+ <img src="https://img.shields.io/badge/Declarations-Enabled-blue?style=for-the-badge&logo=typescript" />
96
+ <img src="https://img.shields.io/badge/Monorepo-Turbo-green?style=for-the-badge&logo=monorepo" />
97
+ <img src="https://img.shields.io/badge/Interop-ESM%2FCJS-orange?style=for-the-badge&logo=javascript" />
98
+ </p>