@lanrenbang/basecoat-ultra 0.1.7 → 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 → LICENSE.md} +2 -2
- package/README.md +77 -147
- package/dist/css/basecoat.cdn.css +134 -1726
- package/dist/css/basecoat.cdn.min.css +1 -1
- package/dist/css/basecoat.css +34 -24
- package/dist/css/datepicker.css +277 -1080
- package/dist/css/datepicker.min.css +2 -1
- package/dist/css/resizable.css +39 -60
- package/dist/css/resizable.min.css +1 -1
- package/dist/js/all.js +1 -0
- package/dist/js/all.min.js +1 -0
- package/dist/js/basecoat.js +6 -4
- package/dist/js/basecoat.min.js +12 -12
- package/dist/js/carousel.js +8 -0
- package/dist/js/carousel.min.js +24 -17
- package/dist/js/catppuccin-theme-switcher.js +41 -6
- package/dist/js/catppuccin-theme-switcher.min.js +62 -47
- package/dist/js/datepicker.js +211 -46
- package/dist/js/datepicker.min.js +566 -423
- package/dist/js/input-otp.js +69 -79
- package/dist/js/input-otp.min.js +30 -35
- package/dist/js/pagination.js +107 -0
- package/dist/js/pagination.min.js +43 -0
- package/dist/js/resizable.js +35 -46
- package/dist/js/resizable.min.js +180 -182
- package/dist/js/sheet.js +28 -26
- package/dist/js/sheet.min.js +34 -34
- package/dist/js/toast.js +17 -35
- package/dist/js/toast.min.js +35 -56
- package/dist/js/toggle.js +5 -0
- package/dist/js/toggle.min.js +15 -10
- package/package.json +28 -14
- package/CHANGELOG-cn.md +0 -54
- package/CHANGELOG.md +0 -54
- package/README-cn.md +0 -202
package/{LICENSE → LICENSE.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025
|
|
3
|
+
Copyright (c) 2025 Ronan Berder
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,203 +1,133 @@
|
|
|
1
1
|
# Basecoat Ultra
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@lanrenbang/basecoat-ultra)
|
|
4
|
+
[](https://github.com/hunvreus/basecoat/blob/main/LICENSE.md)
|
|
4
5
|
|
|
5
|
-
Basecoat is a
|
|
6
|
-
Basecoat brings the magic of shadcn/ui to any traditional web stack: no React required.
|
|
6
|
+
**Basecoat Ultra** is a Tailwind-first UI component library designed for high performance, minimalism, and deep customization. Built upon the excellent foundation of [Basecoat](https://basecoatui.com) by [hunvreus](https://github.com/hunvreus), it brings the magic of shadcn/ui to any traditional web stack without requiring React.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## 🎡 Components Preview
|
|
11
|
-
[lanrenbang.github.io/basecoat-ultra](https://lanrenbang.github.io/basecoat-ultra)
|
|
8
|
+
🎡 **[Live Demo & Documentation](https://lanrenbang.github.io/basecoat-ultra)**
|
|
12
9
|
|
|
13
10
|
## ✨ Features
|
|
14
11
|
|
|
15
|
-
### 🛠️ Core Improvements
|
|
16
|
-
|
|
17
|
-
- **CSS Modularization**: Refactored monolithic CSS into
|
|
18
|
-
- **
|
|
19
|
-
- **Component Optimizations**:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
### 🛠️ Core Improvements Over Upstream
|
|
13
|
+
Enhanced from the original Basecoat with numerous optimizations and bug fixes:
|
|
14
|
+
- **CSS Modularization**: Refactored monolithic CSS into modular structure supporting on-demand loading
|
|
15
|
+
- **Tailwind v4 Compatibility**: Fixed escaping issues with complex selectors and modern CSS nesting
|
|
16
|
+
- **Component Optimizations**:
|
|
17
|
+
- Button: Fixed Ghost/Link variant background issues
|
|
18
|
+
- Dialog: Enhanced animations with natural scaling and bounce effects
|
|
19
|
+
- Dropdown Menu: Resolved initialization flickering
|
|
20
|
+
- Sidebar: Intelligent current page highlighting logic
|
|
21
|
+
- Form Elements: Improved contrast and accessibility
|
|
24
22
|
|
|
25
23
|
### 🧩 New Components
|
|
26
|
-
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **Input OTP**: Dedicated one-time password input.
|
|
31
|
-
- **Toggle Group**: Button-style interaction similar to Radio Group.
|
|
32
|
-
- **Toggle**: Independent toggle button style.
|
|
33
|
-
|
|
34
|
-
### 🔌 External Integrations
|
|
35
|
-
Integrated excellent third-party libraries to bridge gaps in pure CSS/Vanilla JS (must be imported separately):
|
|
36
|
-
- **Date Picker**: Deeply customized version based on [Flatpickr](https://flatpickr.js.org/), perfectly adapted to themes.
|
|
37
|
-
- **Resizable**: Draggable split panel based on [Split.js](https://split.js.org/).
|
|
24
|
+
Comprehensive component library inspired by shadcn/ui, completely framework-independent:
|
|
25
|
+
- **Standard Components**: Accordion, Sheet, Carousel, Input OTP, Toggle Group, Toggle
|
|
26
|
+
- **External Integrations**: Date Picker (Flatpickr), Resizable Panels (Split.js)
|
|
27
|
+
- **Advanced Features**: Command palette, enhanced dialogs, improved navigation
|
|
38
28
|
|
|
39
29
|
### 🎨 Visual Enhancements
|
|
40
|
-
- **Catppuccin Themes**:
|
|
41
|
-
- **Neumorphism
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
- **Catppuccin Themes**: Full suite support (Latte, Frappé, Macchiato, Mocha) with theme switcher
|
|
31
|
+
- **Neumorphism Effects**: Global lighting system with mouse-following effects and 3D transforms
|
|
32
|
+
- **Enhanced Animations**: Smooth transitions and micro-interactions throughout
|
|
33
|
+
|
|
34
|
+
### 🏗️ Multi-Package Architecture
|
|
35
|
+
- **Ultra Package**: Framework-agnostic CSS/JS components for any stack
|
|
36
|
+
- **Svelte Package**: Native Svelte 5 components with Runes support
|
|
37
|
+
- **CLI Tool**: Copy-paste workflow for Svelte components
|
|
38
|
+
- **Documentation**: Comprehensive guides and interactive examples
|
|
44
39
|
|
|
45
40
|
## 📦 Installation
|
|
46
41
|
|
|
47
|
-
|
|
42
|
+
Choose the package that fits your stack:
|
|
48
43
|
|
|
44
|
+
### For Vanilla HTML/JS, React, Vue, or Other Frameworks
|
|
49
45
|
```bash
|
|
50
46
|
bun add @lanrenbang/basecoat-ultra
|
|
51
|
-
# or
|
|
52
|
-
npm install @lanrenbang/basecoat-ultra
|
|
47
|
+
# or npm install @lanrenbang/basecoat-ultra
|
|
53
48
|
```
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
### For Svelte 5 Projects
|
|
51
|
+
```bash
|
|
52
|
+
# CLI approach (recommended)
|
|
53
|
+
npx basecoat-ultra-svelte@latest init
|
|
54
|
+
npx basecoat-ultra-svelte@latest add button
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
# Package approach
|
|
57
|
+
bun add @lanrenbang/basecoat-ultra-svelte
|
|
58
|
+
```
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
## 🚀 Quick Setup
|
|
64
61
|
|
|
62
|
+
### Bundler Setup (Vite, Webpack, etc.)
|
|
65
63
|
```css
|
|
64
|
+
/* In your CSS file */
|
|
66
65
|
@import "tailwindcss";
|
|
67
|
-
|
|
68
|
-
/* 1. Basecoat Core (Required) */
|
|
69
66
|
@import "@lanrenbang/basecoat-ultra";
|
|
70
|
-
|
|
71
|
-
/* 2. External Components (Optional) */
|
|
72
|
-
/* Only import if you use these specific components */
|
|
73
|
-
@import "@lanrenbang/basecoat-ultra/datepicker.css";
|
|
74
|
-
@import "@lanrenbang/basecoat-ultra/resizable.css";
|
|
75
|
-
|
|
76
|
-
/* 3. Theme (Optional, must be explicit) */
|
|
77
|
-
/* We provide a Catppuccin theme suite, or you can build your own */
|
|
78
|
-
@import "@lanrenbang/basecoat-ultra/theme/catppuccin";
|
|
67
|
+
@import "@lanrenbang/basecoat-ultra/theme/catppuccin"; /* Optional */
|
|
79
68
|
```
|
|
80
69
|
|
|
81
|
-
### 2. Import JavaScript
|
|
82
|
-
|
|
83
|
-
In your application entry point (e.g., `main.js` or `app.ts`).
|
|
84
|
-
|
|
85
|
-
**Option A: Import All (Recommended)**
|
|
86
|
-
Includes core logic and most standard components (excludes Datepicker/Resizable).
|
|
87
|
-
|
|
88
70
|
```javascript
|
|
71
|
+
// In your JS file
|
|
89
72
|
import '@lanrenbang/basecoat-ultra/all';
|
|
90
73
|
```
|
|
91
74
|
|
|
92
|
-
|
|
93
|
-
To reduce bundle size, import only what you need.
|
|
94
|
-
**Important**: You MUST import the `basecoat` core module first, as other components rely on it for registration.
|
|
95
|
-
|
|
96
|
-
```javascript
|
|
97
|
-
// 1. Core first
|
|
98
|
-
import '@lanrenbang/basecoat-ultra/basecoat';
|
|
99
|
-
|
|
100
|
-
// 2. Then components
|
|
101
|
-
import '@lanrenbang/basecoat-ultra/tabs';
|
|
102
|
-
import '@lanrenbang/basecoat-ultra/select';
|
|
103
|
-
import '@lanrenbang/basecoat-ultra/popover';
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**External Components (Must be imported separately)**
|
|
107
|
-
Regardless of the option above, these components are not included in the main bundle due to size or dependencies:
|
|
108
|
-
|
|
109
|
-
```javascript
|
|
110
|
-
import '@lanrenbang/basecoat-ultra/datepicker'; // Uses flatpickr
|
|
111
|
-
import '@lanrenbang/basecoat-ultra/resizable'; // Uses split.js
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## 🌐 CDN Usage (No Build Tool)
|
|
117
|
-
|
|
118
|
-
If you are not using a bundler, you can use the pre-compiled versions via CDN (jsDelivr). These include the compiled Tailwind styles.
|
|
119
|
-
|
|
120
|
-
### CSS
|
|
121
|
-
|
|
75
|
+
### CDN Setup (No Build Tool)
|
|
122
76
|
```html
|
|
123
|
-
<!--
|
|
77
|
+
<!-- CSS -->
|
|
124
78
|
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/css/basecoat.cdn.min.css" rel="stylesheet">
|
|
125
79
|
|
|
126
|
-
<!--
|
|
127
|
-
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/css/datepicker.min.css" rel="stylesheet">
|
|
128
|
-
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/css/resizable.min.css" rel="stylesheet">
|
|
129
|
-
|
|
130
|
-
<!-- Theme (Optional) -->
|
|
131
|
-
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/theme/catppuccin/index.min.css" rel="stylesheet">
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### JavaScript
|
|
135
|
-
|
|
136
|
-
```html
|
|
137
|
-
<!-- Core & Standard Components -->
|
|
80
|
+
<!-- JavaScript -->
|
|
138
81
|
<script src="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/js/all.min.js" defer></script>
|
|
139
|
-
|
|
140
|
-
<!-- External Components (Optional) -->
|
|
141
|
-
<script src="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/js/datepicker.min.js" defer></script>
|
|
142
|
-
<script src="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/js/resizable.min.js" defer></script>
|
|
143
82
|
```
|
|
144
83
|
|
|
84
|
+
For detailed setup instructions, configuration options, and usage examples, visit our **[comprehensive documentation](https://lanrenbang.github.io/basecoat-ultra)**.
|
|
85
|
+
|
|
145
86
|
## 🛠️ Development
|
|
146
87
|
|
|
147
|
-
This project uses
|
|
88
|
+
This project uses a Bun workspace monorepo structure:
|
|
148
89
|
|
|
149
|
-
|
|
90
|
+
```
|
|
91
|
+
packages/
|
|
92
|
+
├── ultra/ # Core CSS/JS library (framework-agnostic)
|
|
93
|
+
├── svelte/ # Svelte 5 components with Runes
|
|
94
|
+
├── cli/ # CLI tool for Svelte components
|
|
95
|
+
└── docs/ # Documentation site (SvelteKit)
|
|
96
|
+
```
|
|
150
97
|
|
|
98
|
+
### Development Commands
|
|
151
99
|
```bash
|
|
152
|
-
#
|
|
153
|
-
git clone https://github.com/your-username/basecoat-ultra.git
|
|
154
|
-
cd basecoat-ultra
|
|
155
|
-
|
|
156
|
-
# 2. Install dependencies
|
|
100
|
+
# Install dependencies
|
|
157
101
|
bun install
|
|
158
102
|
|
|
159
|
-
#
|
|
160
|
-
bun
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
### Anti-flash Script
|
|
103
|
+
# Development servers
|
|
104
|
+
bun dev:ultra # Core Ultra package
|
|
105
|
+
bun dev:svelte # Svelte components
|
|
106
|
+
bun dev:docs # Documentation site
|
|
164
107
|
|
|
165
|
-
|
|
108
|
+
# Build packages
|
|
109
|
+
bun run build:ultra
|
|
110
|
+
bun run build:svelte
|
|
111
|
+
bun run build:docs
|
|
166
112
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
(function() {
|
|
170
|
-
try {
|
|
171
|
-
const t = localStorage.getItem('catppuccin-theme');
|
|
172
|
-
const a = localStorage.getItem('catppuccin-accent');
|
|
173
|
-
const m = localStorage.getItem('basecoat-mode');
|
|
174
|
-
const r = document.documentElement;
|
|
175
|
-
// Prioritize theme config
|
|
176
|
-
if (t && a) {
|
|
177
|
-
r.classList.add(`theme-${t}`, `accent-${a}`);
|
|
178
|
-
if(['frappe','macchiato','mocha'].includes(t)) r.classList.add('dark');
|
|
179
|
-
} else if (m) {
|
|
180
|
-
// Only dark/light mode preference
|
|
181
|
-
r.classList.toggle('dark', m === 'dark');
|
|
182
|
-
} else {
|
|
183
|
-
// Follow system
|
|
184
|
-
r.classList.toggle('dark', window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
185
|
-
}
|
|
186
|
-
} catch(e) {}
|
|
187
|
-
})();
|
|
188
|
-
</script>
|
|
113
|
+
# CLI tool
|
|
114
|
+
bun cli # Run CLI locally
|
|
189
115
|
```
|
|
190
116
|
|
|
117
|
+
### Build Order
|
|
118
|
+
Due to package dependencies: Ultra → Svelte → Docs
|
|
119
|
+
|
|
191
120
|
## ❤️ Credits
|
|
192
121
|
|
|
193
122
|
This project stands on the shoulders of giants:
|
|
194
123
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
124
|
+
- **[Basecoat](https://basecoatui.com)**: Original creator [hunvreus](https://github.com/hunvreus). Most foundational code belongs to the original author.
|
|
125
|
+
- **[Catppuccin](https://github.com/catppuccin/palette)**: Beautiful color palettes for theming
|
|
126
|
+
- **[Flatpickr](https://flatpickr.js.org/)** & **[Split.js](https://split.js.org/)**: Excellent third-party integrations
|
|
127
|
+
- **[puikinsh/login-forms](https://github.com/puikinsh/login-forms/tree/main/forms/neumorphism)**: Inspiration for neumorphism effects
|
|
128
|
+
|
|
129
|
+
## ☕ Support
|
|
199
130
|
|
|
200
|
-
## ☕ Support Me
|
|
201
131
|
[](https://buymeacoffee.com/bobbynona) [](https://ko-fi.com/bobbynona) [](https://github.com/Lanrenbang/.github/blob/5b06b0b2d0b8e4ce532c1c37c72115dd98d7d849/custom/USDT-TRC20.md) [](https://github.com/Lanrenbang/.github/blob/5b06b0b2d0b8e4ce532c1c37c72115dd98d7d849/custom/Litecoin.md)
|
|
202
132
|
|
|
203
133
|
## 📄 License
|