@aristobyte-ui/spinner 2.3.5 β†’ 2.4.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.
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import './Spinner.scss';
4
+ export var Spinner = function (_a) {
5
+ var _b = _a.type, type = _b === void 0 ? 'default' : _b, _c = _a.variant, variant = _c === void 0 ? 'default' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.className, className = _e === void 0 ? '' : _e;
6
+ return (React.createElement("div", { className: "spinner spinner-type--".concat(type, " spinner-variant--").concat(variant, " spinner-size--").concat(size, " ").concat(className) }));
7
+ };
@@ -0,0 +1 @@
1
+ export * from './Spinner';
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ 'use client';
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Spinner = void 0;
38
+ var React = __importStar(require("react"));
39
+ require("./Spinner.scss");
40
+ var Spinner = function (_a) {
41
+ var _b = _a.type, type = _b === void 0 ? 'default' : _b, _c = _a.variant, variant = _c === void 0 ? 'default' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.className, className = _e === void 0 ? '' : _e;
42
+ return (React.createElement("div", { className: "spinner spinner-type--".concat(type, " spinner-variant--").concat(variant, " spinner-size--").concat(size, " ").concat(className) }));
43
+ };
44
+ exports.Spinner = Spinner;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Spinner"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aristobyte-ui/spinner",
3
3
  "description": "Flexible, highly customizable React Spinner component for AristoByteUI. Supports multiple variants, sizes, and animation types, designed for seamless integration with modern React projects and monorepos.",
4
- "version": "2.3.5",
4
+ "version": "2.4.0",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "author": "AristoByte <info@aristobyte.com>",
package/README.md DELETED
@@ -1,95 +0,0 @@
1
- # `@aristobyte-ui/spinner`
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
- A modular, highly customizable React spinner component, optimized for AristoByteUI projects. Supports multiple animation types, semantic color variants, and flexible sizing.
15
-
16
- ## πŸ“¦ Installation
17
-
18
- ```bash
19
- # Install via Yarn
20
- yarn add -D @aristobyte-ui/spinner
21
-
22
- # Or via npm
23
- npm install -D @aristobyte-ui/spinner
24
-
25
- # Or via pnpm
26
- pnpm add -D @aristobyte-ui/spinner
27
- ```
28
-
29
- ## πŸ›  Usage
30
-
31
- ```tsx
32
- import { Spinner } from "@aristobyte-ui/spinner";
33
-
34
- export const Demo = () => (
35
- <div>
36
- <Spinner type="default" variant="primary" size="md" />
37
- <Spinner type="duo" variant="success" size="lg" />
38
- <Spinner type="pulse-duo" variant="error" size="sm" />
39
- </div>
40
- );
41
- ```
42
-
43
- | Prop | Type | Default | Description |
44
- | | - | -- | -- |
45
- | type | `"default"`, `"duo"`, `"gradient"`, `"pulse"`, `"pulse-duo"` | `"default"` | Defines the spinner animation style |
46
- | variant | `"default"`, `"primary"`, `"secondary"`, `"success"`, `"error"`, `"warning"` | `"default"` | Semantic color variant |
47
- | size | `"xsm"`, `"sm"`, `"md"`, `"lg"`, `"xlg"` | `"md"` | Controls spinner dimensions |
48
- | className | `string` | `""` | Optional additional class names |
49
-
50
- ## πŸ“‚ Presets Available
51
-
52
- - Types: `default`, `duo`, `gradient`, `pulse`, `pulse-duo`
53
- - Variants: `default`, `primary`, `secondary`, `success`, `error`, `warning`
54
- - Sizes: `xsm`, `sm`, `md`, `lg`, `xlg`
55
-
56
- ## πŸ”§ Example in a Package
57
-
58
- ```tsx
59
- import { Spinner } from "@aristobyte-ui/spinner";
60
-
61
- export const LoadingState = () => (
62
- <div className="flex justify-center items-center">
63
- <Spinner type="gradient" variant="primary" size="lg" />
64
- </div>
65
- );
66
- ```
67
-
68
- ## πŸ“Š Why This Matters
69
-
70
- - **Performance-first:** Engineered with lightweight, GPU-accelerated CSS keyframes for smooth, non-blocking animations.
71
- - **Fully typed:** TypeScript-first API ensures strict type safety and predictable integration across multiple projects.
72
- - **AristoByteUI ready:** Fully interoperable with AristoByte’s design tokens, semantic color palette, and styling architecture.
73
- - **Flexible:** Supports multiple animation types, semantic variants, and responsive sizing to fit any UI scenario.
74
-
75
- ## πŸ† Philosophy
76
-
77
- - **Modular architecture:** Components are built for maximum reusability and composability.
78
- - **Declarative styling:** SCSS modules maintain a clean separation of concerns while leveraging design tokens.
79
- - **Strict typing & runtime flexibility:** Type-safe props with optional runtime overrides.
80
- - **Developer experience optimized:** Intuitive API with predictable behavior and minimal setup.
81
-
82
- ## πŸ“œ License
83
-
84
- [MIT](./LICENSE) Β© AristoByte
85
-
86
- ## πŸ›‘ Shields Showcase
87
-
88
- <p align="center">
89
- <img src="https://img.shields.io/badge/Consistency-100%25-green?style=for-the-badge&logo=typescript" />
90
- <img src="https://img.shields.io/badge/Maintained-Active-brightgreen?style=for-the-badge&logo=github" />
91
- <img src="https://img.shields.io/badge/Strictness-High-critical?style=for-the-badge&logo=eslint" />
92
- <img src="https://img.shields.io/badge/Declarations-Enabled-blue?style=for-the-badge&logo=typescript" />
93
- <img src="https://img.shields.io/badge/Monorepo-Turbo-green?style=for-the-badge&logo=monorepo" />
94
- <img src="https://img.shields.io/badge/Interop-ESM%2FCJS-orange?style=for-the-badge&logo=javascript" />
95
- </p>