@lanrenbang/basecoat-ultra 0.1.6 → 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 -144
- 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 -13
- package/CHANGELOG-cn.md +0 -54
- package/CHANGELOG.md +0 -54
- package/README-cn.md +0 -199
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,200 +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
|
-
|
|
8
|
+
🎡 **[Live Demo & Documentation](https://lanrenbang.github.io/basecoat-ultra)**
|
|
9
9
|
|
|
10
10
|
## ✨ Features
|
|
11
11
|
|
|
12
|
-
### 🛠️ Core Improvements
|
|
13
|
-
|
|
14
|
-
- **CSS Modularization**: Refactored monolithic CSS into
|
|
15
|
-
- **
|
|
16
|
-
- **Component Optimizations**:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
21
22
|
|
|
22
23
|
### 🧩 New Components
|
|
23
|
-
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **Input OTP**: Dedicated one-time password input.
|
|
28
|
-
- **Toggle Group**: Button-style interaction similar to Radio Group.
|
|
29
|
-
- **Toggle**: Independent toggle button style.
|
|
30
|
-
|
|
31
|
-
### 🔌 External Integrations
|
|
32
|
-
Integrated excellent third-party libraries to bridge gaps in pure CSS/Vanilla JS (must be imported separately):
|
|
33
|
-
- **Date Picker**: Deeply customized version based on [Flatpickr](https://flatpickr.js.org/), perfectly adapted to themes.
|
|
34
|
-
- **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
|
|
35
28
|
|
|
36
29
|
### 🎨 Visual Enhancements
|
|
37
|
-
- **Catppuccin Themes**:
|
|
38
|
-
- **Neumorphism
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
41
39
|
|
|
42
40
|
## 📦 Installation
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
Choose the package that fits your stack:
|
|
45
43
|
|
|
44
|
+
### For Vanilla HTML/JS, React, Vue, or Other Frameworks
|
|
46
45
|
```bash
|
|
47
46
|
bun add @lanrenbang/basecoat-ultra
|
|
48
|
-
# or
|
|
49
|
-
npm install @lanrenbang/basecoat-ultra
|
|
47
|
+
# or npm install @lanrenbang/basecoat-ultra
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
# Package approach
|
|
57
|
+
bun add @lanrenbang/basecoat-ultra-svelte
|
|
58
|
+
```
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
## 🚀 Quick Setup
|
|
61
61
|
|
|
62
|
+
### Bundler Setup (Vite, Webpack, etc.)
|
|
62
63
|
```css
|
|
64
|
+
/* In your CSS file */
|
|
63
65
|
@import "tailwindcss";
|
|
64
|
-
|
|
65
|
-
/* 1. Basecoat Core (Required) */
|
|
66
66
|
@import "@lanrenbang/basecoat-ultra";
|
|
67
|
-
|
|
68
|
-
/* 2. External Components (Optional) */
|
|
69
|
-
/* Only import if you use these specific components */
|
|
70
|
-
@import "@lanrenbang/basecoat-ultra/datepicker.css";
|
|
71
|
-
@import "@lanrenbang/basecoat-ultra/resizable.css";
|
|
72
|
-
|
|
73
|
-
/* 3. Theme (Optional, must be explicit) */
|
|
74
|
-
/* We provide a Catppuccin theme suite, or you can build your own */
|
|
75
|
-
@import "@lanrenbang/basecoat-ultra/theme/catppuccin";
|
|
67
|
+
@import "@lanrenbang/basecoat-ultra/theme/catppuccin"; /* Optional */
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
### 2. Import JavaScript
|
|
79
|
-
|
|
80
|
-
In your application entry point (e.g., `main.js` or `app.ts`).
|
|
81
|
-
|
|
82
|
-
**Option A: Import All (Recommended)**
|
|
83
|
-
Includes core logic and most standard components (excludes Datepicker/Resizable).
|
|
84
|
-
|
|
85
70
|
```javascript
|
|
71
|
+
// In your JS file
|
|
86
72
|
import '@lanrenbang/basecoat-ultra/all';
|
|
87
73
|
```
|
|
88
74
|
|
|
89
|
-
|
|
90
|
-
To reduce bundle size, import only what you need.
|
|
91
|
-
**Important**: You MUST import the `basecoat` core module first, as other components rely on it for registration.
|
|
92
|
-
|
|
93
|
-
```javascript
|
|
94
|
-
// 1. Core first
|
|
95
|
-
import '@lanrenbang/basecoat-ultra/basecoat';
|
|
96
|
-
|
|
97
|
-
// 2. Then components
|
|
98
|
-
import '@lanrenbang/basecoat-ultra/tabs';
|
|
99
|
-
import '@lanrenbang/basecoat-ultra/select';
|
|
100
|
-
import '@lanrenbang/basecoat-ultra/popover';
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**External Components (Must be imported separately)**
|
|
104
|
-
Regardless of the option above, these components are not included in the main bundle due to size or dependencies:
|
|
105
|
-
|
|
106
|
-
```javascript
|
|
107
|
-
import '@lanrenbang/basecoat-ultra/datepicker'; // Uses flatpickr
|
|
108
|
-
import '@lanrenbang/basecoat-ultra/resizable'; // Uses split.js
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## 🌐 CDN Usage (No Build Tool)
|
|
114
|
-
|
|
115
|
-
If you are not using a bundler, you can use the pre-compiled versions via CDN (jsDelivr). These include the compiled Tailwind styles.
|
|
116
|
-
|
|
117
|
-
### CSS
|
|
118
|
-
|
|
75
|
+
### CDN Setup (No Build Tool)
|
|
119
76
|
```html
|
|
120
|
-
<!--
|
|
77
|
+
<!-- CSS -->
|
|
121
78
|
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/css/basecoat.cdn.min.css" rel="stylesheet">
|
|
122
79
|
|
|
123
|
-
<!--
|
|
124
|
-
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/css/datepicker.min.css" rel="stylesheet">
|
|
125
|
-
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/css/resizable.min.css" rel="stylesheet">
|
|
126
|
-
|
|
127
|
-
<!-- Theme (Optional) -->
|
|
128
|
-
<link href="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/theme/catppuccin/index.min.css" rel="stylesheet">
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### JavaScript
|
|
132
|
-
|
|
133
|
-
```html
|
|
134
|
-
<!-- Core & Standard Components -->
|
|
80
|
+
<!-- JavaScript -->
|
|
135
81
|
<script src="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/js/all.min.js" defer></script>
|
|
136
|
-
|
|
137
|
-
<!-- External Components (Optional) -->
|
|
138
|
-
<script src="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/js/datepicker.min.js" defer></script>
|
|
139
|
-
<script src="https://cdn.jsdelivr.net/npm/@lanrenbang/basecoat-ultra@latest/dist/js/resizable.min.js" defer></script>
|
|
140
82
|
```
|
|
141
83
|
|
|
84
|
+
For detailed setup instructions, configuration options, and usage examples, visit our **[comprehensive documentation](https://lanrenbang.github.io/basecoat-ultra)**.
|
|
85
|
+
|
|
142
86
|
## 🛠️ Development
|
|
143
87
|
|
|
144
|
-
This project uses
|
|
88
|
+
This project uses a Bun workspace monorepo structure:
|
|
145
89
|
|
|
146
|
-
|
|
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
|
+
```
|
|
147
97
|
|
|
98
|
+
### Development Commands
|
|
148
99
|
```bash
|
|
149
|
-
#
|
|
150
|
-
git clone https://github.com/your-username/basecoat-ultra.git
|
|
151
|
-
cd basecoat-ultra
|
|
152
|
-
|
|
153
|
-
# 2. Install dependencies
|
|
100
|
+
# Install dependencies
|
|
154
101
|
bun install
|
|
155
102
|
|
|
156
|
-
#
|
|
157
|
-
bun
|
|
158
|
-
|
|
103
|
+
# Development servers
|
|
104
|
+
bun dev:ultra # Core Ultra package
|
|
105
|
+
bun dev:svelte # Svelte components
|
|
106
|
+
bun dev:docs # Documentation site
|
|
159
107
|
|
|
160
|
-
|
|
108
|
+
# Build packages
|
|
109
|
+
bun run build:ultra
|
|
110
|
+
bun run build:svelte
|
|
111
|
+
bun run build:docs
|
|
161
112
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
```html
|
|
165
|
-
<script>
|
|
166
|
-
(function() {
|
|
167
|
-
try {
|
|
168
|
-
const t = localStorage.getItem('catppuccin-theme');
|
|
169
|
-
const a = localStorage.getItem('catppuccin-accent');
|
|
170
|
-
const m = localStorage.getItem('basecoat-mode');
|
|
171
|
-
const r = document.documentElement;
|
|
172
|
-
// Prioritize theme config
|
|
173
|
-
if (t && a) {
|
|
174
|
-
r.classList.add(`theme-${t}`, `accent-${a}`);
|
|
175
|
-
if(['frappe','macchiato','mocha'].includes(t)) r.classList.add('dark');
|
|
176
|
-
} else if (m) {
|
|
177
|
-
// Only dark/light mode preference
|
|
178
|
-
r.classList.toggle('dark', m === 'dark');
|
|
179
|
-
} else {
|
|
180
|
-
// Follow system
|
|
181
|
-
r.classList.toggle('dark', window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
182
|
-
}
|
|
183
|
-
} catch(e) {}
|
|
184
|
-
})();
|
|
185
|
-
</script>
|
|
113
|
+
# CLI tool
|
|
114
|
+
bun cli # Run CLI locally
|
|
186
115
|
```
|
|
187
116
|
|
|
117
|
+
### Build Order
|
|
118
|
+
Due to package dependencies: Ultra → Svelte → Docs
|
|
119
|
+
|
|
188
120
|
## ❤️ Credits
|
|
189
121
|
|
|
190
122
|
This project stands on the shoulders of giants:
|
|
191
123
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
|
196
130
|
|
|
197
|
-
## Support Me
|
|
198
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)
|
|
199
132
|
|
|
200
133
|
## 📄 License
|